specweave 0.17.15 → 0.17.17
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 +405 -2495
- package/README.md +92 -2
- package/dist/locales/de/.gitkeep +0 -0
- package/dist/locales/de/cli.json +108 -0
- package/dist/locales/en/cli.json +287 -0
- package/dist/locales/en/errors.json +7 -0
- package/dist/locales/en/templates.json +6 -0
- package/dist/locales/es/.gitkeep +0 -0
- package/dist/locales/es/cli.json +41 -0
- package/dist/locales/fr/.gitkeep +0 -0
- package/dist/locales/fr/cli.json +108 -0
- package/dist/locales/ja/.gitkeep +0 -0
- package/dist/locales/ja/cli.json +108 -0
- package/dist/locales/ko/.gitkeep +0 -0
- package/dist/locales/ko/cli.json +108 -0
- package/dist/locales/pt/.gitkeep +0 -0
- package/dist/locales/pt/cli.json +108 -0
- package/dist/locales/ru/.gitkeep +0 -0
- package/dist/locales/ru/cli.json +269 -0
- package/dist/locales/zh/.gitkeep +0 -0
- package/dist/locales/zh/cli.json +108 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +188 -36
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts +54 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js +86 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts +25 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js +191 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts +139 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.js +389 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.js.map +1 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts +26 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +249 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client.d.ts +1 -1
- package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client.js +25 -13
- package/dist/plugins/specweave-github/lib/github-client.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +83 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.js +451 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +43 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.js +82 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts +5 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/task-sync.js +38 -2
- package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +26 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +195 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.d.ts +66 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.js +274 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +56 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js +93 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -0
- package/dist/spec-parser.js +629 -0
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +48 -3
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts +142 -0
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -0
- package/dist/src/core/living-docs/hierarchy-mapper.js +453 -0
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -0
- package/dist/src/core/living-docs/index.d.ts +10 -84
- package/dist/src/core/living-docs/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/index.js +10 -164
- package/dist/src/core/living-docs/index.js.map +1 -1
- package/dist/src/core/living-docs/spec-distributor.d.ts +106 -0
- package/dist/src/core/living-docs/spec-distributor.d.ts.map +1 -0
- package/dist/src/core/living-docs/spec-distributor.js +823 -0
- package/dist/src/core/living-docs/spec-distributor.js.map +1 -0
- package/dist/src/core/living-docs/types.d.ts +201 -0
- package/dist/src/core/living-docs/types.d.ts.map +1 -0
- package/dist/src/core/living-docs/types.js +15 -0
- package/dist/src/core/living-docs/types.js.map +1 -0
- package/dist/src/core/logging/prompt-logger.d.ts +70 -0
- package/dist/src/core/logging/prompt-logger.d.ts.map +1 -0
- package/dist/src/core/logging/prompt-logger.js +247 -0
- package/dist/src/core/logging/prompt-logger.js.map +1 -0
- package/dist/src/core/status-line/status-line-manager.d.ts +15 -24
- package/dist/src/core/status-line/status-line-manager.d.ts.map +1 -1
- package/dist/src/core/status-line/status-line-manager.js +33 -70
- package/dist/src/core/status-line/status-line-manager.js.map +1 -1
- package/dist/src/core/status-line/types.d.ts +19 -31
- package/dist/src/core/status-line/types.d.ts.map +1 -1
- package/dist/src/core/status-line/types.js +5 -9
- package/dist/src/core/status-line/types.js.map +1 -1
- package/dist/src/core/sync/conflict-resolver.d.ts +66 -0
- package/dist/src/core/sync/conflict-resolver.d.ts.map +1 -0
- package/dist/src/core/sync/conflict-resolver.js +108 -0
- package/dist/src/core/sync/conflict-resolver.js.map +1 -0
- package/dist/src/core/sync/enhanced-content-builder.d.ts +77 -0
- package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -0
- package/dist/src/core/sync/enhanced-content-builder.js +199 -0
- package/dist/src/core/sync/enhanced-content-builder.js.map +1 -0
- package/dist/src/core/sync/label-detector.d.ts +66 -0
- package/dist/src/core/sync/label-detector.d.ts.map +1 -0
- package/dist/src/core/sync/label-detector.js +211 -0
- package/dist/src/core/sync/label-detector.js.map +1 -0
- package/dist/src/core/sync/retry-logic.d.ts +64 -0
- package/dist/src/core/sync/retry-logic.d.ts.map +1 -0
- package/dist/src/core/sync/retry-logic.js +165 -0
- package/dist/src/core/sync/retry-logic.js.map +1 -0
- package/dist/src/core/sync/spec-content-sync.d.ts +88 -0
- package/dist/src/core/sync/spec-content-sync.d.ts.map +1 -0
- package/dist/src/core/sync/spec-content-sync.js +5 -0
- package/dist/src/core/sync/spec-content-sync.js.map +1 -0
- package/dist/src/core/sync/spec-increment-mapper.d.ts +100 -0
- package/dist/src/core/sync/spec-increment-mapper.d.ts.map +1 -0
- package/dist/src/core/sync/spec-increment-mapper.js +424 -0
- package/dist/src/core/sync/spec-increment-mapper.js.map +1 -0
- package/dist/src/core/sync/status-cache.d.ts +91 -0
- package/dist/src/core/sync/status-cache.d.ts.map +1 -0
- package/dist/src/core/sync/status-cache.js +140 -0
- package/dist/src/core/sync/status-cache.js.map +1 -0
- package/dist/src/core/sync/status-mapper.d.ts +69 -0
- package/dist/src/core/sync/status-mapper.d.ts.map +1 -0
- package/dist/src/core/sync/status-mapper.js +90 -0
- package/dist/src/core/sync/status-mapper.js.map +1 -0
- package/dist/src/core/sync/status-sync-engine.d.ts +162 -0
- package/dist/src/core/sync/status-sync-engine.d.ts.map +1 -0
- package/dist/src/core/sync/status-sync-engine.js +347 -0
- package/dist/src/core/sync/status-sync-engine.js.map +1 -0
- package/dist/src/core/sync/sync-event-logger.d.ts +99 -0
- package/dist/src/core/sync/sync-event-logger.d.ts.map +1 -0
- package/dist/src/core/sync/sync-event-logger.js +103 -0
- package/dist/src/core/sync/sync-event-logger.js.map +1 -0
- package/dist/src/core/sync/workflow-detector.d.ts +95 -0
- package/dist/src/core/sync/workflow-detector.d.ts.map +1 -0
- package/dist/src/core/sync/workflow-detector.js +175 -0
- package/dist/src/core/sync/workflow-detector.js.map +1 -0
- package/dist/src/core/types/config.d.ts.map +1 -1
- package/dist/src/core/types/config.js +31 -0
- package/dist/src/core/types/config.js.map +1 -1
- package/dist/src/utils/github-url.d.ts +53 -0
- package/dist/src/utils/github-url.d.ts.map +1 -0
- package/dist/src/utils/github-url.js +90 -0
- package/dist/src/utils/github-url.js.map +1 -0
- package/dist/src/utils/plugin-validator.d.ts +9 -0
- package/dist/src/utils/plugin-validator.d.ts.map +1 -1
- package/dist/src/utils/plugin-validator.js +86 -19
- package/dist/src/utils/plugin-validator.js.map +1 -1
- package/dist/src/utils/spec-parser.d.ts +145 -0
- package/dist/src/utils/spec-parser.d.ts.map +1 -0
- package/dist/src/utils/spec-parser.js +640 -0
- package/dist/src/utils/spec-parser.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/plugins/specweave/agents/pm/AGENT.md +1 -1
- package/plugins/specweave/agents/pm/templates/increment-spec.md +158 -0
- package/plugins/specweave/agents/pm/templates/living-docs-spec.md +113 -0
- package/plugins/specweave/commands/specweave-done.md +163 -0
- package/plugins/specweave/hooks/lib/update-status-line.sh +79 -111
- package/plugins/specweave/hooks/post-increment-planning.sh +107 -35
- package/plugins/specweave/lib/hooks/sync-living-docs.js +139 -34
- package/plugins/specweave/lib/hooks/sync-living-docs.ts +234 -38
- package/plugins/specweave/skills/SKILLS-INDEX.md +4 -24
- package/plugins/specweave/skills/increment-planner/SKILL.md +94 -0
- package/plugins/specweave/skills/increment-work-router/SKILL.md +466 -0
- package/plugins/specweave/skills/plugin-validator/SKILL.md +16 -13
- package/plugins/specweave-ado/lib/ado-status-sync.js +80 -0
- package/plugins/specweave-ado/lib/ado-status-sync.ts +121 -0
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
- package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +205 -0
- package/plugins/specweave-github/commands/specweave-github-sync-epic.md +248 -0
- package/plugins/specweave-github/lib/duplicate-detector.js +370 -0
- package/plugins/specweave-github/lib/duplicate-detector.ts +525 -0
- package/plugins/specweave-github/lib/enhanced-github-sync.js +220 -0
- package/plugins/specweave-github/lib/enhanced-github-sync.ts +322 -0
- package/plugins/specweave-github/lib/github-client.js +21 -10
- package/plugins/specweave-github/lib/github-client.ts +27 -16
- package/plugins/specweave-github/lib/github-epic-sync.js +489 -0
- package/plugins/specweave-github/lib/github-epic-sync.ts +690 -0
- package/plugins/specweave-github/lib/github-status-sync.js +71 -0
- package/plugins/specweave-github/lib/github-status-sync.ts +107 -0
- package/plugins/specweave-github/lib/task-sync.js +33 -2
- package/plugins/specweave-github/lib/task-sync.ts +44 -2
- package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +267 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.ts.disabled +222 -0
- package/plugins/specweave-jira/lib/jira-epic-sync.js +304 -0
- package/plugins/specweave-jira/lib/jira-epic-sync.ts +459 -0
- package/plugins/specweave-jira/lib/jira-status-sync.js +79 -0
- package/plugins/specweave-jira/lib/jira-status-sync.ts +139 -0
- package/src/templates/AGENTS.md.template +88 -1
- package/src/templates/CLAUDE.md.template +49 -0
- package/plugins/specweave/skills/increment-quality-judge/SKILL.md +0 -524
- package/plugins/specweave/skills/plugin-installer/SKILL.md +0 -353
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: increment-work-router
|
|
3
|
+
description: Smart work continuation system that detects implementation intent and routes to active increment or creates new one. Activates for implement, complete, build, add, develop, work on, continue, resume, finish, fix, resolve, address, let's implement, let's build, start working, begin implementation, add feature, create feature.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Increment Work Router - Smart Work Continuation
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
The increment-work-router skill is an **intelligent work continuation system** that:
|
|
11
|
+
- ✅ Detects implementation/continuation intent (not just new projects)
|
|
12
|
+
- ✅ Checks for active increments automatically
|
|
13
|
+
- ✅ Routes to existing increment OR creates new one
|
|
14
|
+
- ✅ Bridges the gap between planning and execution
|
|
15
|
+
|
|
16
|
+
**Key Insight**: When user says "implement X" or "complete Y", they expect the system to handle routing intelligently without manual commands.
|
|
17
|
+
|
|
18
|
+
## When to Activate
|
|
19
|
+
|
|
20
|
+
This skill activates when user expresses **implementation/continuation intent**:
|
|
21
|
+
|
|
22
|
+
### High-Confidence Triggers (Auto-Route)
|
|
23
|
+
|
|
24
|
+
**Action Verbs** (with specific target):
|
|
25
|
+
- "Implement [feature]"
|
|
26
|
+
- "Complete [task]"
|
|
27
|
+
- "Build [component]"
|
|
28
|
+
- "Add [functionality]"
|
|
29
|
+
- "Develop [module]"
|
|
30
|
+
- "Create [feature]"
|
|
31
|
+
|
|
32
|
+
**Continuation Phrases**:
|
|
33
|
+
- "Work on [feature]"
|
|
34
|
+
- "Continue [increment]"
|
|
35
|
+
- "Resume [work]"
|
|
36
|
+
- "Finish [task]"
|
|
37
|
+
- "Let's implement [X]"
|
|
38
|
+
- "Let's build [Y]"
|
|
39
|
+
- "Start working on [Z]"
|
|
40
|
+
|
|
41
|
+
**Bug/Fix Intent**:
|
|
42
|
+
- "Fix [issue]"
|
|
43
|
+
- "Resolve [bug]"
|
|
44
|
+
- "Address [problem]"
|
|
45
|
+
|
|
46
|
+
### Medium-Confidence Triggers (Clarify)
|
|
47
|
+
|
|
48
|
+
**Vague Intent** (needs target clarification):
|
|
49
|
+
- "Let's continue"
|
|
50
|
+
- "Keep working"
|
|
51
|
+
- "What's next?"
|
|
52
|
+
- "Continue where we left off"
|
|
53
|
+
|
|
54
|
+
### Don't Activate For
|
|
55
|
+
|
|
56
|
+
**Planning/Discussion** (let other skills handle):
|
|
57
|
+
- "What should we build?" → project-kickstarter
|
|
58
|
+
- "How does X work?" → Regular conversation
|
|
59
|
+
- "Should we use Y?" → Technical discussion
|
|
60
|
+
- "Plan a new feature" → increment-planner
|
|
61
|
+
|
|
62
|
+
**Already in Workflow**:
|
|
63
|
+
- User is already executing `/specweave:do`
|
|
64
|
+
- Increment planning is in progress
|
|
65
|
+
- Another skill is handling the request
|
|
66
|
+
|
|
67
|
+
## Core Algorithm
|
|
68
|
+
|
|
69
|
+
### Step 1: Detect Intent
|
|
70
|
+
|
|
71
|
+
Scan user message for implementation keywords:
|
|
72
|
+
```
|
|
73
|
+
Action verbs: implement, complete, build, add, develop, create
|
|
74
|
+
Continuation: work on, continue, resume, finish, start
|
|
75
|
+
Bug/Fix: fix, resolve, address
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Calculate confidence:
|
|
79
|
+
- **High (>80%)**: Action verb + specific target ("implement user auth")
|
|
80
|
+
- **Medium (50-80%)**: Action verb only ("let's continue")
|
|
81
|
+
- **Low (<50%)**: No clear intent
|
|
82
|
+
|
|
83
|
+
### Step 2: Check Active Increments
|
|
84
|
+
|
|
85
|
+
**Read increment state:**
|
|
86
|
+
```bash
|
|
87
|
+
# Find all increments with status = "active"
|
|
88
|
+
find .specweave/increments -name "metadata.json" -type f \
|
|
89
|
+
-exec jq -r 'select(.status == "active") | .id' {} \;
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Three scenarios:**
|
|
93
|
+
1. **One active increment** → Check relevance and route
|
|
94
|
+
2. **Multiple active increments** → Ask user to select
|
|
95
|
+
3. **No active increments** → Suggest creating new one
|
|
96
|
+
|
|
97
|
+
### Step 3: Check Relevance (if active increment exists)
|
|
98
|
+
|
|
99
|
+
**Relatedness Analysis:**
|
|
100
|
+
Compare user's request against active increment:
|
|
101
|
+
- Check increment title/description
|
|
102
|
+
- Check task list (tasks.md)
|
|
103
|
+
- Check spec.md for related features
|
|
104
|
+
|
|
105
|
+
**Scoring:**
|
|
106
|
+
- **High match (>70%)**: Same feature area → Auto-resume
|
|
107
|
+
- **Medium match (40-70%)**: Related area → Ask confirmation
|
|
108
|
+
- **Low match (<40%)**: Unrelated → Suggest new increment
|
|
109
|
+
|
|
110
|
+
### Step 4: Route Intelligently
|
|
111
|
+
|
|
112
|
+
**Scenario A: High relevance to active increment**
|
|
113
|
+
```
|
|
114
|
+
User: "Implement user authentication"
|
|
115
|
+
Active: 0031-user-authentication-system
|
|
116
|
+
|
|
117
|
+
✅ High match → Auto-resume:
|
|
118
|
+
|
|
119
|
+
"I see you have an active increment for user authentication (0031).
|
|
120
|
+
Resuming work on that increment now with /specweave:do..."
|
|
121
|
+
|
|
122
|
+
[Automatically invokes /specweave:do]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Scenario B: Unrelated to active increment**
|
|
126
|
+
```
|
|
127
|
+
User: "Implement payment processing"
|
|
128
|
+
Active: 0031-user-authentication-system
|
|
129
|
+
|
|
130
|
+
⚠️ Low match → Ask:
|
|
131
|
+
|
|
132
|
+
"I see you have an active increment (0031-user-authentication-system).
|
|
133
|
+
|
|
134
|
+
Your request for payment processing seems unrelated. Would you like to:
|
|
135
|
+
1. **Create new increment** for payment processing (recommended)
|
|
136
|
+
2. **Continue current increment** (0031) and add payment to it
|
|
137
|
+
3. **Pause current** and create new increment
|
|
138
|
+
|
|
139
|
+
What would you prefer?"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Scenario C: No active increment**
|
|
143
|
+
```
|
|
144
|
+
User: "Implement user authentication"
|
|
145
|
+
Active: None
|
|
146
|
+
|
|
147
|
+
→ Suggest new increment:
|
|
148
|
+
|
|
149
|
+
"No active increment found. Let's create one for user authentication.
|
|
150
|
+
|
|
151
|
+
I'm going to create a SpecWeave increment with:
|
|
152
|
+
- Specification (WHAT & WHY)
|
|
153
|
+
- Technical plan (HOW)
|
|
154
|
+
- Task breakdown (STEPS with embedded tests)
|
|
155
|
+
|
|
156
|
+
Creating increment now with /specweave:increment..."
|
|
157
|
+
|
|
158
|
+
[Automatically invokes /specweave:increment "user authentication"]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Scenario D: Multiple active increments**
|
|
162
|
+
```
|
|
163
|
+
User: "Continue working"
|
|
164
|
+
Active: 0031-user-auth, 0032-payment-system
|
|
165
|
+
|
|
166
|
+
→ Ask to clarify:
|
|
167
|
+
|
|
168
|
+
"You have 2 active increments:
|
|
169
|
+
1. **0031-user-authentication-system** (3/10 tasks complete)
|
|
170
|
+
2. **0032-payment-processing** (1/8 tasks complete)
|
|
171
|
+
|
|
172
|
+
Which one would you like to work on?"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Scenario E: Vague continuation intent**
|
|
176
|
+
```
|
|
177
|
+
User: "Let's continue"
|
|
178
|
+
Active: 0031-user-authentication-system
|
|
179
|
+
|
|
180
|
+
✅ Auto-resume (only one active):
|
|
181
|
+
|
|
182
|
+
"Resuming increment 0031-user-authentication-system...
|
|
183
|
+
Progress: 3/10 tasks complete (30%)
|
|
184
|
+
|
|
185
|
+
Next task: T-004 Implement password hashing
|
|
186
|
+
|
|
187
|
+
[Automatically invokes /specweave:do]"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Integration Architecture
|
|
191
|
+
|
|
192
|
+
**Workflow:**
|
|
193
|
+
```
|
|
194
|
+
User: "Implement [feature]"
|
|
195
|
+
↓
|
|
196
|
+
increment-work-router (detects intent)
|
|
197
|
+
↓
|
|
198
|
+
[Check .specweave/increments/*/metadata.json]
|
|
199
|
+
↓
|
|
200
|
+
┌───────────────────┬──────────────────┬────────────────┐
|
|
201
|
+
│ Active increment │ Multiple active │ No active │
|
|
202
|
+
│ (relevant) │ (ambiguous) │ (none) │
|
|
203
|
+
└─────┬─────────────┴──────┬───────────┴──────┬─────────┘
|
|
204
|
+
│ │ │
|
|
205
|
+
↓ ↓ ↓
|
|
206
|
+
/specweave:do Ask to select /specweave:increment
|
|
207
|
+
(auto-resume) (clarify) (create new)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Calls:**
|
|
211
|
+
- `/specweave:do` - Resume active increment
|
|
212
|
+
- `/specweave:increment` - Create new increment
|
|
213
|
+
- `/specweave:status` - Check increment state (if needed)
|
|
214
|
+
|
|
215
|
+
**Called By:**
|
|
216
|
+
- Automatically when implementation intent detected
|
|
217
|
+
- Works alongside `project-kickstarter` (projects) and `increment-planner` (planning)
|
|
218
|
+
|
|
219
|
+
## Decision Matrix
|
|
220
|
+
|
|
221
|
+
| User Intent | Active Increments | Relevance | Action |
|
|
222
|
+
|-------------|------------------|-----------|--------|
|
|
223
|
+
| "Implement auth" | 1 (auth-related) | High (>70%) | Auto `/specweave:do` |
|
|
224
|
+
| "Implement auth" | 1 (unrelated) | Low (<40%) | Ask: New or add to current? |
|
|
225
|
+
| "Implement auth" | 0 | N/A | Auto `/specweave:increment` |
|
|
226
|
+
| "Implement auth" | 2+ | N/A | Ask which increment |
|
|
227
|
+
| "Let's continue" | 1 | N/A | Auto `/specweave:do` |
|
|
228
|
+
| "Let's continue" | 2+ | N/A | Ask which increment |
|
|
229
|
+
| "Let's continue" | 0 | N/A | "No active increment. What should we build?" |
|
|
230
|
+
|
|
231
|
+
## Relevance Matching Logic
|
|
232
|
+
|
|
233
|
+
**How to determine if request relates to active increment:**
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
function calculateRelevance(userRequest: string, increment: Increment): number {
|
|
237
|
+
let score = 0;
|
|
238
|
+
|
|
239
|
+
// 1. Title/ID match (strongest signal)
|
|
240
|
+
if (increment.title.toLowerCase().includes(extractKeywords(userRequest))) {
|
|
241
|
+
score += 40;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// 2. Tasks match (check tasks.md)
|
|
245
|
+
const tasks = readTasksFile(increment);
|
|
246
|
+
const matchingTasks = tasks.filter(t =>
|
|
247
|
+
t.title.toLowerCase().includes(extractKeywords(userRequest))
|
|
248
|
+
);
|
|
249
|
+
score += (matchingTasks.length / tasks.length) * 30;
|
|
250
|
+
|
|
251
|
+
// 3. Spec match (check spec.md user stories)
|
|
252
|
+
const spec = readSpecFile(increment);
|
|
253
|
+
if (spec.includes(extractKeywords(userRequest))) {
|
|
254
|
+
score += 20;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// 4. Type match (feature vs bug vs hotfix)
|
|
258
|
+
const requestType = detectType(userRequest);
|
|
259
|
+
if (requestType === increment.type) {
|
|
260
|
+
score += 10;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return score; // 0-100
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Example:**
|
|
268
|
+
```
|
|
269
|
+
User: "Implement JWT token refresh"
|
|
270
|
+
Active: 0031-user-authentication-system
|
|
271
|
+
|
|
272
|
+
Checks:
|
|
273
|
+
✅ Title contains "authentication" (user mentions "JWT token") → +40 points
|
|
274
|
+
✅ Tasks.md has "T-005: Implement JWT refresh logic" → +30 points
|
|
275
|
+
✅ Spec.md mentions "token management" → +20 points
|
|
276
|
+
✅ Both are "feature" type → +10 points
|
|
277
|
+
|
|
278
|
+
Total: 100/100 → High relevance → Auto-resume
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## Examples
|
|
282
|
+
|
|
283
|
+
### Example 1: Auto-Resume (High Relevance)
|
|
284
|
+
|
|
285
|
+
**Context:**
|
|
286
|
+
```
|
|
287
|
+
Active: 0031-user-authentication-system
|
|
288
|
+
Progress: 3/10 tasks complete
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**User:**
|
|
292
|
+
```
|
|
293
|
+
Implement JWT token refresh
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**increment-work-router:**
|
|
297
|
+
```
|
|
298
|
+
✅ Intent detected: "implement" + specific target
|
|
299
|
+
✅ Active increment found: 0031-user-authentication-system
|
|
300
|
+
✅ Relevance check: 95% match (authentication-related)
|
|
301
|
+
|
|
302
|
+
→ AUTO-RESUME
|
|
303
|
+
|
|
304
|
+
"I see you have an active increment for user authentication (0031).
|
|
305
|
+
Task T-005 'Implement JWT token refresh' is already in your plan.
|
|
306
|
+
|
|
307
|
+
Resuming increment 0031 now with /specweave:do...
|
|
308
|
+
|
|
309
|
+
[Automatically invokes /specweave:do]
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Example 2: Create New (No Active Increment)
|
|
313
|
+
|
|
314
|
+
**Context:**
|
|
315
|
+
```
|
|
316
|
+
Active: None
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**User:**
|
|
320
|
+
```
|
|
321
|
+
Implement payment processing with Stripe
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
**increment-work-router:**
|
|
325
|
+
```
|
|
326
|
+
✅ Intent detected: "implement" + specific target
|
|
327
|
+
❌ No active increment found
|
|
328
|
+
|
|
329
|
+
→ CREATE NEW
|
|
330
|
+
|
|
331
|
+
"No active increment found. Let's create one for payment processing.
|
|
332
|
+
|
|
333
|
+
I'm going to create a SpecWeave increment with:
|
|
334
|
+
- Specification (Stripe integration requirements)
|
|
335
|
+
- Technical plan (API integration, webhooks, security)
|
|
336
|
+
- Task breakdown (implementation steps with tests)
|
|
337
|
+
|
|
338
|
+
Creating increment now with /specweave:increment...
|
|
339
|
+
|
|
340
|
+
[Automatically invokes /specweave:increment "payment processing with Stripe"]
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Example 3: Unrelated Request (Ask)
|
|
344
|
+
|
|
345
|
+
**Context:**
|
|
346
|
+
```
|
|
347
|
+
Active: 0031-user-authentication-system
|
|
348
|
+
Progress: 3/10 tasks complete
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**User:**
|
|
352
|
+
```
|
|
353
|
+
Implement email notifications
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**increment-work-router:**
|
|
357
|
+
```
|
|
358
|
+
✅ Intent detected: "implement" + specific target
|
|
359
|
+
✅ Active increment found: 0031-user-authentication-system
|
|
360
|
+
⚠️ Relevance check: 15% match (unrelated)
|
|
361
|
+
|
|
362
|
+
→ ASK FOR CLARIFICATION
|
|
363
|
+
|
|
364
|
+
"I see you have an active increment (0031-user-authentication-system) with 3/10 tasks complete.
|
|
365
|
+
|
|
366
|
+
Your request for email notifications seems unrelated. Would you like to:
|
|
367
|
+
1. **Create new increment** for email notifications (recommended - keeps work focused)
|
|
368
|
+
2. **Add to current increment** (0031) - if notifications are for auth emails
|
|
369
|
+
3. **Pause current increment** and start notifications
|
|
370
|
+
|
|
371
|
+
SpecWeave works best with focused increments. What would you prefer?"
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Example 4: Multiple Active (Clarify)
|
|
375
|
+
|
|
376
|
+
**Context:**
|
|
377
|
+
```
|
|
378
|
+
Active: 0031-user-authentication-system (3/10 tasks)
|
|
379
|
+
Active: 0032-payment-processing (1/8 tasks)
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**User:**
|
|
383
|
+
```
|
|
384
|
+
Let's continue working
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
**increment-work-router:**
|
|
388
|
+
```
|
|
389
|
+
✅ Intent detected: "continue" (vague)
|
|
390
|
+
✅ Multiple active increments found: 2
|
|
391
|
+
|
|
392
|
+
→ ASK TO SELECT
|
|
393
|
+
|
|
394
|
+
"You have 2 active increments:
|
|
395
|
+
|
|
396
|
+
1. **0031-user-authentication-system**
|
|
397
|
+
- Progress: 3/10 tasks (30%)
|
|
398
|
+
- Next: T-004 Implement password hashing
|
|
399
|
+
|
|
400
|
+
2. **0032-payment-processing**
|
|
401
|
+
- Progress: 1/8 tasks (12%)
|
|
402
|
+
- Next: T-002 Set up Stripe SDK
|
|
403
|
+
|
|
404
|
+
Which one would you like to work on?"
|
|
405
|
+
|
|
406
|
+
[Wait for user selection, then invoke /specweave:do {selected-id}]
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Example 5: Vague Intent + Single Active (Auto-Resume)
|
|
410
|
+
|
|
411
|
+
**Context:**
|
|
412
|
+
```
|
|
413
|
+
Active: 0031-user-authentication-system (3/10 tasks)
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
**User:**
|
|
417
|
+
```
|
|
418
|
+
What's next?
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**increment-work-router:**
|
|
422
|
+
```
|
|
423
|
+
✅ Intent detected: "what's next" (continuation)
|
|
424
|
+
✅ One active increment: 0031-user-authentication-system
|
|
425
|
+
|
|
426
|
+
→ AUTO-RESUME
|
|
427
|
+
|
|
428
|
+
"Resuming increment 0031-user-authentication-system...
|
|
429
|
+
Progress: 3/10 tasks complete (30%)
|
|
430
|
+
|
|
431
|
+
Next task: **T-004 Implement password hashing**
|
|
432
|
+
|
|
433
|
+
[Automatically invokes /specweave:do]"
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
## Opt-Out Mechanism
|
|
437
|
+
|
|
438
|
+
Users can override auto-routing with explicit instructions:
|
|
439
|
+
- "Don't resume, create new" → Forces new increment
|
|
440
|
+
- "Just discuss first" → Regular conversation
|
|
441
|
+
- "Plan without implementing" → Routes to `/specweave:increment` only
|
|
442
|
+
- "Show me the current state" → Uses `/specweave:status` instead
|
|
443
|
+
|
|
444
|
+
## Success Criteria
|
|
445
|
+
|
|
446
|
+
- ✅ Users can say "implement X" and work starts automatically
|
|
447
|
+
- ✅ Smart routing to active increments (no manual `/specweave:do`)
|
|
448
|
+
- ✅ Detects unrelated requests and prevents scope creep
|
|
449
|
+
- ✅ No "which increment?" confusion (auto-handles single active)
|
|
450
|
+
- ✅ Clear choices when ambiguous (multiple active or unrelated)
|
|
451
|
+
- ✅ Seamless integration with existing skills (project-kickstarter, increment-planner)
|
|
452
|
+
|
|
453
|
+
## Related Skills
|
|
454
|
+
|
|
455
|
+
- **project-kickstarter**: For NEW project descriptions (complements, doesn't overlap)
|
|
456
|
+
- **increment-planner**: For creating increment structure (invoked by this skill)
|
|
457
|
+
- **specweave-detector**: For checking SpecWeave context
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
**Key Distinction:**
|
|
462
|
+
- `project-kickstarter` = "I want to BUILD a new product" (project-level)
|
|
463
|
+
- `increment-work-router` = "IMPLEMENT this feature/task" (execution-level)
|
|
464
|
+
- `increment-planner` = "PLAN this increment" (planning-level)
|
|
465
|
+
|
|
466
|
+
This skill bridges planning → execution by auto-detecting implementation intent.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plugin-validator
|
|
3
|
-
description:
|
|
3
|
+
description: Validates SpecWeave plugin installation when EXPLICITLY requested by user. Ensures marketplace registered, core plugin installed, and context-specific plugins available. ONLY activates for explicit validation requests - does NOT auto-activate for workflow commands to avoid false positives. Activates ONLY for plugin validation, environment setup, validate plugins, check plugins, specweave init, fresh setup, marketplace registration.
|
|
4
4
|
allowed-tools: Read, Bash, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Plugin Validator Skill
|
|
8
8
|
|
|
9
|
-
**Purpose**:
|
|
9
|
+
**Purpose**: Validate and install SpecWeave plugins when explicitly requested by the user.
|
|
10
10
|
|
|
11
|
-
**
|
|
11
|
+
**Activation**: Triggers ONLY when user explicitly requests plugin validation (e.g., "validate plugins", "check plugins", or runs `specweave validate-plugins` command). Does NOT auto-activate for workflow commands to prevent false positive errors.
|
|
12
12
|
|
|
13
13
|
## What This Skill Does
|
|
14
14
|
|
|
@@ -24,16 +24,19 @@ This skill ensures that your SpecWeave environment is properly configured with a
|
|
|
24
24
|
|
|
25
25
|
## When This Skill Activates
|
|
26
26
|
|
|
27
|
-
✅ **
|
|
28
|
-
- You
|
|
29
|
-
- You mention "
|
|
30
|
-
- You
|
|
31
|
-
- You
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
27
|
+
✅ **ONLY activates when explicitly requested**:
|
|
28
|
+
- You mention "plugin validation" or "validate plugins"
|
|
29
|
+
- You mention "environment setup" or "check plugins"
|
|
30
|
+
- You run: `specweave validate-plugins`
|
|
31
|
+
- You ask: "Can you validate my plugins?"
|
|
32
|
+
- You report: "I'm getting plugin errors"
|
|
33
|
+
- During: `specweave init` (initial setup only)
|
|
34
|
+
|
|
35
|
+
❌ **Does NOT auto-activate for**:
|
|
36
|
+
- `/specweave:increment` commands
|
|
37
|
+
- `/specweave:do` commands
|
|
38
|
+
- Any other workflow commands
|
|
39
|
+
- Reason: Prevents false positive errors when plugins are installed but detection fails
|
|
37
40
|
|
|
38
41
|
## Validation Process
|
|
39
42
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
class AdoStatusSync {
|
|
3
|
+
constructor(organization, project, personalAccessToken) {
|
|
4
|
+
this.organization = organization;
|
|
5
|
+
this.project = project;
|
|
6
|
+
this.client = axios.create({
|
|
7
|
+
baseURL: `https://dev.azure.com/${organization}/${project}/_apis`,
|
|
8
|
+
auth: {
|
|
9
|
+
username: "",
|
|
10
|
+
// Empty for PAT auth
|
|
11
|
+
password: personalAccessToken
|
|
12
|
+
},
|
|
13
|
+
headers: {
|
|
14
|
+
"Content-Type": "application/json-patch+json",
|
|
15
|
+
"Accept": "application/json"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get current status from ADO work item
|
|
21
|
+
*
|
|
22
|
+
* @param workItemId - ADO work item ID (e.g., 123)
|
|
23
|
+
* @returns Current work item state
|
|
24
|
+
*/
|
|
25
|
+
async getStatus(workItemId) {
|
|
26
|
+
const response = await this.client.get(
|
|
27
|
+
`/wit/workitems/${workItemId}?api-version=7.0`
|
|
28
|
+
);
|
|
29
|
+
return {
|
|
30
|
+
state: response.data.fields["System.State"]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Update ADO work item state
|
|
35
|
+
*
|
|
36
|
+
* Uses JSON Patch format to update System.State field.
|
|
37
|
+
*
|
|
38
|
+
* @param workItemId - ADO work item ID (e.g., 123)
|
|
39
|
+
* @param status - Desired status
|
|
40
|
+
*/
|
|
41
|
+
async updateStatus(workItemId, status) {
|
|
42
|
+
const patch = [
|
|
43
|
+
{
|
|
44
|
+
op: "add",
|
|
45
|
+
path: "/fields/System.State",
|
|
46
|
+
value: status.state
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
await this.client.patch(
|
|
50
|
+
`/wit/workitems/${workItemId}?api-version=7.0`,
|
|
51
|
+
patch
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Post comment about status change to ADO work item
|
|
56
|
+
*
|
|
57
|
+
* @param workItemId - ADO work item ID (e.g., 123)
|
|
58
|
+
* @param oldStatus - Previous SpecWeave status
|
|
59
|
+
* @param newStatus - New SpecWeave status
|
|
60
|
+
*/
|
|
61
|
+
async postStatusComment(workItemId, oldStatus, newStatus) {
|
|
62
|
+
const text = `\u{1F504} Status Update
|
|
63
|
+
|
|
64
|
+
SpecWeave status changed:
|
|
65
|
+
\u2022 From: ${oldStatus}
|
|
66
|
+
\u2022 To: ${newStatus}
|
|
67
|
+
\u2022 When: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
68
|
+
|
|
69
|
+
Synced from SpecWeave`;
|
|
70
|
+
await this.client.post(
|
|
71
|
+
`/wit/workitems/${workItemId}/comments?api-version=7.0-preview.3`,
|
|
72
|
+
{
|
|
73
|
+
text
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
AdoStatusSync
|
|
80
|
+
};
|