STEP 1443 — 共通実行器 (Common Executor) v0.1
1. 契機 (chat-Claude 提案 → 藤本さん 起点問い)
本 STEP = その 実装レベル 本命回答 の MVP。 chat-Claude priority 3 (共通実行器 build-out) 完了 = **4 priority 全 完了** (1 verify + 2 完全性検査器 + 3 共通実行器 + 4 defer 明示)。
2. 3 element 構造
| element | 実装 | 場所 |
|---|---|---|
| 共通実行器 (single executor) | catalog_execute(name, inputs) MCP tool 1 個+ catalog_list(filter?) 補助 |
src/mcp/catalog-executor.ts |
| 差し替え可能な 記述 (swappable descriptions) | JSON spec 1 file / connector (name / description / handler / inputSchema / outputShape / domain / step / honestScope) |
data/catalog/*.json |
| 遅延索引 (lazy index) | 起動時 全 JSON scan で {name, description, domain, step, path, hasHandler} の 軽量 index、 execution 時 に full spec を on-demand load + handler dispatch |
catalog-executor.ts::loadCatalogIndex() |
3. Wired entries (MVP 3 個 = 既 tool の catalog 化 demo)
| name | handler | 元 STEP | domain | 目的 |
|---|---|---|---|---|
d8-apply | d8_apply_v1 | 1349 | logic | D-FUMT₈ 演算子 単発 適用 (not/and/or) |
d8-completeness | d8_completeness_v1 | 1429 | logic | D-FUMT₈ 関数完全性 検査器 (STEP 1438 Lean 4 proof link) |
dimension-check | dimension_check_v1 | 1414 | physics | 物理式 次元一致 検査 (ℤ⁷ SI base) |
Handler registry (src/mcp/catalog-executor.ts::HANDLER_REGISTRY): 各 catalog entry の handler key → TS function を map。 新 connector 追加 = **JSON spec file 追加 + registry entry 1 line** (MCP tool spec は 変更不要 = 数の負債 解消 の 構造)。
4. 使用例 (MCP stdio)
4.1 catalog_list — 全 entry 一覧
{"jsonrpc":"2.0","id":2,"method":"tools/call",
"params":{"name":"catalog_list","arguments":{}}}
→ {"count": 3,
"entries": [
{"name": "d8-apply", "description": "...", "domain": "logic", "step": 1349,
"path": "data/catalog/d8-apply.json", "hasHandler": true},
{"name": "d8-completeness", ...},
{"name": "dimension-check", ...}
],
"source": "catalog-executor",
"registeredHandlers": ["d8_apply_v1", "d8_completeness_v1", "dimension_check_v1"]
}
4.2 catalog_execute d8-apply
{"jsonrpc":"2.0","id":3,"method":"tools/call",
"params":{"name":"catalog_execute",
"arguments":{"name":"d8-apply",
"inputs":{"op":"and","a":"BOTH","b":"NEITHER"}}}}
→ {"name": "d8-apply",
"handler": "d8_apply_v1",
"result": {"op": "and", "arity": 2,
"inputs": {"a": {"name":"BOTH", ...}, "b": {"name":"NEITHER", ...}},
"result": {"name": "FALSE", "symbol": "⊥", "numeric": 0},
"source": "static-truth-table", ...},
"source": "catalog-executor",
"version": "0.1",
"step": 1349}
4.3 catalog_list filter
catalog_list({"domain": "logic"}) → 2 entries
catalog_list({"step": 1414}) → 1 entry (dimension-check)
catalog_list({"nameSubstring": "d8"}) → 2 entries
catalog_list({"onlyRegistered": true}) → 3 (全 wired)
5. 実装 5 file
data/catalog/README.md(~110 行) — protocol doc + 3 element mapping + entry 形式 + 移行 policydata/catalog/d8-apply.json(STEP 1349 wrap)data/catalog/d8-completeness.json(STEP 1429 wrap +leanProoffield で STEP 1438 Lean 4 proof link)data/catalog/dimension-check.json(STEP 1414 wrap)src/mcp/catalog-executor.ts(~260 行) — CatalogEntry type + HANDLER_REGISTRY + lazy index cache + catalogExecute + catalogList (4 種 filter)
Test test/step1443-catalog-executor-test.ts (~230 行) = 52/52 assertion PASS: index load / cache / loadEntry / catalogList 6 filter case / registeredHandlers / catalogExecute 3 wired entry / error 4 種 / envelope 3 field / determinism / MCP spec / filter combined。
MCP wire: src/mcp/rei-mcp-server.ts banner v2.8.11→v2.8.12 51→53 tool (auto-count STEP 1378 systemic 対策 反映)、 stdio smoke PASS。
commit: f086c0045
6. 意味論的位置づけ
rei-aios MCP は 現在 53 tool、 各 tool の 追加 は spec + wire + case handler の 3 場所修正 が 必要。 catalog 経由 に すれば:
- 新 connector 追加 = JSON spec 1 file + registry 1 line (2 場所 のみ、 MCP tool spec 変更なし)
- catalog を data と 分離 = 索引だけ 常駐、 spec は on-demand load (chat-Claude 「入力カタログを 本体と 分離、 索引だけ 常駐」 の 直訳)
- SEED_KERNEL 1,677 理論 / Papers 177 の 数の負債 への 構造的 解答 (人手から 切り離す 装置)
chat-Claude が 参照した Claude 内部 pattern (tool_search / Skills / Artifacts) と 同型構造 だが、 独立 novelty 主張ゼロ。 「pattern の 直訳性」 のみ が 本 MVP の 価値。
7. Honest scope (8 条)
- MVP 3 wired entry のみ = 全 53 MCP tool の 段階的 catalog 化 は 別 arc (STEP 1447 catalog v0.2 で 10-15 tool 追加予定)
- JSON のみ (YAML/TOML 未対応、 依存ゼロ 選好)
- JSON Schema 動的 validation なし = handler 内 TS 側 validation に 依存 (schema field は 人間可読 doc)
- Auto-generated MCP tool spec from catalog は 未 =
catalog_execute1 個 で 全 entry 表現、 Claude 側 discoverability はcatalog_listで 補完 (trade-off) - 既 MCP tool は 保持 = backward compat、 段階的 移行 policy
- handler 未登録 の spec-only entry は
'handler-not-registered'error を 意図的 に 返す (stub 用途) - prior art audit 未 = chat-Claude tool_search / Skills / Artifacts pattern と 同型 だが、 独立 novelty 主張ゼロ = 「pattern の 直訳」 のみ
- 「数の負債 解消」 は 本 MVP で 骨格 のみ、 実効果 は 段階的 catalog 化 の 累積で 現れる (v0.2+)
8. 関連 リソース
- Chat-Claude 起点 mapping: MCP 6 空白領域 vs Rei 占位 (2026-08-26、 4 priority 定義)
- STEP 1429 D-FUMT₈ 完全性 検査器 (catalog entry の 1 号 wired): site
- STEP 1438 Lean 4 formalization (catalog entry
leanProoffield link): memory-mirror でproject_step1438検索 - catalog protocol: data/catalog/README.md
- 実装: src/mcp/catalog-executor.ts · test
- Memory hook: memory-mirror で
project_step1443検索