Loading...
Loading...
Compare original and translation side by side
ultrathink-orchestratorultrathink-orchestratorUser 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 → [announce-depth-limited banner]
↓
[execute-single-fallback-blocked]
↓
[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]AMPLIHACK_TREE_IDAMPLIHACK_SESSION_DEPTHAMPLIHACK_MAX_DEPTH/tmp/amplihack-session-trees/{tree_id}.json用户请求
│
▼
[分类] ──→ 问答 ──────────────────→ 分析agent(技术/代码问题)
│
├──────→ 操作 ────────────────────→ 构建agent
│
└──→ 开发 / 调研
│
[递归防护](AMPLIHACK_SESSION_DEPTH 与 AMPLIHACK_MAX_DEPTH=3)
│ │
允许 拦截 → [输出深度受限提示横幅]
↓
[执行单会话回退流程]
↓
[执行第一轮(单会话)]
│
[任务分解]
│ │
1个工作流 N个工作流 ──→ [多任务并行] + 环境中的树状上下文
│
[执行第一轮]
│
[复盘] ──→ 已达成 ──→ [总结]
│
部分达成/未达成
│
[执行第二轮]
│
[复盘] ──→ 已达成 ──→ [总结]
│
部分达成/未达成
│
[执行第三轮(最终轮)]
│
[最终复盘 + 总结]AMPLIHACK_TREE_IDAMPLIHACK_SESSION_DEPTHAMPLIHACK_MAX_DEPTH/tmp/amplihack-session-trees/{tree_id}.jsonUserPromptSubmitSkill(skill="dev-orchestrator")UserPromptSubmitSkill(skill="dev-orchestrator")run_recipe_by_name("smart-orchestrator")report_intentrun_recipe_by_name("smart-orchestrator")report_intentreport_intentrun_in_backgroundLOG_FILE=$(mktemp /tmp/recipe-runner-output.XXXXXX.log)
chmod 600 "$LOG_FILE"
tmux new-session -d -s recipe-runner "env -u CLAUDECODE PYTHONPATH=src python3 -c \"
import os
os.environ.pop('CLAUDECODE', None)
from amplihack.recipes import run_recipe_by_name
result = run_recipe_by_name(
'smart-orchestrator',
user_context={
'task_description': '''TASK_DESCRIPTION_HERE''',
'repo_path': '.',
},
progress=True,
)
print(f'Recipe result: {result}')
\" 2>&1 | tee \"$LOG_FILE\""
echo \"Recipe runner log: $LOG_FILE\"env -u CLAUDECODEPYTHONPATH=src python3.venv/bin/pythonrun_recipe_by_nameprogress=Truechmod 600 "$LOG_FILE"tmux new-session -dtail -f "$LOG_FILE"tmux attach -t recipe-runnertmux kill-sessionundefinedreport_intentrun_in_backgroundLOG_FILE=$(mktemp /tmp/recipe-runner-output.XXXXXX.log)
chmod 600 "$LOG_FILE"
tmux new-session -d -s recipe-runner "env -u CLAUDECODE PYTHONPATH=src python3 -c \"
import os
os.environ.pop('CLAUDECODE', None)
from amplihack.recipes import run_recipe_by_name
result = run_recipe_by_name(
'smart-orchestrator',
user_context={
'task_description': '''TASK_DESCRIPTION_HERE''',
'repo_path': '.',
},
progress=True,
)
print(f'Recipe result: {result}')
\" 2>&1 | tee \"$LOG_FILE\""
echo \"Recipe runner log: $LOG_FILE\"env -u CLAUDECODEPYTHONPATH=src python3.venv/bin/pythonrun_recipe_by_nameprogress=Truechmod 600 "$LOG_FILE"tmux new-session -dtail -f "$LOG_FILE"tmux attach -t recipe-runnertmux kill-sessionundefined
If using Option A, update the `tail -f` / `tmux attach` commands to use the
same session name.
**DO NOT use `run_in_background`** for recipe execution — it will be killed
after ~10 minutes (Issue #2909).
**The recipe runner is the required execution path for Development and
Investigation tasks.** Always try `smart-orchestrator` first.
**Common rationalizations that are NOT acceptable:**
- "Let me first understand the codebase" — the recipe does that in Step 0
- "I'll follow the workflow steps manually" — NO, the recipe enforces them
- "The recipe runner might not work" — try it first, report errors if it fails
- "This is a simple task" — simple or complex, the recipe runner handles both
**Q&A and Operations only** may bypass the recipe runner:
- Q&A: Respond directly (analyzer agent)
- Operations: Builder agent (direct execution, no workflow steps)
如果使用方案A,请更新`tail -f` / `tmux attach`命令以使用相同的会话名称。
**请勿使用`run_in_background`执行recipe** — 它会在约10分钟后被终止(问题#2909)。
**recipe runner是开发与调研任务的强制执行路径。** 请始终首先尝试`smart-orchestrator`。
**以下理由均不被接受:**
- “我先了解一下代码库” — recipe会在第0步完成这一操作
- “我手动跟着工作流步骤做” — 不行,recipe会强制执行这些步骤
- “recipe runner可能无法工作” — 先尝试运行,若失败再报告错误
- “这个任务很简单” — 无论简单或复杂,recipe runner都能处理
**仅问答和操作类任务**可以绕过recipe runner:
- 问答:直接回复(使用analyzer agent)
- 操作:使用builder agent(直接执行,无需工作流步骤)smart-orchestratorgh issue create \
--title "smart-orchestrator infrastructure failure: <one-line summary>" \
--body "<full error context, reproduction command, env details>" \
--label "bug"smart-orchestrator| Classification | Direct Recipe | When Permitted |
|---|---|---|
| Investigation | | smart-orchestrator failed at parse/decompose/launch |
| Development | | smart-orchestrator failed at parse/decompose/launch |
undefinedsmart-orchestratorgh issue create \
--title "smart-orchestrator infrastructure failure: <one-line summary>" \
--body "<full error context, reproduction command, env details>" \
--label "bug"smart-orchestrator| 分类 | 直接调用的Recipe | 允许场景 |
|---|---|---|
| 调研 | | smart-orchestrator在解析/分解/启动阶段失败 |
| 开发 | | smart-orchestrator在解析/分解/启动阶段失败 |
undefined
**This is NOT a license to bypass smart-orchestrator.** Always try it first.
Direct invocation is only permitted when smart-orchestrator fails at the
infrastructure level. "The task seems simple" is NOT an infrastructure failure.
**4. Detect hollow success:**
A recipe can complete structurally (all steps exit 0) but produce empty or
meaningless results — agents reporting "no codebase found" or reflection
marking ACHIEVED when no work was done. After execution, check that:
- Round results contain actual findings or code changes (not "I could not access...")
- PR URLs or concrete outputs are present for Development tasks
- At least one success criterion was verifiably evaluated
If results are hollow, report this to the user with the specific empty outputs.
Do not declare success when agents produced no meaningful work.
**这并非允许你绕过smart-orchestrator。** 请始终首先尝试它。只有当smart-orchestrator在基础设施层面失败时,才允许直接调用。“任务看起来很简单”不属于基础设施故障。
**4. 检测虚假成功:**
recipe可能在结构上完成(所有步骤以0状态退出),但生成空或无意义的结果 — 例如agent报告“未找到代码库”,或在未完成任何工作的情况下复盘标记为“已达成”。执行完成后,请检查:
- 各轮次结果包含实际发现或代码变更(而非“我无法访问...”)
- 开发任务包含PR链接或具体输出
- 至少有一项成功标准经过可验证的评估
如果结果虚假,请向用户报告具体的空输出内容。当agent未产生任何有意义的工作时,绝不能宣称任务成功。| Variable | Purpose | Default |
|---|---|---|
| Root of amplihack installation (for asset lookup) | Auto-detected |
| Which agent binary to use (claude, copilot, etc.) | |
| Max recursion depth for nested sessions | |
| Set to | Unset |
AMPLIHACK_HOMEparse-decompositionactivate-workflowamplifier-bundle/| 环境变量 | 用途 | 默认值 |
|---|---|---|
| amplihack安装根目录(用于查找资源) | 自动检测 |
| 使用的agent二进制文件(claude、copilot等) | |
| 嵌套会话的最大递归深度 | |
| 设置为 | 未设置 |
AMPLIHACK_HOMEparse-decompositionactivate-workflowamplifier-bundle/workflow_enforcement_hook.py/devdev-orchestrator/tmp/amplihack-workflow-state/workflow_enforcement_hook.py/devdev-orchestrator/tmp/amplihack-workflow-state/| 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" | smart-orchestrator |
| Hybrid* | Both investigation + development keywords | Decomposed into investigation + dev workstreams |
| 类型 | 关键词 | 操作 |
|---|---|---|
| 问答 | "what is"、"explain"、"how does"、"how do I"、"quick question" | 直接回复 |
| 操作 | "clean up"、"delete"、"git status"、"run command" | 使用builder agent(直接执行,无需工作流步骤) |
| 调研 | "investigate"、"analyze"、"understand"、"explore" | 使用investigation-workflow |
| 开发 | "implement"、"build"、"create"、"add"、"fix"、"refactor" | 使用smart-orchestrator |
| 混合* | 同时包含调研与开发类关键词 | 分解为调研+开发工作流 |
| 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) |
| 请求内容 | 工作流 |
|---|---|
| "implement JWT auth" | 1个:认证(使用default-workflow) |
| "build a webui and an api" | 2个:api + webui(并行) |
| "add logging and add metrics" | 2个:日志 + 指标(并行) |
| "investigate auth system then add OAuth" | 2个:调研 + 实现(串行) |
| "fix bug in payment flow" | 1个:bug修复(使用default-workflow) |
force_single_workstream: "true"/devrun_recipe_by_name(
"smart-orchestrator",
user_context={
"task_description": task,
"repo_path": ".",
"force_single_workstream": "true", # disables parallel decomposition
}
)AMPLIHACK_MAX_DEPTH=0/devexport AMPLIHACK_MAX_DEPTH=0 # set in your shell first
/dev build a webui and an api # then type in Claude Code/devforce_single_workstream: "true"/devrun_recipe_by_name(
"smart-orchestrator",
user_context={
"task_description": task,
"repo_path": ".",
"force_single_workstream": "true", # 禁用并行分解
}
)/devAMPLIHACK_MAX_DEPTH=0export AMPLIHACK_MAX_DEPTH=0 # 先在shell中设置
/dev build a webui and an api # 然后在Claude Code中输入/devamplifier-bundle/recipes/smart-orchestrator.yaml.claude/skills/multitask/orchestrator.pyamplifier-bundle/recipes/default-workflow.yamlamplifier-bundle/recipes/investigation-workflow.yamlamplifier-bundle/recipes/smart-orchestrator.yaml.claude/skills/multitask/orchestrator.pyamplifier-bundle/recipes/default-workflow.yamlamplifier-bundle/recipes/investigation-workflow.yaml| Skill | Relationship |
|---|---|
| Deprecated — redirects here |
| Called by this orchestrator for single dev tasks |
| Called by this orchestrator for research tasks |
| Called by this orchestrator for parallel workstreams |
| Orthogonal — for backlog-driven delegation |
| 技能名称 | 关系描述 |
|---|---|
| 已废弃 — 重定向至本技能 |
| 被本编排器用于单个开发任务 |
| 被本编排器用于调研任务 |
| 被本编排器用于并行工作流 |
| 正交关系 — 用于基于待办事项的任务分配 |
/dev <task description>/ultrathink <task>/dev/dev <任务描述>/ultrathink <任务>/devSTATUS: COMPLETESTATUS: CONTINUESTATUS: PARTIALSTATUS: DEPTH_LIMITEDSTATUS: COMPLETESTATUS: CONTINUESTATUS: PARTIALSTATUS: DEPTH_LIMITEDGOAL_STATUS: ACHIEVEDGOAL_STATUS: PARTIAL -- [description]GOAL_STATUS: NOT_ACHIEVED -- [reason]announce-depth-limitedexecute-single-fallback-blockedGOAL_STATUS: ACHIEVEDGOAL_STATUS: PARTIAL -- [description]GOAL_STATUS: NOT_ACHIEVED -- [reason]announce-depth-limitedexecute-single-fallback-blocked