@drafthq/draft 2.8.3 → 3.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +5 -5
  4. package/bin/README.md +10 -0
  5. package/core/methodology.md +17 -18
  6. package/core/shared/condensation.md +9 -9
  7. package/core/shared/draft-context-loading.md +7 -9
  8. package/core/shared/graph-query.md +38 -31
  9. package/core/shared/graph-usage-report.md +1 -1
  10. package/core/shared/pattern-learning.md +2 -2
  11. package/core/shared/red-flags.md +3 -3
  12. package/core/templates/ai-context.md +2 -1
  13. package/core/templates/ai-profile.md +1 -0
  14. package/core/templates/architecture.md +4 -3
  15. package/core/templates/dependency-graph.md +2 -2
  16. package/core/templates/discovery.md +1 -0
  17. package/core/templates/guardrails.md +1 -0
  18. package/core/templates/hld.md +1 -0
  19. package/core/templates/lld.md +1 -0
  20. package/core/templates/plan.md +1 -0
  21. package/core/templates/product.md +1 -0
  22. package/core/templates/rca.md +1 -0
  23. package/core/templates/root-architecture.md +3 -3
  24. package/core/templates/root-product.md +2 -2
  25. package/core/templates/root-tech-stack.md +2 -2
  26. package/core/templates/service-index.md +3 -3
  27. package/core/templates/spec.md +1 -0
  28. package/core/templates/tech-matrix.md +2 -2
  29. package/core/templates/tech-stack.md +1 -0
  30. package/core/templates/workflow.md +1 -0
  31. package/integrations/agents/AGENTS.md +276 -1037
  32. package/integrations/copilot/.github/copilot-instructions.md +276 -1037
  33. package/package.json +1 -1
  34. package/scripts/lib.sh +2 -1
  35. package/scripts/tools/adr-index.sh +2 -2
  36. package/scripts/tools/check-scope-conflicts.sh +2 -2
  37. package/scripts/tools/check-skill-line-caps.sh +2 -2
  38. package/scripts/tools/cycle-detect.sh +5 -1
  39. package/scripts/tools/diff-templates-vs-tracks.sh +2 -2
  40. package/scripts/tools/fix-whitespace.sh +15 -9
  41. package/scripts/tools/graph-arch.sh +72 -0
  42. package/scripts/tools/graph-impact.sh +1 -0
  43. package/scripts/tools/graph-init.sh +187 -0
  44. package/scripts/tools/graph-snapshot.sh +52 -46
  45. package/scripts/tools/hotspot-rank.sh +2 -0
  46. package/scripts/tools/manage-symlinks.sh +1 -1
  47. package/scripts/tools/parse-reports.sh +1 -1
  48. package/scripts/tools/skill-caps.conf +0 -1
  49. package/scripts/tools/verify-doc-anchors.sh +2 -2
  50. package/scripts/tools/verify-graph-binary.sh +1 -1
  51. package/skills/GRAPH.md +9 -12
  52. package/skills/bughunt/SKILL.md +14 -1
  53. package/skills/debug/SKILL.md +3 -3
  54. package/skills/decompose/SKILL.md +5 -5
  55. package/skills/deep-review/SKILL.md +2 -2
  56. package/skills/deploy-checklist/SKILL.md +2 -2
  57. package/skills/discover/SKILL.md +2 -4
  58. package/skills/draft/SKILL.md +2 -2
  59. package/skills/draft/intent-mapping.md +3 -2
  60. package/skills/graph/SKILL.md +3 -3
  61. package/skills/implement/SKILL.md +1 -1
  62. package/skills/init/SKILL.md +102 -43
  63. package/skills/init/references/architecture-spec.md +17 -16
  64. package/skills/learn/SKILL.md +5 -5
  65. package/skills/quick-review/SKILL.md +3 -3
  66. package/skills/review/SKILL.md +7 -7
  67. package/skills/tech-debt/SKILL.md +2 -2
  68. package/skills/index/SKILL.md +0 -848
@@ -12,7 +12,7 @@
12
12
  "name": "draft",
13
13
  "source": "./",
14
14
  "description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.",
15
- "version": "2.8.3",
15
+ "version": "3.0.0",
16
16
  "author": {
17
17
  "name": "mayurpise"
18
18
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "draft",
3
3
  "description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.",
4
- "version": "2.8.3",
4
+ "version": "3.1.5",
5
5
  "author": {
6
6
  "name": "mayurpise"
7
7
  },
package/README.md CHANGED
@@ -113,9 +113,9 @@ curl -o .gemini.md https://raw.githubusercontent.com/drafthq/draft/main/integrat
113
113
 
114
114
  ---
115
115
 
116
- ## Beyond `/draft:review` — 33 more commands
116
+ ## Beyond `/draft:review` — 32 more commands
117
117
 
118
- `/draft:review` is the wedge. Once Draft has indexed your repo, you also get spec-driven planning, TDD-enforced implementation, exhaustive bug hunting, deep architectural audits, and 29 more commands covering the full development lifecycle.
118
+ `/draft:review` is the wedge. Once Draft has indexed your repo, you also get spec-driven planning, TDD-enforced implementation, exhaustive bug hunting, deep architectural audits, and 32 more commands covering the full development lifecycle.
119
119
 
120
120
  ---
121
121
 
@@ -129,7 +129,7 @@ curl -o .gemini.md https://raw.githubusercontent.com/drafthq/draft/main/integrat
129
129
  | **`/draft:docs`** | Router for authoring and documentation workflows |
130
130
  | **`/draft:discover`** | Router for discovery, debugging, investigation, and quality |
131
131
  | **`/draft:init`** | Analyze codebase, create context files + state tracking |
132
- | **`/draft:index`** | Aggregate monorepo service contexts |
132
+ | **`/draft:graph`** | Build / refresh the knowledge-graph snapshot |
133
133
  | **`/draft:new-track`** | Collaborative spec + plan with AI |
134
134
  | **`/draft:decompose`** | Module decomposition with dependency mapping |
135
135
  | **`/draft:implement`** | TDD workflow with checkpoints |
@@ -187,7 +187,7 @@ The graph powers `/draft:graph` and `/draft:impact`, enriches `/draft:bughunt` a
187
187
 
188
188
  ### Deterministic helper tools
189
189
 
190
- Skills also call into **14 shell helpers** under `scripts/tools/` for mechanical work — git metadata, file classification, test-framework detection, hotspot ranking, freshness checks, ADR indexing. All emit JSON, follow a uniform exit-code contract, and degrade gracefully when their input source is unavailable.
190
+ Skills also call into **shell helpers** under `scripts/tools/` for mechanical work — git metadata, file classification, test-framework detection, hotspot ranking, freshness checks, ADR indexing, and live graph queries (`graph-callers.sh`, `graph-impact.sh`, `hotspot-rank.sh`, `cycle-detect.sh`, `mermaid-from-graph.sh`). All emit JSON or markdown, follow a uniform exit-code contract, and degrade gracefully when their input source is unavailable.
191
191
 
192
192
  ---
193
193
 
@@ -234,7 +234,7 @@ AI tools are fast but unstructured. Draft applies Context-Driven Development to
234
234
  ```
235
235
  product.md → "Build a task manager"
236
236
  tech-stack.md → "React, TypeScript, Tailwind"
237
- architecture.md → Comprehensive: 28 sections + 5 appendices, Mermaid diagrams (source of truth). Mature brownfield projects with strong existing agent docs (CLAUDE.md, INVARIANTS.md, etc.) receive early Context Quality Audit, graph fidelity dashboard, and explicit Relationship + Gaps sections (no blind duplication).
237
+ architecture.md → Comprehensive: 10-section graph-primary engineering reference, Mermaid diagrams (source of truth). Mature brownfield projects with strong existing agent docs (CLAUDE.md, INVARIANTS.md, etc.) receive early Context Quality Audit, graph fidelity dashboard, and explicit Relationship + Gaps sections (no blind duplication).
238
238
  .ai-context.md → 200-400 lines: condensed from architecture.md (token-optimized AI context)
239
239
  .state/ → freshness hashes, signal classification, run memory (incremental refresh)
240
240
  spec.md → "Add drag-and-drop reordering"
package/bin/README.md CHANGED
@@ -44,6 +44,16 @@ contracts — see `hotspot-rank.sh`, `cycle-detect.sh`, `mermaid-from-graph.sh`,
44
44
  and `verify-graph-binary.sh`. The shared wrappers (`memory_cli`,
45
45
  `memory_ensure_index`, `memory_project_for_repo`) live in `_lib.sh`.
46
46
 
47
+ ## Snapshot artifacts
48
+
49
+ `draft/graph/` holds a single committed file:
50
+
51
+ | Artifact | Content |
52
+ |----------|---------|
53
+ | `schema.yaml` | Engine + project metadata, node/edge counts, point-of-index counts (gates graph use). |
54
+
55
+ Structural graph data (architecture, hotspots, module deps, service routes) is queried **live** from the `codebase-memory-mcp` engine — either via the wrapper scripts under `scripts/tools/` (`graph-callers.sh`, `graph-impact.sh`, `hotspot-rank.sh`, `cycle-detect.sh`, `mermaid-from-graph.sh`) or directly with `codebase-memory-mcp cli <tool> '<json>'`.
56
+
47
57
  ## Offline / air-gapped distributions
48
58
 
49
59
  To ship the engine in-tree, place the binary at `bin/<os>-<arch>/codebase-memory-mcp` (resolution step 4). This is optional and not the default; the managed fetch is preferred.
@@ -30,7 +30,7 @@ Draft solves this through **Context-Driven Development**: structured documents t
30
30
  - [Command Workflows](#command-workflows)
31
31
  - [/draft:init](#draftinit--initialize-project)
32
32
  - [/draft:plan](#draftplan--planning-orchestrator)
33
- - [/draft:index](#draftindex--monorepo-service-index)
33
+ - [Monorepo Support (via /draft:init)](#monorepo-support-via-draftinit)
34
34
  - [/draft:new-track](#draftnew-track--create-feature-track)
35
35
  - [/draft:implement](#draftimplement--execute-tasks)
36
36
  - [/draft:status](#draftstatus--show-progress)
@@ -405,7 +405,7 @@ Draft auto-classifies the project:
405
405
  - **Brownfield (existing codebase):** Detected by the presence of `package.json`, `requirements.txt`, `go.mod`, `Cargo.toml`, `src/`, or git history with commits. Draft scans the existing stack and pre-fills `tech-stack.md`.
406
406
  - **Greenfield (new project):** Empty or near-empty directory. Developer provides all context through dialogue.
407
407
  - **Mature high-context brownfield:** Projects with strong existing agent-optimized docs (CLAUDE.md, INVARIANTS.md, ADRs, etc.) now receive an early Context Quality Audit, graph fidelity declaration, and explicit Relationship/Gaps sections so the generated architecture.md acts as graph-primary overlay rather than duplicative prose.
408
- - **Monorepo:** Detected by `lerna.json`, `pnpm-workspace.yaml`, `nx.json`, `turbo.json`, or multiple package manifests in child directories. Suggests `/draft:index` instead.
408
+ - **Monorepo:** Detected by `lerna.json`, `pnpm-workspace.yaml`, `nx.json`, `turbo.json`, or multiple package manifests in child directories. `/draft:init` is scope-aware — run it at the root for whole-repo context (sparse root map + the code-graph spine), or inside a sub-module to generate detailed module context that links up to the root graph. See **Monorepo Support (via /draft:init)** below.
409
409
 
410
410
  #### Initialization Sequence
411
411
 
@@ -499,32 +499,31 @@ The parent command should move planning forward rather than listing options.
499
499
 
500
500
  ---
501
501
 
502
- ### `/draft:index` — Monorepo Service Index
502
+ ### Monorepo Support (via `/draft:init`)
503
503
 
504
- Aggregates Draft context from multiple services in a monorepo into unified root-level documents. Designed for organizations with multiple services, each with their own `draft/` context.
504
+ There is no separate index command `/draft:init` is the single, scope-aware entry point. The same command behaves differently by where it is run, so a monorepo needs no special tooling.
505
505
 
506
- #### What It Does
506
+ #### Root init (run at the repo root)
507
507
 
508
- 1. **Scans** immediate child directories for services (detects `package.json`, `go.mod`, `Cargo.toml`, etc.)
509
- 2. **Reads** each service's `draft/product.md`, `draft/.ai-context.md` (or legacy `draft/architecture.md`), `draft/tech-stack.md`
510
- 3. **Synthesizes** root-level documents:
508
+ 1. **Builds the whole-repo code-graph spine** `graph-init.sh` indexes every file at every depth into one unified graph and writes the committed `draft/graph/` snapshot (the structural source of truth).
509
+ 2. **Generates a sparse root map** (not deep per-module prose), aggregating the children into root-level documents:
511
510
  - `draft/service-index.md` — Service registry with status, tech, and links
512
- - `draft/dependency-graph.md` — Inter-service dependency topology
511
+ - `draft/dependency-graph.md` — Inter-service dependency topology (from the graph)
513
512
  - `draft/tech-matrix.md` — Technology distribution across services
514
- - `draft/product.md` — Synthesized product vision (if not exists)
515
- - `draft/.ai-context.md` — System-of-systems architecture view
516
- - `draft/tech-stack.md` — Org-wide technology standards
513
+ - `draft/architecture.md` — High-level system map linking *down* to each module's `draft/.ai-context.md`
514
+ - `draft/.ai-context.md` / `draft/.ai-profile.md` Condensed system-of-systems views
517
515
 
518
- #### Arguments
516
+ #### Module init (run inside a sub-module)
519
517
 
520
- - `init-missing` Run `/draft:init` on services that lack a `draft/` directory
521
- - `bughunt [dir1 dir2 ...]` — Run `/draft:bughunt` across subdirectories with `draft/` folders. If no directories specified, auto-discovers all subdirectories with `draft/`. Generates summary report at `draft-index-bughunt-summary.md`.
518
+ 1. **Ensures the root spine exists first** (builds it if missing), then builds the module's own `draft/graph/` snapshot.
519
+ 2. **Writes `draft/graph/root-link.json`**a pointer up to the root graph so the module has full cross-module understanding regardless of where init ran.
520
+ 3. **Generates the detailed module reference** (full 10-section `architecture.md` for the subtree). Use `--module-only` to skip touching the root (link marked `pending`).
522
521
 
523
522
  #### When to Use
524
523
 
525
- - After running `/draft:init` on individual services
526
- - After adding or removing services from the monorepo
527
- - Periodically to refresh cross-service context
524
+ - After cloning or adding a service — run `/draft:init` in it (auto-links to the root spine)
525
+ - At the root after services change — refresh the whole-repo graph + sparse root map
526
+ - `/draft:init --graph-only` to (re)build just the code-graph knowledge memory, no markdown
528
527
 
529
528
  ---
530
529
 
@@ -16,7 +16,7 @@ This is a self-contained, callable procedure for generating `draft/.ai-context.m
16
16
 
17
17
  Any skill that mutates `architecture.md` should execute this subroutine afterward to keep the derived context files in sync.
18
18
 
19
- **Called by:** `/draft:init`, `/draft:init refresh`, `/draft:implement`, `/draft:decompose`, `/draft:coverage`, `/draft:index`
19
+ **Called by:** `/draft:init`, `/draft:init refresh`, `/draft:implement`, `/draft:decompose`, `/draft:coverage`
20
20
 
21
21
  ### Inputs
22
22
 
@@ -88,16 +88,16 @@ Transform each `architecture.md` section into machine-optimized format using thi
88
88
 
89
89
  #### Step 3.5: Generate Graph Summary Sections
90
90
 
91
- If `draft/graph/schema.yaml` exists, generate these sections from the snapshot (`draft/graph/architecture.json`, `draft/graph/hotspots.jsonl`) and the live query tools:
91
+ If `draft/graph/schema.yaml` exists, generate these sections via live engine queries.
92
92
 
93
93
  **GRAPH:MODULES** (tier ≥ 2 only):
94
- - Read `draft/graph/architecture.json` `.packages[]` (each has `name`, `node_count`, `fan_in`, `fan_out`)
94
+ - Query: `scripts/tools/graph-arch.sh --repo . | jq '.packages[]'` (each has `name`, `node_count`, `fan_in`, `fan_out`)
95
95
  - Format: `{name}|{node_count} nodes|fan_in:{fan_in} fan_out:{fan_out}`
96
96
  - Order by `node_count` descending
97
97
  - Omit this section entirely for tier-1 codebases (≤5 modules) where Component Graph is sufficient
98
98
 
99
99
  **GRAPH:HOTSPOTS** (all tiers):
100
- - Read `draft/graph/hotspots.jsonl` (already fan-in-ranked), take top 10
100
+ - Query: `scripts/tools/hotspot-rank.sh --repo . --top 10`; take top 10 results
101
101
  - Format: `{name}|fanIn:{fanIn}` (use `id` for disambiguation when names collide)
102
102
  - Always include regardless of tier
103
103
 
@@ -108,20 +108,20 @@ If `draft/graph/schema.yaml` exists, generate these sections from the snapshot (
108
108
  - Always include — absence is positive signal that the call graph is acyclic
109
109
 
110
110
  **GRAPH:MODULE-HOTSPOTS** (tier ≥ 3 only):
111
- - Read `draft/graph/hotspots.jsonl`; group by the package segment of each `id` (the qualified name minus the leaf symbol)
111
+ - Query: `scripts/tools/hotspot-rank.sh --repo .`; group results by the package segment of each `id` (the qualified name minus the leaf symbol)
112
112
  - For each module: take its top 3 symbols by `fanIn`, format as indented lines under the module name
113
113
  - Format: `{module}: {name}|fanIn:{N}` with subsequent symbols indented to align
114
114
  - Order modules by their highest-fanIn symbol, descending
115
115
  - Omit modules with no hotspot entries; omit entire section for tier 1–2 (covered by global GRAPH:HOTSPOTS)
116
116
 
117
117
  **GRAPH:FAN-IN** (tier ≥ 3 only):
118
- - Read `architecture.json` `.packages[]`, use the `fan_in` field per module
118
+ - Query: `scripts/tools/graph-arch.sh --repo . | jq '.packages[]'`, use the `fan_in` field per module
119
119
  - Format: `{name}|fanIn:{fan_in}|fanOut:{fan_out}`
120
120
  - Order by `fan_in` descending; include only modules with `fan_in ≥ 2`; cap at 15 rows
121
121
  - Omit entire section for tier 1–2 (trivially small graph)
122
122
 
123
- **GRAPH:PROTO-MAP** (only when `architecture.json` `.routes` is non-empty):
124
- - Read `architecture.json` `.routes[]` (each has `method`, `path`, `handler`)
123
+ **GRAPH:PROTO-MAP** (only when routes are non-empty):
124
+ - Query: `scripts/tools/graph-arch.sh --repo . | jq '.routes[]'` (each has `method`, `path`, `handler`)
125
125
  - Format: `{method} {path} → {handler}`
126
126
  - One line per route
127
127
  - Omit entire section if `.routes` is empty — do not write an empty section
@@ -168,7 +168,7 @@ Before writing `draft/.ai-context.md`, verify:
168
168
  - [ ] GRAPH:CYCLES present ("None ✓" or cycle list; or note if graph absent)
169
169
  - [ ] GRAPH:MODULE-HOTSPOTS present for tier ≥ 3 (or note if no hotspot data)
170
170
  - [ ] GRAPH:FAN-IN present for tier ≥ 3
171
- - [ ] GRAPH:PROTO-MAP present when `stats.proto_rpcs > 0` (omit entirely if no protos)
171
+ - [ ] GRAPH:PROTO-MAP present when engine reports non-empty routes (omit entirely if no protos)
172
172
  - [ ] YAML frontmatter metadata is present at the top
173
173
 
174
174
  #### Step 7: Write Output
@@ -38,7 +38,7 @@ This matrix is the **single source of truth** for which Layer 0.5 files load per
38
38
 
39
39
  | Command type | Commands | Guardrails loaded |
40
40
  |---|---|---|
41
- | **Read-only** | `/draft:status`, `/draft:standup`, `/draft:tour`, `/draft:index`, `/draft:coverage` | **none** |
41
+ | **Read-only** | `/draft:status`, `/draft:standup`, `/draft:tour`, `/draft:coverage` | **none** |
42
42
  | **Spec / Plan** | `/draft:new-track`, `/draft:decompose`, `/draft:adr`, `/draft:testing-strategy`, `/draft:documentation` | `design-norms.md` only (architecture-shaped rules) |
43
43
  | **Code-touching (generation)** | `/draft:implement`, `/draft:debug`, `/draft:change`, `/draft:revert` | `code-quality.md` + `security.md` + `secure-patterns.md` + `language-standards.md` (detected stack) |
44
44
  | **Review** | `/draft:review`, `/draft:quick-review`, `/draft:deep-review`, `/draft:assist-review`, `/draft:bughunt`, `/draft:tech-debt` | `review-checks.md` + `security.md` + `language-standards.md` (detected stack); deep-review also loads `code-quality.md` + `design-norms.md` |
@@ -71,13 +71,11 @@ If `draft/graph/schema.yaml` exists, the project has automated graph analysis da
71
71
 
72
72
  | File | Purpose | Content |
73
73
  |------|---------|---------|
74
- | `draft/graph/schema.yaml` | Snapshot metadata (engine, project, node/edge counts) | YAML, ~15 lines |
75
- | `draft/graph/architecture.json` | Node labels, edge types, languages, packages (fan-in/out), entry points, routes, hotspots | JSON |
76
- | `draft/graph/hotspots.jsonl` | Fan-in-ranked symbols, one object per line: `{id, name, fanIn}` | JSONL |
74
+ | `draft/graph/schema.yaml` | Gate marker (engine + project metadata + point-of-index counts); presence gates graph use | YAML, ~15 lines |
77
75
 
78
- Note: `.ai-context.md` embeds a condensed graph summary (`GRAPH:MODULES`, `GRAPH:HOTSPOTS`, `GRAPH:CYCLES`) for first-pass structural ground truth. `architecture.json` is authoritative for deep structure.
76
+ Note: `.ai-context.md` embeds a condensed graph summary (`GRAPH:MODULES`, `GRAPH:HOTSPOTS`, `GRAPH:CYCLES`) for first-pass structural ground truth. Deep structural data is queried live from the engine (see Live structural queries below).
79
77
 
80
- Note: The canonical embedded mermaid diagrams are in architecture.md injection slots (`<!-- GRAPH:module-deps:START/END -->`, `<!-- GRAPH:proto-map:START/END -->`), refreshed by `draft:index`. For current data, regenerate via `scripts/tools/mermaid-from-graph.sh`.
78
+ Note: The canonical embedded mermaid diagrams are in architecture.md injection slots (`<!-- GRAPH:module-deps:START/END -->`, `<!-- GRAPH:proto-map:START/END -->`), refreshed by `draft:init`. For current data, regenerate via `scripts/tools/mermaid-from-graph.sh`.
81
79
 
82
80
  **Live structural queries** (run on demand — no per-language index files; the engine's model is unified):
83
81
 
@@ -149,12 +147,12 @@ Do NOT apply relevance scoring for commands that need full context (`/draft:init
149
147
  | `## FILES` | Always (need file locations) |
150
148
  | `## VOCAB` | Domain-specific tasks |
151
149
 
152
- 3. **Score graph files** (if `draft/graph/` exists) against the task concepts:
150
+ 3. **Score graph queries** (if `draft/graph/schema.yaml` exists) against the task concepts:
153
151
 
154
152
  | Graph source | Use When Task Involves... |
155
153
  |------------|--------------------------|
156
- | `architecture.json` | Module boundary changes, cross-module work, architecture analysis, API/route surface |
157
- | `hotspots.jsonl` | Performance work, refactoring, changes to high-fanIn symbols |
154
+ | `scripts/tools/graph-arch.sh --repo .` | Module boundary changes, cross-module work, architecture analysis, API/route surface |
155
+ | `scripts/tools/hotspot-rank.sh --repo .` | Performance work, refactoring, changes to high-fanIn symbols |
158
156
  | `scripts/tools/graph-callers.sh --symbol <name>` | Enumerating callers before a change |
159
157
  | `scripts/tools/graph-impact.sh --file <path>` / `--symbol <name>` | Tracing call paths, root cause analysis, function-level impact |
160
158
  | `scripts/tools/cycle-detect.sh` | Checking for call cycles |
@@ -4,13 +4,13 @@ Shared procedure for querying the knowledge graph from any skill. The graph prov
4
4
 
5
5
  This is the **single source of truth** for graph lookup procedure. Consumer skills MUST reference this file rather than inlining their own lookup logic.
6
6
 
7
- Referenced by: `/draft:init`, `/draft:implement`, `/draft:bughunt`, `/draft:review`, `/draft:deep-review`, `/draft:quick-review`, `/draft:debug`, `/draft:decompose`, `/draft:new-track`, `/draft:tech-debt`, `/draft:deploy-checklist`, `/draft:learn`, `/draft:index`
7
+ Referenced by: `/draft:init`, `/draft:implement`, `/draft:bughunt`, `/draft:review`, `/draft:deep-review`, `/draft:quick-review`, `/draft:debug`, `/draft:decompose`, `/draft:new-track`, `/draft:tech-debt`, `/draft:deploy-checklist`, `/draft:learn`, `/draft:graph`
8
8
 
9
9
  ## Mandatory Lookup Contract
10
10
 
11
11
  Any code-touching skill that needs to discover files, modules, symbols, callers, or blast-radius **MUST** follow this lookup order whenever `draft/graph/schema.yaml` exists:
12
12
 
13
- 1. **Graph first** — the committed snapshot (`architecture.json`, `hotspots.jsonl`) and the live query tools (`scripts/tools/graph-callers.sh`, `graph-impact.sh`, `cycle-detect.sh`, `hotspot-rank.sh`).
13
+ 1. **Graph first** — live engine queries via the query tools (`scripts/tools/graph-callers.sh`, `graph-impact.sh`, `cycle-detect.sh`, `hotspot-rank.sh`, `mermaid-from-graph.sh`), which drive the local `codebase-memory-mcp` engine on demand. Draft is **engine-only**: there is no committed machine-readable graph to read — `draft/graph/` holds only `schema.yaml` (the gate marker).
14
14
  2. **Generated context second** — `draft/.ai-context.md`, relevant `draft/architecture.md` slices, track-level `hld.md`/`lld.md`.
15
15
  3. **Source file reads third** — narrow via tiers 1–2, then **Read** the candidate files. Reading is **not optional**: see §Ground-Truth Discipline below.
16
16
  4. **Filesystem `grep`/`find`/`rg` last** — only after an explicit graph miss.
@@ -55,10 +55,10 @@ A single "no" / "list" answer is a halt — fix and re-check before output.
55
55
 
56
56
  Use this recipe whenever the user names a concept, feature, or domain term ("in-memory shuffle", "auth flow", "ingest pipeline") and you need to locate the implementing files. **Run it before any filesystem search.**
57
57
 
58
- 1. **Concept → modules** — `grep` the concept token against `draft/graph/architecture.json` (`.packages[].name`) and `draft/.ai-context.md` (module headings). Record the candidate module list.
58
+ 1. **Concept → modules** — query the engine for the package list (`scripts/tools/graph-arch.sh --repo . | jq -r '.packages[].name'`) and cross-reference `draft/.ai-context.md` (module headings). Record the candidate module list.
59
59
  2. **Concept → symbols/callers** — for a named function, run `scripts/tools/graph-callers.sh --repo . --symbol <name>` to find call sites, and `scripts/tools/graph-impact.sh --repo . --symbol <name>` for transitive dependents. These are the authoritative structural answers.
60
- 3. **Modules → risk ranking** — cross-reference `draft/graph/hotspots.jsonl` (or `scripts/tools/hotspot-rank.sh`). High-fanIn symbols are the most likely entry points for impact.
61
- 4. **Concept → public API** — for API-shaped concepts, consult `architecture.json` `.routes` (detected HTTP/gRPC/GraphQL routes) for matching service surface.
60
+ 3. **Modules → risk ranking** — rank with `scripts/tools/hotspot-rank.sh --repo . [--top N]`. High-fanIn symbols are the most likely entry points for impact.
61
+ 4. **Concept → public API** — for API-shaped concepts, read the engine's `.routes` (`get_architecture` output, detected HTTP/gRPC/GraphQL routes) for matching service surface.
62
62
  5. **Graph miss → grep fallback** — only if steps 1–4 return nothing relevant, emit the fallback sentence and use `grep`/`find`. Narrow the search by file extension and exclude `node_modules`, `vendor`, `dist`, `build`, `.git`.
63
63
 
64
64
  ## Graph Usage Report (Mandatory Footer)
@@ -68,7 +68,7 @@ Every code-touching skill output MUST end with this footer block. The lint check
68
68
  ```md
69
69
  ## Graph Usage Report
70
70
 
71
- - Graph files queried: <comma-separated list, e.g. `architecture.json, hotspots.jsonl` and/or query tools like `graph-callers.sh` — or `NONE` with justification below>
71
+ - Graph files queried: <comma-separated list of query tools invoked, e.g. `graph-callers.sh, hotspot-rank.sh` — or `NONE` with justification below>
72
72
  - Modules identified via graph: <comma-separated module names, or `none`>
73
73
  - Files identified via graph: <integer count>
74
74
  - Filesystem grep fallbacks: <list of `<pattern>` searches with one-line justification each, or `none`>
@@ -106,7 +106,7 @@ DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$HOME/.claude/plugins/draft}/scripts/tools"
106
106
  | `bash "$DRAFT_TOOLS/cycle-detect.sh"` | `--mode cycles` | Emits `{cycles:[],source:"unavailable"}` and exits 2 |
107
107
  | `bash "$DRAFT_TOOLS/mermaid-from-graph.sh" [--diagram module-deps\|proto-map]` | `--mode mermaid` | Emits an empty mermaid block and exits 2 |
108
108
 
109
- Use the raw `graph` CLI directly for the lower-level modes documented below.
109
+ For lower-level modes, call the engine directly: `codebase-memory-mcp cli <tool> '<json>'` (see the tool list in [bin/README.md](../../bin/README.md)).
110
110
 
111
111
  ## Pre-Check
112
112
 
@@ -118,26 +118,26 @@ ls draft/graph/schema.yaml 2>/dev/null
118
118
 
119
119
  If absent, **skip all graph operations silently**. Graph enriches analysis — it never gates it. All skills must work identically without graph data.
120
120
 
121
- ## Engine + snapshot model
121
+ ## Engine model (engine-only)
122
122
 
123
- The graph is produced by the **codebase-memory-mcp** engine (a single binary; see [bin/README.md](../../bin/README.md)). There are two ways skills consume it:
123
+ The graph is produced by the **codebase-memory-mcp** engine (a single binary; see [bin/README.md](../../bin/README.md)). Draft is **engine-only and opinionated**: the engine is the one structural source of truth, queried live. There is **no committed machine-readable mirror** of the graph — no `architecture.json`, `hotspots.jsonl`, `*.mermaid`, or `okf/`. Those were lossy, went stale on the next commit, and duplicated what the engine serves precisely on demand.
124
124
 
125
- 1. **Live queries** (preferred when the engine is resolvable) — the shell tools under `scripts/tools/` drive the engine on demand (it auto-indexes into its own cache). No committed files required.
126
- 2. **Committed snapshot** (`draft/graph/`) — a small, derived, PR-reviewable snapshot written by `scripts/tools/graph-snapshot.sh`. It exists for reviewability and for the Copilot/Gemini integrations, which cannot run the engine but can read committed files. Git remains the source of truth.
125
+ The only committed file is the gate marker:
127
126
 
128
- When `draft/graph/` exists, the snapshot contains:
127
+ | File | Role |
128
+ |------|------|
129
+ | `draft/graph/schema.yaml` | Engine + project metadata and point-of-index counts (provenance, not authoritative). Carries **no graph data**. Its presence is the **gate** (see Pre-Check) — it signals the engine is wired for this repo. Written by `scripts/tools/graph-snapshot.sh`. |
129
130
 
130
- | File | Load | Content |
131
- |------|------|---------|
132
- | `schema.yaml` | Always | Engine + project metadata, node/edge counts, artifact list. Its presence **gates** graph use (see Pre-Check). |
133
- | `architecture.json` | Always | `get_architecture(all)` output: node labels, edge types, languages, packages (with fan-in/out), entry points, routes, hotspots. |
134
- | `hotspots.jsonl` | Always | Fan-in-ranked symbols, one JSON object per line: `{id, name, fanIn}`. |
135
- | `module-deps.mermaid` | Diagram injection | File co-change coupling diagram (`FILE_CHANGES_WITH`). |
136
- | `proto-map.mermaid` | Diagram injection | Detected service-route diagram (`Route` nodes). |
131
+ All structural data is obtained live by shelling out to the engine — either through the query-tool wrappers under `scripts/tools/` or directly via `codebase-memory-mcp cli <tool> '<json>'`. The shell tools auto-index the repo into the engine's own cache on demand, so no committed files are required.
137
132
 
138
- The engine uses a **unified, language-agnostic** node model — `Function`, `Method`, `Class`, `Module`, `File`, `Folder`, `Route`, `Section`, `Variable` (language is inferred from file extension) — and edges `CALLS`, `DEFINES`, `CONTAINS_FILE`, `IMPORTS`, `HTTP_CALLS`, `FILE_CHANGES_WITH`, `SEMANTICALLY_RELATED`, `SIMILAR_TO`. There are **no** per-language index files and no `ctags-sym` fallback; that detail is served by live queries against the unified model.
133
+ ### How skills query (engine is the interface; jq is optional)
139
134
 
140
- **Always-load files** are compact and should be read during context loading for any task that touches code structure.
135
+ - **The engine is the query.** `codebase-memory-mcp cli <tool> '<json>'` (and the wrappers that call it) is how you ask it takes JSON args and returns JSON. There is no other query surface.
136
+ - **Prefer the wrappers — they resolve the engine for you.** `graph-arch.sh` (architecture view: packages/routes/layers/hotspots), `graph-callers.sh`, `hotspot-rank.sh`, `graph-impact.sh`, `cycle-detect.sh`, `mermaid-from-graph.sh` return already-shaped JSON. The engine binary is usually **not on `$PATH`** (it lives under `~/.cache/draft/bin/`); the wrappers locate it via `_lib.sh:find_memory_bin`, so a skill using a wrapper needs no resolution step.
137
+ - **Raw `codebase-memory-mcp cli` requires resolving the binary first** (it is not on `$PATH`): `CM="${DRAFT_MEMORY_BIN:-$HOME/.cache/draft/bin/codebase-memory-mcp}"; "$CM" cli <tool> '<json>'`. Reach for this only for tools without a wrapper (`search_graph`, `search_code`, `trace_path`).
138
+ - **`jq` is not a query tool — it only trims output.** Reach for it solely to slice a *large* response (chiefly the `get_architecture` blob) down to the field you need, for token economy. The agent can read raw JSON directly; jq is an optimization, not a requirement. Don't pipe wrapper output through jq unless you genuinely need a sub-field.
139
+
140
+ The engine uses a **unified, language-agnostic** node model — `Function`, `Method`, `Class`, `Module`, `File`, `Folder`, `Route`, `Section`, `Variable` (language is inferred from file extension) — and edges `CALLS`, `DEFINES`, `CONTAINS_FILE`, `IMPORTS`, `HTTP_CALLS`, `FILE_CHANGES_WITH`, `SEMANTICALLY_RELATED`, `SIMILAR_TO`. Each node carries `file_path` + `start_line`/`end_line` and rich `properties` (complexity, signature, parent_class), and the engine exposes full-text (`search_code`) and semantic search — none of which a committed snapshot reproduced.
141
141
 
142
142
  ## Query Tools
143
143
 
@@ -178,7 +178,14 @@ Output: `{cycles[[a,b],[a,b,c]], source}` — fixed-length 2- and 3-node `CALLS`
178
178
 
179
179
  ### Modules — dependency overview
180
180
 
181
- Read `draft/graph/architecture.json` (`.packages` for module fan-in/out, `.node_labels`/`.edge_types` for shape, `.routes` for service surface), or regenerate it with `scripts/tools/graph-snapshot.sh --repo .`.
181
+ Query the engine's architecture view live with the `graph-arch.sh` wrapper (it resolves the engine, indexes on demand, and auto-resolves the project):
182
+
183
+ ```bash
184
+ scripts/tools/graph-arch.sh --repo . \
185
+ | jq '{packages, node_labels, edge_types, routes, layers, boundaries}'
186
+ ```
187
+
188
+ `.packages` gives module fan-in/out, `.node_labels`/`.edge_types` the shape, `.routes` the service surface, `.layers`/`.boundaries` the dependency direction.
182
189
 
183
190
  ### Mermaid — diagram text
184
191
 
@@ -187,15 +194,15 @@ scripts/tools/mermaid-from-graph.sh --repo . --diagram module-deps # co-change
187
194
  scripts/tools/mermaid-from-graph.sh --repo . --diagram proto-map # detected routes
188
195
  ```
189
196
 
190
- Emits a ready-to-inject ` ```mermaid ``` ` block, or an empty stub (exit 2) when the engine is unavailable. The committed `draft/graph/*.mermaid` snapshots are written by `graph-snapshot.sh`.
197
+ Emits a ready-to-inject ` ```mermaid ``` ` block on the fly (computed live by the engine), or an empty stub (exit 2) when the engine is unavailable. Diagrams are generated at the moment of use — they are never committed.
191
198
 
192
- ### Building / refreshing the snapshot
199
+ ### Indexing / refreshing the gate marker
193
200
 
194
201
  ```bash
195
202
  scripts/tools/graph-snapshot.sh --repo .
196
203
  ```
197
204
 
198
- Writes the committed `draft/graph/` snapshot (`schema.yaml`, `architecture.json`, `hotspots.jsonl`, `*.mermaid`). Run during `/draft:init` and `/draft:index`, or whenever the reviewable graph state should be refreshed.
205
+ Indexes the repo into the engine and writes the `draft/graph/schema.yaml` gate marker. It writes **no** graph data. Run during `/draft:init` and `/draft:graph`, or whenever the index should be refreshed.
199
206
 
200
207
  ## Finding the Engine (Resolution + Usage Report)
201
208
 
@@ -219,21 +226,21 @@ ENGINE_INFO="$(scripts/tools/verify-graph-binary.sh --repo . --json 2>/dev/null
219
226
 
220
227
  After successful detection, `draft/.graph-binary-report.json` contains: `detected_at`, `engine_bin`, `source` (`path` | `managed` | `bundled:<arch>` | `override`), `arch`, `status`. It is a derived artifact (safe to prune), regenerated by each graph-using command that calls the verifier.
221
228
 
222
- ## Building the Snapshot
229
+ ## Indexing the Repo
223
230
 
224
- Run during `draft:init` / `draft:index`, or manually:
231
+ Run during `draft:init` / `draft:graph`, or manually:
225
232
 
226
233
  ```bash
227
234
  scripts/tools/graph-snapshot.sh --repo .
228
235
  ```
229
236
 
230
- The engine indexes C/C++, Go, Python, TypeScript/JS, and more (tree-sitter, 159 languages) plus LSP-assisted resolution for the major ones, and detects HTTP/gRPC/GraphQL routes. Indexing is incremental in the engine (content-based, git-aware); the snapshot is re-derived on each run.
237
+ The engine indexes C/C++, Go, Python, TypeScript/JS, and more (tree-sitter, 159 languages) plus LSP-assisted resolution for the major ones, and detects HTTP/gRPC/GraphQL routes. Indexing is incremental in the engine (content-based, git-aware). This refreshes the engine index and rewrites the `schema.yaml` gate marker; it produces no committed graph data.
231
238
 
232
239
  ## Graceful Degradation
233
240
 
234
241
  | Scenario | Behavior |
235
242
  |----------|----------|
236
- | No engine resolvable (or `DRAFT_MEMORY_DISABLE=1`) | Skip graph build in init; all skills proceed without graph data; tools emit `source: unavailable` |
243
+ | No engine resolvable (or `DRAFT_MEMORY_DISABLE=1`) | Skip graph indexing in init; all skills proceed without graph data; tools emit `source: unavailable` |
237
244
  | Engine present but a query fails | Warn and proceed; skills work without graph data |
238
- | `draft/graph/` snapshot exists | Load always-load files during context loading; use live query tools as needed |
239
- | Stale snapshot | Still useful structural changes are infrequent. Re-run `graph-snapshot.sh` (or init) to refresh. |
245
+ | `draft/graph/schema.yaml` exists | Engine is wired use live query tools as needed during the run |
246
+ | Engine index out of date | The engine indexes incrementally (content-based, git-aware) on each query, so it self-freshens. Re-run `graph-snapshot.sh` (or init) to force a reindex and refresh the marker. |
@@ -12,7 +12,7 @@ See [graph-query.md](graph-query.md) §Graph Usage Report (Mandatory Footer) for
12
12
  ```md
13
13
  ## Graph Usage Report
14
14
 
15
- - Graph files queried: <comma-separated list, e.g. `architecture.json, hotspots.jsonl` and/or query tools like `graph-callers.sh` — or `NONE` with justification below>
15
+ - Graph files queried: <comma-separated list, e.g. `get_architecture, hotspot-rank.sh` and/or query tools like `graph-callers.sh` — or `NONE` with justification below>
16
16
  - Modules identified via graph: <comma-separated module names, or `none`>
17
17
  - Files identified via graph: <integer count>
18
18
  - Filesystem grep fallbacks: <list of `<pattern>` searches with one-line justification each, or `none`>
@@ -109,11 +109,11 @@ Append under `## Learned Anti-Patterns`:
109
109
  - **Suggested fix:** [Brief description of the correct approach]
110
110
  ```
111
111
 
112
- `graph_severity` derivation rules (from `draft/graph/hotspots.jsonl` fanIn values):
112
+ `graph_severity` derivation rules (from live hotspot query `scripts/tools/hotspot-rank.sh --repo .` fanIn values):
113
113
  - fanIn ≥ 10 in any evidence file → `critical`
114
114
  - fanIn 5–9 → `high`
115
115
  - fanIn 1–4 → `medium`
116
- - fanIn 0 or file not in hotspots.jsonl → `low`
116
+ - fanIn 0 or file not returned by hotspot query → `low`
117
117
  - Graph data absent → `unresolved`
118
118
 
119
119
  When `graph_severity` differs from `severity`, use `graph_severity` as the enforcement priority — it is objective and graph-derived.
@@ -12,7 +12,7 @@ Referenced by: `/draft:decompose`, `/draft:implement`, `/draft:review`, `/draft:
12
12
  ## Universal Red Flags (STOP if any apply)
13
13
 
14
14
  - **Ran `grep`/`find`/`rg` for symbol or file discovery before consulting the graph** (when `draft/graph/schema.yaml` exists).
15
- - **Read more than 50 lines of source before consulting `draft/graph/hotspots.jsonl`** to know whether the file is a hotspot.
15
+ - **Read more than 50 lines of source before querying hotspot rank** (`scripts/tools/hotspot-rank.sh --repo .`) to know whether the file is a hotspot.
16
16
  - **Omitted the Graph Usage Report footer** from the final output (see [graph-query.md](graph-query.md) §Mandatory Lookup Contract).
17
17
  - **Used a `grep` fallback without an explicit graph-miss statement** in the form: `Graph returned no match for <X>; falling back to grep.`
18
18
  - **Loaded full Layer 0.5 guardrails when the command type does not require them** (see selective-loading matrix in [draft-context-loading.md](draft-context-loading.md) §Layer 0.5).
@@ -24,7 +24,7 @@ Referenced by: `/draft:decompose`, `/draft:implement`, `/draft:review`, `/draft:
24
24
  These enforce [graph-query.md](graph-query.md) §Ground-Truth Discipline. Graph identifies candidates; Read confirms them. Shipping unread claims is the dominant correctness failure mode observed in Draft output.
25
25
 
26
26
  - **Wrote a `path:line` / `func()` / `symbol` reference into a deliverable without opening the file in this run.** Graph hit ≠ Read. (G1)
27
- - **Declared something in-scope or out-of-scope without Reading at least one file in that path.** Module names from `architecture.json` are a candidate set, not proof that the candidate contains the named cost. (G2)
27
+ - **Declared something in-scope or out-of-scope without Reading at least one file in that path.** Module names from the live engine (`get_architecture`) are a candidate set, not proof that the candidate contains the named cost. (G2)
28
28
  - **Shipped `Citation: TBD` / `Path: TBD` / `Symbol: TBD` on a row whose Status is `Modified` or `Existing`.** TBD is reserved for `Status: New` rows with a planned path filled in. (G3)
29
29
  - **Claimed code behavior (writes / blocks / loops / fails / is the only path) from graph metadata alone.** Fan-in / fan-out / complexity scores are necessary signal, not sufficient evidence. (G4)
30
30
  - **Promoted a spec / generated an HLD or LLD / closed a review without checking that the in-scope file set covers every cost term in the problem statement.** Silent scope narrowing that excludes the named cost is the highest-impact failure class. (G5)
@@ -34,7 +34,7 @@ When in doubt, prefer "not yet validated against source" over an unbacked assert
34
34
 
35
35
  ## Graph-First Lookup Order (non-negotiable)
36
36
 
37
- 1. **Graph first** — the committed snapshot (`draft/graph/architecture.json`, `draft/graph/hotspots.jsonl`) and the live query tools (`scripts/tools/graph-callers.sh`, `graph-impact.sh`, `cycle-detect.sh`, `hotspot-rank.sh`).
37
+ 1. **Graph first** — wrapper scripts (`scripts/tools/graph-arch.sh`, `graph-callers.sh`, `graph-impact.sh`, `cycle-detect.sh`, `hotspot-rank.sh`) and direct engine queries (`search_graph`, `search_code`). The gate marker `draft/graph/schema.yaml` (present = engine available) is the only committed graph file.
38
38
  2. **Generated context second** — `draft/.ai-context.md`, relevant `draft/architecture.md` slices, track-level `hld.md`/`lld.md`.
39
39
  3. **Source file reads third** — only narrowed targets identified via graph or generated context.
40
40
  4. **Filesystem `grep`/`find` last** — only after a graph miss, with the explicit fallback sentence above.
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: ContextMap
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  generated_by: "draft:init"
@@ -48,7 +49,7 @@ generated_at: "{ISO_TIMESTAMP}"
48
49
  ```
49
50
 
50
51
  > Include immediate sub-directories for all major modules (not just top-level).
51
- > Use graph data (`draft/graph/modules/*.jsonl`) for exhaustive sub-module enumeration.
52
+ > Use live engine queries (`get_architecture .packages[]` or `graph-callers.sh`) for exhaustive sub-module enumeration.
52
53
  > Show file counts per sub-module to indicate relative size/importance.
53
54
 
54
55
  ## GRAPH:MODULES
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: Profile
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "{MODULE_NAME or 'root'}"
4
5
  generated_by: "draft:{COMMAND_NAME}"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: Architecture
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  generated_by: "draft:init"
@@ -29,9 +30,9 @@ graph:
29
30
  go: "{approximate | high}"
30
31
  stats:
31
32
  modules: "{N from schema.yaml}"
32
- edges: "{total_edges from architecture.json}"
33
+ edges: "{total_edges from engine: get_architecture .edges}"
33
34
  hotspots: "{N}"
34
- notes: "{explicit fidelity summary from architecture.json languages/packages}"
35
+ notes: "{explicit fidelity summary from engine: get_architecture .languages/.packages}"
35
36
  generation_notes: "{High existing context detected via audit — see §10 Relationship for deference | Standard graph-primary generation}"
36
37
  ---
37
38
 
@@ -113,7 +114,7 @@ Each backed by:
113
114
 
114
115
  ## 4. Module & Dependency Map (Primarily Graph-Derived)
115
116
 
116
- - Module dependency graph rendered from `draft/graph/architecture.json` (`.packages`) + `module-deps.mermaid`
117
+ - Module dependency graph rendered from live engine query `scripts/tools/graph-arch.sh --repo . | jq '.packages'` + `scripts/tools/mermaid-from-graph.sh --repo . --diagram module-deps` (generated live, never committed)
117
118
  - High fan-in / fan-out modules highlighted
118
119
  - Cyclic dependencies called out
119
120
  - Cross-language boundaries (FFI, RPC, shared memory) explicitly surfaced with coverage notes
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  project: "{PROJECT_NAME}"
3
3
  module: "root"
4
- generated_by: "draft:index"
4
+ generated_by: "draft:init"
5
5
  generated_at: "{ISO_TIMESTAMP}"
6
6
  ---
7
7
 
@@ -15,7 +15,7 @@ generated_at: "{ISO_TIMESTAMP}"
15
15
  | **Synced To** | `{FULL_SHA}` |
16
16
 
17
17
  > Auto-generated. Do not edit directly.
18
- > Re-run `/draft:index` to update.
18
+ > Re-run `/draft:init` to update.
19
19
 
20
20
  ---
21
21
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: Discovery
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  track_id: "{TRACK_ID}"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: Guardrails
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  generated_by: "draft:init"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: HLD
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  track_id: "{TRACK_ID}"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: LLD
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  track_id: "{TRACK_ID}"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: Plan
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  track_id: "{TRACK_ID}"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: Product
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  generated_by: "draft:init"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: RCA
2
3
  project: "{PROJECT_NAME}"
3
4
  track_id: "{TRACK_ID}"
4
5
  jira_ticket: "{JIRA_KEY}"