feat(gsd-tools): frontmatter CRUD, verification suite, template fill, state progression (#485)

* feat(gsd-tools): add frontmatter CRUD, verification suite, template fill, and state progression

Four new command groups that delegate deterministic operations from AI agents to code:

- frontmatter get/set/merge/validate: Safe YAML frontmatter manipulation with schema validation
- verify plan-structure/phase-completeness/references/commits/artifacts/key-links: Structural checks agents previously burned context on
- template fill summary/plan/verification: Pre-filled document skeletons so agents only fill creative content
- state advance-plan/record-metric/update-progress/add-decision/add-blocker/resolve-blocker/record-session: Automate arithmetic and formatting in STATE.md

Adds reconstructFrontmatter() + spliceFrontmatter() helpers for safe frontmatter roundtripping,
and parseMustHavesBlock() for 3-level YAML parsing of must_haves structures.

20 new functions, ~1037 new lines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: wire gsd-tools commands into agents and workflows

- gsd-verifier: use `verify artifacts` and `verify key-links` instead of
  manual grep patterns for stub detection and wiring verification
- gsd-executor: use `state advance-plan`, `state update-progress`,
  `state record-metric`, `state add-decision`, `state record-session`
  instead of manual STATE.md manipulation
- gsd-plan-checker: use `verify plan-structure` and `frontmatter get`
  for structural validation and must_haves extraction
- gsd-planner: add validation step using `frontmatter validate` and
  `verify plan-structure` after writing PLAN.md
- execute-plan.md: use gsd-tools state commands for position/progress updates
- verify-phase.md: use gsd-tools for must_haves extraction and artifact/link verification

This makes the gsd-tools commands from PR #485 actually used by the system.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
TÂCHES
2026-02-08 09:28:50 -06:00
committed by GitHub
parent 4072fd2baf
commit 6a2d1f1bfb
7 changed files with 1255 additions and 82 deletions

View File

@@ -333,15 +333,45 @@ Next: more plans → "Ready for {next-plan}" | last → "Phase complete, ready f
</step>
<step name="update_current_position">
Update STATE.md: Phase [current]/[total] ([name]) | Plan [completed]/[total] | Status | Last activity: [today] - Completed {phase}-{plan} | Progress bar (█/░). Calculate: (total SUMMARYs / total PLANs) × 100%.
Update STATE.md using gsd-tools:
```bash
# Advance plan counter (handles last-plan edge case)
node ~/.claude/get-shit-done/bin/gsd-tools.js state advance-plan
# Recalculate progress bar from disk state
node ~/.claude/get-shit-done/bin/gsd-tools.js state update-progress
# Record execution metrics
node ~/.claude/get-shit-done/bin/gsd-tools.js state record-metric \
--phase "${PHASE}" --plan "${PLAN}" --duration "${DURATION}" \
--tasks "${TASK_COUNT}" --files "${FILE_COUNT}"
```
</step>
<step name="extract_decisions_and_issues">
From SUMMARY: "Decisions Made" (if not "None") → STATE.md Decisions: `| [phase] | [summary] | [rationale] |`. "Next Phase Readiness" blockers → STATE.md "Blockers/Concerns Carried Forward".
From SUMMARY: Extract decisions and add to STATE.md:
```bash
# Add each decision from SUMMARY key-decisions
node ~/.claude/get-shit-done/bin/gsd-tools.js state add-decision \
--phase "${PHASE}" --summary "${DECISION_TEXT}" --rationale "${RATIONALE}"
# Add blockers if any found
node ~/.claude/get-shit-done/bin/gsd-tools.js state add-blocker "Blocker description"
```
</step>
<step name="update_session_continuity">
STATE.md Session: Last session [date/time] | Stopped at: Completed {phase}-{plan} | Resume file: [path or "None"]. Keep STATE.md under 150 lines.
Update session info using gsd-tools:
```bash
node ~/.claude/get-shit-done/bin/gsd-tools.js state record-session \
--stopped-at "Completed ${PHASE}-${PLAN}-PLAN.md" \
--resume-file "None"
```
Keep STATE.md under 150 lines.
</step>
<step name="issues_review_gate">