STEP 1594 — rei-mcp-server Msg 2 層化 spec Retrospective Update
要旨
私 STEP 1537 spec 起草 (commit b49d9449f) と 別 tab STEP 1533+1534+1584 実装 が 同日 (2026-08-30) 並走、 私 spec 起草時点で 別 tab 実装 未認識 → 私 spec の 全 Phase (1-4) は 実は 既に 別 tab で 実装完了 と判明。 spec doc を retrospective spec (historical starting point + canonical description + v0.3+ hook 3 role) に update。
別 tab canonical implementation 4 layer verify
| 私 spec Layer | 別 tab 実 file | STEP | Status |
|---|---|---|---|
| L1 Msg | plan-runner-msg.ts | 1579 | COMPLETED |
| L2 Plan | 同上 | 1579 | COMPLETED |
| L3 RunEngine | plan-runner-msg.ts + plan-runner-msg-v02.ts (6 新 Msg) | 1579+1534 | COMPLETED |
| L4 SafetyGate 統合 | safety-gate.ts + msg-tool-wrapper.ts | 1584+1533 | COMPLETED |
| L5 v0.3 (私 spec 未言及) | plan-runner-msg-v03.ts | 未 grep | IN PROGRESS (別 tab) |
私 spec との 主要差分 4 件 (別 tab canonical)
- 一斉 refactor vs 逐次 opt-in: 私 spec = 全 82 tool 一斉 / 別 tab = 既存
rei-mcp-server.ts不変 +wrapAsMsgToolfactory 経由 opt-in migration (canonical、 breaking change zero) - Msg command 種類: 私 spec 8 command / 別 tab v01+v02 base 5 + 拡張 6 (Bluesky Msg source 直輸入)
- SafetyGate 統合: 私 spec Phase 4 defer → 別 tab STEP 1584 で 3-tier hazard + 6 rule constructor 実装済
- Pilot tool: 私 spec 1 tool 推奨 → 別 tab 3 pilot 同時 (
disk_health+shannon_entropy+puzzle_verify) の 3x coverage
Rei stack lesson (multi-tab spec collision)
- STEP 1554 atomic-commit protocol は code file 衝突 には有効
- spec doc 内容重複 / 認識ずれ には 別 mechanism 必要:
- 別 tab の
git log事前確認 が 有効 preventive step - Design-spec 起草前 に 別 tab activity survey が 推奨
- 別 tab の
- 本 STEP 1594 retrospective update = 「spec ↔ 実装 認識ずれ の operational 訂正」 の 実例
Honest scope
- 私 spec の core insight (bluesky verbatim quote 「Calling
epics.caputinside a plan prevents the RunEngine from knowing about it」) は 別 tab 実装と 一致 = direction 正しかった - 私 spec の 「一斉 refactor」 方針 は 別 tab 実装で 却下、 「逐次 opt-in」 が canonical = 私 spec の scoping error を honest 明記
- v0.3 (
plan-runner-msg-v03.ts) の 内部 は 本 STEP 未 read、 別 STEP で detail update 候補 pilot-plan-disk-health.ts(別 tab pilot) と 私 STEP 1593signal-device.ts(Phase 1 pilot) の 対応関係 detail は 別 STEP で verify 候補 (両者 collision zero と 思われる = 別 abstraction layer、 別 tab pilot は Msg-based / 私 STEP 1593 pilot は Signal/Device-based)
Related
docs/REI_MCP_SERVER_MSG_2_LAYER_DESIGN_SPEC.md— retrospective section 前置- STEP 1537 — 元 spec (historical starting point)
src/mcp/plan-runner-msg.ts— v01 base (別 tab STEP 1579)src/mcp/plan-runner-msg-v02.ts— v02 (別 tab STEP 1534)src/mcp/plan-runner-msg-v03.ts— v03 (更に別 tab)src/mcp/safety-gate.ts— 3-tier hazard model (別 tab STEP 1584)src/mcp/msg-tool-wrapper.ts— wrapper + 3 pilot (別 tab STEP 1533)