Skip to content

feat(loop): Phase 0-1 report-only Evidence-Gated Engineering Loop foundation - #2

Merged
brunovicco merged 1 commit into
masterfrom
feat/b2-b3-loop-phase0-foundation
Jul 18, 2026
Merged

feat(loop): Phase 0-1 report-only Evidence-Gated Engineering Loop foundation#2
brunovicco merged 1 commit into
masterfrom
feat/b2-b3-loop-phase0-foundation

Conversation

@brunovicco

@brunovicco brunovicco commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Sei CHANGELOG.md for details.

…ndation

B2 - Minimal integration in this harness, nothing above 'report' autonomy:

- protect_sensitive_files.py (template and plugin): deny agent writes to
  '.loop/**' and 'scripts/loop_*', separate from the existing secrets
  denylist, with its own message pointing at docs/LOOPS.md. Only a human
  editing outside of an agent tool call can populate these paths.
- template/scripts/_vendor_loop_schemas/: vendored copy of
  engineering-loop-schemas' src/loop_schemas/ (models.py,
  validate_contract.py) at commit 422a8c4, header-documented per file. The
  package is named _vendor_loop_schemas (not loop_schemas) so it does not
  collide with its own scripts/loop_* denylist; documented in the header
  and in docs/LOOPS.md. Stdlib-only: no new dependency added to the
  harness core (PyYAML is optional -- JSON contracts always work, YAML
  degrades gracefully with a clear error if PyYAML is not importable).
- template/scripts/validate_loop_contracts.py: discovers contracts under
  .loop/contracts/**, validates each with the vendored validator, and is
  a documented no-op when none exist. Wired into
  template/scripts/quality_gate.py as a new 'loop-contracts' check.
- docs/LOOPS.md + docs/LOOPS.pt-BR.md: the three-tier model, the eight
  final states, the non-negotiable principles, and this repo's current
  state (Phase 1, report-only), in English and Portuguese.

B3 - Report-only self-evaluation workflow:

- scripts/loop_self_evaluation.py: renders every profile x governance
  combination into a temporary directory (discarded after the run), gates
  each with its own quality_gate.py, checks manifest/plugin/documentation
  consistency by delegating to tests.test_harness.DistributionTests, and
  writes a structured report.json + report.md. Zero repository
  modification. Unlike the Codex sibling harness, this harness has no
  per-profile optional 'observability' extra (Langfuse tracing is a
  regular service-profile dependency here), so the sync step matches this
  repository's own generated-profiles CI job rather than Codex's -- an
  early run of this script against a naive port caught that divergence
  directly (sync:service-* failed with 'Extra observability is not
  defined'), which is exactly the kind of documentation-consistency
  divergence this workflow exists to surface.
- .github/workflows/loop-self-evaluation.yml: workflow_dispatch (with a
  default-false 'run_agent_interpretation' input whose step is an inert,
  read-only placeholder defining no credentials) plus a weekly schedule.
  Uploads the report as a build artifact. Security: top-level
  'permissions: {}', explicit job-level 'contents: read' only,
  'persist-credentials: false', every action pinned by full commit SHA,
  no pull_request_target anywhere.
- Added 'scripts' to the existing 'Compile distributed Python' and 'Lint
  harness distribution' CI steps so the new repo-level scripts/ directory
  is covered.

Out of scope, per the approved plan: no loop_runner.py, loop_gate.py,
loop_state.py, evaluator, or state machine; no autonomy above 'report'.

Validation: full 'python -m unittest discover -s tests -v' (54 tests)
passed; ruff check clean over bootstrap.py/tests/template/plugin/scripts;
scripts/loop_self_evaluation.py run standalone end-to-end, all 7 checks
(manifest/docs consistency + 6 profile x governance quality gates,
including the new loop-contracts check) passing.
@brunovicco
brunovicco marked this pull request as ready for review July 18, 2026 16:10
@brunovicco
brunovicco merged commit 6771551 into master Jul 18, 2026
12 checks passed
@brunovicco
brunovicco deleted the feat/b2-b3-loop-phase0-foundation branch July 18, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant