fix(kbdb): cypher proxy 補 /kbdb/entries CRUD + report_feedback 改打 /entries

kbdb-base Phase 9.6/9.7(HANDOFF §2 缺口① + §3b 連帶):

- 9.6 cypher kbdb-proxy 補 /kbdb/entries CRUD(POST/GET list/GET :id/PATCH :id)
  純轉發到 KBDB 基本盤 /entries,解鎖 mira _kbdb_client.py 主線遷移。
  租戶隔離同 9.5:寫入注入 owner_id、list 強制本租戶過濾、PATCH 剝 owner_id。
  刻意不開 DELETE(基本盤 delete 無 owner 檢查 → 跨租戶刪除風險)。
- 9.7 arcrun_report_feedback 從死 route /blocks 改打基本盤 /entries
  (entry_type=agent-feedback)。9.4 漏網的同類修;基本盤無 /blocks → 原本 404 假紅。

順帶(HANDOFF §6 harness 表達優化):
- 重寫 cli/harness/CLAUDE.block.md 補三盲點(recipe 是公共投稿 / 缺能力補 API 不拼裝 /
  自製零件退場路徑),目標 Haiku 級 CC 讀懂。
- README 零件 vs recipe 段對齊同三點。

cypher + mcp tsc exit 0。端到端 smoke test 隨後。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-06-15 13:06:58 +08:00
parent 8f4c5dbe59
commit b1e302b3b5
4 changed files with 113 additions and 16 deletions
+6
View File
@@ -76,9 +76,15 @@ arcrun 只有兩種東西,分清楚就不會做歪:
- recipe = `http_request` + 一組固定設定(endpoint / method / headers / body 模板)。
- 要打 Notion / Slack / 你自己的 API**寫一個 recipe**,不是做一個零件。
- recipe 是純文字、不用 deploy、改一次零成本。AI 讀得懂 API 文件就能幫你組出 recipe。
- **recipe 是公共資產,發現缺的就做一個投稿。** `acr recipe push` = 投稿到公共庫(公開/私有只是屬性,不是兩條路)。沒有現成 recipe 打你要的 API?**自己寫一個 push 上去**——這是被鼓勵的,不必問人,下一個人也能用。
> **一句話判準**:要打一個固定的外部 endpoint → **recipe**。要做流程控制 / 資料處理 / 通用 HTTP → 用既有**零件**。其他大部分情況 → 直接寫**工作流**把它們串起來。
### 兩條容易誤解的紅線(AI 操盤手特別注意)
- **缺一個能力 → 補 API,不准用 recipe / 多步工作流拼裝。** 口訣:「這段邏輯換個介面(CLI→MCP)要不要重寫?要 → 它是『能力』,該長在 API。」例:缺 `upsert` 就去 API 加 `upsert` endpoint,**不要**在工作流裡拼「先查、沒有再建」、也不要寫 recipe 假裝補上。recipe 只負責「打一個固定外部 API」,不是用來補 arcrun 自己缺的能力。
- **已經有自製零件的,讓它退場。** `claude_api` 之類「工作流回頭叫 LLM」→ 刪掉,AI 判斷由操盤的 CC 自己做;`kbdb_*` 資料存取 → 改走 `acr kbdb` / `kbdb_*` MCP 工具;純打固定外部 API 的假零件 → 改寫成 recipe 投稿。
---
## 快速開始(Self-hosted