Files
msd-core/scripts
Tom Boucher 3f9eb43054 fix(#21): add YAML frontmatter to STATE.md template (#151)
* fix(#21): add YAML frontmatter to STATE.md File Template sections

Both template files (get-shit-done/templates/state.md and
sdk/prompts/templates/state.md) lacked a YAML frontmatter block in
their File Template section. When an AI agent creates .planning/STATE.md
from the template, the file had no frontmatter until the first
state.* mutation ran syncStateFrontmatter — leaving the
init→first-write window with nothing for frontmatter consumers
(current_phase, status, progress.*) to read.

Adds a minimal frontmatter block with gsd_state_version, status, and
a zeroed progress skeleton matching the shape buildStateFrontmatter
produces. syncStateFrontmatter will replace these placeholders on the
first state write.

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

* fix(#21): bump lint-test-file-count state ceiling for bug-21 test

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

* chore(#21): add changeset fragment for STATE.md template frontmatter fix

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

* fix(#21): address review — dual-template equality guard, progress schema assertion, version annotation

- Add inline comment to gsd_state_version in both templates documenting
  that syncStateFrontmatter overwrites the value on first state.* call
- Sync sdk/prompts/templates/state.md File Template block to match
  get-shit-done/templates/state.md (add Deferred Items section, fix
  Pending Todos blurb) — templates were diverged
- Add parseFrontmatter() helper to test file for value-aware parsing
- Add per-template test: progress.total_plans === 0 and
  progress.completed_plans === 0
- Add cross-template byte-equality assertion to catch future drift
- Add note to parseFrontmatterKeys that it does not handle list-valued fields

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 14:56:35 -04:00
..