fix(workflow): close parent UAT and debug artifacts after gap-closure phase (#580)
Add `close_parent_artifacts` step to execute-phase workflow that resolves parent UAT gaps and debug sessions when a decimal/polish phase completes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -226,6 +226,55 @@ After all waves:
|
|||||||
```
|
```
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
<step name="close_parent_artifacts">
|
||||||
|
**For decimal/polish phases only (X.Y pattern):** Close the feedback loop by resolving parent UAT and debug artifacts.
|
||||||
|
|
||||||
|
**Skip if** phase number has no decimal (e.g., `3`, `04`) — only applies to gap-closure phases like `4.1`, `03.1`.
|
||||||
|
|
||||||
|
**1. Detect decimal phase and derive parent:**
|
||||||
|
```bash
|
||||||
|
# Check if phase_number contains a decimal
|
||||||
|
if [[ "$PHASE_NUMBER" == *.* ]]; then
|
||||||
|
PARENT_PHASE="${PHASE_NUMBER%%.*}"
|
||||||
|
fi
|
||||||
|
```
|
||||||
|
|
||||||
|
**2. Find parent UAT file:**
|
||||||
|
```bash
|
||||||
|
find .planning/phases -path "*${PARENT_PHASE}*/*-UAT.md" -type f 2>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
**If no parent UAT found:** Skip this step (gap-closure may have been triggered by VERIFICATION.md instead).
|
||||||
|
|
||||||
|
**3. Update UAT gap statuses:**
|
||||||
|
|
||||||
|
Read the parent UAT file's `## Gaps` section. For each gap entry with `status: failed`:
|
||||||
|
- Update to `status: resolved`
|
||||||
|
|
||||||
|
**4. Update UAT frontmatter:**
|
||||||
|
|
||||||
|
If all gaps now have `status: resolved`:
|
||||||
|
- Update frontmatter `status: diagnosed` → `status: resolved`
|
||||||
|
- Update frontmatter `updated:` timestamp
|
||||||
|
|
||||||
|
**5. Resolve referenced debug sessions:**
|
||||||
|
|
||||||
|
For each gap that has a `debug_session:` field:
|
||||||
|
- Read the debug session file
|
||||||
|
- Update frontmatter `status:` → `resolved`
|
||||||
|
- Update frontmatter `updated:` timestamp
|
||||||
|
- Move to resolved directory:
|
||||||
|
```bash
|
||||||
|
mkdir -p .planning/debug/resolved
|
||||||
|
mv .planning/debug/{slug}.md .planning/debug/resolved/
|
||||||
|
```
|
||||||
|
|
||||||
|
**6. Commit updated artifacts:**
|
||||||
|
```bash
|
||||||
|
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs(phase-${PARENT_PHASE}): resolve UAT gaps and debug sessions after ${PHASE_NUMBER} gap closure" --files .planning/phases/*${PARENT_PHASE}*/*-UAT.md .planning/debug/resolved/*.md
|
||||||
|
```
|
||||||
|
</step>
|
||||||
|
|
||||||
<step name="verify_phase_goal">
|
<step name="verify_phase_goal">
|
||||||
Verify phase achieved its GOAL, not just completed tasks.
|
Verify phase achieved its GOAL, not just completed tasks.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user