specweave 0.6.8 → 0.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/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 +94 -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
package/CLAUDE.md
CHANGED
|
@@ -31,10 +31,9 @@ Users receive a different CLAUDE.md via the template system.
|
|
|
31
31
|
|
|
32
32
|
✅ CORRECT - INCREMENT FOLDERS:
|
|
33
33
|
.specweave/increments/0004-plugin-architecture/
|
|
34
|
-
├── spec.md # Spec files (core
|
|
34
|
+
├── spec.md # Spec files (core 3)
|
|
35
35
|
├── plan.md
|
|
36
|
-
├── tasks.md
|
|
37
|
-
├── tests.md
|
|
36
|
+
├── tasks.md # Tasks with embedded tests
|
|
38
37
|
├── reports/ # ✅ PUT REPORTS HERE!
|
|
39
38
|
│ ├── PLUGIN-MIGRATION-COMPLETE.md # ✅ Completion reports
|
|
40
39
|
│ ├── SESSION-SUMMARY.md # ✅ Session summaries
|
|
@@ -137,11 +136,11 @@ Claude Code isn't just another AI coding assistant - **Anthropic defines the ind
|
|
|
137
136
|
**When Creating Increments**:
|
|
138
137
|
```bash
|
|
139
138
|
# ❌ Wrong
|
|
140
|
-
/specweave:
|
|
139
|
+
/specweave:increment "0004"
|
|
141
140
|
|
|
142
141
|
# ✅ Correct
|
|
143
|
-
/specweave:
|
|
144
|
-
/specweave:
|
|
142
|
+
/specweave:increment "0004-cost-optimization"
|
|
143
|
+
/specweave:increment "0005-github-sync-enhancements"
|
|
145
144
|
```
|
|
146
145
|
|
|
147
146
|
**Enforcement**:
|
|
@@ -157,7 +156,79 @@ Claude Code isn't just another AI coding assistant - **Anthropic defines the ind
|
|
|
157
156
|
|
|
158
157
|
---
|
|
159
158
|
|
|
160
|
-
## Increment Discipline
|
|
159
|
+
## Increment Discipline
|
|
160
|
+
|
|
161
|
+
### Core Philosophy: **ONE Active Increment = Maximum Focus**
|
|
162
|
+
|
|
163
|
+
Simplified from complex per-type limits to **focus-first architecture**:
|
|
164
|
+
- ✅ **Default**: 1 active increment (maximum productivity)
|
|
165
|
+
- ✅ **Emergency ceiling**: 2 active max (hotfix/bug can interrupt)
|
|
166
|
+
- ✅ **Hard cap**: Never >2 active (enforced)
|
|
167
|
+
|
|
168
|
+
**Why 1?** Research shows:
|
|
169
|
+
- 1 task = 100% productivity
|
|
170
|
+
- 2 tasks = 20% slower (context switching cost)
|
|
171
|
+
- 3+ tasks = 40% slower + more bugs
|
|
172
|
+
|
|
173
|
+
### What is an Increment?
|
|
174
|
+
|
|
175
|
+
**An increment can be any type of work**, not just features. SpecWeave supports six increment types:
|
|
176
|
+
|
|
177
|
+
| Type | Description | Use When | Can Interrupt? | Examples |
|
|
178
|
+
|------|-------------|----------|----------------|----------|
|
|
179
|
+
| **feature** | Standard feature development | Adding new functionality | No | User authentication, payment integration, real-time chat |
|
|
180
|
+
| **hotfix** | Critical production fixes | Production is broken | ✅ Yes (emergency) | Security patch, critical bug causing downtime |
|
|
181
|
+
| **bug** | Production bugs with SRE investigation | Bug requires root cause analysis | ✅ Yes (emergency) | Memory leak investigation, performance degradation |
|
|
182
|
+
| **change-request** | Stakeholder requests | Business requirements change | No | UI redesign per stakeholder feedback, API contract changes |
|
|
183
|
+
| **refactor** | Code improvement | Technical debt, code quality | No | Extract service layer, migrate to TypeScript, improve test coverage |
|
|
184
|
+
| **experiment** | POC/spike work | Exploring options, prototypes | No* | Evaluate GraphQL vs REST, test new library, architecture spike |
|
|
185
|
+
|
|
186
|
+
**Notes**:
|
|
187
|
+
- **Experiments auto-abandon** after 14 days of inactivity (prevents accumulation of stale POCs)
|
|
188
|
+
- **Types are for tracking**, not separate limits (git log shows hotfixes vs features)
|
|
189
|
+
- **Single simple rule**: 1 active, allow 2 for emergencies only
|
|
190
|
+
|
|
191
|
+
**Key Insight**: The increment structure (spec.md, plan.md, tasks.md) works for ALL types. A bug investigation still needs:
|
|
192
|
+
- **spec.md**: What's broken? Why? What's the expected behavior?
|
|
193
|
+
- **plan.md**: How to investigate? What tools? What hypothesis?
|
|
194
|
+
- **tasks.md**: Investigation steps, fix implementation, verification tests
|
|
195
|
+
|
|
196
|
+
### WIP Limits
|
|
197
|
+
|
|
198
|
+
**Configuration** (`.specweave/config.json`):
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"limits": {
|
|
202
|
+
"maxActiveIncrements": 1, // Default: 1 active (focus)
|
|
203
|
+
"hardCap": 2, // Emergency ceiling (never exceeded)
|
|
204
|
+
"allowEmergencyInterrupt": true, // hotfix/bug can interrupt
|
|
205
|
+
"typeBehaviors": {
|
|
206
|
+
"canInterrupt": ["hotfix", "bug"], // Emergency types
|
|
207
|
+
"autoAbandonDays": {
|
|
208
|
+
"experiment": 14 // Auto-abandon stale experiments
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Enforcement**:
|
|
216
|
+
- **0 active** → Create new (no warnings)
|
|
217
|
+
- **1 active** → Warn about context switching (allow with confirmation)
|
|
218
|
+
- **2 active** → HARD BLOCK (must complete or pause one first)
|
|
219
|
+
|
|
220
|
+
**Exception**: Hotfix/bug can interrupt to start 2nd active (emergency only)
|
|
221
|
+
|
|
222
|
+
**Multiple hotfixes?** Combine into ONE increment:
|
|
223
|
+
```bash
|
|
224
|
+
# ❌ Wrong: Multiple hotfix increments
|
|
225
|
+
0009-sql-injection-fix
|
|
226
|
+
0010-xss-vulnerability-fix
|
|
227
|
+
0011-csrf-token-fix
|
|
228
|
+
|
|
229
|
+
# ✅ Right: Combined hotfix increment
|
|
230
|
+
0009-security-fixes (SQL + XSS + CSRF)
|
|
231
|
+
```
|
|
161
232
|
|
|
162
233
|
**⛔ THE IRON RULE: You CANNOT start increment N+1 until increment N is DONE**
|
|
163
234
|
|
|
@@ -165,14 +236,14 @@ This is **NOT negotiable**. It is a **hard enforcement** to prevent chaos, scope
|
|
|
165
236
|
|
|
166
237
|
### Why This Rule Exists
|
|
167
238
|
|
|
168
|
-
**The Problem
|
|
239
|
+
**The Problem**:
|
|
169
240
|
- Multiple incomplete increments piling up (0002, 0003, 0006 all in progress)
|
|
170
241
|
- No clear source of truth ("which increment are we working on?")
|
|
171
242
|
- Living docs become stale (sync doesn't know what's current)
|
|
172
243
|
- Scope creep (jumping between features without finishing)
|
|
173
244
|
- Quality degradation (tests not run, docs not updated)
|
|
174
245
|
|
|
175
|
-
**The Solution
|
|
246
|
+
**The Solution**:
|
|
176
247
|
- ✅ **Hard block** on `/specweave:inc` if previous increments incomplete
|
|
177
248
|
- ✅ **Helper commands** to close increments properly
|
|
178
249
|
- ✅ **Clear guidance** on how to resolve incomplete work
|
|
@@ -191,7 +262,7 @@ An increment is DONE if **ONE** of the following is true:
|
|
|
191
262
|
**When you try to start a new increment**:
|
|
192
263
|
|
|
193
264
|
```bash
|
|
194
|
-
/specweave:
|
|
265
|
+
/specweave:increment "new feature"
|
|
195
266
|
```
|
|
196
267
|
|
|
197
268
|
**If previous increments are incomplete, you'll see**:
|
|
@@ -241,7 +312,7 @@ Previous increments are incomplete:
|
|
|
241
312
|
/specweave:do
|
|
242
313
|
|
|
243
314
|
# Once all tasks done, it's automatically complete
|
|
244
|
-
/specweave:
|
|
315
|
+
/specweave:increment "new feature" # ✅ Now works!
|
|
245
316
|
```
|
|
246
317
|
|
|
247
318
|
#### Option 2: Close Interactively
|
|
@@ -274,7 +345,7 @@ Previous increments are incomplete:
|
|
|
274
345
|
|
|
275
346
|
```bash
|
|
276
347
|
# Bypass the check (USE SPARINGLY!)
|
|
277
|
-
/specweave:
|
|
348
|
+
/specweave:increment "urgent-hotfix" --force
|
|
278
349
|
|
|
279
350
|
# This is logged and should be explained in the next standup/PR
|
|
280
351
|
```
|
|
@@ -291,7 +362,7 @@ Remove parts from `spec.md`, regenerate `plan.md` and `tasks.md` to match reduce
|
|
|
291
362
|
# 1. Edit spec.md - remove features you're not doing
|
|
292
363
|
# 2. Delete plan.md and tasks.md
|
|
293
364
|
# 3. Regenerate from spec
|
|
294
|
-
/specweave:
|
|
365
|
+
/specweave:increment "same increment" --regenerate
|
|
295
366
|
|
|
296
367
|
# Now tasks match reduced scope → 100% complete!
|
|
297
368
|
```
|
|
@@ -363,16 +434,16 @@ Result: Clean increments, clear progress, shipping regularly
|
|
|
363
434
|
|
|
364
435
|
**Scenario**: You have 0002 at 73% complete, want to start 0006.
|
|
365
436
|
|
|
366
|
-
**
|
|
437
|
+
**Old approach** (broken):
|
|
367
438
|
```bash
|
|
368
|
-
/specweave:
|
|
439
|
+
/specweave:increment "0006-i18n"
|
|
369
440
|
# ✅ Creates 0006 (no check)
|
|
370
441
|
# Result: 0002, 0003, 0006 all incomplete
|
|
371
442
|
```
|
|
372
443
|
|
|
373
|
-
**
|
|
444
|
+
**Current approach** (disciplined):
|
|
374
445
|
```bash
|
|
375
|
-
/specweave:
|
|
446
|
+
/specweave:increment "0006-i18n"
|
|
376
447
|
# ❌ Blocked! "Close 0002 and 0003 first"
|
|
377
448
|
|
|
378
449
|
# Check status
|
|
@@ -385,7 +456,7 @@ Result: Clean increments, clear progress, shipping regularly
|
|
|
385
456
|
# Select 0003 → Move tasks to 0007 (defer work)
|
|
386
457
|
|
|
387
458
|
# Now can proceed
|
|
388
|
-
/specweave:
|
|
459
|
+
/specweave:increment "0006-i18n"
|
|
389
460
|
# ✅ Works! Clean slate, disciplined workflow
|
|
390
461
|
```
|
|
391
462
|
|
|
@@ -394,7 +465,7 @@ Result: Clean increments, clear progress, shipping regularly
|
|
|
394
465
|
For **emergencies only** (hotfixes, urgent features):
|
|
395
466
|
|
|
396
467
|
```bash
|
|
397
|
-
/specweave:
|
|
468
|
+
/specweave:increment "urgent-security-fix" --force
|
|
398
469
|
```
|
|
399
470
|
|
|
400
471
|
**This bypasses the check** but:
|
|
@@ -411,6 +482,164 @@ For **emergencies only** (hotfixes, urgent features):
|
|
|
411
482
|
|
|
412
483
|
---
|
|
413
484
|
|
|
485
|
+
## Test-Aware Planning
|
|
486
|
+
|
|
487
|
+
**MAJOR ARCHITECTURE CHANGE**: Tests are now embedded in tasks.md instead of separate tests.md file.
|
|
488
|
+
|
|
489
|
+
### Why the Change?
|
|
490
|
+
|
|
491
|
+
**OLD Format**:
|
|
492
|
+
- ❌ Separate tests.md file (duplication, sync issues)
|
|
493
|
+
- ❌ Manual TC-ID management (TC-001, TC-002, etc.)
|
|
494
|
+
- ❌ No BDD format (hard to understand test intent)
|
|
495
|
+
- ❌ Tests disconnected from tasks (traceability gaps)
|
|
496
|
+
|
|
497
|
+
**NEW Format**:
|
|
498
|
+
- ✅ Tests embedded in tasks.md (single source of truth)
|
|
499
|
+
- ✅ BDD format (Given/When/Then - clear intent)
|
|
500
|
+
- ✅ AC-ID traceability (spec.md → tasks.md → tests)
|
|
501
|
+
- ✅ Test-first workflow (TDD supported naturally)
|
|
502
|
+
- ✅ Coverage targets per task (realistic 80-90%, not 100%)
|
|
503
|
+
|
|
504
|
+
### Quick Workflow Example
|
|
505
|
+
|
|
506
|
+
**Step 1: Create increment** → PM agent generates spec.md with user stories and AC-IDs:
|
|
507
|
+
|
|
508
|
+
```bash
|
|
509
|
+
/specweave:increment "Add user authentication" # → generates spec.md with AC-US1-01, AC-US1-02, etc.
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
**spec.md excerpt** (acceptance criteria with AC-IDs):
|
|
513
|
+
|
|
514
|
+
### US1: Basic Login Flow
|
|
515
|
+
**Acceptance Criteria**:
|
|
516
|
+
- [ ] **AC-US1-01**: User can log in with valid email/password (P1, testable)
|
|
517
|
+
- [ ] **AC-US1-02**: Invalid credentials show error (P1, testable)
|
|
518
|
+
- [ ] **AC-US1-03**: 5 failed attempts lock account 15min (P2, testable)
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
**Step 2: Architect creates plan.md** with architecture and test strategy (85% unit, 80% integration, 100% E2E critical path)
|
|
522
|
+
|
|
523
|
+
**Step 3: test-aware-planner generates tasks.md** with embedded tests:
|
|
524
|
+
|
|
525
|
+
```markdown
|
|
526
|
+
---
|
|
527
|
+
increment: 0008-user-authentication
|
|
528
|
+
total_tasks: 5
|
|
529
|
+
test_mode: TDD
|
|
530
|
+
coverage_target: 85%
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
# Tasks for Increment 0008: User Authentication
|
|
534
|
+
|
|
535
|
+
## T-001: Implement Authentication Service (FULL EXAMPLE)
|
|
536
|
+
|
|
537
|
+
**AC**: AC-US1-01, AC-US1-02, AC-US1-03
|
|
538
|
+
|
|
539
|
+
**Test Plan** (BDD format):
|
|
540
|
+
- **Given** user with valid credentials → **When** login → **Then** receive JWT token + timestamp update
|
|
541
|
+
|
|
542
|
+
**Test Cases**:
|
|
543
|
+
- Unit (`auth.test.ts`): validLogin, invalidPassword, nonexistentUser, rateLimiting → 90% coverage
|
|
544
|
+
- Integration (`auth-flow.test.ts`): loginEndpoint, lockedAccount → 85% coverage
|
|
545
|
+
- **Overall: 87% coverage**
|
|
546
|
+
|
|
547
|
+
**Implementation**: AuthService.ts, password hashing (bcrypt), JWT generation, rate limiting (Redis), TDD tests
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
## T-002 through T-005 (Abbreviated)
|
|
552
|
+
|
|
553
|
+
- **T-002**: Session Manager (AC-US2-01, AC-US2-02) - session persistence, "Remember Me", 85% coverage, deps: T-001
|
|
554
|
+
- **T-003**: Login API Endpoint (AC-US1-01, AC-US1-02) - REST API, validation, rate limiting, 85% coverage, deps: T-001, T-002
|
|
555
|
+
- **T-004**: Update Documentation - API docs, flow diagram, user guide (validation: manual review, link checker, build check)
|
|
556
|
+
- **T-005**: Security Audit (AC-US1-03) - OWASP scan, password/JWT verification, 90% coverage, deps: T-001, T-002, T-003
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
**Step 4: Validate** → `/specweave:check-tests 0008` shows per-task coverage, AC-ID coverage, missing tests, recommendations
|
|
560
|
+
|
|
561
|
+
**AC-ID Format**: `AC-US{story}-{number}` (e.g., AC-US1-01) enables traceability from spec.md → tasks.md → tests
|
|
562
|
+
|
|
563
|
+
### Agent Invocation (increment-planner skill)
|
|
564
|
+
|
|
565
|
+
The `increment-planner` skill automatically invokes the `test-aware-planner` agent:
|
|
566
|
+
|
|
567
|
+
```markdown
|
|
568
|
+
STEP 4: Invoke Test-Aware Planner Agent (🚨 MANDATORY - USE TASK TOOL)
|
|
569
|
+
|
|
570
|
+
Task(
|
|
571
|
+
subagent_type: "test-aware-planner",
|
|
572
|
+
description: "Generate tasks with embedded tests",
|
|
573
|
+
prompt: "Create tasks.md with embedded test plans for: [user feature description]
|
|
574
|
+
|
|
575
|
+
FIRST, read the increment files:
|
|
576
|
+
- .specweave/increments/0008-user-authentication/spec.md
|
|
577
|
+
- .specweave/increments/0008-user-authentication/plan.md
|
|
578
|
+
|
|
579
|
+
Generate tasks.md with:
|
|
580
|
+
- Test Plan (Given/When/Then in BDD format)
|
|
581
|
+
- Test Cases (unit/integration/E2E with file paths)
|
|
582
|
+
- Coverage Targets (80-90% overall)
|
|
583
|
+
- Implementation steps
|
|
584
|
+
- Ensure all AC-IDs from spec.md are covered"
|
|
585
|
+
)
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### TDD Workflow Mode
|
|
589
|
+
|
|
590
|
+
When `test_mode: TDD` in tasks.md frontmatter:
|
|
591
|
+
|
|
592
|
+
**Red → Green → Refactor**:
|
|
593
|
+
1. **Red**: Write failing test first
|
|
594
|
+
2. **Green**: Implement minimal code to pass test
|
|
595
|
+
3. **Refactor**: Improve code while keeping tests green
|
|
596
|
+
|
|
597
|
+
**Example**:
|
|
598
|
+
```bash
|
|
599
|
+
# 1. RED - Write failing test
|
|
600
|
+
vim tests/unit/services/auth.test.ts
|
|
601
|
+
npm test # ❌ Fails (expected)
|
|
602
|
+
|
|
603
|
+
# 2. GREEN - Implement feature
|
|
604
|
+
vim src/services/auth/AuthService.ts
|
|
605
|
+
npm test # ✅ Passes
|
|
606
|
+
|
|
607
|
+
# 3. REFACTOR - Improve code
|
|
608
|
+
vim src/services/auth/AuthService.ts
|
|
609
|
+
npm test # ✅ Still passes
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
### Migration from OLD Format
|
|
613
|
+
|
|
614
|
+
**If you have increments with tests.md**:
|
|
615
|
+
|
|
616
|
+
```bash
|
|
617
|
+
# Option 1: Keep old format (works, but deprecated)
|
|
618
|
+
# No action needed - old increments continue to work
|
|
619
|
+
|
|
620
|
+
# Option 2: Migrate to new format (recommended)
|
|
621
|
+
# 1. Extract tests from tests.md
|
|
622
|
+
# 2. Embed them in tasks.md for each task
|
|
623
|
+
# 3. Delete tests.md
|
|
624
|
+
# 4. Run /specweave:check-tests to validate
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
**Note**: New increments ONLY use tasks.md format. Backward compatibility removed per user feedback (greenfield product).
|
|
628
|
+
|
|
629
|
+
### Quick Reference
|
|
630
|
+
|
|
631
|
+
| Aspect | OLD (tests.md) | NEW (tasks.md) |
|
|
632
|
+
|--------|---------------|----------------|
|
|
633
|
+
| **File** | Separate tests.md | Embedded in tasks.md |
|
|
634
|
+
| **Format** | TC-IDs (TC-001) | Function names + BDD |
|
|
635
|
+
| **Traceability** | Manual | Automatic (AC-IDs) |
|
|
636
|
+
| **BDD** | No | Yes (Given/When/Then) |
|
|
637
|
+
| **Sync Issues** | Yes (tasks ↔ tests) | No (single file) |
|
|
638
|
+
| **Coverage** | Per test case | Per task + overall |
|
|
639
|
+
| **TDD Support** | Limited | Native (test_mode: TDD) |
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
414
643
|
## Root-Level .specweave/ Folder (MANDATORY)
|
|
415
644
|
|
|
416
645
|
**CRITICAL ARCHITECTURE RULE**: SpecWeave ONLY supports root-level `.specweave/` folders. Nested `.specweave/` folders are NOT supported and MUST be prevented.
|
|
@@ -527,7 +756,7 @@ git init && npx specweave init .
|
|
|
527
756
|
mkdir -p services/{user,order,payment}
|
|
528
757
|
|
|
529
758
|
# Work normally - SpecWeave sees all services
|
|
530
|
-
/specweave:
|
|
759
|
+
/specweave:increment "0001-add-service-mesh"
|
|
531
760
|
# Creates: .specweave/increments/0001-add-service-mesh/
|
|
532
761
|
# Can reference: services/user-service/, infrastructure/k8s/, etc.
|
|
533
762
|
```
|
|
@@ -594,16 +823,16 @@ if (parentSpecweave) {
|
|
|
594
823
|
|
|
595
824
|
---
|
|
596
825
|
|
|
597
|
-
## Project Scale
|
|
826
|
+
## Project Scale - Plugin Architecture
|
|
598
827
|
|
|
599
828
|
### Core Plugin (Always Auto-Loaded)
|
|
600
829
|
|
|
601
830
|
**Plugin**: `specweave` - The essential SpecWeave plugin loaded in every project:
|
|
602
|
-
- **Skills**: 9 skills (increment-planner, tdd-workflow,
|
|
831
|
+
- **Skills**: 9 skills (increment-planner, tdd-workflow, spec-generator, context-loader, project-kickstarter, brownfield-analyzer, brownfield-onboarder, increment-quality-judge, context-optimizer)
|
|
603
832
|
- **Agents**: 22 agents (PM, Architect, Tech Lead, + 19 specialized including tdd-orchestrator)
|
|
604
833
|
- **Commands**: 22 commands (/specweave:inc, /specweave:do, /specweave:next, /specweave:done, /specweave:progress, /specweave:validate, /specweave:sync-docs, + 15 specialized)
|
|
605
834
|
- **Hooks**: 8 lifecycle hooks
|
|
606
|
-
- **Size**: ~12K tokens
|
|
835
|
+
- **Size**: ~12K tokens
|
|
607
836
|
|
|
608
837
|
**Result**: **75%+ context reduction** out of the box!
|
|
609
838
|
|
|
@@ -615,7 +844,7 @@ if (parentSpecweave) {
|
|
|
615
844
|
|
|
616
845
|
### Available Plugins (Opt-In)
|
|
617
846
|
|
|
618
|
-
**Implemented Plugins
|
|
847
|
+
**Implemented Plugins**:
|
|
619
848
|
|
|
620
849
|
| Plugin | Skills | Agents | Commands | Status |
|
|
621
850
|
|--------|--------|--------|----------|--------|
|
|
@@ -664,12 +893,12 @@ if (parentSpecweave) {
|
|
|
664
893
|
|
|
665
894
|
### Context Efficiency Examples
|
|
666
895
|
|
|
667
|
-
**Before
|
|
896
|
+
**Before** - Monolithic approach:
|
|
668
897
|
- Simple React app: Loads ALL 44 skills + 20 agents ≈ **50K tokens**
|
|
669
898
|
- Backend API: Loads ALL 44 skills + 20 agents ≈ **50K tokens**
|
|
670
899
|
- ML pipeline: Loads ALL 44 skills + 20 agents ≈ **50K tokens**
|
|
671
900
|
|
|
672
|
-
**After
|
|
901
|
+
**After** - Modular plugin architecture:
|
|
673
902
|
- Simple React app: Core + frontend-stack + github ≈ **16K tokens** (68% reduction!)
|
|
674
903
|
- Backend API: Core + nodejs-backend + github ≈ **15K tokens** (70% reduction!)
|
|
675
904
|
- ML pipeline: Core + ml-ops + github ≈ **18K tokens** (64% reduction!)
|
|
@@ -683,7 +912,7 @@ if (parentSpecweave) {
|
|
|
683
912
|
|
|
684
913
|
When you run `specweave init`:
|
|
685
914
|
|
|
686
|
-
1. ✅ **GitHub Marketplace Registration**
|
|
915
|
+
1. ✅ **GitHub Marketplace Registration**
|
|
687
916
|
- Creates `.claude/settings.json` with GitHub marketplace reference
|
|
688
917
|
- **No local copying** - plugins fetched from GitHub on-demand
|
|
689
918
|
- Settings.json structure:
|
|
@@ -703,7 +932,7 @@ When you run `specweave init`:
|
|
|
703
932
|
- Claude Code automatically discovers plugins from GitHub
|
|
704
933
|
- No manual `/plugin marketplace add` needed!
|
|
705
934
|
|
|
706
|
-
2. ✅ **Core Plugin Auto-Installation**
|
|
935
|
+
2. ✅ **Core Plugin Auto-Installation**
|
|
707
936
|
- Automatically runs: `claude plugin marketplace add` and `claude plugin install specweave@specweave`
|
|
708
937
|
- Works via CLI during init (uses user's shell to access `claude` command)
|
|
709
938
|
- Slash commands available IMMEDIATELY - no manual install!
|
|
@@ -714,13 +943,13 @@ When you run `specweave init`:
|
|
|
714
943
|
- Based on project detection (Git, package.json, etc.)
|
|
715
944
|
- User can install now or later
|
|
716
945
|
|
|
717
|
-
**Key Architectural Change
|
|
946
|
+
**Key Architectural Change**:
|
|
718
947
|
- ❌ Old: Copied `.claude-plugin/` + `plugins/` to every project (~2MB bloat)
|
|
719
948
|
- ✅ New: Reference GitHub marketplace (~2KB settings.json, always up-to-date)
|
|
720
949
|
|
|
721
950
|
#### Phase 2: Increment Planning (On-Demand Loading)
|
|
722
951
|
|
|
723
|
-
When you create increments (e.g., `/specweave:
|
|
952
|
+
When you create increments (e.g., `/specweave:increment "Add Stripe billing"`):
|
|
724
953
|
|
|
725
954
|
1. **Spec Analysis** (NEW! v0.6.0+)
|
|
726
955
|
- increment-planner skill scans spec.md content
|
|
@@ -791,7 +1020,7 @@ All plugin management happens through Claude Code's native commands:
|
|
|
791
1020
|
```
|
|
792
1021
|
specweave/ (GitHub repo - Contributors)
|
|
793
1022
|
├── .claude/
|
|
794
|
-
│ └── settings.json #
|
|
1023
|
+
│ └── settings.json # Empty or minimal (no local paths supported)
|
|
795
1024
|
├── .claude-plugin/
|
|
796
1025
|
│ └── marketplace.json # Marketplace definition
|
|
797
1026
|
└── plugins/
|
|
@@ -799,20 +1028,20 @@ specweave/ (GitHub repo - Contributors)
|
|
|
799
1028
|
└── specweave-github/ # Plugin SOURCE CODE
|
|
800
1029
|
```
|
|
801
1030
|
|
|
802
|
-
**
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
"extraKnownMarketplaces": {
|
|
806
|
-
"specweave": "../.claude-plugin"
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
```
|
|
1031
|
+
**Marketplace setup for development** (use CLI, NOT settings.json):
|
|
1032
|
+
|
|
1033
|
+
Local paths are **NOT supported** in `extraKnownMarketplaces` in settings.json. Use CLI instead:
|
|
810
1034
|
|
|
811
|
-
**OR use CLI** (recommended for contributors):
|
|
812
1035
|
```bash
|
|
1036
|
+
# Add local marketplace (only way for development)
|
|
813
1037
|
/plugin marketplace add ./.claude-plugin
|
|
1038
|
+
|
|
1039
|
+
# Then install plugins
|
|
1040
|
+
/plugin install specweave@specweave
|
|
814
1041
|
```
|
|
815
1042
|
|
|
1043
|
+
**Why CLI-only?** Claude Code's `extraKnownMarketplaces` in settings.json only supports remote sources (GitHub, Git). Local paths must be added via CLI commands.
|
|
1044
|
+
|
|
816
1045
|
#### User Projects (Production)
|
|
817
1046
|
|
|
818
1047
|
```
|
|
@@ -842,8 +1071,8 @@ my-saas-app/ (User's project)
|
|
|
842
1071
|
**Key Differences**:
|
|
843
1072
|
- ✅ **Development**: Local `.claude-plugin/` and `plugins/` in repo (for editing)
|
|
844
1073
|
- ✅ **Production**: GitHub reference only (no local plugin copies)
|
|
845
|
-
- ✅ **Development**: Use
|
|
846
|
-
- ✅ **Production**: Use GitHub object `{"source": "github", ...}`
|
|
1074
|
+
- ✅ **Development**: Use CLI `/plugin marketplace add ./.claude-plugin` (settings.json cannot reference local paths)
|
|
1075
|
+
- ✅ **Production**: Use GitHub object in settings.json: `{"source": {"source": "github", ...}}`
|
|
847
1076
|
|
|
848
1077
|
No per-project installation needed!
|
|
849
1078
|
|
|
@@ -873,7 +1102,7 @@ plugins/ ← ROOT: All plugins (version controlled)
|
|
|
873
1102
|
├── specweave/ ← CORE PLUGIN (framework essentials)
|
|
874
1103
|
│ ├── .claude-plugin/ ← plugin.json (Claude native)
|
|
875
1104
|
│ ├── skills/ ← Core skills (9 total)
|
|
876
|
-
│ │ ├──
|
|
1105
|
+
│ │ ├── spec-generator/
|
|
877
1106
|
│ │ ├── increment-planner/
|
|
878
1107
|
│ │ ├── tdd-workflow/
|
|
879
1108
|
│ │ └── ...
|
|
@@ -913,16 +1142,15 @@ plugins/ ← ROOT: All plugins (version controlled)
|
|
|
913
1142
|
|
|
914
1143
|
**Rules**:
|
|
915
1144
|
- ✅ `src/` = TypeScript code ONLY (compiled to `dist/`)
|
|
916
|
-
- ✅ ALL skills/agents/commands/hooks = Inside plugins (including core!)
|
|
1145
|
+
- ✅ ALL skills/agents/commands/hooks = Inside `plugins/` (including core!)
|
|
917
1146
|
- ✅ `plugins/specweave/` = Core framework plugin (always loaded)
|
|
918
|
-
- ✅ `.claude/` =
|
|
1147
|
+
- ✅ `.claude/` = Plugin settings only (settings.json references marketplace)
|
|
919
1148
|
- ❌ NEVER mix `*.ts` and `SKILL.md` in the same directory
|
|
920
|
-
- ❌ NEVER edit files in `.claude/` directly (they get overwritten)
|
|
921
1149
|
- ❌ NEVER create new files in project root (use increment folders)
|
|
922
1150
|
|
|
923
1151
|
**Key Architectural Principle**:
|
|
924
1152
|
- TypeScript code (`*.ts`) goes in `src/` → compiled to `dist/`
|
|
925
|
-
- Claude-native files (`SKILL.md`, `AGENT.md`, `*.md`)
|
|
1153
|
+
- Claude-native files (`SKILL.md`, `AGENT.md`, `*.md`) stay in `plugins/` → loaded directly by Claude Code
|
|
926
1154
|
- Even "core" framework components are in `plugins/specweave/` (everything is a plugin!)
|
|
927
1155
|
- This separation ensures clean builds and prevents mixing compiled code with runtime files
|
|
928
1156
|
|
|
@@ -988,7 +1216,7 @@ specweave/
|
|
|
988
1216
|
│ │ ├── .claude-plugin/
|
|
989
1217
|
│ │ │ └── plugin.json # Claude native manifest
|
|
990
1218
|
│ │ ├── skills/ # Core skills (9 total)
|
|
991
|
-
│ │ │ ├──
|
|
1219
|
+
│ │ │ ├── spec-generator/ # Specification generation for increments
|
|
992
1220
|
│ │ │ ├── increment-planner/ # Increment planning and spec generation
|
|
993
1221
|
│ │ │ ├── context-loader/ # Context loading optimization
|
|
994
1222
|
│ │ │ ├── tdd-workflow/ # Test-driven development workflow
|
|
@@ -1046,23 +1274,22 @@ specweave/
|
|
|
1046
1274
|
│ │ ├── 0002-core-enhancements/
|
|
1047
1275
|
│ │ │ ├── spec.md
|
|
1048
1276
|
│ │ │ ├── plan.md
|
|
1049
|
-
│ │ │ ├── tasks.md
|
|
1050
|
-
│ │ │ ├── tests.md
|
|
1277
|
+
│ │ │ ├── tasks.md # Tasks with embedded tests (v0.7.0+)
|
|
1051
1278
|
│ │ │ ├── logs/ # ✅ Session logs go here
|
|
1052
1279
|
│ │ │ ├── scripts/ # ✅ Helper scripts
|
|
1053
1280
|
│ │ │ └── reports/ # ✅ Analysis files
|
|
1054
1281
|
│ │ └── _backlog/
|
|
1055
1282
|
│ ├── docs/
|
|
1056
|
-
│ │ ├── internal/ # Strategic docs (NEVER published)
|
|
1057
|
-
│ │ │ ├── strategy/ # Business
|
|
1058
|
-
│ │ │ ├── rfc/ #
|
|
1059
|
-
│ │ │
|
|
1060
|
-
│ │ │
|
|
1061
|
-
│ │ │ │ ├──
|
|
1062
|
-
│ │ │ │ └──
|
|
1063
|
-
│ │ │ ├── delivery/ #
|
|
1064
|
-
│ │ │ ├── operations/ #
|
|
1065
|
-
│ │ │ └── governance/ #
|
|
1283
|
+
│ │ ├── internal/ # Strategic docs (NEVER published) - 6 core folders
|
|
1284
|
+
│ │ │ ├── strategy/ # Business rationale, vision, PRDs, OKRs
|
|
1285
|
+
│ │ │ ├── rfc/ # Feature specifications (detailed requirements, project history)
|
|
1286
|
+
│ │ │ │ └── rfc-####-{name}.md # User stories, AC, implementation plans
|
|
1287
|
+
│ │ │ ├── architecture/ # Technical design (HLD, LLD, ADR, diagrams)
|
|
1288
|
+
│ │ │ │ ├── adr/ # Architecture Decision Records (why we chose X over Y)
|
|
1289
|
+
│ │ │ │ └── diagrams/ # Mermaid + SVG (C4 model diagrams)
|
|
1290
|
+
│ │ │ ├── delivery/ # Build & release processes (roadmap, DORA, branching)
|
|
1291
|
+
│ │ │ ├── operations/ # Production operations (runbooks, SLOs, incidents)
|
|
1292
|
+
│ │ │ └── governance/ # Policies (security, compliance, coding standards)
|
|
1066
1293
|
│ │ └── public/ # User-facing docs (can publish)
|
|
1067
1294
|
│ │ ├── guides/
|
|
1068
1295
|
│ │ └── api/
|
|
@@ -1137,6 +1364,395 @@ specweave/
|
|
|
1137
1364
|
|
|
1138
1365
|
---
|
|
1139
1366
|
|
|
1367
|
+
## Internal Documentation Structure
|
|
1368
|
+
|
|
1369
|
+
**Location**: `.specweave/docs/internal/` - Six core folders for engineering playbook
|
|
1370
|
+
|
|
1371
|
+
**Quick Reference**:
|
|
1372
|
+
|
|
1373
|
+
| Folder | Purpose | Use When | Examples |
|
|
1374
|
+
|--------|---------|----------|----------|
|
|
1375
|
+
| **strategy/** | Business rationale (Why?) | Defining business case for features | `prd-user-auth.md` |
|
|
1376
|
+
| **specs/** | Feature specifications (What?) | Detailed requirements with user stories | `spec-0007-smart-discipline.md` |
|
|
1377
|
+
| **architecture/** | Technical design (How?) | System architecture, decisions | `hld-system.md`, `adr/0001-postgres.md` |
|
|
1378
|
+
| **delivery/** | Build & release (How we build) | Git workflow, DORA metrics, CI/CD | `branch-strategy.md`, `dora-metrics.md` |
|
|
1379
|
+
| **operations/** | Production ops (How we run) | Runbooks, incidents, performance | `runbook-api.md`, `performance-tuning.md` |
|
|
1380
|
+
| **governance/** | Policies (Guardrails) | Security, compliance, coding standards | `security-policy.md`, `coding-standards.md` |
|
|
1381
|
+
|
|
1382
|
+
**Document Flow**: `PRD → Spec → Architecture → Delivery → Operations`
|
|
1383
|
+
|
|
1384
|
+
**See**: [Internal Docs README](.specweave/docs/internal/README.md) for complete guidance
|
|
1385
|
+
|
|
1386
|
+
---
|
|
1387
|
+
|
|
1388
|
+
## Specs Architecture: Two Locations Explained
|
|
1389
|
+
|
|
1390
|
+
**CRITICAL ARCHITECTURAL CONCEPT**: SpecWeave uses specs in TWO locations for different purposes. Understanding this distinction is essential.
|
|
1391
|
+
|
|
1392
|
+
### The Core Question: Why Two Locations?
|
|
1393
|
+
|
|
1394
|
+
1. **Living Docs Specs**: `.specweave/docs/internal/specs/spec-NNN-feature-area.md` - **Permanent, feature-level knowledge base**
|
|
1395
|
+
2. **Increment Specs**: `.specweave/increments/####-name/spec.md` - **Temporary, focused implementation snapshot**
|
|
1396
|
+
|
|
1397
|
+
**Key Difference**: Specs use **3-digit numbers** (001, 002, 003) for **feature areas**, increments use **4-digit numbers** (0001, 0002, 0003) for **implementations**.
|
|
1398
|
+
|
|
1399
|
+
### The Answer: Permanent vs Temporary
|
|
1400
|
+
|
|
1401
|
+
**Living Docs Specs = Permanent, Feature-Level Knowledge Base**
|
|
1402
|
+
|
|
1403
|
+
- **Location**: `.specweave/docs/internal/specs/spec-001-core-framework-architecture.md`
|
|
1404
|
+
- **Purpose**: COMPLETE, PERMANENT source of truth for entire feature area
|
|
1405
|
+
- **Lifecycle**: Created once, updated over time, NEVER deleted
|
|
1406
|
+
- **Scope**: Comprehensive feature area (e.g., "Core Framework", 10-50 user stories)
|
|
1407
|
+
- **Contains**:
|
|
1408
|
+
- ✅ ALL user stories for the feature area (across multiple increments)
|
|
1409
|
+
- ✅ ALL acceptance criteria for those user stories
|
|
1410
|
+
- ✅ Implementation history (which increments implemented which parts)
|
|
1411
|
+
- ✅ Links to brownfield documentation (existing project docs)
|
|
1412
|
+
- ✅ External PM tool links (GitHub Project, Jira Epic, ADO Feature)
|
|
1413
|
+
- ✅ Architecture decisions rationale (ADRs)
|
|
1414
|
+
- ✅ Success criteria & metrics for the feature area
|
|
1415
|
+
|
|
1416
|
+
**Increment Specs = Temporary, Focused Implementation Snapshot**
|
|
1417
|
+
|
|
1418
|
+
- **Location**: `.specweave/increments/0001-core-framework/spec.md`
|
|
1419
|
+
- **Purpose**: TEMPORARY implementation reference (what am I building THIS iteration?)
|
|
1420
|
+
- **Lifecycle**: Created per increment, can be deleted after completion
|
|
1421
|
+
- **Scope**: Focused subset (3-5 user stories for this increment only)
|
|
1422
|
+
- **Contains**:
|
|
1423
|
+
- ✅ Reference to living docs: `"See: SPEC-001-core-framework-architecture"`
|
|
1424
|
+
- ✅ Subset of user stories: `"Implements: US-001, US-002, US-003 only"`
|
|
1425
|
+
- ✅ What's being implemented RIGHT NOW (this iteration)
|
|
1426
|
+
- ✅ Out of scope: Lists what's NOT in this increment (deferred to future increments)
|
|
1427
|
+
|
|
1428
|
+
### Real-World Example: SpecWeave Core Framework
|
|
1429
|
+
|
|
1430
|
+
**Living Docs Spec** (Permanent, Feature-Level):
|
|
1431
|
+
```
|
|
1432
|
+
File: .specweave/docs/internal/specs/spec-001-core-framework-architecture.md
|
|
1433
|
+
|
|
1434
|
+
# SPEC-001: Core Framework & Architecture
|
|
1435
|
+
Foundation framework with CLI, plugin system, cross-platform support
|
|
1436
|
+
|
|
1437
|
+
## Increments (Implementation History)
|
|
1438
|
+
- 0001-core-framework: MVP CLI, skills, agents (Complete)
|
|
1439
|
+
- 0002-core-enhancements: Context optimization, PM agent (Complete)
|
|
1440
|
+
- 0004-plugin-architecture: Claude native plugins (Complete)
|
|
1441
|
+
- 0005-cross-platform-cli: Windows/Mac/Linux support (Complete)
|
|
1442
|
+
|
|
1443
|
+
## User Stories (35 total across all 4 increments)
|
|
1444
|
+
- US-001: NPM installation (0001) ✅
|
|
1445
|
+
- US-003: Context optimization (0002) ✅
|
|
1446
|
+
- US-005: Plugin system (0004) ✅
|
|
1447
|
+
- US-007: Cross-platform CLI (0005) ✅
|
|
1448
|
+
... (31 more stories)
|
|
1449
|
+
|
|
1450
|
+
## External References
|
|
1451
|
+
- GitHub Project: TBD (create for 1.0.0)
|
|
1452
|
+
```
|
|
1453
|
+
|
|
1454
|
+
**Increment Spec** (Temporary, Implementation-Level):
|
|
1455
|
+
```
|
|
1456
|
+
File: .specweave/increments/0001-core-framework/spec.md
|
|
1457
|
+
|
|
1458
|
+
# Increment 0001: Core Framework MVP
|
|
1459
|
+
**Implements**: SPEC-001-core-framework-architecture (US-001 to US-002 only)
|
|
1460
|
+
**Complete Specification**: See ../../docs/internal/specs/spec-001-core-framework-architecture.md
|
|
1461
|
+
|
|
1462
|
+
## What We're Implementing (This Increment Only)
|
|
1463
|
+
- US-001: NPM installation + CLI basics ✅
|
|
1464
|
+
- US-002: Plugin system foundation ✅
|
|
1465
|
+
|
|
1466
|
+
## Out of Scope (For This Increment)
|
|
1467
|
+
- ❌ Context optimization (US-003) → Increment 0002
|
|
1468
|
+
- ❌ Claude native plugins (US-005) → Increment 0004
|
|
1469
|
+
- ❌ Cross-platform support (US-007) → Increment 0005
|
|
1470
|
+
```
|
|
1471
|
+
|
|
1472
|
+
### Key Benefits
|
|
1473
|
+
|
|
1474
|
+
**Why This Architecture?**
|
|
1475
|
+
|
|
1476
|
+
1. **Permanent Knowledge Base**: Living docs = long-term memory. Answer: "How did we build authentication?"
|
|
1477
|
+
2. **Focused Implementation**: Increment specs = short-term focus. Answer: "What am I building RIGHT NOW?"
|
|
1478
|
+
3. **Brownfield Integration**: Living docs link to existing project documentation, increment specs don't need this complexity
|
|
1479
|
+
4. **Clean After Completion**: Delete increment specs (optional), living docs remain as knowledge base
|
|
1480
|
+
5. **External PM Tool Integration**: Jira epic → Living docs spec (permanent link), increment specs don't need external links
|
|
1481
|
+
|
|
1482
|
+
### When to Use Which?
|
|
1483
|
+
|
|
1484
|
+
**Create Living Docs Spec When**:
|
|
1485
|
+
- ✅ Planning a major feature (authentication, payments, messaging)
|
|
1486
|
+
- ✅ Feature spans multiple increments (will take weeks/months)
|
|
1487
|
+
- ✅ Need brownfield integration (link to existing project docs)
|
|
1488
|
+
- ✅ Want permanent historical record (how did we build this?)
|
|
1489
|
+
- ✅ Need external PM tool link (Jira epic, ADO feature, GitHub milestone)
|
|
1490
|
+
|
|
1491
|
+
**Create Increment Spec When**:
|
|
1492
|
+
- ✅ Starting implementation of one increment
|
|
1493
|
+
- ✅ Want quick reference (what am I building right now?)
|
|
1494
|
+
- ✅ Need focused scope (just 3 user stories, not 20)
|
|
1495
|
+
|
|
1496
|
+
### Comparison Table
|
|
1497
|
+
|
|
1498
|
+
| Aspect | Living Docs Specs | Increment Specs |
|
|
1499
|
+
|--------|------------------|----------------|
|
|
1500
|
+
| **Location** | `.specweave/docs/internal/specs/` | `.specweave/increments/####/` |
|
|
1501
|
+
| **Lifecycle** | ✅ Permanent (never deleted) | ⏳ Temporary (optional deletion) |
|
|
1502
|
+
| **Scope** | 📚 Complete feature (20 US) | 🎯 Focused subset (3 US) |
|
|
1503
|
+
| **Size** | 500+ lines (comprehensive) | 50-100 lines (focused) |
|
|
1504
|
+
| **Purpose** | Knowledge base + history | Implementation tracker |
|
|
1505
|
+
| **Coverage** | ALL user stories | SUBSET of user stories |
|
|
1506
|
+
| **Brownfield** | ✅ Links to existing docs | ❌ Rarely needed |
|
|
1507
|
+
| **External Links** | ✅ Jira, ADO, GitHub | ❌ Rarely needed |
|
|
1508
|
+
| **Multiple Increments** | ✅ One spec → many increments | ❌ One increment → one spec |
|
|
1509
|
+
| **After Completion** | ✅ Remains forever | ⚠️ Can be deleted |
|
|
1510
|
+
|
|
1511
|
+
### Analogy: Wikipedia vs Sticky Notes
|
|
1512
|
+
|
|
1513
|
+
- **Living Docs Specs** = 📚 Wikipedia Article (permanent, comprehensive, updated over time)
|
|
1514
|
+
- **Increment Specs** = 📝 Sticky Note Reminder (temporary, focused, disposable after done)
|
|
1515
|
+
|
|
1516
|
+
### Typical Workflow
|
|
1517
|
+
|
|
1518
|
+
**Phase 1: Planning** (PM Agent)
|
|
1519
|
+
```
|
|
1520
|
+
User: "I want to build a plugin-based framework with CLI"
|
|
1521
|
+
PM Agent:
|
|
1522
|
+
1. Creates living docs spec:
|
|
1523
|
+
→ .specweave/docs/internal/specs/spec-001-core-framework-architecture.md
|
|
1524
|
+
→ Contains ALL 35 user stories (comprehensive, feature-level)
|
|
1525
|
+
→ Links to GitHub Project (TBD)
|
|
1526
|
+
→ Maps to 4 increments (0001, 0002, 0004, 0005)
|
|
1527
|
+
```
|
|
1528
|
+
|
|
1529
|
+
**Phase 2: Increment 1** (Core MVP)
|
|
1530
|
+
```
|
|
1531
|
+
User: "/specweave:increment 0001-core-framework"
|
|
1532
|
+
PM Agent:
|
|
1533
|
+
1. Creates increment spec:
|
|
1534
|
+
→ .specweave/increments/0001-core-framework/spec.md
|
|
1535
|
+
→ References living docs: "See SPEC-001"
|
|
1536
|
+
→ Contains ONLY US-001 to US-002 (focused, this iteration only)
|
|
1537
|
+
2. Implementation happens...
|
|
1538
|
+
3. Increment completes ✅
|
|
1539
|
+
4. Increment spec stays for history (or can be deleted)
|
|
1540
|
+
```
|
|
1541
|
+
|
|
1542
|
+
**Phase 3: Increment 2** (Enhancements)
|
|
1543
|
+
```
|
|
1544
|
+
User: "/specweave:increment 0002-core-enhancements"
|
|
1545
|
+
PM Agent:
|
|
1546
|
+
1. Creates increment spec:
|
|
1547
|
+
→ .specweave/increments/0002-core-enhancements/spec.md
|
|
1548
|
+
→ References SAME living docs: "See SPEC-001"
|
|
1549
|
+
→ Contains ONLY US-003 to US-004 (focused, this iteration only)
|
|
1550
|
+
2. Implementation happens...
|
|
1551
|
+
3. Increment completes ✅
|
|
1552
|
+
```
|
|
1553
|
+
|
|
1554
|
+
**Phase 4: All Increments Done!**
|
|
1555
|
+
```
|
|
1556
|
+
After ALL increments complete (0001, 0002, 0004, 0005):
|
|
1557
|
+
- ✅ Living docs spec REMAINS (permanent knowledge base)
|
|
1558
|
+
- ⏳ Increment specs can be deleted (optional cleanup)
|
|
1559
|
+
- ✅ Complete history preserved in spec-001
|
|
1560
|
+
- ✅ GitHub Project linked to SPEC-001 (not increments)
|
|
1561
|
+
```
|
|
1562
|
+
|
|
1563
|
+
### Relationship
|
|
1564
|
+
|
|
1565
|
+
**One living docs spec → Many increment specs**
|
|
1566
|
+
|
|
1567
|
+
```
|
|
1568
|
+
SPEC-001: Core Framework & Architecture (Living Docs - Permanent, Feature-Level)
|
|
1569
|
+
├── 0001-core-framework (Increment - Temporary, Implementation-Level)
|
|
1570
|
+
├── 0002-core-enhancements (Increment - Temporary, Implementation-Level)
|
|
1571
|
+
├── 0004-plugin-architecture (Increment - Temporary, Implementation-Level)
|
|
1572
|
+
└── 0005-cross-platform-cli (Increment - Temporary, Implementation-Level)
|
|
1573
|
+
|
|
1574
|
+
SPEC-002: Intelligent AI Capabilities (Living Docs - Permanent, Feature-Level)
|
|
1575
|
+
├── 0003-intelligent-model-selection (Increment - Temporary, Implementation-Level)
|
|
1576
|
+
├── 0007-smart-increment-discipline (Increment - Temporary, Implementation-Level)
|
|
1577
|
+
└── 0009-intelligent-reopen-logic (Increment - Temporary, Implementation-Level)
|
|
1578
|
+
```
|
|
1579
|
+
|
|
1580
|
+
### Summary
|
|
1581
|
+
|
|
1582
|
+
**Two Locations, Two Purposes**:
|
|
1583
|
+
|
|
1584
|
+
1. **Living Docs Specs** (`.specweave/docs/internal/specs/`):
|
|
1585
|
+
- ✅ Permanent knowledge base
|
|
1586
|
+
- ✅ Complete feature specification
|
|
1587
|
+
- ✅ Links to brownfield docs
|
|
1588
|
+
- ✅ External PM tool integration
|
|
1589
|
+
- ✅ Spans multiple increments
|
|
1590
|
+
|
|
1591
|
+
2. **Increment Specs** (`.specweave/increments/####/`):
|
|
1592
|
+
- ⏳ Temporary implementation tracker
|
|
1593
|
+
- 🎯 Focused subset of work
|
|
1594
|
+
- 📝 Quick reference: "What am I building?"
|
|
1595
|
+
- 🗑️ Can be deleted after completion
|
|
1596
|
+
|
|
1597
|
+
**Result**: Clean, focused implementation + permanent knowledge base
|
|
1598
|
+
|
|
1599
|
+
**For comprehensive explanation**: See [SPECS-ARCHITECTURE-CLARIFICATION.md](.specweave/increments/0007-smart-increment-discipline/reports/SPECS-ARCHITECTURE-CLARIFICATION.md)
|
|
1600
|
+
|
|
1601
|
+
---
|
|
1602
|
+
|
|
1603
|
+
## Living Completion Reports
|
|
1604
|
+
|
|
1605
|
+
### The Problem with Traditional Reports
|
|
1606
|
+
|
|
1607
|
+
**Traditional approach** (report written at the end):
|
|
1608
|
+
```
|
|
1609
|
+
Start increment: Plan 10 user stories
|
|
1610
|
+
During work: Scope changes 5 times (not documented)
|
|
1611
|
+
End increment: Write report "Completed 8/10 stories"
|
|
1612
|
+
Future: "Why was Story 5 removed?" → No one remembers!
|
|
1613
|
+
```
|
|
1614
|
+
|
|
1615
|
+
**Problems**:
|
|
1616
|
+
- ❌ No audit trail for scope changes
|
|
1617
|
+
- ❌ Decision rationale lost
|
|
1618
|
+
- ❌ Difficult for onboarding/compliance
|
|
1619
|
+
- ❌ Can't learn from past iterations
|
|
1620
|
+
|
|
1621
|
+
### Living Reports Solution
|
|
1622
|
+
|
|
1623
|
+
**SpecWeave approach** (report updated in real-time):
|
|
1624
|
+
```
|
|
1625
|
+
Start: Initialize completion report (v1.0)
|
|
1626
|
+
During work:
|
|
1627
|
+
- 2025-11-06: Added US6 (dark mode) → /update-scope → v1.1
|
|
1628
|
+
- 2025-11-07: Deferred US3 (CSV export) → /update-scope → v1.2
|
|
1629
|
+
- 2025-11-08: WebSockets → Polling pivot → /update-scope → v1.3
|
|
1630
|
+
End: Finalize report with complete scope evolution history
|
|
1631
|
+
Future: "Why was Story 5 removed?" → Check report, find exact reason with WHO approved and WHY!
|
|
1632
|
+
```
|
|
1633
|
+
|
|
1634
|
+
**Benefits**:
|
|
1635
|
+
- ✅ Complete audit trail (every scope change documented)
|
|
1636
|
+
- ✅ Real-time context (captured when decision is fresh)
|
|
1637
|
+
- ✅ Regulatory compliance (explains deviations from plan)
|
|
1638
|
+
- ✅ Learning for future increments
|
|
1639
|
+
- ✅ Onboarding new team members (understand project history)
|
|
1640
|
+
|
|
1641
|
+
### Report Structure
|
|
1642
|
+
|
|
1643
|
+
**Location**: `.specweave/increments/{id}/reports/COMPLETION-REPORT.md`
|
|
1644
|
+
|
|
1645
|
+
**Sections**:
|
|
1646
|
+
1. **Original Scope**: What was planned at increment start
|
|
1647
|
+
2. **Scope Evolution**: Living log of changes (updated during increment)
|
|
1648
|
+
3. **Final Delivery**: What was actually delivered
|
|
1649
|
+
4. **What Changed and Why**: Rationale for scope changes
|
|
1650
|
+
5. **Lessons Learned**: What we learned for next time
|
|
1651
|
+
6. **Metrics**: Velocity, scope creep, test coverage, defects
|
|
1652
|
+
|
|
1653
|
+
### Workflow
|
|
1654
|
+
|
|
1655
|
+
**1. Initialize Report** (automatic when increment created):
|
|
1656
|
+
```bash
|
|
1657
|
+
/specweave:increment "User dashboard"
|
|
1658
|
+
# Creates: .specweave/increments/0008-user-dashboard/reports/COMPLETION-REPORT.md (v1.0)
|
|
1659
|
+
```
|
|
1660
|
+
|
|
1661
|
+
**2. Update During Work** (whenever scope changes):
|
|
1662
|
+
```bash
|
|
1663
|
+
# Quick log
|
|
1664
|
+
/specweave:update-scope "Added dark mode toggle (stakeholder request from CMO, +16 hours)"
|
|
1665
|
+
|
|
1666
|
+
# Or interactive
|
|
1667
|
+
/specweave:update-scope
|
|
1668
|
+
# Prompts:
|
|
1669
|
+
# - What changed? (Added/Removed/Modified)
|
|
1670
|
+
# - Why? (Business reason, technical blocker, etc.)
|
|
1671
|
+
# - Impact? (+/- hours)
|
|
1672
|
+
# - Who approved? (PM, stakeholder, etc.)
|
|
1673
|
+
# - Documentation? (ADR, GitHub issue, etc.)
|
|
1674
|
+
```
|
|
1675
|
+
|
|
1676
|
+
**3. Finalize at Completion** (via `/specweave:done`):
|
|
1677
|
+
```bash
|
|
1678
|
+
/specweave:done 0008
|
|
1679
|
+
# Validates report completeness
|
|
1680
|
+
# Prompts to fill any missing sections
|
|
1681
|
+
# Marks increment as complete
|
|
1682
|
+
```
|
|
1683
|
+
|
|
1684
|
+
### Example Entry
|
|
1685
|
+
|
|
1686
|
+
```markdown
|
|
1687
|
+
## Scope Evolution (Living Updates)
|
|
1688
|
+
|
|
1689
|
+
### 2025-11-06: Added user story
|
|
1690
|
+
|
|
1691
|
+
**Changed**: US6: Dark mode toggle
|
|
1692
|
+
**Reason**: Stakeholder request from CMO (high priority, blocks marketing launch)
|
|
1693
|
+
**Impact**: +16 hours
|
|
1694
|
+
**Decision**: PM + CMO
|
|
1695
|
+
**Documentation**: GitHub issue #45
|
|
1696
|
+
|
|
1697
|
+
---
|
|
1698
|
+
|
|
1699
|
+
### 2025-11-07: Removed/deferred user story
|
|
1700
|
+
|
|
1701
|
+
**Changed**: US3: Data export to CSV
|
|
1702
|
+
**Reason**: Not critical for MVP, can be added later without breaking changes
|
|
1703
|
+
**Impact**: -8 hours (deferred to increment 0009)
|
|
1704
|
+
**Decision**: PM
|
|
1705
|
+
**Documentation**: None
|
|
1706
|
+
|
|
1707
|
+
---
|
|
1708
|
+
|
|
1709
|
+
### 2025-11-08: Technical pivot (architecture change)
|
|
1710
|
+
|
|
1711
|
+
**Changed**: WebSockets → Long-polling
|
|
1712
|
+
**Reason**: WebSocket library had critical security vulnerability (CVE-2025-1234)
|
|
1713
|
+
**Impact**: -4 hours (simpler implementation)
|
|
1714
|
+
**Decision**: Architect + Security Lead
|
|
1715
|
+
**Documentation**: ADR-008: Why We Chose Polling Over WebSockets
|
|
1716
|
+
|
|
1717
|
+
---
|
|
1718
|
+
```
|
|
1719
|
+
|
|
1720
|
+
### When to Update
|
|
1721
|
+
|
|
1722
|
+
✅ **DO update** when:
|
|
1723
|
+
- Adding new user story or task
|
|
1724
|
+
- Removing/deferring work
|
|
1725
|
+
- Modifying scope of existing story
|
|
1726
|
+
- Making architecture pivots (technical decisions)
|
|
1727
|
+
- Reducing/expanding scope
|
|
1728
|
+
- Blocking issues discovered
|
|
1729
|
+
|
|
1730
|
+
❌ **DON'T update** for:
|
|
1731
|
+
- Bug fixes discovered during implementation (normal)
|
|
1732
|
+
- Minor implementation details
|
|
1733
|
+
- Code refactoring (unless scope-affecting)
|
|
1734
|
+
|
|
1735
|
+
### Best Practices
|
|
1736
|
+
|
|
1737
|
+
1. **Update in real-time**: Don't batch updates (capture context while fresh)
|
|
1738
|
+
2. **Be specific**: "Added US6: Dark mode" not "Added feature"
|
|
1739
|
+
3. **Include rationale**: Always answer WHY
|
|
1740
|
+
4. **Link to docs**: ADR, GitHub issue, Jira ticket
|
|
1741
|
+
5. **Track approvals**: Who made the decision
|
|
1742
|
+
6. **Quantify impact**: +/- hours for scope changes
|
|
1743
|
+
|
|
1744
|
+
### Commands
|
|
1745
|
+
|
|
1746
|
+
| Command | Purpose |
|
|
1747
|
+
|---------|---------|
|
|
1748
|
+
| `/specweave:increment "feature"` | Creates increment with initial completion report |
|
|
1749
|
+
| `/specweave:update-scope` | Log scope change during increment |
|
|
1750
|
+
| `/specweave:done <id>` | Finalize report and mark increment complete |
|
|
1751
|
+
|
|
1752
|
+
**See**: [update-scope.md](plugins/specweave/commands/update-scope.md) for detailed documentation
|
|
1753
|
+
|
|
1754
|
+
---
|
|
1755
|
+
|
|
1140
1756
|
## Development Workflow
|
|
1141
1757
|
|
|
1142
1758
|
### Making Changes
|
|
@@ -1146,7 +1762,7 @@ specweave/
|
|
|
1146
1762
|
**1. Editing Skills** (any plugin):
|
|
1147
1763
|
```bash
|
|
1148
1764
|
# Core plugin (auto-loaded):
|
|
1149
|
-
vim plugins/specweave/skills/
|
|
1765
|
+
vim plugins/specweave/skills/spec-generator/SKILL.md
|
|
1150
1766
|
|
|
1151
1767
|
# Other plugins (opt-in):
|
|
1152
1768
|
vim plugins/specweave-github/skills/github-sync/SKILL.md
|
|
@@ -1195,13 +1811,14 @@ npm run build && npm test
|
|
|
1195
1811
|
- Acceptance criteria in PRDs
|
|
1196
1812
|
- Manual validation
|
|
1197
1813
|
|
|
1198
|
-
2. **
|
|
1199
|
-
- Test
|
|
1200
|
-
-
|
|
1814
|
+
2. **Embedded Tests** (`.specweave/increments/####/tasks.md`)
|
|
1815
|
+
- Test plans embedded in tasks (BDD format, v0.7.0+)
|
|
1816
|
+
- AC-ID traceability (AC-US1-01, AC-US1-02, etc.)
|
|
1201
1817
|
|
|
1202
|
-
3. **
|
|
1203
|
-
-
|
|
1204
|
-
-
|
|
1818
|
+
3. **Integration Tests** (`tests/integration/{skill-name}/`)
|
|
1819
|
+
- Tests for plugin and skill functionality
|
|
1820
|
+
- Tool sync (github, ado, jira)
|
|
1821
|
+
- Brownfield detection and other integrations
|
|
1205
1822
|
- Run via: `npm run test:integration`
|
|
1206
1823
|
|
|
1207
1824
|
4. **Code Tests** (`tests/`)
|
|
@@ -1222,7 +1839,7 @@ npm run build && npm test
|
|
|
1222
1839
|
|
|
1223
1840
|
### Hooks and Automation
|
|
1224
1841
|
|
|
1225
|
-
**Post-Task Completion Hook
|
|
1842
|
+
**Post-Task Completion Hook** (`.claude/hooks/post-task-completion.sh`):
|
|
1226
1843
|
|
|
1227
1844
|
**Smart Session-End Detection**:
|
|
1228
1845
|
- ✅ Tracks inactivity gaps between TodoWrite calls
|
|
@@ -1255,10 +1872,54 @@ Solution: Inactivity-based detection
|
|
|
1255
1872
|
- Update `README.md` for user-facing changes
|
|
1256
1873
|
- Update `CHANGELOG.md` for API changes
|
|
1257
1874
|
|
|
1258
|
-
**Living Docs Sync** (after
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1875
|
+
**Living Docs Sync** (AUTOMATIC after task completion):
|
|
1876
|
+
|
|
1877
|
+
**The Critical Problem**: `.specweave/docs/internal/specs/` is the **permanent source of truth** for ALL completed work across the entire enterprise. Without automatic sync, this documentation becomes stale and incomplete.
|
|
1878
|
+
|
|
1879
|
+
**How It Works** (Automatic):
|
|
1880
|
+
1. **Hook Triggers**: After every task completion (TodoWrite), `post-task-completion.sh` fires
|
|
1881
|
+
2. **Sync Check**: Runs `dist/hooks/lib/sync-living-docs.js` to check if sync is needed
|
|
1882
|
+
3. **Automatic Sync**: If enabled in config, syncs increment specs to living docs
|
|
1883
|
+
4. **Result**: `.specweave/docs/internal/specs/spec-{id}.md` is always up-to-date
|
|
1884
|
+
|
|
1885
|
+
**Configuration** (`.specweave/config.json`):
|
|
1886
|
+
```json
|
|
1887
|
+
{
|
|
1888
|
+
"hooks": {
|
|
1889
|
+
"post_task_completion": {
|
|
1890
|
+
"sync_living_docs": true, // ✅ MUST be true!
|
|
1891
|
+
"sync_tasks_md": true, // Updates tasks.md with completion status
|
|
1892
|
+
"external_tracker_sync": true // Syncs to GitHub/Jira/ADO
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
```
|
|
1897
|
+
|
|
1898
|
+
**Manual Sync** (when automatic sync was disabled):
|
|
1899
|
+
```bash
|
|
1900
|
+
# Sync all completed increments to living docs
|
|
1901
|
+
/specweave:sync-docs update
|
|
1902
|
+
|
|
1903
|
+
# Or copy manually (emergency only):
|
|
1904
|
+
cp .specweave/increments/0001-core-framework/spec.md \
|
|
1905
|
+
.specweave/docs/internal/specs/spec-0001-core-framework.md
|
|
1906
|
+
```
|
|
1907
|
+
|
|
1908
|
+
**Verify Sync**:
|
|
1909
|
+
```bash
|
|
1910
|
+
# Check all synced specs
|
|
1911
|
+
ls -1 .specweave/docs/internal/specs/spec-*.md
|
|
1912
|
+
|
|
1913
|
+
# Should match number of completed increments
|
|
1914
|
+
ls -1 .specweave/increments/ | grep -E '^[0-9]{4}' | wc -l
|
|
1915
|
+
```
|
|
1916
|
+
|
|
1917
|
+
**Why This Matters**:
|
|
1918
|
+
- ✅ **Enterprise-level traceability**: Every increment's spec is permanently archived
|
|
1919
|
+
- ✅ **Cross-increment history**: See all work completed across the entire project
|
|
1920
|
+
- ✅ **Onboarding new developers**: Read specs to understand what was built and why
|
|
1921
|
+
- ✅ **Compliance & auditing**: Complete audit trail of all product decisions
|
|
1922
|
+
- ✅ **Living documentation**: Specs stay up-to-date without manual intervention
|
|
1262
1923
|
|
|
1263
1924
|
---
|
|
1264
1925
|
|
|
@@ -1330,7 +1991,7 @@ plugins/specweave-{name}/
|
|
|
1330
1991
|
```
|
|
1331
1992
|
Is this feature...
|
|
1332
1993
|
├─ Used by EVERY project? → specweave (auto-loaded)
|
|
1333
|
-
│ Examples: increment-planner,
|
|
1994
|
+
│ Examples: increment-planner, spec-generator, tdd-workflow, PM/Architect agents
|
|
1334
1995
|
│
|
|
1335
1996
|
├─ Part of increment lifecycle? → specweave (auto-loaded)
|
|
1336
1997
|
│ Examples: /specweave:inc, /specweave:do, living docs hooks
|
|
@@ -1433,9 +2094,53 @@ vim .claude-plugin/marketplace.json
|
|
|
1433
2094
|
|
|
1434
2095
|
## Release Process
|
|
1435
2096
|
|
|
2097
|
+
### Versioning Strategy
|
|
2098
|
+
|
|
2099
|
+
**IMPORTANT**: SpecWeave follows semantic versioning (semver), but version bumps are **MANUAL** and controlled:
|
|
2100
|
+
|
|
2101
|
+
**The Rules**:
|
|
2102
|
+
- ✅ **Patch version** (0.7.X) - Increment ONLY when explicitly requested by maintainer
|
|
2103
|
+
- ✅ **Minor version** (0.X.0) - Increment ONLY when maintainer says to
|
|
2104
|
+
- ✅ **Major version** (X.0.0) - Increment ONLY when maintainer says to
|
|
2105
|
+
- ❌ **NEVER auto-increment** versions after each increment completion
|
|
2106
|
+
|
|
2107
|
+
**Why Manual Control?**
|
|
2108
|
+
- Multiple increments may be part of the same release (e.g., 0.7.0 = increments 0006 + 0007 + 0008)
|
|
2109
|
+
- Version bumps signal user-facing releases, not internal development progress
|
|
2110
|
+
- Maintainer decides when features are ready to ship
|
|
2111
|
+
- Prevents version number inflation (e.g., jumping from 0.7.0 to 0.12.0 in one day)
|
|
2112
|
+
|
|
2113
|
+
**When Completing Increments**:
|
|
2114
|
+
```bash
|
|
2115
|
+
# ❌ WRONG - Don't auto-bump version
|
|
2116
|
+
git commit -m "feat: complete increment 0008"
|
|
2117
|
+
npm version patch # ❌ NO! Wait for maintainer approval
|
|
2118
|
+
|
|
2119
|
+
# ✅ CORRECT - Just commit the work
|
|
2120
|
+
git commit -m "feat: complete increment 0008"
|
|
2121
|
+
# Version stays at 0.7.0 until maintainer says to bump
|
|
2122
|
+
```
|
|
2123
|
+
|
|
2124
|
+
**When Maintainer Requests Version Bump**:
|
|
2125
|
+
```bash
|
|
2126
|
+
# Maintainer says: "Bump to 0.7.1"
|
|
2127
|
+
npm version patch # ✅ Now bump
|
|
2128
|
+
npm publish # ✅ And publish
|
|
2129
|
+
|
|
2130
|
+
# Maintainer says: "Bump to 0.8.0"
|
|
2131
|
+
npm version minor # ✅ New minor version
|
|
2132
|
+
npm publish
|
|
2133
|
+
```
|
|
2134
|
+
|
|
2135
|
+
**Summary**: Complete increments → commit code → maintainer decides when to bump version and publish.
|
|
2136
|
+
|
|
2137
|
+
---
|
|
2138
|
+
|
|
2139
|
+
### NPM Publishing
|
|
2140
|
+
|
|
1436
2141
|
**NPM Publishing**:
|
|
1437
2142
|
```bash
|
|
1438
|
-
# 1. Update version
|
|
2143
|
+
# 1. Update version (ONLY when maintainer requests)
|
|
1439
2144
|
npm version patch|minor|major
|
|
1440
2145
|
|
|
1441
2146
|
# 2. Update CHANGELOG.md
|
|
@@ -1496,7 +2201,7 @@ Other tools simply can't match these capabilities. The adapters remain in the co
|
|
|
1496
2201
|
- **Plugin components**: `plugins/specweave-{name}/{skills|agents|commands}/`
|
|
1497
2202
|
- **Tests**: `tests/integration/{component-name}/` or `tests/unit/`
|
|
1498
2203
|
|
|
1499
|
-
**For detailed instructions**: See "Adding a New Plugin (Contributors)" section above
|
|
2204
|
+
**For detailed instructions**: See "Adding a New Plugin (Contributors)" section above
|
|
1500
2205
|
|
|
1501
2206
|
### Update Documentation
|
|
1502
2207
|
|
|
@@ -1512,21 +2217,106 @@ vim docs-site/docs/guides/getting-started.md
|
|
|
1512
2217
|
cd docs-site && npm run build
|
|
1513
2218
|
```
|
|
1514
2219
|
|
|
2220
|
+
### Translation Workflow (Multilingual Support)
|
|
2221
|
+
|
|
2222
|
+
**SpecWeave supports multilingual development** via post-generation translation (Increment 0006).
|
|
2223
|
+
|
|
2224
|
+
**Key Concept**: Users work in their native language (great UX), system auto-translates to English (maintainable docs).
|
|
2225
|
+
|
|
2226
|
+
**Workflow**:
|
|
2227
|
+
|
|
2228
|
+
```bash
|
|
2229
|
+
# 1. User creates increment in Russian
|
|
2230
|
+
/specweave:increment "Добавить пользовательскую аутентификацию"
|
|
2231
|
+
|
|
2232
|
+
# 2. PM agent generates spec.md in Russian (natural, user-friendly)
|
|
2233
|
+
|
|
2234
|
+
# 3. post-increment-planning hook fires automatically
|
|
2235
|
+
# - Detects Russian content
|
|
2236
|
+
# - Translates spec.md, plan.md, tasks.md to English (~$0.01 cost)
|
|
2237
|
+
# - Files now in English (maintainable)
|
|
2238
|
+
|
|
2239
|
+
# User sees:
|
|
2240
|
+
# ✅ Increment created
|
|
2241
|
+
# 🌐 Detected Russian content. Translating to English...
|
|
2242
|
+
# 📄 spec.md... ✅
|
|
2243
|
+
# 📄 plan.md... ✅
|
|
2244
|
+
# 📄 tasks.md... ✅
|
|
2245
|
+
# ✅ Translation complete! Cost: ~$0.01
|
|
2246
|
+
```
|
|
2247
|
+
|
|
2248
|
+
**Configuration** (`.specweave/config.json`):
|
|
2249
|
+
|
|
2250
|
+
```json
|
|
2251
|
+
{
|
|
2252
|
+
"language": "ru",
|
|
2253
|
+
"translation": {
|
|
2254
|
+
"enabled": true,
|
|
2255
|
+
"autoTranslateInternalDocs": true,
|
|
2256
|
+
"autoTranslateLivingDocs": false,
|
|
2257
|
+
"keepFrameworkTerms": true,
|
|
2258
|
+
"keepTechnicalTerms": true,
|
|
2259
|
+
"translationModel": "haiku"
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
```
|
|
2263
|
+
|
|
2264
|
+
**Key Settings**:
|
|
2265
|
+
- `language`: Primary language (en, ru, es, zh, de, fr, ja, ko, pt)
|
|
2266
|
+
- `autoTranslateInternalDocs`: Auto-translate spec/plan/tasks to English (default: true)
|
|
2267
|
+
- `autoTranslateLivingDocs`: Auto-translate ADRs/HLDs after task completion (default: false)
|
|
2268
|
+
- `translationModel`: Model to use (haiku/sonnet/opus, default: haiku)
|
|
2269
|
+
|
|
2270
|
+
**Supported Languages**:
|
|
2271
|
+
- English (en)
|
|
2272
|
+
- Russian (ru)
|
|
2273
|
+
- Spanish (es)
|
|
2274
|
+
- Chinese (zh)
|
|
2275
|
+
- German (de)
|
|
2276
|
+
- French (fr)
|
|
2277
|
+
- Japanese (ja)
|
|
2278
|
+
- Korean (ko)
|
|
2279
|
+
- Portuguese (pt)
|
|
2280
|
+
|
|
2281
|
+
**Cost**: ~$0.01 per increment (3 files, Haiku model)
|
|
2282
|
+
|
|
2283
|
+
**Implementation Details**:
|
|
2284
|
+
- Language detection: Heuristic-based (<1ms, zero cost)
|
|
2285
|
+
- Code preservation: Never translates code blocks, inline code, or links
|
|
2286
|
+
- Validation: Checks heading count, code block count, link count, YAML structure
|
|
2287
|
+
- See: `.specweave/increments/0006-llm-native-i18n/reports/IMPLEMENTATION-COMPLETE.md`
|
|
2288
|
+
|
|
2289
|
+
**Testing Translation Utilities**:
|
|
2290
|
+
|
|
2291
|
+
```bash
|
|
2292
|
+
# Run translation unit tests
|
|
2293
|
+
npm test -- tests/unit/i18n/translation.test.ts
|
|
2294
|
+
|
|
2295
|
+
# Test result: 67/67 passing (100%)
|
|
2296
|
+
```
|
|
2297
|
+
|
|
2298
|
+
**Files**:
|
|
2299
|
+
- Utilities: `src/utils/translation.ts` (673 lines, 11 languages)
|
|
2300
|
+
- CLI Script: `src/hooks/lib/translate-file.ts` (398 lines)
|
|
2301
|
+
- Hook: `plugins/specweave/hooks/post-increment-planning.sh` (307 lines)
|
|
2302
|
+
- Tests: `tests/unit/i18n/translation.test.ts` (705 lines, 67 tests)
|
|
2303
|
+
- Schema: `src/core/schemas/specweave-config.schema.json`
|
|
2304
|
+
|
|
1515
2305
|
---
|
|
1516
2306
|
|
|
1517
2307
|
## Troubleshooting
|
|
1518
2308
|
|
|
1519
2309
|
**Skills not activating?**
|
|
1520
|
-
1. Check
|
|
1521
|
-
2. Verify
|
|
2310
|
+
1. Check plugin is installed: `/plugin list --installed`
|
|
2311
|
+
2. Verify YAML frontmatter in `plugins/{plugin}/skills/{skill}/SKILL.md`
|
|
1522
2312
|
3. Restart Claude Code
|
|
1523
2313
|
4. Check description has clear trigger keywords
|
|
1524
2314
|
|
|
1525
2315
|
**Commands not working?**
|
|
1526
|
-
1.
|
|
1527
|
-
2.
|
|
1528
|
-
3.
|
|
1529
|
-
4.
|
|
2316
|
+
1. Check plugin is installed: `/plugin list --installed`
|
|
2317
|
+
2. Verify command exists: `plugins/{plugin}/commands/{command}.md`
|
|
2318
|
+
3. Check YAML frontmatter
|
|
2319
|
+
4. Restart Claude Code
|
|
1530
2320
|
|
|
1531
2321
|
**Tests failing?**
|
|
1532
2322
|
1. Run `npm run build` first
|
|
@@ -1563,36 +2353,50 @@ cd docs-site && npm run build
|
|
|
1563
2353
|
|
|
1564
2354
|
**Commands (for SpecWeave development)**:
|
|
1565
2355
|
|
|
1566
|
-
|
|
1567
|
-
- `/inc "feature"` - Plan new increment
|
|
1568
|
-
- `/do` - Execute tasks (smart resume)
|
|
1569
|
-
- `/done 0002` - Close increment
|
|
1570
|
-
- `/validate 0002` - Validate increment
|
|
2356
|
+
**IMPORTANT**: All commands MUST use the `/specweave:*` namespace prefix to avoid conflicts with Claude Code's native commands.
|
|
1571
2357
|
|
|
1572
|
-
*
|
|
1573
|
-
- `/specweave:
|
|
2358
|
+
*Primary commands*:
|
|
2359
|
+
- `/specweave:increment "feature"` - Plan new increment
|
|
1574
2360
|
- `/specweave:do` - Execute tasks (smart resume)
|
|
1575
2361
|
- `/specweave:done 0002` - Close increment
|
|
1576
2362
|
- `/specweave:validate 0002` - Validate increment
|
|
1577
|
-
- `/specweave:
|
|
1578
|
-
- `/specweave:
|
|
2363
|
+
- `/specweave:qa 0002` - Quality assessment with risk scoring
|
|
2364
|
+
- `/specweave:status` - Show increment status overview
|
|
2365
|
+
- `/specweave:progress` - Check current increment progress
|
|
2366
|
+
- `/specweave:check-tests` - Validate test coverage (NEW format)
|
|
2367
|
+
|
|
2368
|
+
*State management (mostly automatic)*:
|
|
2369
|
+
- `/specweave:pause 0002 --reason="..."` - Pause active increment
|
|
2370
|
+
- `/specweave:resume 0002` - Resume paused increment
|
|
2371
|
+
- `/specweave:abandon 0002 --reason="..."` - Abandon increment
|
|
2372
|
+
|
|
2373
|
+
*Documentation sync*:
|
|
2374
|
+
- `/specweave:sync-docs update` - Sync living docs after implementation
|
|
2375
|
+
- `/specweave:sync-tasks` - Sync tasks with completion status
|
|
2376
|
+
|
|
2377
|
+
*Other commands*:
|
|
2378
|
+
- `/specweave:costs` - Show AI cost dashboard
|
|
2379
|
+
- `/specweave:translate` - Translate content
|
|
2380
|
+
- `/specweave:update-scope` - Log scope changes
|
|
2381
|
+
- `/specweave:next` - Smart increment transition
|
|
2382
|
+
|
|
2383
|
+
**NO SHORTCUTS**: Do NOT use shortcuts like `/inc`, `/do`, `/pause`, `/resume` etc. They conflict with Claude Code's native commands and will break functionality.
|
|
1579
2384
|
|
|
1580
|
-
**
|
|
2385
|
+
**File naming**: All commands are `specweave-{name}.md` (e.g., `specweave-increment.md`)
|
|
1581
2386
|
|
|
1582
2387
|
**Build & Test**:
|
|
1583
2388
|
- `npm run build` - Compile TypeScript
|
|
1584
|
-
- `npm test` - Run
|
|
2389
|
+
- `npm test` - Run unit tests (includes skill tests in `tests/unit/`, `tests/integration/`)
|
|
1585
2390
|
- `npm run test:e2e` - Run Playwright E2E tests
|
|
1586
2391
|
- `npm run test:integration` - Run integration tests
|
|
1587
|
-
- `npm run install:all` - Sync src/ to .claude/
|
|
1588
2392
|
|
|
1589
2393
|
**File Structure**:
|
|
1590
|
-
- Source of truth: `src/`
|
|
1591
|
-
-
|
|
2394
|
+
- Source of truth: `src/` (TypeScript) and `plugins/` (skills/agents/commands)
|
|
2395
|
+
- Plugin settings: `.claude/settings.json` (marketplace references)
|
|
1592
2396
|
- Increments: `.specweave/increments/`
|
|
1593
|
-
- Internal Docs
|
|
1594
|
-
- Public Docs
|
|
1595
|
-
- Tests: `tests/`
|
|
2397
|
+
- Internal Docs: `.specweave/docs/internal/` (strategy, architecture, ADRs)
|
|
2398
|
+
- Public Docs: `.specweave/docs/public/` and `docs-site/` (user guides, API docs)
|
|
2399
|
+
- Tests: `tests/` (unit, integration, E2E, skill tests)
|
|
1596
2400
|
|
|
1597
2401
|
---
|
|
1598
2402
|
|
|
@@ -1604,4 +2408,4 @@ cd docs-site && npm run build
|
|
|
1604
2408
|
5. Follow increment-based workflow
|
|
1605
2409
|
|
|
1606
2410
|
**SpecWeave Documentation**: https://spec-weave.com
|
|
1607
|
-
**Last Updated**: 2025-
|
|
2411
|
+
**Last Updated**: 2025-11-04
|