{
"id": "page:generators",
"_kind": "Page",
"_file": "wiki/generators/README.md",
"_cluster": "wiki",
"attributes": {
"title": "Generators (Phase 3)",
"displayName": "Generators (Phase 3)",
"slug": "generators",
"articlePath": "wiki/generators/README.md",
"article": "# Generators (Phase 3)\n\nGenerators turn graph queries into derived artifacts. Every page of prose, every TypeScript type, every OpenAPI document, every scaffolded code skeleton in the v6 ecosystem should be produced from graph data rather than hand-maintained copies.\n\n## What lives in this directory\n\n| Path | Purpose |\n|---|---|\n| [`00-generator-design.md`](./00-generator-design.md) | Implementation plan extending the schema derivation spec. |\n| `templates/` | Deterministic templates consumed by generators. |\n| [`tools/`](./tools/README.md) | `@v6/graph-tools`, the utility package and CLI for graph loading, querying, template rendering, and generator manifests. |\n\n## Quick start\n\n```bash\nPush-Location graph/wiki/generators/tools; npm install; Pop-Location\nnode graph/wiki/generators/tools/src/cli.mjs stats --root graph\nnode graph/wiki/generators/tools/src/cli.mjs nodes --root graph --kind AgentProduct\nnode graph/wiki/generators/tools/src/cli.mjs render --root graph --template wiki/generators/templates/examples/layers.md.tmpl --kind Layer --stdout\nnode graph/wiki/generators/tools/src/cli.mjs generate --root graph --spec wiki/generators/templates/examples/layers.generator.yaml\n```\n\n## Planned generator outputs\n\nThe 10 illustrative outputs from `graph/schema/derivation-spec.md`:\n\n1. Glossary\n2. Stack documentation\n3. Product card\n4. Capability matrix\n5. Hook taxonomy doc\n6. Adapter scaffold\n7. OpenAPI artifact\n8. Per-package README\n9. Stack diagram\n10. Coverage check\n\nPlus one added by the process design:\n\n11. `Gap` markdown โ YAML sync, keeping `wiki/process/gaps/GAP-*.md` aligned with `graph/catalog-meta/gaps/*.yaml`.\n\n## Acceptance criteria\n\n- **Pure**: same graph in โ byte-identical output.\n- **Deterministic**: stable ordering on every collection.\n- **Idempotent**: generator manifests avoid no-op rewrites.\n- **Manifested**: generated files get a sibling `.manifest.json` with input node ids and a content hash.\n\nSee [`00-generator-design.md`](./00-generator-design.md) for the full implementation plan.\n",
"documents": []
},
"outgoingEdges": [],
"incomingEdges": []
}