From 1b9c2f24559f5318b18d4393fc07ee5728fea3cf Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Tue, 6 Jan 2026 12:12:21 -0600 Subject: [PATCH] fix: commit phase artifacts when created (#12) Each phase workflow now commits its artifacts immediately: - discuss-phase.md commits CONTEXT.md - research-phase.md commits RESEARCH.md - plan-phase.md commits PLAN.md (and DISCOVERY.md) - execute-phase.md commits only execution artifacts (SUMMARY, STATE, ROADMAP) Planning artifacts are inputs to execution and should be saved when created. Execution artifacts are outputs and are committed after execution completes. Closes #12 --- get-shit-done/workflows/discuss-phase.md | 20 ++++++++++++++++++ get-shit-done/workflows/execute-phase.md | 9 ++++---- get-shit-done/workflows/plan-phase.md | 25 +++++++++++++++++++++++ get-shit-done/workflows/research-phase.md | 20 ++++++++++++++++++ 4 files changed, 69 insertions(+), 5 deletions(-) diff --git a/get-shit-done/workflows/discuss-phase.md b/get-shit-done/workflows/discuss-phase.md index 50ba3ffbc..776e98c69 100644 --- a/get-shit-done/workflows/discuss-phase.md +++ b/get-shit-done/workflows/discuss-phase.md @@ -215,6 +215,25 @@ Created: .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md + +Commit phase context: + +```bash +git add .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md +git commit -m "$(cat <<'EOF' +docs(${PHASE}): capture phase context + +Phase ${PHASE}: ${PHASE_NAME} +- Vision and goals documented +- Essential requirements identified +- Scope boundaries defined +EOF +)" +``` + +Confirm: "Committed: docs(${PHASE}): capture phase context" + + @@ -223,5 +242,6 @@ Created: .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md - Vision gathered through collaborative thinking (not interrogation) - User's imagination captured: how it works, what's essential, what's out of scope - CONTEXT.md created in phase directory +- CONTEXT.md committed to git - User knows next steps (typically: research or plan the phase) diff --git a/get-shit-done/workflows/execute-phase.md b/get-shit-done/workflows/execute-phase.md index b95f02061..cb42f7d19 100644 --- a/get-shit-done/workflows/execute-phase.md +++ b/get-shit-done/workflows/execute-phase.md @@ -1285,15 +1285,14 @@ ROADMAP_FILE=".planning/ROADMAP.md" -Commit plan metadata (SUMMARY + STATE + ROADMAP): +Commit execution metadata (SUMMARY + STATE + ROADMAP): **Note:** All task code has already been committed during execution (one commit per task). -This final commit captures plan completion metadata only. +PLAN.md was already committed during plan-phase. This final commit captures execution results only. -**1. Stage planning artifacts:** +**1. Stage execution artifacts:** ```bash -git add .planning/phases/XX-name/{phase}-{plan}-PLAN.md git add .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md git add .planning/STATE.md ``` @@ -1308,7 +1307,7 @@ git add .planning/ROADMAP.md ```bash git status -# Should show only planning artifacts, no code files +# Should show only execution artifacts (SUMMARY, STATE, ROADMAP), no code files ``` **4. Commit metadata:** diff --git a/get-shit-done/workflows/plan-phase.md b/get-shit-done/workflows/plan-phase.md index a19d799c4..b4b6b3330 100644 --- a/get-shit-done/workflows/plan-phase.md +++ b/get-shit-done/workflows/plan-phase.md @@ -391,6 +391,30 @@ This ensures every PLAN.md gets optimal context automatically assembled via depe For multi-plan phases: each plan has focused scope, references previous plan summaries (via frontmatter selection), last plan's success criteria includes "Phase X complete". + +Commit phase plan(s): + +```bash +# Stage all PLAN.md files for this phase +git add .planning/phases/${PHASE}-*/${PHASE}-*-PLAN.md + +# Also stage DISCOVERY.md if it was created during mandatory_discovery +git add .planning/phases/${PHASE}-*/DISCOVERY.md 2>/dev/null + +git commit -m "$(cat <<'EOF' +docs(${PHASE}): create phase plan + +Phase ${PHASE}: ${PHASE_NAME} +- [N] plan(s) created +- [X] total tasks defined +- Ready for execution +EOF +)" +``` + +Confirm: "Committed: docs(${PHASE}): create phase plan" + + ``` Phase plan created: .planning/phases/XX-name/{phase}-01-PLAN.md @@ -451,5 +475,6 @@ Phase planning complete when: - [ ] Each task: Type, Files (if auto), Action, Verify, Done - [ ] Checkpoints properly structured - [ ] If RESEARCH.md exists: "don't hand-roll" items NOT being custom-built +- [ ] PLAN file(s) committed to git - [ ] User knows next steps diff --git a/get-shit-done/workflows/research-phase.md b/get-shit-done/workflows/research-phase.md index 14d5cc83c..c849fb0de 100644 --- a/get-shit-done/workflows/research-phase.md +++ b/get-shit-done/workflows/research-phase.md @@ -378,6 +378,25 @@ What's next? ``` + +Commit phase research: + +```bash +git add .planning/phases/${PHASE}-${SLUG}/${PHASE}-RESEARCH.md +git commit -m "$(cat <<'EOF' +docs(${PHASE}): complete phase research + +Phase ${PHASE}: ${PHASE_NAME} +- Standard stack identified +- Architecture patterns documented +- Common pitfalls catalogued +EOF +)" +``` + +Confirm: "Committed: docs(${PHASE}): complete phase research" + + @@ -394,6 +413,7 @@ What's next? - [ ] "Don't hand-roll" list is clear and actionable - [ ] Common pitfalls catalogued - [ ] Confidence levels assigned honestly +- [ ] RESEARCH.md committed to git - [ ] User knows next steps (plan phase)