3.8 新增 write_recipe skill——recipe 指路終於有目的地

📋 SDD:workflow-discovery task 3.8(3.7 的 suggestion 指 skill write_recipe,
之前是空地——指路會指到不存在的 skill)。

- registry/skills/write_recipe.md:從真 code 反推,不是憑空教學——
  schema=routes/recipes.ts RecipeDefinition(canonical_id/endpoint/method/auth_service…);
  真範例=api-recipe-seeds.ts 的 telegram_send(URL path 注入)+gmail_send(service account);
  auth recipe 必填欄位(required_secrets 的 help_url 必填)照 POST /auth-recipes 驗證邏輯;
  常犯錯收錄實錄(sheets append PUT→POST、telegram auth recipe 漏種、金鑰只准名字 D36)
- INDEX.md 補 write_recipe 入口;「/cypher/search 假 found」坑改標已修(2026-07-31)
- write_intent_workflow.md §6 status 表改 not_found 契約+suggestion/similar_* 欄說明

安裝器 seed:registry/skills/*.md 由 sync-registry-to-kbdb.py 自動收,新檔即納入。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-07-31 11:56:30 +08:00
parent 1794072179
commit 7e87a3336b
3 changed files with 144 additions and 7 deletions
+2 -1
View File
@@ -19,6 +19,7 @@
| 要做檢索問答(RAG | `rag_with_arcrun` | `arcrun_get_skill('rag_with_arcrun')` |
| workflow 卡住不動/paused | `debug_paused_workflow` | `arcrun_get_skill('debug_paused_workflow')` |
| 想把 http 呼叫改成觸發別的 workflow | `migrate_http_to_trigger_workflow` | 同上 |
| **缺某個外部 API 的 recipe**(查詢回 not_found 指 recipe 路)| `write_recipe` | `arcrun_get_skill('write_recipe')` |
| **真的需要新零件**(罕見)| `add_new_wasm_component` | 同上 ⚠️ 先確認工作流做不到 |
## 二、我要查「有沒有現成的東西」
@@ -39,7 +40,7 @@
| 坑 | 現況 | 怎麼避 |
|---|---|---|
| **`/cypher/search` 回假 `found`** | 對**任何**節點名都回 found(不查 registry| status 目前不可信,改用 `list_components` 自己確認。修復中(CP `arcrun-usable` 步驟 3|
| **`/cypher/search` 回假 `found`** | 2026-07-31 已修:兩庫(零件+recipe)都查,缺件回 `not_found``suggestion` 指路。舊實例(未更新部署)仍是假 found | 拿到 `not_found``suggestion` 走;拿到 `unknown`=查不到 registry ≠ 不存在 |
| **引擎沒有條件分支** | `grep ON_TRUE\|ON_FALSE` = 0`if_control` 只回 boolean | 判斷寫成獨立節點接 `ON_SUCCESS`。見 Gitea Arcrun#5 |
| **`registry/examples/` 8/13 是壞的** | 引用不存在的零件(把 recipe 當零件寫)| **別照抄 examples**,改用 `arcrun_get_workflow` 拿實跑過的 |
| **registry 可能是空的** | 安裝器無註冊步驟 ⇒ 新實例查不到零件 | 查不到 ≠ 不存在,別據此改寫成 code |