feat(agent): implementation subagent for the development loop#90
Merged
Conversation
Define loopworks.implementation_result.v1: a digest-bound production patch with per-test green evidence and aggregate validation evidence, plus path-safety refinement and the issue-48 fixture handoff used by implementer fixture mode. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The development-stage sibling consumes the persisted plan, test patch, red evidence, and fixtures without re-derivation. Guarded tools pin the checkout, apply the exact test patch once, permit one bounded production-only write, run each planned test plus aggregate validation, and emit HMAC-signed, redacted execution receipts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
applyDevelopmentLoopImplementationResult revalidates the approved plan, test-plan/red-evidence binding, and signed green receipts inside one transaction, claims the development step against concurrent replays, stores the result on the patch artifact, and advances the run to validation. Idempotent replays return the persisted outcome. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The orchestrator delegates development to the implementer and persists via apply_implementation_result; fixture mode serves a canned development-stage context for deterministic evals. The development stage actor becomes the declared implementer subagent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cover root-to-implementer delegation on issue 48: typed result emission, control-plane persistence, and denial of raw write/bash tools at the root. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Document the implementation sibling's handoff contract, signed green receipts, and root-owned persistence; mark the issue-48 follow-up done and register LOOPWORKS_EVE_IMPLEMENTER_FIXTURE_MODE. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Security-critical helpers now have one implementation: redactSecrets (the test-writer gains the private-key rule it was missing), a generic HMAC execution-receipt pair, and a parameterized stage fixture-mode resolver. loadImplementationHandoff verifies at parity with the root transition so the subagent rejects anything persistence would reject instead of burning the stage first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tion - Verify sandbox working trees with git status --porcelain --untracked-files=all instead of git diff --name-only, which never lists untracked files and blocked every test patch that added a new file; unquote C-quoted porcelain paths. - Guard repositoryFullName against shell metacharacters before it is interpolated into the clone command during the open-egress window, matching the test-writer checkout. - Classify green runs by exit code plus positive pass evidence instead of bare substrings like "timeout" that collide with test titles, and trust the aggregate validation exit code over phrase scans. - Release the one-shot production-write claim with a best-effort file revert when a write fails, so transient errors no longer brick the session. - Stop rejecting production files merely named after fixtures (fixture-mode.ts could not have shipped itself). - Add spans to the production write and the network-egress checkout. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… tool The transition's implementation_stage_advanced log was dead code because no caller passed a logger. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
Review findings addressedAll 10 findings from the adversarial review are now handled in three commits (
A follow-up adversarial pass on the fixes themselves caught and fixed: missing Deferred follow-ups (pre-existing or larger refactors, not blocking):
Validation: |
ncolesummers
marked this pull request as ready for review
July 14, 2026 05:13
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.
Closes #48.
Summary
Adds the implementer subagent for the development stage under the ADR 0015 orchestration contract:
loopworks.implementation_result.v1: a digest-bound, production-only unified diff plus per-test green evidence and aggregatebun run validateevidence, with patch-safety refinement (path allowlist, forbidden operations, byte/digest integrity).applyDevelopmentLoopImplementationResultrevalidates the approval, handoff digests, and every receipt inside one transaction, claims the step against concurrent replays, stores the result on the developmentpatchartifact, and advances the run to validation. Idempotent replays return the persisted outcome.implementer;LOOPWORKS_EVE_IMPLEMENTER_FIXTURE_MODEserves a deterministic canned handoff; eval covers root→implementer routing on issue Implementation subagent for the development loop #48.Validation
bun run precommitgreen (typecheck, 352 unit tests across 57 files, 22 e2e).Adversarial review findings (not yet fixed — kept as review input)
Multi-angle review of this diff surfaced real issues, most severe first:
apply_exact_test_patch.ts:41verifies applied paths withgit diff --name-only, which never lists untracked files, butgit applyleaves new files untracked. Any test patch adding a new test file (the test-writer's standard output) always throws "Applied test patch changed undeclared paths", blocking every real non-fixture run.write_production_files.ts:49has the same untracked-file blindness in its cleanliness check; it throws before any production write.read_implementation_context.ts:34interpolatesrepositoryFullName(validated only as non-empty string) into a double-quoted shell command where$(...)still expands, during the open-egress clone window. The sibling test-writer checkout has a format guard (read_approved_plan.ts:73) that this copy dropped.classifyGreenRun(tool-policy.ts:54) marks passing runs invalid if output contains bare substrings like "timeout"/"killed"; this repo has timeout-named tests.run_aggregate_validation.ts:54re-scans passing output for/tests? failed|build failed/i; a test title like "renders build failed banner" fails a green validate.write_production_files.ts:55writes the one-shot claim marker before the guarded writes; any transient failure afterward permanently bricks the session with no retry path.isAllowedProductionArtifactPathrejects any filename containing "fixture" or anytestssegment — the implementer could not have produced this very PR (fixture-mode.ts).implementation_stage_advancedstructured log is dead code (no caller passes a logger);write_production_filesand the network-egress checkout have no span/log, unlike sibling tools (agent/AGENTS.md rule 5).loadImplementationHandoffis a weaker duplicate of the transition's verification (misses redEvidence plan binding, duplicate-row tolerance), so a subagent-accepted handoff can burn a full stage before the root rejects it; receipt payload construction is duplicated at four sites.🤖 Generated with Claude Code