Skip to content

feat: add metadata.yaml format reference for scaffolding skills#88

Merged
benwu95 merged 2 commits into
mainfrom
feat/add-metadata-format-ref
Jul 14, 2026
Merged

feat: add metadata.yaml format reference for scaffolding skills#88
benwu95 merged 2 commits into
mainfrom
feat/add-metadata-format-ref

Conversation

@benwu95

@benwu95 benwu95 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

metadata.yaml was the only core change artifact without a format reference — every other artifact (proposal, plan, delta-spec, tasks) has a references/*-format doc that agent sync deploys and the skill loads on a MANDATORY read. Without one, /prospec-new-story and /prospec-ff invented the field order, quoting, and date format per invocation. The drift is visible across archived changes: created_at as full ISO vs bare date vs quoted; related_modules entries carrying **bold** markdown; verify records putting the grade in result instead of grade; inconsistent related_modulesdescription ordering.

What changed

  • New references/metadata-format.hbs — the single serialization-format authority for metadata.yaml: canonical field order, minimal quoting, ISO 8601 created_at, and the quality_log entry shape (result stays the gate three-state; the verify grade lives in grade, never in result). It documents format only and defers field semantics to ChangeMetadataSchema (src/types/change.ts) and status values to _status-lifecycle.md, so it never restates a single-source contract.
  • Registered in getSkillReferences for prospec-new-story and prospec-ff, so agent sync deploys it self-contained into each skill's references/ (both already hasReferences: true — no flag flip).
  • Wired into the skills: new-story loads it as a [STABLE] MANDATORY Startup Loading item; ff loads it on-demand at Phase 2 (matching its lean-prefix convention). The downstream skills that append metadata fields (plan / tasks / implement / review / verify / archive) point at it via soft references when they write quality_log / status / grade — soft (not references/…md links) so the self-containment contract stays intact, since only new-story and ff bundle the file.
  • Tests: new skill-contract assertions (named-set registration + deploy/cite + content pins), all mutation-verified; startup-loading baseline updated; bundled templates regenerated; factual counts synced.

New requirements

  • REQ-TEMPLATES-150 (sdd-workflow) — the metadata-format reference, its skill loading, and the downstream pointers.
  • REQ-AGNT-037 (agent-integration) — registration in getSkillReferences and self-contained deployment.

Verification

  • pnpm typecheck clean · pnpm lint clean · pnpm test 2135/2135 green
  • Delivered through the full SDD flow (ff → implement → review → verify → archive). Verify grade S; review-clean after one round — a critical was caught and fixed: the reference's own dimensions example used flow-style YAML, contradicting its "exactly what stringifyYaml emits" claim (now block-style, harvested into the lessons ledger as a PB-003 re-evidence — a format-authority reference must itself exemplify the format it defines).

benwu95 added 2 commits July 14, 2026 09:45
- add references/metadata-format.hbs as the single serialization-format
  authority for metadata.yaml (canonical field order, minimal quoting,
  ISO 8601 created_at, quality_log entry shape); defers field semantics to
  ChangeMetadataSchema and status values to _status-lifecycle.md
- register it in getSkillReferences for prospec-new-story and prospec-ff so
  agent sync deploys it self-contained into each skill's references/
- load it in new-story (Startup Loading MANDATORY) and ff (Phase 2 on-demand);
  point plan/tasks/implement/review/verify/archive at it via soft references
  when they append or edit metadata fields
- add skill-contract assertions (named-set + deploy/cite + content pins);
  update startup-loading baseline; regenerate bundled templates; sync counts

Closes the metadata.yaml format-drift gap: scaffolding skills previously
invented field order, quoting, and date format per invocation.
… REQs

- graduate REQ-TEMPLATES-150 into sdd-workflow.md (US-1) and REQ-AGNT-037
  into agent-integration.md (US-401); bump req_count + Change History in both
- add committed spec history under _archived-history/ (the gitignored archive
  bundle's only version-controlled record)
- harvest the review findings into the lessons ledger as PB-003 (docs-claims)
  re-evidence: a format-authority reference must itself exemplify the format
  it defines (its examples must round-trip through the real serializer)
- refresh raw-scan.md for the next knowledge-generate
@github-actions

Copy link
Copy Markdown

Prospec Check

Prospec drift check (structural — deterministic, zero LLM)

  PASS  req-references
  PASS  file-paths
  PASS  import-direction
  WARN  knowledge-health
  SKIP  task-completion — source unavailable: .prospec/changes/ not found (not version-controlled)
  PASS  dangling-prefix
  PASS  feature-modules
  PASS  mcp-readme-counts
  SKIP  review-provenance — source unavailable: .prospec/changes/ not found (not version-controlled)
  SKIP  metadata-completeness — source unavailable: .prospec/changes/ not found (not version-controlled)
  PASS  knowledge-size

Findings:
  [warn] prospec/ai-knowledge/modules/lib/README.md
         stale knowledge: module "lib" source last commit 2026-07-14T09:45:39+08:00 is newer than README last commit 2026-07-12T17:36:23+08:00
  [warn] prospec/ai-knowledge/modules/services/README.md
         stale knowledge: module "services" source last commit 2026-07-14T09:45:39+08:00 is newer than README last commit 2026-07-12T14:07:17+08:00

Knowledge coverage: 6/6 modules documented, 2 stale

Checked 8/11 checks: 0 fail, 1 warn, 3 skipped (not counted as pass)
Semantic consistency: not-checked (run /prospec-review)
Report written: prospec-report.json

@github-actions

Copy link
Copy Markdown

Test Coverage

Metric Coverage Covered / Total
lines 96.23% 3197 / 3322
statements 95.71% 3510 / 3667
functions 95.73% 584 / 610
branches 93.21% 1950 / 2092

@benwu95 benwu95 merged commit c4eb15f into main Jul 14, 2026
4 checks passed
@benwu95 benwu95 deleted the feat/add-metadata-format-ref branch July 14, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant