specweave 1.0.363 → 1.0.367
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/bin/specweave.js +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +33 -0
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/sync-progress.d.ts.map +1 -1
- package/dist/src/cli/commands/sync-progress.js +1 -0
- package/dist/src/cli/commands/sync-progress.js.map +1 -1
- package/dist/src/core/config/config-manager.d.ts.map +1 -1
- package/dist/src/core/config/config-manager.js +6 -0
- package/dist/src/core/config/config-manager.js.map +1 -1
- package/dist/src/core/config/types.d.ts +0 -2
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts.map +1 -1
- package/dist/src/core/lazy-loading/llm-plugin-detector.js +69 -0
- package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
- package/dist/src/core/migration/umbrella-migrator.d.ts.map +1 -1
- package/dist/src/core/migration/umbrella-migrator.js +17 -1
- package/dist/src/core/migration/umbrella-migrator.js.map +1 -1
- package/dist/src/sync/external-issue-auto-creator.d.ts.map +1 -1
- package/dist/src/sync/external-issue-auto-creator.js +13 -1
- package/dist/src/sync/external-issue-auto-creator.js.map +1 -1
- package/dist/src/sync/sync-target-resolver.d.ts +2 -2
- package/dist/src/sync/sync-target-resolver.js +6 -6
- package/dist/src/sync/sync-target-resolver.js.map +1 -1
- package/package.json +1 -1
- package/plugins/SKILLS-VS-AGENTS.md +212 -119
- package/plugins/specweave/agents/sw-architect.md +8 -67
- package/plugins/specweave/agents/sw-planner.md +10 -82
- package/plugins/specweave/agents/sw-pm.md +9 -103
- package/plugins/specweave/hooks/.specweave/logs/auto-iterations.log +1 -0
- package/plugins/specweave/hooks/.specweave/logs/auto-stop-reasons.log +1 -0
- package/plugins/specweave/skills/.specweave/logs/reflect/auto-reflect.log +15 -0
- package/plugins/specweave/skills/.specweave/logs/reflect/reflect.log +3 -0
- package/plugins/specweave/skills/.specweave/logs/stop-auto.log +1 -0
- package/plugins/specweave/skills/brainstorm/SKILL.md +128 -26
- package/plugins/specweave/skills/increment/SKILL.md +50 -32
- package/plugins/specweave/skills/pm/SKILL.md +28 -1
- package/plugins/specweave/skills/pm/phases/02-spec-creation.md +17 -0
- package/plugins/specweave/skills/test-aware-planner/SKILL.md +1 -1
- package/plugins/specweave-ado/lib/ado-multi-project-sync.js +0 -1
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +180 -0
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +1266 -0
- package/plugins/specweave-github/lib/enhanced-github-sync.js +249 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.js +150 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +1260 -0
|
@@ -3,115 +3,21 @@ name: sw-pm
|
|
|
3
3
|
description: Product Manager for writing spec.md with user stories and acceptance criteria. Use for increment specification creation during /sw:increment orchestration.
|
|
4
4
|
model: opus
|
|
5
5
|
memory: project
|
|
6
|
+
skills:
|
|
7
|
+
- sw:pm
|
|
6
8
|
---
|
|
7
9
|
|
|
8
|
-
# Product Manager
|
|
9
|
-
|
|
10
|
-
## Project Overrides
|
|
11
|
-
|
|
12
|
-
!`s="pm"; for d in .specweave/skill-memories .claude/skill-memories "$HOME/.claude/skill-memories"; do p="$d/$s.md"; [ -f "$p" ] && awk '/^## Learnings$/{ok=1;next}/^## /{ok=0}ok' "$p" && break; done 2>/dev/null; true`
|
|
13
|
-
|
|
14
|
-
## Identity
|
|
10
|
+
# Product Manager Subagent
|
|
15
11
|
|
|
16
12
|
You are a Product Manager specializing in spec-driven development. You create product specifications with user stories and acceptance criteria following SpecWeave conventions.
|
|
17
13
|
|
|
18
14
|
Your prompt will contain: increment ID, increment path, feature description, and plugin root path.
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Load phases via Read() as needed — do NOT try to generate content without loading the relevant phase first.
|
|
23
|
-
|
|
24
|
-
| Phase | When to Load | File (relative to plugin root) |
|
|
25
|
-
|-------|--------------|------|
|
|
26
|
-
| Deep Interview | **CHECK FIRST!** If enabled in config | `skills/pm/phases/00-deep-interview.md` |
|
|
27
|
-
| Research | Gathering requirements | `skills/pm/phases/01-research.md` |
|
|
28
|
-
| Spec Creation | Writing spec.md | `skills/pm/phases/02-spec-creation.md` |
|
|
29
|
-
| Templates | Need spec template | `skills/pm/templates/spec-template.md` |
|
|
30
|
-
| Validation | Final quality check | `skills/pm/phases/03-validation.md` |
|
|
31
|
-
|
|
32
|
-
**How to find phase files**: Extract the plugin root from your prompt, then Read the phase file:
|
|
33
|
-
```
|
|
34
|
-
Read({ file_path: "<plugin_root>/skills/pm/phases/01-research.md" })
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Deep Interview Mode Check (MANDATORY)
|
|
38
|
-
|
|
39
|
-
**Before starting any spec work, check if Deep Interview Mode is enabled:**
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
jq -r '.planning.deepInterview.enabled // false' .specweave/config.json
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
If `true`:
|
|
46
|
-
1. Load `skills/pm/phases/00-deep-interview.md` from plugin root
|
|
47
|
-
2. **THINK about complexity first** — don't blindly ask questions:
|
|
48
|
-
- Trivial features: 0-3 questions
|
|
49
|
-
- Small features: 4-8 questions
|
|
50
|
-
- Medium features: 9-18 questions
|
|
51
|
-
- Large features: 19-40 questions
|
|
52
|
-
3. Check `minQuestions` config: `jq -r '.planning.deepInterview.minQuestions // 5' .specweave/config.json`
|
|
53
|
-
4. Cover relevant categories (skip those that don't apply)
|
|
54
|
-
5. Only proceed to Research phase after sufficient clarity
|
|
55
|
-
|
|
56
|
-
### Writing Interview State to Disk (CRITICAL)
|
|
57
|
-
|
|
58
|
-
You MUST write the interview state file so the enforcement guard can find it:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
mkdir -p .specweave/state
|
|
62
|
-
echo '{"incrementId":"XXXX-name","startedAt":"'$(date -Iseconds)'","coveredCategories":{}}' \
|
|
63
|
-
> .specweave/state/interview-XXXX-name.json
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
After covering each category, update the state file:
|
|
67
|
-
```bash
|
|
68
|
-
jq '.coveredCategories.architecture = {"coveredAt": "'$(date -Iseconds)'", "summary": "..."}' \
|
|
69
|
-
.specweave/state/interview-XXXX-name.json > tmp && mv tmp .specweave/state/interview-XXXX-name.json
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Core Principles
|
|
73
|
-
|
|
74
|
-
1. **Phased Approach**: Work in phases, not all at once
|
|
75
|
-
2. **Chunking**: Large specs (6+ user stories) must be chunked
|
|
76
|
-
3. **Validation**: Every spec needs acceptance criteria
|
|
77
|
-
4. **Traceability**: User stories link to acceptance criteria
|
|
78
|
-
|
|
79
|
-
## Spec Structure
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
.specweave/increments/####-name/
|
|
83
|
-
├── spec.md # You create this
|
|
84
|
-
├── plan.md # Architect creates
|
|
85
|
-
├── tasks.md # Planner creates
|
|
86
|
-
└── metadata.json
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## User Story Format
|
|
90
|
-
|
|
91
|
-
```markdown
|
|
92
|
-
### US-001: [Title]
|
|
93
|
-
**Project**: [project-name]
|
|
94
|
-
**As a** [role]
|
|
95
|
-
**I want** [capability]
|
|
96
|
-
**So that** [benefit]
|
|
97
|
-
|
|
98
|
-
**Acceptance Criteria**:
|
|
99
|
-
- [ ] **AC-US1-01**: [Criterion 1]
|
|
100
|
-
- [ ] **AC-US1-02**: [Criterion 2]
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Workflow
|
|
104
|
-
|
|
105
|
-
0. **Check Deep Interview Mode** → If enabled, load phase 00 and interview FIRST
|
|
106
|
-
1. **Read feature description from prompt** → Read `phases/01-research.md`
|
|
107
|
-
2. **Requirements clear** → Read `phases/02-spec-creation.md` + `templates/spec-template.md`
|
|
108
|
-
3. **Spec written** → Read `phases/03-validation.md`
|
|
109
|
-
4. **Return** → spec.md is complete, control returns to increment orchestrator
|
|
110
|
-
|
|
111
|
-
## Token Budget Per Response
|
|
16
|
+
The `sw:pm` skill is preloaded with full domain logic including progressive phases, templates, and validation rules. Follow its instructions for spec creation workflow.
|
|
112
17
|
|
|
113
|
-
|
|
114
|
-
- **Spec creation**: < 600 tokens per chunk
|
|
115
|
-
- **Validation**: < 400 tokens
|
|
18
|
+
## Critical Reminders
|
|
116
19
|
|
|
117
|
-
**
|
|
20
|
+
- **Check Deep Interview Mode first** — `jq -r '.planning.deepInterview.enabled // false' .specweave/config.json`
|
|
21
|
+
- **Register skill-chain marker** (STEP 0 in preloaded skill) before writing spec.md
|
|
22
|
+
- **Chunking discipline** — never exceed 2000 tokens per response
|
|
23
|
+
- **One user story at a time** for large specs (6+ stories)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"timestamp":"2026-01-04T16:11:43Z","event":"session_stop","reason":"No auto session active","details":"approve_called:main","success":false,"iteration":0,"increment":"none"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"timestamp":"2026-01-04T16:11:43Z","sessionId":"unknown","reason":"No auto session active","details":"approve_called:main","success":false,"iteration":0,"increment":"none","testsRun":false,"testsPassed":0,"testsFailed":0}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ran": false,
|
|
3
|
+
"inputSummary": {
|
|
4
|
+
"transcriptLines": 266
|
|
5
|
+
},
|
|
6
|
+
"extracted": {
|
|
7
|
+
"skillLearnings": []
|
|
8
|
+
},
|
|
9
|
+
"written": {
|
|
10
|
+
"learningsAdded": 0,
|
|
11
|
+
"learningsSkippedDuplicate": 0
|
|
12
|
+
},
|
|
13
|
+
"durationMs": 1.4448749999999997,
|
|
14
|
+
"reason": "CLAUDE.md not found in project"
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[2026-02-03T22:03:06Z] APPROVE: No increments directory
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Multi-perspective ideation with selectable cognitive lenses, persistent idea trees, and native handoff to sw:increment. Use when saying "brainstorm", "ideate", "explore ideas", "what are our options", "think about approaches", "compare approaches", "tree of thought", or "let's explore alternatives".
|
|
3
|
-
argument-hint: "<topic> [--depth quick|standard|deep] [--lens default|six-hats|scamper|triz|adjacent]"
|
|
3
|
+
argument-hint: "<topic> [--depth quick|standard|deep] [--lens default|six-hats|scamper|triz|adjacent] [--resume] [--criteria c1,c2,c3]"
|
|
4
4
|
context: fork
|
|
5
5
|
model: opus
|
|
6
6
|
---
|
|
@@ -62,15 +62,17 @@ digraph brainstorm {
|
|
|
62
62
|
node [shape=box, style="rounded"];
|
|
63
63
|
|
|
64
64
|
start [label="START\nsw:brainstorm <topic>"];
|
|
65
|
+
resume_check [label="RESUME CHECK\n--resume flag?"];
|
|
65
66
|
step0 [label="STEP 0\nState Registration"];
|
|
66
|
-
parse [label="PARSE ARGS\n--depth, --lens"];
|
|
67
|
+
parse [label="PARSE ARGS\n--depth, --lens, --criteria"];
|
|
68
|
+
resume_load [label="LOAD STATE\nRead previous session\nResume from last phase"];
|
|
67
69
|
|
|
68
70
|
frame [label="PHASE 1: FRAME\nProblem statement\nStarbursting (5W1H)\n1-2 questions"];
|
|
69
71
|
|
|
70
72
|
lens_select [label="LENS SELECTION\nAskUserQuestion\n(deep: multi-select)"];
|
|
71
73
|
diverge [label="PHASE 2: DIVERGE\nGenerate approaches\nvia selected lens"];
|
|
72
74
|
|
|
73
|
-
evaluate [label="PHASE 3: EVALUATE\nComparison matrix\nRecommendation"];
|
|
75
|
+
evaluate [label="PHASE 3: EVALUATE\nComparison matrix\n(default or custom criteria)\nRecommendation"];
|
|
74
76
|
|
|
75
77
|
deepen [label="PHASE 4: DEEPEN\nAbstraction laddering\nAnalogies + Pre-mortem"];
|
|
76
78
|
|
|
@@ -78,7 +80,13 @@ digraph brainstorm {
|
|
|
78
80
|
|
|
79
81
|
done [label="DONE"];
|
|
80
82
|
|
|
81
|
-
start ->
|
|
83
|
+
start -> resume_check;
|
|
84
|
+
resume_check -> step0 [label="new session"];
|
|
85
|
+
resume_check -> resume_load [label="--resume"];
|
|
86
|
+
resume_load -> frame [label="phase was: frame"];
|
|
87
|
+
resume_load -> lens_select [label="phase was: diverge"];
|
|
88
|
+
resume_load -> evaluate [label="phase was: evaluate"];
|
|
89
|
+
resume_load -> output [label="phase was: complete\n(explore abandoned branches)"];
|
|
82
90
|
step0 -> parse;
|
|
83
91
|
parse -> frame;
|
|
84
92
|
|
|
@@ -90,6 +98,7 @@ digraph brainstorm {
|
|
|
90
98
|
|
|
91
99
|
evaluate -> output [label="quick / standard"];
|
|
92
100
|
evaluate -> deepen [label="deep"];
|
|
101
|
+
evaluate -> lens_select [label="user picks:\nrun more lenses"];
|
|
93
102
|
|
|
94
103
|
deepen -> output;
|
|
95
104
|
|
|
@@ -113,11 +122,51 @@ Parse the user's input for:
|
|
|
113
122
|
|-----|---------|--------|
|
|
114
123
|
| `--depth` | `standard` | `quick`, `standard`, `deep` |
|
|
115
124
|
| `--lens` | `default` | `default`, `six-hats`, `scamper`, `triz`, `adjacent` |
|
|
125
|
+
| `--resume` | `false` | Flag — resume a previous brainstorm session |
|
|
126
|
+
| `--criteria` | (default set) | Comma-separated custom evaluation criteria |
|
|
116
127
|
|
|
117
128
|
Everything else is the **topic** (the problem statement to brainstorm about).
|
|
118
129
|
|
|
119
130
|
If no topic is provided, ask the user: "What would you like to brainstorm about?"
|
|
120
131
|
|
|
132
|
+
### Resume Mode (`--resume`)
|
|
133
|
+
|
|
134
|
+
When `--resume` is passed:
|
|
135
|
+
|
|
136
|
+
1. **Find the most recent state file** matching the topic:
|
|
137
|
+
```bash
|
|
138
|
+
ls -t .specweave/state/brainstorm-*-${TOPIC_SLUG}*.json 2>/dev/null | head -1
|
|
139
|
+
```
|
|
140
|
+
2. **Read the state file** to determine where the session left off
|
|
141
|
+
3. **Read the brainstorm document** (if one was partially saved)
|
|
142
|
+
4. **Resume from the last completed phase**:
|
|
143
|
+
- If `phase: "frame"` → resume at Phase 2 (Diverge)
|
|
144
|
+
- If `phase: "evaluate"` → show the existing matrix, ask if user wants to re-evaluate or proceed
|
|
145
|
+
- If `phase: "complete"` → show the saved document, offer to explore abandoned branches from the idea tree
|
|
146
|
+
5. **Present abandoned branches**: If the idea tree has approaches marked as abandoned or unexplored, offer to dig into those with a different lens
|
|
147
|
+
|
|
148
|
+
This enables iterative brainstorming — start with quick mode, then `--resume --depth deep` to go deeper on the same topic.
|
|
149
|
+
|
|
150
|
+
### Custom Evaluation Criteria (`--criteria`)
|
|
151
|
+
|
|
152
|
+
Override the default evaluation criteria with domain-specific ones:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
/sw:brainstorm "marketing strategy" --criteria "brand-fit,audience-reach,cost,differentiation"
|
|
156
|
+
/sw:brainstorm "database choice" --criteria "read-perf,write-perf,operational-complexity,cost,ecosystem"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Preset criteria sets** (auto-detected from context when `--criteria` is not provided):
|
|
160
|
+
|
|
161
|
+
| Context | Criteria |
|
|
162
|
+
|---------|----------|
|
|
163
|
+
| **Engineering** (default) | Complexity, Time, Risk, Extensibility, Alignment |
|
|
164
|
+
| **Marketing/Product** | Brand Fit, Audience Reach, Cost, Differentiation, Time-to-Market |
|
|
165
|
+
| **Infrastructure** | Performance, Reliability, Cost, Operational Complexity, Scalability |
|
|
166
|
+
| **Business** | Revenue Impact, Cost, Time-to-Value, Strategic Alignment, Risk |
|
|
167
|
+
|
|
168
|
+
When custom criteria are provided, use them instead of the defaults in the Phase 3 Evaluation Matrix. Each criterion is still scored on a 1-5 scale.
|
|
169
|
+
|
|
121
170
|
---
|
|
122
171
|
|
|
123
172
|
## Phase 1: Frame
|
|
@@ -424,32 +473,81 @@ Generate 4-6 independent approaches, each with a different strategic orientation
|
|
|
424
473
|
|
|
425
474
|
**Deep mode dispatch**: 7 parallel `Agent()` calls, one per transformation.
|
|
426
475
|
|
|
427
|
-
### Lens: TRIZ / Constraint Inversion
|
|
476
|
+
### Lens: TRIZ / Inventive Principles + Constraint Inversion
|
|
428
477
|
|
|
429
|
-
|
|
478
|
+
Two-part structured analysis combining TRIZ inventive principles with assumption negation.
|
|
479
|
+
|
|
480
|
+
**Part 1: Apply TRIZ Inventive Principles** (select 5-7 most relevant from the 40):
|
|
481
|
+
|
|
482
|
+
| # | Principle | Software Adaptation |
|
|
483
|
+
|---|-----------|-------------------|
|
|
484
|
+
| 1 | Segmentation | Break monolith into microservices; split large features into independent modules |
|
|
485
|
+
| 2 | Taking Out / Extraction | Extract cross-cutting concerns (auth, logging) into middleware or services |
|
|
486
|
+
| 5 | Merging | Combine multiple API calls into batch endpoints; merge related microservices |
|
|
487
|
+
| 10 | Preliminary Action | Pre-compute, cache, warm up; generate at build time instead of runtime |
|
|
488
|
+
| 13 | The Other Way Round | Invert control flow (push vs pull, server-driven vs client-driven, event sourcing) |
|
|
489
|
+
| 15 | Dynamicity | Feature flags, A/B testing, config-driven behavior instead of hardcoded |
|
|
490
|
+
| 17 | Another Dimension | Add time dimension (versioning, audit trails); add abstraction layer |
|
|
491
|
+
| 22 | Blessing in Disguise | Turn a constraint into a feature (rate limiting → fair usage; downtime → maintenance window) |
|
|
492
|
+
| 24 | Intermediary | Add proxy, gateway, adapter, or anti-corruption layer |
|
|
493
|
+
| 25 | Self-Service | User-facing admin panels, self-serve onboarding, API key management |
|
|
494
|
+
| 28 | Mechanics Substitution | Replace manual process with automation; replace polling with webhooks |
|
|
495
|
+
| 35 | Parameter Change | Change data format (JSON→protobuf), protocol (REST→gRPC), storage engine |
|
|
496
|
+
| 40 | Composite Materials | Polyglot persistence, hybrid architectures, best-of-breed tool selection |
|
|
497
|
+
|
|
498
|
+
For each relevant principle, generate ONE approach that applies it to the problem.
|
|
499
|
+
|
|
500
|
+
**Part 2: Constraint Inversion** (the original approach, now enhanced):
|
|
430
501
|
|
|
431
502
|
1. **List 3-5 core assumptions** about the problem
|
|
432
503
|
2. **For each assumption**, generate an approach where that assumption is **negated**
|
|
433
504
|
3. **Evaluate** which inversions produce viable alternatives
|
|
434
|
-
4. **
|
|
505
|
+
4. **Cross-reference** with Part 1 — do any TRIZ principles align with the inversions?
|
|
506
|
+
5. **Output**: The 3-4 most promising combined approaches
|
|
435
507
|
|
|
436
508
|
Example:
|
|
437
509
|
- Assumption: "Users must authenticate before accessing data"
|
|
438
|
-
-
|
|
439
|
-
-
|
|
510
|
+
- TRIZ #13 (The Other Way Round): Invert the flow — data is public by default with audit trails
|
|
511
|
+
- TRIZ #25 (Self-Service): Users manage their own access permissions
|
|
512
|
+
- Inversion viable? → Assess trade-offs — this is literally how Google Docs sharing works
|
|
513
|
+
|
|
514
|
+
**Deep mode dispatch**: Can dispatch Part 1 (principles) and Part 2 (inversions) as 2 parallel `Agent()` calls, then synthesize.
|
|
440
515
|
|
|
441
516
|
### Lens: Adjacent Possible
|
|
442
517
|
|
|
443
|
-
What recently became feasible?
|
|
518
|
+
What recently became feasible? Web-search-enhanced analysis:
|
|
519
|
+
|
|
520
|
+
1. **Research phase** — Use `WebSearch` to ground ideas in reality:
|
|
521
|
+
```
|
|
522
|
+
WebSearch({ query: "[topic] new tools frameworks 2025 2026" })
|
|
523
|
+
WebSearch({ query: "[topic] emerging approaches trends" })
|
|
524
|
+
```
|
|
525
|
+
Extract: new APIs, frameworks, cost changes, AI capabilities, regulatory shifts.
|
|
444
526
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
527
|
+
2. **Scan recent developments**: Combine web search results with model knowledge about:
|
|
528
|
+
- New APIs and services launched in the last 12 months
|
|
529
|
+
- AI capabilities that crossed a quality/cost threshold
|
|
530
|
+
- Infrastructure cost drops (storage, compute, bandwidth)
|
|
531
|
+
- Regulatory changes that enable/restrict approaches
|
|
532
|
+
- Open-source projects that matured to production-ready
|
|
533
|
+
|
|
534
|
+
3. **Generate 4-6 approaches** that leverage these newly-possible capabilities
|
|
535
|
+
|
|
536
|
+
4. **Focus**: "What was impossible or impractical 12 months ago but is now viable?"
|
|
537
|
+
|
|
538
|
+
5. **Ground each approach** — cite the specific development that enables it:
|
|
539
|
+
```
|
|
540
|
+
### Approach: LLM-Powered Classification
|
|
541
|
+
**Enabled by**: Claude 4/GPT-4o quality + sub-$1/1M token pricing (2025)
|
|
542
|
+
**Previously**: Required custom ML models, labeled datasets, training infra
|
|
543
|
+
**Now**: Zero-shot classification via API call, 95%+ accuracy for most use cases
|
|
544
|
+
```
|
|
448
545
|
|
|
449
546
|
Example prompts:
|
|
450
547
|
- "What if we used LLMs for [X] instead of building rules?"
|
|
451
548
|
- "What if we used edge computing for [Y] instead of centralized?"
|
|
452
549
|
- "What if the cost of [Z] dropped 10x — how would our approach change?"
|
|
550
|
+
- "What open-source tool launched recently that solves [Y] out of the box?"
|
|
453
551
|
|
|
454
552
|
---
|
|
455
553
|
|
|
@@ -569,19 +667,23 @@ Example prompts:
|
|
|
569
667
|
|
|
570
668
|
---
|
|
571
669
|
|
|
572
|
-
## Token Budgets
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
|
577
|
-
|
|
578
|
-
|
|
|
579
|
-
|
|
|
580
|
-
|
|
|
581
|
-
|
|
|
582
|
-
|
|
|
583
|
-
|
|
|
584
|
-
| **
|
|
670
|
+
## Token Budgets (Guidelines)
|
|
671
|
+
|
|
672
|
+
These are targets, not hard limits. Prefer conciseness, but expand when the problem demands it.
|
|
673
|
+
|
|
674
|
+
| Phase | Target | Hard Max | Notes |
|
|
675
|
+
|-------|--------|----------|-------|
|
|
676
|
+
| Frame | ~400 tokens | 800 | Problem + 5W1H + questions |
|
|
677
|
+
| Diverge (per approach) | ~600 tokens | 1000 | Name + summary + steps + trade-offs |
|
|
678
|
+
| Diverge (total) | ~3600 tokens | 6000 | 6 approaches max |
|
|
679
|
+
| Evaluate | ~500 tokens | 800 | Matrix + recommendation |
|
|
680
|
+
| Deepen | ~500 tokens | 1000 | Ladder + analogies + assumptions + pre-mortem |
|
|
681
|
+
| Output | ~400 tokens | 600 | Summary + handoff |
|
|
682
|
+
| **Quick total** | ~1300 | ~2600 | Frame + 3 approaches + Evaluate |
|
|
683
|
+
| **Standard total** | ~3500 | ~5200 | Frame + Diverge + Evaluate + Output |
|
|
684
|
+
| **Deep total** | ~5400 | ~9200 | All 5 phases |
|
|
685
|
+
|
|
686
|
+
**When to exceed targets**: Complex problems with many stakeholders, deeply technical domains requiring precise terminology, or when the user explicitly asks for more detail.
|
|
585
687
|
|
|
586
688
|
---
|
|
587
689
|
|
|
@@ -170,14 +170,20 @@ Every US MUST have `**Project**:` field. For 2-level structures, also `**Board**
|
|
|
170
170
|
|
|
171
171
|
### 3a. Determine Increment Location
|
|
172
172
|
|
|
173
|
-
**CRITICAL for
|
|
173
|
+
**CRITICAL for umbrella vs single-repo:**
|
|
174
174
|
|
|
175
175
|
```bash
|
|
176
|
-
# Check
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
# Check umbrella mode
|
|
177
|
+
UMBRELLA_ENABLED=$(jq -r '.umbrella.enabled // false' .specweave/config.json 2>/dev/null)
|
|
178
|
+
|
|
179
|
+
if [ "$UMBRELLA_ENABLED" = "true" ]; then
|
|
180
|
+
echo "UMBRELLA MODE: Increments go in UMBRELLA ROOT .specweave/increments/"
|
|
181
|
+
echo "The **Project**: field in each user story controls sync routing to child repos."
|
|
182
|
+
# List available child repos for context
|
|
183
|
+
jq -r '.umbrella.childRepos[]? | "\(.name) (\(.path))"' .specweave/config.json 2>/dev/null
|
|
184
|
+
elif [ -d "repositories" ]; then
|
|
185
|
+
echo "MULTI-REPO (no umbrella): Increments belong in EACH repo's .specweave/"
|
|
179
186
|
ORG=$(jq -r '.repository.organization // empty' .specweave/config.json 2>/dev/null)
|
|
180
|
-
[ -z "$ORG" ] && ORG=$(jq -r '[.sync.profiles[].config.owner // .sync.profiles[].config.organization] | map(select(. != null)) | first // empty' .specweave/config.json 2>/dev/null)
|
|
181
187
|
[ -z "$ORG" ] && ORG=$(ls -d repositories/*/ 2>/dev/null | head -1 | xargs basename 2>/dev/null)
|
|
182
188
|
echo "Organization: $ORG"
|
|
183
189
|
ls -d repositories/*/* 2>/dev/null | head -20
|
|
@@ -186,12 +192,15 @@ else
|
|
|
186
192
|
fi
|
|
187
193
|
```
|
|
188
194
|
|
|
189
|
-
**
|
|
195
|
+
**Umbrella mode (`umbrella.enabled: true`):**
|
|
196
|
+
- ALL increments go in the umbrella root `.specweave/increments/` — NOT in child repos
|
|
197
|
+
- The `**Project**:` field in each user story controls which repo receives sync (GitHub issues, JIRA tickets)
|
|
198
|
+
- Cross-cutting increments can span multiple child repos — each US targets a different project
|
|
199
|
+
- Repos MUST be at `repositories/{ORG}/{repo-name}/` — NEVER directly under `repositories/`
|
|
200
|
+
|
|
201
|
+
**Non-umbrella multi-repo (legacy):**
|
|
190
202
|
- Each repository has its OWN `.specweave/increments/` directory
|
|
191
|
-
- Team agents MUST create increments in their assigned repo's `.specweave/`
|
|
192
|
-
- The umbrella root `.specweave/` is for umbrella-level config ONLY
|
|
193
203
|
- Run `specweave init` in each repo if `.specweave/` doesn't exist
|
|
194
|
-
- Repos MUST be at `repositories/{ORG}/{repo-name}/` — NEVER directly under `repositories/`
|
|
195
204
|
|
|
196
205
|
### 3b. Get Unique ID
|
|
197
206
|
|
|
@@ -259,41 +268,42 @@ Create files in order: metadata.json FIRST, then spec.md, plan.md, tasks.md.
|
|
|
259
268
|
|
|
260
269
|
## Critical Rules
|
|
261
270
|
|
|
262
|
-
1. **NEVER write spec.md/plan.md/tasks.md directly** — ALWAYS delegate via
|
|
271
|
+
1. **NEVER write spec.md/plan.md/tasks.md directly** — ALWAYS delegate via Agent() calls to custom subagents
|
|
263
272
|
2. **Project field is MANDATORY** — Every US MUST have `**Project**:` field
|
|
264
273
|
3. **Use Template Creator CLI** (REQUIRED): `specweave create-increment --id "XXXX-name" --title "Title" --description "Desc" --project "my-app"`
|
|
265
|
-
4. **Agent delegation is the ONLY way** to produce spec.md/plan.md/tasks.md —
|
|
274
|
+
4. **Agent delegation is the ONLY way** to produce spec.md/plan.md/tasks.md — spawn `sw:sw-pm`, `sw:sw-architect`, `sw:sw-planner` subagents via Agent() calls
|
|
266
275
|
5. **Increment naming** — Format: `####-descriptive-kebab-case`
|
|
267
|
-
6. **
|
|
276
|
+
6. **Umbrella mode** — When `umbrella.enabled: true`, ALL increments go in the umbrella root `.specweave/increments/`. The `**Project**:` field per user story routes sync to child repos. Do NOT create increments in child repos.
|
|
268
277
|
|
|
269
|
-
## CRITICAL: Mandatory
|
|
278
|
+
## CRITICAL: Mandatory Subagent Delegation
|
|
270
279
|
|
|
271
280
|
**This skill MUST NOT write spec.md, plan.md, or tasks.md directly.**
|
|
272
|
-
Delegate to
|
|
281
|
+
Delegate to custom subagents via Agent() calls. Each subagent preloads its corresponding skill with full domain logic.
|
|
273
282
|
|
|
274
|
-
**You MUST
|
|
283
|
+
**You MUST spawn these subagents:**
|
|
275
284
|
|
|
276
|
-
| File |
|
|
277
|
-
|
|
278
|
-
| spec.md | sw:
|
|
279
|
-
| plan.md | sw:
|
|
280
|
-
| tasks.md | sw:
|
|
285
|
+
| File | Subagent | Invocation |
|
|
286
|
+
|------|----------|------------|
|
|
287
|
+
| spec.md | sw:sw-pm | `Agent({ subagent_type: "sw:sw-pm", prompt: "Write spec for increment XXXX-name: <description>. Increment path: <path>. [UMBRELLA: child repos list if enabled]", description: "PM writes spec.md" })` |
|
|
288
|
+
| plan.md | sw:sw-architect | `Agent({ subagent_type: "sw:sw-architect", prompt: "Design architecture for increment XXXX-name. Read spec.md at <path>/spec.md", description: "Architect writes plan.md" })` |
|
|
289
|
+
| tasks.md | sw:sw-planner | `Agent({ subagent_type: "sw:sw-planner", prompt: "Generate tasks for increment XXXX-name. Read spec.md at <path>/spec.md and plan.md at <path>/plan.md", description: "Planner writes tasks.md" })` |
|
|
281
290
|
|
|
282
291
|
**DO NOT:**
|
|
283
292
|
- Write user stories, architecture, or tasks inline
|
|
284
293
|
- Copy/paste spec content into Write() calls
|
|
285
294
|
- "Summarize" what an agent would produce
|
|
286
|
-
- Skip any of the 3
|
|
295
|
+
- Skip any of the 3 Agent() calls
|
|
296
|
+
- Use Skill() for these — subagents provide memory + resumability
|
|
287
297
|
|
|
288
298
|
## Step 3a: Deep Interview Mode (if enabled)
|
|
289
299
|
|
|
290
300
|
**IMPORTANT**: This step runs AFTER the increment folder is created (Step 3), so the
|
|
291
301
|
interview state file can reference the real increment ID.
|
|
292
302
|
|
|
293
|
-
**If deep interview is enabled, delegate to PM
|
|
303
|
+
**If deep interview is enabled, delegate to PM subagent:**
|
|
294
304
|
|
|
295
305
|
```typescript
|
|
296
|
-
|
|
306
|
+
Agent({ subagent_type: "sw:sw-pm", prompt: "Deep interview for increment XXXX-name: <user description>. Increment path: <path>", description: "PM deep interview" })
|
|
297
307
|
```
|
|
298
308
|
|
|
299
309
|
The PM agent will:
|
|
@@ -305,23 +315,31 @@ The PM agent will:
|
|
|
305
315
|
**After PM agent returns**, read the interview state file to confirm all categories are covered
|
|
306
316
|
before proceeding to spec.md creation (especially when `enforcement: "strict"`).
|
|
307
317
|
|
|
308
|
-
## Step 4: Delegation (MANDATORY -
|
|
318
|
+
## Step 4: Delegation (MANDATORY - Custom Subagent Based)
|
|
309
319
|
|
|
310
|
-
**After increment folder + metadata.json are created, you MUST
|
|
320
|
+
**After increment folder + metadata.json are created, you MUST spawn all 3 subagents sequentially.**
|
|
311
321
|
|
|
312
|
-
|
|
322
|
+
Each subagent preloads its corresponding skill (with full domain logic, phases, templates). The subagent provides: isolated context, persistent memory, resumability, auto-compaction.
|
|
323
|
+
|
|
324
|
+
### 4a. Spawn PM Subagent for spec.md (REQUIRED)
|
|
325
|
+
|
|
326
|
+
**Include umbrella context when `umbrella.enabled: true`:**
|
|
313
327
|
```typescript
|
|
314
|
-
|
|
328
|
+
// Umbrella mode — pass child repos so PM can assign **Project**: per user story
|
|
329
|
+
Agent({ subagent_type: "sw:sw-pm", prompt: "Write spec for increment XXXX-name: <description>. Increment path: .specweave/increments/XXXX-name/. UMBRELLA MODE: Child repos: [repo1, repo2, ...]. Design cross-cutting stories — assign **Project**: to each US based on which repo owns that work.", description: "PM writes spec.md" })
|
|
330
|
+
|
|
331
|
+
// Single-project mode — standard invocation
|
|
332
|
+
Agent({ subagent_type: "sw:sw-pm", prompt: "Write spec for increment XXXX-name: <description>. Increment path: .specweave/increments/XXXX-name/", description: "PM writes spec.md" })
|
|
315
333
|
```
|
|
316
334
|
|
|
317
|
-
### 4b.
|
|
335
|
+
### 4b. Spawn Architect Subagent for plan.md (REQUIRED)
|
|
318
336
|
```typescript
|
|
319
|
-
|
|
337
|
+
Agent({ subagent_type: "sw:sw-architect", prompt: "Design architecture for increment XXXX-name. Read spec.md at .specweave/increments/XXXX-name/spec.md. ADR directory: .specweave/docs/internal/architecture/adr/", description: "Architect writes plan.md" })
|
|
320
338
|
```
|
|
321
339
|
|
|
322
|
-
### 4c.
|
|
340
|
+
### 4c. Spawn Planner Subagent for tasks.md (REQUIRED)
|
|
323
341
|
```typescript
|
|
324
|
-
|
|
342
|
+
Agent({ subagent_type: "sw:sw-planner", prompt: "Generate tasks for increment XXXX-name. Read spec.md at .specweave/increments/XXXX-name/spec.md and plan.md at .specweave/increments/XXXX-name/plan.md", description: "Planner writes tasks.md" })
|
|
325
343
|
```
|
|
326
344
|
|
|
327
345
|
**Order matters**: PM first (spec.md) -> Architect second (plan.md) -> Planner last (tasks.md).
|
|
@@ -431,7 +449,7 @@ Created increment 0003-user-authentication
|
|
|
431
449
|
|
|
432
450
|
- `.specweave/` not found: "Run specweave init first"
|
|
433
451
|
- Vague description: Ask clarifying questions
|
|
434
|
-
-
|
|
452
|
+
- Subagent fails: Fall back to invoking `/sw:pm` or `/sw:architect` skills directly (skills still work standalone)
|
|
435
453
|
|
|
436
454
|
---
|
|
437
455
|
|
|
@@ -72,7 +72,7 @@ If `true`:
|
|
|
72
72
|
|
|
73
73
|
### Writing Interview State to Disk (CRITICAL)
|
|
74
74
|
|
|
75
|
-
**
|
|
75
|
+
**When invoked via subagent (sw:sw-pm), this runs in an isolated context, but file writes persist.**
|
|
76
76
|
|
|
77
77
|
When invoked from `sw:increment` with an increment ID (e.g., "Deep interview for increment 0266-foo: ..."),
|
|
78
78
|
you MUST write the interview state file to disk so the enforcement guard can find it:
|
|
@@ -95,6 +95,33 @@ jq '.coveredCategories.architecture = {"coveredAt": "'$(date -Iseconds)'", "summ
|
|
|
95
95
|
`.specweave/state/interview-{increment-id}.json` before allowing spec.md writes. If this file
|
|
96
96
|
is missing or incomplete, spec.md creation is BLOCKED in strict mode.
|
|
97
97
|
|
|
98
|
+
## Umbrella Mode (Cross-Cutting Specs)
|
|
99
|
+
|
|
100
|
+
When your invocation args include **UMBRELLA MODE**, the project uses an umbrella workspace with multiple child repos. This changes how you design specs:
|
|
101
|
+
|
|
102
|
+
**Umbrella mode (`umbrella.enabled: true`):**
|
|
103
|
+
- Design **cross-cutting** user stories that span multiple repos
|
|
104
|
+
- Each US gets `**Project**: <child-repo-name>` based on which repo owns that work
|
|
105
|
+
- Think at a higher level: a "login feature" may need US for frontend (UI) AND backend (API)
|
|
106
|
+
- A single increment can contain stories targeting different child repos
|
|
107
|
+
- Use prefixed IDs when multi-project is detected: `US-FE-001`, `US-BE-001`
|
|
108
|
+
- For umbrella-scoped work (CI, shared config), use the umbrella project name
|
|
109
|
+
|
|
110
|
+
**Example — umbrella increment with 2 child repos (frontend, backend):**
|
|
111
|
+
```markdown
|
|
112
|
+
### US-FE-001: Login Page UI
|
|
113
|
+
**Project**: frontend
|
|
114
|
+
**As a** user **I want** a login form **So that** I can authenticate
|
|
115
|
+
|
|
116
|
+
### US-BE-001: Authentication API
|
|
117
|
+
**Project**: backend
|
|
118
|
+
**As a** user **I want** a /login endpoint **So that** the frontend can authenticate
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Single-project mode (no umbrella context in args):**
|
|
122
|
+
- All user stories get the same `**Project**: <project-name>` value
|
|
123
|
+
- Standard single-project spec design
|
|
124
|
+
|
|
98
125
|
## Core Principles
|
|
99
126
|
|
|
100
127
|
1. **Phased Approach**: Work in phases, not all at once
|
|
@@ -68,6 +68,23 @@ Edit spec.md to append remaining user stories.
|
|
|
68
68
|
Report completion.
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
## Umbrella Mode: Multi-Project Story Assignment
|
|
72
|
+
|
|
73
|
+
When the increment uses **umbrella mode** (args contain "UMBRELLA MODE" with child repo list):
|
|
74
|
+
|
|
75
|
+
1. **Decompose by repo ownership**: Each user story targets ONE child repo via `**Project**:`
|
|
76
|
+
2. **Cross-cutting features**: Split into separate stories per repo (e.g., frontend UI + backend API)
|
|
77
|
+
3. **Use prefixed IDs**: `US-FE-001`, `US-BE-002` — prefix from `specweave context projects`
|
|
78
|
+
4. **Shared/infra work**: Set `**Project**:` to the umbrella project name
|
|
79
|
+
5. **Every US must have exactly one `**Project**:`** — never omit, never assign multiple
|
|
80
|
+
|
|
81
|
+
**Example split for "user login":**
|
|
82
|
+
- `US-FE-001: Login Page` → `**Project**: frontend`
|
|
83
|
+
- `US-BE-001: Auth API Endpoint` → `**Project**: backend`
|
|
84
|
+
- `US-BE-002: JWT Token Service` → `**Project**: backend`
|
|
85
|
+
|
|
86
|
+
When NOT in umbrella mode, all stories get the same `**Project**: <project-name>`.
|
|
87
|
+
|
|
71
88
|
## User Story Guidelines
|
|
72
89
|
|
|
73
90
|
### Good User Story
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Generate tasks.md with embedded test plans in BDD format, one user story at a time to prevent crashes. Use for test-first task planning where each task includes Given/When/Then scenarios. Produces implementation tasks with inline test specifications.
|
|
3
3
|
context: fork
|
|
4
|
-
model:
|
|
4
|
+
model: sonnet
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Test-Aware Planner Skill
|