fix(quick): enforce commit boundary between executor and orchestrator

Executor constraints now prohibit committing docs artifacts (SUMMARY.md,
STATE.md, PLAN.md) — these are the orchestrator's responsibility in
Step 8. Step 8 now explicitly stages all artifacts with git add before
calling gsd-tools commit, and documents that it must always run even if
the executor already committed some files.

This prevents PLAN.md from being left untracked when the executor runs
without worktree isolation (e.g. local repos with no remote, or when
workflow.use_worktrees is false).

Closes #1503

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tibsfox
2026-03-30 20:23:29 -07:00
parent 1421dc07bc
commit 5635d71ed1
2 changed files with 59 additions and 2 deletions

View File

@@ -552,8 +552,9 @@ ${AGENT_SKILLS_EXECUTOR}
<constraints>
- Execute all tasks in the plan
- Commit each task atomically
- Commit each task atomically (code changes only)
- Create summary at: ${QUICK_DIR}/${quick_id}-SUMMARY.md
- Do NOT commit docs artifacts (SUMMARY.md, STATE.md, PLAN.md) — the orchestrator handles the docs commit in Step 8
- Do NOT update ROADMAP.md (quick tasks are separate from planned phases)
</constraints>
",
@@ -681,7 +682,7 @@ Use Edit tool to make these changes atomically
**Step 8: Final commit and completion**
Stage and commit quick task artifacts:
Stage and commit quick task artifacts. This step MUST always run — even if the executor already committed some files (e.g. when running without worktree isolation). The `gsd-tools commit` command handles already-committed files gracefully.
Build file list:
- `${QUICK_DIR}/${quick_id}-PLAN.md`
@@ -692,6 +693,9 @@ Build file list:
- If `$FULL_MODE` and verification file exists: `${QUICK_DIR}/${quick_id}-VERIFICATION.md`
```bash
# Explicitly stage all artifacts before commit — PLAN.md may be untracked
# if the executor ran without worktree isolation and committed docs early
git add ${file_list} 2>/dev/null
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs(quick-${quick_id}): ${DESCRIPTION}" --files ${file_list}
```