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
This commit is contained in:
@@ -215,6 +215,25 @@ Created: .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md
|
||||
|
||||
</step>
|
||||
|
||||
<step name="git_commit">
|
||||
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"
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
@@ -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)
|
||||
</success_criteria>
|
||||
|
||||
@@ -1285,15 +1285,14 @@ ROADMAP_FILE=".planning/ROADMAP.md"
|
||||
</step>
|
||||
|
||||
<step name="git_commit_metadata">
|
||||
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:**
|
||||
|
||||
@@ -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".
|
||||
</step>
|
||||
|
||||
<step name="git_commit">
|
||||
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"
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
```
|
||||
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
|
||||
</success_criteria>
|
||||
|
||||
@@ -378,6 +378,25 @@ What's next?
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="git_commit">
|
||||
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"
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
@@ -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)
|
||||
</success_criteria>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user