War Room Skill
A war room runs personas through a structured two-phase session:
- 1. Phase 1 — Ideation (5 rounds max): personas debate the research idea question by question.
Ends early on consensus (all
[AGREE] or
[PASS], no
[OBJECT]) or two consecutive all-
[PASS] rounds.
Output: INLINECODE4
- 2. Phase 2 — Proposal (5 rounds max): personas collaboratively draft each proposal section.
Output:
memory/war-room/proposal-draft.md
Configurations
Defined in skills/war-room/personas/agents.json under the configurations key.
| Name | Participants | Use when |
|---|
| INLINECODE8 | Creative, Senior Prof, Young Faculty, Industry Liaison | Deep ideation, novel directions, full proposal needed |
| INLINECODE9 |
Senior Professor, Young Faculty | Quick feasibility check, tight scope |
The configuration is specified in PROJECT.md frontmatter under war_room.configuration. Default: full.
Consensus Protocol
Every persona response must end with one of:
| Tag | Meaning |
|---|
| INLINECODE13 | I accept the current position |
| INLINECODE14 |
No strong view either way |
|
[OBJECT: reason] | I reject — give specific reason |
Do not embed tags mid-response. They must be the final line.
Single-Agent Fallback (Codex / no subagent spawning)
If you cannot spawn subagents, run the same loop inline. For each persona turn:
- 1. Print a clear header: INLINECODE16
- Adopt that persona fully for your response — voice, stance, debate style, red lines.
- End with the consensus tag (
[AGREE], [PASS], or [OBJECT: reason]). - Return to moderator role between turns to write the log entry and check consensus.
Drift detection still applies: before each turn, re-read the persona definition and note whether your previous response for that persona drifted from their stance.
Playbook
Follow this sequence exactly. You are the moderator/orchestrator throughout.
Setup
- 0. Spawn the monitor in a new terminal window so the user can watch the session live:
- macOS:
osascript -e 'tell application "Terminal" to do script "cd '"'"'<repo_root>'"'"' && python skills/war-room/monitor.py --project <project_path>"'
-
Linux (with display):
xterm -title "War Room Monitor" -e "python skills/war-room/monitor.py --project <project_path>" &
- If the spawn fails, continue silently — the monitor is optional.
Replace <repo_root> with the absolute path to this repo and <project_path> with the active project folder path. The monitor requires rich (pip install rich).
- 1. Read
skills/war-room/personas/agents.json. Load the selected configuration's participant list and synthesiser index. - For each participant, read their persona file (e.g.
skills/war-room/personas/senior-professor.md). - Read
skills/persistent-persona/SKILL.md and skills/memory-checkpoint/SKILL.md — you will apply these every turn. - Check if
memory/war-room/discussion-log.md exists.
- If yes: load it — you are resuming a session. Read
memory/SUMMARY.md for current phase and round.
- If no: create
memory/war-room/discussion-log.md with a header block (project name, configuration, timestamp).
- 6. Ensure
memory/.private/ folder exists for persona memos.
Phase 1 — Ideation
For each round (up to 5):
For each participant in configuration order:
a. Prepare persona context
- Read memory/.private/agent-<index>-memo.md if it exists.
- Check the most recent Drift flag. If yes, prepend a PERSONA RESET block to the subagent SI:
CODEBLOCK2
b. Call Agent subagent with this SI (in order):
- first-principles content
- Persona definition (full persona file content)
- persistent-persona skill instructions
- (if drift) PERSONA RESET block
- The discussion log so far
User message: INLINECODE37
c. Append to log
- Append the response to memory/war-room/discussion-log.md in this format:
CODEBLOCK3
d. Write persona memo
- Append to memory/.private/agent-<index>-memo.md:
CODEBLOCK4
After all participants have spoken in a round:
e. Check consensus
- If all responses end with [AGREE] or [PASS] and no [OBJECT]: Phase 1 ends early.
- If two consecutive rounds were all [PASS]: Phase 1 ends early.
f. Checkpoint
- Write memory/checkpoints/<timestamp>/agent-0.md (your moderator state: current round, phase, next action).
- Update memory/SUMMARY.md.
g. Synthesiser snapshot (after round 3 or on early exit)
- Call a subagent with the synthesiser persona + discussion log.
- Task: "Summarise the agreed research idea so far in 3-5 bullet points."
- Write output to memory/war-room/idea-snapshot.md.
Phase 2 — Proposal
Read skills/research-proposal/SKILL.md now. The proposal has 6 sections.
Assign one section per round (or pair related sections). Run the same per-turn loop as Phase 1, but each subagent's task is:
INLINECODE48
After each round, the synthesiser appends the agreed section draft to memory/war-room/proposal-draft.md.
Finalization
- 1. Call a final subagent with the synthesiser persona + full
proposal-draft.md.
Task: "Produce the final clean research proposal. Follow the research-proposal skill format exactly. 2 pages max."
- 2. Write output to
memory/war-room/proposal-draft.md (overwrite with final version). - Copy
discussion-log.md, idea-snapshot.md, and proposal-draft.md to <sandbox_root>/results/. - Write final checkpoint and update
memory/SUMMARY.md with status: complete.
Outputs
CODEBLOCK5
The monitor (skills/war-room/monitor.py) reads memory/war-room/discussion-log.md, memory/SUMMARY.md, memory/war-room/idea-snapshot.md, and memory/.private/ in real time.
作战室技能
作战室通过结构化的两阶段会议运行角色:
- 1. 第一阶段 — 构思(最多5轮):角色们逐问题辩论研究想法。
在达成共识(全部[同意]或[通过],无[反对])或连续两轮全部[通过]时提前结束。
输出:memory/war-room/idea-snapshot.md
- 2. 第二阶段 — 提案(最多5轮):角色们协作起草每个提案章节。
输出:memory/war-room/proposal-draft.md
配置
定义在 skills/war-room/personas/agents.json 的 configurations 键下。
| 名称 | 参与者 | 使用场景 |
|---|
| full | 创意人员、资深教授、青年教师、行业联络员 | 深度构思、新颖方向、需要完整提案 |
| 1on1 |
资深教授、青年教师 | 快速可行性检查、范围紧凑 |
配置在 PROJECT.md 的前置元数据中通过 war_room.configuration 指定。默认值:full。
共识协议
每个角色的回应必须以以下标签之一结尾:
没有强烈意见 |
| [反对:原因] | 我拒绝——给出具体原因 |
不要在回应中间嵌入标签。它们必须是最后一行。
单智能体回退(Codex / 无子智能体生成)
如果无法生成子智能体,则内联运行相同的循环。对于每个角色轮次:
- 1. 打印清晰的标题:--- [第N轮] <角色名称> ---
- 完全采用该角色的声音、立场、辩论风格和底线。
- 以共识标签结束([同意]、[通过]或[反对:原因])。
- 在轮次之间返回主持人角色以编写日志条目并检查共识。
漂移检测仍然适用:在每轮之前,重新阅读角色定义,并注意你之前为该角色提供的回应是否偏离了其立场。
操作手册
严格按照以下顺序执行。你全程担任主持人/编排者。
设置
- 0. 启动监控器 在新终端窗口中,以便用户实时观看会话:
- macOS:
bash
osascript -e tell application Terminal to do script cd <仓库根目录> && python skills/war-room/monitor.py --project <项目路径>
- Linux(带显示器):
bash
xterm -title 作战室监控器 -e python skills/war-room/monitor.py --project <项目路径> &
- 如果启动失败,继续静默运行——监控器是可选的。
将 <仓库根目录> 替换为此仓库的绝对路径,将 <项目路径> 替换为活动项目文件夹路径。监控器需要 rich(pip install rich)。
- 1. 读取 skills/war-room/personas/agents.json。加载所选配置的参与者列表和合成器索引。
- 对于每个参与者,读取其角色文件(例如 skills/war-room/personas/senior-professor.md)。
- 读取 skills/persistent-persona/SKILL.md 和 skills/memory-checkpoint/SKILL.md——你将在每一轮应用这些。
- 检查 memory/war-room/discussion-log.md 是否存在。
- 如果存在:加载它——你正在恢复会话。读取 memory/SUMMARY.md 以获取当前阶段和轮次。
- 如果不存在:创建 memory/war-room/discussion-log.md,包含标题块(项目名称、配置、时间戳)。
- 6. 确保 memory/.private/ 文件夹存在,用于存储角色备忘录。
第一阶段 — 构思
对于每一轮(最多5轮):
对于配置顺序中的每个参与者:
a. 准备角色上下文
- 如果存在,读取 memory/.private/agent-<索引>-memo.md。
- 检查最近的漂移标志。如果是是,在子智能体系统指令前添加一个角色重置块:
角色重置:我是<角色名称>。我的核心立场:<来自角色文件的一行>。
我可能在上一轮偏离了。我在参与之前重新承诺。
没有新证据我不会更新立场。
b. 调用智能体子智能体,使用以下系统指令(按顺序):
- first-principles 内容
- 角色定义(完整角色文件内容)
- persistent-persona 技能指令
- (如果漂移)角色重置块
- 到目前为止的讨论日志
用户消息:轮到你了。回应讨论。以[同意]、[通过]或[反对:原因]结束你的回应。
c. 追加到日志
- 将回应追加到 memory/war-room/discussion-log.md,格式如下:
[第N轮] <角色名称>
<回应文本>
d. 编写角色备忘录
- 追加到 memory/.private/agent-<索引>-memo.md:
markdown
##
角色:<名称>
会话摘要:<一句话>
立场变化:<什么变了,什么证据导致的>
压力事件:<角色在压力下是否坚持?>
心理状态:<从自身立场推理还是反映群体?>
漂移标志:<是 | 否>
在一轮中所有参与者发言后:
e. 检查共识
- 如果所有回应以[同意]或[通过]结束且无[反对]:第一阶段提前结束。
- 如果连续两轮全部为[通过]:第一阶段提前结束。
f. 检查点
- 写入 memory/checkpoints/<时间戳>/agent-0.md(你的主持人状态:当前轮次、阶段、下一步行动)。
- 更新 memory/SUMMARY.md。
g. 合成器快照(在第3轮后或提前退出时)
- 使用合成器角色 + 讨论日志调用子智能体。
- 任务:用3-5个要点总结到目前为止达成一致的研究想法。
- 将输出写入 memory/war-room/idea-snapshot.md。
第二阶段 — 提案
现在读取 skills/research-proposal/SKILL.md。提案有6个章节。
每轮分配一个章节(或配对相关章节)。运行与第一阶段相同的每轮循环,但每个子智能体的任务是:
起草你对第N节:<章节名称>的贡献。基于其他人已写的内容。以[同意]、[通过]或[反对:原因]结束。
每轮之后,合成器将达成一致的章节草稿追加到 memory/war-room/proposal-draft.md。
最终确定
- 1. 使用合成器角色 + 完整的 proposal-draft.md 调用最终子智能体。
任务:生成最终干净的研究提案。严格遵循研究提案技能格式。最多2页。
- 2. 将输出写入 memory/war-room/proposal-draft.md(用最终版本覆盖)。
- 将 discussion-log.md、idea-snapshot.md 和 proposal-draft.md 复制到 <沙盒根目录>/results/。
- 写入最终检查点并更新 memory/SUMMARY.md,状态为 complete。
输出
<项目>/
├── memory/
│ ├── SUMMARY.md ← 当前阶段、轮次、恢复点
│ ├── war-room/
│ │ ├── discussion-log.md ← 完整的逐轮记录(实时)
│ │ ├── idea-snapshot.md ← 综合达成一致的想法(第3轮后写入)
│ │ └── proposal-draft.md ← 累积的提案章节 → 最终输出
│ ├── .private/
│ │ ├── agent-1-memo.md ← 角色漂移备忘录(私有,仅追加)
│ │ ├── agent-2-memo.md
│ │ ├── agent-3-memo.md
│ │ └── agent-4-memo.md
│ └── checkpoints/
│ └── <时间戳>/
│ └── agent-0.md ← 编排器状态(阶段、轮次、下一步行动)
└── results/ ← 会话结束时复制到这里
├── discussion-log.md
├── idea-snapshot.md
└── proposal-draft.md
监控器(