@drafthq/draft 2.8.1 → 3.0.0

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 (56) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +9 -3
  4. package/bin/README.md +13 -0
  5. package/cli/src/installer.js +11 -2
  6. package/core/methodology.md +17 -18
  7. package/core/shared/condensation.md +1 -1
  8. package/core/shared/draft-context-loading.md +4 -2
  9. package/core/shared/graph-query.md +4 -3
  10. package/core/templates/ai-context.md +1 -0
  11. package/core/templates/ai-profile.md +1 -0
  12. package/core/templates/architecture.md +1 -0
  13. package/core/templates/dependency-graph.md +2 -2
  14. package/core/templates/discovery.md +1 -0
  15. package/core/templates/guardrails.md +1 -0
  16. package/core/templates/hld.md +1 -0
  17. package/core/templates/lld.md +1 -0
  18. package/core/templates/plan.md +1 -0
  19. package/core/templates/product.md +1 -0
  20. package/core/templates/rca.md +1 -0
  21. package/core/templates/root-architecture.md +3 -3
  22. package/core/templates/root-product.md +2 -2
  23. package/core/templates/root-tech-stack.md +2 -2
  24. package/core/templates/service-index.md +3 -3
  25. package/core/templates/spec.md +1 -0
  26. package/core/templates/tech-matrix.md +2 -2
  27. package/core/templates/tech-stack.md +1 -0
  28. package/core/templates/workflow.md +1 -0
  29. package/integrations/agents/AGENTS.md +134 -918
  30. package/integrations/copilot/.github/copilot-instructions.md +134 -918
  31. package/integrations/copilot/.github/copilot-instructions.md.7iDz8X +91 -0
  32. package/integrations/copilot/.github/copilot-instructions.md.DoBdtd +91 -0
  33. package/integrations/copilot/.github/copilot-instructions.md.McGoBW +122 -0
  34. package/integrations/copilot/.github/copilot-instructions.md.VsPyLB +91 -0
  35. package/integrations/copilot/.github/copilot-instructions.md.XAVr7D +91 -0
  36. package/integrations/copilot/.github/copilot-instructions.md.YoFVFa +91 -0
  37. package/integrations/copilot/.github/copilot-instructions.md.a9DeW0 +91 -0
  38. package/integrations/copilot/.github/copilot-instructions.md.oxQs3B +91 -0
  39. package/integrations/copilot/.github/copilot-instructions.md.ww33Ly +91 -0
  40. package/package.json +1 -1
  41. package/scripts/lib.sh +4 -1
  42. package/scripts/tools/graph-init.sh +187 -0
  43. package/scripts/tools/graph-snapshot.sh +6 -1
  44. package/scripts/tools/okf-bundle.sh +141 -0
  45. package/scripts/tools/okf-check.sh +137 -0
  46. package/scripts/tools/okf-emit.sh +161 -0
  47. package/scripts/tools/skill-caps.conf +0 -1
  48. package/skills/GRAPH.md +7 -10
  49. package/skills/bughunt/SKILL.md +13 -0
  50. package/skills/discover/SKILL.md +2 -4
  51. package/skills/draft/SKILL.md +2 -2
  52. package/skills/draft/intent-mapping.md +3 -2
  53. package/skills/graph/SKILL.md +3 -3
  54. package/skills/init/SKILL.md +58 -19
  55. package/skills/init/references/architecture-spec.md +5 -5
  56. 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.0",
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.1",
4
+ "version": "3.0.0",
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` — 27 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 23 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
 
@@ -124,6 +124,10 @@ curl -o .gemini.md https://raw.githubusercontent.com/drafthq/draft/main/integrat
124
124
  | Command | What It Does |
125
125
  |---------|--------------|
126
126
  | **`/draft`** | Overview, intent mapping, and command reference |
127
+ | **`/draft:plan`** | Router for planning, architecture, and track management |
128
+ | **`/draft:ops`** | Router for operations, deployment, incident, and lifecycle |
129
+ | **`/draft:docs`** | Router for authoring and documentation workflows |
130
+ | **`/draft:discover`** | Router for discovery, debugging, investigation, and quality |
127
131
  | **`/draft:init`** | Analyze codebase, create context files + state tracking |
128
132
  | **`/draft:index`** | Aggregate monorepo service contexts |
129
133
  | **`/draft:new-track`** | Collaborative spec + plan with AI |
@@ -141,11 +145,13 @@ curl -o .gemini.md https://raw.githubusercontent.com/drafthq/draft/main/integrat
141
145
  | **`/draft:debug`** | Structured debugging: reproduce, isolate, diagnose, fix |
142
146
  | **`/draft:quick-review`** | Lightweight 4-dimension code review |
143
147
  | **`/draft:deploy-checklist`** | Pre-deployment verification with rollback triggers |
148
+ | **`/draft:upload`** | Pre-upload handoff gate (review, HLD, checklist, validators) |
144
149
  | **`/draft:testing-strategy`** | Test plan design with coverage targets |
145
150
  | **`/draft:tech-debt`** | Technical debt analysis across 6 dimensions |
146
151
  | **`/draft:standup`** | Git activity standup summary (read-only) |
147
152
  | **`/draft:incident-response`** | Incident lifecycle: triage, communicate, mitigate, postmortem |
148
153
  | **`/draft:documentation`** | Technical docs: readme, runbook, api, onboarding |
154
+ | **`/draft:integrations`** | External system exports and syncs (jira preview / create) |
149
155
  | **`/draft:jira`** | Unified Jira workflows (preview / create / review) |
150
156
  | **`/draft:tour`** | Interactive architecture mentorship and codebase walk-through |
151
157
  | **`/draft:impact`** | ROI analytics tracking friction and timeline metrics |
@@ -181,7 +187,7 @@ The graph powers `/draft:graph` and `/draft:impact`, enriches `/draft:bughunt` a
181
187
 
182
188
  ### Deterministic helper tools
183
189
 
184
- 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 **34 shell helpers** under `scripts/tools/` for mechanical work — git metadata, file classification, test-framework detection, hotspot ranking, freshness checks, ADR indexing, and Open Knowledge Format emission/validation (`okf-emit.sh`, `okf-bundle.sh`, `okf-check.sh`). All emit JSON or markdown, follow a uniform exit-code contract, and degrade gracefully when their input source is unavailable.
185
191
 
186
192
  ---
187
193
 
package/bin/README.md CHANGED
@@ -44,6 +44,19 @@ 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
+ `scripts/tools/graph-snapshot.sh` writes a small, committed, PR-reviewable snapshot under `<repo>/draft/graph/`:
50
+
51
+ | Artifact | Content |
52
+ |----------|---------|
53
+ | `schema.yaml` | Engine + project metadata, node/edge counts, artifact list (gates graph use). |
54
+ | `architecture.json` | `get_architecture(all)`: node labels, edge types, languages, packages (fan-in/out), entry points, routes, hotspots. |
55
+ | `hotspots.jsonl` | Fan-in-ranked symbols, one JSON object per line. |
56
+ | `module-deps.mermaid` | File co-change coupling diagram. |
57
+ | `proto-map.mermaid` | Detected service-route diagram. |
58
+ | `okf/` | Open Knowledge Format v0.1 bundle (`index.md` + cross-linked `modules/<name>.md`), emitted by default — a portable markdown mirror of the graph. Validate with `okf-check.sh`. |
59
+
47
60
  ## Offline / air-gapped distributions
48
61
 
49
62
  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.
@@ -11,13 +11,22 @@ function hasBinary(name) {
11
11
  return !(r.error && r.error.code === 'ENOENT');
12
12
  }
13
13
 
14
+ // Per-step ceiling so a stalled network op (e.g. the `git clone` behind
15
+ // `claude plugin marketplace add`) fails loudly with the manual fallback
16
+ // instead of hanging the installer forever. Override with DRAFT_INSTALL_TIMEOUT_MS.
17
+ const STEP_TIMEOUT_MS = Number(process.env.DRAFT_INSTALL_TIMEOUT_MS) || 300000;
18
+
14
19
  function execAction(act, ctx) {
15
20
  const printable = `${act.cmd} ${act.args.join(' ')}`;
16
21
  log.plan(`${ctx.dryRun ? 'would run' : 'running'}: ${printable}`);
17
22
  if (ctx.dryRun) return 0;
18
- const r = spawnSync(act.cmd, act.args, { stdio: 'inherit' });
23
+ const r = spawnSync(act.cmd, act.args, { stdio: 'inherit', timeout: STEP_TIMEOUT_MS });
19
24
  if (r.error) {
20
- log.error(`failed to run ${act.cmd}: ${r.error.message}`);
25
+ if (r.error.code === 'ETIMEDOUT') {
26
+ log.error(`timed out after ${Math.round(STEP_TIMEOUT_MS / 1000)}s: ${printable}`);
27
+ } else {
28
+ log.error(`failed to run ${act.cmd}: ${r.error.message}`);
29
+ }
21
30
  return 1;
22
31
  }
23
32
  return r.status == null ? 1 : r.status;
@@ -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
 
@@ -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` |
@@ -75,9 +75,11 @@ If `draft/graph/schema.yaml` exists, the project has automated graph analysis da
75
75
  | `draft/graph/architecture.json` | Node labels, edge types, languages, packages (fan-in/out), entry points, routes, hotspots | JSON |
76
76
  | `draft/graph/hotspots.jsonl` | Fan-in-ranked symbols, one object per line: `{id, name, fanIn}` | JSONL |
77
77
 
78
+ The snapshot also includes `draft/graph/okf/` — an Open Knowledge Format v0.1 bundle (`index.md` + `modules/*.md`) emitted by default. It is a portable mirror of the graph, not an always-load target.
79
+
78
80
  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.
79
81
 
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`.
82
+ 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
83
 
82
84
  **Live structural queries** (run on demand — no per-language index files; the engine's model is unified):
83
85
 
@@ -4,7 +4,7 @@ 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
 
@@ -134,6 +134,7 @@ When `draft/graph/` exists, the snapshot contains:
134
134
  | `hotspots.jsonl` | Always | Fan-in-ranked symbols, one JSON object per line: `{id, name, fanIn}`. |
135
135
  | `module-deps.mermaid` | Diagram injection | File co-change coupling diagram (`FILE_CHANGES_WITH`). |
136
136
  | `proto-map.mermaid` | Diagram injection | Detected service-route diagram (`Route` nodes). |
137
+ | `okf/` | On demand | Open Knowledge Format v0.1 bundle (emitted by default): `index.md` (reserved bundle root, no frontmatter) + cross-linked `modules/<name>.md` concept pages. Portable, vendor-neutral mirror of the graph; validate with `okf-check.sh`. |
137
138
 
138
139
  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.
139
140
 
@@ -195,7 +196,7 @@ Emits a ready-to-inject ` ```mermaid ``` ` block, or an empty stub (exit 2) when
195
196
  scripts/tools/graph-snapshot.sh --repo .
196
197
  ```
197
198
 
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.
199
+ Writes the committed `draft/graph/` snapshot (`schema.yaml`, `architecture.json`, `hotspots.jsonl`, `*.mermaid`, plus the Open Knowledge Format bundle under `okf/`). Run during `/draft:init` and `/draft:graph`, or whenever the reviewable graph state should be refreshed.
199
200
 
200
201
  ## Finding the Engine (Resolution + Usage Report)
201
202
 
@@ -221,7 +222,7 @@ After successful detection, `draft/.graph-binary-report.json` contains: `detecte
221
222
 
222
223
  ## Building the Snapshot
223
224
 
224
- Run during `draft:init` / `draft:index`, or manually:
225
+ Run during `draft:init` / `draft:graph`, or manually:
225
226
 
226
227
  ```bash
227
228
  scripts/tools/graph-snapshot.sh --repo .
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: ContextMap
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  generated_by: "draft:init"
@@ -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"
@@ -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}"
@@ -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
 
@@ -16,7 +16,7 @@ generated_at: "{ISO_TIMESTAMP}"
16
16
 
17
17
  > Synthesized from [X] service contexts.
18
18
  > This is a **system-of-systems** view. For service internals, see individual service contexts.
19
- > Re-running `/draft:index` will update auto-generated sections but preserve manual edits.
19
+ > Re-running `/draft:init` will update auto-generated sections but preserve manual edits.
20
20
 
21
21
  ---
22
22
 
@@ -123,5 +123,5 @@ sequenceDiagram
123
123
  ## Notes
124
124
 
125
125
  - For detailed service architecture, navigate to individual service contexts via the Details column
126
- - This file is regenerable via `/draft:index`
126
+ - This file is regenerable via `/draft:init`
127
127
  - Manual edits between `<!-- MANUAL START -->` and `<!-- MANUAL END -->` are preserved
@@ -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
 
@@ -16,7 +16,7 @@ generated_at: "{ISO_TIMESTAMP}"
16
16
 
17
17
  > Synthesized from [X] service contexts.
18
18
  > Edit this file to refine the overall product vision.
19
- > Re-running `/draft:index` will update auto-generated sections but preserve manual edits.
19
+ > Re-running `/draft:init` will update auto-generated sections but preserve manual edits.
20
20
 
21
21
  ---
22
22
 
@@ -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
 
@@ -16,7 +16,7 @@ generated_at: "{ISO_TIMESTAMP}"
16
16
 
17
17
  > Synthesized from [X] service contexts.
18
18
  > This defines **org-wide standards**. Service-specific additions are in their local tech-stack.md.
19
- > Re-running `/draft:index` will update auto-generated sections but preserve manual edits.
19
+ > Re-running `/draft:init` will update auto-generated sections but preserve manual edits.
20
20
 
21
21
  ---
22
22
 
@@ -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
 
@@ -42,7 +42,7 @@ The following services have not been initialized with `/draft:init`:
42
42
 
43
43
  - `[path/to/service]/`
44
44
 
45
- Run `/draft:index --init-missing` or initialize individually with:
45
+ Initialize each one by running `/draft:init` inside its directory — it links the module's graph up to the root spine:
46
46
  ```bash
47
47
  cd [path/to/service] && /draft:init
48
48
  ```
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: Spec
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  track_id: "{TRACK_ID}"
@@ -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: TechStack
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  generated_by: "draft:init"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ type: Workflow
2
3
  project: "{PROJECT_NAME}"
3
4
  module: "root"
4
5
  generated_by: "draft:init"