@drafthq/draft 3.5.3 → 3.7.1
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/README.md +28 -49
- package/bin/README.md +47 -1
- package/cli/src/hosts/cursor.js +3 -0
- package/cli/src/installer.js +8 -4
- package/cli/src/lib/cursor-registry.js +10 -0
- package/cli/src/lib/fsx.js +3 -0
- package/cli/src/lib/marker.js +8 -3
- package/core/agents/architect.md +21 -9
- package/core/agents/debugger.md +5 -0
- package/core/agents/ops.md +7 -2
- package/core/agents/planner.md +7 -0
- package/core/agents/rca.md +14 -3
- package/core/agents/reviewer.md +1 -0
- package/core/agents/writer.md +6 -0
- package/core/knowledge-base.md +22 -3
- package/core/methodology.md +30 -5
- package/core/shared/condensation.md +28 -18
- package/core/shared/context-verify.md +3 -1
- package/core/shared/cross-skill-dispatch.md +7 -3
- package/core/shared/draft-context-loading.md +3 -0
- package/core/shared/git-report-metadata.md +2 -1
- package/core/shared/graph-query.md +24 -26
- package/core/shared/graph-usage-report.md +1 -1
- package/core/shared/jira-sync.md +10 -6
- package/core/shared/okf-retrieval.md +1 -1
- package/core/shared/parallel-analysis.md +14 -7
- package/core/shared/pattern-learning.md +2 -0
- package/core/shared/template-contract.md +1 -1
- package/core/shared/tool-resolver.md +20 -15
- package/core/shared/vcs-commands.md +5 -2
- package/core/templates/ai-context.md +3 -2
- package/core/templates/ai-profile.md +7 -0
- package/core/templates/architecture.md +6 -2
- package/core/templates/discovery.md +1 -1
- package/core/templates/guardrails.md +9 -0
- package/core/templates/hld.md +5 -4
- package/core/templates/intake-questions.md +45 -0
- package/core/templates/jira.md +11 -2
- package/core/templates/lld.md +8 -5
- package/core/templates/okf/concept.md +0 -1
- package/core/templates/plan.md +1 -1
- package/core/templates/product.md +11 -2
- package/core/templates/rca.md +6 -0
- package/core/templates/service-index.md +1 -0
- package/core/templates/spec.md +15 -0
- package/core/templates/tech-stack.md +12 -0
- package/core/templates/workflow.md +20 -0
- package/integrations/agents/AGENTS.md +1449 -817
- package/integrations/copilot/.github/copilot-instructions.md +1449 -817
- package/package.json +1 -1
- package/scripts/fetch-memory-engine.sh +25 -7
- package/scripts/lib.sh +90 -6
- package/scripts/tools/_graph_queries.sh +22 -8
- package/scripts/tools/_lib.sh +81 -11
- package/scripts/tools/adr-index.sh +1 -1
- package/scripts/tools/check-repo-size.sh +125 -0
- package/scripts/tools/check-skill-line-caps.sh +3 -4
- package/scripts/tools/check-template-noop.sh +0 -1
- package/scripts/tools/check-track-hygiene.sh +41 -21
- package/scripts/tools/classify-files.sh +3 -3
- package/scripts/tools/cycle-detect.sh +18 -17
- package/scripts/tools/detect-test-framework.sh +1 -1
- package/scripts/tools/emit-skill-metrics.sh +7 -2
- package/scripts/tools/fix-whitespace.sh +3 -0
- package/scripts/tools/freshness-check.sh +2 -2
- package/scripts/tools/git-metadata.sh +12 -6
- package/scripts/tools/graph-arch.sh +5 -11
- package/scripts/tools/graph-callers.sh +10 -15
- package/scripts/tools/graph-deps.sh +3 -10
- package/scripts/tools/graph-errors.sh +4 -11
- package/scripts/tools/graph-hierarchy.sh +4 -11
- package/scripts/tools/graph-impact.sh +21 -19
- package/scripts/tools/graph-init.sh +13 -9
- package/scripts/tools/graph-preflight.sh +4 -1
- package/scripts/tools/graph-query.sh +74 -18
- package/scripts/tools/graph-risk.sh +3 -10
- package/scripts/tools/graph-search.sh +4 -11
- package/scripts/tools/graph-snapshot.sh +38 -9
- package/scripts/tools/graph-snippet.sh +3 -10
- package/scripts/tools/graph-tests.sh +3 -10
- package/scripts/tools/graph-traces.sh +3 -10
- package/scripts/tools/hotspot-rank.sh +6 -12
- package/scripts/tools/install-smoke-test.sh +223 -0
- package/scripts/tools/mermaid-from-graph.sh +5 -11
- package/scripts/tools/migrate-track-frontmatter.sh +11 -10
- package/scripts/tools/okf-coverage-check.sh +8 -7
- package/scripts/tools/okf-emit-catalog.sh +256 -0
- package/scripts/tools/okf-fix-links.sh +251 -0
- package/scripts/tools/okf-plan-concepts.sh +242 -14
- package/scripts/tools/okf-render-views.sh +63 -21
- package/scripts/tools/okf-validate-all.sh +20 -9
- package/scripts/tools/okf-validate-quality.sh +15 -10
- package/scripts/tools/okf-validate.sh +20 -6
- package/scripts/tools/parse-git-log.sh +23 -5
- package/scripts/tools/parse-reports.sh +1 -1
- package/scripts/tools/render-track.sh +1 -1
- package/scripts/tools/resolve-tools.sh +24 -8
- package/scripts/tools/run-coverage.sh +1 -1
- package/scripts/tools/scan-markers.sh +4 -4
- package/scripts/tools/validate-frontmatter.sh +2 -2
- package/scripts/tools/verify-citations.sh +3 -4
- package/scripts/tools/verify-doc-anchors.sh +14 -34
- package/scripts/tools/verify-graph-binary.sh +15 -5
- package/skills/GRAPH.md +21 -10
- package/skills/adr/SKILL.md +25 -7
- package/skills/assist-review/SKILL.md +2 -1
- package/skills/bughunt/SKILL.md +55 -12
- package/skills/bughunt/references/regression-tests.md +14 -4
- package/skills/change/SKILL.md +19 -9
- package/skills/coverage/SKILL.md +28 -12
- package/skills/debug/SKILL.md +13 -3
- package/skills/decompose/SKILL.md +42 -12
- package/skills/deep-review/SKILL.md +19 -6
- package/skills/deploy-checklist/SKILL.md +10 -3
- package/skills/documentation/SKILL.md +12 -1
- package/skills/draft/SKILL.md +40 -29
- package/skills/draft/context-files.md +8 -1
- package/skills/draft/quality-guide.md +10 -2
- package/skills/graph/SKILL.md +2 -2
- package/skills/impact/SKILL.md +4 -2
- package/skills/implement/SKILL.md +62 -20
- package/skills/incident-response/SKILL.md +5 -2
- package/skills/init/SKILL.md +112 -30
- package/skills/init/references/architecture-spec.md +32 -8
- package/skills/init/references/okf-emitter.md +42 -78
- package/skills/jira/SKILL.md +33 -13
- package/skills/jira/references/review.md +61 -19
- package/skills/learn/SKILL.md +30 -7
- package/skills/new-track/SKILL.md +73 -18
- package/skills/quick-review/SKILL.md +8 -3
- package/skills/revert/SKILL.md +11 -5
- package/skills/review/SKILL.md +126 -27
- package/skills/review/references/zero-setup-mode.md +117 -0
- package/skills/standup/SKILL.md +10 -2
- package/skills/status/SKILL.md +7 -7
- package/skills/tech-debt/SKILL.md +9 -3
- package/skills/testing-strategy/SKILL.md +10 -2
- package/skills/tour/SKILL.md +2 -1
- package/skills/upload/SKILL.md +4 -3
- package/core/templates/track-architecture.md +0 -311
|
@@ -43,6 +43,7 @@ The following services have not been initialized with `/draft:init`:
|
|
|
43
43
|
- `[path/to/service]/`
|
|
44
44
|
|
|
45
45
|
Initialize each one by running `/draft:init` inside its directory — it links the module's graph up to the root spine:
|
|
46
|
+
|
|
46
47
|
```bash
|
|
47
48
|
cd [path/to/service] && /draft:init
|
|
48
49
|
```
|
package/core/templates/spec.md
CHANGED
|
@@ -45,6 +45,7 @@ approvers:
|
|
|
45
45
|
> is rendered from `metadata.json:status`; never edit it inline.
|
|
46
46
|
|
|
47
47
|
## Context References
|
|
48
|
+
|
|
48
49
|
- **Product:** `draft/product.md` — [pending]
|
|
49
50
|
- **Tech Stack:** `draft/tech-stack.md` — [pending]
|
|
50
51
|
- **Architecture:** `draft/.ai-context.md` — [pending]
|
|
@@ -59,16 +60,21 @@ approvers:
|
|
|
59
60
|
> `<!-- VERIFIER:IGNORE END -->` so they don't fail the verifier.
|
|
60
61
|
|
|
61
62
|
## Problem Statement
|
|
63
|
+
|
|
62
64
|
[To be developed through intake conversation]
|
|
63
65
|
|
|
64
66
|
## Background & Why Now
|
|
67
|
+
|
|
65
68
|
[To be developed through intake conversation]
|
|
66
69
|
|
|
67
70
|
## Requirements
|
|
71
|
+
|
|
68
72
|
### Functional
|
|
73
|
+
|
|
69
74
|
[To be developed through intake conversation]
|
|
70
75
|
|
|
71
76
|
### Non-Functional
|
|
77
|
+
|
|
72
78
|
[To be developed through intake conversation]
|
|
73
79
|
|
|
74
80
|
## Acceptance Criteria
|
|
@@ -82,9 +88,11 @@ approvers:
|
|
|
82
88
|
| AC-2 | _TBD_ac_2_description_ | _TBD_ac_2_test_id_ |
|
|
83
89
|
|
|
84
90
|
## Non-Goals
|
|
91
|
+
|
|
85
92
|
[To be developed through intake conversation]
|
|
86
93
|
|
|
87
94
|
## Technical Approach
|
|
95
|
+
|
|
88
96
|
[To be developed through intake conversation]
|
|
89
97
|
|
|
90
98
|
## Eligibility / Cap Policy <!-- OPTIONAL -->
|
|
@@ -118,6 +126,7 @@ approvers:
|
|
|
118
126
|
| QA | _TBD_approver_qa_ | Test plan review | [ ] |
|
|
119
127
|
|
|
120
128
|
### Approval Gates
|
|
129
|
+
|
|
121
130
|
- [ ] Spec approved by Product Owner
|
|
122
131
|
- [ ] Architecture reviewed by Tech Lead
|
|
123
132
|
- [ ] Security review completed (if touching auth, data, or external APIs)
|
|
@@ -138,29 +147,35 @@ approvers:
|
|
|
138
147
|
<!-- Define rollout approach for production delivery -->
|
|
139
148
|
|
|
140
149
|
### Rollout Phases
|
|
150
|
+
|
|
141
151
|
1. **Canary** (1-5% traffic) — Validate core flows, monitor error rates
|
|
142
152
|
2. **Limited GA** (25%) — Expand to subset, watch performance metrics
|
|
143
153
|
3. **Full GA** (100%) — Complete rollout
|
|
144
154
|
|
|
145
155
|
### Feature Flags
|
|
156
|
+
|
|
146
157
|
- Flag name: `[feature_flag_name]`
|
|
147
158
|
- Default: `off`
|
|
148
159
|
- Kill switch: [yes/no]
|
|
149
160
|
|
|
150
161
|
### Rollback Plan
|
|
162
|
+
|
|
151
163
|
- Trigger: [e.g., error rate >1%, latency >500ms p95]
|
|
152
164
|
- Process: [e.g., disable feature flag, revert deployment]
|
|
153
165
|
- Data rollback: [e.g., migration revert script, N/A]
|
|
154
166
|
|
|
155
167
|
### Monitoring
|
|
168
|
+
|
|
156
169
|
- Dashboard: [link or name]
|
|
157
170
|
- Alerts: [e.g., PagerDuty rule for error rate spike]
|
|
158
171
|
- Key metrics: [e.g., error rate, latency, throughput]
|
|
159
172
|
|
|
160
173
|
## Open Questions
|
|
174
|
+
|
|
161
175
|
[Tracked during conversation]
|
|
162
176
|
|
|
163
177
|
## Conversation Log
|
|
178
|
+
>
|
|
164
179
|
> Key decisions and reasoning captured during intake.
|
|
165
180
|
|
|
166
181
|
[Conversation summary will be added here]
|
|
@@ -29,12 +29,14 @@ generated_at: "{ISO_TIMESTAMP}"
|
|
|
29
29
|
## Frameworks & Libraries
|
|
30
30
|
|
|
31
31
|
### Core
|
|
32
|
+
|
|
32
33
|
| Name | Version | Purpose |
|
|
33
34
|
|------|---------|---------|
|
|
34
35
|
| [Framework] | [Version] | [Purpose] |
|
|
35
36
|
| [Library] | [Version] | [Purpose] |
|
|
36
37
|
|
|
37
38
|
### Development
|
|
39
|
+
|
|
38
40
|
| Name | Version | Purpose |
|
|
39
41
|
|------|---------|---------|
|
|
40
42
|
| [Tool] | [Version] | [Purpose] |
|
|
@@ -64,14 +66,17 @@ generated_at: "{ISO_TIMESTAMP}"
|
|
|
64
66
|
## Build & Deploy
|
|
65
67
|
|
|
66
68
|
### Build
|
|
69
|
+
|
|
67
70
|
- **Tool**: [Webpack/Vite/esbuild/etc]
|
|
68
71
|
- **Output**: [dist/build/etc]
|
|
69
72
|
|
|
70
73
|
### CI/CD
|
|
74
|
+
|
|
71
75
|
- **Platform**: [GitHub Actions/CircleCI/etc]
|
|
72
76
|
- **Triggers**: [on push, PR, etc]
|
|
73
77
|
|
|
74
78
|
### Deployment
|
|
79
|
+
|
|
75
80
|
- **Target**: [Vercel/AWS/GCP/etc]
|
|
76
81
|
- **Environments**: [dev, staging, prod]
|
|
77
82
|
|
|
@@ -80,18 +85,22 @@ generated_at: "{ISO_TIMESTAMP}"
|
|
|
80
85
|
## Code Patterns
|
|
81
86
|
|
|
82
87
|
### Architecture
|
|
88
|
+
|
|
83
89
|
- **Pattern**: [Clean Architecture/MVC/Hexagonal/etc]
|
|
84
90
|
- **Rationale**: [Why this pattern]
|
|
85
91
|
|
|
86
92
|
### State Management
|
|
93
|
+
|
|
87
94
|
- **Approach**: [Redux/Zustand/Context/etc]
|
|
88
95
|
- **Rationale**: [Why this approach]
|
|
89
96
|
|
|
90
97
|
### Error Handling
|
|
98
|
+
|
|
91
99
|
- **Strategy**: [Centralized/per-module/etc]
|
|
92
100
|
- **Logging**: [Tool/service]
|
|
93
101
|
|
|
94
102
|
### API Design
|
|
103
|
+
|
|
95
104
|
- **Style**: [REST/GraphQL/gRPC]
|
|
96
105
|
- **Conventions**: [Naming, versioning]
|
|
97
106
|
|
|
@@ -140,15 +149,18 @@ graph TD
|
|
|
140
149
|
## Code Style
|
|
141
150
|
|
|
142
151
|
### Linting
|
|
152
|
+
|
|
143
153
|
- **Tool**: [ESLint/Prettier/etc]
|
|
144
154
|
- **Config**: [.eslintrc / prettier.config.js]
|
|
145
155
|
|
|
146
156
|
### Formatting
|
|
157
|
+
|
|
147
158
|
- **Indentation**: [2 spaces / 4 spaces / tabs]
|
|
148
159
|
- **Line Length**: [80 / 100 / 120]
|
|
149
160
|
- **Quotes**: [single / double]
|
|
150
161
|
|
|
151
162
|
### Naming Conventions
|
|
163
|
+
|
|
152
164
|
- **Files**: [kebab-case / camelCase / PascalCase]
|
|
153
165
|
- **Functions**: [camelCase]
|
|
154
166
|
- **Classes**: [PascalCase]
|
|
@@ -31,6 +31,7 @@ synced_to_commit: "{FULL_SHA}"
|
|
|
31
31
|
**Mode:** [strict | flexible | none]
|
|
32
32
|
|
|
33
33
|
**Coverage Target:**
|
|
34
|
+
|
|
34
35
|
```yaml
|
|
35
36
|
coverage_target: 95 # Minimum coverage percentage (default: 95%)
|
|
36
37
|
```
|
|
@@ -40,11 +41,13 @@ coverage_target: 95 # Minimum coverage percentage (default: 95%)
|
|
|
40
41
|
**Iron Law:** No production code without a failing test first.
|
|
41
42
|
|
|
42
43
|
The Cycle:
|
|
44
|
+
|
|
43
45
|
1. **RED** - Write failing test, run it, VERIFY it FAILS
|
|
44
46
|
2. **GREEN** - Write minimum code, run test, VERIFY it PASSES
|
|
45
47
|
3. **REFACTOR** - Clean up, keep tests green throughout
|
|
46
48
|
|
|
47
49
|
**Red Flags - Delete and Restart if:**
|
|
50
|
+
|
|
48
51
|
- Code written before test exists
|
|
49
52
|
- Test passes immediately (testing wrong thing or wrong code)
|
|
50
53
|
- "Just this once" rationalization
|
|
@@ -52,17 +55,20 @@ The Cycle:
|
|
|
52
55
|
- Running test mentally instead of actually
|
|
53
56
|
|
|
54
57
|
**Checklist:**
|
|
58
|
+
|
|
55
59
|
- [ ] Test written and committed BEFORE implementation
|
|
56
60
|
- [ ] Test fails with expected failure (not syntax error)
|
|
57
61
|
- [ ] Minimum code to pass (no extra features)
|
|
58
62
|
- [ ] Refactor preserves green state
|
|
59
63
|
|
|
60
64
|
### Flexible TDD
|
|
65
|
+
|
|
61
66
|
- [ ] Tests required but can be written after implementation
|
|
62
67
|
- [ ] All code must have tests before marking complete
|
|
63
68
|
- [ ] Refactoring encouraged
|
|
64
69
|
|
|
65
70
|
### No TDD
|
|
71
|
+
|
|
66
72
|
- [ ] Tests optional
|
|
67
73
|
- [ ] Manual verification acceptable
|
|
68
74
|
|
|
@@ -73,6 +79,7 @@ The Cycle:
|
|
|
73
79
|
**Format:** `type(scope): description`
|
|
74
80
|
|
|
75
81
|
### Types
|
|
82
|
+
|
|
76
83
|
| Type | Use For |
|
|
77
84
|
|------|---------|
|
|
78
85
|
| `feat` | New feature |
|
|
@@ -84,10 +91,12 @@ The Cycle:
|
|
|
84
91
|
| `chore` | Build, tooling, dependencies |
|
|
85
92
|
|
|
86
93
|
### Scope
|
|
94
|
+
|
|
87
95
|
- Use track ID for Draft work: `feat(add-auth): ...`
|
|
88
96
|
- Use component name otherwise: `fix(api): ...`
|
|
89
97
|
|
|
90
98
|
### Commit Frequency
|
|
99
|
+
|
|
91
100
|
- [ ] After each task completion
|
|
92
101
|
- [ ] At phase boundaries
|
|
93
102
|
- [ ] End of session
|
|
@@ -97,6 +106,7 @@ The Cycle:
|
|
|
97
106
|
## Code Review
|
|
98
107
|
|
|
99
108
|
### Self-Review Checklist
|
|
109
|
+
|
|
100
110
|
- [ ] Code follows project style guide
|
|
101
111
|
- [ ] Tests pass locally
|
|
102
112
|
- [ ] No console.log or debug statements
|
|
@@ -104,6 +114,7 @@ The Cycle:
|
|
|
104
114
|
- [ ] Edge cases considered
|
|
105
115
|
|
|
106
116
|
### Before Marking Task Complete
|
|
117
|
+
|
|
107
118
|
- [ ] Run linter
|
|
108
119
|
- [ ] Run tests
|
|
109
120
|
- [ ] Review diff
|
|
@@ -126,11 +137,13 @@ Do not proceed to next phase until verification passes.
|
|
|
126
137
|
## Review Settings
|
|
127
138
|
|
|
128
139
|
### Auto-Review
|
|
140
|
+
|
|
129
141
|
- [ ] Auto-review at track completion
|
|
130
142
|
|
|
131
143
|
When enabled, runs `/draft:review track <id>` automatically when `/draft:implement` completes a track.
|
|
132
144
|
|
|
133
145
|
### Blocking Behavior
|
|
146
|
+
|
|
134
147
|
- [ ] Block on review failures
|
|
135
148
|
|
|
136
149
|
When enabled, halt track completion if critical (✗) issues found. Requires fixes before marking complete.
|
|
@@ -138,6 +151,7 @@ When enabled, halt track completion if critical (✗) issues found. Requires fix
|
|
|
138
151
|
When disabled (default), review failures produce warnings only. Issues documented in `draft/tracks/<id>/review-report.md`.
|
|
139
152
|
|
|
140
153
|
### Review Scope (Stage 1 Automation)
|
|
154
|
+
|
|
141
155
|
- [x] Architecture conformance
|
|
142
156
|
- [x] Dead code detection
|
|
143
157
|
- [x] Dependency cycle detection
|
|
@@ -153,17 +167,21 @@ Uncheck categories to skip during validation phase of review. All enabled by def
|
|
|
153
167
|
## Session Management
|
|
154
168
|
|
|
155
169
|
### Starting a Session
|
|
170
|
+
|
|
156
171
|
1. Run `/draft:status` to see current state
|
|
157
172
|
2. Read active track's spec.md and plan.md
|
|
158
173
|
3. Find current task (marked `[~]` or first `[ ]`)
|
|
159
174
|
|
|
160
175
|
### Ending a Session
|
|
176
|
+
|
|
161
177
|
1. Commit any pending changes
|
|
162
178
|
2. Update plan.md with progress
|
|
163
179
|
3. Add notes for next session if mid-task
|
|
164
180
|
|
|
165
181
|
### Context Handoff
|
|
182
|
+
|
|
166
183
|
If task exceeds 5 iterations:
|
|
184
|
+
|
|
167
185
|
1. Document current state in plan.md
|
|
168
186
|
2. Note any discoveries or blockers
|
|
169
187
|
3. Suggest resumption approach
|
|
@@ -173,9 +191,11 @@ If task exceeds 5 iterations:
|
|
|
173
191
|
## Toolchain
|
|
174
192
|
|
|
175
193
|
### VCS
|
|
194
|
+
|
|
176
195
|
- [x] git + GitHub Pull Requests
|
|
177
196
|
|
|
178
197
|
### MCP Auto-Connect (optional)
|
|
198
|
+
|
|
179
199
|
- [ ] Jira MCP — for ticket linking via `/draft:jira` (preview / create / review)
|
|
180
200
|
- [ ] Confluence MCP — for design-doc and runbook lookups
|
|
181
201
|
|