Skip to content

docs(maestro-case): split validate + ship into dedicated Phase 4 + 5#509

Open
song-zhao-25 wants to merge 1 commit into
mainfrom
fix/agent-skip-debug-validate
Open

docs(maestro-case): split validate + ship into dedicated Phase 4 + 5#509
song-zhao-25 wants to merge 1 commit into
mainfrom
fix/agent-skip-debug-validate

Conversation

@song-zhao-25
Copy link
Copy Markdown
Contributor

Summary

  • Agents occasionally skipped debug + validate after Phase 2b's "Full validate" step because the post-build prompt was framed as optional ("Optional: Debug session") and buried at the tail of the detail-build phase. This refactor promotes validate and ship to their own dedicated phases so they cannot be silently skipped.
  • Rename: Phase 2aPhase 2 (skeleton), Phase 2bPhase 3 (detail). All 17 plugin/reference docs updated.
  • New Phase 4 — Validate (mandatory, runs after Phase 3). Agent fixes failures via direct caseplan.json edits (no Phase 3 plugin re-runs — agent has enough context to make targeted fixes). Cap at 3 retries; on 3rd failure, AskUserQuestion Retry with fix / Pause for manual edit / Abort.
  • New Phase 5 — Ship (mandatory hard-stop loop). Same prompt-discipline as the Phase 2 → 3 stop. Debug + publish are options inside the loop, not separate phases. Debug failure recovery mirrors Phase 4: agent triages from case debug error message, edits caseplan.json, re-runs debug. Cap 3 retries.
  • Rule 14 added to SKILL.md to enforce Phase 4 + 5 always-runs contract — closes the agent-skip gap.
  • Phases 1–3 are forward-only (best-effort, graceful degradation, no back-edges). Only Phase 4 and Phase 5 have failure-recovery loops, and those recover via direct edits — not by re-running earlier phases.

Test plan

  • Walk a sample case through the skill end-to-end; confirm Phase 4 validate runs unprompted and Phase 5 ship prompt fires every time
  • Trigger a Phase 4 validation failure; confirm agent edits caseplan.json directly (no Phase 3 plugin re-invocation) and re-validates
  • Confirm Phase 5 prompt loops correctly through debug → publish → done and publish → debug → done
  • Trigger a debug runtime error; confirm agent triages and re-runs debug up to 3 retries
  • Confirm Phase 2a / Phase 2b no longer appear anywhere in skill docs (including plugin impl-json.md files)
  • Confirm Rule 14 blocks any code path that would skip Phase 4 or Phase 5

🤖 Generated with Claude Code

Agents occasionally skipped debug + validate after Phase 2b's "Full
validate" step because the post-build prompt was framed as optional and
buried at the tail of the detail-build phase. Promote validate and ship
to their own named phases so they cannot be silently skipped, and add
Rule 14 to enforce the always-runs contract.

- Rename Phase 2a -> Phase 2 (skeleton), Phase 2b -> Phase 3 (detail)
- New Phase 4 (Validate) - full validate; agent fixes failures via
  direct caseplan.json edits (no Phase 3 plugin re-runs), cap 3 retries
- New Phase 5 (Ship) - mandatory hard-stop AskUserQuestion loop with
  debug + publish; debug retry policy added (3 retries)
- 17 plugin/reference docs renamed to use the new phase names

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant