@drafthq/draft 3.5.0 → 3.5.2
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/core/templates/okf/ai-context-index.md +1 -1
- package/core/templates/okf/index.md +5 -5
- package/core/templates/okf/section-index.md +8 -8
- package/integrations/agents/AGENTS.md +36 -24
- package/integrations/copilot/.github/copilot-instructions.md +36 -24
- package/integrations/copilot/.github/copilot-instructions.md.7iDz8X +91 -0
- package/integrations/copilot/.github/copilot-instructions.md.DoBdtd +91 -0
- package/integrations/copilot/.github/copilot-instructions.md.McGoBW +122 -0
- package/integrations/copilot/.github/copilot-instructions.md.VsPyLB +91 -0
- package/integrations/copilot/.github/copilot-instructions.md.XAVr7D +91 -0
- package/integrations/copilot/.github/copilot-instructions.md.YoFVFa +91 -0
- package/integrations/copilot/.github/copilot-instructions.md.a9DeW0 +91 -0
- package/integrations/copilot/.github/copilot-instructions.md.oxQs3B +91 -0
- package/integrations/copilot/.github/copilot-instructions.md.ww33Ly +91 -0
- package/package.json +1 -1
- package/scripts/tools/_lib.sh +68 -1
- package/scripts/tools/okf-plan-concepts.sh +14 -3
- package/scripts/tools/okf-render-views.sh +58 -2
- package/scripts/tools/okf-validate-quality.sh +40 -10
- package/scripts/tools/okf-validate.sh +57 -2
- package/skills/init/SKILL.md +1 -1
- package/skills/init/references/okf-emitter.md +21 -9
|
@@ -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": "3.5.
|
|
15
|
+
"version": "3.5.2",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "mayurpise"
|
|
18
18
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "draft",
|
|
3
3
|
"displayName": "Draft",
|
|
4
4
|
"description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.",
|
|
5
|
-
"version": "3.5.
|
|
5
|
+
"version": "3.5.2",
|
|
6
6
|
"skills": "./skills/",
|
|
7
7
|
"agents": "./core/agents/",
|
|
8
8
|
"author": {
|
|
@@ -8,7 +8,7 @@ draft_init_mode: okf
|
|
|
8
8
|
|
|
9
9
|
# {PROJECT_NAME} — AI Context Index
|
|
10
10
|
|
|
11
|
-
> Index root for the
|
|
11
|
+
> Index root for the project wiki (`wiki/`). Read **Synopsis** for broad
|
|
12
12
|
> tasks (they usually terminate here). For focused tasks, route through the
|
|
13
13
|
> **Concept Map** to ≤N concept pages — each lists `x-grounded-paths`. This is
|
|
14
14
|
> both the cheap broad-context path AND the progressive-disclosure entry point.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: Subsystem
|
|
3
|
-
title: "{PROJECT_NAME} —
|
|
3
|
+
title: "{PROJECT_NAME} — Wiki"
|
|
4
4
|
description: >
|
|
5
|
-
Root index of the
|
|
5
|
+
Root index of the project wiki. Start here, then route into
|
|
6
6
|
overview/, systems/, features/, reference/, or entrypoints/ via the
|
|
7
7
|
Concept Map. Open a concept only when its description matches the task.
|
|
8
8
|
resource: .
|
|
@@ -12,10 +12,10 @@ okf_version: "0.1"
|
|
|
12
12
|
okf_types_version: "0.1"
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
# {PROJECT_NAME} —
|
|
15
|
+
# {PROJECT_NAME} — Wiki
|
|
16
16
|
|
|
17
|
-
>
|
|
18
|
-
> live call graph (`codebase-memory-mcp`) is the grounding source; this
|
|
17
|
+
> Project wiki. One concept per file; cross-links form the graph. The
|
|
18
|
+
> live call graph (`codebase-memory-mcp`) is the grounding source; this wiki
|
|
19
19
|
> is the navigable serialization. `../ai-context.md` is the consumption entry point.
|
|
20
20
|
|
|
21
21
|
## Sections
|
|
@@ -12,14 +12,14 @@ timestamp: "{ISO_TIMESTAMP}"
|
|
|
12
12
|
|
|
13
13
|
# {SECTION_TITLE}
|
|
14
14
|
|
|
15
|
-
> Section of the
|
|
15
|
+
> Section of the project wiki. Back to [wiki root](../index.md).
|
|
16
16
|
|
|
17
17
|
## Concepts
|
|
18
18
|
|
|
19
|
-
<!--
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
<!-- TOOL-OWNED: regenerated deterministically by okf-render-views.sh
|
|
20
|
+
(--section-indexes) from the concept pages in this directory. One row per
|
|
21
|
+
page; `description` is the routing key copied from each page's frontmatter.
|
|
22
|
+
Do not hand-edit between the markers — links here are guaranteed to resolve
|
|
23
|
+
because they are built only from files that actually exist. -->
|
|
24
|
+
<!-- CONCEPT-MAP:START -->
|
|
25
|
+
<!-- CONCEPT-MAP:END -->
|
|
@@ -341,7 +341,7 @@ The tier-gated default rests on **maintainability/readability** (one navigable c
|
|
|
341
341
|
1. `okf-plan-concepts.sh` ran and the expected/required/deferred counts were logged **before** any page was written (the concept boundary is a tool output, not an in-context guess).
|
|
342
342
|
2. Every `required` entry in `concept-plan.json` has a non-stub page.
|
|
343
343
|
3. `okf-validate-all.sh … --plan … --strict` exits 0 (structure + per-type quality + coverage all pass).
|
|
344
|
-
4. `systems/coverage.md` was generated by tooling (verify the `<!-- okf:coverage-generated -->` marker) —
|
|
344
|
+
4. `systems/coverage.md` was generated by tooling (verify the `<!-- okf:coverage-generated -->` marker) — **every** package/module the graph found is required by default (the fan-in floor only types Subsystem-vs-Module, it does not exempt), so none may be **MISSING**. Section `index.md` tables are regenerated by `okf-render-views.sh --section-indexes`, never hand-authored, so their links cannot dangle.
|
|
345
345
|
5. On any failure: **do not** atomic-rename; surface `.state/validation-report.json`.
|
|
346
346
|
|
|
347
347
|
> **Red flag:** writing concept pages without first running `okf-plan-concepts.sh`, or finishing generation while any `required` plan entry is unwritten, is a **completeness failure** — not a stylistic one.
|
|
@@ -3398,17 +3398,21 @@ Derive concepts from the graph, not by hand:
|
|
|
3398
3398
|
```
|
|
3399
3399
|
1. Survey → existing draft init 5-phase + graph snapshot (graph-snapshot.sh)
|
|
3400
3400
|
2. Plan → DETERMINISTIC. okf-plan-concepts.sh derives the expected-concept
|
|
3401
|
-
set from the graph
|
|
3402
|
-
|
|
3403
|
-
|
|
3401
|
+
set from the graph. EVERY package the graph knows about is
|
|
3402
|
+
required (fan_in ≥ floor → Subsystem; below floor → Module — the
|
|
3403
|
+
floor only types/orders, it never exempts); entrypoints → required;
|
|
3404
|
+
only --allow-defer matches are deferred (with a reason). Writes
|
|
3405
|
+
draft.tmp/.state/concept-plan.json.
|
|
3404
3406
|
okf-plan-concepts.sh --repo . [--scope PATH] \
|
|
3405
3407
|
[--manifest FILE] [--min-fan-in 2] [--allow-defer GLOB]... \
|
|
3406
3408
|
--out draft.tmp/.state/concept-plan.json
|
|
3407
3409
|
This replaces the old in-context concept enumeration — the boundary
|
|
3408
3410
|
of the work is now a tool output, not an LLM judgment, so modules
|
|
3409
|
-
cannot be silently dropped.
|
|
3410
|
-
|
|
3411
|
-
(required
|
|
3411
|
+
and sub-modules cannot be silently dropped. (Legacy fan-in
|
|
3412
|
+
exemption is opt-in via --defer-below-floor.) LOG the counts
|
|
3413
|
+
(expected/required/deferred) BEFORE writing any page.
|
|
3414
|
+
`generated_order` is topo-ish (required + high-fan-in first) so
|
|
3415
|
+
forward cross-links resolve.
|
|
3412
3416
|
3. Generate → iterate concept-plan.generated_order; write ONE page per REQUIRED
|
|
3413
3417
|
entry, grounding each from the graph:
|
|
3414
3418
|
x-callers ← graph-callers.sh --symbol <c>
|
|
@@ -3428,9 +3432,11 @@ Derive concepts from the graph, not by hand:
|
|
|
3428
3432
|
--plan draft.tmp/.state/concept-plan.json \
|
|
3429
3433
|
--path-index draft.tmp/.state/path-to-concept.json \
|
|
3430
3434
|
--strict --report draft.tmp/.state/validation-report.json
|
|
3431
|
-
It runs, in order: okf-validate.sh (structure + reverse index
|
|
3432
|
-
|
|
3433
|
-
okf-
|
|
3435
|
+
It runs, in order: okf-validate.sh (structure + reverse index +
|
|
3436
|
+
empty/untyped-page + leftover-template-token + dangling-link checks),
|
|
3437
|
+
okf-validate-quality.sh (per-type anti-stub / depth / per-section
|
|
3438
|
+
content / mermaid lint), okf-coverage-check.sh (every required plan
|
|
3439
|
+
entry → real page).
|
|
3434
3440
|
ANY layer failing ⇒ exit non-zero ⇒ DO NOT atomic-rename.
|
|
3435
3441
|
coverage.md (systems/coverage.md) is regenerated by the coverage
|
|
3436
3442
|
layer; it is tool-owned (marker <!-- okf:coverage-generated -->) —
|
|
@@ -3469,6 +3475,7 @@ regenerated on every init/refresh so they never drift from the bundle:
|
|
|
3469
3475
|
```bash
|
|
3470
3476
|
okf-render-views.sh draft/wiki \
|
|
3471
3477
|
--arch-out draft/architecture.md \
|
|
3478
|
+
--section-indexes \
|
|
3472
3479
|
--concept-map-into draft/wiki/index.md \
|
|
3473
3480
|
--concept-map-into draft/.ai-context.md \
|
|
3474
3481
|
--web draft/wiki/web/index.html
|
|
@@ -3476,6 +3483,11 @@ okf-render-views.sh draft/wiki \
|
|
|
3476
3483
|
|
|
3477
3484
|
- `--arch-out` renders the linear `architecture.md` (banner + TOC + every concept
|
|
3478
3485
|
page in canonical section order, frontmatter stripped, Mermaid preserved).
|
|
3486
|
+
- `--section-indexes` rebuilds each `<section>/index.md` concept table (between its
|
|
3487
|
+
`CONCEPT-MAP` markers) from the pages that actually exist in that directory. This
|
|
3488
|
+
is mandatory: section indexes are NOT hand-authored — building them from real
|
|
3489
|
+
files is what makes their links impossible to dangle. Never write a section
|
|
3490
|
+
index "Concepts" table by hand.
|
|
3479
3491
|
- `--concept-map-into` rebuilds the routing table between the
|
|
3480
3492
|
`<!-- CONCEPT-MAP:START -->` / `:END` markers from each concept's `title` +
|
|
3481
3493
|
`type` + `description` (section `index.md` pages excluded).
|
|
@@ -22642,9 +22654,9 @@ List down alerting thresholds on those metrics:
|
|
|
22642
22654
|
|
|
22643
22655
|
---
|
|
22644
22656
|
type: Subsystem
|
|
22645
|
-
title: "{PROJECT_NAME} —
|
|
22657
|
+
title: "{PROJECT_NAME} — Wiki"
|
|
22646
22658
|
description: >
|
|
22647
|
-
Root index of the
|
|
22659
|
+
Root index of the project wiki. Start here, then route into
|
|
22648
22660
|
overview/, systems/, features/, reference/, or entrypoints/ via the
|
|
22649
22661
|
Concept Map. Open a concept only when its description matches the task.
|
|
22650
22662
|
resource: .
|
|
@@ -22654,10 +22666,10 @@ okf_version: "0.1"
|
|
|
22654
22666
|
okf_types_version: "0.1"
|
|
22655
22667
|
---
|
|
22656
22668
|
|
|
22657
|
-
# {PROJECT_NAME} —
|
|
22669
|
+
# {PROJECT_NAME} — Wiki
|
|
22658
22670
|
|
|
22659
|
-
>
|
|
22660
|
-
> live call graph (`codebase-memory-mcp`) is the grounding source; this
|
|
22671
|
+
> Project wiki. One concept per file; cross-links form the graph. The
|
|
22672
|
+
> live call graph (`codebase-memory-mcp`) is the grounding source; this wiki
|
|
22661
22673
|
> is the navigable serialization. `../ai-context.md` is the consumption entry point.
|
|
22662
22674
|
|
|
22663
22675
|
## Sections
|
|
@@ -22775,17 +22787,17 @@ timestamp: "{ISO_TIMESTAMP}"
|
|
|
22775
22787
|
|
|
22776
22788
|
# {SECTION_TITLE}
|
|
22777
22789
|
|
|
22778
|
-
> Section of the
|
|
22790
|
+
> Section of the project wiki. Back to [wiki root](../index.md).
|
|
22779
22791
|
|
|
22780
22792
|
## Concepts
|
|
22781
22793
|
|
|
22782
|
-
<!--
|
|
22783
|
-
|
|
22784
|
-
|
|
22785
|
-
|
|
22786
|
-
|
|
22787
|
-
|
|
22788
|
-
|
|
22794
|
+
<!-- TOOL-OWNED: regenerated deterministically by okf-render-views.sh
|
|
22795
|
+
(--section-indexes) from the concept pages in this directory. One row per
|
|
22796
|
+
page; `description` is the routing key copied from each page's frontmatter.
|
|
22797
|
+
Do not hand-edit between the markers — links here are guaranteed to resolve
|
|
22798
|
+
because they are built only from files that actually exist. -->
|
|
22799
|
+
<!-- CONCEPT-MAP:START -->
|
|
22800
|
+
<!-- CONCEPT-MAP:END -->
|
|
22789
22801
|
|
|
22790
22802
|
</core-file>
|
|
22791
22803
|
|
|
@@ -22805,7 +22817,7 @@ draft_init_mode: okf
|
|
|
22805
22817
|
|
|
22806
22818
|
# {PROJECT_NAME} — AI Context Index
|
|
22807
22819
|
|
|
22808
|
-
> Index root for the
|
|
22820
|
+
> Index root for the project wiki (`wiki/`). Read **Synopsis** for broad
|
|
22809
22821
|
> tasks (they usually terminate here). For focused tasks, route through the
|
|
22810
22822
|
> **Concept Map** to ≤N concept pages — each lists `x-grounded-paths`. This is
|
|
22811
22823
|
> both the cheap broad-context path AND the progressive-disclosure entry point.
|
|
@@ -341,7 +341,7 @@ The tier-gated default rests on **maintainability/readability** (one navigable c
|
|
|
341
341
|
1. `okf-plan-concepts.sh` ran and the expected/required/deferred counts were logged **before** any page was written (the concept boundary is a tool output, not an in-context guess).
|
|
342
342
|
2. Every `required` entry in `concept-plan.json` has a non-stub page.
|
|
343
343
|
3. `okf-validate-all.sh … --plan … --strict` exits 0 (structure + per-type quality + coverage all pass).
|
|
344
|
-
4. `systems/coverage.md` was generated by tooling (verify the `<!-- okf:coverage-generated -->` marker) —
|
|
344
|
+
4. `systems/coverage.md` was generated by tooling (verify the `<!-- okf:coverage-generated -->` marker) — **every** package/module the graph found is required by default (the fan-in floor only types Subsystem-vs-Module, it does not exempt), so none may be **MISSING**. Section `index.md` tables are regenerated by `okf-render-views.sh --section-indexes`, never hand-authored, so their links cannot dangle.
|
|
345
345
|
5. On any failure: **do not** atomic-rename; surface `.state/validation-report.json`.
|
|
346
346
|
|
|
347
347
|
> **Red flag:** writing concept pages without first running `okf-plan-concepts.sh`, or finishing generation while any `required` plan entry is unwritten, is a **completeness failure** — not a stylistic one.
|
|
@@ -3398,17 +3398,21 @@ Derive concepts from the graph, not by hand:
|
|
|
3398
3398
|
```
|
|
3399
3399
|
1. Survey → existing draft init 5-phase + graph snapshot (graph-snapshot.sh)
|
|
3400
3400
|
2. Plan → DETERMINISTIC. okf-plan-concepts.sh derives the expected-concept
|
|
3401
|
-
set from the graph
|
|
3402
|
-
|
|
3403
|
-
|
|
3401
|
+
set from the graph. EVERY package the graph knows about is
|
|
3402
|
+
required (fan_in ≥ floor → Subsystem; below floor → Module — the
|
|
3403
|
+
floor only types/orders, it never exempts); entrypoints → required;
|
|
3404
|
+
only --allow-defer matches are deferred (with a reason). Writes
|
|
3405
|
+
draft.tmp/.state/concept-plan.json.
|
|
3404
3406
|
okf-plan-concepts.sh --repo . [--scope PATH] \
|
|
3405
3407
|
[--manifest FILE] [--min-fan-in 2] [--allow-defer GLOB]... \
|
|
3406
3408
|
--out draft.tmp/.state/concept-plan.json
|
|
3407
3409
|
This replaces the old in-context concept enumeration — the boundary
|
|
3408
3410
|
of the work is now a tool output, not an LLM judgment, so modules
|
|
3409
|
-
cannot be silently dropped.
|
|
3410
|
-
|
|
3411
|
-
(required
|
|
3411
|
+
and sub-modules cannot be silently dropped. (Legacy fan-in
|
|
3412
|
+
exemption is opt-in via --defer-below-floor.) LOG the counts
|
|
3413
|
+
(expected/required/deferred) BEFORE writing any page.
|
|
3414
|
+
`generated_order` is topo-ish (required + high-fan-in first) so
|
|
3415
|
+
forward cross-links resolve.
|
|
3412
3416
|
3. Generate → iterate concept-plan.generated_order; write ONE page per REQUIRED
|
|
3413
3417
|
entry, grounding each from the graph:
|
|
3414
3418
|
x-callers ← graph-callers.sh --symbol <c>
|
|
@@ -3428,9 +3432,11 @@ Derive concepts from the graph, not by hand:
|
|
|
3428
3432
|
--plan draft.tmp/.state/concept-plan.json \
|
|
3429
3433
|
--path-index draft.tmp/.state/path-to-concept.json \
|
|
3430
3434
|
--strict --report draft.tmp/.state/validation-report.json
|
|
3431
|
-
It runs, in order: okf-validate.sh (structure + reverse index
|
|
3432
|
-
|
|
3433
|
-
okf-
|
|
3435
|
+
It runs, in order: okf-validate.sh (structure + reverse index +
|
|
3436
|
+
empty/untyped-page + leftover-template-token + dangling-link checks),
|
|
3437
|
+
okf-validate-quality.sh (per-type anti-stub / depth / per-section
|
|
3438
|
+
content / mermaid lint), okf-coverage-check.sh (every required plan
|
|
3439
|
+
entry → real page).
|
|
3434
3440
|
ANY layer failing ⇒ exit non-zero ⇒ DO NOT atomic-rename.
|
|
3435
3441
|
coverage.md (systems/coverage.md) is regenerated by the coverage
|
|
3436
3442
|
layer; it is tool-owned (marker <!-- okf:coverage-generated -->) —
|
|
@@ -3469,6 +3475,7 @@ regenerated on every init/refresh so they never drift from the bundle:
|
|
|
3469
3475
|
```bash
|
|
3470
3476
|
okf-render-views.sh draft/wiki \
|
|
3471
3477
|
--arch-out draft/architecture.md \
|
|
3478
|
+
--section-indexes \
|
|
3472
3479
|
--concept-map-into draft/wiki/index.md \
|
|
3473
3480
|
--concept-map-into draft/.ai-context.md \
|
|
3474
3481
|
--web draft/wiki/web/index.html
|
|
@@ -3476,6 +3483,11 @@ okf-render-views.sh draft/wiki \
|
|
|
3476
3483
|
|
|
3477
3484
|
- `--arch-out` renders the linear `architecture.md` (banner + TOC + every concept
|
|
3478
3485
|
page in canonical section order, frontmatter stripped, Mermaid preserved).
|
|
3486
|
+
- `--section-indexes` rebuilds each `<section>/index.md` concept table (between its
|
|
3487
|
+
`CONCEPT-MAP` markers) from the pages that actually exist in that directory. This
|
|
3488
|
+
is mandatory: section indexes are NOT hand-authored — building them from real
|
|
3489
|
+
files is what makes their links impossible to dangle. Never write a section
|
|
3490
|
+
index "Concepts" table by hand.
|
|
3479
3491
|
- `--concept-map-into` rebuilds the routing table between the
|
|
3480
3492
|
`<!-- CONCEPT-MAP:START -->` / `:END` markers from each concept's `title` +
|
|
3481
3493
|
`type` + `description` (section `index.md` pages excluded).
|
|
@@ -22642,9 +22654,9 @@ List down alerting thresholds on those metrics:
|
|
|
22642
22654
|
|
|
22643
22655
|
---
|
|
22644
22656
|
type: Subsystem
|
|
22645
|
-
title: "{PROJECT_NAME} —
|
|
22657
|
+
title: "{PROJECT_NAME} — Wiki"
|
|
22646
22658
|
description: >
|
|
22647
|
-
Root index of the
|
|
22659
|
+
Root index of the project wiki. Start here, then route into
|
|
22648
22660
|
overview/, systems/, features/, reference/, or entrypoints/ via the
|
|
22649
22661
|
Concept Map. Open a concept only when its description matches the task.
|
|
22650
22662
|
resource: .
|
|
@@ -22654,10 +22666,10 @@ okf_version: "0.1"
|
|
|
22654
22666
|
okf_types_version: "0.1"
|
|
22655
22667
|
---
|
|
22656
22668
|
|
|
22657
|
-
# {PROJECT_NAME} —
|
|
22669
|
+
# {PROJECT_NAME} — Wiki
|
|
22658
22670
|
|
|
22659
|
-
>
|
|
22660
|
-
> live call graph (`codebase-memory-mcp`) is the grounding source; this
|
|
22671
|
+
> Project wiki. One concept per file; cross-links form the graph. The
|
|
22672
|
+
> live call graph (`codebase-memory-mcp`) is the grounding source; this wiki
|
|
22661
22673
|
> is the navigable serialization. `../ai-context.md` is the consumption entry point.
|
|
22662
22674
|
|
|
22663
22675
|
## Sections
|
|
@@ -22775,17 +22787,17 @@ timestamp: "{ISO_TIMESTAMP}"
|
|
|
22775
22787
|
|
|
22776
22788
|
# {SECTION_TITLE}
|
|
22777
22789
|
|
|
22778
|
-
> Section of the
|
|
22790
|
+
> Section of the project wiki. Back to [wiki root](../index.md).
|
|
22779
22791
|
|
|
22780
22792
|
## Concepts
|
|
22781
22793
|
|
|
22782
|
-
<!--
|
|
22783
|
-
|
|
22784
|
-
|
|
22785
|
-
|
|
22786
|
-
|
|
22787
|
-
|
|
22788
|
-
|
|
22794
|
+
<!-- TOOL-OWNED: regenerated deterministically by okf-render-views.sh
|
|
22795
|
+
(--section-indexes) from the concept pages in this directory. One row per
|
|
22796
|
+
page; `description` is the routing key copied from each page's frontmatter.
|
|
22797
|
+
Do not hand-edit between the markers — links here are guaranteed to resolve
|
|
22798
|
+
because they are built only from files that actually exist. -->
|
|
22799
|
+
<!-- CONCEPT-MAP:START -->
|
|
22800
|
+
<!-- CONCEPT-MAP:END -->
|
|
22789
22801
|
|
|
22790
22802
|
</core-file>
|
|
22791
22803
|
|
|
@@ -22805,7 +22817,7 @@ draft_init_mode: okf
|
|
|
22805
22817
|
|
|
22806
22818
|
# {PROJECT_NAME} — AI Context Index
|
|
22807
22819
|
|
|
22808
|
-
> Index root for the
|
|
22820
|
+
> Index root for the project wiki (`wiki/`). Read **Synopsis** for broad
|
|
22809
22821
|
> tasks (they usually terminate here). For focused tasks, route through the
|
|
22810
22822
|
> **Concept Map** to ≤N concept pages — each lists `x-grounded-paths`. This is
|
|
22811
22823
|
> both the cheap broad-context path AND the progressive-disclosure entry point.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Draft - Context-Driven Development
|
|
2
|
+
|
|
3
|
+
You are operating with the Draft methodology for Context-Driven Development.
|
|
4
|
+
|
|
5
|
+
**Measure twice, code once.**
|
|
6
|
+
|
|
7
|
+
## Core Workflow
|
|
8
|
+
|
|
9
|
+
**Context -> Spec & Plan -> Implement**
|
|
10
|
+
|
|
11
|
+
Every feature follows this lifecycle:
|
|
12
|
+
1. **Setup** - Initialize project context (once per project)
|
|
13
|
+
2. **New Track** - Create specification and plan
|
|
14
|
+
3. **Implement** - Execute tasks with TDD workflow
|
|
15
|
+
4. **Verify** - Confirm acceptance criteria met
|
|
16
|
+
|
|
17
|
+
## Project Context Files
|
|
18
|
+
|
|
19
|
+
When `draft/` exists in the project, always consider:
|
|
20
|
+
- `draft/.ai-context.md` - Source of truth for AI agents (dense codebase understanding)
|
|
21
|
+
- `draft/architecture.md` - Human-readable engineering guide (derived from .ai-context.md)
|
|
22
|
+
- `draft/product.md` - Product vision and goals
|
|
23
|
+
- `draft/tech-stack.md` - Technical constraints
|
|
24
|
+
- `draft/workflow.md` - TDD and commit preferences
|
|
25
|
+
- `draft/tracks.md` - Active work items
|
|
26
|
+
|
|
27
|
+
## Available Commands
|
|
28
|
+
|
|
29
|
+
| Command | Purpose |
|
|
30
|
+
|---------|---------|
|
|
31
|
+
| `draft` | Show overview and available commands |
|
|
32
|
+
| `draft init` | Initialize project (run once) |
|
|
33
|
+
| `draft index [--init-missing]` | Aggregate monorepo service contexts |
|
|
34
|
+
| `draft new-track <description>` | Create feature/bug track |
|
|
35
|
+
| `draft decompose` | Module decomposition with dependency mapping |
|
|
36
|
+
| `draft implement` | Execute tasks from plan |
|
|
37
|
+
| `draft coverage` | Code coverage report (target 95%+) |
|
|
38
|
+
| `draft bughunt [--track <id>]` | Systematic bug discovery |
|
|
39
|
+
| `draft review [--track <id>]` | Three-stage code review |
|
|
40
|
+
| `draft deep-review [module]` | Exhaustive production-grade module audit |
|
|
41
|
+
| `draft learn [promote\|migrate]` | Discover coding patterns, update guardrails |
|
|
42
|
+
| `draft adr [title]` | Architecture Decision Records |
|
|
43
|
+
| `draft status` | Show progress overview |
|
|
44
|
+
| `draft revert` | Git-aware rollback |
|
|
45
|
+
| `draft change <description>` | Handle mid-track requirement changes |
|
|
46
|
+
| `draft jira-preview [track-id]` | Generate jira-export.md for review |
|
|
47
|
+
| `draft jira-create [track-id]` | Create Jira issues from export via MCP |
|
|
48
|
+
|
|
49
|
+
## Intent Mapping
|
|
50
|
+
|
|
51
|
+
Recognize these natural language patterns:
|
|
52
|
+
|
|
53
|
+
| User Says | Action |
|
|
54
|
+
|-----------|--------|
|
|
55
|
+
| "set up the project" | Run init |
|
|
56
|
+
| "index services", "aggregate context" | Run index |
|
|
57
|
+
| "new feature", "add X" | Create new track |
|
|
58
|
+
| "break into modules", "decompose" | Run decompose |
|
|
59
|
+
| "start implementing" | Execute implement |
|
|
60
|
+
| "check coverage", "test coverage" | Run coverage |
|
|
61
|
+
| "hunt bugs", "find bugs" | Run bug hunt |
|
|
62
|
+
| "review code", "review track", "check quality" | Run review |
|
|
63
|
+
| "deep review", "production audit", "module audit" | Run deep-review |
|
|
64
|
+
| "learn patterns", "update guardrails", "discover conventions" | Run learn |
|
|
65
|
+
| "what's the status" | Show status |
|
|
66
|
+
| "undo", "revert" | Run revert |
|
|
67
|
+
| "requirements changed", "scope changed", "update the spec" | Run change |
|
|
68
|
+
| "preview jira", "export to jira" | Run jira-preview |
|
|
69
|
+
| "create jira", "push to jira" | Run jira-create |
|
|
70
|
+
| "document decision", "create ADR" | Create architecture decision record |
|
|
71
|
+
| "help", "what commands" | Show draft overview |
|
|
72
|
+
| "the plan" | Read active track's plan.md |
|
|
73
|
+
| "the spec" | Read active track's spec.md |
|
|
74
|
+
|
|
75
|
+
## Tracks
|
|
76
|
+
|
|
77
|
+
A **track** is a high-level unit of work (feature, bug fix, refactor). Each track contains:
|
|
78
|
+
- `spec.md` - Requirements and acceptance criteria
|
|
79
|
+
- `plan.md` - Phased task breakdown
|
|
80
|
+
- `metadata.json` - Status and timestamps
|
|
81
|
+
|
|
82
|
+
Located at: `draft/tracks/<track-id>/`
|
|
83
|
+
|
|
84
|
+
## Status Markers
|
|
85
|
+
|
|
86
|
+
Recognize and use these throughout plan.md:
|
|
87
|
+
- `[ ]` - Pending
|
|
88
|
+
- `[~]` - In Progress
|
|
89
|
+
- `[x]` - Completed
|
|
90
|
+
- `[!]` - Blocked
|
|
91
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Draft - Context-Driven Development
|
|
2
|
+
|
|
3
|
+
You are operating with the Draft methodology for Context-Driven Development.
|
|
4
|
+
|
|
5
|
+
**Measure twice, code once.**
|
|
6
|
+
|
|
7
|
+
## Core Workflow
|
|
8
|
+
|
|
9
|
+
**Context -> Spec & Plan -> Implement**
|
|
10
|
+
|
|
11
|
+
Every feature follows this lifecycle:
|
|
12
|
+
1. **Setup** - Initialize project context (once per project)
|
|
13
|
+
2. **New Track** - Create specification and plan
|
|
14
|
+
3. **Implement** - Execute tasks with TDD workflow
|
|
15
|
+
4. **Verify** - Confirm acceptance criteria met
|
|
16
|
+
|
|
17
|
+
## Project Context Files
|
|
18
|
+
|
|
19
|
+
When `draft/` exists in the project, always consider:
|
|
20
|
+
- `draft/.ai-context.md` - Source of truth for AI agents (dense codebase understanding)
|
|
21
|
+
- `draft/architecture.md` - Human-readable engineering guide (derived from .ai-context.md)
|
|
22
|
+
- `draft/product.md` - Product vision and goals
|
|
23
|
+
- `draft/tech-stack.md` - Technical constraints
|
|
24
|
+
- `draft/workflow.md` - TDD and commit preferences
|
|
25
|
+
- `draft/tracks.md` - Active work items
|
|
26
|
+
|
|
27
|
+
## Available Commands
|
|
28
|
+
|
|
29
|
+
| Command | Purpose |
|
|
30
|
+
|---------|---------|
|
|
31
|
+
| `draft` | Show overview and available commands |
|
|
32
|
+
| `draft init` | Initialize project (run once) |
|
|
33
|
+
| `draft index [--init-missing]` | Aggregate monorepo service contexts |
|
|
34
|
+
| `draft new-track <description>` | Create feature/bug track |
|
|
35
|
+
| `draft decompose` | Module decomposition with dependency mapping |
|
|
36
|
+
| `draft implement` | Execute tasks from plan |
|
|
37
|
+
| `draft coverage` | Code coverage report (target 95%+) |
|
|
38
|
+
| `draft bughunt [--track <id>]` | Systematic bug discovery |
|
|
39
|
+
| `draft review [--track <id>]` | Three-stage code review |
|
|
40
|
+
| `draft deep-review [module]` | Exhaustive production-grade module audit |
|
|
41
|
+
| `draft learn [promote\|migrate]` | Discover coding patterns, update guardrails |
|
|
42
|
+
| `draft adr [title]` | Architecture Decision Records |
|
|
43
|
+
| `draft status` | Show progress overview |
|
|
44
|
+
| `draft revert` | Git-aware rollback |
|
|
45
|
+
| `draft change <description>` | Handle mid-track requirement changes |
|
|
46
|
+
| `draft jira-preview [track-id]` | Generate jira-export.md for review |
|
|
47
|
+
| `draft jira-create [track-id]` | Create Jira issues from export via MCP |
|
|
48
|
+
|
|
49
|
+
## Intent Mapping
|
|
50
|
+
|
|
51
|
+
Recognize these natural language patterns:
|
|
52
|
+
|
|
53
|
+
| User Says | Action |
|
|
54
|
+
|-----------|--------|
|
|
55
|
+
| "set up the project" | Run init |
|
|
56
|
+
| "index services", "aggregate context" | Run index |
|
|
57
|
+
| "new feature", "add X" | Create new track |
|
|
58
|
+
| "break into modules", "decompose" | Run decompose |
|
|
59
|
+
| "start implementing" | Execute implement |
|
|
60
|
+
| "check coverage", "test coverage" | Run coverage |
|
|
61
|
+
| "hunt bugs", "find bugs" | Run bug hunt |
|
|
62
|
+
| "review code", "review track", "check quality" | Run review |
|
|
63
|
+
| "deep review", "production audit", "module audit" | Run deep-review |
|
|
64
|
+
| "learn patterns", "update guardrails", "discover conventions" | Run learn |
|
|
65
|
+
| "what's the status" | Show status |
|
|
66
|
+
| "undo", "revert" | Run revert |
|
|
67
|
+
| "requirements changed", "scope changed", "update the spec" | Run change |
|
|
68
|
+
| "preview jira", "export to jira" | Run jira-preview |
|
|
69
|
+
| "create jira", "push to jira" | Run jira-create |
|
|
70
|
+
| "document decision", "create ADR" | Create architecture decision record |
|
|
71
|
+
| "help", "what commands" | Show draft overview |
|
|
72
|
+
| "the plan" | Read active track's plan.md |
|
|
73
|
+
| "the spec" | Read active track's spec.md |
|
|
74
|
+
|
|
75
|
+
## Tracks
|
|
76
|
+
|
|
77
|
+
A **track** is a high-level unit of work (feature, bug fix, refactor). Each track contains:
|
|
78
|
+
- `spec.md` - Requirements and acceptance criteria
|
|
79
|
+
- `plan.md` - Phased task breakdown
|
|
80
|
+
- `metadata.json` - Status and timestamps
|
|
81
|
+
|
|
82
|
+
Located at: `draft/tracks/<track-id>/`
|
|
83
|
+
|
|
84
|
+
## Status Markers
|
|
85
|
+
|
|
86
|
+
Recognize and use these throughout plan.md:
|
|
87
|
+
- `[ ]` - Pending
|
|
88
|
+
- `[~]` - In Progress
|
|
89
|
+
- `[x]` - Completed
|
|
90
|
+
- `[!]` - Blocked
|
|
91
|
+
|