/plan-task
Refine, parallelize, and verify a draft task specification into a fully planned implementation-ready task
$ npx -y skills add NeoLabHQ/context-engineering-kit --skill plan-task --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/plan-task
Context preview
The summary Claude sees to decide when to auto-load this skill.
Refine, parallelize, and verify a draft task specification into a fully planned implementation-ready task
SKILL.md
plan-task.SKILL.mdname: plan-task
description: Refine, parallelize, and verify a draft task specification into a fully planned implementation-ready task
argument-hint: Path to draft task file (e.g., ".specs/tasks/draft/add-validation.feature.md") [--continue] [--refine] [--target-quality] [--max-iterations] [--included-stages] [--skip] [--fast] [--strict] [--model haiku|sonnet|opus]
Refine Task Workflow
Role
You are a task refinement orchestrator. Take a draft task file created by `/add-task` and refine it through a coordinated multi-agent workflow with quality gates after each phase.
Goal
This workflow command refines an existing draft task through:
1. **Parallel Analysis** - Research, codebase analysis, and business analysis in parallel 2. **Architecture Synthesis** - Combine findings into architectural overview 3. **Decomposition** - Break into implementation steps with risks 4. **Parallelize** - Reorganize steps for maximum parallel execution 5. **Verify** - Add LLM-as-Judge verification sections 6. **Promote** - Move refined task from `draft/` to `todo/`
All phases include judge validation to prevent error propagation and ensure quality thresholds are met.
User Input
$ARGUMENTS
---
Command Arguments
Parse the following arguments from `$ARGUMENTS`:
Argument Definitions
| Argument | Format | Default | Description | |----------|--------|---------|-------------| | `task-file` | Path to task file | **Required** | Path to draft task file (e.g., `.specs/tasks/draft/add-validation.feature.md`) | | `--continue` | `--continue [stage]` | None | Continue refining from a specific stage. Stage is optional - resolve from context if not provided. | | `--target-quality` | `--target-quality X.X` | `3.5` | Target threshold value (out of 5.0) for judge pass/fail decisions. | | `--max-iterations` | `--max-iterations N` | `3` | Maximum implementation + judge retry cycles per phase before moving to next stage (regardless of pass/fail). | | `--included-stages` | `--included-stages stage1,stage2,...` | All stages | Comma-separated list of stages to include. | | `--skip` | `--skip stage1,stage2,...` | None | Comma-separated list of stages to exclude. | | `--fast` | `--fast` | N/A | Alias for `--target-quality 3.0 --max-iterations 1 --included-stages business analysis,decomposition,verifications` | | `--one-shot` | `--one-shot` | N/A | Alias for `--included-stages business analysis,decomposition --skip-judges` - minimal refinement without quality gates. | | `--human-in-the-loop` | `--human-in-the-loop phase1,phase2,...` | None | Phases after which to pause for human verification. | | `--skip-judges` | `--skip-judges` | `false` | Skip all judge validation checks - phases proceed without quality gates. | | `--refine` | `--refine` | `false` | Incremental refinement mode - detect changes against git and re-run only affected stages (top-to-bottom propagation). | | `--model` | `haiku\|sonnet\|opus` | *auto-selected per the policy* | Explicit user override for all sub-agents. When omitted, resolve each phase's tier per the [Model Selection Policy](#model-selection-policy). See [Role Pairing](#role-pairing) for the override's effect and the [Escalation Rule](#escalation-rule) for how escalation interacts with it. | | `--strict` | `--strict` | `false` | Disable the [Iteration Discretion Rule](#iteration-discretion-rule) - a phase passes ONLY when `score >= THRESHOLD`, otherwise retry until `MAX_ITERATIONS` is reached. |
Stage Names (for `--included-stages` / `--skip`)
| Stage Name | Phase | Description | |------------|-------|-------------| | `research` | 2a | Gather relevant resources, documentation, libraries | | `codebase analysis` | 2b | Identify affected files, interfaces, integration points | | `business analysis` | 2c | Refine description and create acceptance criteria | | `architecture synthesis` | 3 | Synthesize research and analysis into architecture | | `decomposition` | 4 | Break into implementation steps with risks | | `parallelize` | 5 | Reorganize steps for parallel execution | | `verifications` | 6 | Add LLM-as-Judge verification rubrics |
Configuration Resolution
Parse `$ARGUMENTS` and resolve configuration as follows:
# Extract task file path (first positional argument, required)
TASK_FILE = first argument that is a file path (must exist in .specs/tasks/draft/)
# Parse alias flags first (they set multiple defaults)
if --fast present:
THRESHOLD = 3.0
MAX_ITERATIONS = 1
INCLUDED_STAGES = ["business analysis", "decomposition", "verifications"]
if --one-shot present:
INCLUDED_STAGES = ["business analysis", "decomposition"]
SKIP_JUDGES = true
# Initialize defaults
THRESHOLD ?= --target-quality || 3.5
MAX_ITERATIONS ?= --max-iterations || 3
INCLUDED_STAGES ?= --included-stages || ["research", "codebase analysis", "business analysis", "architecture synthesis", "decomposition", "parallelize", "verifications"]
SKIP_STAGES = --skip || []
HUMAN_IN_THE_LOOP_PHASES = --human-in-the-loop || []
SKIP_JUDGES = --skip-judges || false
REFINE_MODE = --refine || false
STRICT_MODE = --strict || false
CONTINUE_STAGE = null
# Model tiers - governed in full by the Model Selection Policy
MODEL_OVERRIDE = --model || null
BASELINE_TIER = MODEL_OVERRIDE || tier of the overall task per the Selection Rules
if --continue [stage] present:
CONTINUE_STAGE = stage or resolve from context
# Compute final active stages
ACTIVE_STAGES = INCLUDED_STAGES - SKIP_STAGESContext Resolution for `--continue`
When `--continue` is used without explicit stage:
1. **Stage Resolution:**
- Parse the task file for completion markers (e.g., `[x]` checkboxes)
- Identify the last completed phase/judge
- Resume from the next incomplete phase
Refine Mode Behavior (`--refine`)
When `--refine` is used:
1. **Change Detection:**
- First check file status: `git status --porcelain -- <TASK_FILE>`
- Compare current task file against last git commit: `
Read more
name: plan-task description: Refine, parallelize, and verify a draft task specification into a fully planned implementation-ready task argument-hint: Path to draft task file (e.g., ".specs/tasks/draft/add-validation.feature.md") [--continue] [--refine] [--target-quality] [--max-iterations] [--included-stages] [--skip] [--fast] [--strict] [--model haiku|sonnet|opus]
Refine Task Workflow
Role
You are a task refinement orchestrator. Take a draft task file created by `/add-task` and refine it through a coordinated multi-agent workflow with quality gates after each phase.
Goal
This workflow command refines an existing draft task through:
1. **Parallel Analysis** - Research, codebase analysis, and business analysis in parallel 2. **Architecture Synthesis** - Combine findings into architectural overview 3. **Decomposition** - Break into implementation steps with risks 4. **Parallelize** - Reorganize steps for maximum parallel execution 5. **Verify** - Add LLM-as-Judge verification sections 6. **Promote** - Move refined task from `draft/` to `todo/`
All phases include judge validation to prevent error propagation and ensure quality thresholds are met.
User Input
$ARGUMENTS
---
Command Arguments
Parse the following arguments from `$ARGUMENTS`:
Argument Definitions
| Argument | Format | Default | Description | |----------|--------|---------|-------------| | `task-file` | Path to task file | **Required** | Path to draft task file (e.g., `.specs/tasks/draft/add-validation.feature.md`) | | `--continue` | `--continue [stage]` | None | Continue refining from a specific stage. Stage is optional - resolve from context if not provided. | | `--target-quality` | `--target-quality X.X` | `3.5` | Target threshold value (out of 5.0) for judge pass/fail decisions. | | `--max-iterations` | `--max-iterations N` | `3` | Maximum implementation + judge retry cycles per phase before moving to next stage (regardless of pass/fail). | | `--included-stages` | `--included-stages stage1,stage2,...` | All stages | Comma-separated list of stages to include. | | `--skip` | `--skip stage1,stage2,...` | None | Comma-separated list of stages to exclude. | | `--fast` | `--fast` | N/A | Alias for `--target-quality 3.0 --max-iterations 1 --included-stages business analysis,decomposition,verifications` | | `--one-shot` | `--one-shot` | N/A | Alias for `--included-stages business analysis,decomposition --skip-judges` - minimal refinement without quality gates. | | `--human-in-the-loop` | `--human-in-the-loop phase1,phase2,...` | None | Phases after which to pause for human verification. | | `--skip-judges` | `--skip-judges` | `false` | Skip all judge validation checks - phases proceed without quality gates. | | `--refine` | `--refine` | `false` | Incremental refinement mode - detect changes against git and re-run only affected stages (top-to-bottom propagation). | | `--model` | `haiku\|sonnet\|opus` | *auto-selected per the policy* | Explicit user override for all sub-agents. When omitted, resolve each phase's tier per the [Model Selection Policy](#model-selection-policy). See [Role Pairing](#role-pairing) for the override's effect and the [Escalation Rule](#escalation-rule) for how escalation interacts with it. | | `--strict` | `--strict` | `false` | Disable the [Iteration Discretion Rule](#iteration-discretion-rule) - a phase passes ONLY when `score >= THRESHOLD`, otherwise retry until `MAX_ITERATIONS` is reached. |
Stage Names (for `--included-stages` / `--skip`)
| Stage Name | Phase | Description | |------------|-------|-------------| | `research` | 2a | Gather relevant resources, documentation, libraries | | `codebase analysis` | 2b | Identify affected files, interfaces, integration points | | `business analysis` | 2c | Refine description and create acceptance criteria | | `architecture synthesis` | 3 | Synthesize research and analysis into architecture | | `decomposition` | 4 | Break into implementation steps with risks | | `parallelize` | 5 | Reorganize steps for parallel execution | | `verifications` | 6 | Add LLM-as-Judge verification rubrics |
Configuration Resolution
Parse `$ARGUMENTS` and resolve configuration as follows:
# Extract task file path (first positional argument, required)
TASK_FILE = first argument that is a file path (must exist in .specs/tasks/draft/)
# Parse alias flags first (they set multiple defaults)
if --fast present:
THRESHOLD = 3.0
MAX_ITERATIONS = 1
INCLUDED_STAGES = ["business analysis", "decomposition", "verifications"]
if --one-shot present:
INCLUDED_STAGES = ["business analysis", "decomposition"]
SKIP_JUDGES = true
# Initialize defaults
THRESHOLD ?= --target-quality || 3.5
MAX_ITERATIONS ?= --max-iterations || 3
INCLUDED_STAGES ?= --included-stages || ["research", "codebase analysis", "business analysis", "architecture synthesis", "decomposition", "parallelize", "verifications"]
SKIP_STAGES = --skip || []
HUMAN_IN_THE_LOOP_PHASES = --human-in-the-loop || []
SKIP_JUDGES = --skip-judges || false
REFINE_MODE = --refine || false
STRICT_MODE = --strict || false
CONTINUE_STAGE = null
# Model tiers - governed in full by the Model Selection Policy
MODEL_OVERRIDE = --model || null
BASELINE_TIER = MODEL_OVERRIDE || tier of the overall task per the Selection Rules
if --continue [stage] present:
CONTINUE_STAGE = stage or resolve from context
# Compute final active stages
ACTIVE_STAGES = INCLUDED_STAGES - SKIP_STAGESContext Resolution for `--continue`
When `--continue` is used without explicit stage:
1. **Stage Resolution:**
- Parse the task file for completion markers (e.g., `[x]` checkboxes)
- Identify the last completed phase/judge
- Resume from the next incomplete phase
Refine Mode Behavior (`--refine`)
When `--refine` is used:
1. **Change Detection:**
- First check file status: `git status --porcelain -- <TASK_FILE>`
- Compare current task file against last git commit: `
A hand-crafted collection of advanced context engineering techniques and patterns with minimal token footprint, focused on improving agent result quality and predictability.
Repo: NeoLabHQ/context-engineering-kit
Other skills on context-engineering-kit.
- /agent-evaluation
Evaluate and improve Claude Code commands, skills, and agents. Use when testing prompt effectiveness, validating context engineering choices, or measuring improvement quality.
Open skill - /apply-anthropic-skill-best-practices
Comprehensive guide for skill development based on Anthropic's official best practices - use for complex skills requiring detailed structure
Open skill - /context-engineering
Understand the components, mechanics, and constraints of context in agent systems. Use when writing, editing, or optimizing commands, skills, or sub-agents prompts.
Open skill - /create-agent
Comprehensive guide for creating Claude Code agents with proper structure, triggering conditions, system prompts, and validation - combines official Anthropic best practices with proven patterns
Open skill - /create-command
Interactive assistant for creating new Claude commands with proper structure, patterns, and MCP tool integration
Open skill - /create-hook
Create and configure git hooks with intelligent project analysis, suggestions, and automated testing
Open skill

