specweave 1.0.115 → 1.0.116
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.md +27 -29
- package/bin/specweave.js +24 -27
- package/dist/src/cli/commands/auto.d.ts +13 -13
- package/dist/src/cli/commands/auto.d.ts.map +1 -1
- package/dist/src/cli/commands/auto.js +231 -167
- package/dist/src/cli/commands/auto.js.map +1 -1
- package/dist/src/cli/commands/refresh-marketplace.d.ts.map +1 -1
- package/dist/src/cli/commands/refresh-marketplace.js +81 -0
- package/dist/src/cli/commands/refresh-marketplace.js.map +1 -1
- package/dist/src/core/increment/discipline-checker.js +2 -2
- package/dist/src/core/increment/discipline-checker.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/hooks/stop-auto.sh +65 -56
- package/plugins/specweave/scripts/reflect.sh +0 -0
- package/plugins/specweave-ado/hooks/post-living-docs-update.sh +0 -0
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<!-- SW:META template="claude" version="1.0.
|
|
1
|
+
<!-- SW:META template="claude" version="1.0.115" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,lsp,structure,taskformat,secrets,syncing,mapping,testing,api,limits,troubleshooting,principles,linking,mcp,autoexecute,auto,docs" -->
|
|
2
2
|
|
|
3
|
-
<!-- SW:SECTION:header version="1.0.
|
|
3
|
+
<!-- SW:SECTION:header version="1.0.115" -->
|
|
4
4
|
**Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
|
|
5
5
|
<!-- SW:END:header -->
|
|
6
6
|
|
|
7
|
-
<!-- SW:SECTION:start version="1.0.
|
|
7
|
+
<!-- SW:SECTION:start version="1.0.115" -->
|
|
8
8
|
## Getting Started
|
|
9
9
|
|
|
10
10
|
**Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
2. **Customize**: Edit spec.md and use for setup tasks
|
|
15
15
|
<!-- SW:END:start -->
|
|
16
16
|
|
|
17
|
-
<!-- SW:SECTION:autodetect version="1.0.
|
|
17
|
+
<!-- SW:SECTION:autodetect version="1.0.115" -->
|
|
18
18
|
## Auto-Detection
|
|
19
19
|
|
|
20
20
|
SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
@@ -24,7 +24,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
24
24
|
**Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
|
|
25
25
|
<!-- SW:END:autodetect -->
|
|
26
26
|
|
|
27
|
-
<!-- SW:SECTION:metarule version="1.0.
|
|
27
|
+
<!-- SW:SECTION:metarule version="1.0.115" -->
|
|
28
28
|
## Meta-Rule: Think-Before-Act
|
|
29
29
|
|
|
30
30
|
**Satisfy dependencies BEFORE dependent operations.**
|
|
@@ -35,7 +35,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
35
35
|
```
|
|
36
36
|
<!-- SW:END:metarule -->
|
|
37
37
|
|
|
38
|
-
<!-- SW:SECTION:rules version="1.0.
|
|
38
|
+
<!-- SW:SECTION:rules version="1.0.115" -->
|
|
39
39
|
## Rules
|
|
40
40
|
|
|
41
41
|
1. **Files** → `.specweave/increments/####-name/` (spec.md, plan.md, tasks.md at root; reports/, scripts/, logs/ subfolders)
|
|
@@ -48,7 +48,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
48
48
|
8. **⛔ Marketplace refresh**: ALWAYS use `specweave refresh-marketplace` CLI command. NEVER suggest `scripts/refresh-marketplace.sh` - end users don't have the scripts folder (npm global install).
|
|
49
49
|
<!-- SW:END:rules -->
|
|
50
50
|
|
|
51
|
-
<!-- SW:SECTION:workflow version="1.0.
|
|
51
|
+
<!-- SW:SECTION:workflow version="1.0.115" -->
|
|
52
52
|
## Workflow
|
|
53
53
|
|
|
54
54
|
`/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
|
|
@@ -68,7 +68,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
68
68
|
**Natural language**: "Let's build X" → `/sw:increment` | "What's status?" → `/sw:progress` | "We're done" → `/sw:done` | "Ship while sleeping" → `/sw:auto`
|
|
69
69
|
<!-- SW:END:workflow -->
|
|
70
70
|
|
|
71
|
-
<!-- SW:SECTION:reflect version="1.0.
|
|
71
|
+
<!-- SW:SECTION:reflect version="1.0.115" -->
|
|
72
72
|
## Self-Improving Skills (Reflect)
|
|
73
73
|
|
|
74
74
|
**Learn once, never repeat.** Claude learns from corrections and patterns across sessions.
|
|
@@ -112,7 +112,7 @@ ls ~/.specweave/memory/*.md 2>/dev/null
|
|
|
112
112
|
**Enable auto-learning**: `/sw:reflect-on` → Stop hook analyzes sessions automatically
|
|
113
113
|
<!-- SW:END:reflect -->
|
|
114
114
|
|
|
115
|
-
<!-- SW:SECTION:context version="1.0.
|
|
115
|
+
<!-- SW:SECTION:context version="1.0.115" -->
|
|
116
116
|
## Living Docs Context
|
|
117
117
|
|
|
118
118
|
**Before implementing features**: Check existing docs for patterns and decisions.
|
|
@@ -132,7 +132,7 @@ grep -ril "keyword" .specweave/docs/internal/
|
|
|
132
132
|
**Use `/sw:context <topic>`** to load relevant living docs into conversation.
|
|
133
133
|
<!-- SW:END:context -->
|
|
134
134
|
|
|
135
|
-
<!-- SW:SECTION:lsp version="1.0.
|
|
135
|
+
<!-- SW:SECTION:lsp version="1.0.115" -->
|
|
136
136
|
## LSP-Enhanced Exploration
|
|
137
137
|
|
|
138
138
|
**USE LSP ACTIVELY** for semantic code understanding (100x faster than grep).
|
|
@@ -149,7 +149,7 @@ go install golang.org/x/tools/gopls@latest # Go
|
|
|
149
149
|
**Best Practices**: ALWAYS use `findReferences` before refactoring | Use `goToDefinition` instead of grep | Combine with Explore agent
|
|
150
150
|
<!-- SW:END:lsp -->
|
|
151
151
|
|
|
152
|
-
<!-- SW:SECTION:structure version="1.0.
|
|
152
|
+
<!-- SW:SECTION:structure version="1.0.115" -->
|
|
153
153
|
## Structure
|
|
154
154
|
|
|
155
155
|
```
|
|
@@ -219,7 +219,7 @@ my-project/
|
|
|
219
219
|
```
|
|
220
220
|
<!-- SW:END:structure -->
|
|
221
221
|
|
|
222
|
-
<!-- SW:SECTION:taskformat version="1.0.
|
|
222
|
+
<!-- SW:SECTION:taskformat version="1.0.115" -->
|
|
223
223
|
## Task Format
|
|
224
224
|
|
|
225
225
|
```markdown
|
|
@@ -229,7 +229,7 @@ my-project/
|
|
|
229
229
|
```
|
|
230
230
|
<!-- SW:END:taskformat -->
|
|
231
231
|
|
|
232
|
-
<!-- SW:SECTION:secrets version="1.0.
|
|
232
|
+
<!-- SW:SECTION:secrets version="1.0.115" -->
|
|
233
233
|
## Secrets Check
|
|
234
234
|
|
|
235
235
|
**BEFORE CLI tools**: Check existing config first!
|
|
@@ -243,7 +243,7 @@ gh auth status
|
|
|
243
243
|
**SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
|
|
244
244
|
<!-- SW:END:secrets -->
|
|
245
245
|
|
|
246
|
-
<!-- SW:SECTION:syncing version="1.0.
|
|
246
|
+
<!-- SW:SECTION:syncing version="1.0.115" -->
|
|
247
247
|
## External Sync (GitHub/JIRA/ADO)
|
|
248
248
|
|
|
249
249
|
**After increment creation**: Run `/sw-github:sync {id}` to create issues!
|
|
@@ -271,7 +271,7 @@ Living docs sync ≠ External sync. They are separate:
|
|
|
271
271
|
**Verify tokens**: `grep -q GITHUB_TOKEN .env && echo "Token configured"` | `gh auth status`
|
|
272
272
|
<!-- SW:END:syncing -->
|
|
273
273
|
|
|
274
|
-
<!-- SW:SECTION:mapping version="1.0.
|
|
274
|
+
<!-- SW:SECTION:mapping version="1.0.115" -->
|
|
275
275
|
## GitHub Mapping
|
|
276
276
|
|
|
277
277
|
| SpecWeave | GitHub |
|
|
@@ -281,7 +281,7 @@ Living docs sync ≠ External sync. They are separate:
|
|
|
281
281
|
| Task T-XXX | Checkbox |
|
|
282
282
|
<!-- SW:END:mapping -->
|
|
283
283
|
|
|
284
|
-
<!-- SW:SECTION:testing version="1.0.
|
|
284
|
+
<!-- SW:SECTION:testing version="1.0.115" -->
|
|
285
285
|
## Testing
|
|
286
286
|
|
|
287
287
|
BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
|
|
@@ -293,7 +293,7 @@ vi.mock('fs', () => ({ readFile: vi.fn() }));
|
|
|
293
293
|
```
|
|
294
294
|
<!-- SW:END:testing -->
|
|
295
295
|
|
|
296
|
-
<!-- SW:SECTION:api version="1.0.
|
|
296
|
+
<!-- SW:SECTION:api version="1.0.115" -->
|
|
297
297
|
## API Development (OpenAPI-First)
|
|
298
298
|
|
|
299
299
|
**For API projects only.** OpenAPI = source of truth → Postman derived from it.
|
|
@@ -312,21 +312,19 @@ vi.mock('fs', () => ({ readFile: vi.fn() }));
|
|
|
312
312
|
**Import**: Postman → Import collection + env → Fill secrets → Select env
|
|
313
313
|
<!-- SW:END:api -->
|
|
314
314
|
|
|
315
|
-
<!-- SW:SECTION:limits version="1.0.
|
|
315
|
+
<!-- SW:SECTION:limits version="1.0.115" -->
|
|
316
316
|
## Limits
|
|
317
317
|
|
|
318
318
|
**Max 1500 lines/file** — extract before adding
|
|
319
319
|
<!-- SW:END:limits -->
|
|
320
320
|
|
|
321
|
-
<!-- SW:SECTION:troubleshooting version="1.0.
|
|
321
|
+
<!-- SW:SECTION:troubleshooting version="1.0.115" -->
|
|
322
322
|
## Troubleshooting
|
|
323
323
|
|
|
324
324
|
| Issue | Fix |
|
|
325
325
|
|-------|-----|
|
|
326
|
-
| Skills missing |
|
|
327
|
-
|
|
|
328
|
-
| Plugins outdated | `specweave refresh-marketplace --force` (NEVER use `scripts/refresh-marketplace.sh` - that's for contributors only!) |
|
|
329
|
-
| Cache stale | `specweave cache-status --check-github` to verify, `refresh-marketplace --force` to fix |
|
|
326
|
+
| Skills missing | Restart Claude Code |
|
|
327
|
+
| Plugins outdated | `specweave refresh-marketplace` (NEVER use `scripts/refresh-marketplace.sh` - that's for contributors only!) |
|
|
330
328
|
| Commands gone | `/plugin list --installed` |
|
|
331
329
|
| Out of sync | `/sw:sync-tasks` |
|
|
332
330
|
| Find increment | `/sw:status` |
|
|
@@ -340,7 +338,7 @@ vi.mock('fs', () => ({ readFile: vi.fn() }));
|
|
|
340
338
|
| Path patterns not working | `//path` = absolute, `/path` = relative to settings file, `additionalDirectories` for explicit working dirs |
|
|
341
339
|
<!-- SW:END:troubleshooting -->
|
|
342
340
|
|
|
343
|
-
<!-- SW:SECTION:principles version="1.0.
|
|
341
|
+
<!-- SW:SECTION:principles version="1.0.115" -->
|
|
344
342
|
## Principles
|
|
345
343
|
|
|
346
344
|
1. **Spec-first**: `/sw:increment` before coding
|
|
@@ -350,7 +348,7 @@ vi.mock('fs', () => ({ readFile: vi.fn() }));
|
|
|
350
348
|
5. **Clean**: All files in increment folders
|
|
351
349
|
<!-- SW:END:principles -->
|
|
352
350
|
|
|
353
|
-
<!-- SW:SECTION:linking version="1.0.
|
|
351
|
+
<!-- SW:SECTION:linking version="1.0.115" -->
|
|
354
352
|
## Bidirectional Linking
|
|
355
353
|
|
|
356
354
|
Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
|
|
@@ -358,7 +356,7 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
|
|
|
358
356
|
Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
|
|
359
357
|
<!-- SW:END:linking -->
|
|
360
358
|
|
|
361
|
-
<!-- SW:SECTION:mcp version="1.0.
|
|
359
|
+
<!-- SW:SECTION:mcp version="1.0.115" -->
|
|
362
360
|
## External Service Connection
|
|
363
361
|
|
|
364
362
|
**Priority**: MCP Server → REST API → CLI → Direct Connection
|
|
@@ -383,7 +381,7 @@ wrangler whoami 2>/dev/null
|
|
|
383
381
|
```
|
|
384
382
|
<!-- SW:END:mcp -->
|
|
385
383
|
|
|
386
|
-
<!-- SW:SECTION:autoexecute version="1.0.
|
|
384
|
+
<!-- SW:SECTION:autoexecute version="1.0.115" -->
|
|
387
385
|
## Auto-Execute Rule
|
|
388
386
|
|
|
389
387
|
**NEVER** output "Manual Step Required" when credentials exist. **EXECUTE DIRECTLY.**
|
|
@@ -398,7 +396,7 @@ wrangler whoami 2>/dev/null && gh auth status 2>/dev/null
|
|
|
398
396
|
```
|
|
399
397
|
<!-- SW:END:autoexecute -->
|
|
400
398
|
|
|
401
|
-
<!-- SW:SECTION:auto version="1.0.
|
|
399
|
+
<!-- SW:SECTION:auto version="1.0.115" -->
|
|
402
400
|
## Auto Mode (Autonomous Execution)
|
|
403
401
|
|
|
404
402
|
**Continuous execution until all tasks complete.**
|
|
@@ -475,7 +473,7 @@ wrangler whoami 2>/dev/null && gh auth status 2>/dev/null
|
|
|
475
473
|
**Circuit Breaker**: External API fails 3x? Queue & continue
|
|
476
474
|
<!-- SW:END:auto -->
|
|
477
475
|
|
|
478
|
-
<!-- SW:SECTION:docs version="1.0.
|
|
476
|
+
<!-- SW:SECTION:docs version="1.0.115" -->
|
|
479
477
|
## Docs
|
|
480
478
|
|
|
481
479
|
[spec-weave.com](https://spec-weave.com) | `.specweave/docs/internal/`
|
package/bin/specweave.js
CHANGED
|
@@ -425,35 +425,15 @@ program
|
|
|
425
425
|
console.log(statusLine);
|
|
426
426
|
});
|
|
427
427
|
|
|
428
|
-
// Auto mode commands - Autonomous execution with Ralph Wiggum pattern
|
|
428
|
+
// Auto mode commands - Autonomous execution with Pure Ralph Wiggum pattern (v3.0)
|
|
429
|
+
// No session files. No complex state. Just: "Are there active increments?"
|
|
429
430
|
program
|
|
430
431
|
.command('auto [incrementIds...]')
|
|
431
|
-
.description('Start autonomous execution
|
|
432
|
-
.option('--
|
|
433
|
-
.option('--
|
|
434
|
-
.option('--
|
|
435
|
-
.option('--dry-run', 'Preview without starting')
|
|
436
|
-
.option('--increments <ids>', 'Comma-separated increment IDs')
|
|
437
|
-
.option('--all-backlog', 'Process all backlog items')
|
|
438
|
-
.option('--skip-gates <gates>', 'Pre-approve specific gates (comma-separated)')
|
|
439
|
-
.option('--no-increment', 'Skip auto-creation (require existing increments)')
|
|
440
|
-
.option('--no-inc', 'Alias for --no-increment')
|
|
441
|
-
.option('--prompt <text>', 'Analyze prompt and create increments (intelligent chunking)')
|
|
442
|
-
.option('--yes', 'Auto-approve increment plan (skip user approval)')
|
|
443
|
-
.option('-y', 'Alias for --yes')
|
|
444
|
-
.option('--tdd', 'Enable TDD strict mode - ALL tests must pass')
|
|
445
|
-
.option('--strict', 'Alias for --tdd')
|
|
446
|
-
// Completion condition flags (v0.4.0+)
|
|
447
|
-
.option('--build', 'Build must pass before completion')
|
|
448
|
-
.option('--tests', 'Tests must pass before completion (unit + integration)')
|
|
449
|
-
.option('--e2e', 'E2E tests must pass before completion')
|
|
450
|
-
.option('--lint', 'Linting must pass before completion')
|
|
451
|
-
.option('--types', 'Type-checking must pass before completion')
|
|
452
|
-
.option('--cov <n>', 'Code coverage must meet threshold (%)', '80')
|
|
453
|
-
.option('--e2e-cov <n>', 'E2E coverage must meet threshold (%)', '70')
|
|
454
|
-
.option('--cmd <command>', 'Custom command must pass before completion')
|
|
432
|
+
.description('Start autonomous execution (Pure Ralph pattern - no session files)')
|
|
433
|
+
.option('--dry-run', 'Preview without activating')
|
|
434
|
+
.option('--all-backlog', 'Activate all backlog items')
|
|
435
|
+
.option('--reset', 'Clean up any stale state files')
|
|
455
436
|
.action(async (incrementIds, options) => {
|
|
456
|
-
// Import and execute the auto command handler directly
|
|
457
437
|
const path = await import('path');
|
|
458
438
|
const fs = await import('fs');
|
|
459
439
|
const projectPath = process.cwd();
|
|
@@ -468,7 +448,6 @@ program
|
|
|
468
448
|
|
|
469
449
|
try {
|
|
470
450
|
const { handleAutoCommand } = await import('../dist/src/cli/commands/auto.js');
|
|
471
|
-
// Call handleAutoCommand directly with all options
|
|
472
451
|
await handleAutoCommand(projectPath, incrementIds, options);
|
|
473
452
|
} catch (error) {
|
|
474
453
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -830,6 +809,24 @@ program
|
|
|
830
809
|
});
|
|
831
810
|
});
|
|
832
811
|
|
|
812
|
+
// Cache refresh command - Refresh plugin cache with skill memory preservation
|
|
813
|
+
program
|
|
814
|
+
.command('cache-refresh')
|
|
815
|
+
.description('Refresh plugin cache with skill memory preservation')
|
|
816
|
+
.argument('[plugin]', 'Refresh specific plugin (optional)')
|
|
817
|
+
.option('--force', 'Hard refresh (delete cache)')
|
|
818
|
+
.option('--all', 'Refresh all plugins (even healthy)')
|
|
819
|
+
.option('--verify', 'Verify cache health after refresh')
|
|
820
|
+
.action(async (pluginName, options) => {
|
|
821
|
+
const { cacheRefresh } = await import('../dist/src/cli/commands/cache-refresh.js');
|
|
822
|
+
await cacheRefresh({
|
|
823
|
+
pluginName,
|
|
824
|
+
force: options.force,
|
|
825
|
+
all: options.all,
|
|
826
|
+
verify: options.verify,
|
|
827
|
+
});
|
|
828
|
+
});
|
|
829
|
+
|
|
833
830
|
// Export skills command - Export to Agent Skills open standard
|
|
834
831
|
program
|
|
835
832
|
.command('export-skills')
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Auto Mode CLI Command (
|
|
2
|
+
* Auto Mode CLI Command (v3.0 - Pure Ralph Wiggum Pattern)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* PHILOSOPHY: No session files. No state management.
|
|
5
|
+
* The stop hook simply checks: "Are there active increments?"
|
|
6
|
+
* If yes → block exit. If no → approve exit.
|
|
7
|
+
*
|
|
8
|
+
* This CLI is just a HELPER to:
|
|
9
|
+
* 1. Validate the project
|
|
10
|
+
* 2. Show what increments exist
|
|
11
|
+
* 3. Optionally activate backlog increments
|
|
8
12
|
*
|
|
9
13
|
* Usage:
|
|
10
|
-
* specweave auto
|
|
11
|
-
* specweave auto
|
|
12
|
-
* specweave auto --
|
|
14
|
+
* specweave auto # Show active increments
|
|
15
|
+
* specweave auto 0001 # Activate specific increment
|
|
16
|
+
* specweave auto --all-backlog # Activate all backlog items
|
|
13
17
|
*/
|
|
14
18
|
import { Command } from 'commander';
|
|
15
19
|
export interface AutoCommandOptions {
|
|
16
20
|
dryRun?: boolean;
|
|
17
21
|
allBacklog?: boolean;
|
|
18
|
-
|
|
19
|
-
noInc?: boolean;
|
|
20
|
-
prompt?: string;
|
|
21
|
-
yes?: boolean;
|
|
22
|
-
y?: boolean;
|
|
22
|
+
reset?: boolean;
|
|
23
23
|
}
|
|
24
24
|
export declare function createAutoCommand(): Command;
|
|
25
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/auto.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"auto.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/auto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CA0B3C;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAwKf"}
|