specweave 0.6.8 → 0.7.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.
- package/.claude-plugin/README.md +1 -1
- package/CLAUDE.md +903 -99
- package/README.md +143 -207
- package/bin/specweave.js +67 -0
- package/dist/cli/commands/abandon.d.ts +13 -0
- package/dist/cli/commands/abandon.d.ts.map +1 -0
- package/dist/cli/commands/abandon.js +15 -0
- package/dist/cli/commands/abandon.js.map +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +90 -18
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/pause.d.ts +13 -0
- package/dist/cli/commands/pause.d.ts.map +1 -0
- package/dist/cli/commands/pause.js +15 -0
- package/dist/cli/commands/pause.js.map +1 -0
- package/dist/cli/commands/qa.d.ts +54 -0
- package/dist/cli/commands/qa.d.ts.map +1 -0
- package/dist/cli/commands/qa.js +98 -0
- package/dist/cli/commands/qa.js.map +1 -0
- package/dist/cli/commands/resume.d.ts +12 -0
- package/dist/cli/commands/resume.d.ts.map +1 -0
- package/dist/cli/commands/resume.js +14 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/status.d.ts +12 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +23 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
- package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/ado.js +223 -0
- package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
- package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/github.js +284 -0
- package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.js +270 -0
- package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
- package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/jira.js +265 -0
- package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
- package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/types.js +16 -0
- package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
- package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/utils.js +240 -0
- package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
- package/dist/core/increment/limits.d.ts +68 -0
- package/dist/core/increment/limits.d.ts.map +1 -0
- package/dist/core/increment/limits.js +224 -0
- package/dist/core/increment/limits.js.map +1 -0
- package/dist/core/increment/metadata-manager.d.ts +114 -0
- package/dist/core/increment/metadata-manager.d.ts.map +1 -0
- package/dist/core/increment/metadata-manager.js +320 -0
- package/dist/core/increment/metadata-manager.js.map +1 -0
- package/dist/core/increment/status-commands.d.ts +43 -0
- package/dist/core/increment/status-commands.d.ts.map +1 -0
- package/dist/core/increment/status-commands.js +277 -0
- package/dist/core/increment/status-commands.js.map +1 -0
- package/dist/core/plugin-detector.d.ts +1 -0
- package/dist/core/plugin-detector.d.ts.map +1 -1
- package/dist/core/plugin-detector.js +25 -0
- package/dist/core/plugin-detector.js.map +1 -1
- package/dist/core/qa/qa-runner.d.ts +16 -0
- package/dist/core/qa/qa-runner.d.ts.map +1 -0
- package/dist/core/qa/qa-runner.js +404 -0
- package/dist/core/qa/qa-runner.js.map +1 -0
- package/dist/core/qa/quality-gate-decider.d.ts +53 -0
- package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
- package/dist/core/qa/quality-gate-decider.js +268 -0
- package/dist/core/qa/quality-gate-decider.js.map +1 -0
- package/dist/core/qa/risk-calculator.d.ts +126 -0
- package/dist/core/qa/risk-calculator.d.ts.map +1 -0
- package/dist/core/qa/risk-calculator.js +247 -0
- package/dist/core/qa/risk-calculator.js.map +1 -0
- package/dist/core/qa/types.d.ts +315 -0
- package/dist/core/qa/types.d.ts.map +1 -0
- package/dist/core/qa/types.js +8 -0
- package/dist/core/qa/types.js.map +1 -0
- package/dist/core/types/config.d.ts +35 -0
- package/dist/core/types/config.d.ts.map +1 -1
- package/dist/core/types/config.js +16 -0
- package/dist/core/types/config.js.map +1 -1
- package/dist/core/types/increment-metadata.d.ts +120 -0
- package/dist/core/types/increment-metadata.d.ts.map +1 -0
- package/dist/core/types/increment-metadata.js +138 -0
- package/dist/core/types/increment-metadata.js.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.js +201 -0
- package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
- package/dist/hooks/lib/translate-file.d.ts +59 -0
- package/dist/hooks/lib/translate-file.d.ts.map +1 -0
- package/dist/hooks/lib/translate-file.js +350 -0
- package/dist/hooks/lib/translate-file.js.map +1 -0
- package/dist/locales/en/cli.json +3 -1
- package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
- package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
- package/dist/metrics/calculators/change-failure-rate.js +70 -0
- package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
- package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
- package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
- package/dist/metrics/calculators/deployment-frequency.js +61 -0
- package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
- package/dist/metrics/calculators/lead-time.d.ts +22 -0
- package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
- package/dist/metrics/calculators/lead-time.js +82 -0
- package/dist/metrics/calculators/lead-time.js.map +1 -0
- package/dist/metrics/calculators/mttr.d.ts +21 -0
- package/dist/metrics/calculators/mttr.d.ts.map +1 -0
- package/dist/metrics/calculators/mttr.js +60 -0
- package/dist/metrics/calculators/mttr.js.map +1 -0
- package/dist/metrics/dora-calculator.d.ts +24 -0
- package/dist/metrics/dora-calculator.d.ts.map +1 -0
- package/dist/metrics/dora-calculator.js +104 -0
- package/dist/metrics/dora-calculator.js.map +1 -0
- package/dist/metrics/github-client.d.ts +51 -0
- package/dist/metrics/github-client.d.ts.map +1 -0
- package/dist/metrics/github-client.js +133 -0
- package/dist/metrics/github-client.js.map +1 -0
- package/dist/metrics/types.d.ts +112 -0
- package/dist/metrics/types.d.ts.map +1 -0
- package/dist/metrics/types.js +10 -0
- package/dist/metrics/types.js.map +1 -0
- package/dist/metrics/utils/percentile.d.ts +25 -0
- package/dist/metrics/utils/percentile.d.ts.map +1 -0
- package/dist/metrics/utils/percentile.js +46 -0
- package/dist/metrics/utils/percentile.js.map +1 -0
- package/dist/metrics/utils/tier-classifier.d.ts +61 -0
- package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
- package/dist/metrics/utils/tier-classifier.js +100 -0
- package/dist/metrics/utils/tier-classifier.js.map +1 -0
- package/dist/utils/auth-helpers.d.ts +58 -0
- package/dist/utils/auth-helpers.d.ts.map +1 -0
- package/dist/utils/auth-helpers.js +108 -0
- package/dist/utils/auth-helpers.js.map +1 -0
- package/dist/utils/env-file.d.ts +88 -0
- package/dist/utils/env-file.d.ts.map +1 -0
- package/dist/utils/env-file.js +180 -0
- package/dist/utils/env-file.js.map +1 -0
- package/dist/utils/plugin-detection.d.ts +50 -0
- package/dist/utils/plugin-detection.d.ts.map +1 -0
- package/dist/utils/plugin-detection.js +229 -0
- package/dist/utils/plugin-detection.js.map +1 -0
- package/dist/utils/secrets-loader.d.ts +88 -0
- package/dist/utils/secrets-loader.d.ts.map +1 -0
- package/dist/utils/secrets-loader.js +271 -0
- package/dist/utils/secrets-loader.js.map +1 -0
- package/dist/utils/translation.d.ts +187 -0
- package/dist/utils/translation.d.ts.map +1 -0
- package/dist/utils/translation.js +414 -0
- package/dist/utils/translation.js.map +1 -0
- package/package.json +28 -44
- package/plugins/specweave/.claude-plugin/plugin.json +3 -3
- package/plugins/specweave/agents/pm/AGENT.md +330 -54
- package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
- package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
- package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
- package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
- package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
- package/plugins/specweave/commands/README.md +88 -163
- package/plugins/specweave/commands/specweave-abandon.md +314 -0
- package/plugins/specweave/commands/specweave-check-tests.md +546 -0
- package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -7
- package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
- package/plugins/specweave/commands/specweave-pause.md +189 -0
- package/plugins/specweave/commands/specweave-qa.md +245 -0
- package/plugins/specweave/commands/specweave-resume.md +216 -0
- package/plugins/specweave/commands/specweave-status.md +397 -0
- package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
- package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
- package/plugins/specweave/commands/specweave-update-scope.md +351 -0
- package/plugins/specweave/commands/specweave.md +21 -21
- package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
- package/plugins/specweave/hooks/post-task-completion.sh +141 -0
- package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
- package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
- package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
- package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
- package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
- package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
- package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
- package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
- package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
- package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
- package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
- package/plugins/specweave-ado/commands/close-workitem.md +52 -0
- package/plugins/specweave-ado/commands/create-workitem.md +53 -0
- package/plugins/specweave-ado/commands/status.md +53 -0
- package/plugins/specweave-ado/commands/sync.md +55 -0
- package/plugins/specweave-ado/lib/ado-client.ts +361 -0
- package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
- package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
- package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
- package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
- package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
- package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
- package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
- package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
- package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
- package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
- package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
- package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
- package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
- package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
- package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
- package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
- package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
- package/plugins/specweave-ml/commands/ml-explain.md +1 -1
- package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
- package/src/templates/AGENTS.md.template +331 -31
- package/src/templates/CLAUDE.md.template +36 -21
- package/src/templates/COMPLETION-REPORT.template.md +128 -0
- package/src/templates/README.md.template +17 -16
- package/src/templates/docs/README.md +11 -9
- package/src/templates/docs/spec-template.md +229 -0
- package/plugins/specweave/commands/inc.md +0 -85
- package/plugins/specweave/commands/list-increments.md +0 -180
- package/src/adapters/README.md +0 -275
- package/src/adapters/adapter-base.ts +0 -182
- package/src/adapters/adapter-interface.ts +0 -166
- package/src/adapters/adapter-loader.ts +0 -256
- package/src/adapters/agents-md-generator.ts +0 -228
- package/src/adapters/claude/README.md +0 -233
- package/src/adapters/claude/adapter.ts +0 -468
- package/src/adapters/claude-md-generator.ts +0 -377
- package/src/adapters/codex/README.md +0 -105
- package/src/adapters/codex/adapter.ts +0 -333
- package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
- package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
- package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
- package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
- package/src/adapters/cursor/README.md +0 -283
- package/src/adapters/cursor/adapter.ts +0 -451
- package/src/adapters/doc-generator.ts +0 -331
- package/src/adapters/gemini/README.md +0 -97
- package/src/adapters/gemini/adapter.ts +0 -298
- package/src/adapters/generic/README.md +0 -277
- package/src/adapters/generic/adapter.ts +0 -378
- package/src/adapters/registry.yaml +0 -187
- /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
- /package/plugins/specweave/commands/{done.md → specweave-done.md} +0 -0
- /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
- /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
- /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
- /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
- /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
- /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
- /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
- /package/plugins/specweave/commands/{validate.md → specweave-validate.md} +0 -0
|
@@ -107,6 +107,108 @@ As PM Agent, you are the **gatekeeper**. You MUST:
|
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
110
|
+
## 📊 Living Docs Spec Detection (Step 0B - Validation)
|
|
111
|
+
|
|
112
|
+
**AFTER** validating increment discipline, you SHOULD suggest living docs specs for large features.
|
|
113
|
+
|
|
114
|
+
### When to Suggest Living Docs Spec
|
|
115
|
+
|
|
116
|
+
**Decision Criteria** (suggest if ANY are true):
|
|
117
|
+
1. **Multi-increment feature** → User description implies 3+ increments
|
|
118
|
+
2. **Major module/product** → Keywords: "authentication system", "payment processing", "messaging platform"
|
|
119
|
+
3. **PM tool mention** → User says "Jira epic", "ADO feature", "GitHub milestone"
|
|
120
|
+
4. **Long timeline** → User says "3 months", "Q2 project", "multi-quarter"
|
|
121
|
+
|
|
122
|
+
### Detection Pattern
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
// Analyze user request for indicators
|
|
126
|
+
const userRequest = getUserInput();
|
|
127
|
+
|
|
128
|
+
const indicators = {
|
|
129
|
+
multiIncrement: /3\+ increments|multiple increments|span.*increments|phases/i.test(userRequest),
|
|
130
|
+
majorModule: /(auth.*system|payment.*process|messaging.*system|notification.*platform)/i.test(userRequest),
|
|
131
|
+
pmTool: /(jira.*epic|ado.*feature|github.*milestone)/i.test(userRequest),
|
|
132
|
+
longTimeline: /(3.*months|quarter|Q[1-4]|multi.*month)/i.test(userRequest)
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const shouldSuggestLivingDocs = Object.values(indicators).some(v => v);
|
|
136
|
+
|
|
137
|
+
if (shouldSuggestLivingDocs) {
|
|
138
|
+
console.log('💡 Large Feature Detected!');
|
|
139
|
+
console.log('');
|
|
140
|
+
console.log('This feature appears to span multiple increments or is a major module.');
|
|
141
|
+
console.log('');
|
|
142
|
+
console.log('📋 Recommendation: Create Living Docs Spec');
|
|
143
|
+
console.log('');
|
|
144
|
+
console.log('Benefits:');
|
|
145
|
+
console.log(' ✅ Permanent documentation (never deleted)');
|
|
146
|
+
console.log(' ✅ Links to PM tools (Jira epic, ADO feature, GitHub milestone)');
|
|
147
|
+
console.log(' ✅ Complete requirements in one place');
|
|
148
|
+
console.log(' ✅ Increment specs reference it (avoid duplication)');
|
|
149
|
+
console.log('');
|
|
150
|
+
console.log('Location: .specweave/docs/internal/specs/spec-####-{name}/spec.md');
|
|
151
|
+
console.log('');
|
|
152
|
+
console.log('💡 See FAQ: https://spec-weave.com/docs/faq#do-i-need-both-for-every-feature');
|
|
153
|
+
console.log('');
|
|
154
|
+
|
|
155
|
+
// Ask user if they want living docs spec
|
|
156
|
+
const createLivingDocs = await askUser('Create living docs spec? (Y/n)');
|
|
157
|
+
|
|
158
|
+
if (createLivingDocs !== 'n') {
|
|
159
|
+
// Proceed to create living docs spec (Step 1)
|
|
160
|
+
} else {
|
|
161
|
+
console.log('ℹ️ Creating increment spec only (can create living docs spec later if needed)');
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Examples
|
|
167
|
+
|
|
168
|
+
**Example 1: Multi-Increment Feature** (suggest living docs)
|
|
169
|
+
```
|
|
170
|
+
User: "I want to build authentication with basic login, OAuth, and 2FA"
|
|
171
|
+
PM: 💡 This spans 3+ increments → Suggest living docs spec
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Example 2: Small Feature** (skip living docs)
|
|
175
|
+
```
|
|
176
|
+
User: "Add dark mode toggle"
|
|
177
|
+
PM: ℹ️ Single increment → Only create increment spec
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Example 3: Major Module** (suggest living docs)
|
|
181
|
+
```
|
|
182
|
+
User: "Build payment processing system with Stripe"
|
|
183
|
+
PM: 💡 Major module → Suggest living docs spec
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Example 4: PM Tool Integration** (suggest living docs)
|
|
187
|
+
```
|
|
188
|
+
User: "This is Jira epic AUTH-123 for authentication"
|
|
189
|
+
PM: 💡 PM tool linked → Suggest living docs spec
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Decision Flowchart Reference
|
|
193
|
+
|
|
194
|
+
**For users who want guidance**, show this flowchart from the FAQ:
|
|
195
|
+
|
|
196
|
+
```mermaid
|
|
197
|
+
graph TD
|
|
198
|
+
A[New Feature Request] --> B{Will this span<br/>3+ increments?}
|
|
199
|
+
B -->|Yes| C[Create Living Docs Spec<br/>.specweave/docs/internal/specs/]
|
|
200
|
+
B -->|No| D{Is this a major<br/>module/product?}
|
|
201
|
+
D -->|Yes| C
|
|
202
|
+
D -->|No| E[Only Create Increment Spec<br/>.specweave/increments/]
|
|
203
|
+
|
|
204
|
+
C --> F[Create increment spec<br/>that references living docs]
|
|
205
|
+
E --> G[Increment spec<br/>is standalone]
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**FAQ Link**: https://spec-weave.com/docs/faq#do-i-need-both-for-every-feature
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
110
212
|
**Role**: Product Manager specialized in product strategy, requirements gathering, and feature prioritization.
|
|
111
213
|
|
|
112
214
|
## Purpose
|
|
@@ -122,54 +224,142 @@ The PM Agent acts as your AI Product Manager, helping you:
|
|
|
122
224
|
|
|
123
225
|
---
|
|
124
226
|
|
|
125
|
-
## ⚠️ CRITICAL:
|
|
227
|
+
## ⚠️ CRITICAL: Primary Output is Spec (Living Docs = Source of Truth!)
|
|
228
|
+
|
|
229
|
+
**PRIMARY**: Create Spec spec.md (living docs - permanent source of truth)
|
|
230
|
+
**OPTIONAL**: Update strategy docs if needed (high-level business context only)
|
|
231
|
+
**OPTIONAL**: Create increment spec.md (can duplicate Spec - temporary reference)
|
|
232
|
+
|
|
233
|
+
### Output 1: Spec (Living Docs - Source of Truth, Permanent) ✅
|
|
234
|
+
|
|
235
|
+
**Location**: `.specweave/docs/internal/specs/spec-{number}-{name}/spec.md`
|
|
236
|
+
|
|
237
|
+
**Purpose**: Complete, detailed requirements specification - PERMANENT source of truth
|
|
238
|
+
|
|
239
|
+
**This is the PRIMARY output - living documentation that**:
|
|
240
|
+
- Can be linked to Jira/ADO/GitHub Issues (bidirectional sync)
|
|
241
|
+
- Persists even after increment completes (permanent documentation)
|
|
242
|
+
- Contains ALL detailed requirements, user stories, AC
|
|
243
|
+
- Is the authoritative source for "WHAT was built and WHY"
|
|
244
|
+
|
|
245
|
+
**Format**:
|
|
246
|
+
```markdown
|
|
247
|
+
---
|
|
248
|
+
spec: {number}-{name}
|
|
249
|
+
title: "Feature Title"
|
|
250
|
+
status: proposed|accepted|implemented
|
|
251
|
+
created: 2025-11-04
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
# SPEC-{number}: [Feature Name]
|
|
255
|
+
|
|
256
|
+
## Overview
|
|
257
|
+
|
|
258
|
+
**Problem Statement**: What problem does this solve?
|
|
126
259
|
|
|
127
|
-
**
|
|
260
|
+
**Target Users**: Who benefits from this?
|
|
128
261
|
|
|
129
|
-
|
|
262
|
+
**Business Value**: Why build this now?
|
|
130
263
|
|
|
131
|
-
**
|
|
264
|
+
**Dependencies**: What must exist first?
|
|
132
265
|
|
|
133
|
-
|
|
266
|
+
## User Stories
|
|
134
267
|
|
|
135
|
-
|
|
268
|
+
### US-001: View Current Weather (Priority: P1)
|
|
269
|
+
|
|
270
|
+
**As a** user visiting the weather app
|
|
271
|
+
**I want** to see current weather conditions for my location
|
|
272
|
+
**So that** I can quickly know the current temperature and conditions
|
|
273
|
+
|
|
274
|
+
**Acceptance Criteria**:
|
|
275
|
+
- [ ] **AC-US1-01**: Current temperature displayed prominently
|
|
276
|
+
- **Priority**: P1
|
|
277
|
+
- **Testable**: Yes
|
|
278
|
+
|
|
279
|
+
(... continue with all user stories)
|
|
280
|
+
|
|
281
|
+
## Functional Requirements
|
|
282
|
+
|
|
283
|
+
- **FR-001**: Real-time data updates
|
|
284
|
+
- System shall fetch weather data every 5 minutes
|
|
285
|
+
- Priority: P1
|
|
286
|
+
|
|
287
|
+
(... continue with all FRs)
|
|
288
|
+
|
|
289
|
+
## Non-Functional Requirements
|
|
290
|
+
|
|
291
|
+
- **NFR-001**: Performance
|
|
292
|
+
- Page load time < 2 seconds
|
|
293
|
+
- Priority: P1
|
|
294
|
+
|
|
295
|
+
(... continue with all NFRs)
|
|
296
|
+
|
|
297
|
+
## Success Criteria
|
|
298
|
+
|
|
299
|
+
- **Metric 1**: 80%+ users view weather within 3 seconds
|
|
300
|
+
- **Metric 2**: < 5% error rate on data fetches
|
|
301
|
+
|
|
302
|
+
## Test Strategy
|
|
303
|
+
|
|
304
|
+
(High-level testing approach - details in increment tasks.md)
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
**Key Points**:
|
|
309
|
+
- This is the PERMANENT source of truth (persists after increment)
|
|
310
|
+
- Can be linked to project management tools (Jira, ADO, GitHub)
|
|
311
|
+
- No line limit (be thorough!)
|
|
312
|
+
- Technology-agnostic (WHAT and WHY, not HOW)
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
### Output 2: Strategy Docs (Optional, High-Level Only) ⚠️
|
|
317
|
+
|
|
318
|
+
**Location**: `.specweave/docs/internal/strategy/{module}/` (create only if NEW module)
|
|
319
|
+
|
|
320
|
+
**Purpose**: High-level product vision and business context (NOT detailed requirements)
|
|
321
|
+
|
|
322
|
+
**Files to Create** (only if new module):
|
|
136
323
|
```
|
|
137
324
|
.specweave/docs/internal/strategy/{module}/
|
|
138
|
-
├── overview.md #
|
|
139
|
-
|
|
140
|
-
├── user-stories.md # All user stories (US1, US2, US3, ...)
|
|
141
|
-
├── success-criteria.md # KPIs, metrics, business goals
|
|
142
|
-
└── roadmap.md # Product roadmap (if applicable)
|
|
325
|
+
├── overview.md # High-level product vision, market opportunity, personas
|
|
326
|
+
└── business-case.md # (optional) ROI, competitive analysis, market fit
|
|
143
327
|
```
|
|
144
328
|
|
|
145
|
-
|
|
329
|
+
**⛔ DO NOT CREATE**:
|
|
330
|
+
- ❌ requirements.md (detailed FR/NFR go in Spec spec.md)
|
|
331
|
+
- ❌ user-stories.md (detailed US-* go in Spec spec.md)
|
|
332
|
+
- ❌ success-criteria.md (metrics go in Spec spec.md)
|
|
333
|
+
|
|
334
|
+
**Rationale**: Strategy docs provide business context, but Spec is source of truth
|
|
146
335
|
|
|
147
336
|
**Format Rules**:
|
|
148
|
-
- ✅ **
|
|
149
|
-
- ✅ **
|
|
150
|
-
- ✅ **
|
|
151
|
-
- ❌ **No
|
|
337
|
+
- ✅ **High-level** (product vision, market opportunity)
|
|
338
|
+
- ✅ **Strategic** (WHY this product exists, target market)
|
|
339
|
+
- ✅ **Optional** (only create if new module/product)
|
|
340
|
+
- ❌ **No detailed user stories** (those go in Spec spec.md)
|
|
341
|
+
- ❌ **No requirements** (FR-001, NFR-001 go in Spec spec.md)
|
|
152
342
|
|
|
153
343
|
**Examples**:
|
|
154
344
|
```markdown
|
|
155
|
-
# ✅ CORRECT (
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
# ❌ WRONG (
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
345
|
+
# ✅ CORRECT (High-Level Strategic Content)
|
|
346
|
+
"Weather dashboard targets outdoor enthusiasts and event planners"
|
|
347
|
+
"Market opportunity: 50M+ users need reliable weather data"
|
|
348
|
+
"Competitive advantage: Hyper-local predictions vs. national forecasts"
|
|
349
|
+
|
|
350
|
+
# ❌ WRONG (Detailed Requirements - these go in Spec spec.md)
|
|
351
|
+
"US-001: As a user, I want to view current temperature..."
|
|
352
|
+
"FR-001: System shall display temperature in Celsius/Fahrenheit"
|
|
353
|
+
"NFR-001: Page load time < 2 seconds"
|
|
164
354
|
```
|
|
165
355
|
|
|
166
356
|
---
|
|
167
357
|
|
|
168
|
-
### Output
|
|
358
|
+
### Output 3: Increment Spec (Optional - Can Duplicate Spec) ⚠️
|
|
169
359
|
|
|
170
360
|
**Location**: `.specweave/increments/{increment-id}/spec.md`
|
|
171
361
|
|
|
172
|
-
**Purpose**:
|
|
362
|
+
**Purpose**: Temporary reference for implementation (CAN duplicate Spec spec.md - that's OK!)
|
|
173
363
|
|
|
174
364
|
**Format**:
|
|
175
365
|
```markdown
|
|
@@ -185,38 +375,89 @@ created: 2025-10-26
|
|
|
185
375
|
|
|
186
376
|
## Overview
|
|
187
377
|
|
|
188
|
-
|
|
378
|
+
High-level business context: [Strategy Overview](../../docs/internal/strategy/{module}/overview.md)
|
|
379
|
+
(Optional - only if strategy docs exist)
|
|
380
|
+
|
|
381
|
+
## User Stories
|
|
189
382
|
|
|
190
|
-
|
|
383
|
+
### US-001: View Current Weather (Priority: P1)
|
|
191
384
|
|
|
192
|
-
**
|
|
385
|
+
**As a** user visiting the weather app
|
|
386
|
+
**I want** to see current weather conditions for my location
|
|
387
|
+
**So that** I can quickly know the current temperature and conditions without digging
|
|
193
388
|
|
|
194
|
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
389
|
+
**Acceptance Criteria**:
|
|
390
|
+
- [ ] **AC-US1-01**: Current temperature displayed prominently (large, readable font)
|
|
391
|
+
- **Tests**: (placeholder - filled by test-aware-planner)
|
|
392
|
+
- **Tasks**: (placeholder - filled by test-aware-planner)
|
|
393
|
+
- **Priority**: P1
|
|
394
|
+
- **Testable**: Yes (visual regression test)
|
|
395
|
+
- [ ] **AC-US1-02**: Weather condition description displayed (e.g., "Partly Cloudy")
|
|
396
|
+
- **Tests**: (placeholder - filled by test-aware-planner)
|
|
397
|
+
- **Tasks**: (placeholder - filled by test-aware-planner)
|
|
398
|
+
- **Priority**: P1
|
|
399
|
+
- **Testable**: Yes
|
|
400
|
+
- [ ] **AC-US1-03**: Weather icon/visual representation displayed
|
|
401
|
+
- **Tests**: (placeholder - filled by test-aware-planner)
|
|
402
|
+
- **Tasks**: (placeholder - filled by test-aware-planner)
|
|
403
|
+
- **Priority**: P1
|
|
404
|
+
- **Testable**: Yes
|
|
198
405
|
|
|
199
|
-
|
|
406
|
+
(... repeat for US-002, US-003, etc.)
|
|
200
407
|
|
|
201
|
-
|
|
408
|
+
## Functional Requirements
|
|
202
409
|
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
206
|
-
|
|
410
|
+
- **FR-001**: Real-time data updates
|
|
411
|
+
- System shall fetch weather data every 5 minutes
|
|
412
|
+
- Priority: P1
|
|
413
|
+
|
|
414
|
+
(... continue with all FRs)
|
|
415
|
+
|
|
416
|
+
## Non-Functional Requirements
|
|
417
|
+
|
|
418
|
+
- **NFR-001**: Performance (< 500ms latency)
|
|
419
|
+
- Page load time < 2 seconds
|
|
420
|
+
- Priority: P1
|
|
421
|
+
|
|
422
|
+
(... continue with all NFRs)
|
|
207
423
|
|
|
208
424
|
## Success Criteria
|
|
209
425
|
|
|
210
|
-
**
|
|
426
|
+
- **Metric 1**: 80%+ users view weather within 3 seconds
|
|
427
|
+
- **Metric 2**: < 5% error rate on data fetches
|
|
428
|
+
|
|
429
|
+
(... continue with all metrics)
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
**Two Options**:
|
|
211
433
|
|
|
212
|
-
|
|
434
|
+
**Option A: Duplicate Spec** (for convenience during implementation):
|
|
435
|
+
```markdown
|
|
436
|
+
# Feature: [Name]
|
|
437
|
+
|
|
438
|
+
[Copy all content from SPEC-{number}-{name}/spec.md here]
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**Option B: Reference Spec** (minimal approach):
|
|
442
|
+
```markdown
|
|
443
|
+
# Feature: [Name]
|
|
444
|
+
|
|
445
|
+
**Complete Requirements**: See [SPEC-{number}-{name}](../../docs/internal/specs/spec-{number}-{name}/spec.md)
|
|
446
|
+
|
|
447
|
+
**Quick Summary**:
|
|
448
|
+
- US-001: View current weather
|
|
449
|
+
- US-002: View 7-day forecast
|
|
450
|
+
- US-003: Search by location
|
|
451
|
+
|
|
452
|
+
(Minimal overview for context)
|
|
213
453
|
```
|
|
214
454
|
|
|
215
455
|
**Key Points**:
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
456
|
+
- This is TEMPORARY (may be deleted after increment completes)
|
|
457
|
+
- Spec spec.md is the PERMANENT source of truth
|
|
458
|
+
- Duplicating content is OK (convenience during implementation)
|
|
459
|
+
- OR just reference Spec (minimal approach)
|
|
460
|
+
- Technology-agnostic WHAT/WHY (no HOW)
|
|
220
461
|
|
|
221
462
|
---
|
|
222
463
|
|
|
@@ -748,15 +989,51 @@ Before defining features, understand:
|
|
|
748
989
|
- Who has this problem?
|
|
749
990
|
- Why is this valuable to users/business?
|
|
750
991
|
|
|
751
|
-
### 2. Write Specific Acceptance Criteria
|
|
992
|
+
### 2. Write Specific Acceptance Criteria with AC-IDs (v0.7.0+)
|
|
993
|
+
|
|
994
|
+
**CRITICAL**: All acceptance criteria MUST have IDs for traceability.
|
|
995
|
+
|
|
996
|
+
**AC-ID Format**: `AC-US{story}-{number}`
|
|
997
|
+
|
|
998
|
+
Example:
|
|
999
|
+
- User Story: US1
|
|
1000
|
+
- Acceptance Criteria:
|
|
1001
|
+
- **AC-US1-01**: User can log in with email and password
|
|
1002
|
+
- **AC-US1-02**: Invalid credentials show error message
|
|
1003
|
+
- **AC-US1-03**: After 5 failed attempts, account locked for 15 minutes
|
|
1004
|
+
|
|
1005
|
+
**Full Format with Test-Aware Planning**:
|
|
1006
|
+
```markdown
|
|
1007
|
+
### US1: User Authentication
|
|
1008
|
+
|
|
1009
|
+
**Acceptance Criteria**:
|
|
1010
|
+
- [ ] **AC-US1-01**: User can log in with email and password
|
|
1011
|
+
- **Tests**: (placeholder - filled by test-aware-planner)
|
|
1012
|
+
- **Tasks**: (placeholder - filled by test-aware-planner)
|
|
1013
|
+
- **Priority**: P1
|
|
1014
|
+
- **Testable**: Yes
|
|
1015
|
+
|
|
1016
|
+
- [ ] **AC-US1-02**: Invalid credentials show error message
|
|
1017
|
+
- **Tests**: (placeholder - filled by test-aware-planner)
|
|
1018
|
+
- **Tasks**: (placeholder - filled by test-aware-planner)
|
|
1019
|
+
- **Priority**: P1
|
|
1020
|
+
- **Testable**: Yes
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
**Why AC-IDs Matter**:
|
|
1024
|
+
- ✅ Traceability: AC → Task → Test (bidirectional linking)
|
|
1025
|
+
- ✅ Test Coverage: /specweave:check-tests validates all AC-IDs are tested
|
|
1026
|
+
- ✅ Quality: Ensures no acceptance criteria are missed
|
|
1027
|
+
- ✅ Communication: Clear reference in discussions ("AC-US1-01 is failing")
|
|
752
1028
|
|
|
753
|
-
Bad:
|
|
1029
|
+
**Bad** (no IDs):
|
|
754
1030
|
- "Login should work"
|
|
1031
|
+
- "Error message on invalid credentials"
|
|
755
1032
|
|
|
756
|
-
Good:
|
|
757
|
-
-
|
|
758
|
-
-
|
|
759
|
-
-
|
|
1033
|
+
**Good** (with AC-IDs):
|
|
1034
|
+
- AC-US1-01: User can log in with email and password
|
|
1035
|
+
- AC-US1-02: Invalid credentials show error "Invalid email or password"
|
|
1036
|
+
- AC-US1-03: After 5 failed attempts, account locked for 15 minutes
|
|
760
1037
|
|
|
761
1038
|
### 3. Prioritize Ruthlessly
|
|
762
1039
|
|
|
@@ -823,8 +1100,7 @@ When user runs `/done <increment-id>`, follow these steps:
|
|
|
823
1100
|
# Load all documents
|
|
824
1101
|
Read: .specweave/increments/{id}/spec.md
|
|
825
1102
|
Read: .specweave/increments/{id}/plan.md
|
|
826
|
-
Read: .specweave/increments/{id}/tasks.md
|
|
827
|
-
Read: .specweave/increments/{id}/tests.md
|
|
1103
|
+
Read: .specweave/increments/{id}/tasks.md # v0.7.0+: Tests are embedded in tasks.md
|
|
828
1104
|
```
|
|
829
1105
|
|
|
830
1106
|
#### Step 2: Validate Gate 1 - Tasks Completed ✅
|