Approach C: Steering Layer — 具体长什么样

用一个真实研究场景走一遍:假设你在研究"GW 自能对拓扑不变量的修正"

核心思路:在现有 L0-L4 上加一个 Steering 层

  ┌─────────────────────────────────────────────┐
  │  Steering Layer (新增)                       │
  │  steering/directives.md  人的指令队列         │
  │  steering/decisions.md   关键决策 + 理由      │
  │  steering/contribs.md    人直接写的推导/idea  │
  └──────────────┬──────────────────────────────┘
                 │ LLM 每次行动前必须读
  ┌──────────────▼──────────────────────────────┐
  │  现有 L0-L4 协议 (几乎不变)                   │
  │  L0 discover → L1 read → L3 derive → L4 validate → L2 │
  └─────────────────────────────────────────────┘
  

场景演示:一次典型的协作 Session

人:"上次 L3 推导 GW 自能的时候,我觉得准粒子权重 Z 的处理有问题。你去读一下 Holm & Aryasetiawan 2000 那篇,看他们怎么处理 Z 因子的 renormalization。读完后告诉我关键结论,我们讨论下一步。"

→ LLM 调用 aitp_record_steering(directive="read HA2000 on Z-factor renormalization", context="GW self-energy derivation, Z might be incorrect")

LLM:"读完了。HA2000 的 Z 因子用了 full-frequency 积分而非 plasmon-pole 近似。我们目前用的是 plasmon-pole,这可能导致 Z 被高估。我的建议是:切换到 full-frequency 方法重新算 Z,但代价是计算量增大约 10 倍。你怎么看?"

→ LLM 调用 aitp_request_human_decision(question="Switch from plasmon-pole to full-frequency for Z?", options=["switch to full-frequency", "keep plasmon-pole but flag as approximation", "estimate error first before switching"])

人:"先估算误差。你跑一个 toy model 对比两种方法的 Z,如果差异超过 10% 就切换。另外,我自己推了一下——这是我在纸上的推导关键步骤,你帮我录入并检查。"

[人附上推导照片或手写 LaTeX 片段]

→ LLM 调用 aitp_record_steering(directive="estimate plasmon-pole vs full-frequency error on toy model") 然后 aitp_human_contribute(content=人的推导, target="L3/derive")

LLM:"已录入你的推导,SymPy 验证通过。toy model 跑完了:差异 18%,超过了 10% 阈值。我建议按你说的切换到 full-frequency。现在去改 L3/derive 的代码和推导链。"

新增的 4 个工具

工具 谁用 做什么
aitp_record_steering LLM (代人行令) 把人的方向性指令持久化写入 steering/
aitp_request_decision LLM 主动调用 在分叉点请人做决策,决策写入 decisions.md
aitp_human_contribute LLM (代笔) 或人 人贡献的推导/idea 直接写入 topic artifact
aitp_read_steering LLM (自动) 每次行动前读 steering log,知道人的方向和判断

Session Resume 的改进

当前 session_resume 只返回 10 条 event log。改进后:

改动范围

文件 改动程度 说明
brain/mcp_server.py +150 lines 新增 4 个工具 + 增强 session_resume/get_execution_brief
brain/state_model.py +80 lines Steering 模板、决策点状态机
skills/skill-l3-*.md 小幅修改 LLM 被引导在分叉点调用 request_decision
hooks/ +20 lines session_start 时注入 steering context