diff --git a/get-shit-done/workflows/execute-phase.md b/get-shit-done/workflows/execute-phase.md index c12af3298..737f8f8d0 100644 --- a/get-shit-done/workflows/execute-phase.md +++ b/get-shit-done/workflows/execute-phase.md @@ -548,6 +548,7 @@ increases monotonically across waves. `{status}` is `complete` (success), only (STATE.md and ROADMAP.md are excluded automatically). Do NOT skip or defer this commit — the orchestrator force-removes the worktree after you return, and any uncommitted SUMMARY.md will be permanently lost (#2070). + REQUIRED ORDER: Write SUMMARY.md → commit → only then any narration. No text between Write and commit (truncation risk; #2070 rescue is not primary defense). @@ -602,6 +603,7 @@ increases monotonically across waves. `{status}` is `complete` (success), You are running as a SEQUENTIAL executor agent on the main working tree. Use normal git commits (with hooks). Do NOT use --no-verify. + REQUIRED ORDER: Write SUMMARY.md → commit → only then any narration. No text between Write and commit (truncation risk; #2070 rescue is not primary defense). ``` diff --git a/get-shit-done/workflows/execute-plan.md b/get-shit-done/workflows/execute-plan.md index 5696c5c1e..4a39dc457 100644 --- a/get-shit-done/workflows/execute-plan.md +++ b/get-shit-done/workflows/execute-plan.md @@ -116,12 +116,18 @@ Pattern B only (verify-only checkpoints). Skip for A/C. 2. Per segment: - Subagent route: spawn gsd-executor for assigned tasks only. Prompt: task range, plan path, read full plan for context, execute assigned tasks, track deviations, NO SUMMARY/commit. Track via agent protocol. - Main route: execute tasks using standard flow (step name="execute") -3. After ALL segments: aggregate files/deviations/decisions → create SUMMARY.md → commit → self-check: +3. **Critical ordering — write and commit SUMMARY.md as one atomic block.** Do NOT + emit narrative output between the Write tool call and the commit tool call. + Truncation at this boundary is a known failure mode (see #2070 rescue logic in + execute-phase.md step 5.5). + + After ALL segments: aggregate files/deviations/decisions → create SUMMARY.md → self-check: - Verify key-files.created exist on disk with `[ -f ]` - Check `git log --oneline --all --grep="{phase}-{plan}"` returns ≥1 commit - Re-run ALL `` from every task — if any fail, fix before finalizing SUMMARY - Re-run the plan-level `` commands — log results in SUMMARY - Append `## Self-Check: PASSED` or `## Self-Check: FAILED` to SUMMARY + Then commit (no narrative between Write and commit). **Known Claude Code bug (classifyHandoffIfNeeded):** If any segment agent reports "failed" with `classifyHandoffIfNeeded is not defined`, this is a Claude Code runtime bug — not a real failure. Run spot-checks; if they pass, treat as successful. @@ -336,6 +342,11 @@ If user_setup exists: create `{phase}-USER-SETUP.md` using template `~/.claude/g +**Critical ordering — write and commit SUMMARY.md as one atomic block.** Do NOT +emit narrative output between the Write tool call and the commit tool call. +Truncation at this boundary is a known failure mode (see #2070 rescue logic in +execute-phase.md step 5.5). + Create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. Use `~/.claude/get-shit-done/templates/summary.md`. **Frontmatter:** phase, plan, subsystem, tags | requires/provides/affects | tech-stack.added/patterns | key-files.created/modified | key-decisions | requirements-completed (**MUST** copy `requirements` array from PLAN.md frontmatter verbatim) | duration ($DURATION), completed ($PLAN_END_TIME date). @@ -437,6 +448,11 @@ Extract requirement IDs from the plan's frontmatter (e.g., `requirements: [AUTH- +**Critical ordering — write and commit SUMMARY.md as one atomic block.** Do NOT +emit narrative output between the Write tool call and the commit tool call. +Truncation at this boundary is a known failure mode (see #2070 rescue logic in +execute-phase.md step 5.5). + Task code already committed per-task. Commit plan metadata: ```bash