specweave 1.0.207 → 1.0.209
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 +25 -25
- package/bin/specweave.js +0 -3
- package/dist/src/adapters/claude/README.md +11 -8
- package/dist/src/adapters/cursor/README.md +4 -4
- package/dist/src/adapters/generic/README.md +3 -3
- package/dist/src/cli/commands/cache-refresh.d.ts.map +1 -1
- package/dist/src/cli/commands/cache-refresh.js +1 -13
- package/dist/src/cli/commands/cache-refresh.js.map +1 -1
- package/dist/src/cli/commands/decision-log.d.ts.map +1 -1
- package/dist/src/cli/commands/decision-log.js +50 -8
- package/dist/src/cli/commands/decision-log.js.map +1 -1
- package/dist/src/cli/commands/refresh-marketplace.d.ts +8 -17
- package/dist/src/cli/commands/refresh-marketplace.d.ts.map +1 -1
- package/dist/src/cli/commands/refresh-marketplace.js +20 -52
- package/dist/src/cli/commands/refresh-marketplace.js.map +1 -1
- package/dist/src/core/plugin-cache/cache-invalidator.d.ts +7 -56
- package/dist/src/core/plugin-cache/cache-invalidator.d.ts.map +1 -1
- package/dist/src/core/plugin-cache/cache-invalidator.js +9 -235
- package/dist/src/core/plugin-cache/cache-invalidator.js.map +1 -1
- package/dist/src/core/plugin-cache/types.d.ts +1 -9
- package/dist/src/core/plugin-cache/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/commands/tdd-cycle.md +12 -12
- package/plugins/specweave/commands/tdd-green.md +1 -1
- package/plugins/specweave/commands/tdd-refactor.md +1 -1
- package/plugins/specweave/hooks/log-decision.sh +1 -1
- package/plugins/specweave/scripts/cleanup-legacy-state.sh +0 -0
- package/plugins/specweave-ado/commands/cleanup-duplicates.md +1 -1
- package/plugins/specweave-ado/commands/clone.md +1 -1
- package/plugins/specweave-ado/commands/close.md +3 -5
- package/plugins/specweave-ado/commands/create.md +3 -5
- package/plugins/specweave-ado/commands/import-areas.md +1 -1
- package/plugins/specweave-ado/commands/import-projects.md +1 -1
- package/plugins/specweave-ado/commands/pull.md +1 -1
- package/plugins/specweave-ado/commands/push.md +2 -4
- package/plugins/specweave-ado/commands/reconcile.md +1 -1
- package/plugins/specweave-ado/commands/status.md +3 -5
- package/plugins/specweave-ado/commands/sync.md +3 -5
- package/plugins/specweave-diagrams/skills/diagrams-generator/SKILL.md +13 -17
- package/plugins/specweave-docs/commands/build.md +1 -1
- package/plugins/specweave-docs/commands/generate.md +1 -1
- package/plugins/specweave-docs/commands/health.md +1 -1
- package/plugins/specweave-docs/commands/init.md +1 -1
- package/plugins/specweave-docs/commands/organize.md +1 -1
- package/plugins/specweave-docs/commands/validate.md +1 -1
- package/plugins/specweave-docs/commands/view.md +1 -1
- package/plugins/specweave-github/commands/cleanup-duplicates.md +1 -1
- package/plugins/specweave-github/commands/clone.md +1 -1
- package/plugins/specweave-github/commands/close.md +1 -1
- package/plugins/specweave-github/commands/create.md +1 -1
- package/plugins/specweave-github/commands/pull.md +2 -4
- package/plugins/specweave-github/commands/push.md +2 -4
- package/plugins/specweave-github/commands/reconcile.md +1 -1
- package/plugins/specweave-github/commands/status.md +1 -1
- package/plugins/specweave-github/commands/sync.md +1 -1
- package/plugins/specweave-github/commands/update-user-story.md +1 -1
- package/plugins/specweave-infrastructure/commands/monitor-setup.md +1 -1
- package/plugins/specweave-infrastructure/commands/slo-implement.md +1 -1
- package/plugins/specweave-jira/commands/cleanup-duplicates.md +1 -1
- package/plugins/specweave-jira/commands/close.md +3 -5
- package/plugins/specweave-jira/commands/create.md +3 -5
- package/plugins/specweave-jira/commands/import-boards.md +1 -1
- package/plugins/specweave-jira/commands/import-projects-full.md +1 -1
- package/plugins/specweave-jira/commands/import-projects.md +1 -1
- package/plugins/specweave-jira/commands/pull.md +2 -4
- package/plugins/specweave-jira/commands/push.md +2 -4
- package/plugins/specweave-jira/commands/reconcile.md +1 -1
- package/plugins/specweave-jira/commands/status.md +3 -5
- package/plugins/specweave-jira/commands/sync.md +1 -1
- package/plugins/specweave-kafka/commands/deploy.md +1 -1
- package/plugins/specweave-kafka/commands/dev-env.md +1 -1
- package/plugins/specweave-kafka/commands/mcp-configure.md +1 -1
- package/plugins/specweave-kafka/commands/monitor-setup.md +1 -1
- package/plugins/specweave-kafka-streams/commands/topology.md +1 -1
- package/plugins/specweave-ml/commands/deploy.md +1 -1
- package/plugins/specweave-ml/commands/evaluate.md +1 -1
- package/plugins/specweave-ml/commands/explain.md +1 -1
- package/plugins/specweave-ml/commands/pipeline.md +15 -8
- package/plugins/specweave-mobile/README.md +7 -10
- package/plugins/specweave-n8n/commands/workflow-template.md +1 -1
- package/plugins/specweave-release/commands/align.md +1 -1
- package/plugins/specweave-release/commands/init.md +1 -1
- package/plugins/specweave-release/commands/npm.md +1 -1
- package/plugins/specweave-release/commands/platform.md +1 -1
- package/plugins/specweave-release/commands/rc.md +1 -1
- package/src/templates/CLAUDE.md.template +1 -1
- package/plugins/specweave/skills/abandon/SKILL.md +0 -319
- package/plugins/specweave/skills/analytics/SKILL.md +0 -157
- package/plugins/specweave/skills/api-docs/SKILL.md +0 -673
- package/plugins/specweave/skills/architect/MEMORY.md +0 -8
- package/plugins/specweave/skills/archive/SKILL.md +0 -488
- package/plugins/specweave/skills/archive-increments/MEMORY.md +0 -8
- package/plugins/specweave/skills/auto/SKILL.md +0 -1981
- package/plugins/specweave/skills/auto-status/SKILL.md +0 -124
- package/plugins/specweave/skills/backlog/SKILL.md +0 -210
- package/plugins/specweave/skills/brownfield-analyzer/MEMORY.md +0 -8
- package/plugins/specweave/skills/brownfield-onboarder/MEMORY.md +0 -8
- package/plugins/specweave/skills/cancel-auto/SKILL.md +0 -90
- package/plugins/specweave/skills/check-hooks/SKILL.md +0 -242
- package/plugins/specweave/skills/check-tests/SKILL.md +0 -546
- package/plugins/specweave/skills/code-reviewer/MEMORY.md +0 -8
- package/plugins/specweave/skills/code-standards-analyzer/MEMORY.md +0 -8
- package/plugins/specweave/skills/compliance-architecture/MEMORY.md +0 -8
- package/plugins/specweave/skills/context/SKILL.md +0 -381
- package/plugins/specweave/skills/context-loader/MEMORY.md +0 -8
- package/plugins/specweave/skills/context-optimizer/MEMORY.md +0 -8
- package/plugins/specweave/skills/detector/MEMORY.md +0 -8
- package/plugins/specweave/skills/discrepancies/SKILL.md +0 -146
- package/plugins/specweave/skills/discrepancy-to-increment/SKILL.md +0 -189
- package/plugins/specweave/skills/discrepancy-viewer.md +0 -154
- package/plugins/specweave/skills/do/SKILL.md +0 -1170
- package/plugins/specweave/skills/docs-updater/MEMORY.md +0 -8
- package/plugins/specweave/skills/docs-writer/MEMORY.md +0 -8
- package/plugins/specweave/skills/done/SKILL.md +0 -1438
- package/plugins/specweave/skills/embed-acs/SKILL.md +0 -446
- package/plugins/specweave/skills/external/SKILL.md +0 -149
- package/plugins/specweave/skills/external-sync-wizard/MEMORY.md +0 -8
- package/plugins/specweave/skills/feature-dev/SKILL.md +0 -205
- package/plugins/specweave/skills/fix-duplicates/SKILL.md +0 -517
- package/plugins/specweave/skills/framework/MEMORY.md +0 -8
- package/plugins/specweave/skills/image-generation/MEMORY.md +0 -7
- package/plugins/specweave/skills/import-docs/SKILL.md +0 -212
- package/plugins/specweave/skills/import-external/SKILL.md +0 -461
- package/plugins/specweave/skills/increment/SKILL.md +0 -135
- package/plugins/specweave/skills/increment-planner/MEMORY.md +0 -8
- package/plugins/specweave/skills/increment-quality-judge-v2/MEMORY.md +0 -8
- package/plugins/specweave/skills/increment-work-router/MEMORY.md +0 -8
- package/plugins/specweave/skills/infrastructure/MEMORY.md +0 -8
- package/plugins/specweave/skills/jobs/SKILL.md +0 -18
- package/plugins/specweave/skills/judge-llm/SKILL.md +0 -333
- package/plugins/specweave/skills/living-docs/SKILL.md +0 -570
- package/plugins/specweave/skills/living-docs-navigator/MEMORY.md +0 -8
- package/plugins/specweave/skills/migrate-config/SKILL.md +0 -104
- package/plugins/specweave/skills/multi-project-spec-mapper/MEMORY.md +0 -8
- package/plugins/specweave/skills/next/SKILL.md +0 -676
- package/plugins/specweave/skills/notifications/SKILL.md +0 -97
- package/plugins/specweave/skills/npm/SKILL.md +0 -697
- package/plugins/specweave/skills/pause/SKILL.md +0 -192
- package/plugins/specweave/skills/performance/MEMORY.md +0 -8
- package/plugins/specweave/skills/plan/SKILL.md +0 -220
- package/plugins/specweave/skills/plugin-validator/MEMORY.md +0 -8
- package/plugins/specweave/skills/pm/MEMORY.md +0 -8
- package/plugins/specweave/skills/pm-closure-validation/MEMORY.md +0 -8
- package/plugins/specweave/skills/progress/SKILL.md +0 -19
- package/plugins/specweave/skills/progress-sync/MEMORY.md +0 -8
- package/plugins/specweave/skills/qa/SKILL.md +0 -295
- package/plugins/specweave/skills/qa-lead/MEMORY.md +0 -8
- package/plugins/specweave/skills/reconcile/SKILL.md +0 -440
- package/plugins/specweave/skills/reflect/MEMORY.md +0 -8
- package/plugins/specweave/skills/reflect/SKILL.md +0 -379
- package/plugins/specweave/skills/reflect-check/MEMORY.md +0 -8
- package/plugins/specweave/skills/reflect-clear/SKILL.md +0 -83
- package/plugins/specweave/skills/reflect-off/SKILL.md +0 -75
- package/plugins/specweave/skills/reflect-on/SKILL.md +0 -75
- package/plugins/specweave/skills/reflect-status/SKILL.md +0 -76
- package/plugins/specweave/skills/reopen/SKILL.md +0 -418
- package/plugins/specweave/skills/restore/SKILL.md +0 -309
- package/plugins/specweave/skills/restore-feature/SKILL.md +0 -91
- package/plugins/specweave/skills/resume/SKILL.md +0 -247
- package/plugins/specweave/skills/revert-wip-limit/SKILL.md +0 -82
- package/plugins/specweave/skills/roadmap-planner/MEMORY.md +0 -8
- package/plugins/specweave/skills/role-orchestrator/MEMORY.md +0 -8
- package/plugins/specweave/skills/save/SKILL.md +0 -1425
- package/plugins/specweave/skills/security/MEMORY.md +0 -8
- package/plugins/specweave/skills/serverless-recommender/MEMORY.md +0 -8
- package/plugins/specweave/skills/service-connect/MEMORY.md +0 -8
- package/plugins/specweave/skills/skill/SKILL.md +0 -303
- package/plugins/specweave/skills/skill-match/SKILL.md +0 -75
- package/plugins/specweave/skills/skip-increment/SKILL.md +0 -93
- package/plugins/specweave/skills/smart-reopen-detector/MEMORY.md +0 -8
- package/plugins/specweave/skills/spec-generator/MEMORY.md +0 -8
- package/plugins/specweave/skills/status/SKILL.md +0 -18
- package/plugins/specweave/skills/sync-acs/SKILL.md +0 -342
- package/plugins/specweave/skills/sync-diagnostics/SKILL.md +0 -227
- package/plugins/specweave/skills/sync-docs/SKILL.md +0 -784
- package/plugins/specweave/skills/sync-logs/SKILL.md +0 -136
- package/plugins/specweave/skills/sync-monitor/SKILL.md +0 -62
- package/plugins/specweave/skills/sync-progress/SKILL.md +0 -992
- package/plugins/specweave/skills/sync-specs/SKILL.md +0 -340
- package/plugins/specweave/skills/sync-status/SKILL.md +0 -356
- package/plugins/specweave/skills/sync-tasks/SKILL.md +0 -256
- package/plugins/specweave/skills/tdd-cycle/SKILL.md +0 -206
- package/plugins/specweave/skills/tdd-green/SKILL.md +0 -849
- package/plugins/specweave/skills/tdd-orchestrator/MEMORY.md +0 -8
- package/plugins/specweave/skills/tdd-red/SKILL.md +0 -142
- package/plugins/specweave/skills/tdd-refactor/SKILL.md +0 -172
- package/plugins/specweave/skills/tech-lead/MEMORY.md +0 -8
- package/plugins/specweave/skills/test-aware-planner/MEMORY.md +0 -8
- package/plugins/specweave/skills/translate/SKILL.md +0 -425
- package/plugins/specweave/skills/translator/MEMORY.md +0 -8
- package/plugins/specweave/skills/umbrella-repo-detector/MEMORY.md +0 -8
- package/plugins/specweave/skills/update-instructions/MEMORY.md +0 -8
- package/plugins/specweave/skills/update-scope/SKILL.md +0 -351
- package/plugins/specweave/skills/update-status/SKILL.md +0 -151
- package/plugins/specweave/skills/validate/SKILL.md +0 -914
- package/plugins/specweave/skills/validate-features/SKILL.md +0 -208
- package/plugins/specweave/skills/workflow/SKILL.md +0 -483
package/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- SW:META template="claude" version="1.0.
|
|
1
|
+
<!-- SW:META template="claude" version="1.0.208" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
|
|
2
2
|
|
|
3
3
|
<!-- SW:SECTION:hook-priority version="1.0.171" -->
|
|
4
4
|
## ⛔ Hook Instructions Override Everything
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
**SKILL FIRST ≠ only one skill.** Chain: hook skill → `sw-frontend:*` / `sw-backend:*` / etc → implement.
|
|
14
14
|
<!-- SW:END:hook-priority -->
|
|
15
15
|
|
|
16
|
-
<!-- SW:SECTION:header version="1.0.
|
|
16
|
+
<!-- SW:SECTION:header version="1.0.208" -->
|
|
17
17
|
**Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
|
|
18
18
|
<!-- SW:END:header -->
|
|
19
19
|
|
|
@@ -123,7 +123,7 @@ claude plugin install sw@specweave --scope project # Team-shared
|
|
|
123
123
|
|
|
124
124
|
SpecWeave auto-installs: LSP → project scope, sw-* → user scope.
|
|
125
125
|
|
|
126
|
-
<!-- SW:SECTION:start version="1.0.
|
|
126
|
+
<!-- SW:SECTION:start version="1.0.208" -->
|
|
127
127
|
## Getting Started
|
|
128
128
|
|
|
129
129
|
**Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
|
|
@@ -133,7 +133,7 @@ SpecWeave auto-installs: LSP → project scope, sw-* → user scope.
|
|
|
133
133
|
2. **Customize**: Edit spec.md and use for setup tasks
|
|
134
134
|
<!-- SW:END:start -->
|
|
135
135
|
|
|
136
|
-
<!-- SW:SECTION:autodetect version="1.0.
|
|
136
|
+
<!-- SW:SECTION:autodetect version="1.0.208" -->
|
|
137
137
|
## Auto-Detection
|
|
138
138
|
|
|
139
139
|
SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
@@ -143,7 +143,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
143
143
|
**Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
|
|
144
144
|
<!-- SW:END:autodetect -->
|
|
145
145
|
|
|
146
|
-
<!-- SW:SECTION:metarule version="1.0.
|
|
146
|
+
<!-- SW:SECTION:metarule version="1.0.208" -->
|
|
147
147
|
## Workflow Orchestration
|
|
148
148
|
|
|
149
149
|
### 1. Plan Mode Default
|
|
@@ -170,7 +170,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
170
170
|
```
|
|
171
171
|
<!-- SW:END:metarule -->
|
|
172
172
|
|
|
173
|
-
<!-- SW:SECTION:rules version="1.0.
|
|
173
|
+
<!-- SW:SECTION:rules version="1.0.208" -->
|
|
174
174
|
## Rules
|
|
175
175
|
|
|
176
176
|
1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
|
|
@@ -189,7 +189,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
189
189
|
Use next available number. **NEVER create duplicate prefixes.**
|
|
190
190
|
<!-- SW:END:rules -->
|
|
191
191
|
|
|
192
|
-
<!-- SW:SECTION:workflow version="1.0.
|
|
192
|
+
<!-- SW:SECTION:workflow version="1.0.208" -->
|
|
193
193
|
## Workflow
|
|
194
194
|
|
|
195
195
|
`/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
|
|
@@ -216,7 +216,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
216
216
|
|
|
217
217
|
```bash
|
|
218
218
|
# MANDATORY first step - check for nested repos
|
|
219
|
-
for folder in repositories packages services apps libs; do
|
|
219
|
+
for folder in repositories packages services apps libs workspace; do
|
|
220
220
|
[ -d "$folder" ] && find "$folder" -maxdepth 2 -name ".git" -type d
|
|
221
221
|
done
|
|
222
222
|
```
|
|
@@ -235,7 +235,7 @@ project/
|
|
|
235
235
|
**NEVER assume single-repo mode without scanning first!**
|
|
236
236
|
<!-- SW:END:save-nested-repos -->
|
|
237
237
|
|
|
238
|
-
<!-- SW:SECTION:reflect version="1.0.
|
|
238
|
+
<!-- SW:SECTION:reflect version="1.0.208" -->
|
|
239
239
|
## Skill Memories
|
|
240
240
|
|
|
241
241
|
SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
|
|
@@ -254,7 +254,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
254
254
|
- **2026-02-02**: Use subagents liberally for codebase analysis - up to 10+ concurrent for large-scale exploration
|
|
255
255
|
- **2026-02-02**: Prefer leaderboard-style reporting when analyzing usage patterns or identifying deletion candidates
|
|
256
256
|
|
|
257
|
-
<!-- SW:SECTION:context version="1.0.
|
|
257
|
+
<!-- SW:SECTION:context version="1.0.208" -->
|
|
258
258
|
## Context
|
|
259
259
|
|
|
260
260
|
**Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
|
|
@@ -262,7 +262,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
262
262
|
**Load context**: `/sw:context <topic>` loads relevant living docs into conversation
|
|
263
263
|
<!-- SW:END:context -->
|
|
264
264
|
|
|
265
|
-
<!-- SW:SECTION:structure version="1.0.
|
|
265
|
+
<!-- SW:SECTION:structure version="1.0.208" -->
|
|
266
266
|
## Structure
|
|
267
267
|
|
|
268
268
|
```
|
|
@@ -277,7 +277,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
277
277
|
**Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
|
|
278
278
|
<!-- SW:END:structure -->
|
|
279
279
|
|
|
280
|
-
<!-- SW:SECTION:taskformat version="1.0.
|
|
280
|
+
<!-- SW:SECTION:taskformat version="1.0.208" -->
|
|
281
281
|
## Task Format
|
|
282
282
|
|
|
283
283
|
```markdown
|
|
@@ -287,7 +287,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
287
287
|
```
|
|
288
288
|
<!-- SW:END:taskformat -->
|
|
289
289
|
|
|
290
|
-
<!-- SW:SECTION:secrets version="1.0.
|
|
290
|
+
<!-- SW:SECTION:secrets version="1.0.208" -->
|
|
291
291
|
## Secrets Check
|
|
292
292
|
|
|
293
293
|
**BEFORE CLI tools**: Check existing config first!
|
|
@@ -301,7 +301,7 @@ gh auth status
|
|
|
301
301
|
**SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
|
|
302
302
|
<!-- SW:END:secrets -->
|
|
303
303
|
|
|
304
|
-
<!-- SW:SECTION:syncing version="1.0.
|
|
304
|
+
<!-- SW:SECTION:syncing version="1.0.208" -->
|
|
305
305
|
## External Sync (GitHub/JIRA/ADO)
|
|
306
306
|
|
|
307
307
|
**Commands**: `/sw-github:sync {id}` (issues) | `/sw:sync-specs` (living docs only)
|
|
@@ -311,7 +311,7 @@ gh auth status
|
|
|
311
311
|
**Config**: Set `sync.github.enabled: true` + `canUpdateExternalItems: true` in config.json
|
|
312
312
|
<!-- SW:END:syncing -->
|
|
313
313
|
|
|
314
|
-
<!-- SW:SECTION:testing version="1.0.
|
|
314
|
+
<!-- SW:SECTION:testing version="1.0.208" -->
|
|
315
315
|
## Testing
|
|
316
316
|
|
|
317
317
|
BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
|
|
@@ -323,7 +323,7 @@ vi.mock('./module', () => ({ func: mockFn }));
|
|
|
323
323
|
```
|
|
324
324
|
<!-- SW:END:testing -->
|
|
325
325
|
|
|
326
|
-
<!-- SW:SECTION:tdd version="1.0.
|
|
326
|
+
<!-- SW:SECTION:tdd version="1.0.208" -->
|
|
327
327
|
## TDD Mode (Test-Driven Development)
|
|
328
328
|
|
|
329
329
|
**When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
|
|
@@ -384,7 +384,7 @@ When TDD is enabled, tasks include phase markers:
|
|
|
384
384
|
**Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
|
|
385
385
|
<!-- SW:END:tdd -->
|
|
386
386
|
|
|
387
|
-
<!-- SW:SECTION:api version="1.0.
|
|
387
|
+
<!-- SW:SECTION:api version="1.0.208" -->
|
|
388
388
|
## API Development (OpenAPI-First)
|
|
389
389
|
|
|
390
390
|
**For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
|
|
@@ -392,13 +392,13 @@ When TDD is enabled, tasks include phase markers:
|
|
|
392
392
|
Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
|
|
393
393
|
<!-- SW:END:api -->
|
|
394
394
|
|
|
395
|
-
<!-- SW:SECTION:limits version="1.0.
|
|
395
|
+
<!-- SW:SECTION:limits version="1.0.208" -->
|
|
396
396
|
## Limits
|
|
397
397
|
|
|
398
398
|
**Max 1500 lines/file** — extract before adding
|
|
399
399
|
<!-- SW:END:limits -->
|
|
400
400
|
|
|
401
|
-
<!-- SW:SECTION:troubleshooting version="1.0.
|
|
401
|
+
<!-- SW:SECTION:troubleshooting version="1.0.208" -->
|
|
402
402
|
## Troubleshooting
|
|
403
403
|
|
|
404
404
|
| Issue | Fix |
|
|
@@ -411,7 +411,7 @@ Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
|
|
|
411
411
|
| Session stuck | Kill + `rm -f .specweave/state/*.lock` + restart |
|
|
412
412
|
<!-- SW:END:troubleshooting -->
|
|
413
413
|
|
|
414
|
-
<!-- SW:SECTION:lazyloading version="1.0.
|
|
414
|
+
<!-- SW:SECTION:lazyloading version="1.0.208" -->
|
|
415
415
|
## Plugin Auto-Loading
|
|
416
416
|
|
|
417
417
|
Plugins load automatically based on project type and keywords. Manual install if needed:
|
|
@@ -425,7 +425,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
|
|
|
425
425
|
**Token savings**: Core ~3-5K tokens vs all plugins ~60K+
|
|
426
426
|
<!-- SW:END:lazyloading -->
|
|
427
427
|
|
|
428
|
-
<!-- SW:SECTION:principles version="1.0.
|
|
428
|
+
<!-- SW:SECTION:principles version="1.0.208" -->
|
|
429
429
|
## Principles
|
|
430
430
|
|
|
431
431
|
### SpecWeave Principles
|
|
@@ -441,7 +441,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
|
|
|
441
441
|
- **Demand Elegance**: For non-trivial changes, pause and ask "is there a more elegant way?" - but skip this for simple, obvious fixes (don't over-engineer).
|
|
442
442
|
<!-- SW:END:principles -->
|
|
443
443
|
|
|
444
|
-
<!-- SW:SECTION:linking version="1.0.
|
|
444
|
+
<!-- SW:SECTION:linking version="1.0.208" -->
|
|
445
445
|
## Bidirectional Linking
|
|
446
446
|
|
|
447
447
|
Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
|
|
@@ -449,7 +449,7 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
|
|
|
449
449
|
Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
|
|
450
450
|
<!-- SW:END:linking -->
|
|
451
451
|
|
|
452
|
-
<!-- SW:SECTION:mcp version="1.0.
|
|
452
|
+
<!-- SW:SECTION:mcp version="1.0.208" -->
|
|
453
453
|
## External Services
|
|
454
454
|
|
|
455
455
|
**Priority**: CLI tools first (simpler) → MCP for complex integrations
|
|
@@ -471,7 +471,7 @@ claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server
|
|
|
471
471
|
MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
|
|
472
472
|
<!-- SW:END:mcp -->
|
|
473
473
|
|
|
474
|
-
<!-- SW:SECTION:auto version="1.0.
|
|
474
|
+
<!-- SW:SECTION:auto version="1.0.208" -->
|
|
475
475
|
## Auto Mode
|
|
476
476
|
|
|
477
477
|
**Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
|
|
@@ -488,7 +488,7 @@ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
|
|
|
488
488
|
**STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
|
|
489
489
|
<!-- SW:END:auto -->
|
|
490
490
|
|
|
491
|
-
<!-- SW:SECTION:docs version="1.0.
|
|
491
|
+
<!-- SW:SECTION:docs version="1.0.208" -->
|
|
492
492
|
## Docs
|
|
493
493
|
|
|
494
494
|
[spec-weave.com](https://spec-weave.com)
|
package/bin/specweave.js
CHANGED
|
@@ -954,8 +954,6 @@ program
|
|
|
954
954
|
program
|
|
955
955
|
.command('refresh-marketplace')
|
|
956
956
|
.description('Refresh SpecWeave marketplace (lazy mode by default - router only)')
|
|
957
|
-
.option('--local', 'Use local development version (ONLY for active dev)')
|
|
958
|
-
.option('--github', 'Pull latest from GitHub (default, recommended)')
|
|
959
957
|
.option('--all', 'Install ALL plugins (legacy mode, ~60K tokens)')
|
|
960
958
|
.option('--minimal', 'Remove marketplace, install only core plugins (clean /plugin output, no lazy loading)')
|
|
961
959
|
.option('-f, --force', 'Force reinstall all plugins (clears cache, ensures fresh copy)')
|
|
@@ -1214,7 +1212,6 @@ program.on('--help', () => {
|
|
|
1214
1212
|
console.log(' $ specweave refresh-marketplace # Lazy mode: router only (~500 tokens)');
|
|
1215
1213
|
console.log(' $ specweave refresh-marketplace --all # Legacy mode: all plugins (~60K tokens)');
|
|
1216
1214
|
console.log(' $ specweave refresh-marketplace --force # Force reinstall (clears cache)');
|
|
1217
|
-
console.log(' $ specweave refresh-marketplace --local # Use local dev version');
|
|
1218
1215
|
console.log(' $ specweave update # Update CLI + instructions + config');
|
|
1219
1216
|
console.log(' $ specweave update --plugins # Also refresh marketplace plugins');
|
|
1220
1217
|
console.log(' $ specweave update --no-self # Skip CLI update, only project files');
|
|
@@ -188,21 +188,24 @@ description: Plan features with context awareness. Activates for: create feature
|
|
|
188
188
|
|
|
189
189
|
When user says "create feature", Claude Code automatically activates `increment-planner` skill.
|
|
190
190
|
|
|
191
|
-
###
|
|
191
|
+
### Skills Invocation
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
Skills are invoked explicitly via Skill tool or auto-activate based on keywords:
|
|
194
194
|
|
|
195
195
|
```typescript
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
// Explicit invocation
|
|
197
|
+
await Skill({
|
|
198
|
+
skill: "sw-frontend:frontend-architect",
|
|
199
|
+
args: "Design React component architecture for dashboard"
|
|
200
200
|
});
|
|
201
|
+
|
|
202
|
+
// Or via slash command
|
|
203
|
+
/sw-frontend:frontend-architect Design React component architecture
|
|
201
204
|
```
|
|
202
205
|
|
|
203
|
-
|
|
206
|
+
Skills like PM and Architect auto-activate based on keywords. For explicit invocation, use the Skill tool.
|
|
204
207
|
|
|
205
|
-
**Note**:
|
|
208
|
+
**Note**: The Task tool is for spawning subagents (Explore, Plan, general-purpose) with isolated contexts. Skills use the Skill tool.
|
|
206
209
|
|
|
207
210
|
### Hooks Execution
|
|
208
211
|
|
|
@@ -101,15 +101,15 @@ User: "create increment for auth"
|
|
|
101
101
|
→ Act like increment-planner by following those steps
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
### Simulating
|
|
104
|
+
### Simulating Skills
|
|
105
105
|
|
|
106
106
|
**Claude Code (automatic)**:
|
|
107
107
|
```typescript
|
|
108
|
-
|
|
109
|
-
→ Frontend
|
|
108
|
+
Skill({ skill: "sw-frontend:frontend-architect", args: "design components" })
|
|
109
|
+
→ Frontend skill activates with specialized guidance
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
**Note**: In Claude Code, PM/Architect are SKILLS that auto-activate on keywords
|
|
112
|
+
**Note**: In Claude Code, PM/Architect are SKILLS that auto-activate on keywords. For explicit invocation, use the Skill tool.
|
|
113
113
|
|
|
114
114
|
**Cursor (manual adoption)**:
|
|
115
115
|
```typescript
|
|
@@ -156,11 +156,11 @@ You manually execute the entire workflow!
|
|
|
156
156
|
|
|
157
157
|
**Claude Code (automatic)**:
|
|
158
158
|
```typescript
|
|
159
|
-
|
|
160
|
-
→ Frontend
|
|
159
|
+
Skill({ skill: "sw-frontend:frontend-architect", args: "design components" })
|
|
160
|
+
→ Frontend skill activates and provides specialized guidance
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
**Note**: In Claude Code, PM/Architect are SKILLS that auto-activate on keywords,
|
|
163
|
+
**Note**: In Claude Code, PM/Architect are SKILLS that auto-activate on keywords. For explicit invocation, use the Skill tool.
|
|
164
164
|
|
|
165
165
|
**Generic (manual)**:
|
|
166
166
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-refresh.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/cache-refresh.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"cache-refresh.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/cache-refresh.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwHnF;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqBlE"}
|
|
@@ -73,20 +73,8 @@ export async function cacheRefresh(options = {}) {
|
|
|
73
73
|
}
|
|
74
74
|
try {
|
|
75
75
|
// Invalidate cache
|
|
76
|
-
await invalidator.invalidatePlugin(plugin.name, plugin.version, {
|
|
77
|
-
strategy: options.force ? 'hard' : 'soft',
|
|
78
|
-
preserveMemories: true,
|
|
79
|
-
backupFirst: true
|
|
80
|
-
}, versionPath);
|
|
76
|
+
await invalidator.invalidatePlugin(plugin.name, plugin.version, { strategy: options.force ? 'hard' : 'soft' }, versionPath);
|
|
81
77
|
console.log(` ✅ Cache invalidated`);
|
|
82
|
-
// Show backup message if memories were backed up
|
|
83
|
-
const backupDir = CacheInvalidator.getBackupDir();
|
|
84
|
-
if (fs.existsSync(backupDir)) {
|
|
85
|
-
const backups = fs.readdirSync(backupDir).filter(b => b.includes(plugin.name));
|
|
86
|
-
if (backups.length > 0) {
|
|
87
|
-
console.log(` 📦 Backed up skill memories`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
78
|
}
|
|
91
79
|
catch (error) {
|
|
92
80
|
console.error(` ❌ Failed to refresh ${plugin.name}: ${error}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-refresh.js","sourceRoot":"","sources":["../../../../src/cli/commands/cache-refresh.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAE,aAAa,IAAI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WAAW,CAAC,qDAAqD,CAAC;SAClE,QAAQ,CAAC,UAAU,EAAE,oCAAoC,CAAC;SAC1D,MAAM,CAAC,SAAS,EAAE,6BAA6B,CAAC;SAChD,MAAM,CAAC,OAAO,EAAE,oCAAoC,CAAC;SACrD,MAAM,CAAC,UAAU,EAAE,mCAAmC,CAAC;SACvD,MAAM,CAAC,KAAK,EAAE,UAAmB,EAAE,OAA6B,EAAE,EAAE;QACnE,IAAI,CAAC;YACH,MAAM,YAAY,CAAC;gBACjB,UAAU;gBACV,KAAK,EAAE,OAAO,EAAE,KAAK;gBACrB,GAAG,EAAE,OAAO,EAAE,GAAG;gBACjB,MAAM,EAAE,OAAO,EAAE,MAAM;aACxB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,mBAAmB,KAAK,EAAE,CAAC,CAAC;YACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-log.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/decision-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"decision-log.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/decision-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AAqJD;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,iBAAiB,CAAC,CAmC5B;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,IAAI,CAAC,CAyGf"}
|
|
@@ -162,20 +162,40 @@ export async function decisionLogCommand(options = {}) {
|
|
|
162
162
|
export async function decisionLogTail(options = {}) {
|
|
163
163
|
const { projectRoot = process.cwd(), hook, decision } = options;
|
|
164
164
|
const logPath = path.join(projectRoot, '.specweave', 'logs', 'decisions.jsonl');
|
|
165
|
+
const logsDir = path.dirname(logPath);
|
|
165
166
|
console.log(chalk.yellow(`Watching ${logPath} for new entries...`));
|
|
166
167
|
console.log(chalk.dim('Press Ctrl+C to stop.\n'));
|
|
167
|
-
// Track file position
|
|
168
|
+
// Track file position and inode for staleness detection
|
|
168
169
|
let lastSize = 0;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
let lastInode = null;
|
|
171
|
+
const updateFileInfo = () => {
|
|
172
|
+
if (fs.existsSync(logPath)) {
|
|
173
|
+
const stats = fs.statSync(logPath);
|
|
174
|
+
lastSize = stats.size;
|
|
175
|
+
lastInode = stats.ino;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
lastSize = 0;
|
|
179
|
+
lastInode = null;
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
updateFileInfo();
|
|
173
183
|
// Watch for changes
|
|
174
|
-
const watcher = fs.watch(
|
|
184
|
+
const watcher = fs.watch(logsDir, (event, filename) => {
|
|
175
185
|
if (filename === 'decisions.jsonl') {
|
|
176
|
-
if (!fs.existsSync(logPath))
|
|
186
|
+
if (!fs.existsSync(logPath)) {
|
|
187
|
+
// File was deleted - reset tracking
|
|
188
|
+
lastSize = 0;
|
|
189
|
+
lastInode = null;
|
|
177
190
|
return;
|
|
191
|
+
}
|
|
178
192
|
const stats = fs.statSync(logPath);
|
|
193
|
+
// Detect file replacement (different inode = new file)
|
|
194
|
+
if (lastInode !== null && stats.ino !== lastInode) {
|
|
195
|
+
console.log(chalk.dim('[File recreated, resetting position]'));
|
|
196
|
+
lastSize = 0;
|
|
197
|
+
lastInode = stats.ino;
|
|
198
|
+
}
|
|
179
199
|
if (stats.size > lastSize) {
|
|
180
200
|
// Read new content
|
|
181
201
|
const fd = fs.openSync(logPath, 'r');
|
|
@@ -199,15 +219,37 @@ export async function decisionLogTail(options = {}) {
|
|
|
199
219
|
}
|
|
200
220
|
}
|
|
201
221
|
lastSize = stats.size;
|
|
222
|
+
lastInode = stats.ino;
|
|
202
223
|
}
|
|
203
224
|
else if (stats.size < lastSize) {
|
|
204
225
|
// File was truncated/rotated
|
|
205
226
|
lastSize = stats.size;
|
|
227
|
+
lastInode = stats.ino;
|
|
206
228
|
}
|
|
207
229
|
}
|
|
208
230
|
});
|
|
209
|
-
//
|
|
231
|
+
// Periodic staleness check (every 5 seconds)
|
|
232
|
+
const stalenessCheck = setInterval(() => {
|
|
233
|
+
if (!fs.existsSync(logPath)) {
|
|
234
|
+
if (lastInode !== null) {
|
|
235
|
+
console.log(chalk.dim('[File deleted, waiting for recreation...]'));
|
|
236
|
+
lastSize = 0;
|
|
237
|
+
lastInode = null;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
const stats = fs.statSync(logPath);
|
|
242
|
+
// Check if file was replaced while watcher wasn't notified
|
|
243
|
+
if (lastInode !== null && stats.ino !== lastInode) {
|
|
244
|
+
console.log(chalk.dim('[File replaced, resetting position]'));
|
|
245
|
+
lastSize = 0;
|
|
246
|
+
lastInode = stats.ino;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}, 5000);
|
|
250
|
+
// Keep process alive and cleanup on exit
|
|
210
251
|
process.on('SIGINT', () => {
|
|
252
|
+
clearInterval(stalenessCheck);
|
|
211
253
|
watcher.close();
|
|
212
254
|
console.log('\nStopped watching.');
|
|
213
255
|
process.exit(0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-log.js","sourceRoot":"","sources":["../../../../src/cli/commands/decision-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"decision-log.js","sourceRoot":"","sources":["../../../../src/cli/commands/decision-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AA2B1B;;GAEG;AACH,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,+BAA+B,KAAK,yBAAyB,CAAC,CAAC;IACjF,CAAC;IAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAEtB,MAAM,WAAW,G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I,CAAC;YACnB,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACnC,2DAA2D;YAC3D,IAAI,SAAS,KAAK,IAAI,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;gBAClD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC,CAAC;gBAC9D,QAAQ,GAAG,CAAC,CAAC;gBACb,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC,EAAE,IAAI,CAAC,CAAC;IAET,yCAAyC;IACzC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACxB,aAAa,CAAC,cAAc,CAAC,CAAC;QAC9B,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -3,45 +3,36 @@
|
|
|
3
3
|
* Refresh SpecWeave Marketplace
|
|
4
4
|
*
|
|
5
5
|
* Automates the complete marketplace refresh process with LAZY LOADING support:
|
|
6
|
-
* 1. Updates or adds marketplace
|
|
6
|
+
* 1. Updates or adds marketplace from GitHub
|
|
7
7
|
* 2. Installs core plugin (sw) only (default) OR all plugins (--all)
|
|
8
8
|
* 3. Populates lazy loading cache for on-demand plugin loading
|
|
9
|
-
* 4.
|
|
10
|
-
* 5. Updates instruction files (CLAUDE.md, AGENTS.md)
|
|
9
|
+
* 4. Updates instruction files (CLAUDE.md, AGENTS.md)
|
|
11
10
|
*
|
|
12
|
-
* LAZY LOADING (default
|
|
11
|
+
* LAZY LOADING (default):
|
|
13
12
|
* - Installs only core `sw` plugin (~3K tokens)
|
|
14
|
-
* - Other plugins
|
|
15
|
-
* - No intermediate cache needed (marketplace IS the cache!)
|
|
13
|
+
* - Other plugins loaded on-demand via keyword detection
|
|
16
14
|
* - Result: ~5K tokens at startup instead of ~60K (90% savings!)
|
|
17
|
-
* - NOTE: sw-router is OBSOLETE - detect-intent handles plugin detection
|
|
18
15
|
*
|
|
19
16
|
* MINIMAL MODE (--minimal):
|
|
20
17
|
* - Removes specweave marketplace entirely
|
|
21
18
|
* - Installs only core plugin (sw)
|
|
22
19
|
* - Clean /plugin output (only shows installed plugins)
|
|
23
|
-
* - Tradeoff: Lazy loading disabled (use --all to reinstall all)
|
|
24
20
|
*
|
|
25
21
|
* Usage:
|
|
26
22
|
* specweave refresh-marketplace # Lazy mode (default) - core only
|
|
27
23
|
* specweave refresh-marketplace --all # Legacy mode - install all plugins
|
|
28
24
|
* specweave refresh-marketplace --minimal # Minimal mode - clean /plugin output
|
|
29
|
-
* specweave refresh-marketplace --
|
|
30
|
-
* specweave refresh-marketplace --github # Use GitHub version (default)
|
|
25
|
+
* specweave refresh-marketplace --force # Force reinstall (clear cache)
|
|
31
26
|
*
|
|
32
27
|
* @since 1.0.60
|
|
33
|
-
* @updated 1.0.
|
|
34
|
-
* @updated 1.0.138 - Added minimal mode for clean /plugin output
|
|
28
|
+
* @updated 1.0.208 - Simplified to GitHub-only source
|
|
35
29
|
*/
|
|
36
30
|
interface RefreshOptions {
|
|
37
|
-
local?: boolean;
|
|
38
|
-
github?: boolean;
|
|
39
31
|
verbose?: boolean;
|
|
40
32
|
force?: boolean;
|
|
41
|
-
/** Install ALL plugins (legacy mode). Default: false (lazy loading -
|
|
33
|
+
/** Install ALL plugins (legacy mode). Default: false (lazy loading - core only) */
|
|
42
34
|
all?: boolean;
|
|
43
|
-
/** Minimal mode: Remove marketplace entirely, install only core plugins directly.
|
|
44
|
-
* Results in clean /plugin output but disables lazy loading. */
|
|
35
|
+
/** Minimal mode: Remove marketplace entirely, install only core plugins directly. */
|
|
45
36
|
minimal?: boolean;
|
|
46
37
|
}
|
|
47
38
|
export declare function refreshMarketplaceCommand(options?: RefreshOptions): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-marketplace.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/refresh-marketplace.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"refresh-marketplace.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/refresh-marketplace.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAkBH,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mFAAmF;IACnF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAutBD,wBAAsB,yBAAyB,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqgB3F"}
|