Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/agents/engine-implementation-executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The orchestrator gives you:
2. The reviewed plan (every section: Pattern Coverage, Building Blocks, Logic Placement, Rust Idioms, Nom Compliance, Extension vs Creation, Analogous Trace, step-by-step file changes).
3. `BASE_SHA`; for `implementation/fix`, named `START_SHA` and `IMPLEMENTATION_WORKTREE`; for `measurement-only`, immutable `CANDIDATE_SHA` and the named `IMPLEMENTATION_WORKTREE` too.
4. Frozen in-/out-of-bounds scope paths as a duplicate-free `LC_ALL=C sort -z` NUL-delimited representation and its SHA256; for measurement-only, clean detached base/candidate projection worktrees.
5. The externally owned canonical receipt path, read-only pinned data root containing `AtomicCards.json`, and completion evidence destinations. The receipt is the only provenance contract; do not create a manifest, seal, provenance envelope, replica/quorum report, or parallel parser ledger.
5. The externally owned canonical receipt destination β€” a receipt file path (v1) or a `receipt.json` the orchestrator attaches as a git note under `refs/notes/engine-implementer` (v2; the note and its ref are part of the canonical receipt, not a parallel record) β€” plus the read-only pinned data root containing `AtomicCards.json` and completion evidence destinations. The receipt is the only provenance contract; do not create a manifest, seal, provenance envelope, replica/quorum report, or parallel parser ledger beyond it.
6. For an implementation/fix round, any reviewer findings as constraints.

Mode is a hard boundary:
Expand Down Expand Up @@ -186,7 +186,7 @@ For parser changes always run additionally as preparatory checks:

Execute `scripts/engine-source-hash.sh "$BASE_SHA"` in the detached base projection worktree and `scripts/engine-source-hash.sh "$CANDIDATE_SHA"` in the detached candidate projection worktree, binding each output to its SHA through the required `source_hash_record.base` / `.candidate` receipt groups, then run and record exactly `git -C "$IMPLEMENTATION_WORKTREE" diff --name-only -z "$BASE_SHA" "$CANDIDATE_SHA" -- Cargo.toml .cargo/config.toml rust-toolchain.toml scripts/engine-source-hash.sh`. This NUL-delimited artifact is the excluded projection-authority input check. The source-hash groups and authority-diff record remain mandatory when values are equal; only equal hashes with an empty authority-diff artifact set `projection_forced_reason=NONE`, write `NO_PARSE_AFFECTING_CHANGE`, omit the projection section, and never invoke a parser tool. A source-hash difference and/or any authority-diff path sets its canonical non-`NONE` reason and forces `PROJECTED_PARSE_DIFF`.

For any non-`NONE` `projection_forced_reason`, pin the read-only `AtomicCards.json` input once and use it directly for both detached worktrees. For each side, execute in that side's detached worktree, set its own receipt-owned `CARGO_TARGET_DIR`, and run exactly `cargo build --profile tool --features cli --bin oracle-gen --bin coverage-report --bin coverage-parse-diff`. Run that side's `oracle-gen` and `coverage-report` directly in that worktree to create exactly one projection. Then invoke only the base-built comparator with both `--base-sha "$BASE_SHA"` and `--head-sha "$CANDIDATE_SHA"`. Each build, generator, report, and comparator has a complete indexed receipt group: command/environment, worktree and target, expected SHA, `head_before`, `detached_before`, `head_after`, `detached_after`, `clean_before`, `clean_after`, exit result, stdout/stderr paths and SHA256s, and produced artifacts. `detached_before` and `detached_after` each prove that `git symbolic-ref -q HEAD` exited exactly `1` with empty stdout and stderr; any other result is `CANNOT_ANSWER`. The artifact groups enumerate every input/output with path, size, and SHA256. A source-hash difference or excluded-authority-input change is valid; any missing/mismatched required source-hash, authority-diff, or projection record, extra projection, or operational failure is `CANNOT_ANSWER`.
For any non-`NONE` `projection_forced_reason`, pin the read-only `AtomicCards.json` input once and use it directly for both detached worktrees. For each side, execute in that side's detached worktree, set its own receipt-owned `CARGO_TARGET_DIR`, and run exactly `CARGO_INCREMENTAL=0 cargo build --profile tool --features cli --bin oracle-gen --bin coverage-report --bin coverage-parse-diff` (projection targets are build-once; incremental state is pure disk cost β€” measured 17 of 28 GB on one such directory). Run that side's `oracle-gen` and `coverage-report` directly in that worktree to create exactly one projection. Then invoke only the base-built comparator with both `--base-sha "$BASE_SHA"` and `--head-sha "$CANDIDATE_SHA"`. Each build, generator, report, and comparator has a complete indexed receipt group: command/environment, worktree and target, expected SHA, `head_before`, `detached_before`, `head_after`, `detached_after`, `clean_before`, `clean_after`, exit result, stdout/stderr paths and SHA256s, and produced artifacts. `detached_before` and `detached_after` each prove that `git symbolic-ref -q HEAD` exited exactly `1` with empty stdout and stderr; any other result is `CANNOT_ANSWER`. The artifact groups enumerate every input/output with path, size, and SHA256. A source-hash difference or excluded-authority-input change is valid; any missing/mismatched required source-hash, authority-diff, or projection record, extra projection, or operational failure is `CANNOT_ANSWER`.

On `MEASURED`, the receipt names `BASE_SHA` and `CANDIDATE_SHA`, records raw artifacts and their digests, and sets either `NO_PARSE_AFFECTING_CHANGE` or `PROJECTED_PARSE_DIFF`. On `CANNOT_ANSWER`, retain only completed records and do not claim parser evidence or completion verification; completion belongs to the orchestrator after this mode returns.

Expand Down
Loading
Loading