Agent skill
prd-taskmaster
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/prd-taskmaster
SKILL.md
PRD Generator for TaskMaster v2.0
Smart PRD generation system that detects existing PRDs and offers flexible workflows. Primarily generates comprehensive, engineer-focused product requirements documents optimized for TaskMaster task breakdown. Optionally executes tasks autonomously with quality control, datetime tracking, and validation checkpoints.
When to Use This Skill
Activate when user:
- Requests a PRD or product requirements document
- Says "I want a PRD", "create requirements", "write requirements"
- Mentions taskmaster or task-driven development
- Asks to document product/feature requirements for engineering
Do NOT activate for:
- Code documentation (API docs, technical reference)
- Test specifications or QA documentation
- Project management timelines without product context
- PDF document creation
Core Principles
Quality Over Speed: Planning is 95% of the work. Take time to create comprehensive PRDs that enable successful implementation.
Taskmaster Required: This skill REQUIRES taskmaster (MCP or CLI). Will block and prompt for installation if not detected.
Engineer-Focused: Primary audience is engineering teams. Include technical depth, code examples, architecture considerations, and implementation details.
Validation-Driven: Automated checks ensure PRD quality before delivery. 13 validation checks run automatically.
User Testing Checkpoints: Every 5 tasks, insert user validation checkpoint to catch issues early.
Complete Automation: Provides 4 autonomous execution modes with git policies, progress logging, and datetime tracking.
Workflow Overview (13 Steps)
- Enable Plan Mode & Check State - Resume detection + interactive prompts
- Detect Existing PRD - Smart detection with execute/update/replace options
- Detect Taskmaster - MCP > CLI > Block if missing
- Discovery Questions - 12+ detailed questions (if generating new PRD)
- Initialize Taskmaster - Via MCP/CLI (if not already initialized)
- Generate PRD - Load template and fill with discovery answers
- Validate Quality - 13 automated checks
- Parse & Expand - Combined operation with research
- Insert User Tests - Checkpoint every 5 tasks
- Setup Tracking - DateTime, rollback, accuracy scripts 10.5. Generate CLAUDE.md - TDD workflow guide from template
- Choose Next Action - Handoff to TaskMaster OR autonomous execution
- Summary & Start - Present overview and begin work
Detailed Implementation
Step 1: Enable Plan Mode & Check for Incomplete Work
FIRST ACTION when skill activates:
1. Check for incomplete work from previous session:
- Run: python3 .taskmaster/scripts/execution-state.py (if exists)
- If incomplete work found: Offer to resume
2. Enable plan mode (if not already enabled):
- This ensures AskUserQuestion tool works properly
- Inform user: "Enabling plan mode for interactive prompts..."
3. Proceed to Step 2
Auto-Resume if Crash Detected:
If execution-state.py reports incomplete work:
đ Detected incomplete work from previous session
đ Last Activity:
- Mode: {mode}
- Task: {task_id}
- Subtask: {subtask_id}
- Last updated: {timestamp}
- Completed: Tasks {completed_list}
Resume from:
1. Last subtask (continue where crashed)
2. Restart current task
3. Last checkpoint
4. Start fresh
Type: 1, 2, 3, or 4
Step 2: Detect Existing PRD (Smart Detection)
SECOND ACTION: Check if PRD already exists before generating new one.
Detection Logic:
1. Check if .taskmaster/ exists:
- Use Glob: .taskmaster/
- NO â New project, proceed to Step 3 (detect taskmaster)
- YES â Continue to check for PRD
2. Check for existing PRD:
- Use Glob: .taskmaster/docs/*.md or .taskmaster/docs/prd.*
- Read .taskmaster/tasks/tasks.json to get task count and status
- Found PRD â Show existing PRD options (below)
- No PRD â Proceed to Step 3 (detect taskmaster)
If Existing PRD Found:
đ Found existing PRD: {filename}
đ PRD Details:
- Created: {date from file}
- Location: .taskmaster/docs/{filename}
- Tasks: {X total} ({Y completed}, {Z pending})
- Status: {% complete}
What would you like to do?
1. Execute tasks from existing PRD
â Skip to Step 11 (choose execution mode)
â Start working on pending tasks
2. Update/refine existing PRD
â Edit current PRD with new requirements
â Re-parse to update tasks
â Merge with existing task list
3. Create new PRD (replace current)
â Confirm: "This will replace existing PRD. Continue?"
â Proceed to Step 3 (full PRD generation workflow)
4. Review existing PRD
â Show summary of current PRD
â Display task breakdown
â Exit skill
Type: 1, 2, 3, or 4
Option 1: Execute Existing Tasks
User selects: 1
â
Using existing PRD: {filename}
đ Remaining tasks: {Z} pending tasks
đ Next checkpoint: {next USER-TEST}
â Skip to Step 11 (choose execution mode)
Option 2: Update Existing PRD
User selects: 2
đ What changes would you like to make?
[User provides changes]
â
Updating PRD...
â Edit existing PRD file with changes
â Re-run parse-prd with --append flag
â Continue to Step 8 (insert user tests for new tasks only)
â Proceed to Step 11
Option 3: Replace PRD
User selects: 3
â ī¸ WARNING: This will replace your existing PRD and task list.
Current work:
- {Y} tasks completed
- {Z} tasks pending
- All completed work will be preserved in git history
- Task files will be regenerated
Type "yes" to confirm replacement, or "no" to cancel.
[If yes]
â
Creating new PRD (old PRD backed up to .taskmaster/docs/prd-backup-{timestamp}.md)
â Proceed to Step 3 (full workflow)
Option 4: Review
User selects: 4
đ Current PRD Summary:
- Title: {title}
- Created: {date}
- Goals: {list top 3 goals}
- Requirements: {count functional requirements}
- Tasks: {X total} ({Y completed}, {Z pending})
[Display executive summary and key sections]
â
Review complete. Skill exiting.
If No PRD Found (but .taskmaster/ exists):
đ Found .taskmaster/ directory (initialized)
đ No PRD found
Creating PRD for TaskMaster...
â Proceed to Step 3 (detect taskmaster, already initialized)
Step 3: Detect Taskmaster (MANDATORY - Blocks if Missing)
CRITICAL: Must detect taskmaster BEFORE proceeding with PRD generation.
Detection Priority:
1. Check for MCP Task-Master-AI (PREFERRED):
- Attempt: mcp__task-master-ai__get_tasks with projectRoot
- If successful: TASKMASTER_METHOD="MCP" â
- Note: MCP provides superior integration (direct function calls)
2. Fallback to CLI:
- Run: which taskmaster
- Run: taskmaster --version
- If found: TASKMASTER_METHOD="CLI" â
3. Neither Available:
- TASKMASTER_METHOD="NONE" â
- BLOCK and display installation instructions
If Taskmaster Not Found:
â ī¸ Taskmaster Required
This skill REQUIRES taskmaster (MCP or CLI) to function properly.
I didn't detect taskmaster in your environment.
Option 1 (RECOMMENDED): Install MCP Task-Master-AI
âĸ Add to Claude Code MCP settings
âĸ Provides seamless integration with direct function calls
âĸ See: https://github.com/cyanheads/task-master-ai
âĸ Installation: Add to your MCP config, restart Claude Code
Option 2: Install CLI
âĸ Run: npm install -g task-master-ai
âĸ Use command-line interface
âĸ See: https://github.com/cyanheads/task-master-ai
Please install taskmaster and type 'done' when ready.
[WAIT for user to install and confirm]
[RE-DETECT after user confirms]
[PROCEED only if detection successful]
NO PROCEEDING WITHOUT TASKMASTER DETECTED
Step 4: Discovery (Comprehensive Requirements Gathering)
Ask detailed questions to ensure comprehensive PRD:
Essential Questions (5):
- What problem does this solve? (user pain point, business impact)
- Who is the target user/audience?
- What is the proposed solution or feature?
- What are the key success metrics? (how we measure success)
- What constraints exist? (technical, timeline, resources)
Technical Context (4): 6. Is this for an existing codebase or greenfield project? 7. What tech stack? (if known) 8. Any integration requirements? (third-party services, internal systems) 9. Performance/scale requirements? (users, data volume, latency)
Taskmaster Specific (3): 10. Have you used taskmaster before? (helps calibrate detail level) 11. What's the estimated complexity? (simple feature, typical project, complex system) 12. Timeline expectations? (helps with phasing and task breakdown)
Open-Ended (1): 13. Anything else I should know? (edge cases, constraints, context)
Smart Defaults:
- If user provides minimal answers, use best guesses and document assumptions
- Default to comprehensive detail
- Assume engineer audience unless specified otherwise
Step 5: Initialize Taskmaster Project
CRITICAL: Initialize ONLY via taskmaster MCP/CLI. NEVER create .taskmaster/ manually.
If TASKMASTER_METHOD="MCP":
Use mcp__task-master-ai__initialize_project:
- projectRoot: ${PWD} (absolute path)
- yes: true (skip prompts)
- storeTasksInGit: true
- initGit: false (if git already exists)
- skipInstall: false
- rules: ["claude"]
Result: .taskmaster/ structure created by taskmaster
If TASKMASTER_METHOD="CLI":
taskmaster init --yes --store-tasks-in-git --rules=claude
Output:
â
Taskmaster Initialized
Created: .taskmaster/docs/
Created: .taskmaster/tasks/
Created: .taskmaster/reports/
Created: .taskmaster/state/
Updated: .gitignore
Step 6: Generate Comprehensive PRD
IMPORTANT: Use the PRD template from templates/ directory as the base structure.
Template Selection:
1. Read PRD template based on project complexity:
- Complex/Standard projects: Use Read tool to load templates/taskmaster-prd-comprehensive.md
- Simple features: Use Read tool to load templates/taskmaster-prd-minimal.md
2. Template provides:
- Complete section structure with placeholders
- Examples for each section
- Taskmaster-specific hints and formatting
Generation Process:
1. Load template:
- Use Read tool: templates/taskmaster-prd-comprehensive.md (default)
- Or: templates/taskmaster-prd-minimal.md (if user requested minimal)
2. Fill template with user's answers from Step 4:
- Replace [placeholders] with actual content
- Expand examples with project-specific details
- Add technical depth based on discovery answers
3. Write completed PRD:
- Output to: .taskmaster/docs/prd.md
- Preserve template structure and formatting
Template contains 12 sections:
- Executive Summary
- Problem Statement
- Goals & Success Metrics
- User Stories
- Functional Requirements
- Non-Functional Requirements
- Technical Considerations
- Implementation Roadmap
- Out of Scope
- Open Questions & Risks
- Validation Checkpoints
- Appendix: Task Breakdown Hints
Output:
â
PRD Generated from template
Template: taskmaster-prd-comprehensive.md
Output: .taskmaster/docs/prd.md
Sections: 12 (all populated)
Step 7: Validate PRD Quality (13 Automated Checks)
Required Elements (5 checks):
- â Executive summary exists (2-3 sentences)
- â Problem statement includes user AND business impact
- â All goals have SMART metrics (Specific, Measurable, Achievable, Relevant, Time-bound)
- â User stories have acceptance criteria (minimum 3 per story)
- â Out of scope explicitly defined
Functional Requirements (3 checks): 6. â All functional requirements are testable (not vague) 7. â Each requirement has priority (Must/Should/Could) 8. â Requirements are numbered (REQ-001, REQ-002, etc.)
Technical Considerations (2 checks): 9. â Technical considerations address architecture 10. â Non-functional requirements include specific targets (not "fast" but "< 200ms p95")
Taskmaster-Specific (3 checks): 11. â Requirements have task breakdown hints 12. â Dependencies identified for task sequencing 13. â Acceptance criteria are concrete (can become task completion checks)
Validation Output:
â
PRD Quality Validation: 13/13 PASSED
â
All required elements present
â
All functional requirements testable
â
Taskmaster optimization complete
Quality Score: 60/60 (EXCELLENT)
Safe to proceed with task generation.
OR
â ī¸ PRD Quality Validation: 11/13 (2 warnings)
â
Required elements: 5/5
â
Functional requirements: 3/3
â
Technical considerations: 2/2
â ī¸ Taskmaster optimization: 1/3
Warnings:
- REQ-007: "should be performant" is vague
Suggestion: Replace with "< 200ms response time for 95th percentile"
- User Story 2: Only 2 acceptance criteria (minimum 3 recommended)
Suggestion: Add edge case criterion
Quality Score: 55/60 (GOOD - minor improvements suggested)
Step 8: Parse PRD & Expand Tasks (Single Combined Operation)
IMPORTANT: Combine parse-prd + expand-all with research into ONE operation.
Auto-Calculate Task Count:
numTasks = (count of functional requirements à 1.5) rounded
Minimum: 10 tasks
Maximum: 40 tasks
If TASKMASTER_METHOD="MCP":
1. Parse PRD with research:
Use mcp__task-master-ai__parse_prd:
- projectRoot: ${PWD}
- input: ".taskmaster/docs/prd.md"
- numTasks: Auto-calculated based on requirements count
- research: true (ALWAYS use research for better quality)
- append: false
2. Immediately expand ALL tasks with research:
Use mcp__task-master-ai__expand_all:
- projectRoot: ${PWD}
- research: true (ALWAYS use research)
- force: false
If TASKMASTER_METHOD="CLI":
# Combined operation:
taskmaster parse-prd --input .taskmaster/docs/prd.md --research --num-tasks auto && \
taskmaster expand-all --research
Result:
â
Tasks Generated: 22 tasks from PRD
â
Tasks Expanded: 94 subtasks created
- Phase 1: 5 tasks, 18 subtasks
- Phase 2: 6 tasks, 28 subtasks
- Phase 3: 5 tasks, 22 subtasks
- Phase 4: 4 tasks, 18 subtasks
- Phase 5: 2 tasks, 8 subtasks
Step 9: Insert User Testing Tasks (Every 5 Tasks)
CRITICAL NEW REQUIREMENT: After tasks are expanded, insert user-facing testing tasks.
Logic:
For every 5 tasks:
- Insert a new task: "USER-TEST-{N}"
- Title: "User Validation Checkpoint {N}"
- Description: "Manually test functionality from Tasks {start} to {end}"
Example:
- TASK-001 to TASK-005 â Insert USER-TEST-1 after TASK-005
- TASK-006 to TASK-010 â Insert USER-TEST-2 after TASK-010
User Testing Task Template:
# USER-TEST-{N}: User Validation Checkpoint {N}
## Purpose
Manual testing of functionality implemented in Tasks {start}-{end}
## Prerequisites
All subtasks in Tasks {start}-{end} must be completed and merged to main branch.
## Testing Checklist
### Functionality Tests
[For each requirement covered in these 5 tasks, add:]
- [ ] Test Requirement REQ-{X}: [Description]
- Expected: [What should happen]
- Actual: [User fills in]
### Integration Tests
- [ ] Test integration between components
- [ ] Verify no regressions in existing features
### Performance Tests
- [ ] Measure response time (should be < [target])
- [ ] Test under expected load
## Acceptance Criteria
- â
All functionality tests pass
- â
No critical bugs found
- â
Performance meets targets
## If Tests Fail
1. Document issue in .taskmaster/docs/progress.md
2. Type "issues" and describe what failed
3. I'll create fix tasks before proceeding
4. Do NOT continue to next tasks until fixed
## When Complete
Type "passed" to continue to next tasks.
Implementation:
If TASKMASTER_METHOD="MCP":
Use mcp__task-master-ai__add_task for each checkpoint:
- projectRoot: ${PWD}
- title: "User Validation Checkpoint {N}"
- description: "Manually test functionality from Tasks {start} to {end}"
- details: [Full testing checklist template above]
- dependencies: "{end}" (depends on last task in group)
- priority: "high"
If TASKMASTER_METHOD="CLI":
taskmaster add-task \
--title="User Validation Checkpoint {N}" \
--description="Manual testing checkpoint" \
--dependencies="{end}" \
--priority=high
Result:
⨠Inserted user validation checkpoints:
â
USER-TEST-1 (after Task 5)
â
USER-TEST-2 (after Task 10)
â
USER-TEST-3 (after Task 15)
â
USER-TEST-4 (after Task 20)
đ Updated task count: 26 tasks (22 implementation + 4 user tests)
Step 10: Setup Tracking Scripts
Create automation scripts in .taskmaster/scripts/:
Scripts to Create:
- track-time.py - Real datetime tracking with UTC timestamps
- rollback.sh - Git rollback to any task checkpoint
- learn-accuracy.py - Estimation accuracy learning
- security-audit.py - Auto-generate security checklist
- execution-state.py - Crash recovery state management
All scripts are included in this skill's implementation and will be auto-generated.
See sections below for complete script implementations.
Step 10.5: Generate CLAUDE.md (TDD Workflow Guide)
IMPORTANT: Generate a TDD workflow guide for the project using the template, but only if one doesn't already exist.
Pre-Check (REQUIRED):
1. Check if CLAUDE.md already exists:
- Use Glob tool: ./CLAUDE.md
- If EXISTS â Skip generation, show message:
"âšī¸ CLAUDE.md already exists. Skipping generation to preserve your configuration."
- If NOT EXISTS â Proceed with generation
2. Check if codex.md already exists (for later):
- Use Glob tool: ./codex.md
- Store result for Step 4 below
Template Loading (only if CLAUDE.md doesn't exist):
1. Read the CLAUDE.md template:
- Use Read tool: templates/CLAUDE.md.template
2. Template contains:
- TDD workflow instructions (RED â GREEN â REFACTOR)
- Taskmaster integration commands
- Agent usage guidelines
- Validation & quality gates
- Project-specific placeholders
Placeholder Replacement:
Replace these placeholders with project-specific values from Step 4 discovery:
{{PROJECT_NAME}} â User's project/feature name
{{TECH_STACK}} â Tech stack from discovery (e.g., "React, Node.js, PostgreSQL")
{{ARCHITECTURE_OVERVIEW}} â Brief architecture description
{{KEY_DEPENDENCIES}} â Main dependencies identified
{{TESTING_FRAMEWORK}} â Testing framework (e.g., "Jest", "Vitest", "pytest")
{{DEV_ENVIRONMENT}} â Development environment setup
{{TEST_COMMAND}} â Test command (e.g., "npm test", "pytest")
Generation Process:
1. Pre-check: Skip if CLAUDE.md exists (see Pre-Check above)
2. Load template:
- Use Read tool: templates/CLAUDE.md.template
3. Fill placeholders with discovery answers:
- If value unknown, use sensible default or "[To be configured]"
4. Write to project root:
- Output to: ./CLAUDE.md (project root)
5. Ask about Codex (only if codex.md doesn't exist):
- Use AskUserQuestion: "Are you using Codex in addition to Claude Code?"
- If yes AND codex.md doesn't exist: Also write to ./codex.md (identical content)
- If codex.md exists: Skip, show "âšī¸ codex.md already exists."
Output:
[If CLAUDE.md doesn't exist]
â
CLAUDE.md Generated
Template: templates/CLAUDE.md.template
Output: ./CLAUDE.md
Contains: TDD workflow, taskmaster integration, quality gates
[If CLAUDE.md exists]
âšī¸ CLAUDE.md already exists - skipped generation
[If Codex selected AND codex.md doesn't exist]
â
codex.md Generated (identical to CLAUDE.md)
Output: ./codex.md
[If codex.md exists]
âšī¸ codex.md already exists - skipped generation
Step 11: Choose Next Action (Handoff vs Autonomous Execution)
CRITICAL CHOICE: After PRD and tasks are ready, ask user how they want to proceed.
Use AskUserQuestion tool to present two main options:
Use AskUserQuestion:
questions:
- question: "Your PRD and tasks are ready. How would you like to proceed?"
header: "Next Action"
multiSelect: false
options:
- label: "Show TaskMaster Commands"
description: "Hand off to TaskMaster. I'll show you the commands to run tasks manually. Full control."
- label: "Autonomous Execution"
description: "I'll execute tasks for you autonomously with 4 execution modes to choose from."
Option A: Handoff to TaskMaster (DEFAULT)
If user selects "Show TaskMaster Commands":
â
PRD Complete: .taskmaster/docs/prd.md
đ Tasks Ready: {X} tasks ({Y} subtasks)
đ Next checkpoint: {next USER-TEST}
đ TaskMaster Commands (Use these to work on tasks):
Sequential Execution:
taskmaster next-task # Get next available task
taskmaster get-task {id} # Work on specific task
taskmaster set-task-status {id} --status=done
Parallel Execution (for independent tasks):
taskmaster get-tasks --status=pending --with-subtasks
# Work on multiple tasks simultaneously
Progress Tracking:
taskmaster get-tasks --with-subtasks # See all tasks
python3 .taskmaster/scripts/track-time.py start {task_id}
python3 .taskmaster/scripts/track-time.py complete {task_id}
Quality & Safety:
bash .taskmaster/scripts/rollback.sh {task_id} # Rollback to checkpoint
python3 .taskmaster/scripts/security-audit.py # Security check
đ Documentation:
- PRD: .taskmaster/docs/prd.md
- Tasks: .taskmaster/tasks/
- Progress: .taskmaster/docs/progress.md
đĄ Tip: Use TaskMaster MCP tools for the best experience!
Ready to start? Run: taskmaster next-task
Then EXIT the skill (skill complete).
Option B: Autonomous Execution
If user selects "Autonomous Execution":
Ask follow-up question with 4 execution modes:
Use AskUserQuestion:
questions:
- question: "Select autonomous execution mode:"
header: "Execution Mode"
multiSelect: false
options:
- label: "Sequential to Checkpoint"
description: "Work autonomously until next user test. Stops for validation. RECOMMENDED for quality control."
- label: "Parallel to Checkpoint"
description: "Run independent tasks in parallel until next user test. Faster execution."
- label: "Full Autonomous"
description: "Run ALL tasks in parallel without stopping. â ī¸ Skips user validation."
- label: "Manual Control"
description: "You decide which tasks to run. Full control over execution."
Execution Mode Details:
Mode 1: Sequential to Checkpoint
- Executes tasks one-by-one until next USER-TEST
- Stops for user validation
- Best for quality control
- RECOMMENDED for first-time features
Mode 2: Parallel to Checkpoint
- Executes independent tasks in parallel
- Stops at next USER-TEST
- Faster execution
- Good for experienced users
Mode 3: Full Autonomous
- Runs ALL tasks in parallel without stopping
- Auto-completes USER-TEST tasks
- Fastest execution
- WARNING: Skips manual validation
Mode 4: Manual Control
- User decides which tasks to run
- Full control over execution
- No autonomous execution
All execution modes include:
- Strict git branching policies (branch per task, sub-branch per subtask)
- Commit checkpoints after every task
- Progress logging to .taskmaster/docs/progress.md
- Datetime tracking with track-time.py
- Autonomous execution (no user input except at checkpoints)
After mode selected:
- Store their selection
- Output the corresponding full execution prompt
- Recognize if user types "begin" or "start"
- Begin autonomous execution
Claude Recommendation:
Based on context, recommend the best option:
- First-time feature OR critical system â Mode 1 (Sequential)
- Experienced user OR non-critical â Mode 2 (Parallel)
- Trusted implementation OR time-critical â Mode 3 (Full)
- Complex requirements OR learning â Mode 4 (Manual)
Display recommendation: "â Claude Recommends: Mode {N}"
See full execution prompt templates in "EXECUTION PROMPT TEMPLATES" section below.
Step 12: Present Final Summary
Summary depends on the path taken:
If Handoff to TaskMaster (Step 11 Option A):
â
PRD COMPLETE
đ PRD Created: .taskmaster/docs/prd.md
â
Taskmaster Initialized: Using {MCP/CLI}
đ Tasks Generated: {X} tasks ({Y} implementation + {Z} user tests)
đ Tasks Expanded: {N} subtasks
đ Scripts Created: .taskmaster/scripts/ (5 automation scripts)
đ Overview:
- Feature: {name}
- Complexity: {Simple/Medium/Complex}
- Estimated Effort: {X} tasks, ~{Y} hours
- Key Goal: {primary success metric}
đ¯ Key Requirements:
1. {Top functional requirement}
2. {Second functional requirement}
3. {Third functional requirement}
â ī¸ Quality Validation: {score}/60
â
All 13 validation checks passed
đ Task Breakdown:
- Phase 1: {X} tasks
- Phase 2: {X} tasks
- Phase 3: {X} tasks
- Phase 4: {X} tasks
đ¤ User Testing Checkpoints:
- USER-TEST-1: After Task {N}
- USER-TEST-2: After Task {N}
- USER-TEST-3: After Task {N}
đ Next Steps:
Run: taskmaster next-task
Or use TaskMaster MCP tools to manage tasks.
See commands above for full TaskMaster usage.
⨠PRD generation complete! Ready to build.
Then EXIT skill.
If Autonomous Execution (Step 11 Option B):
â
PRD COMPLETE - STARTING AUTONOMOUS EXECUTION
đ PRD: .taskmaster/docs/prd.md
â
Taskmaster: Using {MCP/CLI}
đ Tasks: {X} tasks ({Y} implementation + {Z} user tests)
đ Subtasks: {N} subtasks
đ Scripts: Ready (.taskmaster/scripts/)
đ Overview:
- Feature: {name}
- Complexity: {Simple/Medium/Complex}
- Mode: {Selected execution mode}
- Next Checkpoint: {next USER-TEST}
â ī¸ Quality: {score}/60 â
đ Execution Starting!
Selected: {execution mode name}
[If Sequential/Parallel:]
Next: Tasks {start}-{end} â USER-TEST-{N}
Working autonomously until checkpoint...
[If Full Autonomous:]
All {X} tasks will execute in parallel
Working autonomously until complete...
[If Manual:]
Awaiting your commands...
Type "begin" or "start" to execute!
Then PROCEED to autonomous execution using the selected mode's prompt template (see EXECUTION PROMPT TEMPLATES section).
TOP 5 ENHANCEMENTS
Enhancement 1: Real DateTime Tracking (B2)
Script: .taskmaster/scripts/track-time.py
Created automatically during Step 8.
Features:
- UTC timestamp tracking (start/end)
- Precise duration calculation
- JSON state persistence
- CLI interface for easy use
Usage in Execution:
# Before task starts:
python3 .taskmaster/scripts/track-time.py start {task_id}
# Before subtask starts:
python3 .taskmaster/scripts/track-time.py start {task_id} {subtask_id}
# After subtask completes:
python3 .taskmaster/scripts/track-time.py complete {task_id} {subtask_id}
# After task completes:
python3 .taskmaster/scripts/track-time.py complete {task_id}
Output:
đ
Started: 2025-01-29 14:23:15 UTC
[... work happens ...]
â
COMPLETED
đ
Ended: 2025-01-29 14:41:32 UTC
âąī¸ Actual: 18 min (18.3 min)
đ vs Estimate: 18 min - Within 2% â
See TOP_5_ADDITIONS.md for complete script code.
Enhancement 2: Instant Rollback Command (A1)
Script: .taskmaster/scripts/rollback.sh
Trigger: User types "rollback to task X" at ANY time during execution
Features:
- Revert to any checkpoint tag
- Backup current state before rollback
- Update progress.md with rollback note
- Safety confirmation before destructive action
Usage:
USER: rollback to task 3
CLAUDE:
đ Initiating rollback to Task 3...
â ī¸ This will:
- Discard all changes after Task 3
- Reset to checkpoint-task-003
- Preserve current work in rollback-backup-{timestamp}
Type "yes" to confirm.
USER: yes
CLAUDE:
đž Backed up to: rollback-backup-20250129-143045
â
Rolled back to Task 3
đ Updated progress.md
What next?
1. Resume from here
2. Redo Task 3
3. Skip to different task
4. Manual control
Type: 1, 2, 3, or 4
See TOP_5_ADDITIONS.md for complete script code.
Enhancement 3: Accuracy Learning System (B3)
Script: .taskmaster/scripts/learn-accuracy.py
Trigger: After every 10 completed tasks (at USER-TEST checkpoints)
Features:
- Tracks estimated vs actual time
- Calculates average accuracy percentage
- Generates adjustment factor
- Recommends estimate adjustments
Usage:
After USER-TEST-2 passes:
đ Running estimation accuracy analysis...
Tasks Analyzed: 10
Average Accuracy: 123%
Adjustment Factor: 1.23x
Recent Tasks:
Task 6: 45min (est: 30min) - 150% â ī¸
Task 7: 22min (est: 25min) - 88% â
Task 8: 38min (est: 35min) - 109% â
Task 9: 67min (est: 45min) - 149% â ī¸
Task 10: 28min (est: 20min) - 140% â ī¸
â ī¸ You're taking 23% longer than estimated.
Apply adjustment to remaining tasks?
1. Yes, increase all future estimates by 23%
2. No, keep current estimates
3. Manually review
Type: 1, 2, or 3
See TOP_5_ADDITIONS.md for complete script code.
Enhancement 4: Security Audit Checklist (D2)
Script: .taskmaster/scripts/security-audit.py
Trigger: Before final USER-TEST checkpoint
Features:
- Scans codebase for security-relevant patterns
- Auto-generates checklist based on detected features
- Includes standard security checks
- Offers automated security scans
Usage:
Before USER-TEST-4 (final checkpoint):
đ Generating security audit checklist...
### Authentication
- [ ] Passwords hashed with bcrypt (cost âĨ 10)
- [ ] Session tokens cryptographically secure
### OAuth
- [ ] OAuth tokens encrypted at rest
- [ ] OAuth state parameter prevents CSRF
### Database
- [ ] All queries use parameterized statements
- [ ] No SQL injection vulnerabilities
### General Security
- [ ] HTTPS enforced in production
- [ ] CSRF protection enabled
- [ ] Rate limiting on auth endpoints
- [ ] Security headers set (CSP, X-Frame-Options)
Run automated scans?
1. Yes, run npm audit + recommended scans
2. Manual review only
3. Skip for now
Type: 1, 2, or 3
See TOP_5_ADDITIONS.md for complete script code.
Enhancement 5: Auto-Resume After Crash (A2)
Script: .taskmaster/scripts/execution-state.py
Trigger: At Step 0 (before anything else) if previous session crashed
Features:
- Persistent execution state tracking
- Detects incomplete work
- Offers resume points
- Continues where crashed
Usage:
[Claude crashes mid-task]
[User restarts 10 minutes later]
USER: continue
CLAUDE:
đ Checking for incomplete work...
Found it!
đ Last Activity:
- Mode: Sequential to Checkpoint
- Task: TASK-007 (OAuth callback handler)
- Subtask: 3/5 (Handle error responses)
- Last updated: 2025-01-29 16:45:23 UTC (10 min ago)
- Completed: Tasks 1-6 â
Resume from:
1. Last subtask (continue TASK-007 subtask 3)
2. Restart current task (redo TASK-007)
3. Last checkpoint (restart from TASK-006)
4. Start fresh
Type: 1, 2, 3, or 4
See TOP_5_ADDITIONS.md for complete script code.
EXECUTION PROMPT TEMPLATES
Template 1: Sequential to Checkpoint
Execute tasks sequentially from {current_task} until USER-TEST-{N}.
DATETIME TRACKING:
Before each task:
python3 .taskmaster/scripts/track-time.py start {task_id}
Before each subtask:
python3 .taskmaster/scripts/track-time.py start {task_id} {subtask_id}
After each subtask:
python3 .taskmaster/scripts/track-time.py complete {task_id} {subtask_id}
After each task:
python3 .taskmaster/scripts/track-time.py complete {task_id}
STRICT GIT POLICY:
1. When starting a task:
- Create feature branch: git checkout -b task-{id}-{slug}
2. For each subtask:
- Create sub-branch: git checkout -b task-{id}-subtask-{n}
- Complete subtask implementation
- Run tests
- Commit: git commit -m "Complete task-{id} subtask-{n}: [description]
đ¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
- Merge to task branch: git checkout task-{id}-{slug} && git merge task-{id}-subtask-{n}
- Delete sub-branch: git branch -d task-{id}-subtask-{n}
3. When task complete:
- Verify ALL subtasks merged
- Merge to main: git checkout main && git merge task-{id}-{slug}
- Create checkpoint tag: git tag -a checkpoint-task-{id} -m "Completed task {id}"
- Delete feature branch: git branch -d task-{id}-{slug}
PROGRESS LOGGING:
After EVERY task completion, append to .taskmaster/docs/progress.md:
## Task {id}: {title} - COMPLETED
**Completed**: {timestamp}
**Duration**: {actual_minutes} min (estimated: {estimated_minutes} min)
**Subtasks**: {n} completed
**Tests**: {pass/fail}
**Issues**: {any issues encountered}
**Git**: Merged to main, tagged as checkpoint-task-{id}
AUTONOMOUS EXECUTION RULES:
- Do NOT ask user for input unless critical error
- If task fails tests: retry once, then log and skip
- If dependency missing: log and skip
- Continue until USER-TEST-{N} reached
- Update execution state after each task
ROLLBACK SUPPORT:
If user types "rollback to task X" at ANY TIME:
1. STOP current work immediately
2. Run: bash .taskmaster/scripts/rollback.sh X
3. Wait for user confirmation
4. Resume as user directs
WHEN COMPLETE:
Stop and report:
"â
Tasks {start}-{end} completed
đ Next: USER-TEST-{N} - User validation required
đ Progress: .taskmaster/docs/progress.md
đŗ Git: All tasks merged with checkpoints"
Template 2: Parallel to Checkpoint
Similar to Template 1 but with:
- Launch up to 3 concurrent tasks
- Handle merge conflicts automatically
- Wait for dependencies before starting dependent tasks
- All tasks still follow git policy (branch per task)
Template 3: Full Autonomous
Similar to Template 2 but:
- No stops for USER-TEST (auto-completes them)
- Maximum parallelization (up to 5 concurrent)
- Runs automated tests for USER-TEST tasks
- Only stops when ALL tasks complete
Template 4: Manual Control
Awaiting user commands:
- "next task" - Get next task
- "task {id}" - Work on specific task
- "status" - Show progress
- "parallel {id1,id2}" - Run specific tasks in parallel
Git policies enforced.
Progress logged to progress.md.
Datetime tracking active.
Reference
For complete script implementations, see:
- TOP_5_ADDITIONS.md (all 5 automation scripts)
- USER_EXPERIENCE_EXAMPLE.md (user flow walkthrough)
- CHANGES_SUMMARY.md (what changed from v1)
Tips for Best Results
Understand the Workflow:
- This skill PRIMARILY generates PRDs (with optional execution)
- If you already have a PRD, the skill will detect it and offer options
- Default behavior: Generate PRD â Hand off to TaskMaster
- Optional: Choose autonomous execution after PRD is ready
Provide Context Upfront:
- More detail in discovery â Better PRD
- Share constraints, dependencies, assumptions
- Mention existing systems to integrate with
Be Specific About Success:
- Quantify goals (not "improve UX" but "increase NPS from 45 to 60")
- Define what "done" looks like
- Specify how you'll measure success
Choose the Right Path:
- Handoff to TaskMaster (Default): Best if you want full control
- Autonomous Execution: Best if you trust the process and want speed
- Sequential to Checkpoint: Quality-focused, stops for validation
- Parallel to Checkpoint: Faster, stops at checkpoints
- Full Autonomous: Maximum speed, skips validation
- Manual Control: You decide every step
If Using Existing PRD:
- Option 1: Execute tasks (pick up where you left off)
- Option 2: Update PRD (add new requirements)
- Option 3: Replace PRD (start fresh, old PRD backed up)
- Option 4: Review PRD (just read it)
Leverage Automation (if using autonomous execution):
- Use datetime tracking to improve estimates
- Use rollback if you need to undo work
- Let accuracy learning adjust your estimates
- Review security audit before deployment
Trust the Process:
- USER-TEST checkpoints catch issues early
- Git checkpoints allow easy rollback
- Progress.md shows exactly what happened
- TaskMaster integration ensures smooth workflow
Remember: A comprehensive PRD with automated quality control and TaskMaster integration is the foundation of successful implementation. This skill focuses on creating that foundation. Execution is optional - you can always hand off to TaskMaster for more control.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?