specweave 0.23.18 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +93 -49
- package/CLAUDE.md +137 -4
- package/dist/src/cli/helpers/ado-area-path-mapper.d.ts +89 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.js +213 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts +29 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +109 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado.js +2 -0
- package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
- package/dist/src/cli/helpers/smart-filter.d.ts +83 -0
- package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -0
- package/dist/src/cli/helpers/smart-filter.js +265 -0
- package/dist/src/cli/helpers/smart-filter.js.map +1 -0
- package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
- package/dist/src/core/qa/quality-gate-decider.js +2 -2
- package/dist/src/core/qa/quality-gate-decider.js.map +1 -1
- package/dist/src/core/qa/risk-calculator.d.ts +2 -2
- package/dist/src/core/qa/risk-calculator.js +2 -2
- package/dist/src/core/validators/ac-presence-validator.d.ts +56 -0
- package/dist/src/core/validators/ac-presence-validator.d.ts.map +1 -0
- package/dist/src/core/validators/ac-presence-validator.js +149 -0
- package/dist/src/core/validators/ac-presence-validator.js.map +1 -0
- package/dist/src/integrations/ado/area-path-mapper.d.ts +137 -0
- package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -0
- package/dist/src/integrations/ado/area-path-mapper.js +267 -0
- package/dist/src/integrations/ado/area-path-mapper.js.map +1 -0
- package/dist/src/integrations/jira/filter-processor.d.ts +126 -0
- package/dist/src/integrations/jira/filter-processor.d.ts.map +1 -0
- package/dist/src/integrations/jira/filter-processor.js +207 -0
- package/dist/src/integrations/jira/filter-processor.js.map +1 -0
- package/dist/src/integrations/jira/jira-client.d.ts +13 -0
- package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-client.js +33 -0
- package/dist/src/integrations/jira/jira-client.js.map +1 -1
- package/dist/src/utils/ac-embedder.d.ts +63 -0
- package/dist/src/utils/ac-embedder.d.ts.map +1 -0
- package/dist/src/utils/ac-embedder.js +217 -0
- package/dist/src/utils/ac-embedder.js.map +1 -0
- package/dist/src/utils/env-manager.d.ts +86 -0
- package/dist/src/utils/env-manager.d.ts.map +1 -0
- package/dist/src/utils/env-manager.js +188 -0
- package/dist/src/utils/env-manager.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave/agents/AGENTS-INDEX.md +1 -1
- package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +9 -9
- package/plugins/specweave/commands/specweave-do.md +37 -0
- package/plugins/specweave/commands/specweave-done.md +159 -0
- package/plugins/specweave/commands/specweave-embed-acs.md +446 -0
- package/plugins/specweave/commands/specweave-next.md +148 -3
- package/plugins/specweave/commands/specweave-qa.md +2 -2
- package/plugins/specweave/hooks/pre-increment-start.sh +168 -0
- package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
- package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ado/commands/specweave-ado-import-projects.md +331 -0
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-alternatives/commands/alternatives-analyze.md +336 -0
- package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +651 -0
- package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +420 -0
- package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +487 -0
- package/plugins/specweave-backend/commands/api-scaffold.md +80 -0
- package/plugins/specweave-backend/commands/crud-generate.md +109 -0
- package/plugins/specweave-backend/commands/migration-generate.md +139 -0
- package/plugins/specweave-confluent/commands/connector-deploy.md +154 -0
- package/plugins/specweave-confluent/commands/ksqldb-query.md +179 -0
- package/plugins/specweave-confluent/commands/schema-register.md +123 -0
- package/plugins/specweave-core/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-core/commands/architecture-review.md +288 -0
- package/plugins/specweave-core/commands/code-review.md +213 -0
- package/plugins/specweave-core/commands/refactor-plan.md +249 -0
- package/plugins/specweave-core/skills/code-quality/SKILL.md +157 -0
- package/plugins/specweave-core/skills/design-patterns/SKILL.md +244 -0
- package/plugins/specweave-core/skills/software-architecture/SKILL.md +83 -0
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +22 -0
- package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +360 -0
- package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +480 -0
- package/plugins/specweave-cost-optimizer/skills/aws-cost-expert/SKILL.md +416 -0
- package/plugins/specweave-cost-optimizer/skills/cloud-pricing/SKILL.md +325 -0
- package/plugins/specweave-cost-optimizer/skills/cost-optimization/SKILL.md +337 -0
- package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-diagrams/commands/diagrams-generate.md +168 -0
- package/plugins/specweave-docs/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-docs/commands/docs-generate.md +441 -0
- package/plugins/specweave-docs/commands/docs-init.md +334 -0
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +581 -0
- package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +689 -0
- package/plugins/specweave-docs/skills/technical-writing/SKILL.md +1039 -0
- package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-figma/.claude-plugin/plugin.json +23 -0
- package/plugins/specweave-figma/commands/figma-import.md +690 -0
- package/plugins/specweave-figma/commands/figma-to-react.md +834 -0
- package/plugins/specweave-figma/commands/figma-tokens.md +815 -0
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +387 -0
- package/plugins/specweave-frontend/agents/frontend-architect/README.md +385 -0
- package/plugins/specweave-frontend/agents/frontend-architect/examples.md +590 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/component-template.tsx +152 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/hook-template.ts +311 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/page-template.tsx +228 -0
- package/plugins/specweave-frontend/commands/component-generate.md +510 -0
- package/plugins/specweave-frontend/commands/design-system-init.md +494 -0
- package/plugins/specweave-frontend/commands/frontend-scaffold.md +207 -0
- package/plugins/specweave-frontend/commands/nextjs-setup.md +396 -0
- package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +278 -0
- package/plugins/specweave-frontend/skills/frontend/SKILL.md +420 -0
- package/plugins/specweave-frontend/skills/nextjs/SKILL.md +546 -0
- package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +194 -0
- package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/commands/import-projects.js +183 -0
- package/plugins/specweave-jira/commands/import-projects.md +97 -0
- package/plugins/specweave-jira/commands/import-projects.ts +288 -0
- package/plugins/specweave-jira/commands/specweave-jira-import-projects.md +298 -0
- package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kubernetes/commands/cluster-setup.md +262 -0
- package/plugins/specweave-kubernetes/commands/deployment-generate.md +242 -0
- package/plugins/specweave-kubernetes/commands/helm-scaffold.md +333 -0
- package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-mobile/commands/app-scaffold.md +233 -0
- package/plugins/specweave-mobile/commands/build-config.md +256 -0
- package/plugins/specweave-mobile/commands/screen-generate.md +289 -0
- package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +13 -12
- package/plugins/specweave-plugin-dev/commands/plugin-create.md +333 -0
- package/plugins/specweave-plugin-dev/commands/plugin-publish.md +339 -0
- package/plugins/specweave-plugin-dev/commands/plugin-test.md +293 -0
- package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +162 -0
- package/plugins/specweave-plugin-dev/skills/marketplace-publishing/SKILL.md +263 -0
- package/plugins/specweave-plugin-dev/skills/plugin-development/SKILL.md +316 -0
- package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-release/commands/specweave-release-npm.md +110 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +168 -0
- package/plugins/specweave-testing/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-testing/agents/qa-engineer/AGENT.md +797 -0
- package/plugins/specweave-testing/agents/qa-engineer/README.md +443 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/playwright-e2e-test.ts +470 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/test-data-factory.ts +507 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/vitest-unit-test.ts +400 -0
- package/plugins/specweave-testing/agents/qa-engineer/test-strategies.md +726 -0
- package/plugins/specweave-testing/commands/e2e-setup.md +1081 -0
- package/plugins/specweave-testing/commands/test-coverage.md +979 -0
- package/plugins/specweave-testing/commands/test-generate.md +1156 -0
- package/plugins/specweave-testing/commands/test-init.md +409 -0
- package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +769 -0
- package/plugins/specweave-testing/skills/tdd-expert/SKILL.md +934 -0
- package/plugins/specweave-testing/skills/unit-testing-expert/SKILL.md +1011 -0
- package/plugins/specweave-tooling/.claude-plugin/plugin.json +22 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-create.md +691 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-package.md +751 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-validate.md +858 -0
- package/plugins/specweave-ui/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-ui/commands/ui-automate.md +199 -0
- package/plugins/specweave-ui/commands/ui-inspect.md +70 -0
- package/plugins/specweave-ui/skills/browser-automation/SKILL.md +314 -0
- package/plugins/specweave-ui/skills/ui-testing/SKILL.md +716 -0
- package/plugins/specweave-ui/skills/visual-regression/SKILL.md +728 -0
- package/plugins/specweave/commands/check-hooks.md +0 -257
- package/plugins/specweave/commands/specweave-archive-increments.md +0 -82
- package/plugins/specweave-plugin-dev/skills/plugin-expert/SKILL.md +0 -1231
- /package/plugins/specweave/{agents/code-reviewer.md → skills/code-reviewer/SKILL.md} +0 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specweave:embed-acs
|
|
3
|
+
description: Auto-embed Acceptance Criteria from living docs into increment spec.md for hook compatibility
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Embed Acceptance Criteria from Living Docs
|
|
7
|
+
|
|
8
|
+
You are helping the user embed Acceptance Criteria from living documentation into increment spec.md.
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
**Problem**: The AC sync hook requires ACs to be in spec.md, but some increments use `structure: user-stories` which references external living docs without embedding ACs inline.
|
|
13
|
+
|
|
14
|
+
**Solution**: This command auto-embeds ACs from living docs into spec.md, ensuring sync hooks work correctly.
|
|
15
|
+
|
|
16
|
+
**Architecture**: spec.md is ALWAYS the source of truth for ACs, even when living docs exist as a documentation layer. (See ADR-0062)
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
/specweave:embed-acs <increment-id>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Arguments
|
|
25
|
+
|
|
26
|
+
- `<increment-id>`: Required. Increment ID (e.g., "0050", "50", "0050-feature-name")
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
### Step 1: Parse and Validate Arguments
|
|
31
|
+
|
|
32
|
+
1. **Extract increment ID**:
|
|
33
|
+
- Parse from command: `/specweave:embed-acs 0050` → "0050"
|
|
34
|
+
- Normalize to 4-digit format: "0050"
|
|
35
|
+
- Support formats: "50", "0050", "0050-feature-name"
|
|
36
|
+
|
|
37
|
+
2. **Validate increment exists**:
|
|
38
|
+
- List directories in `.specweave/increments/`
|
|
39
|
+
- Find matching increment (e.g., `0050-external-tool-import-phase-1b-7`)
|
|
40
|
+
- If not found: Show error with available increments
|
|
41
|
+
|
|
42
|
+
**Example output if not found**:
|
|
43
|
+
```
|
|
44
|
+
❌ Error: Increment 0050 not found
|
|
45
|
+
|
|
46
|
+
Available increments:
|
|
47
|
+
• 0048-external-tool-import-enhancement
|
|
48
|
+
• 0049-cli-first-init-flow
|
|
49
|
+
|
|
50
|
+
Usage: /specweave:embed-acs <increment-id>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Step 2: Validate Increment Structure
|
|
54
|
+
|
|
55
|
+
1. **Check spec.md exists**:
|
|
56
|
+
```bash
|
|
57
|
+
ls .specweave/increments/0050-*/spec.md
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
2. **Check for `structure: user-stories` in frontmatter**:
|
|
61
|
+
```bash
|
|
62
|
+
grep "structure: user-stories" spec.md
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
3. **If NOT using living docs structure**:
|
|
66
|
+
```
|
|
67
|
+
ℹ️ Info: Increment 0050 does not use 'structure: user-stories'
|
|
68
|
+
|
|
69
|
+
This command is intended for increments that reference external living docs.
|
|
70
|
+
For standard increments, ACs should already be in spec.md.
|
|
71
|
+
|
|
72
|
+
Do you want to proceed anyway? [Y/n]:
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 3: Find Living Docs Path
|
|
76
|
+
|
|
77
|
+
1. **Extract feature_id from spec.md frontmatter**:
|
|
78
|
+
```bash
|
|
79
|
+
grep "feature_id:" spec.md | cut -d: -f2 | tr -d ' '
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
2. **Construct living docs path**:
|
|
83
|
+
```
|
|
84
|
+
.specweave/docs/internal/specs/specweave/{feature_id}/
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
3. **Validate living docs path exists**:
|
|
88
|
+
```bash
|
|
89
|
+
ls .specweave/docs/internal/specs/specweave/FS-048/
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
4. **If living docs not found**:
|
|
93
|
+
```
|
|
94
|
+
❌ Error: Living docs not found for feature FS-048
|
|
95
|
+
|
|
96
|
+
Expected path: .specweave/docs/internal/specs/specweave/FS-048/
|
|
97
|
+
Actual path: Not found
|
|
98
|
+
|
|
99
|
+
This increment may not have living docs, or they're in a different location.
|
|
100
|
+
|
|
101
|
+
Please specify living docs path manually:
|
|
102
|
+
/specweave:embed-acs 0050 --living-docs-path <path>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 4: Extract User Stories from spec.md
|
|
106
|
+
|
|
107
|
+
1. **Read user_stories from frontmatter**:
|
|
108
|
+
```yaml
|
|
109
|
+
user_stories:
|
|
110
|
+
- US-001
|
|
111
|
+
- US-002
|
|
112
|
+
- US-004
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
2. **Display user stories to embed**:
|
|
116
|
+
```
|
|
117
|
+
Found 7 user stories in spec.md frontmatter:
|
|
118
|
+
• US-001: Smart Pagination During Init
|
|
119
|
+
• US-002: CLI-First Defaults
|
|
120
|
+
• US-004: Smart Caching with TTL
|
|
121
|
+
• US-005: Dedicated Import Commands
|
|
122
|
+
• US-006: ADO Area Path Mapping
|
|
123
|
+
• US-007: Progress Tracking
|
|
124
|
+
• US-008: Smart Filtering
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Step 5: Extract ACs from Living Docs
|
|
128
|
+
|
|
129
|
+
1. **For each user story**, find corresponding file:
|
|
130
|
+
```bash
|
|
131
|
+
# Try multiple file naming patterns
|
|
132
|
+
find .specweave/docs/internal/specs/specweave/FS-048/ -name "us-001-*.md"
|
|
133
|
+
find .specweave/docs/internal/specs/specweave/FS-048/ -name "US-001.md"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
2. **Extract ACs from each file**:
|
|
137
|
+
```bash
|
|
138
|
+
grep -E "^### AC-US[0-9]+-[0-9]+:" us-001-smart-pagination-during-init.md
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
3. **Display extraction progress**:
|
|
142
|
+
```
|
|
143
|
+
Extracting ACs from living docs...
|
|
144
|
+
✓ US-001: Found 5 ACs (AC-US1-01 to AC-US1-05)
|
|
145
|
+
✓ US-002: Found 4 ACs (AC-US2-01 to AC-US2-04)
|
|
146
|
+
✓ US-004: Found 5 ACs (AC-US4-01 to AC-US4-05)
|
|
147
|
+
✓ US-005: Found 7 ACs (AC-US5-01 to AC-US5-07)
|
|
148
|
+
✓ US-006: Found 6 ACs (AC-US6-01 to AC-US6-06)
|
|
149
|
+
✓ US-007: Found 6 ACs (AC-US7-01 to AC-US7-06)
|
|
150
|
+
✓ US-008: Found 6 ACs (AC-US8-01 to AC-US8-06)
|
|
151
|
+
|
|
152
|
+
Total: 39 Acceptance Criteria extracted
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Step 6: Check for Existing ACs
|
|
156
|
+
|
|
157
|
+
1. **Check if spec.md already has AC section**:
|
|
158
|
+
```bash
|
|
159
|
+
grep -q "## Acceptance Criteria" spec.md
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
2. **If ACs already exist**:
|
|
163
|
+
```
|
|
164
|
+
⚠️ Warning: spec.md already contains Acceptance Criteria section
|
|
165
|
+
|
|
166
|
+
Found 39 existing ACs in spec.md.
|
|
167
|
+
|
|
168
|
+
What would you like to do?
|
|
169
|
+
[R] Replace existing ACs with freshly embedded ones
|
|
170
|
+
[M] Merge (keep existing + add missing)
|
|
171
|
+
[C] Cancel
|
|
172
|
+
|
|
173
|
+
Choice:
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
3. **If user chooses "Replace"**: Remove old AC section, add new one
|
|
177
|
+
4. **If user chooses "Merge"**: Smart merge (add only missing ACs)
|
|
178
|
+
5. **If user chooses "Cancel"**: Exit without changes
|
|
179
|
+
|
|
180
|
+
### Step 7: Format and Embed ACs
|
|
181
|
+
|
|
182
|
+
1. **Format ACs as markdown**:
|
|
183
|
+
```markdown
|
|
184
|
+
## Acceptance Criteria
|
|
185
|
+
|
|
186
|
+
<!-- Auto-synced from living docs -->
|
|
187
|
+
|
|
188
|
+
### US-001: Smart Pagination During Init
|
|
189
|
+
|
|
190
|
+
- [ ] **AC-US1-01**: 50-Project Limit During Init
|
|
191
|
+
- [ ] **AC-US1-02**: Explicit Choice Prompt
|
|
192
|
+
- [ ] **AC-US1-03**: Async Fetch for "Import All"
|
|
193
|
+
- [ ] **AC-US1-04**: Init Completes < 30 Seconds
|
|
194
|
+
- [ ] **AC-US1-05**: No Timeout Errors
|
|
195
|
+
|
|
196
|
+
### US-002: CLI-First Defaults
|
|
197
|
+
|
|
198
|
+
- [ ] **AC-US2-01**: "Import All" as Default Choice
|
|
199
|
+
- [ ] **AC-US2-02**: All Projects Checked in Checkbox Mode
|
|
200
|
+
- [ ] **AC-US2-03**: Clear Deselection Instructions
|
|
201
|
+
- [ ] **AC-US2-04**: Easy Override for "Select None"
|
|
202
|
+
|
|
203
|
+
...
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
2. **Find insertion point in spec.md**:
|
|
207
|
+
- After "## Implementation Summary" section, OR
|
|
208
|
+
- Before final line if no summary section
|
|
209
|
+
|
|
210
|
+
3. **Use Edit tool to insert ACs**:
|
|
211
|
+
```typescript
|
|
212
|
+
Edit({
|
|
213
|
+
file_path: "spec.md",
|
|
214
|
+
old_string: "**See**: [plan.md](./plan.md)...",
|
|
215
|
+
new_string: "**See**: [plan.md](./plan.md)...\n\n---\n\n" + acMarkdown
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Step 8: Update metadata.json
|
|
220
|
+
|
|
221
|
+
1. **Count total ACs**:
|
|
222
|
+
```bash
|
|
223
|
+
grep -cE "^- \[ \] \*\*AC-US[0-9]+-[0-9]+\*\*:" spec.md
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
2. **Update metadata.json**:
|
|
227
|
+
```json
|
|
228
|
+
{
|
|
229
|
+
"total_acs": 39,
|
|
230
|
+
"completed_acs": 0
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
3. **Use Edit tool to update**:
|
|
235
|
+
```typescript
|
|
236
|
+
Edit({
|
|
237
|
+
file_path: "metadata.json",
|
|
238
|
+
old_string: '"total_acs": 32,',
|
|
239
|
+
new_string: '"total_acs": 39,'
|
|
240
|
+
});
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Step 9: Validate Embedding
|
|
244
|
+
|
|
245
|
+
1. **Re-count ACs in spec.md**:
|
|
246
|
+
```bash
|
|
247
|
+
grep -cE "^- \[[x ]\] \*\*AC-US[0-9]+-[0-9]+\*\*:" spec.md
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
2. **Validate format**:
|
|
251
|
+
- All ACs follow pattern: `- [ ] **AC-US1-01**: Title`
|
|
252
|
+
- No duplicate AC IDs
|
|
253
|
+
- All user stories represented
|
|
254
|
+
|
|
255
|
+
3. **Display validation results**:
|
|
256
|
+
```
|
|
257
|
+
✅ Validation: PASSED
|
|
258
|
+
|
|
259
|
+
Embedded 39 Acceptance Criteria into spec.md:
|
|
260
|
+
• US-001: 5 ACs
|
|
261
|
+
• US-002: 4 ACs
|
|
262
|
+
• US-004: 5 ACs
|
|
263
|
+
• US-005: 7 ACs
|
|
264
|
+
• US-006: 6 ACs
|
|
265
|
+
• US-007: 6 ACs
|
|
266
|
+
• US-008: 6 ACs
|
|
267
|
+
|
|
268
|
+
metadata.json updated: total_acs = 39
|
|
269
|
+
|
|
270
|
+
Next steps:
|
|
271
|
+
1. Review embedded ACs in spec.md
|
|
272
|
+
2. Run: /specweave:validate 0050
|
|
273
|
+
3. Start work: /specweave:do
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## Flags (Optional)
|
|
277
|
+
|
|
278
|
+
### `--living-docs-path <path>`
|
|
279
|
+
|
|
280
|
+
Manually specify living docs path if auto-detection fails:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
/specweave:embed-acs 0050 --living-docs-path .specweave/docs/internal/specs/specweave/FS-048
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### `--dry-run`
|
|
287
|
+
|
|
288
|
+
Preview what would be embedded without modifying files:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
/specweave:embed-acs 0050 --dry-run
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Output**:
|
|
295
|
+
```
|
|
296
|
+
[DRY RUN] Would embed 39 ACs into spec.md
|
|
297
|
+
|
|
298
|
+
Preview:
|
|
299
|
+
• US-001: 5 ACs (AC-US1-01 to AC-US1-05)
|
|
300
|
+
• US-002: 4 ACs (AC-US2-01 to AC-US2-04)
|
|
301
|
+
...
|
|
302
|
+
|
|
303
|
+
No files modified.
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### `--force`
|
|
307
|
+
|
|
308
|
+
Skip confirmation prompts:
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
/specweave:embed-acs 0050 --force
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## Error Handling
|
|
315
|
+
|
|
316
|
+
### Living Docs Not Found
|
|
317
|
+
```
|
|
318
|
+
❌ Error: Living docs not found for feature FS-048
|
|
319
|
+
|
|
320
|
+
Expected: .specweave/docs/internal/specs/specweave/FS-048/
|
|
321
|
+
Found: Directory does not exist
|
|
322
|
+
|
|
323
|
+
Possible solutions:
|
|
324
|
+
1. Check if feature_id in spec.md is correct
|
|
325
|
+
2. Manually specify path: --living-docs-path <path>
|
|
326
|
+
3. Create living docs first: /specweave:sync-docs
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### No User Stories in spec.md
|
|
330
|
+
```
|
|
331
|
+
❌ Error: No user_stories field in spec.md frontmatter
|
|
332
|
+
|
|
333
|
+
This command requires user_stories to be listed in spec.md.
|
|
334
|
+
|
|
335
|
+
Add to spec.md frontmatter:
|
|
336
|
+
user_stories:
|
|
337
|
+
- US-001
|
|
338
|
+
- US-002
|
|
339
|
+
...
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### User Story File Not Found
|
|
343
|
+
```
|
|
344
|
+
⚠️ Warning: User story file not found for US-003
|
|
345
|
+
|
|
346
|
+
Expected paths tried:
|
|
347
|
+
• .specweave/docs/internal/specs/specweave/FS-048/us-003.md
|
|
348
|
+
• .specweave/docs/internal/specs/specweave/FS-048/US-003.md
|
|
349
|
+
• .specweave/docs/internal/specs/specweave/FS-048/us-003-*.md
|
|
350
|
+
|
|
351
|
+
Continuing with remaining user stories...
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### No ACs Found in User Story
|
|
355
|
+
```
|
|
356
|
+
⚠️ Warning: No ACs found in US-005 file
|
|
357
|
+
|
|
358
|
+
File: .specweave/docs/internal/specs/specweave/FS-048/us-005-dedicated-import-commands.md
|
|
359
|
+
|
|
360
|
+
This file may be incomplete or use a different AC format.
|
|
361
|
+
Skipping US-005 for now.
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
## Integration with Other Commands
|
|
365
|
+
|
|
366
|
+
This command is referenced by:
|
|
367
|
+
|
|
368
|
+
1. **`/specweave:validate`**: Suggests running `/specweave:embed-acs` when ACs are missing
|
|
369
|
+
2. **`/specweave:do`**: Pre-start hook suggests this command if validation fails
|
|
370
|
+
3. **`/specweave:increment`**: Should auto-call this when creating `structure: user-stories` increments
|
|
371
|
+
|
|
372
|
+
## Examples
|
|
373
|
+
|
|
374
|
+
### Example 1: Basic Usage
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
/specweave:embed-acs 0050
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Output**:
|
|
381
|
+
```
|
|
382
|
+
Embedding ACs from living docs for increment 0050-external-tool-import-phase-1b-7...
|
|
383
|
+
|
|
384
|
+
Living docs path: .specweave/docs/internal/specs/specweave/FS-048/
|
|
385
|
+
|
|
386
|
+
Extracting ACs...
|
|
387
|
+
✓ US-001: 5 ACs
|
|
388
|
+
✓ US-002: 4 ACs
|
|
389
|
+
✓ US-004: 5 ACs
|
|
390
|
+
✓ US-005: 7 ACs
|
|
391
|
+
✓ US-006: 6 ACs
|
|
392
|
+
✓ US-007: 6 ACs
|
|
393
|
+
✓ US-008: 6 ACs
|
|
394
|
+
|
|
395
|
+
✅ Embedded 39 ACs into spec.md
|
|
396
|
+
✅ Updated metadata.json (total_acs: 39)
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Example 2: Dry Run
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
/specweave:embed-acs 0050 --dry-run
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
**Output**:
|
|
406
|
+
```
|
|
407
|
+
[DRY RUN] Embedding ACs for increment 0050...
|
|
408
|
+
|
|
409
|
+
Would extract 39 ACs from 7 user stories.
|
|
410
|
+
No files would be modified.
|
|
411
|
+
|
|
412
|
+
To apply changes, run without --dry-run flag.
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Example 3: Manual Path
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
/specweave:embed-acs 0050 --living-docs-path .specweave/docs/internal/specs/custom/FS-048
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Output**:
|
|
422
|
+
```
|
|
423
|
+
Using custom living docs path: .specweave/docs/internal/specs/custom/FS-048
|
|
424
|
+
|
|
425
|
+
Extracting ACs...
|
|
426
|
+
✓ US-001: 5 ACs
|
|
427
|
+
...
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
## Related Commands
|
|
431
|
+
|
|
432
|
+
- `/specweave:increment`: Create new increment (should auto-embed ACs)
|
|
433
|
+
- `/specweave:validate`: Validate increment (checks AC presence)
|
|
434
|
+
- `/specweave:do`: Start increment (pre-start hook validates ACs)
|
|
435
|
+
- `/specweave:sync-docs`: Sync living documentation
|
|
436
|
+
|
|
437
|
+
## Related Documentation
|
|
438
|
+
|
|
439
|
+
- **ADR-0062**: AC Embedding Architecture
|
|
440
|
+
- **CLAUDE.md**: Rule #X (spec.md AC presence requirement)
|
|
441
|
+
- **src/utils/ac-embedder.ts**: AC embedding utility (implementation)
|
|
442
|
+
- **src/core/validators/ac-presence-validator.ts**: AC presence validation
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
**Important**: This command should NOT be needed in the future if spec generators are updated to auto-embed ACs during increment creation. Consider this a **migration/fix utility** for existing increments.
|
|
@@ -199,6 +199,32 @@ Increment 0001-user-authentication is complete!
|
|
|
199
199
|
|
|
200
200
|
🎉 Increment 0001 closed successfully!
|
|
201
201
|
|
|
202
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
203
|
+
🔍 POST-CLOSURE QUALITY ASSESSMENT
|
|
204
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
205
|
+
|
|
206
|
+
Running quality assessment to validate implementation...
|
|
207
|
+
|
|
208
|
+
/specweave:qa 0001
|
|
209
|
+
|
|
210
|
+
Overall Score: 87/100 (GOOD) ✓
|
|
211
|
+
|
|
212
|
+
Dimension Scores:
|
|
213
|
+
Clarity: 92/100 ✓✓
|
|
214
|
+
Testability: 85/100 ✓
|
|
215
|
+
Completeness: 90/100 ✓✓
|
|
216
|
+
Feasibility: 88/100 ✓✓
|
|
217
|
+
Maintainability: 85/100 ✓
|
|
218
|
+
Edge Cases: 78/100 ✓
|
|
219
|
+
Risk Assessment: 75/100 ✓
|
|
220
|
+
|
|
221
|
+
Quality Gate Decision: ✅ PASS
|
|
222
|
+
|
|
223
|
+
📋 Quality report saved:
|
|
224
|
+
.specweave/increments/0001-user-authentication/reports/qa-post-closure.md
|
|
225
|
+
|
|
226
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
227
|
+
|
|
202
228
|
Proceeding to suggest next work...
|
|
203
229
|
```
|
|
204
230
|
|
|
@@ -237,6 +263,106 @@ What would you like to do? [A/B/C]
|
|
|
237
263
|
|
|
238
264
|
**🔥 CRITICAL**: NEVER auto-close with incomplete work! Always give user control.
|
|
239
265
|
|
|
266
|
+
### Step 3.5: Post-Closure Quality Assessment (NEW - v0.24.0+)
|
|
267
|
+
|
|
268
|
+
**🎯 MANDATORY**: After successful closure, automatically run quality assessment to validate implementation quality.
|
|
269
|
+
|
|
270
|
+
**Why This Step Matters**:
|
|
271
|
+
- PM validation (Step 2) checks **structural completion** (tasks done, tests pass, docs updated)
|
|
272
|
+
- Quality assessment checks **implementation quality** (code quality, architecture, risks)
|
|
273
|
+
- Provides retrospective learning and continuous improvement
|
|
274
|
+
- Identifies technical debt and areas for future enhancement
|
|
275
|
+
|
|
276
|
+
**Implementation**:
|
|
277
|
+
|
|
278
|
+
1. **Invoke QA command automatically**:
|
|
279
|
+
```bash
|
|
280
|
+
/specweave:qa ${incrementId}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
2. **Quality assessment evaluates**:
|
|
284
|
+
- **7 dimensions**: Clarity, Testability, Completeness, Feasibility, Maintainability, Edge Cases, Risk
|
|
285
|
+
- **BMAD risk scoring**: Probability × Impact (0-10 scale)
|
|
286
|
+
- **Quality gate decision**: PASS/CONCERNS/FAIL
|
|
287
|
+
- **Security vulnerabilities**: OWASP-based checks
|
|
288
|
+
- **Architecture quality**: Design patterns, modularity, scalability
|
|
289
|
+
|
|
290
|
+
3. **Generate quality report**:
|
|
291
|
+
- Save to `.specweave/increments/####/reports/qa-post-closure.md`
|
|
292
|
+
- Include dimension scores, risks identified, recommendations
|
|
293
|
+
- Link to specific code locations and acceptance criteria
|
|
294
|
+
|
|
295
|
+
4. **Display results**:
|
|
296
|
+
```
|
|
297
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
298
|
+
🔍 POST-CLOSURE QUALITY ASSESSMENT
|
|
299
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
300
|
+
|
|
301
|
+
Overall Score: 87/100 (GOOD) ✓
|
|
302
|
+
|
|
303
|
+
Dimension Scores:
|
|
304
|
+
Clarity: 92/100 ✓✓
|
|
305
|
+
Testability: 85/100 ✓
|
|
306
|
+
Completeness: 90/100 ✓✓
|
|
307
|
+
Feasibility: 88/100 ✓✓
|
|
308
|
+
Maintainability: 85/100 ✓
|
|
309
|
+
Edge Cases: 78/100 ✓
|
|
310
|
+
Risk Assessment: 75/100 ✓
|
|
311
|
+
|
|
312
|
+
Quality Gate Decision: ✅ PASS
|
|
313
|
+
|
|
314
|
+
📋 Full report: .specweave/increments/####/reports/qa-post-closure.md
|
|
315
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**Quality Gate Decisions**:
|
|
319
|
+
|
|
320
|
+
| Decision | Criteria | Action |
|
|
321
|
+
|----------|----------|--------|
|
|
322
|
+
| ✅ PASS | Score ≥80, No critical risks | Proceed to next work |
|
|
323
|
+
| 🟡 CONCERNS | Score 60-79, High risks present | Log concerns, suggest improvements |
|
|
324
|
+
| 🔴 FAIL | Score <60, Critical risks present | Create follow-up increment for fixes |
|
|
325
|
+
|
|
326
|
+
**If Quality Gate FAILS**:
|
|
327
|
+
```
|
|
328
|
+
🔴 QUALITY GATE: FAIL (Score: 58/100)
|
|
329
|
+
|
|
330
|
+
Critical Issues Found:
|
|
331
|
+
• CRITICAL RISK: Password storage implementation (9.0/10)
|
|
332
|
+
• HIGH RISK: Rate limiting not specified (6.0/10)
|
|
333
|
+
• Testability: 45/100 (below threshold)
|
|
334
|
+
|
|
335
|
+
Recommendation: Create follow-up increment 0002-security-fixes
|
|
336
|
+
|
|
337
|
+
Options:
|
|
338
|
+
A. Create follow-up increment now (recommended)
|
|
339
|
+
B. Log as technical debt (track in backlog)
|
|
340
|
+
C. Continue to next feature (not recommended)
|
|
341
|
+
|
|
342
|
+
What would you like to do? [A/B/C]
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**If Quality Gate CONCERNS**:
|
|
346
|
+
```
|
|
347
|
+
🟡 QUALITY GATE: CONCERNS (Score: 72/100)
|
|
348
|
+
|
|
349
|
+
Issues to address:
|
|
350
|
+
• Edge cases coverage: 65/100 (should be 80+)
|
|
351
|
+
• 2 high-priority risks identified
|
|
352
|
+
• Recommendations: 5 improvements suggested
|
|
353
|
+
|
|
354
|
+
📋 Review report: .specweave/increments/####/reports/qa-post-closure.md
|
|
355
|
+
|
|
356
|
+
These can be addressed in future iterations.
|
|
357
|
+
Proceeding to next work...
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**IMPORTANT**: Quality assessment runs AFTER closure to:
|
|
361
|
+
- Not block delivery (increment is already closed and shipped)
|
|
362
|
+
- Provide learning and continuous improvement
|
|
363
|
+
- Identify technical debt for future planning
|
|
364
|
+
- Build quality metrics over time
|
|
365
|
+
|
|
240
366
|
### Step 4: Suggest Next Work (After Successful Closure)
|
|
241
367
|
|
|
242
368
|
**Intelligent suggestions based on project state**:
|
|
@@ -340,6 +466,23 @@ Active: 0001-user-authentication
|
|
|
340
466
|
|
|
341
467
|
🎉 Increment 0001 closed successfully!
|
|
342
468
|
|
|
469
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
470
|
+
🔍 POST-CLOSURE QUALITY ASSESSMENT
|
|
471
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
472
|
+
|
|
473
|
+
Running quality assessment...
|
|
474
|
+
|
|
475
|
+
Overall Score: 87/100 (GOOD) ✓
|
|
476
|
+
|
|
477
|
+
Dimension Scores:
|
|
478
|
+
Clarity: 92/100 ✓✓
|
|
479
|
+
Testability: 85/100 ✓
|
|
480
|
+
Risk Assessment: 75/100 ✓
|
|
481
|
+
|
|
482
|
+
Quality Gate Decision: ✅ PASS
|
|
483
|
+
|
|
484
|
+
📋 Report: .specweave/increments/0001-user-authentication/reports/qa-post-closure.md
|
|
485
|
+
|
|
343
486
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
344
487
|
|
|
345
488
|
🎯 Next Work Suggestions
|
|
@@ -482,14 +625,16 @@ Your choice? [A/B/C] _
|
|
|
482
625
|
| `/specweave:do` | Execute tasks in increment | Implementing planned work |
|
|
483
626
|
| `/specweave:progress` | Check status (no action) | Quick status check |
|
|
484
627
|
| `/specweave:done` | Explicitly close increment | Manual closure with validation |
|
|
485
|
-
| `/specweave:
|
|
628
|
+
| `/specweave:qa` | Quality assessment only | Standalone QA check |
|
|
629
|
+
| `/specweave:next` ⭐ | **Smart transition** (close + QA + suggest next) | **Natural workflow continuation** |
|
|
486
630
|
|
|
487
631
|
**Why `/specweave:next` is special**:
|
|
488
|
-
- ✅ Combines validation + closure + suggestion in one command
|
|
489
|
-
- ✅ No need to remember `/specweave:done` then `/specweave:increment` sequence
|
|
632
|
+
- ✅ Combines validation + closure + **quality assessment** + suggestion in one command
|
|
633
|
+
- ✅ No need to remember `/specweave:done` then `/specweave:qa` then `/specweave:increment` sequence
|
|
490
634
|
- ✅ Intelligent suggestions (backlog, WIP, new work)
|
|
491
635
|
- ✅ User stays in control (never forces actions)
|
|
492
636
|
- ✅ Natural "what's next?" workflow
|
|
637
|
+
- ✅ **NEW (v0.24.0+)**: Automatic post-closure quality assessment
|
|
493
638
|
|
|
494
639
|
---
|
|
495
640
|
|
|
@@ -12,7 +12,7 @@ description: Run quality assessment on a SpecWeave increment with risk scoring a
|
|
|
12
12
|
Run comprehensive quality assessment on an increment using:
|
|
13
13
|
- ✅ Rule-based validation (120 checks)
|
|
14
14
|
- ✅ AI quality assessment (7 dimensions including risk)
|
|
15
|
-
- ✅
|
|
15
|
+
- ✅ Quantitative risk scoring (Probability × Impact)
|
|
16
16
|
- ✅ Quality gate decisions (PASS/CONCERNS/FAIL)
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -93,7 +93,7 @@ The agent evaluates:
|
|
|
93
93
|
6. Edge Cases (9% weight)
|
|
94
94
|
7. **Risk Assessment (11% weight)**
|
|
95
95
|
|
|
96
|
-
**Risk Assessment** uses
|
|
96
|
+
**Risk Assessment** uses quantitative method:
|
|
97
97
|
- Probability (0.0-1.0) × Impact (1-10) = Risk Score (0.0-10.0)
|
|
98
98
|
- 4 categories: Security, Technical, Implementation, Operational
|
|
99
99
|
- Severity: CRITICAL (≥9.0), HIGH (6.0-8.9), MEDIUM (3.0-5.9), LOW (<3.0)
|