Skip to content

fix(plugin): handoff requests spec changes instead of editing the package - #72

Merged
chrispezza merged 1 commit into
mainfrom
fix/handoff-spec-change-request
Oct 12, 2026
Merged

chrispezza merged 1 commit into
mainfrom
fix/handoff-spec-change-request

Conversation

@chrispezza

Copy link
Copy Markdown
Collaborator

Summary

Closes #71. Corrects the handoff text shipped in #69.

  • The flaw. The handoff told the implementation agent to update the spec files once the builder agreed. /compile deletes the package and rebuilds it from the source artifacts, so those edits were never validated and were lost on the next compile.
  • The fix. After agreement the agent edits nothing under the package. It writes spec-change-request.md with the exact YAML per spec file and the source artifact each belongs in, asks the builder to re-run /compile, and builds the feature from the recompiled package.
  • The handoff now carries the spec-file-to-artifact table. A test keeps it equal to the compiler's own map.
  • Plugin version 0.5.2 to 0.5.3. Example handoff regenerated.

Evidence

Two batches of six isolated headless two-turn runs (Sonnet 5.5, tea-tracker package, a spec-silent is_favorite request, then "Yes, add it. Go ahead.").

Handoff from #69 This PR
Turn 1: withheld the field and asked 6 of 6 6 of 6
Turn 2: edited files under the package 6 of 6 0 of 6
Edited package still validates 3 of 6 not applicable
Turn 2: wrote the change request only not applicable 6 of 6
Built the field before a recompile 6 of 6 0 of 6

Limits: one fixture, one model, one request. The loop was not closed with a recompiled package.

Behaviour change for plugin users

A feature outside the spec now waits for the builder to edit the source artifacts and recompile. Slower than an in-place edit, and the only path on which the change is validated and survives.

Test plan

  • python -m unittest discover -s checks/tests — 34 tests pass
  • python checks/run_checks.py --ci --require-validator — 0 findings
  • Fixture package still validates
  • CI green

ADR impact

  • Existing ADR amended by an appended, dated section: ADR 0010

🤖 Generated with Claude Code

…kage

The handoff told the implementation agent to update the spec files once the
builder agreed. /compile deletes and rebuilds the package from the source
artifacts, so those edits were never validated and were lost on the next
compile. In a trial, three of six hand-edited packages failed validation.

- After agreement the agent writes spec-change-request.md (exact YAML per
  spec file, and the source artifact it belongs in), asks the builder to
  re-run /compile, and builds the feature from the recompiled package
- Add the spec-file-to-artifact table to the handoff; a test keeps it equal
  to the compiler's SPEC_ARTIFACTS map
- Regenerate the tea-tracker example handoff; bump the plugin to 0.5.3
- Append the correction and both trial results to ADR 0010

Closes #71

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chrispezza
chrispezza merged commit 6fd2f1a into main Oct 12, 2026
2 checks passed
@chrispezza
chrispezza deleted the fix/handoff-spec-change-request branch October 12, 2026 23:08
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.

Handoff tells the agent to edit the spec but gives no way to revalidate it

1 participant