// 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.
| name | increment-work-router |
| 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. |
The increment-work-router skill is an intelligent work continuation system that:
Key Insight: When user says "implement X" or "complete Y", they expect the system to handle routing intelligently without manual commands.
This skill activates when user expresses implementation/continuation intent:
Action Verbs (with specific target):
Continuation Phrases:
Bug/Fix Intent:
Vague Intent (needs target clarification):
Planning/Discussion (let other skills handle):
Already in Workflow:
/specweave:doScan user message for implementation keywords:
Action verbs: implement, complete, build, add, develop, create
Continuation: work on, continue, resume, finish, start
Bug/Fix: fix, resolve, address
Calculate confidence:
Read increment state:
# Find all increments with status = "active"
find .specweave/increments -name "metadata.json" -type f \
-exec jq -r 'select(.status == "active") | .id' {} \;
Three scenarios:
Relatedness Analysis: Compare user's request against active increment:
Scoring:
Scenario A: High relevance to active increment
User: "Implement user authentication"
Active: 0031-user-authentication-system
โ
High match โ Auto-resume:
"I see you have an active increment for user authentication (0031).
Resuming work on that increment now with /specweave:do..."
[Automatically invokes /specweave:do]
Scenario B: Unrelated to active increment
User: "Implement payment processing"
Active: 0031-user-authentication-system
โ ๏ธ Low match โ Ask:
"I see you have an active increment (0031-user-authentication-system).
Your request for payment processing seems unrelated. Would you like to:
1. **Create new increment** for payment processing (recommended)
2. **Continue current increment** (0031) and add payment to it
3. **Pause current** and create new increment
What would you prefer?"
Scenario C: No active increment
User: "Implement user authentication"
Active: None
โ Suggest new increment:
"No active increment found. Let's create one for user authentication.
I'm going to create a SpecWeave increment with:
- Specification (WHAT & WHY)
- Technical plan (HOW)
- Task breakdown (STEPS with embedded tests)
Creating increment now with /specweave:increment..."
[Automatically invokes /specweave:increment "user authentication"]
Scenario D: Multiple active increments
User: "Continue working"
Active: 0031-user-auth, 0032-payment-system
โ Ask to clarify:
"You have 2 active increments:
1. **0031-user-authentication-system** (3/10 tasks complete)
2. **0032-payment-processing** (1/8 tasks complete)
Which one would you like to work on?"
Scenario E: Vague continuation intent
User: "Let's continue"
Active: 0031-user-authentication-system
โ
Auto-resume (only one active):
"Resuming increment 0031-user-authentication-system...
Progress: 3/10 tasks complete (30%)
Next task: T-004 Implement password hashing
[Automatically invokes /specweave:do]"
Workflow:
User: "Implement [feature]"
โ
increment-work-router (detects intent)
โ
[Check .specweave/increments/*/metadata.json]
โ
โโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โ Active increment โ Multiple active โ No active โ
โ (relevant) โ (ambiguous) โ (none) โ
โโโโโโโฌโโโโโโโโโโโโโโดโโโโโโโฌโโโโโโโโโโโโดโโโโโโโฌโโโโโโโโโโ
โ โ โ
โ โ โ
/specweave:do Ask to select /specweave:increment
(auto-resume) (clarify) (create new)
Calls:
/specweave:do - Resume active increment/specweave:increment - Create new increment/specweave:status - Check increment state (if needed)Called By:
project-kickstarter (projects) and increment-planner (planning)| User Intent | Active Increments | Relevance | Action |
|---|---|---|---|
| "Implement auth" | 1 (auth-related) | High (>70%) | Auto /specweave:do |
| "Implement auth" | 1 (unrelated) | Low (<40%) | Ask: New or add to current? |
| "Implement auth" | 0 | N/A | Auto /specweave:increment |
| "Implement auth" | 2+ | N/A | Ask which increment |
| "Let's continue" | 1 | N/A | Auto /specweave:do |
| "Let's continue" | 2+ | N/A | Ask which increment |
| "Let's continue" | 0 | N/A | "No active increment. What should we build?" |
How to determine if request relates to active increment:
function calculateRelevance(userRequest: string, increment: Increment): number {
let score = 0;
// 1. Title/ID match (strongest signal)
if (increment.title.toLowerCase().includes(extractKeywords(userRequest))) {
score += 40;
}
// 2. Tasks match (check tasks.md)
const tasks = readTasksFile(increment);
const matchingTasks = tasks.filter(t =>
t.title.toLowerCase().includes(extractKeywords(userRequest))
);
score += (matchingTasks.length / tasks.length) * 30;
// 3. Spec match (check spec.md user stories)
const spec = readSpecFile(increment);
if (spec.includes(extractKeywords(userRequest))) {
score += 20;
}
// 4. Type match (feature vs bug vs hotfix)
const requestType = detectType(userRequest);
if (requestType === increment.type) {
score += 10;
}
return score; // 0-100
}
Example:
User: "Implement JWT token refresh"
Active: 0031-user-authentication-system
Checks:
โ
Title contains "authentication" (user mentions "JWT token") โ +40 points
โ
Tasks.md has "T-005: Implement JWT refresh logic" โ +30 points
โ
Spec.md mentions "token management" โ +20 points
โ
Both are "feature" type โ +10 points
Total: 100/100 โ High relevance โ Auto-resume
Context:
Active: 0031-user-authentication-system
Progress: 3/10 tasks complete
User:
Implement JWT token refresh
increment-work-router:
โ
Intent detected: "implement" + specific target
โ
Active increment found: 0031-user-authentication-system
โ
Relevance check: 95% match (authentication-related)
โ AUTO-RESUME
"I see you have an active increment for user authentication (0031).
Task T-005 'Implement JWT token refresh' is already in your plan.
Resuming increment 0031 now with /specweave:do...
[Automatically invokes /specweave:do]
Context:
Active: None
User:
Implement payment processing with Stripe
increment-work-router:
โ
Intent detected: "implement" + specific target
โ No active increment found
โ CREATE NEW
"No active increment found. Let's create one for payment processing.
I'm going to create a SpecWeave increment with:
- Specification (Stripe integration requirements)
- Technical plan (API integration, webhooks, security)
- Task breakdown (implementation steps with tests)
Creating increment now with /specweave:increment...
[Automatically invokes /specweave:increment "payment processing with Stripe"]
Context:
Active: 0031-user-authentication-system
Progress: 3/10 tasks complete
User:
Implement email notifications
increment-work-router:
โ
Intent detected: "implement" + specific target
โ
Active increment found: 0031-user-authentication-system
โ ๏ธ Relevance check: 15% match (unrelated)
โ ASK FOR CLARIFICATION
"I see you have an active increment (0031-user-authentication-system) with 3/10 tasks complete.
Your request for email notifications seems unrelated. Would you like to:
1. **Create new increment** for email notifications (recommended - keeps work focused)
2. **Add to current increment** (0031) - if notifications are for auth emails
3. **Pause current increment** and start notifications
SpecWeave works best with focused increments. What would you prefer?"
Context:
Active: 0031-user-authentication-system (3/10 tasks)
Active: 0032-payment-processing (1/8 tasks)
User:
Let's continue working
increment-work-router:
โ
Intent detected: "continue" (vague)
โ
Multiple active increments found: 2
โ ASK TO SELECT
"You have 2 active increments:
1. **0031-user-authentication-system**
- Progress: 3/10 tasks (30%)
- Next: T-004 Implement password hashing
2. **0032-payment-processing**
- Progress: 1/8 tasks (12%)
- Next: T-002 Set up Stripe SDK
Which one would you like to work on?"
[Wait for user selection, then invoke /specweave:do {selected-id}]
Context:
Active: 0031-user-authentication-system (3/10 tasks)
User:
What's next?
increment-work-router:
โ
Intent detected: "what's next" (continuation)
โ
One active increment: 0031-user-authentication-system
โ AUTO-RESUME
"Resuming increment 0031-user-authentication-system...
Progress: 3/10 tasks complete (30%)
Next task: **T-004 Implement password hashing**
[Automatically invokes /specweave:do]"
Users can override auto-routing with explicit instructions:
/specweave:increment only/specweave:status instead/specweave:do)Key Distinction:
project-kickstarter = "I want to BUILD a new product" (project-level)increment-work-router = "IMPLEMENT this feature/task" (execution-level)increment-planner = "PLAN this increment" (planning-level)This skill bridges planning โ execution by auto-detecting implementation intent.