plugins/specweave/skills/do/SKILL.md
Execute increment tasks following spec and plan with sync hooks. Use when saying "implement", "start working", "execute tasks", or "continue increment". IMPORTANT - Before starting, check task count and domain count. If 3+ domains or 15+ tasks, recommend sw:team-lead instead (ask user for confirmation, or auto-invoke in auto mode).
npx skillsauth add anton-abyzov/specweave plugins/specweave/skills/doInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Skill Memories: If .specweave/skill-memories/do.md exists, read and apply its learnings.
Project Context: If .specweave/config.json exists, read it for testing mode, TDD enforcement, and multi-project settings. Check for active increments in .specweave/increments/*/metadata.json.
Execute a SpecWeave increment by running tasks from tasks.md with automatic AC-sync after every task completion.
sw:do <increment-id> # Execute specific increment
sw:do # Auto-select best candidate
sw:do <id> --model haiku|sonnet|opus # Override model for all tasks
<increment-id>: Optional. Supports "001", "0001", "1", "0042", or "0153-feature-name" formats.--model <tier>: Optional. Overrides per-task model hints.When no ID provided, auto-select (NEVER ask user for ID):
in-progress > planned > ready_for_review (with incomplete tasks) > backlog (with incomplete tasks)grep -c '^\- \[ \]' + grep -c '\*\*Status\*\*: \[ \]' in tasks.mdWhen running inside an active auto session (.specweave/state/auto-mode.json has active: true):
sw:do 0252), use it directly — skip this stepincrementIds array from auto-mode.json and use the first entry — this is the increment prioritized by scoring at session startThis ensures the execution loop stays focused on the contextually correct increment rather than re-scanning the filesystem each iteration.
.specweave/increments/NNNN-*/spec.md, plan.md, tasks.md, tests.md.specweave/docs/internal/ for related contextsw:auto/sw:team-leadAC-US1-01). If missing: add ACs to spec.md before proceeding. Do NOT proceed without ACs in spec.md.Check push strategy:
PUSH_STRATEGY=$(jq -r '.cicd.pushStrategy // "direct"' .specweave/config.json 2>/dev/null)
If pr-based:
BRANCH_PREFIX=$(jq -r '.cicd.git.branchPrefix // "sw/"' .specweave/config.json 2>/dev/null)
BRANCH_NAME="${BRANCH_PREFIX}${INCREMENT_ID}"CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)git branch --list ${BRANCH_NAME} → git checkout ${BRANCH_NAME}git checkout -b ${BRANCH_NAME}repositories/*/*/ that has a .git directory"Working on feature branch: ${BRANCH_NAME}"If direct: Skip this step entirely (no-op, current behavior preserved).
Skip this step if already running inside sw:auto or sw:team-lead. Check .specweave/state/auto-mode.json — if active: true, skip.
Assess increment complexity to recommend the best execution mode:
grep -c '^\- \[ \]\|Status\*\*: \[ \]' tasks.mdgrep -c 'AC-US' spec.mdRecommendation matrix (see CLAUDE.md Execution Strategy):
| Tasks | Domains | Action |
|-------|---------|--------|
| ≤8 | 1 | Proceed with sw:do silently |
| 9-15 | 1-2 | Suggest sw:auto for unattended execution |
| >15 | 1-2 | Recommend sw:auto (many tasks benefit from autonomous loop) |
| any | 3+ | Recommend sw:team-lead for parallel multi-agent execution |
When recommending (non-auto mode), use AskUserQuestion with these options:
sw:do — Continue manual step-by-step (current mode)sw:auto — Autonomous sequential execution (unattended, stop-hook loop)sw:team-lead — Parallel multi-agent execution (higher quality for multi-domain, uses more tokens)Include trade-off note: "Team-lead and auto modes consume more tokens but deliver higher precision and quality for complex work."
If user chooses auto or team-lead, invoke the chosen skill with the increment ID and stop sw:do execution.
In auto mode (.specweave/state/auto-mode.json active): If 3+ domains detected, automatically invoke sw:team-lead instead of proceeding sequentially.
Read testMode from metadata.json:
TEST_MODE=$(cat "$INCREMENT_PATH/metadata.json" | jq -r '.testMode // "test-after"')
If TDD mode active:
[RED], [GREEN], [REFACTOR]strict enforcement: BLOCK, require regeneration via sw:incrementwarn (default): warn and proceedoff: silent passjq -r '.testing.tddEnforcement // "warn"' .specweave/config.jsonstrict: block violations; warn: warn but allow; off: no check[ ])If status is "planned", update to "in-progress" with start date in spec.md frontmatter.
Before marking ANY task [x], you MUST run verification and see it pass:
**Test**: or **Test Plan**: block, execute the test command specified there. Capture the output.npx vitest run, pytest, go test ./...).[ ] — if the test command fails, the task is NOT complete. Present the failure output, diagnose, fix, and re-run until green.For each task:
--model override[ ] to [x] in tasks.md — ONLY after verification passesAfter EVERY task completion (CRITICAL):
Check config flag:
PER_TASK_REVIEW=$(jq -r '.quality.perTaskReview // false' .specweave/config.json 2>/dev/null)
Skip this gate entirely if:
quality.perTaskReview is absent or false (default — backward compatible)sw:team-lead (team-lead has its own review flow). Detect via: ls ~/.claude/teams/ 2>/dev/null | head -1 — if any entries exist, skip.When the gate is active (perTaskReview: true), after each task passes verification (Step 6) but before moving to the next task:
Dispatch a lightweight review checking whether this task's implementation satisfies its linked ACs:
**Satisfies ACs**: field to get the relevant AC IDsDispatch a focused code quality review of ONLY this task's diff:
Both sub-reviews must pass before marking the task [x] and moving to the next task. If either review finds blocking issues (CRITICAL/HIGH), fix them first. This prevents drift from accumulating across tasks.
If task blocked: document in tasks.md, present options to user, skip or pause depending on severity.
After testable tasks: run relevant tests, fix failures immediately, only continue when green.
CRITICAL: When all tasks are done, IMMEDIATELY chain to closure. Do NOT stop to ask for review, do NOT report "all tasks complete" and wait. The quality gates inside sw:done (grill, judge-llm, PM validation) ARE the review. If the user wants to re-open, they can.
When all tasks done:
sw:sync-docs update to sync living docsnpx vitest run (if test framework detected)If the Agent tool is available, spawn a closure subagent for a fresh context:
Agent({
subagent_type: "sw:sw-closer",
prompt: "Close increment <ID>. Increment path: .specweave/increments/<ID>/",
description: "Close increment <ID>"
})
The sw-closer runs grill, judge-llm, PM gates, and specweave complete in an isolated context.
Do NOT invoke sw:grill or sw:done inline when using the subagent path.
If the Agent tool is NOT available (Cursor, Copilot, Aider, OpenCode), invoke closure directly:
Skill({ skill: "sw:grill" }) with increment ID — writes required grill-report.jsonSkill({ skill: "sw:done" }) with increment ID — runs judge-llm, PM gates, closes, and syncs to GitHub/Jira/ADONon-cloud tools typically have fresh context per skill invocation, so inline closure works without overflow.
Anti-pattern (NEVER do this): "All tasks are complete. Would you like me to close the increment?" — Just close it.
Before deployment tasks, check credentials (NEVER display values):
grep -qE "SUPABASE|DATABASE_URL|CF_|AWS_|HETZNER" .env 2>/dev/null && echo "Credentials found"
If found: execute directly. If missing: ask user for credential.
Run sw:validate after execution to ensure quality before closing with sw:done.
tools
Generate AI videos from text prompts or images. Supports Google Veo 3.1 and Pollinations.ai (free). Use when generating video, creating animations, text-to-video, AI video, video generation, make clip, animate.
tools
Validate increment with rule-based checks and AI quality assessment. Use when saying "validate", "check quality", or "verify increment".
tools
Create and manage umbrella workspaces for multi-repo projects. Activate when the user wants to: create umbrella, umbrella init, wrap in umbrella, create workspace, setup multi-repo, migrate repos to umbrella, umbrella create, new workspace, restructure into umbrella, "wrap this repo", "create umbrella for these repos", "setup workspace with repos", "move repos into umbrella". Do NOT activate for: add a repo to existing umbrella (use sw:get), add a feature, add an increment, clone a repo (use sw:get).
tools
--- description: Merge completed parallel agent work and trigger GitHub sync per increment. Activates for: team merge, merge agents, combine work, team finish. --- # Team Merge **Verify all teammates completed, run quality gates, close increments, and trigger sync.** ## Usage ```bash sw:team-merge sw:team-merge --dry-run # Preview merge plan sw:team-merge --skip-sync # Merge without GitHub/JIRA sync ``` ## What This Skill Does 1. **Verify all teammates completed** -- bl