用编排插件约束主代理委派行为的机制
该插件为 Claude 会话设定主代理与工作代理的分工规则,通过核心配置、单独作业守卫和命名门控三类机制,限制主代理自行编辑文件并推动其把任务交给具名工作代理,同时支持在额度耗尽后切换主代理模型。
# 有线电视机 [](https://github.com/Rylaa/fable5.2-opus5.5-orchestrator/actions/workflows/ci.yml) **整天运行Claude Fable 5.2——不看用量表.** Fable 5.2 是克劳德代码会话中最好的椅子,也是最昂贵的。这个插件将它保存在规划和决定上,并将作品发送给了有名的工人:音量到 **声网 5.5**,硬片(建筑、不可逆转的迁移、安全审查)直接到 **Opus 5.5 存档副本**。从不向上移动 `high` 努力起来。 ## 分工 ``` ┌─────────────────────────────────┐ │ FABLE 5.2 — chair │ │ plan · arbitrate · decide │ │ sizes tier + effort per task │ └────────────────┬────────────────┘ │ specs down │ briefs up │ ┌────────────────────────┬────┴───────────────────┬────────────────────────┐ ▼ ▼ ▼ ▼ ┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐ │SONNET 5.5 · low–med │ │SONNET 5.5 · med–high│ │SONNET 5.5 · med–high│ │ OPUS 5.5 · high │ │ mechanical bulk │ │ implementation │ │ routine judgment │ │ hard work · direct │ │ grep·fetch·scan │ │ code · tests │ │ briefs · review │ │ architecture │ │ format · read │ │ debug · refactor │ │ filtering │ │ migrations·security│ └─────────────────────┘ └─────────────────────┘ └──────────┬──────────┘ └──────────┬──────────┘ │ uncertain / │ beyond │ high stakes │ opus ┌──▼────────────────────────▼──┐ │ escalation · one way only │ │ OPUS 5.5 → FABLE 5.2 → stop │ └──────────────────────────────┘ ``` - **升座是单向的.** 何时 `high` 不够,工作会向上移动,而不是努力。 索内的“不确定”是去奥普斯的,再也不会回到椅子上。 - **已减少的任务未改变** 如果这层也掉下来,椅子就停下来告诉你。 ## 插件会做什么 **1 ——主席简介.** 每个会话都以 ~ 3.7k - char 核心开始: 默认代表, 手递通过 `./.workflow/scratch/`,将工人的名字,设置 `model` 和每个产卵的努力。 `orchestrator:playbook` ,在第一个代表团之前加载。工人报告在 40 线上封顶;更长的材料转到磁盘上。 **2 ——独奏警卫.** 椅子的自带 `Edit` / `Write` / `MultiEdit` / `NotebookEdit` 电话被计算在内。没有生产工人的会话中,第3个会话被否认一次,然后警卫就保持安静。一个生产工人解除了它。叉子不会算作工人。 **3 — 命名门.** 第一个带有1500 + char 提示的未命名产卵被拒绝一次。 命名的工人用您可以观看的 tmux 面板运行; 未命名的在返回之前是隐形的 。 **4 – 瞬间提醒 。** 一条线搭乘每一个提示: *你是CHAIR 默认代表* 工人(队友)得不到这些——规则是给椅子的,当一个会场结束时,队友的纸板就会被杀死. ## 两把椅子 寓言为主。当其限制用完时,将椅子移到 Opus —— Opus 剖面图保留了相同的规则,寓言级休息: ``` claude --continue --model opus ``` 不使用( E) `/model` 用于此: 钩子是隐形的, 因此会话会保留 Fable profile 。 运行 `/compact` 如果历史久远,请坐新椅子上 ## 安装 ``` /plugin marketplace add Rylaa/fable5.2-opus5.5-orchestrator /plugin install orchestrator@fable-orchestrator ``` 之后重新启动克劳德代码——当CLI开始时会钩载. - 运行椅子在 `/effort medium`, `high` 为最难的计划。 - 建议:设置 `CLAUDE_CODE_SUBAGENT_MODEL=sonnet` 下级 `"env"`所以,一个产卵 忘记 `model` 不运行在Fable。 - 要求 `python3` 3.10 + 和 macOS 或 Linux (钩子使用) `ps` 财务报告和财务报告 `tmux`). 要看球队,开始吧 `claude` Tmux内部; 工人出现在你的窗口中作为窗帘。 < 细节> 手动安装( 没有插件系统) 1. 复制 `scripts/*.py` (除下列情况外) `stats.py`改为: `~/.claude/hooks/`. 2. 合并到 `~/.claude/settings.json`: ```json { "hooks": { "SessionStart": [ { "hooks": [ { "type": "command", "command": "python3 ~/.claude/hooks/inject_instructions.py", "timeout": 10 } ] } ], "UserPromptSubmit": [ { "hooks": [ { "type": "command", "command": "python3 ~/.claude/hooks/remind_chair.py", "timeout": 10 } ] } ], "PreToolUse": [ { "matcher": "^(Agent|Task|Edit|Write|MultiEdit|NotebookEdit)$", "hooks": [ { "type": "command", "command": "python3 ~/.claude/hooks/solo_guard.py", "timeout": 10 } ] } ], "SessionEnd": [ { "hooks": [ { "type": "command", "command": "python3 ~/.claude/hooks/cleanup_session_cache.py", "timeout": 20 } ] } ] } } ``` 3. 附录 `instructions/dynamic-workflow-fable.md` 改为: `~/.claude/CLAUDE.md` 复制游戏本到 `~/.claude/skills/playbook/SKILL.md`. 不要运行插件和手动安装在一起——每个钩子都会发射两次. </详情> ## 配置 可选,在 `~/.claude/settings.json` 下级 `"env"`: ``` ┌───────────────────────────────┬─────────┬────────────────────────────────────────────┐ │ Env var │ Default │ Meaning │ ├───────────────────────────────┼─────────┼────────────────────────────────────────────┤ │ FABLE_ORCH_SOLO_EDITS │ 3 │ deny at the Nth chair edit; 0 disables │ │ FABLE_ORCH_NAME_CHARS │ 1500 │ spawn prompt size that needs a name; 0 off │ │ FABLE_ORCH_SOLO_GUARD │ (on) │ 0 disables the solo gate entirely │ │ FABLE_ORCH_REMIND │ (on) │ 0 disables the per-prompt line │ │ FABLE_ORCH_PROFILE │ auto │ pin the chair profile: auto | fable | opus │ │ FABLE_ORCH_TEAMMATE_INJECT │ (off) │ 1 injects the profile into teammates too │ │ FABLE_ORCH_METRICS │ (on) │ 0 disables local metrics logging │ │ FABLE_ORCH_SWARM_CLEANUP │ (on) │ 0 disables all teammate reaping │ │ FABLE_ORCH_SWARM_MAX_IDLE_H │ 48 │ sweep swarms idle ≥ N hours; 0 disables │ └───────────────────────────────┴─────────┴────────────────────────────────────────────┘ ``` 剖面图从中选择,第一个对决获胜: `FABLE_ORCH_PROFILE`,则 `--model` 标记会话的启动时间, `model` 输入 `settings.json`。任何不是Opus的模型都会得到Fable剖面图。 量度( 仅限活动, 永不及时内容) 。 `~/.claude/fable-orch/metrics.jsonl`; `python3 scripts/stats.py` 打印摘要。 ## 升级到 v0.17.2 - 工作封顶于 `high` 每一级; `xhigh` 财务报告和财务报告 `max` 都不见了。 - 这把椅子是从... `--model` 发射旗。通过重启移动椅子,而不是使用 `/model`. - 每个产卵必须设置 `model`. - Python 3.10 + 是需要的. ## 测试 ``` python3 -m pytest tests/ -q ``` 钩子作为真实的子进程运行. `tests/test_e2e_dry_run.py` 重播整个会话通过 `hooks/hooks.json`克洛德代号运行它。 ## 限制 - **独行警卫数着编辑,不是工作.** 一个写文件的椅子 `Bash` 永远不要去旅行。 - **每场比赛,每个门都开一次火** 椅子可以忽略推力,继续前进. - **`/model` 钩子看不见** 重新发射方式 `--model`,或针 `FABLE_ORCH_PROFILE`. ## 许可证 MIT
查看原始来源