spwnr-task
Use for /spwnr-task. Reuse the planning gate, require explicit execution approval, then route approved general-task work into pipeline or team execution helpers.
Spwnr Task
Use this skill for non-trivial general work that benefits from a controller plus routed execution guidance.
This skill owns the routing behavior for /spwnr-task.
Use spwnr-principle as the shared source of truth for the planning gate, plan artifact conventions, execution task contract, risk-gated approvals, worker readiness required pattern, approach comparison, and sensible defaults.
Use spwnr-worker-audit only when the user explicitly needs a deeper registry readiness audit or the normal registry lookup path fails.
Use task-pipeline.md in this folder when the approved plan selects pipeline.
Use task-team.md in this folder when the approved plan selects team.
Orchestration Tool Protocol
- Use
Skill,AskUserQuestion,TodoWrite,Read,Write, andEditfor the planning gate and plan maintenance. - Use
TaskCreate,TaskGet,TaskList, andTaskUpdateonly after the current run explicitly approves execution and the routed helper document has taken over. - Resolve registry candidates with
spwnr resolve-workers --search "<keyword>" --host claude_code --format json, plus repeatable--unit "<unit-id>::<brief>"queries for per-unit coverage when the plan has multiple execution units. - Use
TeamCreate,SendMessage, andTeamDeleteonly whentask-team.mdrequires Claude team features.
Planning Gate
- Reuse the plan-first gate from
spwnr-principlebefore any delegation. - Resolve and read the latest active revision first; if it is missing, create revision 1 with the same structure used by
/spwnr-plan. - Keep goal, success criteria, scope boundaries, constraints, open risks, approval condition, current-run execution confirmation, plan artifact path, and executable
Execution Unitsvisible inTodoWrite. - Treat only the latest active revision as executable. Superseded revisions and their tasks are audit-only.
- If the current run has not yet received
Execute current plan, stay in the execution review loop instead of delegating.
Approved Execution Spec
Before any TaskCreate:
- Validate that the latest active revision contains executable
Execution Units,Environment And Preconditions,Execution Strategy Recommendation,Agent Capability Requirements, andFailure And Escalation Rules. - Produce a short plan summary, a normalized registry lookup brief, and one concise per-unit coverage brief for each execution unit.
- Resolve the candidate pool from the local registry. If multiple units exist, use per-unit coverage to prove the lineup that covers every execution unit.
- Read the selected mode and execution pattern from
Execution Strategy Recommendationinstead of inventing them at execution time. - If the selected mode is
pipeline, validate that the pattern name, ordered stages, and stage handoffs are present. - If the selected mode is
team, validate whether the plan expects one shared queue or multiple pipelines launched in parallel. - In
teammode, default the task graph toward parallel tasks with disjointFiles:ownership. If the plan needs shared-file collaboration, validate that the exception is explicit and that the plan defines worktree isolation or one concrete owner for that file. - Append
Approved Execution Specto the active revision withEdit, including the selected mode, routing target, normalized registry lookup brief, and per-unit coverage summary. - Before any
TaskCreate, normalize every referenced execution-unit marker to a runtime-guard-safe one-line label. Prefer- **unit_id**: unit-1. - Before any
TaskCreate, ensure every new task starts with the literal markerBlocked: no; place sequencing inDepends-On:, plandependencies, or task graph relations instead. - For Claude Code mutating tasks, default every execution task to
Worktree: required. KeepWorktree: not-requiredonly for read-only review or audit tasks. - For Claude Code mutating tasks, execution must follow this lifecycle: use
ToolSearchTool, thenEnterWorktreeTool, run inside the worktree, finish withBriefTool, and only then callExitWorktreeTool.
Routing Decision
- Route to
task-pipeline.mdwhen the approved mode ispipeline. - Route to
task-team.mdwhen the approved mode isteam. - Read the routed helper document and apply its execution contract before creating tasks.
pipelinemust remain available without Claude team features.teammay launch multiple bounded pipelines in parallel when the approved plan says so.teamshould not default to multiple parallel tasks editing the same file unless the approved plan explicitly marks that as an exception.- Mutating Claude child-agent work should not run in the main tree; route it through automatic worktree isolation instead.
- Do not silently reroute a
teamplan intopipelinewhen team prerequisites fail.
Worker Readiness Required
If /spwnr-task cannot form a usable lineup, stop with these sections:
Plan ArtifactReadiness GapMissing CapabilitiesRecovery StepsNext Step
The recovery steps must list the missing capabilities or packages, tell the user to run /spwnr-worker-audit, tell them to install or inject the missing agents, and say that execution should resume from the same active revision after readiness is restored.
Rules
- Do not delegate before the current run explicitly chooses
Execute current plan. - Do not mutate state from the planning phase of
/spwnr-task. - Do not keep executing against a superseded plan revision when a material re-plan has created a newer active revision.
- Do not skip the review stage.
- Do not let the reviewer invent new scope.
- Treat the plan file as the source of truth; later agents should not reconstruct it from chat alone.
- Treat the registry candidate pool and per-unit coverage plan as the source of truth for lineup selection.
- Tailor the output contract to the routed helper document's job.