/amplihack:dev-orchestratorfrom amplihack
Default task orchestrator that classifies development and investigation requests, decomposes into parallel workstreams, and routes execution through recipe runner with multi-round reflection and adaptive error recovery.
Ships in amplihack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
flowchart TD
A[User Request] --> B{Classify Task}
B -->|Q&A| C[analyzer agent]
B -->|Operations| D[builder agent]
B -->|Development| E{Recursion Guard}
B -->|Investigation| E
E -->|BLOCKED| F[derive-recursion-guard emits BLOCKED:*]
F --> G["execute-single-fallback-blocked-{development,investigation}"]
G --> R1_BLOCKED[Round 1 result]
E -->|ALLOWED| H{Decompose Workstreams}
H -->|"1 workstream<br/>(default-workflow or investigation-workflow)"| I[Execute recipe]
H -->|N workstreams| J[multitask parallel]
I --> R1[Round 1 result]
J --> R1
R1_BLOCKED --> REFLECT
R1 --> REFLECT{Reflect on Round 1}
REFLECT -->|ACHIEVED| SUM[Summarize]
REFLECT -->|PARTIAL / NOT_ACHIEVED| K[Execute Round 2]
K --> REFLECT2{Reflect on Round 2}
REFLECT2 -->|ACHIEVED| SUM
REFLECT2 -->|PARTIAL / NOT_ACHIEVED| L[Execute Round 3 - final]
L --> REFLECT_FINAL[Final Reflect]
REFLECT_FINAL --> VAL{Outside-In Testing Validation}
REFLECT --> VAL
VAL --> SUM
SUM --> DONE[Complete Session + Cleanup]
%% Adaptive error recovery path
R1 -.->|empty result| DET[detect-execution-gap]
DET --> FILE_BUG[file-routing-bug]
FILE_BUG --> ADAPT{Adaptive Recipe}
ADAPT -->|Investigation| INV_RECIPE[investigation-workflow]
ADAPT -->|Development| DEV_RECIPE[default-workflow]
INV_RECIPE --> REFLECT
DEV_RECIPE --> REFLECT
C --> DONE
D --> DONE
This is the default orchestrator for all non-trivial development and investigation tasks in amplihack.
Development classification routes to default-workflow, or to quick-change for a small change in a single workstream or when -c workflow=quick-change forces it; any recipe value the model gives a workstream is coerced to default-workflow.
The classifier selects quick-change only for a single workstream it judges small; -c workflow=quick-change or -c workflow=default-workflow forces either recipe. In a parallel decomposition every Development workstream runs default-workflow unless -c workflow= forces a recipe, so the workflow named in the run log is the one the workstreams run.
Hybrid decompositions route each workstream by its own normalized classification.
This invariant is enforced by the Rust orchestration helper before workstream execution. Prompt instructions guide the model, but model-emitted recipe values are not trusted for Development workstreams.
When a user asks you to build, implement, fix, investigate, or create anything non-trivial, this skill ensures:
User request
│
▼
[Classify] ──→ Q&A ──────────────────→ analyzer agent (technical/code questions)
│
├──────→ Ops ────────────────────→ builder agent
│
└──→ Development / Investigation
│
[Recursion guard] (AMPLIHACK_SESSION_DEPTH vs AMPLIHACK_MAX_DEPTH=3)
│ │
ALLOWED BLOCKED → [derive-recursion-guard prints BLOCKED:* to stderr]
↓
[execute-single-fallback-blocked-development]
[execute-single-fallback-blocked-investigation]
↓
[Execute round 1 (single-session)]
│
[Decompose]
│ │
1 ws N ws ──→ [multitask parallel] + tree context in env
│
[Execute round 1]
│
[Reflect] ──→ ACHIEVED ──→ [Summarize]
│
PARTIAL/NOT_ACHIEVED
│
[Execute round 2]
│
[Reflect] ──→ ACHIEVED ──→ [Summarize]
│
PARTIAL/NOT_ACHIEVED
│
[Execute round 3 (final)]
│
[Final reflect + Summarize]
Session tree enforcement (prevents infinite recursion):
AMPLIHACK_TREE_ID, AMPLIHACK_SESSION_DEPTH, AMPLIHACK_MAX_DEPTH/tmp/amplihack-session-trees/{tree_id}.jsonThis skill auto-activates for development and investigation keywords. It is also the default behavior per CLAUDE.md — invoke it for any non-trivial task.
The UserPromptSubmit hook reinforces this by injecting a classification prompt
that instructs Claude to invoke Skill(skill="dev-orchestrator") for dev/investigation tasks.
YOUR NEXT ACTION after reading this skill MUST include a Bash tool call that
executes the recipe runner. If your runtime requires a report_intent call
(e.g. Copilot CLI), emit it in parallel with the Bash launch — both tool
calls in the same response. The constraint is that no
other substantive action (reading files, calling TodoWrite, invoking Agent,
or typing a response) may precede or replace the Bash launch.
If you find yourself doing anything else instead of launching the recipe runner, you are bypassing the workflow. Stop. Go back. Run the recipe runner.
Development and Investigation tasks have exactly ONE execution path: the recipe runner. There is no "Option B." There is no "I'll follow the steps manually." There is no "Let me just quickly..." The recipe runner IS the workflow. Skipping it means skipping the 23-step process, the recursion guards, the goal verification, and the quality gates that exist for a reason.
A PostToolUse hook monitors every tool call after this skill activates. If it detects 3 tool calls without recipe runner evidence, it will fire a hard WARNING. Do not wait for the warning — run the recipe runner immediately.
When this skill is activated:
Your next tool call(s) must include the recipe runner launch (alongside
report_intent if your runtime requires it).
Use the Rust recipe-runner-rs through the amplihack recipe run CLI:
cd /path/to/repo && AMPLIHACK_HOME=/path/to/amplihack \
amplihack recipe run amplifier-bundle/recipes/smart-orchestrator.yaml \
-c task_description="TASK_DESCRIPTION_HERE" \
-c repo_path="." \
--verbose
Key points:
amplihack recipe run — invokes Rust recipe-runner-rs; no Python runner or wrapper needed-c key=value — passes context variables (equivalent to user_context dict)--verbose — streams recipe-runner stderr live so you see nested step activityenv -u CLAUDECODE — amplihack recipe run reads it to decide which
agent CLI the steps use, then removes it from the runner's environment itself.
Stripping it first can make every step run under a different CLI (issue #1481).
Set AMPLIHACK_AGENT_BINARY only to choose a different CLI on purpose.This is the preferred execution mode for most scenarios. It is simpler, has no external dependencies beyond the Rust binary, works on all platforms, and makes output capture straightforward.
Save the shared settings once, then start each long run with --detach. It
creates its own tmux session and private log, hands the agent CLI over itself,
prints the session and log path, and returns:
amplihack config set agent.binary claude # once: the agent CLI you use
amplihack config set recipe.verbose true # once
amplihack recipe run smart-orchestrator --detach -w /path/to/repo \
--context-from-file task_description=/path/to/task.md -c repo_path=.
Stop it, with every agent it started, with amplihack recipe stop <session>.
Do not hand-write the tmux command for a recipe run.
For details of detached runs, environment variables, error recovery strategies, fallback recipes, and enforcement, see reference.md.
| Type | Keywords | Action |
|---|---|---|
| Q&A | "what is", "explain", "how does", "how do I", "quick question" | Respond directly |
| Operations | "clean up", "delete", "git status", "run command" | builder agent (direct execution, no workflow steps) |
| Investigation | "investigate", "analyze", "understand", "explore" | investigation-workflow |
| Development | "implement", "build", "create", "add", "fix", "refactor" | default-workflow through smart-orchestrator |
| Hybrid* | Both investigation + development keywords | Decomposed into investigation + dev workstreams |
* Hybrid is not a distinct task_type — the orchestrator classifies as Development and decomposes into multiple workstreams (one investigation, one development).
| Request | Workstreams |
|---|---|
| "implement JWT auth" | 1: auth (default-workflow) |
| "build a webui and an api" | 2: api + webui (parallel) |
| "add logging and add metrics" | 2: logging + metrics (parallel) |
| "investigate auth system then add OAuth" | 2: investigate + implement (sequential) |
| "fix bug in payment flow" | 1: bugfix (default-workflow) |
Single workstream override: Pass force_single_workstream: "true" in the
recipe user_context to prevent automatic parallel decomposition regardless of
task structure. This is a programmatic option (not directly settable from /dev):
amplihack recipe run amplifier-bundle/recipes/smart-orchestrator.yaml \
-c task_description="TASK_DESCRIPTION_HERE" \
-c repo_path="." \
-c force_single_workstream="true"
To force single-workstream execution without modifying recipe context:
Set AMPLIHACK_MAX_DEPTH=0 before running /dev. This causes the recursion guard
to block parallel spawning and fall back to single-session mode for all tasks:
export AMPLIHACK_MAX_DEPTH=0 # set in your shell first
/dev build a webui and an api # then invoke /dev in your agent session
Note: The env var must be set in your shell before starting the agent session — it
cannot be prefixed inline on the /dev command. This affects all depth checks, not
just parallel workstream spawning.
amplifier-bundle/recipes/smart-orchestrator.yamlamplihack orch / amplihack multitask commandsamplifier-bundle/recipes/default-workflow.yamlamplifier-bundle/recipes/investigation-workflow.yaml| Skill | Relationship |
|---|---|
default-workflow | Called by this orchestrator for single dev tasks |
investigation-workflow | Called by this orchestrator for research tasks |
multitask | Called by this orchestrator for parallel workstreams |
pm-architect | Orthogonal — for backlog-driven delegation |
/dev <task description>/ultrathink <task> (deprecated alias → redirects to /dev)The orchestrator uses two status signal formats:
Appears at the end of round execution steps:
STATUS: COMPLETE — the round's work is fully doneSTATUS: CONTINUE — more work remains after this roundSTATUS: PARTIAL — the final round (round 3) reached partial completionSTATUS: DEPTH_LIMITED — (legacy, no longer emitted; use BLOCKED path instead)Appears at the end of reflection steps:
GOAL_STATUS: ACHIEVED — all success criteria met, task is doneGOAL_STATUS: PARTIAL -- [description] — some criteria met, more work neededGOAL_STATUS: NOT_ACHIEVED -- [reason] — goal not met, another round neededThe goal-seeking loop uses GOAL_STATUS signals to decide whether to run round 2 or 3.
BLOCKED path (recursion guard): When multi-workstream spawning is blocked by the depth limit, the orchestrator adapts to single-session execution:
derive-recursion-guard — classifies the guard result and prints the
reason to stderr (BLOCKED:registration_failed, BLOCKED:unknown). There
is no separate announcement step; the classification is the announcement.execute-single-fallback-blocked-development or
execute-single-fallback-blocked-investigation — executes the full task as
a single builder agent session. The step chosen depends on the workstream's
classification, which is why there are two.Both live in amplifier-bundle/recipes/smart-execute-routing.yaml.
Note the scope of this path: it handles a run that is already executing and
is refused when it tries to descend further. It does not apply when
amplihack recipe run is itself invoked at the ceiling — there the guard
refuses before any recipe starts, and the correct response is to complete the
work inline rather than to launch a recipe (the refusal message says so).
A leftover AMPLIHACK_SESSION_DEPTH in a surviving shell does not wedge
you: an inherited depth that nothing corroborates — no tree id, no live
orchestrator ancestor — is discarded and the run starts a fresh tree at depth 0
(issue #1326).
What SKILL.md sets; muted values are Claude Code's defaults
30 skills in this plugin
/agentic-workflow-firstStart new work as a deterministic workflow of agentic steps, prompts, and tools instead of code. Use when designing a feature, deciding how to build something, choosing code vs recipe, or asking "how should I structure this"./amplihack-expertComprehensive knowledge of amplihack framework architecture, patterns, and usage/code-atlasBuilds comprehensive, living code-atlases as multi-layer architecture documents derived from
code-first truth. Defaults to both Graphviz DOT and Mermaid. User can override to single format.
Language-agnostic (Go, TypeScript, Python, .NET, Rust, Java). Files issues with
'code-atlas-bughunt' label. Treats atlas-building as a multi-agent bug-hunting journey:
graph-form reasoning exposes structural bugs, route/DTO mismatches, orphaned env vars,
dead code paths, and stale documentation that linear review misses. Three-pass bug hunt
with per-journey PASS/FAIL/NEEDS_ATTENTION verdicts.
Use when: creating architecture documentation, investigating unfamiliar codebases,
hunting structural bugs, setting up CI/CD diagram refresh, or publishing to GitHub Pages/mkdocs.
/code-philosophyMulti-pass code philosophy audit skill. Performs three distinct passes
over target code to verify adherence to the project's PHILOSOPHY.md
principles. Produces a structured report with findings and delegates
fixes to dev-orchestrator. This is an advisory audit-only skill — it
does not modify code directly.
/crusty-old-engineerCurmudgeonly engineering advisor that provides grounded skepticism, evidence-linked judgment,
and constructive progress on architectural decisions, legacy refactors, tooling choices, and
broad "how should I start?" questions. Sounds like a senior systems engineer who has reviewed
too many designs to be impressed, but still cares about correctness.
Use when: architectural decisions, legacy replacements, new tooling evaluation, broad planning questions.
/default-workflowDevelopment workflow for features, bugs, refactoring. Normally executed as a
sub-recipe by dev-orchestrator/smart-orchestrator. Supports direct invocation
via recipe runner for standalone use.
npx claudepluginhub rysweet/amplihack-rs --plugin amplihackOther plugins' skills for the same job