Files
msd-core/gsd-core/templates/summary-complex.md
Tom Boucher ba96c70b14 feat(#1602): deterministic coverage-metadata UAT routing for verify-work
Add an optional structured `coverage:` block to SUMMARY.md frontmatter and a
deterministic classifier that `verify-work` consumes to route deliverables to
auto-pass vs human-UAT — replacing the rejected #1598/#1599 post-hoc heuristic.

- New `src/coverage.cts` (→ bin/lib/coverage.cjs) parses the nested coverage
  block (extractFrontmatter can't — its `-` items are scalars-only; this is a
  focused parser, sibling of parseMustHavesBlock), validates each entry, and
  classifies into auto_passed vs present. Frozen MODE/PRESENT_REASON/ERROR_CODE
  typed-IR surface. Exposed via `uat classify-coverage --summary <f>`.
- Auto-pass is the narrow proven case only: strict-boolean human_judgment:false
  AND non-empty all-`pass` verification AND zero validation errors. Everything
  else — judgment, empty/failing verification, malformed entry — routes to the
  human (fail-safe). A malformed block falls back to legacy prose extraction and
  surfaces an error; an absent block is byte-identical to pre-#1602.
- execute-plan create_summary populates the block (fail-safe default
  human_judgment:true); verify-work extract_tests consumes it; create_uat_file
  marks auto-passed entries `source: automated`.
- Templates (summary + 3 variants), CONTEXT.md predicate + glossary, INVENTORY,
  eslint/gitignore registration, and Diataxis docs (COMMANDS reference +
  USER-GUIDE explanation) updated.
- Behavioral tests via the CLI (no source-grep); parser-robustness regressions
  for the null-entry/comment-header/mis-indent cases found in adversarial review.

Closes #1602

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 23:43:22 -04:00

65 lines
1.7 KiB
Markdown

---
phase: XX-name
plan: YY
subsystem: [primary category]
tags: [searchable tech]
requires:
- phase: [prior phase]
provides: [what that phase built]
provides:
- [bullet list of what was built/delivered]
affects: [list of phase names or keywords]
tech-stack:
added: [libraries/tools]
patterns: [architectural/code patterns]
key-files:
created: [important files created]
modified: [important files modified]
key-decisions:
- "Decision 1"
patterns-established:
- "Pattern 1: description"
# coverage: (#1602) optional per-deliverable UAT-routing block — see templates/summary.md <coverage_guidance>.
# Add live `coverage:` entries (id/description/verification[]/human_judgment[/rationale]) to enable
# deterministic UAT routing in verify-work; OMIT for legacy prose-only SUMMARYs. When coverage is
# uncertain, default human_judgment: true with a rationale — never auto-skip the human.
duration: Xmin
completed: YYYY-MM-DD
status: complete
---
# Phase [X]: [Name] Summary (Complex)
**[Substantive one-liner describing outcome]**
## Performance
- **Duration:** [time]
- **Tasks:** [count completed]
- **Files modified:** [count]
## Accomplishments
- [Key outcome 1]
- [Key outcome 2]
## Task Commits
1. **Task 1: [task name]** - `hash`
2. **Task 2: [task name]** - `hash`
3. **Task 3: [task name]** - `hash`
## Files Created/Modified
- `path/to/file.ts` - What it does
- `path/to/another.ts` - What it does
## Decisions Made
[Key decisions with brief rationale]
## Deviations from Plan (Auto-fixed)
[Detailed auto-fix records per GSD deviation rules]
## Issues Encountered
[Problems during planned work and resolutions]
## Next Phase Readiness
[What's ready for next phase]
[Blockers or concerns]