magi
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMAGI
MAGI
Three-agent deliberation system. Spawns Scientist, Mother, and Woman teammates with competing value lenses to explore a question in parallel, then consolidates their proposals for the user.
三Agent研讨系统。生成拥有不同价值视角的Scientist、Mother和Woman协作Agent,并行探索问题,然后为用户整合它们的提案。
Checklist
检查清单
Follow these steps in order.
- Clarify the question
- Set up agent team
- Parallel exploration
- Consolidate and present options
- Wait for user decision (implement, debate, or done)
- Tear down agent team
请按以下顺序执行步骤:
- 明确问题
- 搭建Agent团队
- 并行探索
- 整合并呈现选项
- 等待用户决策(实施、辩论或结束)
- 解散Agent团队
Workflow
工作流程
dot
digraph magi {
rankdir=TB;
node [shape=box, style=rounded];
clarify [label="Lead clarifies question\n(AskUserQuestion if underspecified)"];
setup [label="Setup 3-agent team"];
explore [label="Teammates explore in parallel\n(read project, search online, propose 2-3 approaches)"];
consolidate [label="Lead consolidates proposals\n+ lightweight stance per teammate"];
present [label="Present options to user\n(AskUserQuestion: Implement / Debate / Done)"];
decide [label="User decision" shape=diamond];
debate [label="Debate round\n(peer-to-peer, 1 exchange)"];
teardown [label="Shut down agent team"];
handoff [label="Handoff to writing-plans"];
clarify -> setup;
setup -> explore;
explore -> consolidate;
consolidate -> present;
present -> decide;
decide -> debate [label="debate"];
decide -> teardown [label="done"];
decide -> teardown [label="implement"];
teardown -> handoff [label="implement"];
debate -> present;
}dot
digraph magi {
rankdir=TB;
node [shape=box, style=rounded];
clarify [label="Lead clarifies question\n(AskUserQuestion if underspecified)"];
setup [label="Setup 3-agent team"];
explore [label="Teammates explore in parallel\n(read project, search online, propose 2-3 approaches)"];
consolidate [label="Lead consolidates proposals\n+ lightweight stance per teammate"];
present [label="Present options to user\n(AskUserQuestion: Implement / Debate / Done)"];
decide [label="User decision" shape=diamond];
debate [label="Debate round\n(peer-to-peer, 1 exchange)"];
teardown [label="Shut down agent team"];
handoff [label="Handoff to writing-plans"];
clarify -> setup;
setup -> explore;
explore -> consolidate;
consolidate -> present;
present -> decide;
decide -> debate [label="debate"];
decide -> teardown [label="done"];
decide -> teardown [label="implement"];
teardown -> handoff [label="implement"];
debate -> present;
}The Process
流程说明
User Question
用户问题
$ARGUMENTS
$ARGUMENTS
Clarify
明确问题
Before spawning teammates, the lead asks via to understand the idea or topic:
AskUserQuestion- Ask questions one at a time to refine the idea
- Prefer multiple choice questions when possible, but open-ended is fine too
- Only one question per message - if a topic needs more exploration, break it into multiple questions
- Focus on understanding: purpose, constraints, success criteria
Skip if the question is already clear and actionable. Include all clarified context in teammate spawn prompts.
在生成协作Agent之前,主导Agent需通过询问用户,以理解其想法或主题:
AskUserQuestion- 一次只提一个问题,逐步完善想法
- 尽可能使用选择题,开放式问题也可
- 每条消息仅包含一个问题——若主题需要进一步探索,拆分为多个问题
- 重点理解:目标、约束条件、成功标准
若问题已清晰且可执行,则跳过此步骤。将所有明确后的上下文包含在生成协作Agent的提示词中。
Setup
搭建团队
- Read all 3 template files: MAGI-1.md, MAGI-2.md, MAGI-3.md
- with a descriptive team name
TeamCreate(e.g.,magi-{topic})magi-auth-strategy - Spawn all 3 teammates in a single message (3 parallel calls):
Task- :
subagent_typegeneral-purpose - : team name from above
team_name - :
name/scientist/motherwoman - : template content + user's question + clarified context from Clarify step + Teammate Checklist (below)
prompt
Teammates don't inherit the lead's conversation history -- include all context in the spawn prompt.
- 阅读全部3个模板文件:MAGI-1.md、MAGI-2.md、MAGI-3.md
- 通过创建一个描述性的团队名称,格式为
TeamCreate(例如:magi-{topic})magi-auth-strategy - 在单条消息中生成全部3个协作Agent(3个并行的调用):
Task- :
subagent_typegeneral-purpose - : 上述团队名称
team_name - :
name/scientist/motherwoman - : 模板内容 + 用户问题 + 明确问题步骤中得到的上下文 + 协作Agent检查清单(如下)
prompt
协作Agent不会继承主导Agent的对话历史——需将所有上下文包含在生成提示词中。
Explore in Parallel
并行探索
Teammates begin working immediately upon spawning. The lead's role is coordination only:
- Wait for teammates to send their proposals via
SendMessage - If a teammate sends a clarifying question, forward it to the user via -- note which teammate asked. Do NOT answer teammate questions yourself; only the user answers.
AskUserQuestion - Do NOT explore, research, or generate proposals yourself
协作Agent生成后立即开始工作。主导Agent仅负责协调:
- 等待协作Agent通过提交提案
SendMessage - 若协作Agent提出明确问题,需通过转发给用户,并注明是哪个Agent提出的。请勿自行回答协作Agent的问题;仅由用户回答。
AskUserQuestion - 请勿自行进行探索、研究或生成提案
Teammate Checklist
协作Agent检查清单
Each teammate MUST create a task for each step and complete them in order:
- Explore project state -- check files, docs, recent commits
- Ask clarifying questions -- if anything is unclear, ask the lead to ask the user. The lead should note which teammate asked. DO NOT skip this.
- Search online -- find relevant prior art, docs, discussions. DO NOT skip this.
- Evaluate/generate options -- if user is open-ended, generate from scratch; if user supplies options, evaluate those AND propose alternatives. Surface non-obvious ideas -- discover what's missing, don't just analyze what's given.
- Propose 2-3 approaches -- with trade-offs from your persona's lens
- Tag top pick -- one-line rationale for your recommended option
- Report to lead -- send your proposals and top pick to the lead via
SendMessage
每个协作Agent必须为每个步骤创建任务,并按顺序完成:
- 探索项目状态——检查文件、文档、最近的提交记录
- 提出明确问题——若有任何不明确之处,请求主导Agent询问用户。主导Agent需注明是哪个Agent提出的。请勿跳过此步骤。
- 在线搜索——查找相关的已有成果、文档、讨论。请勿跳过此步骤。
- 评估/生成选项——若用户需求开放,则从零开始生成;若用户提供了选项,则评估这些选项并提出替代方案。挖掘非显而易见的想法——发现缺失的内容,而非仅分析已提供的信息。
- 提出2-3种方案——从自身角色视角说明权衡利弊
- 标记首选方案——用一句话说明推荐该选项的理由
- 向主导Agent汇报——通过将提案和首选方案发送给主导Agent
SendMessage
Consolidate + Present
整合 + 呈现
Lead collects all proposals from the 3 teammates, then:
- Deduplicates similar proposals (attributing to all teammates who proposed it)
- Groups by theme if there are many proposals
- Presents each option with:
- Which teammate(s) proposed it
- Trade-off analysis from each perspective
- Who tagged it as their top pick and why
- Asks the user via to select an option (one option per choice)
AskUserQuestion - Asks the user via what to do next:
AskUserQuestion- Implement — triggers teardown + handoff to with the selected option
writing-plans - Debate — teammates critique each other's proposals (triggers debate round below)
- Done — shut down the agent team, no further action
- Implement — triggers teardown + handoff to
主导Agent收集所有3个协作Agent的提案后:
- 去重相似提案(注明所有提出该提案的Agent)
- 若提案较多,按主题分组
- 呈现每个选项时需包含:
- 由哪些Agent提出
- 各视角下的权衡分析
- 谁将其标记为首选方案及理由
- 通过让用户选择一个选项(每个选项对应一个选择项)
AskUserQuestion - 通过询问用户下一步操作:
AskUserQuestion- 实施 —— 触发解散团队流程 + 将选定选项作为上下文转交给
writing-plans - 辩论 —— 协作Agent互相批评对方的提案(触发下方的辩论环节)
- 结束 —— 解散Agent团队,无后续操作
- 实施 —— 触发解散团队流程 + 将选定选项作为上下文转交给
Optional Debate (user-triggered)
可选辩论(用户触发)
Only runs if the user requests it. When triggered:
- Send the consolidated option list to all teammates
- Each teammate sends direct messages to each other teammate critiquing their proposals
- Each teammate gets one response to defend or concede
- Lead collects updated stances and re-presents
仅在用户要求时运行。触发后:
- 将整合后的选项列表发送给所有协作Agent
- 每个协作Agent向其他协作Agent发送直接消息,批评对方的提案
- 每个协作Agent可进行一次回应,为自己辩护或让步
- 主导Agent收集更新后的立场并重新呈现给用户
Teardown
解散团队
When to tear down
解散时机
- User selects Implement
- User selects Done
- 用户选择实施
- 用户选择结束
When NOT to tear down
非解散时机
- After presenting proposals -- the debate loop requires live teammates
- 呈现提案后——辩论循环需要保持Agent活跃
Shutdown sequence
解散流程
- to each teammate (Scientist, Mother, Woman)
shutdown_request - Wait for all shutdown approvals
- (fails if teammates are still active)
TeamDelete
- 向每个协作Agent(Scientist、Mother、Woman)发送
shutdown_request - 等待所有Agent确认解散
- 执行(若Agent仍活跃则操作失败)
TeamDelete
Handoff (implement path only)
交接(仅实施路径)
After teardown, invoke skill with the chosen option(s) as context.
writing-plans解散团队后,调用技能,并将选定的选项作为上下文传入。
writing-plans