Skip to content

Implementation manifest

scripts/gen-manifest.mjs greps the source tree for ID tags and writes src/generated/manifest.json:

{
"ids": {
"FEAT-0003": {
"code": ["scripts/trace-lint.mjs:1"],
"tests": []
}
}
}

Code carries ID tags as ground truth; markdown gets this generated index. File paths in frontmatter rot; comment tags travel with code through refactors. Never hand-maintain both directions — implemented_in never appears in frontmatter, by schema.

One tag per markdown file, at the feature’s entry point (route handler, main component, module barrel):

// FEAT-0012: usage-based billing — spec: /features/billing

This is a “start here” pointer, not a coverage map. Per-function tagging dies of tedium and poisons trust in the whole graph — don’t.

  • The manifest is gitignored and regenerated on every build (pnpm build runs it first); hand edits are impossible to persist.
  • Files under node_modules, dist, .astro, src/generated, and markdown content are never scanned.
  • An ID appearing only in a test file still fails “past proposed needs code” — the entry-point tag must live in non-test code.
4 open decisions