d48f83ae6f
CP arcrun-usable 步驟 4(目的:AI 只要填 payload——系統把「傳到 telegram」
翻成 http_request+recipe telegram_send)+leo 07-31 追加:
「難道我不能指定要搜尋工作流或節點或 recipe 嗎?」
替換(只動 discover,t158「部署≠發現」邊界不碰):
- 兩庫 exact 落空後,在 t158 一次抓好的清單記憶體內媒合,零新增 round-trip
- 規則 A 服務詞→recipe:名字全部服務詞命中同一 recipe 且唯一才換
(google_slides_create 不被 google_sheets 誤吃)
- 規則 B 強欄位斷詞→零件:canonical/display/aliases 強命中×10+弱命中,
需至少一強命中且分數唯一最高(aes_encrypt 無強命中不換)
- 換到=status resolved+substitution{from,componentId,recipe,reason},
cypher 圖節點直接帶真實 componentId;換不到照舊 not_found+3.7 指路
target 參數(各走既有機制,不新造第二套搜尋):
- triplets+target=component|recipe=只查該庫
- query+target=名字搜尋:component→registry /components/search(=MCP
arcrun_search_components 同路);recipe→私庫 RECIPES KV(回應註明公庫走
arcrun_recipe_search);workflow→新抽 lib/workflow-search.ts,
GET /workflows/search 與 target=workflow 共用(=arcrun_search_workflows 同路)
- 防呆:compile+target 400/target=workflow 吃 query 不吃 triplets/非法 target 400
驗(本地 wrangler dev,registry 種 20 合約+init/seed 10 recipe):
- 「判斷有沒有新資料 >> ON_SUCCESS >> 傳到 telegram」→ if_control(resolved)
+telegram_send(substitution.componentId=http_request)=feature 06 驗法過
- 機械考 27/27 全綠(01 組×5+03 組×4 迴歸+06 組×8+target×8+compile 迴歸×2)
- 冷啟第一發 94ms、熱 8–13ms(t158 病史對照:舊 25.7s);compile 39ms unchecked 照舊
- tsc 全綠;vitest 9 failed/179 passed=t158 基線完全相同
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Arcrun 文件分類索引
LLM Wiki 結構:長期記憶系統,防止決策遺忘和重複錯誤。 參考:Andrej Karpathy — A Closer Look at How LLMs Remember
分類規則
| 目錄 | 用途 | 例子 |
|---|---|---|
| 1-vision/ | 「為什麼」:設計哲學、核心價值、前瞻方向 | arcrun 優勢、Haiku 就能搞定、薄殼原則 |
| 2-architecture/ | 「是什麼」:系統設計、技術棧、組件關係 | MVP 架構、零件模型、KV 存儲方案 |
| 2-architecture/decisions/ | 架構關鍵決策和 trade-off | Service binding 為什麼廢、R2 只用 Phase 5、同 zone 1042 解法 |
| 3-specs/ | 需求和 SDD:設計文件、任務清單 | (從 .agents/specs/ 搬來) |
| 4-guides/ | 操作手冊:如何做、工作流程 | 部署流程、CLI 用法、壓測方法 |
| 5-records/ | 日誌和證據:事件、測試、決策履歷 | Incident、壓測報告、問題追蹤 |
| 5-records/incidents/ | 生產問題復盤:故障原因、改進方案 | 2026-05-13 同 zone 1042、2026-06-06 MCP route bug |
| 5-records/test-reports/ | 壓測結果、驗收報告 | 2026-06-07 公庫上線測試、2026-06-08 Haiku 乾淨重測 |
| 6-user/ | 對外文件:README、教程、FAQ | self-hosted 安裝、開發者指南 |
.claude/wiki/ — LLM 本機記憶
| 檔案 | 用途 | 更新頻率 |
|---|---|---|
| INDEX.md | wiki 目錄和導引 | 每次新增 |
| mistakes.md | CC(我)常犯的錯 + 避坑方法 | 每次踩坑後 |
| status.md | 當前進度、已知問題、下一步 | 每次 session 結束 |
| decisions-summary.md | 架構決策快速參考(不是全文,是摘要 + 連結) | 每次大決策後 |
| modules/[name].md | 關鍵模組說明:職責、入口、常見誤解 | 不定期補充 |
檔案遷移計畫
| 當前位置 | 新位置 | 優先級 |
|---|---|---|
| 根目錄 .md(除 README/CLAUDE) | → docs/ 分類 | 高 |
| .agents/specs/ | → docs/3-specs/ | 高 |
| .claude/rules/ | → docs/2-architecture/ + wiki | 中 |
| docs/incidents/ | → docs/5-records/incidents/ | 中 |
| 壓測報告 | → docs/5-records/test-reports/ | 中 |
下一步
所有檔案整理進此結構後,wiki 將作為 CC 和任何 LLM 的長期記憶入口。