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.
Confirm successful installation by checking the skill directory location:
.cursor/skills/sdd:plan
Restart Cursor to activate sdd:plan. Access via /sdd:plan in your agent's command palette.
β
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
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:
Parallel Analysis - Research, codebase analysis, and business analysis in parallel
Architecture Synthesis - Combine findings into architectural overview
Decomposition - Break into implementation steps with risks
Parallelize - Reorganize steps for maximum parallel execution
Verify - Add LLM-as-Judge verification sections
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).
If user provides feedback, incorporate into next iteration
If user says "n", pause workflow
Checkpoint Message Format:
---## π Human Review Checkpoint - Phase X**Phase:**{phase name}**Judge Score:**{score}/{THRESHOLD} threshold
**Status:** β PASS / β οΈ RETRY {n}/{MAX_ITERATIONS}**Artifacts:**-{artifact_path_1}-{artifact_path_2}**Judge Feedback:**{feedback summary}**Action Required:** Review the above artifacts and provide feedback or continue.
> Continue?[Y/n/feedback]:---
Usage Examples
# Refine a draft task with all stages/plan .specs/tasks/draft/add-validation.feature.md
# Fast refinement with minimal stages/plan .specs/tasks/draft/quick-fix.bug.md --fast# Continue from a specific stage/plan .specs/tasks/draft/complex-feature.feature.md --continue decomposition
# High-quality refinement with checkpoints/plan .specs/tasks/draft/critical-api.feature.md --target-quality 4.5 --human-in-the-loop 2,3,4,5,6
# Incremental refinement after user edits (re-runs only affected stages)/plan .specs/tasks/todo/my-task.feature.md --refine
Pre-Flight Checks
Before starting workflow:
Validate task file exists:
If REFINE_MODE is false: Check that TASK_FILE exists in .specs/tasks/draft/
If REFINE_MODE is true: Check that TASK_FILE exists in .specs/tasks/todo/ or .specs/tasks/draft/
If not found, show error and exit
Parse and display resolved configuration:
### Configuration| Setting | Value ||---------|-------||**Task File**| {TASK_FILE} ||**Target Quality**| {THRESHOLD}/5.0 ||**Max Iterations**| {MAX_ITERATIONS} ||**Active Stages**| {ACTIVE_STAGES as comma-separated list} ||**Human Checkpoints**| Phase {HUMAN_IN_THE_LOOP_PHASES as comma-separated} ||**Skip Judges**| {SKIP_JUDGES} ||**Refine Mode**| {REFINE_MODE} ||**Continue From**| {CONTINUE_STAGE} or "Start" |
Handle --continue mode:
If CONTINUE_STAGE is set:
Read the task file to get current state
Identify completed phases from task file content
Skip to CONTINUE_STAGE (or auto-detected next incomplete stage)
Pre-populate captured values from existing artifacts
Resume workflow from the appropriate phase
Handle --refine mode:
If REFINE_MODE is true:
Check file status: git status --porcelain -- <TASK_FILE>
M (staged) or M (unstaged) or MM (both) β proceed with diff
?? (untracked) β error: "File not tracked by git, cannot detect changes"
Empty output β no changes detected
Run git diff HEAD -- <TASK_FILE> to get all changes (staged + unstaged) vs last commit
Parse diff to identify modified sections
Collect any // comment markers as user feedback
Determine earliest modified section using Section-to-Stage Mapping
Set ACTIVE_STAGES to include only stages from the determined starting point onwards
Pass detected changes and user comments as additional context to agents
If no changes detected, inform user: "No changes detected in task file. Edit the file first, then run --refine." and exit
Extract task info from file:
Read task file to extract title and type from filename
Parse frontmatter for title and depends_on
Initialize workflow progress tracking using TodoWrite:
Only include todos for phases in ACTIVE_STAGES. If continuing, mark completed phases as completed.
β
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
βΊAccess to product documentation and roadmap tools (Jira, Notion, etc.)
βΊUnderstanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
βΊStakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
1Install product management skill
2Start with user story generation for known feature
3Progress to competitive analysis: research 2-3 competitors
4Use for roadmap prioritization: apply RICE/ICE scoring
5Draft stakeholder communications and refine based on feedback
6Build template library for recurring PM tasks
7Share effective prompts with product team
Common Pitfalls
β Not validating competitive researchβverify facts before sharing
β Accepting user stories without involving engineering team
β Over-relying on frameworks without qualitative judgment
β Not customizing outputs to company culture and communication style
β Skipping stakeholder validation of generated requirements
Best Practices
β Do
+Validate research and competitive analysis with real data
+Collaborate with engineering when generating technical requirements
+Customize frameworks and templates to your company context
+Use skill for first drafts, refine with stakeholder input
+Document successful prompt patterns for PM tasks
+Combine AI efficiency with human judgment and intuition
β Don't
βDon't publish competitive analysis without fact-checking
βDon't finalize user stories without engineering review
βDon't make prioritization decisions solely on AI scoring
βDon't skip customer validation of generated requirements
βDon't ignore company-specific context and culture
π‘ Pro Tips
β Provide context: company goals, constraints, customer feedback
β Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
β Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
β Use skill for 70% generation + 30% customization to company needs
When to Use This
β Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
β Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
1Basic: user stories, feature specs, status updates