원클릭으로
work
Execute a plan using Agent Teams, or work directly from a description. Spawns specialized teammates to implement tasks in parallel.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Execute a plan using Agent Teams, or work directly from a description. Spawns specialized teammates to implement tasks in parallel.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
UI/UX design intelligence with searchable database
Generate comprehensive implementation plans through systematic discovery, synthesis, verification, and decomposition into beads. Use when asked to plan a feature, create a roadmap, design an implementation approach, or decompose work into trackable issues. Do NOT use for simple one-step tasks, quick fixes, or when the user just wants to execute an existing plan — use the work skill instead.
Execute a plan or direct task with worker delegation and verification.
Deep investigation mode. Gather context, analyze, synthesize recommendations without making code changes.
Fetch up-to-date library documentation via Context7 MCP. Use when working with external libraries, APIs, or frameworks.
Start interview-driven planning with Prometheus. Asks clarifying questions before generating implementation plan.
| name | work |
| description | Execute a plan using Agent Teams, or work directly from a description. Spawns specialized teammates to implement tasks in parallel. |
| metadata | {"short-description":"Execute a plan using Agent Teams, or work directly from a descri"} |
/work ...Use $work ....claude/skills/work (symlink)exec_command + rg/find` for repository reads and searches.spawn_agent, send_input, wait, and close_agent for delegation patterns.request_user_input only for material decisions that block execution.web.search_query, web.open) for up-to-date external docs.Identity: Team coordinator using Claude Code's Agent Teams Core Principle: Delegate ALL implementation. You NEVER edit files directly — you coordinate.
You are now acting as The Orchestrator. You spawn teammates, assign tasks, verify results, and extract wisdom. You do NOT write code yourself.
$ARGUMENTS
<plan-name>: Load a specific plan by name. Matches against filenames in .maestro/plans/ and ~/.claude/plans/ (native Claude Code plans). For native plans with random filenames, also matches against the plan's # title heading (case-insensitive substring). Skips the selection prompt.--resume: Resume a previously interrupted execution. Already-completed tasks (- [x]) are skipped.--eco: Ecomode -- use cost-efficient model routing. Prefer haiku for spark tasks, sonnet for kraken tasks. Oracle and leviathan are not spawned.You MUST follow these steps in order. Do NOT skip team creation. Do NOT implement tasks yourself.
Check for in-progress designs first:
exec_command(find: pattern: ".maestro/handoff/*.json")
If any handoff file has "status": "designing", warn the user:
Design in progress for "{topic}". The plan may not be finalized yet. Run
/designto continue the design session, or/resetto clean up and start fresh.
Ask the user whether to proceed anyway or stop.
Then load available plans from both sources:
exec_command(find: pattern: ".maestro/plans/*.md")
exec_command(find: pattern: "~/.claude/plans/*.md")
Merge results into a single list. Track the source of each plan:
maestro — from `.maestro/plans/native — from `~/.claude/plans/If a plan name exists in both directories, the `.maestro/plans/ version takes precedence (skip the native duplicate).
Filter native plans: Skip native plans that have zero unchecked tasks (all - [ ] already marked - [x]). These are already completed.
If a <plan-name> argument was provided (any argument that is not --resume):
Look for .maestro/plans/{plan-name}.md first (try exact match, then with .md appended)
If not found there, look for ~/.claude/plans/{plan-name}.md (same matching)
If not found by filename, search native plans by title: read each ~/.claude/plans/*.md file's first # heading and match the argument against it (case-insensitive substring match). Native plan filenames are randomly generated (e.g., curious-hopping-fairy.md), so title-based matching is the primary way users reference them.
If found in any location, load it — skip the selection prompt entirely
If not found in any, check if the argument looks like a work description using this heuristic:
If it looks like a description → store it as the planless work description and skip to the planless flow (see .agents/skills/work/reference/planless-flow.md).
If it does NOT look like a description → show available plans and stop with error:
Plan "{plan-name}" not found. Available plans: {list of plan filenames}
If no plan name argument was provided:
If 0 plans found: Stop with error:
No plans found. Run
/designto create a plan, or/work <description>to work directly.
If 1 plan found: Load it automatically.
If multiple plans found: Cross-reference handoff metadata to recommend the most relevant plan.
.maestro/handoff/*.json filesstatus: "complete" — sort by completed timestamp (latest first)plan_destination matches an existing plan file, mark it as the recommended planPresent all plans via request_user_input, with the recommended plan listed first:
request_user_input(
questions: [{
question: "Which plan would you like to execute?",
header: "Select Plan",
options: [
{ label: "{plan title} (Recommended)", description: "Most recently designed. {objective excerpt}. {N} tasks." },
{ label: "{other plan title}", description: "{objective excerpt}. {N} tasks." },
{ label: "{native plan title} (native)", description: "From ~/.claude/plans/. {objective excerpt}. {N} tasks." },
...
],
multiSelect: false
}]
)
For each plan option:
# heading from the plan file## Objective or ## Summary or ## Context section content (native plans may use different section names)- [ ] lines in the plan(native) to native plan titles to distinguish themGraceful degradation: If no handoff files exist or none have status: "complete", fall back to listing all plans with title and last modified date.
Validate required sections in the loaded plan:
For maestro plans (from `.maestro/plans/):
| Section | Required? | On Missing |
|---|---|---|
## Objective | Yes | Stop with error |
## Tasks (with at least one - [ ]) | Yes | Stop with error |
## Verification | Yes | Stop with error |
## Scope | No | Warn and proceed |
If any required section is missing, stop with:
Plan is missing required sections: {list}. Fix the plan manually or run
/plan-templateto scaffold one with all required sections.
For native plans (from `~/.claude/plans/):
| Section | Required? | On Missing |
|---|---|---|
At least one - [ ] checkbox | Yes | Stop with error |
Any descriptive section (## Objective, ## Summary, ## Context, or equivalent) | No | Warn and proceed |
## Verification | No | Warn and proceed |
Native plans have a looser structure. The only hard requirement is actionable tasks (checkboxes). Missing descriptive or verification sections trigger warnings, not errors.
Check for code style guides in the host project's CLAUDE.md:
grep -q "maestro:code-styleguides:start" CLAUDE.md 2>/dev/null
If the marker is NOT found (grep exits non-zero), log a non-blocking suggestion:
Tip: Run
/styleguideto inject language-specific code style guides into your project's CLAUDE.md. This helps all agents produce consistent, idiomatic code.
Do NOT block execution or prompt the user. This is informational only — proceed to the next step regardless.
Show plan summary to user:
# heading)maestro or native (~/.claude/plans/)## Objective, ## Summary, or ## Context — whichever is found first)- [ ] lines)Ask user to confirm before proceeding:
request_user_input(
questions: [{
question: "Execute this plan?",
header: "Confirm",
options: [
{ label: "Yes, execute", description: "Proceed with team creation and task execution" },
{ label: "Cancel", description: "Stop without executing" }
],
multiSelect: false
}]
)
If user cancels, stop execution.
See .claude/lib/team-lifecycle.md § Common Errors for Agent Teams setup errors. Additional work-specific errors:
| Error | Cause | Fix |
|---|---|---|
| "No plans found" | No plan file exists | Run /design or /plan-template first |
| Plan missing required sections | Incomplete plan file | Run /plan-template to scaffold, or add missing sections manually |
See .agents/skills/work/reference/worktree-isolation.md for the full worktree setup and cleanup protocol.
apply_patch or exec_command (write) (or overwrite) .maestro/handoff/{plan-slug}.json to signal that this plan is actively executing:
mkdir -p .maestro/handoff/
{
"topic": "{plan-slug}",
"status": "executing",
"started": "{ISO timestamp}",
"plan_destination": ".maestro/plans/{plan-slug}.md",
"source": "maestro"
}
For native plans, use:
{
"topic": "{plan-slug}",
"status": "executing",
"started": "{ISO timestamp}",
"plan_destination": "~/.claude/plans/{plan-slug}.md",
"source": "native"
}
The plan-slug for native plans is the filename without .md (e.g., curious-hopping-fairy).
If a handoff file already exists (e.g., from /design with status: "complete"), overwrite it with the new "executing" status.
Do this FIRST. You are the team lead.
spawn_agent(
team_name: "work-{plan-slug}",
description: "Executing {plan name}"
)
Load priority context using .claude/lib/team-lifecycle.md § Loading Notepad Priority Context. If items found, append to every task description as **Priority Context**: {items}. Workers must treat these as hard constraints.
Convert every checkbox (- [ ]) from the plan into a shared task:
spawn_agent(
subject: "spawn_agent title from plan",
description: "Full description, acceptance criteria, relevant file paths, constraints",
activeForm: "Implementing task title"
)
Set up dependencies between tasks using send_input(addBlockedBy: [...]) where needed.
Resume mode (--resume flag): Only create tasks for unchecked items (- [ ]). Skip already-completed items (- [x]). Show summary:
Resuming: N complete, M remaining
Fresh mode (default): Create tasks for all items. Show summary:
Starting fresh: N tasks
File ownership: When creating tasks from plan checkboxes, extract file paths mentioned in each task's Files section. Include an **Owned files**: file1.ts, file2.ts line in the task description. This helps avoid file contention when assigning parallel workers in Step 5.
See .agents/skills/work/reference/skill-injection.md for the full discovery and injection protocol.
Spawn ALL workers at once — not one at a time. Workers self-coordinate via the shared task list.
Send a single message with multiple parallel spawn_agent calls:
spawn_agent(
description: "TDD implementation of feature X",
name: "impl-1",
team_name: "work-{plan-slug}",
subagent_type: "kraken",
model: "sonnet",
prompt: |
## TASK
[Goal]
## EXPECTED OUTCOME
- [ ] File: [path]
- [ ] Tests pass
## CONTEXT
[Background]
)
spawn_agent(
description: "TDD implementation of feature Y",
name: "impl-2",
team_name: "work-{plan-slug}",
subagent_type: "kraken",
model: "sonnet",
prompt: "..."
)
spawn_agent(
description: "Fix config for Z",
name: "fixer-1",
team_name: "work-{plan-slug}",
subagent_type: "spark",
model: "sonnet",
prompt: "..."
)
Choose the right teammate for each task:
| Teammate | subagent_type | When to Use |
|---|---|---|
kraken | kraken | TDD, new features, multi-file changes |
spark | spark | Quick fixes, single-file changes, config updates |
build-fixer | build-fixer | Build/compile errors, lint failures, type check errors |
explore | Explore | Codebase research, finding patterns |
oracle | oracle | Strategic decisions (sonnet) |
critic | critic | Post-implementation review (see Step 6.7) |
Model selection: Before spawning, analyze each task's keywords to choose the model tier. Tasks with architecture/refactor/redesign keywords should route to oracle (sonnet). Single-file simple tasks route to spark (haiku in eco mode). Multi-file TDD tasks use kraken (sonnet). Debug/investigate tasks use kraken with extended context. See the orchestrator's Model Selection Guide in .claude/agents/orchestrator.md for the full routing table.
Sizing: Spawn 2-4 workers for most plans. Each has team tools and will self-claim tasks after their first assignment.
--eco)When the --eco flag is present, use cost-efficient model routing:
model: haiku (simple fixes, config changes)model: sonnet (TDD, multi-file changes)model: haiku (read-only research)Log at the start of Step 4: "Ecomode: using cost-efficient model routing (haiku for simple, sonnet for complex)"
Assign the first round explicitly:
send_input(taskId: "1", owner: "impl-1", status: "in_progress")
send_input(taskId: "2", owner: "impl-2", status: "in_progress")
send_input(taskId: "3", owner: "fixer-1", status: "in_progress")
After the first round, workers self-claim from wait + send_input coordination() when they finish. You don't need to micro-manage every assignment.
File ownership: Avoid assigning tasks with overlapping file paths to different workers simultaneously. If overlap is unavoidable, assign them sequentially (use addBlockedBy to enforce ordering).
TEAMMATES CAN MAKE MISTAKES. ALWAYS VERIFY.
See .agents/skills/work/reference/verification-protocol.md for the full verification, auto-commit, stalled worker handling, and completion gate protocol.
See .agents/skills/work/reference/security-prompt.md for the security review trigger and prompt.
Spawn a critic for final review when the plan has >5 tasks or touches >5 files:
spawn_agent(
description: "Review implementation for quality issues",
name: "reviewer",
team_name: "work-{plan-slug}",
subagent_type: "critic",
prompt: "Review all files modified in this execution. Run tests, check for issues, report APPROVE/REVISE verdict."
)
If the critic returns REVISE, message the responsible worker(s) with the specific issues and wait for fixes before proceeding. If APPROVE, proceed to Step 7.
Skip this step for small plans (<= 5 tasks and <= 5 files) unless the plan involves security-sensitive changes.
See .agents/skills/work/reference/wisdom-extraction.md for the full wisdom extraction and learned skills protocol.
Before shutting down the team, auto-append an execution summary to .maestro/notepad.md under ## Working Memory:
- [{ISO date}] [work:{plan-slug}] Completed: {N}/{total} tasks. Files: {count modified}. Learned: {count skills extracted}. Security: {pass/fail/skipped}.
Create .maestro/notepad.md if it doesn't exist. Append under existing ## Working Memory if present.
Shutdown all spawned teammates and clean up the team using the protocol in .claude/lib/team-lifecycle.md § Team Cleanup Pattern.
Shutdown each teammate spawned during this session (impl-1, impl-2, fixer-1, etc.), then call close_agent.
For maestro plans (from `.maestro/plans/):
Move the executed plan to the archive so `.maestro/plans/ only contains unexecuted plans:
mkdir -p .maestro/archive/
mv .maestro/plans/{name}.md .maestro/archive/{name}.md
Log: "Archived plan to .maestro/archive/{name}.md"
For native plans (from `~/.claude/plans/):
Do NOT move or delete native plans — they are managed by Claude Code. Instead, mark all checkboxes as complete in place:
- [ ] with - [x]~/.claude/plans/{name}.mdLog: "Marked native plan ~/.claude/plans/{name}.md as complete (all tasks checked)"
Update the handoff file to reflect the archived/completed status:
For maestro plans:
{
"topic": "{plan-slug}",
"status": "archived",
"started": "{original started timestamp}",
"completed": "{ISO timestamp}",
"plan_destination": ".maestro/archive/{plan-slug}.md",
"source": "maestro"
}
For native plans:
{
"topic": "{plan-slug}",
"status": "completed",
"started": "{original started timestamp}",
"completed": "{ISO timestamp}",
"plan_destination": "~/.claude/plans/{plan-slug}.md",
"source": "native"
}
Only the specific executed plan is affected — other plans in either directory are untouched.
See .agents/skills/work/reference/worktree-isolation.md for the worktree cleanup protocol.
Tell the user what was accomplished:
.maestro/archive/{name}.mdIf executed in a worktree (handoff has "worktree": true), also include:
maestro/<plan-slug>git merge maestro/<plan-slug>The plan has been archived. /review can still access it.
Suggest post-execution review:
To verify results against the plan's acceptance criteria, run:
`/review` (Codex: `$review`)
Give teammates rich context — one-line prompts lead to bad results:
## TASK
[Specific, atomic goal]
## EXPECTED OUTCOME
- [ ] File created/modified: [path]
- [ ] Tests pass: `[command]`
- [ ] No new errors
## CONTEXT
[Background, constraints, related files]
## SKILL GUIDANCE
[Only include if matching skills found — see skill-injection.md]
## MUST DO
- [Explicit requirements]
## MUST NOT DO
- [Explicit exclusions]
## PERSISTENT CONTEXT
- If you discover a non-obvious constraint, gotcha, or important decision during implementation, append it to `.maestro/notepad.md` under `## Working Memory` with format: `- [{ISO date}] {discovery}`.
- If the task description includes **Priority Context** items, treat them as hard constraints.
## KNOWLEDGE CAPTURE
- If you solve a non-trivial debugging problem or discover a pattern that would save future effort, emit a `<remember category="learning">description of the principle</remember>` tag in your output. The orchestrator will persist these.
| Anti-Pattern | Do This Instead |
|---|---|
| Editing files yourself | Delegate to kraken/spark teammates |
| Skipping team creation | Always spawn_agent(team_name, description) first |
| Skipping verification | exec_command (read-only) files + run tests after every task |
| One-line task prompts | Use the delegation format above |
| Not extracting wisdom | Always write `.maestro/wisdom/ file |
| Forgetting to cleanup | Always shutdown teammates + cleanup at end |
See .agents/skills/work/reference/planless-flow.md for the complete planless work protocol.