feat(dev-auto): preserve the attempted change on intent-gap halts - #2564
Conversation
The intent_gap branch reverted code changes before halting, destroying
information: the attempted diff shows the human exactly which reading
the agent implemented, which is concrete evidence for repairing the
intent — and occasionally the guessed reading is simply right.
Save the attempt as a patch file in {implementation_artifacts} before
reverting, reference it from the triage log, and include its path in
the halt output. Restart stays default-clean (blocked keeps discard
semantics; the tree is reverted as before); if the human decides the
attempted reading was correct, git apply + status in-review resumes
review on it instead of paying for a full re-run.
Also unify the blocking-condition vocabulary: 'intent gaps' (step-02)
and 'intent gap in intent contract' (step-04) both become 'intent gap'
— one condition, one meaning; the artifact shows which phase raised it.
Document the artifact, the recovery affordance, and the unified
condition in the integration reference (docs/reference/dev-auto.md).
|
@coderabbitai review |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughDocumentation and workflow spec files for bmad-dev-auto are updated to rename the "intent gaps" blocking condition to "intent gap." Step-04 review behavior now saves a patch file and triage-log entry on intent gap halt, and reference docs describe this new patch artifact and resume flow. ChangesIntent gap handling update
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bmad-code-org#2564 unified the blocking-condition vocabulary ('intent gaps' + 'intent gap in intent contract' both become 'intent gap') and added a patch-file artifact preserved on intent-gap halts. bmad-code-org#2549 introduced the folder+id dispatch contract; the doc gained the Folder+ID Dispatch section, ready-for-dev halt outcome on a directive, slug-fallback table for pre-planning halts, and updated orchestrator responsibilities. core-tools.md gained the new 'break a spec into stories' use case and the Story Breakdown step. Source already matched upstream across all six batch-1 commits (bmad-code-org#2549, bmad-code-org#2560, bmad-code-org#2561, bmad-code-org#2563, bmad-code-org#2564, bmad-code-org#2565).
What
When review hits an intent gap,
bmad-dev-autocurrently reverts the attempted code changes before halting — destroying information. This PR:step-04): before the usual revert, the attempted change is saved as a patch file in{implementation_artifacts}, referenced from the triage log, with its path included in the halt output. The working tree still ends reverted, soblockedkeeps its discard-and-restart semantics and the common recovery path (repair the intent, run fresh) stays default-clean.intent gaps(step-02) andintent gap in intent contract(step-04) both becomeintent gap— one condition, one meaning (the captured intent cannot answer a question the run hit); the artifact shows which phase raised it.docs/reference/dev-auto.md): the unified condition, the new patch artifact, and the recovery affordance.Why
Two uses for the preserved attempt, observed in live runs:
Optional[str]where the intent's example showeda : str; the implemented reading was arguably the correct one (and matches what upstream later shipped). When that happens,git applythe patch + set spec statusin-reviewresumes review on the preserved diff against the amended intent, instead of paying for a full re-run. The existingin-reviewresume routing already supports this — no new status or machinery.Design note: preserving as a patch file rather than leaving the tree dirty was deliberate. Dirty-tree preservation would optimize the rare case (lucky guess) while taxing the common one — every discard-and-restart would need a manual reset first, and a forgotten reset blocks the next run's clean-tree check.
🤖 Generated with Claude Code