This skill should be used when the user needs to plan features, break down requirements, create implementation tasks, or design software architecture. Use this skill for comprehensive requirements analysis, technical planning, and creating structured task hierarchies with dependencies. The skill executes in the main conversation context and can invoke the technical-lead agent for architectural review when needed.
Transforms requirements into structured implementation plans with hierarchical tasks and dependencies.
/plugin marketplace add ivankristianto/k2-dev/plugin install k2-dev@k2-dev-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Transforms user requirements into actionable beads tasks with proper hierarchies and dependencies. Executes in main conversation context for faster execution and direct user interaction.
Key Objectives:
Invoked when: /planner or /k2:planner command executed
1. Read Project Standards
ls -la AGENTS.md CLAUDE.md docs/constitution.md
cat AGENTS.md CLAUDE.md
Extract: Quality gates, coding standards, testing requirements, architectural principles, file organization.
2. Understand Requirements
3. Explore Codebase
glob "**/*{keyword}*" # Find relevant files
grep "{pattern}" --output_mode=content
read {key_files}
Identify: File structure, similar features, integration points, testing patterns, existing frameworks.
Ask 3-5 focused questions directly (main context allows direct interaction):
Scope: Core features required? Deferrable features? Integration needs? Timeline? Technical: Library preferences? Architectural constraints? Design patterns? Performance requirements? UX: User workflow? UI/UX requirements? Error handling? Accessibility? Quality: Test coverage expected? Security considerations? Definition of "done"?
Strategy: Prioritize questions impacting plan structure. Use codebase analysis for informed questions. Accept reasonable defaults for non-critical decisions.
# Implementation Plan: {Feature Name}
## Overview
{Brief summary}
## Requirements Summary
{Consolidated from input + clarification}
## Architectural Approach
{Technical approach and key decisions}
**Integration Points:** {Systems/modules affected}
**Technology Choices:** {Libraries/frameworks + rationale}
## Implementation Phases
### Phase 1: {Name}
**Goal**: {What this achieves}
**Tasks**:
1. {Task} - Files: {list}, Dependencies: {what first}, Acceptance: {verify}
### Phase 2: {Name}
...
## Task Hierarchy
- Epic: {Feature Name}
- Story 1: {User capability}
- Subtask 1.1: {Technical task}
- Story 2: {User capability}
- Subtask 2.1: {Technical task}
## Dependencies
{Execution order and blocking relationships}
## Testing Strategy
{What needs testing and how}
## Risks and Mitigations
- **Risk**: {Issue} → **Mitigation**: {Solution}
Invoke Technical Lead for architectural review:
Use Task tool:
- subagent_type: "technical-lead"
- prompt: "Review this implementation plan for {feature}:
{paste plan}
Feedback needed on:
- Architectural alignment with project patterns?
- Risks or concerns?
- Task breakdown appropriate?
- Dependencies sound?
- Meets quality standards (AGENTS.md/CLAUDE.md)?"
Incorporate Feedback:
Task Structure Decision:
Reference: See k2-dev-reference.md#task-granularity
1. Create Epic (if needed)
bd create --title="Epic: {Name}" --priority=P1 \
--description="Epic overview, scope, goals, success criteria"
# Record epic ID: beads-{id}
2. Create Stories (user-facing capabilities)
bd create --title="{Capability}" --priority=P1 --parent=beads-{epic} \
--description="Story description, requirements, approach, acceptance criteria, testing"
# Record story IDs
3. Create Subtasks (technical implementation)
bd create --title="{Technical task}" --priority=P1 --parent=beads-{story} \
--description="Task details, files to modify, implementation specifics, acceptance criteria, dependencies"
# Record subtask IDs
4. Set Up Dependencies
bd dep add beads-{B} --blocks-on=beads-{A} # B depends on A (A must complete first)
Strategy: Set blocking relationships for sequential work. Avoid dependencies for parallel work. Document why dependencies exist.
Reference: See k2-dev-reference.md#beads-cli-commands
5. Sync
bd sync
## Planning Complete: {Feature Name}
### Summary
Created comprehensive implementation plan with structured beads tasks after requirements analysis, codebase exploration, clarification, and Technical Lead collaboration.
### Tasks Created
- **Epic**: beads-{id} (if applicable)
- **Stories**: {count} tasks (beads-{ids})
- **Subtasks**: {count} tasks (beads-{ids})
- **Total**: {count} tasks
### Task Hierarchy
Epic: {Name} (beads-{id}) - P1, open
├─ Story: {Name} (beads-{id}) - P1, open
│ ├─ Subtask: {Name} (beads-{id}) - Blocks: none
│ └─ Subtask: {Name} (beads-{id}) - Blocks: beads-{prev}
└─ Story: {Name} (beads-{id}) - P1, open
└─ Subtask: {Name} (beads-{id}) - Blocks: beads-{dep}
### Execution Roadmap
**Phase 1 (Parallel):** beads-{id}, beads-{id}
**Phase 2 (Sequential):** beads-{id} → beads-{id}
**Critical Path:** beads-{A} → beads-{B} → beads-{C}
### Architecture Decisions
1. {Decision + rationale}
2. {Decision + rationale}
### Next Steps
Start implementation:
/k2:start beads-{first_task_id}
View tasks:
bd list --filter=parent:beads-{epic_id}
Clarity: Concrete and actionable tasks, clear technical approach, identified file changes, no ambiguity Completeness: All requirements addressed, testing strategy, quality gates, edge cases Architectural: Follows project patterns, Technical Lead approved, aligns with standards, considers scalability Realistic: Appropriate task breakdown, logical dependencies, achievable scope, realistic risk assessment
✅ Explore codebase thoroughly before planning ✅ Ask 3-5 focused questions at a time ✅ Create specific, actionable tasks with clear acceptance criteria ✅ Get Technical Lead architectural review ✅ Enable parallel work where possible (minimal dependencies)
❌ Plan without exploring codebase first ❌ Be vague ("Implement feature X", "Add tests") ❌ Skip Technical Lead review ❌ Over-specify implementation details ❌ Create unnecessary dependencies that serialize parallelizable work
Missing Standards: Ask user, use industry best practices, note absence, recommend creating AGENTS.md/CLAUDE.md Unclear Requirements: Ask targeted questions, make documented assumptions, validate with user Conflicting Requirements: Identify conflicts, present tradeoffs, ask for prioritization Tech Lead Disagrees: Listen, understand reasoning, adjust plan, defer to expertise, document decision
Planning complete when:
Reference: See k2-dev-reference.md for commands, patterns, and common concepts.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.