feat(loop): Phase 0-1 report-only Evidence-Gated Engineering Loop foundation - #2
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sei CHANGELOG.md for details.