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
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Test-Aware Planner Templates
|
|
2
|
+
|
|
3
|
+
This directory contains templates for generating tasks.md with embedded test plans.
|
|
4
|
+
|
|
5
|
+
## Templates
|
|
6
|
+
|
|
7
|
+
### 1. task-testable.md.template
|
|
8
|
+
|
|
9
|
+
**Purpose**: Template for tasks that have automated tests (unit/integration/E2E)
|
|
10
|
+
|
|
11
|
+
**Variables**:
|
|
12
|
+
- `{task_number}`: Sequential task number (001, 002, 003, ...)
|
|
13
|
+
- `{task_title}`: Clear, action-oriented task description
|
|
14
|
+
- `{user_story}`: User story ID (US1, US2, ...)
|
|
15
|
+
- `{ac_ids}`: Acceptance criteria IDs (AC-US1-01, AC-US1-02)
|
|
16
|
+
- `{priority}`: Priority level (P0, P1, P2)
|
|
17
|
+
- `{estimate}`: Time estimate in hours (2-8 typical)
|
|
18
|
+
|
|
19
|
+
**Test Plan Variables**:
|
|
20
|
+
- `{given_condition}`: Precondition/setup
|
|
21
|
+
- `{when_action}`: Action or event
|
|
22
|
+
- `{then_outcome}`: Expected result
|
|
23
|
+
- `{and_additional}`: Additional conditions (optional)
|
|
24
|
+
|
|
25
|
+
**Test Cases Variables**:
|
|
26
|
+
- `{unit_test_path}`: Path to unit test file (e.g., `tests/unit/feature.test.ts`)
|
|
27
|
+
- `{testFunction1}`, `{testFunction2}`: Test function names
|
|
28
|
+
- `{test1_description}`: One-line test description
|
|
29
|
+
- `{unit_coverage}`: Coverage target for unit tests (85-95%)
|
|
30
|
+
- `{integration_test_path}`: Path to integration test file
|
|
31
|
+
- `{integration_coverage}`: Coverage target for integration tests (80-90%)
|
|
32
|
+
- `{e2e_test_path}`: Path to E2E test file (optional)
|
|
33
|
+
- `{overall_coverage}`: Overall coverage target (80-90%)
|
|
34
|
+
|
|
35
|
+
**Implementation Variables**:
|
|
36
|
+
- `{step1}`, `{step2}`, ...: Implementation steps
|
|
37
|
+
- `{unit_test_count}`: Number of unit tests
|
|
38
|
+
- `{int_test_count}`: Number of integration tests
|
|
39
|
+
- `{e2e_test_count}`: Number of E2E tests (optional)
|
|
40
|
+
- `{unit_test_command}`: Command to run unit tests
|
|
41
|
+
- `{int_test_command}`: Command to run integration tests
|
|
42
|
+
- `{e2e_test_command}`: Command to run E2E tests
|
|
43
|
+
|
|
44
|
+
**TDD Workflow Variables**:
|
|
45
|
+
- `{total_test_count}`: Total number of tests across all levels
|
|
46
|
+
- `{feature_name}`: Name of feature being implemented
|
|
47
|
+
- `{impl_step_count}`: Number of implementation steps
|
|
48
|
+
|
|
49
|
+
### 2. task-non-testable.md.template
|
|
50
|
+
|
|
51
|
+
**Purpose**: Template for tasks without automated tests (documentation, configuration, manual processes)
|
|
52
|
+
|
|
53
|
+
**Variables**:
|
|
54
|
+
- Same header variables as testable template (task_number, task_title, etc.)
|
|
55
|
+
- `{task_type}`: Type of task (documentation, configuration, deployment, etc.)
|
|
56
|
+
|
|
57
|
+
**Validation Variables**:
|
|
58
|
+
- `{validation1}`, `{validation2}`: Validation methods
|
|
59
|
+
- `{validation1_description}`: What to check/verify
|
|
60
|
+
- `{validation_command}`: Command to run validation
|
|
61
|
+
- `{review_criteria}`: Manual review criteria
|
|
62
|
+
|
|
63
|
+
### 3. tasks-frontmatter.md.template
|
|
64
|
+
|
|
65
|
+
**Purpose**: Template for tasks.md file header (YAML frontmatter)
|
|
66
|
+
|
|
67
|
+
**Variables**:
|
|
68
|
+
- `{increment_id}`: Increment ID (e.g., 0007-smart-increment-discipline)
|
|
69
|
+
- `{total_tasks}`: Total number of tasks
|
|
70
|
+
- `{test_mode}`: TDD or standard
|
|
71
|
+
- `{coverage_target}`: Overall coverage target (80-90%)
|
|
72
|
+
- `{tasks_content}`: Concatenated tasks from other templates
|
|
73
|
+
|
|
74
|
+
## Usage Example
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
// Pseudo-code for using templates
|
|
78
|
+
|
|
79
|
+
const taskTemplate = fs.readFileSync('task-testable.md.template', 'utf-8');
|
|
80
|
+
|
|
81
|
+
const taskContent = taskTemplate
|
|
82
|
+
.replace('{task_number}', '001')
|
|
83
|
+
.replace('{task_title}', 'Implement User Authentication')
|
|
84
|
+
.replace('{user_story}', 'US1')
|
|
85
|
+
.replace('{ac_ids}', 'AC-US1-01, AC-US1-02')
|
|
86
|
+
.replace('{priority}', 'P1')
|
|
87
|
+
.replace('{estimate}', '6')
|
|
88
|
+
.replace('{given_condition}', 'a registered user with email "test@example.com"')
|
|
89
|
+
.replace('{when_action}', 'they submit valid credentials')
|
|
90
|
+
.replace('{then_outcome}', 'they should be redirected to dashboard')
|
|
91
|
+
.replace('{and_additional}', 'session cookie should be created')
|
|
92
|
+
// ... replace all other variables
|
|
93
|
+
|
|
94
|
+
// Repeat for each task, then assemble into tasks.md
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Template Design Principles
|
|
98
|
+
|
|
99
|
+
1. **Consistency**: All tasks follow the same structure
|
|
100
|
+
2. **Flexibility**: Optional sections (E2E tests, And clauses) can be removed
|
|
101
|
+
3. **Clarity**: Variable names are self-explanatory
|
|
102
|
+
4. **Completeness**: All required sections included
|
|
103
|
+
5. **Validation**: Templates match ARCHITECTURE-PIVOT.md format
|
|
104
|
+
|
|
105
|
+
## Template Validation
|
|
106
|
+
|
|
107
|
+
Before using templates, verify:
|
|
108
|
+
- [ ] All variables are documented
|
|
109
|
+
- [ ] Format matches ARCHITECTURE-PIVOT.md
|
|
110
|
+
- [ ] Examples in AGENT.md use these templates
|
|
111
|
+
- [ ] Both testable and non-testable scenarios covered
|
|
112
|
+
- [ ] TDD workflow optional but included
|
|
113
|
+
|
|
114
|
+
## Further Reading
|
|
115
|
+
|
|
116
|
+
- AGENT.md: Complete agent workflow using these templates
|
|
117
|
+
- ARCHITECTURE-PIVOT.md: Rationale for embedded test format
|
|
118
|
+
- tasks.md: Real example of template output (dogfooding in increment 0007)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
### T-{task_number}: {task_title}
|
|
2
|
+
|
|
3
|
+
**User Story**: {user_story}
|
|
4
|
+
**Acceptance Criteria**: {ac_ids}
|
|
5
|
+
**Priority**: {priority}
|
|
6
|
+
**Estimate**: {estimate} hours
|
|
7
|
+
**Status**: [ ] pending
|
|
8
|
+
|
|
9
|
+
**Test Plan**: N/A ({task_type} task)
|
|
10
|
+
|
|
11
|
+
**Validation**:
|
|
12
|
+
- {validation1}: {validation1_description}
|
|
13
|
+
- {validation2}: {validation2_description}
|
|
14
|
+
- {validation3}: {validation3_description}
|
|
15
|
+
- {validation4}: {validation4_description} (add more as needed)
|
|
16
|
+
|
|
17
|
+
**Implementation**:
|
|
18
|
+
1. {step1}
|
|
19
|
+
2. {step2}
|
|
20
|
+
3. {step3}
|
|
21
|
+
4. {step4}
|
|
22
|
+
5. {step5}
|
|
23
|
+
6. Run validation: {validation_command}
|
|
24
|
+
7. Manual review: {review_criteria}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
### T-{task_number}: {task_title}
|
|
2
|
+
|
|
3
|
+
**User Story**: {user_story}
|
|
4
|
+
**Acceptance Criteria**: {ac_ids}
|
|
5
|
+
**Priority**: {priority}
|
|
6
|
+
**Estimate**: {estimate} hours
|
|
7
|
+
**Status**: [ ] pending
|
|
8
|
+
|
|
9
|
+
**Test Plan**:
|
|
10
|
+
- **Given** {given_condition}
|
|
11
|
+
- **When** {when_action}
|
|
12
|
+
- **Then** {then_outcome}
|
|
13
|
+
- **And** {and_additional} (optional, remove if not needed)
|
|
14
|
+
|
|
15
|
+
**Test Cases**:
|
|
16
|
+
1. **Unit**: `{unit_test_path}`
|
|
17
|
+
- {testFunction1}(): {test1_description}
|
|
18
|
+
- {testFunction2}(): {test2_description}
|
|
19
|
+
- {testFunction3}(): {test3_description} (add more as needed)
|
|
20
|
+
- **Coverage Target**: {unit_coverage}%
|
|
21
|
+
|
|
22
|
+
2. **Integration**: `{integration_test_path}`
|
|
23
|
+
- {testIntegration1}(): {integration1_description}
|
|
24
|
+
- {testIntegration2}(): {integration2_description} (add more as needed)
|
|
25
|
+
- **Coverage Target**: {integration_coverage}%
|
|
26
|
+
|
|
27
|
+
3. **E2E**: `{e2e_test_path}` (optional, include only for user-facing features)
|
|
28
|
+
- {testE2E1}(): {e2e1_description}
|
|
29
|
+
- **Coverage Target**: 100% (critical path)
|
|
30
|
+
|
|
31
|
+
**Overall Coverage Target**: {overall_coverage}%
|
|
32
|
+
|
|
33
|
+
**Implementation**:
|
|
34
|
+
1. {step1}
|
|
35
|
+
2. {step2}
|
|
36
|
+
3. {step3}
|
|
37
|
+
4. {step4}
|
|
38
|
+
5. {step5}
|
|
39
|
+
6. Write unit tests ({unit_test_count} tests)
|
|
40
|
+
7. Run unit tests: `{unit_test_command}` (should pass: {unit_test_count}/{unit_test_count})
|
|
41
|
+
8. Write integration tests ({int_test_count} tests)
|
|
42
|
+
9. Run integration tests: `{int_test_command}` (should pass: {int_test_count}/{int_test_count})
|
|
43
|
+
10. (Optional) Write E2E tests ({e2e_test_count} tests)
|
|
44
|
+
11. (Optional) Run E2E tests: `{e2e_test_command}` (should pass: {e2e_test_count}/{e2e_test_count})
|
|
45
|
+
12. Verify coverage: `npm run coverage` (should be ≥{overall_coverage}%)
|
|
46
|
+
|
|
47
|
+
**TDD Workflow** (if TDD mode enabled):
|
|
48
|
+
1. 📝 Write all {total_test_count} tests above (should fail)
|
|
49
|
+
2. ❌ Run tests: `npm test` (0/{total_test_count} passing)
|
|
50
|
+
3. ✅ Implement {feature_name} (steps 1-{impl_step_count} from Implementation)
|
|
51
|
+
4. 🟢 Run tests: `npm test` ({total_test_count}/{total_test_count} passing)
|
|
52
|
+
5. ♻️ Refactor if needed (maintain green tests)
|
|
53
|
+
6. ✅ Final check: Coverage ≥{overall_coverage}%
|
|
@@ -1,196 +1,121 @@
|
|
|
1
|
-
# SpecWeave
|
|
1
|
+
# SpecWeave Commands
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
All SpecWeave commands are namespaced for brownfield safety and follow a consistent naming pattern.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## ⚠️ CRITICAL: No Shortcuts Allowed
|
|
6
6
|
|
|
7
|
-
**IMPORTANT**:
|
|
7
|
+
**IMPORTANT**: SpecWeave commands MUST be invoked with the `/specweave:*` namespace prefix.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Why?** Shortcuts like `/inc`, `/do`, `/pause`, `/resume` conflict with Claude Code's native commands and break functionality.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|---------|--------------------------|-------------|
|
|
13
|
-
| `/specweave:increment` | `/specweave inc` | Plan increment (PM-led, auto-closes previous if ready) |
|
|
14
|
-
| `/specweave:inc` | `/specweave inc` | Alias for /specweave:increment |
|
|
15
|
-
| `/specweave:do` | `/specweave do` | Execute work (smart resume, hooks after every task) |
|
|
16
|
-
| `/specweave:next` | `/specweave next` | Smart transition (close + suggest next) |
|
|
17
|
-
| `/specweave:progress` | `/specweave progress` | Show status (task %, PM gates, next action) |
|
|
18
|
-
| `/specweave:validate` | `/specweave validate` | Validate quality (rule-based + optional LLM judge) |
|
|
19
|
-
| `/specweave:done` | `/specweave done` | Close explicitly (optional, /inc auto-closes) |
|
|
11
|
+
**Always use**: `/specweave:increment`, `/specweave:do`, `/specweave:resume`, etc.
|
|
20
12
|
|
|
21
|
-
|
|
13
|
+
## Command Naming Convention
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| `/specweave:sync-docs` | `/specweave sync-docs` | Review strategic docs vs implementation |
|
|
27
|
-
| `/specweave:sync-github` | `/specweave sync-github` | Sync increment to GitHub issues with granular control |
|
|
28
|
-
| `/specweave:sync-jira` | `/specweave sync-jira` | Sync increment to Jira epics/stories with granular control |
|
|
15
|
+
**All command files**: `specweave-{command-name}.md`
|
|
16
|
+
**YAML name field**: `{command-name}` (without `specweave-` prefix)
|
|
17
|
+
**Invocation**: `/specweave:{command-name}` (namespace prefix required)
|
|
29
18
|
|
|
30
|
-
###
|
|
19
|
+
### Example:
|
|
20
|
+
- **File**: `specweave-increment.md`
|
|
21
|
+
- **YAML**:
|
|
22
|
+
```yaml
|
|
23
|
+
---
|
|
24
|
+
name: increment
|
|
25
|
+
description: Plan new Product Increment
|
|
26
|
+
---
|
|
27
|
+
```
|
|
28
|
+
- **Usage**: `/specweave:increment` (ONLY form, no shortcuts)
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|---------|-------------|
|
|
34
|
-
| `/specweave` | Master router for all subcommands (use `/specweave <subcommand>`) |
|
|
30
|
+
## All Available Commands
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
### Core Lifecycle (7 commands)
|
|
33
|
+
1. `specweave-increment.md` - Create increment → `/specweave:increment`
|
|
34
|
+
2. `specweave-do.md` - Execute tasks → `/specweave:do`
|
|
35
|
+
3. `specweave-done.md` - Close increment → `/specweave:done`
|
|
36
|
+
4. `specweave-next.md` - Smart transition → `/specweave:next`
|
|
37
|
+
5. `specweave-progress.md` - Current progress → `/specweave:progress`
|
|
38
|
+
6. `specweave-validate.md` - Validate quality → `/specweave:validate`
|
|
39
|
+
7. `specweave-sync-docs.md` - Sync documentation → `/specweave:sync-docs`
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
### Status & Reporting (4 commands)
|
|
42
|
+
8. `specweave-status.md` - All increments overview → `/specweave:status`
|
|
43
|
+
9. `specweave-costs.md` - AI cost dashboard → `/specweave:costs`
|
|
44
|
+
10. `specweave-update-scope.md` - Update completion report → `/specweave:update-scope`
|
|
45
|
+
11. `specweave-qa.md` - Quality assessment → `/specweave:qa`
|
|
39
46
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
5. ✅ **Natural flow**: finish → start next without administrative overhead
|
|
47
|
+
### State Management (3 commands)
|
|
48
|
+
12. `specweave-pause.md` - Pause increment → `/specweave:pause`
|
|
49
|
+
13. `specweave-resume.md` - Resume increment → `/specweave:resume`
|
|
50
|
+
14. `specweave-abandon.md` - Abandon increment → `/specweave:abandon`
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
### Testing & Quality (2 commands)
|
|
53
|
+
15. `specweave-check-tests.md` - Validate test coverage → `/specweave:check-tests`
|
|
54
|
+
16. `specweave-sync-tasks.md` - Sync tasks with GitHub → `/specweave:sync-tasks`
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
### TDD Workflow (4 commands)
|
|
57
|
+
17. `specweave-tdd-red.md` - Write failing tests → `/specweave:tdd-red`
|
|
58
|
+
18. `specweave-tdd-green.md` - Make tests pass → `/specweave:tdd-green`
|
|
59
|
+
19. `specweave-tdd-refactor.md` - Refactor code → `/specweave:tdd-refactor`
|
|
60
|
+
20. `specweave-tdd-cycle.md` - Full TDD cycle → `/specweave:tdd-cycle`
|
|
49
61
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
### Utilities (2 commands)
|
|
63
|
+
21. `specweave-translate.md` - Batch translation → `/specweave:translate`
|
|
64
|
+
22. `specweave.md` - Master router → `/specweave`
|
|
53
65
|
|
|
54
|
-
|
|
55
|
-
/specweave inc "AI-powered customer support chatbot"
|
|
56
|
-
# PM creates: spec.md + plan.md + tasks.md (auto-generated!) + tests.md
|
|
66
|
+
**Total**: 22 commands (down from 31, removed 8 duplicates/deprecated, removed 1 redundant)
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
/specweave do
|
|
60
|
-
# Auto-resumes from next incomplete task
|
|
61
|
-
# Hooks run after EVERY task completion
|
|
68
|
+
## Command Categories
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
- **ESSENTIAL**: increment, do, done, next, progress, validate, sync-docs
|
|
71
|
+
- **IMPORTANT**: status, qa, check-tests, update-scope, costs, translate
|
|
72
|
+
- **STATE MANAGEMENT**: pause, resume, abandon
|
|
73
|
+
- **OPTIONAL**: TDD workflow commands, sync-tasks
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
/specweave do
|
|
69
|
-
# Picks up where you left off automatically
|
|
75
|
+
## Removed/Deprecated Commands
|
|
70
76
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
**Duplicates removed** (v0.7.0 refactoring):
|
|
78
|
+
- ❌ `inc.md` → Use `/specweave:increment`
|
|
79
|
+
- ❌ `status.md` → Use `/specweave:status`
|
|
80
|
+
- ❌ `pause.md` → Use `/specweave:pause`
|
|
81
|
+
- ❌ `resume.md` → Use `/specweave:resume`
|
|
82
|
+
- ❌ `abandon.md` → Use `/specweave:abandon`
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
**Deprecated commands**:
|
|
85
|
+
- ❌ `validate-coverage.md` → Use `/specweave:check-tests` (NEW format)
|
|
86
|
+
- ❌ `specweave-validate-coverage.md` → Use `/specweave:check-tests`
|
|
80
87
|
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
**Redundant commands**:
|
|
89
|
+
- ❌ `list-increments.md` → Use `/specweave:status` (same functionality)
|
|
83
90
|
|
|
84
|
-
##
|
|
91
|
+
## Brownfield Safety
|
|
85
92
|
|
|
86
|
-
|
|
93
|
+
All commands are namespaced to prevent collisions with existing project commands:
|
|
94
|
+
- ✅ **Namespace form**: `/specweave:increment` (ONLY way, always safe)
|
|
95
|
+
- ❌ **No shortcuts**: Do NOT use `/inc`, `/do`, `/pause`, `/resume` etc.
|
|
87
96
|
|
|
88
|
-
|
|
89
|
-
- ✅ Clear ownership (framework vs. project commands)
|
|
90
|
-
- ✅ Use master router `/specweave` for convenience
|
|
91
|
-
- ✅ Brownfield projects can adopt SpecWeave without risk
|
|
97
|
+
## Command Usage Philosophy
|
|
92
98
|
|
|
93
|
-
**
|
|
99
|
+
**Correct usage** (namespace prefix required):
|
|
94
100
|
```bash
|
|
95
|
-
/specweave
|
|
96
|
-
/specweave
|
|
97
|
-
/specweave
|
|
98
|
-
/specweave
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
## Command Design Philosophy
|
|
102
|
-
|
|
103
|
-
### 1. Natural Flow Without Overhead
|
|
104
|
-
|
|
105
|
-
**Problem with traditional workflows**:
|
|
106
|
-
- Manual task tracking ("which task am I on?")
|
|
107
|
-
- Manual closure ("do I need to close this?")
|
|
108
|
-
- Administrative overhead ("update project board")
|
|
109
|
-
|
|
110
|
-
**SpecWeave solution**:
|
|
111
|
-
- `/do` auto-resumes (no tracking needed)
|
|
112
|
-
- `/inc` auto-closes if ready (no manual /done needed)
|
|
113
|
-
- `/progress` shows status anytime (no board updates)
|
|
114
|
-
|
|
115
|
-
### 2. Suggest, Never Force
|
|
116
|
-
|
|
117
|
-
**Critical principle**: User always in control.
|
|
118
|
-
|
|
119
|
-
**Example**: When starting new increment while previous incomplete:
|
|
101
|
+
/specweave:increment "feature" # Create increment
|
|
102
|
+
/specweave:do # Execute tasks
|
|
103
|
+
/specweave:status # Check progress
|
|
104
|
+
/specweave:qa 0007 # Quality check
|
|
105
|
+
/specweave:done 0007 # Close increment
|
|
120
106
|
```
|
|
121
|
-
/inc "new feature"
|
|
122
|
-
|
|
123
|
-
📊 Checking previous increment 0001-authentication...
|
|
124
|
-
Status: in-progress
|
|
125
|
-
PM Gates: ❌ 2 P1 tasks remaining
|
|
126
|
-
|
|
127
|
-
❌ Cannot auto-close 0001 (incomplete)
|
|
128
|
-
|
|
129
|
-
Options:
|
|
130
|
-
A) Complete 0001 first (recommended)
|
|
131
|
-
→ Finish remaining work before starting new
|
|
132
|
-
|
|
133
|
-
B) Move incomplete tasks to 0002
|
|
134
|
-
→ Transfer T006, T007 to new increment
|
|
135
|
-
→ Close 0001 as "completed with deferrals"
|
|
136
|
-
|
|
137
|
-
C) Cancel new increment
|
|
138
|
-
→ Stay on 0001, continue working
|
|
139
|
-
→ Retry /inc when ready
|
|
140
|
-
|
|
141
|
-
Your choice? _
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**Never**: "Auto-closed 0001 with incomplete work" (surprising, loses context)
|
|
145
107
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
**Only show complexity when needed**:
|
|
149
|
-
- ✅ Happy path: `/inc` → Auto-close, create new (1 step)
|
|
150
|
-
- ⚠️ Issues found: Show options, explain, let user decide
|
|
151
|
-
|
|
152
|
-
## Installation
|
|
153
|
-
|
|
154
|
-
Commands are automatically installed when you:
|
|
155
|
-
- Run `specweave init` (new projects)
|
|
156
|
-
- Install SpecWeave as dependency (`npm install specweave --save-dev`)
|
|
157
|
-
|
|
158
|
-
For manual installation:
|
|
108
|
+
**Incorrect usage** (DO NOT USE):
|
|
159
109
|
```bash
|
|
160
|
-
|
|
110
|
+
/inc "feature" # ❌ Conflicts with Claude Code native commands
|
|
111
|
+
/do # ❌ Conflicts with Claude Code native commands
|
|
112
|
+
/status # ❌ Conflicts with Claude Code native commands
|
|
113
|
+
/pause 0007 # ❌ Conflicts with Claude Code native commands
|
|
114
|
+
/resume 0007 # ❌ Conflicts with Claude Code native commands
|
|
161
115
|
```
|
|
162
116
|
|
|
163
|
-
##
|
|
164
|
-
|
|
165
|
-
You can create project-specific commands:
|
|
166
|
-
|
|
167
|
-
**1. Create `.claude/commands/custom.md`**:
|
|
168
|
-
```markdown
|
|
169
|
-
---
|
|
170
|
-
name: custom
|
|
171
|
-
description: Your custom command description
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
# Custom Command
|
|
175
|
-
|
|
176
|
-
[Your command implementation]
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
**2. Use it**:
|
|
180
|
-
```bash
|
|
181
|
-
/custom
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
## Documentation
|
|
185
|
-
|
|
186
|
-
- **Command Reference**: See `.claude/commands/` for all command implementations
|
|
187
|
-
- **CLAUDE.md**: Quick reference table with all commands
|
|
188
|
-
- **Official Docs**: https://spec-weave.com/docs/commands
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
**💡 Pro Tip**: Master the smart workflow - natural append-only progression!
|
|
193
|
-
|
|
194
|
-
**Core cycle**: `/inc` (plan) → `/do` (implement) → `/progress` (check) → `/inc` (next)
|
|
117
|
+
## See Also
|
|
195
118
|
|
|
196
|
-
**
|
|
119
|
+
- **User Documentation**: https://spec-weave.com/docs/commands
|
|
120
|
+
- **CLAUDE.md**: Project contributor guide with complete command reference
|
|
121
|
+
- **Plugin Marketplace**: `.claude-plugin/marketplace.json`
|