plan_w_team
The `plan_w_team` slash command generates a detailed engineering implementation plan based on user requirements and saves it as a markdown specification document to the specs directory. Use this command when you need to define a comprehensive blueprint for development work before actual coding begins, allowing teams to align on approach, architecture decisions, and task breakdown.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/disler/claude-code-hooks-mastery/HEAD/.claude/commands/plan_w_team.md -o ~/.claude/commands/plan_w_team.mdplan_w_team.md
# Plan With Team
Create a detailed implementation plan based on the user's requirements provided through the `USER_PROMPT` variable. Analyze the request, think through the implementation approach, and save a comprehensive specification document to `PLAN_OUTPUT_DIRECTORY/<name-of-plan>.md` that can be used as a blueprint for actual development work. Follow the `Instructions` and work through the `Workflow` to create the plan.
## Variables
USER_PROMPT: $1
ORCHESTRATION_PROMPT: $2 - (Optional) Guidance for team assembly, task structure, and execution strategy
PLAN_OUTPUT_DIRECTORY: `specs/`
TEAM_MEMBERS: `.claude/agents/team/*.md`
GENERAL_PURPOSE_AGENT: `general-purpose`
## Instructions
- **PLANNING ONLY**: Do NOT build, write code, or deploy agents. Your only output is a plan document saved to `PLAN_OUTPUT_DIRECTORY`.
- If no `USER_PROMPT` is provided, stop and ask the user to provide it.
- If `ORCHESTRATION_PROMPT` is provided, use it to guide team composition, task granularity, dependency structure, and parallel/sequential decisions.
- Carefully analyze the user's requirements provided in the USER_PROMPT variable
- Determine the task type (chore|feature|refactor|fix|enhancement) and complexity (simple|medium|complex)
- Think deeply (ultrathink) about the best approach to implement the requested functionality or solve the problem
- Understand the codebase directly without subagents to understand existing patterns and architecture
- Follow the Plan Format below to create a comprehensive implementation plan
- Include all required sections and conditional sections based on task type and complexity
- Generate a descriptive, kebab-case filename based on the main topic of the plan
- Save the complete implementation plan to `PLAN_OUTPUT_DIRECTORY/<descriptive-name>.md`
- Ensure the plan is detailed enough that another developer could follow it to implement the solution
- Include code examples or pseudo-code where appropriate to clarify complex concepts
- Consider edge cases, error handling, and scalability concerns
- Understand your role as the team lead. Refer to the `Team Orchestration` section for more details.
### Team Orchestration
As the team lead, you have access to powerful tools for coordinating work across multiple agents. You NEVER write code directly - you orchestrate team members using these tools.
#### Task Management Tools
**TaskCreate** - Create tasks in the shared task list:
```typescript
TaskCreate({
subject: "Implement user authentication",
description: "Create login/logout endpoints with JWT tokens. See specs/auth-plan.md for details.",
activeForm: "Implementing authentication" // Shows in UI spinner when in_progress
})
// Returns: taskId (e.g., "1")
```
**TaskUpdate** - Update task status, assignment, or dependencies:
```typescript
TaskUpdate({
taskId: "1",
status: "in_progress", // pending → in_progress → completed
owner: "builder-auth" // Assign to specific team member
})
```
**TaskList** - View all tasks and their status:
```typescript
TaskList({})
// Returns: Array of tasks with id, subject, status, owner, blockedBy
```
**TaskGet** - Get full details of a specific task:
```typescript
TaskGet({ taskId: "1" })
// Returns: Full task including description
```
#### Task Dependencies
Use `addBlockedBy` to create sequential dependencies - blocked tasks cannot start until dependencies complete:
```typescript
// Task 2 depends on Task 1
TaskUpdate({
taskId: "2",
addBlockedBy: ["1"] // Task 2 blocked until Task 1 completes
})
// Task 3 depends on both Task 1 and Task 2
TaskUpdate({
taskId: "3",
addBlockedBy: ["1", "2"]
})
```
Dependency chain example:
```
Task 1: Setup foundation → no dependencies
Task 2: Implement feature → blockedBy: ["1"]
Task 3: Write tests → blockedBy: ["2"]
Task 4: Final validation → blockedBy: ["1", "2", "3"]
```
#### Owner Assignment
Assign tasks to specific team members for clear accountability:
```typescript
// Assign task to a specific builder
TaskUpdate({
taskId: "1",
owner: "builder-api"
})
// Team members check for their assignments
TaskList({}) // Filter by owner to find assigned work
```
#### Agent Deployment with Task Tool
**Task** - Deploy an agent to do work:
```typescript
Task({
description: "Implement auth endpoints",
prompt: "Implement the authentication endpoints as specified in Task 1...",
subagent_type: "general-purpose",
model: "opus", // or "opus" for complex work, "haiku" for VERY simple
run_in_background: false // true for parallel execution
})
// Returns: agentId (e.g., "a1b2c3")
```
#### Resume Pattern
Store the agentId to continue an agent's work with preserved context:
```typescript
// First deployment - agent works on initial task
Task({
description: "Build user service",
prompt: "Create the user service with CRUD operations...",
subagent_type: "general-purpose"
})
// Returns: agentId: "abc123"
// Later - resume SAME agent with full context preserved
Task({
description: "Continue user service",
prompt: "Now add input validation to the endpoints you created...",
subagent_type: "general-purpose",
resume: "abc123" // Continues with previous context
})
```
When to resume vs start fresh:
- **Resume**: Continuing related work, agent needs prior context
- **Fresh**: Unrelated task, clean slate preferred
#### Parallel Execution
Run multiple agents simultaneously with `run_in_background: true`:
```typescript
// Launch multiple agents in parallel
Task({
description: "Build API endpoints",
prompt: "...",
subagent_type: "general-purpose",
run_in_background: true
})
// Returns immediately with agentId and output_file path
Task({
description: "Build frontend components",
prompt: "...",
subagent_type: "general-purpose",
run_in_background: true
})
// Both agents now working simultaneously
// Check on progress
TaskOutput({
task_id: "agentId",
block: false, // non-blocking check
timeout: 5000
})
// Wait for completiSimple greeting agent, use proactively when greeting the user. If they say 'hi claude' or 'hi cc' or 'hi claude code' use this agent.
AI research specialist that proactively gathers latest news and developments in LLMs, AI agents, and engineering. Use for staying current with AI/ML innovations, finding actionable insights, and discovering new tools and techniques.
Generates a new, complete Claude Code sub-agent configuration file from a user's description. Use this to create new agents. Use this Proactively when the user asks you to create a new sub agent.
Proactively triggered when work is completed to provide concise audio summaries and suggest next steps. If they say 'tts' or 'tts summary' or 'audio summary' use this agent. When you prompt this agent, describe exactly what you want them to communicate to the user. Remember, this agent has no context about any questions or previous conversations between you and the user. So be sure to communicate well so they can respond to the user. Be concise, and to the point - aim for 2 sentences max.
Implement the plan
Execute comprehensive cryptocurrency research using all crypto agents
Execute lightweight cryptocurrency research using haiku agents
Understand the current state of the git repository