@drafthq/draft 3.2.1 → 3.3.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 (31) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.cursor-plugin/plugin.json +28 -0
  4. package/README.md +2 -2
  5. package/cli/src/hosts/cursor.js +35 -5
  6. package/cli/src/installer.js +12 -0
  7. package/cli/src/lib/cursor-registry.js +122 -0
  8. package/cli/src/lib/plugin-manifest.js +20 -0
  9. package/core/methodology.md +1 -1
  10. package/core/templates/okf/ai-context-index.md +48 -0
  11. package/core/templates/okf/concept.md +54 -0
  12. package/core/templates/okf/index.md +40 -0
  13. package/core/templates/okf/section-index.md +25 -0
  14. package/integrations/agents/AGENTS.md +447 -1
  15. package/integrations/copilot/.github/copilot-instructions.md +447 -1
  16. package/package.json +3 -2
  17. package/scripts/lib.sh +9 -0
  18. package/scripts/tools/graph-preflight.sh +259 -0
  19. package/scripts/tools/okf-render-views.sh +373 -0
  20. package/scripts/tools/okf-validate.sh +204 -0
  21. package/skills/init/SKILL.md +19 -0
  22. package/skills/init/references/okf-emitter.md +223 -0
  23. package/integrations/copilot/.github/copilot-instructions.md.7iDz8X +0 -91
  24. package/integrations/copilot/.github/copilot-instructions.md.DoBdtd +0 -91
  25. package/integrations/copilot/.github/copilot-instructions.md.McGoBW +0 -122
  26. package/integrations/copilot/.github/copilot-instructions.md.VsPyLB +0 -91
  27. package/integrations/copilot/.github/copilot-instructions.md.XAVr7D +0 -91
  28. package/integrations/copilot/.github/copilot-instructions.md.YoFVFa +0 -91
  29. package/integrations/copilot/.github/copilot-instructions.md.a9DeW0 +0 -91
  30. package/integrations/copilot/.github/copilot-instructions.md.oxQs3B +0 -91
  31. package/integrations/copilot/.github/copilot-instructions.md.ww33Ly +0 -91
@@ -1,122 +0,0 @@
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/.ai-profile.md` - Ultra-compact profile (always loaded, 20-50 lines)
22
- - `draft/architecture.md` - Human-readable engineering guide (source of truth)
23
- - `draft/product.md` - Product vision and goals
24
- - `draft/tech-stack.md` - Technical constraints
25
- - `draft/workflow.md` - TDD and commit preferences
26
- - `draft/tracks.md` - Active work items
27
- - `draft/guardrails.md` - Hard rules and learned patterns
28
-
29
- ## Available Commands
30
-
31
- | Command | Purpose |
32
- |---------|---------|
33
- | `draft` | Show overview and available commands |
34
- | `draft init` | Initialize project (run once) |
35
- | `draft index [--init-missing]` | Aggregate monorepo service contexts |
36
- | `draft new-track <description>` | Create feature/bug track |
37
- | `draft decompose` | Module decomposition with dependency mapping |
38
- | `draft implement` | Execute tasks from plan |
39
- | `draft coverage` | Code coverage report (target 95%+) |
40
- | `draft deploy-checklist [track <id>]` | Pre-deployment verification checklist |
41
- | `draft bughunt [--track <id>]` | Systematic bug discovery |
42
- | `draft review [--track <id>]` | Three-stage code review |
43
- | `draft quick-review [file|pr <number>]` | Lightweight 4-dimension review |
44
- | `draft deep-review [module]` | Exhaustive production-grade module audit |
45
- | `draft testing-strategy [track <id>|path]` | Design test strategy with coverage targets |
46
- | `draft learn [promote\|migrate]` | Discover coding patterns, update guardrails |
47
- | `draft adr [title]` | Architecture Decision Records |
48
- | `draft debug [description|track <id>]` | Structured debugging session |
49
- | `draft standup [date|week|save]` | Generate standup summary |
50
- | `draft tech-debt [path|track <id>]` | Identify and prioritize tech debt |
51
- | `draft incident-response [new|update|postmortem]` | Incident management lifecycle |
52
- | `draft documentation [readme|runbook|api|onboarding]` | Technical documentation |
53
- | `draft status` | Show progress overview |
54
- | `draft revert` | Git-aware rollback |
55
- | `draft change <description>` | Handle mid-track requirement changes |
56
- | `draft jira-preview [track-id]` | Generate jira-export.md for review |
57
- | `draft jira-create [track-id]` | Create Jira issues from export via MCP |
58
- | `draft tour` | Interactive onboarding tour |
59
- | `draft impact` | Telemetry and analytics insights |
60
- | `draft assist-review` | Assist human reviewers with architectural risk audit |
61
-
62
- ## Intent Mapping
63
-
64
- Recognize these natural language patterns:
65
-
66
- | User Says | Action |
67
- |-----------|--------|
68
- | "set up the project" | Run init |
69
- | "index services", "aggregate context" | Run index |
70
- | "new feature", "add X" | Create new track |
71
- | "break into modules", "decompose" | Run decompose |
72
- | "start implementing" | Execute implement |
73
- | "check coverage", "test coverage" | Run coverage |
74
- | "deploy checklist", "pre-deploy check" | Run deploy-checklist |
75
- | "hunt bugs", "find bugs" | Run bughunt |
76
- | "review code", "review track", "check quality" | Run review |
77
- | "quick review", "lightweight review" | Run quick-review |
78
- | "deep review", "production audit", "module audit" | Run deep-review |
79
- | "test strategy", "plan tests" | Run testing-strategy |
80
- | "learn patterns", "update guardrails", "discover conventions" | Run learn |
81
- | "document decision", "create ADR" | Create architecture decision record |
82
- | "debug bug", "investigate issue" | Run debug |
83
- | "standup", "daily summary" | Run standup |
84
- | "tech debt", "identify debt" | Run tech-debt |
85
- | "incident", "outage", "postmortem" | Run incident-response |
86
- | "write docs", "document" | Run documentation |
87
- | "what's the status" | Show status |
88
- | "undo", "revert" | Run revert |
89
- | "requirements changed", "scope changed", "update the spec" | Run change |
90
- | "preview jira", "export to jira" | Run jira-preview |
91
- | "create jira", "push to jira" | Run jira-create |
92
- | "tour", "onboard me" | Run tour |
93
- | "impact", "analytics" | Run impact |
94
- | "assist review", "help reviewer" | Run assist-review |
95
- | "help", "what commands" | Show draft overview |
96
- | "the plan" | Read active track's plan.md |
97
- | "the spec" | Read active track's spec.md |
98
-
99
- ## Tracks
100
-
101
- A **track** is a high-level unit of work (feature, bug fix, refactor). Each track contains:
102
- - `spec.md` - Requirements and acceptance criteria
103
- - `plan.md` - Phased task breakdown
104
- - `metadata.json` - Status and timestamps
105
-
106
- Located at: `draft/tracks/<track-id>/`
107
-
108
- ## Status Markers
109
-
110
- Recognize and use these throughout plan.md:
111
- - `[ ]` - Pending
112
- - `[~]` - In Progress
113
- - `[x]` - Completed
114
- - `[!]` - Blocked
115
-
116
-
117
- ---
118
-
119
- ## Init Command
120
-
121
- When user says "init draft" or "draft init [refresh]":
122
-
@@ -1,91 +0,0 @@
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
-
@@ -1,91 +0,0 @@
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
-
@@ -1,91 +0,0 @@
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
-
@@ -1,91 +0,0 @@
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
-
@@ -1,91 +0,0 @@
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
-
@@ -1,91 +0,0 @@
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
-