specweave 0.17.17 → 0.17.19
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/dist/plugins/specweave-ado/lib/ado-spec-content-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js +65 -6
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +63 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.js +216 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +2 -2
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.js +19 -4
- package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +8 -6
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +78 -117
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +107 -3
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/core/deduplication/command-deduplicator.d.ts +166 -0
- package/dist/src/core/deduplication/command-deduplicator.d.ts.map +1 -0
- package/dist/src/core/deduplication/command-deduplicator.js +254 -0
- package/dist/src/core/deduplication/command-deduplicator.js.map +1 -0
- package/dist/src/core/sync/enhanced-content-builder.d.ts +32 -54
- package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
- package/dist/src/core/sync/enhanced-content-builder.js +141 -138
- package/dist/src/core/sync/enhanced-content-builder.js.map +1 -1
- package/dist/src/core/sync/types.d.ts +52 -0
- package/dist/src/core/sync/types.d.ts.map +1 -0
- package/dist/src/core/sync/types.js +5 -0
- package/dist/src/core/sync/types.js.map +1 -0
- package/dist/src/core/types/config.d.ts +51 -0
- package/dist/src/core/types/config.d.ts.map +1 -1
- package/dist/src/core/types/config.js +16 -0
- package/dist/src/core/types/config.js.map +1 -1
- package/dist/src/core/types/increment-metadata.d.ts +4 -0
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
- package/dist/src/core/types/increment-metadata.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/agents/pm/AGENT.md +159 -12
- package/plugins/specweave/commands/specweave.md +70 -405
- package/plugins/specweave/hooks/hooks.json +4 -0
- package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
- package/plugins/specweave/hooks/post-increment-planning.sh +26 -2
- package/plugins/specweave/hooks/pre-command-deduplication.sh +86 -0
- package/plugins/specweave-ado/commands/specweave-ado-sync-spec.md +1 -1
- package/plugins/specweave-ado/lib/ado-spec-content-sync.js +49 -5
- package/plugins/specweave-ado/lib/ado-spec-content-sync.ts +72 -6
- package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +1 -1
- package/plugins/specweave-github/commands/specweave-github-sync-epic.md +1 -1
- package/plugins/specweave-github/commands/specweave-github-sync-spec.md +1 -1
- package/plugins/specweave-github/hooks/post-task-completion.sh +32 -0
- package/plugins/specweave-github/lib/epic-content-builder.js +227 -0
- package/plugins/specweave-github/lib/epic-content-builder.ts +317 -0
- package/plugins/specweave-github/lib/github-epic-sync.js +23 -24
- package/plugins/specweave-github/lib/github-epic-sync.ts +29 -4
- package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +1 -1
- package/plugins/specweave-jira/commands/specweave-jira-sync-spec.md +1 -1
- package/plugins/specweave-jira/lib/enhanced-jira-sync.js +134 -0
- package/plugins/specweave-jira/lib/{enhanced-jira-sync.ts.disabled → enhanced-jira-sync.ts} +26 -52
- package/plugins/specweave-release/commands/specweave-release-platform.md +1 -1
- package/plugins/specweave-release/hooks/post-task-completion.sh +2 -2
|
@@ -1,462 +1,127 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: specweave
|
|
3
|
-
description: SpecWeave
|
|
3
|
+
description: SpecWeave command reference and help. Shows available commands. DO NOT use routing syntax like '/specweave do' - always use full namespaced commands like '/specweave:do' instead.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SpecWeave
|
|
6
|
+
# SpecWeave Command Reference
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**⚠️ IMPORTANT: This is a REFERENCE ONLY, not a router!**
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**DO NOT use**: `/specweave do`, `/specweave inc`, etc.
|
|
11
|
+
**ALWAYS use**: `/specweave:do`, `/specweave:increment`, etc.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
13
|
+
Claude Code does not support command routing. Each command must be invoked directly by its full namespaced name.
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
/specweave <subcommand> [arguments]
|
|
18
|
-
```
|
|
15
|
+
**Namespace Protection**: All SpecWeave commands are prefixed with `specweave:` to avoid collisions with existing project commands.
|
|
19
16
|
|
|
20
17
|
---
|
|
21
18
|
|
|
22
|
-
## Available
|
|
19
|
+
## Available Commands
|
|
20
|
+
|
|
21
|
+
**All commands use the `specweave:` prefix** (note the colon!)
|
|
23
22
|
|
|
24
23
|
### Increment Lifecycle
|
|
25
24
|
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
25
|
+
| Command | Description | Example |
|
|
26
|
+
|---------|-------------|---------|
|
|
27
|
+
| `/specweave:increment` | Create new increment (PM-led) | `/specweave:increment "User auth"` |
|
|
28
|
+
| `/specweave:do` | Execute tasks (auto-resumes) | `/specweave:do` or `/specweave:do 0031` |
|
|
29
|
+
| `/specweave:next` | Smart transition (close + suggest) | `/specweave:next` |
|
|
30
|
+
| `/specweave:done` | Manual closure with PM validation | `/specweave:done 0031` |
|
|
31
|
+
| `/specweave:progress` | Check status and next action | `/specweave:progress` |
|
|
32
|
+
| `/specweave:validate` | Validate increment quality | `/specweave:validate 0031` |
|
|
34
33
|
|
|
35
|
-
###
|
|
34
|
+
### Documentation & Sync
|
|
36
35
|
|
|
37
|
-
|
|
|
38
|
-
|
|
39
|
-
|
|
|
40
|
-
|
|
|
36
|
+
| Command | Description | Example |
|
|
37
|
+
|---------|-------------|---------|
|
|
38
|
+
| `/specweave:sync-docs` | Sync living docs | `/specweave:sync-docs update` |
|
|
39
|
+
| `/specweave:sync-tasks` | Sync tasks with status | `/specweave:sync-tasks` |
|
|
41
40
|
|
|
42
41
|
### GitHub Plugin
|
|
43
42
|
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Subcommand Routing
|
|
55
|
-
|
|
56
|
-
**IMPORTANT**: This command acts as a router. When invoked, it:
|
|
57
|
-
|
|
58
|
-
1. **Parses the subcommand** from the first argument
|
|
59
|
-
2. **Routes to the corresponding command** file
|
|
60
|
-
3. **Passes remaining arguments** to the subcommand
|
|
61
|
-
|
|
62
|
-
### Routing Table
|
|
63
|
-
|
|
64
|
-
```yaml
|
|
65
|
-
subcommands:
|
|
66
|
-
inc: .claude/commands/specweave:inc.md
|
|
67
|
-
build: .claude/commands/specweave:do.md
|
|
68
|
-
next: .claude/commands/specweave:next.md
|
|
69
|
-
done: .claude/commands/specweave:done.md
|
|
70
|
-
progress: .claude/commands/specweave:progress.md
|
|
71
|
-
validate: .claude/commands/specweave:validate.md
|
|
72
|
-
sync-github: .claude/commands/specweave:sync-github.md
|
|
73
|
-
sync-jira: .claude/commands/specweave:sync-jira.md
|
|
74
|
-
|
|
75
|
-
# GitHub Plugin Commands
|
|
76
|
-
github:create-issue: .claude/commands/specweave-github:create-issue.md
|
|
77
|
-
github:sync: .claude/commands/specweave-github:sync.md
|
|
78
|
-
github:sync-tasks: .claude/commands/specweave-github:sync-tasks.md
|
|
79
|
-
github:close-issue: .claude/commands/specweave-github:close-issue.md
|
|
80
|
-
github:status: .claude/commands/specweave-github:status.md
|
|
81
|
-
```
|
|
43
|
+
| Command | Description | Example |
|
|
44
|
+
|---------|-------------|---------|
|
|
45
|
+
| `/specweave-github:create-issue` | Create GitHub issue | `/specweave-github:create-issue 0031` |
|
|
46
|
+
| `/specweave-github:sync` | Bidirectional sync | `/specweave-github:sync 0031` |
|
|
47
|
+
| `/specweave-github:sync-tasks` | Sync tasks as sub-issues | `/specweave-github:sync-tasks 0031` |
|
|
48
|
+
| `/specweave-github:close-issue` | Close GitHub issue | `/specweave-github:close-issue 0031` |
|
|
49
|
+
| `/specweave-github:status` | Show sync status | `/specweave-github:status` |
|
|
82
50
|
|
|
83
51
|
---
|
|
84
52
|
|
|
85
|
-
##
|
|
53
|
+
## ⚠️ NO ROUTING SUPPORT
|
|
86
54
|
|
|
87
|
-
|
|
55
|
+
**Claude Code does not implement command routing!**
|
|
88
56
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
arguments = ["User authentication"]
|
|
94
|
-
```
|
|
57
|
+
This file is a **reference guide only**. You cannot do:
|
|
58
|
+
- ❌ `/specweave do` (doesn't work, no routing!)
|
|
59
|
+
- ❌ `/specweave inc "feature"` (doesn't work!)
|
|
60
|
+
- ❌ `/specweave next` (doesn't work!)
|
|
95
61
|
|
|
96
|
-
|
|
62
|
+
**Instead, always use full namespaced commands:**
|
|
63
|
+
- ✅ `/specweave:do`
|
|
64
|
+
- ✅ `/specweave:increment "feature"`
|
|
65
|
+
- ✅ `/specweave:next`
|
|
97
66
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
If subcommand in known_subcommands:
|
|
102
|
-
Route to corresponding command
|
|
103
|
-
Else:
|
|
104
|
-
Show error with available subcommands
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Step 3: Route to Command
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
Read file: .claude/commands/specweave:inc.md
|
|
111
|
-
Execute: Command content with arguments
|
|
112
|
-
```
|
|
67
|
+
**Why This Matters:**
|
|
68
|
+
Calling both `/specweave` and `/specweave:do` causes **duplicate invocations**! Always use the namespaced version with the colon.
|
|
113
69
|
|
|
114
70
|
---
|
|
115
71
|
|
|
116
|
-
## Examples
|
|
72
|
+
## Usage Examples
|
|
117
73
|
|
|
118
|
-
###
|
|
74
|
+
### ✅ CORRECT Usage
|
|
119
75
|
|
|
120
|
-
**Input**:
|
|
121
76
|
```bash
|
|
122
|
-
|
|
123
|
-
|
|
77
|
+
# Create increment
|
|
78
|
+
/specweave:increment "User authentication"
|
|
124
79
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Parse: subcommand = "inc", args = ["User authentication"]
|
|
128
|
-
Route to: .claude/commands/specweave:inc.md
|
|
129
|
-
Execute: /specweave:inc "User authentication"
|
|
130
|
-
```
|
|
80
|
+
# Execute tasks
|
|
81
|
+
/specweave:do
|
|
131
82
|
|
|
132
|
-
|
|
83
|
+
# Check progress
|
|
84
|
+
/specweave:progress
|
|
133
85
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
/specweave do
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
**Routing**:
|
|
140
|
-
```
|
|
141
|
-
Parse: subcommand = "build", args = []
|
|
142
|
-
Route to: .claude/commands/specweave:do.md
|
|
143
|
-
Execute: /specweave:do (auto-finds active increment)
|
|
86
|
+
# Complete increment
|
|
87
|
+
/specweave:done 0031
|
|
144
88
|
```
|
|
145
89
|
|
|
146
|
-
###
|
|
90
|
+
### ❌ INCORRECT Usage (Causes Duplicates!)
|
|
147
91
|
|
|
148
|
-
**Input**:
|
|
149
92
|
```bash
|
|
150
|
-
|
|
151
|
-
|
|
93
|
+
# DO NOT use routing syntax:
|
|
94
|
+
/specweave do # ❌ Won't work, no routing!
|
|
95
|
+
/specweave inc "feat" # ❌ Won't work!
|
|
96
|
+
/specweave next # ❌ Won't work!
|
|
152
97
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Execute: /specweave:next (validates, closes, suggests)
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Example 4: Invalid Subcommand
|
|
161
|
-
|
|
162
|
-
**Input**:
|
|
163
|
-
```bash
|
|
164
|
-
/specweave invalid-command
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
**Output**:
|
|
168
|
-
```
|
|
169
|
-
❌ Error: Unknown subcommand "invalid-command"
|
|
170
|
-
|
|
171
|
-
Available subcommands:
|
|
172
|
-
Increment Lifecycle:
|
|
173
|
-
inc - Create new increment
|
|
174
|
-
build - Execute tasks
|
|
175
|
-
next - Smart transition
|
|
176
|
-
done - Manual closure
|
|
177
|
-
progress - Check status
|
|
178
|
-
validate - Validate quality
|
|
179
|
-
|
|
180
|
-
Project Setup:
|
|
181
|
-
# Project initialization: use `specweave init` CLI command
|
|
182
|
-
sync-github - Sync to GitHub
|
|
183
|
-
sync-docs - Sync documentation (review/update)
|
|
184
|
-
|
|
185
|
-
GitHub Plugin:
|
|
186
|
-
github:create-issue - Create GitHub issue from increment
|
|
187
|
-
github:sync - Bidirectional sync with GitHub
|
|
188
|
-
github:sync-tasks - Sync tasks as GitHub sub-issues
|
|
189
|
-
github:close-issue - Close GitHub issue
|
|
190
|
-
github:status - Show GitHub sync status
|
|
191
|
-
|
|
192
|
-
Usage: /specweave <subcommand> [arguments]
|
|
193
|
-
Example: /specweave inc "User authentication"
|
|
194
|
-
Example: /specweave-github:create-issue 0001
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
## Implementation (For Command Processor)
|
|
200
|
-
|
|
201
|
-
### Pseudocode
|
|
202
|
-
|
|
203
|
-
```javascript
|
|
204
|
-
function handleSpecweaveCommand(rawInput) {
|
|
205
|
-
// Parse input
|
|
206
|
-
const parts = rawInput.split(' ');
|
|
207
|
-
const subcommand = parts[1]; // First arg after /specweave
|
|
208
|
-
const args = parts.slice(2); // Remaining args
|
|
209
|
-
|
|
210
|
-
// Routing table
|
|
211
|
-
const routes = {
|
|
212
|
-
'inc': 'inc.md',
|
|
213
|
-
'do': 'do.md',
|
|
214
|
-
'next': 'next.md',
|
|
215
|
-
'done': 'done.md',
|
|
216
|
-
'progress': 'progress.md',
|
|
217
|
-
'validate': 'validate.md',
|
|
218
|
-
'sync-github': 'sync-github.md',
|
|
219
|
-
'sync-docs': 'sync-docs.md'
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// Validate subcommand
|
|
223
|
-
if (!routes[subcommand]) {
|
|
224
|
-
return showError(`Unknown subcommand "${subcommand}"`);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// Route to command
|
|
228
|
-
const commandFile = `.claude/commands/${routes[subcommand]}`;
|
|
229
|
-
return executeCommand(commandFile, args);
|
|
230
|
-
}
|
|
98
|
+
# ALWAYS use namespaced commands:
|
|
99
|
+
/specweave:do # ✅ Correct!
|
|
100
|
+
/specweave:increment "feat" # ✅ Correct!
|
|
101
|
+
/specweave:next # ✅ Correct!
|
|
231
102
|
```
|
|
232
103
|
|
|
233
104
|
---
|
|
234
105
|
|
|
235
106
|
## Why Namespacing?
|
|
236
107
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
**Without namespacing**:
|
|
240
|
-
```
|
|
241
|
-
User's project:
|
|
242
|
-
.claude/commands/do.md (their own build command)
|
|
243
|
-
|
|
244
|
-
SpecWeave installation:
|
|
245
|
-
.claude/commands/do.md (SpecWeave's build)
|
|
246
|
-
|
|
247
|
-
Result: ❌ COLLISION - User's command overwritten!
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
**With namespacing**:
|
|
251
|
-
```
|
|
252
|
-
User's project:
|
|
253
|
-
.claude/commands/do.md (their own build command)
|
|
254
|
-
|
|
255
|
-
SpecWeave installation:
|
|
256
|
-
.claude/commands/specweave:do.md (SpecWeave's build)
|
|
257
|
-
.claude/commands/specweave.md (master router)
|
|
258
|
-
|
|
259
|
-
Result: ✅ NO COLLISION - Both coexist!
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
### Benefits
|
|
108
|
+
**Namespace Protection**: All SpecWeave commands use `specweave:` prefix to avoid collisions with existing project commands in brownfield setups.
|
|
263
109
|
|
|
110
|
+
**Benefits:**
|
|
264
111
|
1. **No collisions** - SpecWeave commands never overwrite user commands
|
|
265
|
-
2. **Clear ownership** - `specweave
|
|
266
|
-
3. **Easy identification** -
|
|
112
|
+
2. **Clear ownership** - `specweave:` prefix shows it's a framework command
|
|
113
|
+
3. **Easy identification** - Clear indication of SpecWeave actions
|
|
267
114
|
4. **Brownfield safe** - Can install in any existing project
|
|
268
|
-
5. **Uninstall clean** - Remove `specweave
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
## Backward Compatibility (Aliases)
|
|
273
|
-
|
|
274
|
-
For convenience, you can create aliases for shorter commands:
|
|
275
|
-
|
|
276
|
-
### Option 1: Shell Aliases (in user's shell profile)
|
|
277
|
-
|
|
278
|
-
```bash
|
|
279
|
-
# ~/.zshrc or ~/.bashrc
|
|
280
|
-
alias sw='/specweave' # /specweave → sw
|
|
281
|
-
alias swinc='sw inc' # /specweave inc → swinc
|
|
282
|
-
alias swbuild='sw build' # /specweave do → swbuild
|
|
283
|
-
alias swnext='sw next' # /specweave next → swnext
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
**Usage**:
|
|
287
|
-
```bash
|
|
288
|
-
sw inc "User auth" # Instead of /specweave inc
|
|
289
|
-
swbuild # Instead of /specweave do
|
|
290
|
-
swnext # Instead of /specweave next
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
### Option 2: Command Aliases (in .claude/config.yaml)
|
|
294
|
-
|
|
295
|
-
```yaml
|
|
296
|
-
# .claude/config.yaml
|
|
297
|
-
command_aliases:
|
|
298
|
-
/specweave:increment: /specweave inc
|
|
299
|
-
/specweave:do: /specweave do
|
|
300
|
-
/specweave:next: /specweave next
|
|
301
|
-
/specweave:done: /specweave done
|
|
302
|
-
/specweave:progress: /specweave progress
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
**Usage**:
|
|
306
|
-
```bash
|
|
307
|
-
/inc "User auth" # Automatically routes to /specweave inc
|
|
308
|
-
/do # Automatically routes to /specweave do
|
|
309
|
-
/next # Automatically routes to /specweave next
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
**IMPORTANT**: Aliases are opt-in. Default is always namespaced `/specweave` to ensure brownfield safety.
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
## Installation Behavior
|
|
317
|
-
|
|
318
|
-
### Fresh Project (Greenfield)
|
|
319
|
-
|
|
320
|
-
```bash
|
|
321
|
-
# No existing .claude/ directory
|
|
322
|
-
# Use: specweave init my-project (CLI command)
|
|
323
|
-
|
|
324
|
-
Result:
|
|
325
|
-
✅ Creates .claude/commands/specweave*.md
|
|
326
|
-
✅ Creates .specweave/ structure
|
|
327
|
-
✅ No conflicts possible
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
### Existing Project (Brownfield)
|
|
331
|
-
|
|
332
|
-
```bash
|
|
333
|
-
# Existing .claude/commands/do.md (user's)
|
|
334
|
-
# Use: specweave init my-project (CLI command)
|
|
335
|
-
|
|
336
|
-
Behavior:
|
|
337
|
-
1. Detects existing .claude/ directory
|
|
338
|
-
2. Backs up existing files:
|
|
339
|
-
.claude/commands/ → .claude/commands.backup-1698765432/
|
|
340
|
-
3. Installs SpecWeave commands:
|
|
341
|
-
.claude/commands/specweave*.md
|
|
342
|
-
4. Restores user's commands:
|
|
343
|
-
Copies non-conflicting files back
|
|
344
|
-
5. Reports:
|
|
345
|
-
✅ Installed SpecWeave commands
|
|
346
|
-
✅ Backed up your commands to .claude/commands.backup-1698765432/
|
|
347
|
-
ℹ️ Your existing commands preserved (no overwrite)
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
**Backup Structure**:
|
|
351
|
-
```
|
|
352
|
-
.claude/
|
|
353
|
-
├── commands/
|
|
354
|
-
│ ├── build.md (user's original - preserved)
|
|
355
|
-
│ ├── specweave.do.md (SpecWeave's - new)
|
|
356
|
-
│ ├── specweave.inc.md (SpecWeave's - new)
|
|
357
|
-
│ └── specweave.md (master router - new)
|
|
358
|
-
├── commands.backup-1698765432/ (timestamped backup)
|
|
359
|
-
│ └── build.md (original backup)
|
|
360
|
-
└── skills/
|
|
361
|
-
└── ... (similar backup strategy)
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
---
|
|
365
|
-
|
|
366
|
-
## Migration from Old Commands
|
|
367
|
-
|
|
368
|
-
If you have code/docs referencing old commands:
|
|
369
|
-
|
|
370
|
-
### Find and Replace
|
|
371
|
-
|
|
372
|
-
```bash
|
|
373
|
-
# Old → New
|
|
374
|
-
/inc → /specweave inc
|
|
375
|
-
/do → /specweave do
|
|
376
|
-
/next → /specweave next
|
|
377
|
-
/done → /specweave done
|
|
378
|
-
/progress → /specweave progress
|
|
379
|
-
/validate → /specweave validate
|
|
380
|
-
/sync-github → /specweave sync-github
|
|
381
|
-
/specweave:sync-docs → /specweave sync-docs
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
### Automated Migration Script
|
|
385
|
-
|
|
386
|
-
```bash
|
|
387
|
-
# migrate-specweave-commands.sh
|
|
388
|
-
#!/bin/bash
|
|
389
|
-
|
|
390
|
-
echo "Migrating SpecWeave commands to namespaced versions..."
|
|
391
|
-
|
|
392
|
-
# Find all markdown files
|
|
393
|
-
find .specweave -type f -name "*.md" -exec sed -i '' \
|
|
394
|
-
-e 's|`/inc |`/specweave inc |g' \
|
|
395
|
-
-e 's|`/do|`/specweave do|g' \
|
|
396
|
-
-e 's|`/next|`/specweave next|g' \
|
|
397
|
-
-e 's|`/done|`/specweave done|g' \
|
|
398
|
-
-e 's|`/progress|`/specweave progress|g' \
|
|
399
|
-
{} \;
|
|
400
|
-
|
|
401
|
-
echo "✅ Migration complete!"
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
---
|
|
405
|
-
|
|
406
|
-
## Help Command
|
|
407
|
-
|
|
408
|
-
```bash
|
|
409
|
-
/specweave help
|
|
410
|
-
# or
|
|
411
|
-
/specweave --help
|
|
412
|
-
# or
|
|
413
|
-
/specweave (no args)
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
**Output**:
|
|
417
|
-
```
|
|
418
|
-
SpecWeave - Production-Ready Development Framework
|
|
419
|
-
|
|
420
|
-
Usage: /specweave <subcommand> [arguments]
|
|
421
|
-
|
|
422
|
-
Increment Lifecycle:
|
|
423
|
-
inc "feature" - Create new increment (PM-led planning)
|
|
424
|
-
do [id] - Execute tasks (auto-resumes from last incomplete)
|
|
425
|
-
next - Smart transition (validate, close, suggest next)
|
|
426
|
-
done <id> - Manual closure with PM validation
|
|
427
|
-
progress [id] - Check status, completion %, and next action
|
|
428
|
-
validate <id> - Validate increment quality
|
|
429
|
-
|
|
430
|
-
Project Setup:
|
|
431
|
-
# Use: specweave init (CLI command)
|
|
432
|
-
sync-github <id> - Sync increment to GitHub issues
|
|
433
|
-
sync-docs [mode] [id] - Sync documentation (review/update)
|
|
434
|
-
|
|
435
|
-
GitHub Plugin:
|
|
436
|
-
github:create-issue <id> - Create GitHub issue from increment
|
|
437
|
-
github:sync <id> - Bidirectional sync with GitHub
|
|
438
|
-
github:sync-tasks <id> - Sync tasks as GitHub sub-issues
|
|
439
|
-
github:close-issue <id> - Close GitHub issue
|
|
440
|
-
github:status - Show GitHub sync status
|
|
441
|
-
|
|
442
|
-
Examples:
|
|
443
|
-
/specweave inc "User authentication"
|
|
444
|
-
/specweave do
|
|
445
|
-
/specweave next
|
|
446
|
-
/specweave done 0001
|
|
447
|
-
/specweave progress
|
|
448
|
-
|
|
449
|
-
Documentation: https://spec-weave.com/docs
|
|
450
|
-
```
|
|
115
|
+
5. **Uninstall clean** - Remove `specweave:*` commands, user's commands intact
|
|
451
116
|
|
|
452
117
|
---
|
|
453
118
|
|
|
454
119
|
## Related Documentation
|
|
455
120
|
|
|
456
|
-
- [
|
|
457
|
-
- [
|
|
458
|
-
- [
|
|
121
|
+
- [Getting Started](https://spec-weave.com/docs/getting-started)
|
|
122
|
+
- [Command Reference](https://spec-weave.com/docs/commands)
|
|
123
|
+
- [Workflow Guide](https://spec-weave.com/docs/workflow)
|
|
459
124
|
|
|
460
125
|
---
|
|
461
126
|
|
|
462
|
-
|
|
127
|
+
**⚠️ Remember**: Always use `/specweave:` with a colon, never `/specweave ` with a space!
|
|
@@ -109,7 +109,7 @@ if [[ ! "$PROVIDER" =~ ^(github|jira|ado)$ ]]; then
|
|
|
109
109
|
fi
|
|
110
110
|
|
|
111
111
|
# Check if sync CLI command exists
|
|
112
|
-
SYNC_CLI="$PROJECT_ROOT/dist/cli/commands/sync-spec-content.js"
|
|
112
|
+
SYNC_CLI="$PROJECT_ROOT/dist/src/cli/commands/sync-spec-content.js"
|
|
113
113
|
if [ ! -f "$SYNC_CLI" ]; then
|
|
114
114
|
echo "ℹ️ Sync CLI not built, skipping spec content sync" >&2
|
|
115
115
|
echo " Run: npm run build" >&2
|
|
@@ -141,7 +141,7 @@ else
|
|
|
141
141
|
echo ""
|
|
142
142
|
echo "⚠️ Spec content sync failed (exit code: $SYNC_EXIT_CODE)" >&2
|
|
143
143
|
echo " This is non-blocking. You can sync manually later:" >&2
|
|
144
|
-
echo " node dist/cli/commands/sync-spec-content.js --spec \"$SPEC_PATH\" --provider $PROVIDER" >&2
|
|
144
|
+
echo " node dist/src/cli/commands/sync-spec-content.js --spec \"$SPEC_PATH\" --provider $PROVIDER" >&2
|
|
145
145
|
echo ""
|
|
146
146
|
# Non-blocking: continue execution even if sync fails
|
|
147
147
|
fi
|
|
@@ -777,14 +777,38 @@ EOF
|
|
|
777
777
|
fi
|
|
778
778
|
fi
|
|
779
779
|
|
|
780
|
-
#
|
|
780
|
+
# Read testing config from .specweave/config.json (NEW - v0.18.0+)
|
|
781
|
+
local test_mode="TDD"
|
|
782
|
+
local coverage_target=80
|
|
783
|
+
|
|
784
|
+
if [ -f "$CONFIG_FILE" ] && command -v jq >/dev/null 2>&1; then
|
|
785
|
+
test_mode=$(jq -r '.testing.defaultTestMode // "TDD"' "$CONFIG_FILE" 2>/dev/null || echo "TDD")
|
|
786
|
+
coverage_target=$(jq -r '.testing.defaultCoverageTarget // 80' "$CONFIG_FILE" 2>/dev/null || echo "80")
|
|
787
|
+
fi
|
|
788
|
+
|
|
789
|
+
# Check for overrides in spec.md frontmatter
|
|
790
|
+
if [ -f "$spec_file" ]; then
|
|
791
|
+
local spec_test_mode=$(awk '/^---$/,/^---$/ {if (/^test_mode:/) {sub(/^test_mode:[[:space:]]*"?/, ""); sub(/"?[[:space:]]*$/, ""); print; exit}}' "$spec_file" 2>/dev/null)
|
|
792
|
+
local spec_coverage=$(awk '/^---$/,/^---$/ {if (/^coverage_target:/) {sub(/^coverage_target:[[:space:]]*/, ""); sub(/[[:space:]]*$/, ""); print; exit}}' "$spec_file" 2>/dev/null)
|
|
793
|
+
|
|
794
|
+
if [ -n "$spec_test_mode" ]; then
|
|
795
|
+
test_mode="$spec_test_mode"
|
|
796
|
+
fi
|
|
797
|
+
if [ -n "$spec_coverage" ]; then
|
|
798
|
+
coverage_target="$spec_coverage"
|
|
799
|
+
fi
|
|
800
|
+
fi
|
|
801
|
+
|
|
802
|
+
# Create minimal metadata.json with testing config
|
|
781
803
|
cat > "$metadata_file" <<EOF_MINIMAL
|
|
782
804
|
{
|
|
783
805
|
"id": "$increment_id",
|
|
784
806
|
"status": "active",
|
|
785
807
|
"type": "$increment_type",
|
|
786
808
|
"created": "$current_timestamp",
|
|
787
|
-
"lastActivity": "$current_timestamp"
|
|
809
|
+
"lastActivity": "$current_timestamp",
|
|
810
|
+
"testMode": "$test_mode",
|
|
811
|
+
"coverageTarget": $coverage_target
|
|
788
812
|
}
|
|
789
813
|
EOF_MINIMAL
|
|
790
814
|
|