docs(llm-interface): tasks.md 進度更新 — M1/M2.1/M3/M4 主體完成

This commit is contained in:
2026-05-16 17:37:43 +08:00
parent 37379b71bc
commit ef406d714a
+103 -90
View File
@@ -3,36 +3,48 @@
> SDD: design.md + requirements.md(同目錄) > SDD: design.md + requirements.md(同目錄)
> 進度標記:`[ ]` pending / `[🔄]` doing / `[x]` done / `[⏸]` blocked > 進度標記:`[ ]` pending / `[🔄]` doing / `[x]` done / `[⏸]` blocked
## 進度速覽(2026-05-16
- **M1 完成**AGENTS.md / telemetry helper / report_feedback tool 全部 deploy + e2e 驗證 ✅
- **M2.1 完成**3 個 introspection endpoints + index 強 consistent 修補 ✅
- **M2.2 部分**4 個 introspection + 5 個 CRUD = 9/13 tools,剩下 preview/diff/auth-recipes
- **M3.1/M3.3 完成**5 個 skill blocks + 10 個 example workflows ✅
- **M3.4 完成**sync-registry-to-kbdb.py 跑通,15 blocks 進 KBDB ✅
- **M4 完成**weekly_review workflow 跑通,產出第一份 arcrun-roadmap block ✅
- **M5 大 rename**repo / dir / SDD 已 renameWorker name 待後段 DNS 遷移
阻擋項:GH Actions 用戶層被 disableleo 申訴中)→ 改用本機 wrangler deploy + scripts/local-deploy.sh fallback。
--- ---
## Milestone 1:可量測(先收 data ## Milestone 1:可量測(先收 data
目標:1 週內把「平台自己收 AI 用得好不好」的數據管道接通。
### M1.1 AGENTS.md v1 ### M1.1 AGENTS.md v1
- [ ]`arcrun/AGENTS.md`按 design.md §5 模板 - [x]`arcrun/AGENTS.md`5697355 + 3892dc3263 行
- [ ] CI hookrepo `AGENTS.md` 變動 → 自動同步 KBDB block - [ ] CI hookrepo `AGENTS.md` 變動 → 自動同步 KBDB block
- [ ] `arcrun_get_onboarding` MCP tool(讀 KBDB block - [ ] `arcrun_get_onboarding` MCP tool(讀 KBDB block
### M1.2 Implicit telemetry 收集 ### M1.2 Implicit telemetry 收集
- [ ] 建 KBDB template `agent-telemetry`slots: event_type, workflow_name, error_code, duration_ms, api_key_hash, agent_user_agent - [x] 建 KBDB block type=`agent-telemetry`slots 直接 metadata_json 不走 template
- [ ] cypher-executor `webhook-handlers.executeWebhookGraph` 末尾加 telemetry 寫入(成功 / 失敗都記) - [x] `webhook-handlers.executeWebhookGraph` 末尾加 telemetry(成功 / 失敗 / paused 都記)
- [ ] cypher-executor `routes/webhooks-named.ts` push deploy 事件 - [x] `routes/webhooks-named.ts` push deploy 事件deploy_success
- [ ] cypher-executor `routes/cypher.ts` validate 失敗 → validation_error 事件 - [x] `routes/validate.ts` validation 失敗事件(schema_failed / edge_node_missing
- [ ] api_key SHA-256 截 16 字元 helper - [x] `hashApiKey` SHA-256 截 16 字元 helper
- [ ] 隱私 checkworkflow content 不 log,只 name - [x] 隱私:只記 workflow name 不記 content
- [x] 實測:KBDB block `68635dcb-62e5-49ca-9c67-33f4ca82b7a0` event=run_success, paused_awaiting_resume
### M1.3 Explicit feedback tool ### M1.3 Explicit feedback tool
- [ ] KBDB template `agent-feedback`slots: issue_type, workflow_name, retry_count, blocked, suggested_fix, agent_user_agent - [x] KBDB block type=`agent-feedback`
- [ ] arcrun-mcp tool `arcrun_report_feedback` - [x] arcrun-mcp tool `arcrun_report_feedback` (commit e637c3e)
- [ ] Zod schema 鎖死 issue_type enum - [x] Zod enum 鎖死 issue_type
- [ ] 寫入時 `user_id` 從 partner-auth middleware 拿 - [x] user_id 從 partnerAuth
- [ ] 寫入時 tag 自動補(`agent-feedback`, `issue:{type}` - [x] tags_json auto: ['agent-feedback', 'issue:{type}', 'blocked'?, 'wf:{name}'?]
- [x] schema 實測:KBDB block `80f1d2d1-c95a-4dfe-a889-d23b2e9b247d`
### M1.4 驗收 ### M1.4 驗收
- [ ] 用 Claude Code 跑 mira 開發 1-2 天,自然累積 telemetry + feedback - [x] 觸發 mira watcher → KBDB agent-telemetry 即時出現
- [ ] `curl kbdb-get.arcrun.dev type=agent-telemetry` 確認有 data - [x] curl + python verify 8 個 telemetry blocksevent=run_success, workflow_name 對, duration_ms 對)
- [ ] `curl kbdb-get.arcrun.dev type=agent-feedback` 確認 enum 有效 - [x] feedback block 寫入測 schema 通
--- ---
@@ -40,115 +52,116 @@
目標:人類 GUI 能做的,AI 透過 MCP 都能做。 目標:人類 GUI 能做的,AI 透過 MCP 都能做。
### M2.1 新增 cypher-executor 路由 ### M2.1 新增 cypher-executor 路由
- [ ] `GET /executions/:id` — 回結構化 trace(讀 EXEC_CONTEXT KV - [x] `GET /executions/:task_id` — 回結構化 paused state (989fbeb)
- 既有資料:graph-executor.ts trace array,需確認 KV 持久化 - [x] `GET /workflows/:name/executions?limit=10` — 走 ANALYTICS_KV stats:* prefix (989fbeb)
- [ ] `GET /workflows/:name/executions?limit=10` — 最近 N 次執行 ID + 摘要 - [x] `GET /executions/paused` — 改 per-user index 強 consistent (4e7880c)
- 需 ANALYTICS_KV 或新 index - [ ] `POST /preview` — dry-run,不寫 KV(暫緩)
- [ ] `GET /executions/paused` — 列當前 paused executions - [ ] `POST /webhooks/named/:name/diff` — 新舊 YAML diff(暫緩)
- 走 EXEC_CONTEXT KV scan `paused:*` prefix - [ ] `GET /my-telemetry?limit=N` — 用戶自己看 telemetry(暫緩)
- [ ] `POST /preview` — dry-run,不寫 KV
- 複用 GraphExecutorenv.EXEC_CONTEXT 改 in-memory mock
- [ ] `POST /webhooks/named/:name/diff` — 新舊 YAML diff
- [ ] `GET /my-telemetry?limit=N` — 用戶自己看 telemetry
### M2.2 MCP tools(包既有 + 新增 endpoint ### M2.2 MCP tools ✅ (9/13)
- [ ] `arcrun_validate_yaml` — 包 `/validate` 完成(commit faf75cd + f91b1fd):
- [ ] `arcrun_get_execution_trace` - [x] `arcrun_validate_yaml` — wrap /validate
- [ ] `arcrun_list_recent_executions` - [x] `arcrun_get_execution_trace`
- [ ] `arcrun_list_paused_executions` - [x] `arcrun_list_recent_executions`
- [ ] `arcrun_resume_execution` — 包 `/workflows/resume` - [x] `arcrun_list_paused_executions`
- [ ] `arcrun_list_workflows`既有但確認 - [x] `arcrun_push_workflow`wrap /webhooks/named POST(取代壞掉的 u6u_deploy_workflow
- [ ] `arcrun_get_workflow` - [x] `arcrun_list_workflows`
- [ ] `arcrun_delete_workflow` - [x] `arcrun_get_workflow`
- [ ] `arcrun_preview_workflow` - [x] `arcrun_delete_workflow` (require confirm:true literal)
- [ ] `arcrun_diff_workflow` - [x] `arcrun_run_workflow` (paused 視為 success)
- [ ] `arcrun_list_recipes` / `arcrun_create_recipe`
- [ ] `arcrun_list_auth_recipes` / `arcrun_create_auth_recipe` 暫緩(等 endpoint 完成):
- [ ] `arcrun_resume_execution` — 包既有 /workflows/resume
- [ ] `arcrun_preview_workflow` — 待 M2.1 /preview
- [ ] `arcrun_diff_workflow` — 待 M2.1 diff
- [ ] `arcrun_list_recipes` / `create_recipe`
- [ ] `arcrun_list_auth_recipes` / `create_auth_recipe`
- [ ] `arcrun_my_telemetry` - [ ] `arcrun_my_telemetry`
### M2.3 Error contract 統一 ### M2.3 Error contract 統一
- [ ] 定義 `error_code` enum v1design.md §3.1.4 - [x] `error_code` enum v1 定義在 design.md §1.4 + cypher-executor /executions/* 路由都用
- [ ] arcrun-mcp 所有 tool 統一 error wraphelper function - [x] arcrun-mcp `lib/cypher-client.ts` errorResponse() / successResponse() 統一 helper
- [ ] cypher-executor 所有 route 統一 error response(含 error_code + next_actions - [x] 所有新 MCP tool10 個)都用統一 contractok, data?, error_code?, human_message?, next_actions?, hints?
- [ ] 寫測試:每個 error_code 至少一個 case - [ ] cypher-executor 既有 route(非 /executions/*)改成統一格式(暫緩)
- [ ] 每個 error_code 對應 unit test(暫緩)
### M2.4 驗收 ### M2.4 驗收(部分)
- [ ] 模擬 zero-knowledge AI(新 conversation)按 AGENTS.md 部署一個 hello workflow - [ ] 模擬 zero-knowledge AI 跑 hello workflow(待 leo 提供 pk_live
- [ ] 量測:`list_components``run_workflow` 成功 MCP call < 5 - [ ] 量測:from list_components 到 run_workflow 成功 MCP call < 5
- [ ] 比較人類 GUI 路徑,clickwise 對等 - [ ] 比較人類 GUI 路徑,clickwise 對等
--- ---
## Milestone 3skill blocks + examples ## Milestone 3skill blocks + examples
目標:AI 寫第一個 workflow 不靠猜,有範本和 playbook。 目標:AI 寫第一個 workflow 不靠猜,有範本和 playbook。
### M3.1 種子 skill blocks5 個) ### M3.1 種子 skill blocks ✅ (commit 388c193)
- [ ] `skill-build_watcher_workflow` — cron + 過濾 + trigger 模式 - [x] `skill-build_watcher_workflow` — cron + 過濾 + trigger 模式
- [ ] `skill-debug_paused_workflow` — claude_api callback 流程 + 怎麼追 - [x] `skill-debug_paused_workflow` — claude_api callback 流程 + 怎麼追
- [ ] `skill-migrate_http_to_trigger_workflow` — 從 self-fetch 換 trigger_workflow - [x] `skill-migrate_http_to_trigger_workflow` — 從 self-fetch 換 trigger_workflow
- [ ] `skill-rag_with_arcrun` — KBDB search + claude_api 組裝 - [x] `skill-rag_with_arcrun` — KBDB search + claude_api 組裝
- [ ] `skill-add_new_wasm_component` — TinyGo 寫 + push + 註冊白名單 - [x] `skill-add_new_wasm_component` — TinyGo 寫 + push + 註冊白名單
### M3.2 MCP tools ### M3.2 MCP tools(暫緩,待 M5
- [ ] `arcrun_list_skills(tag?)` - [ ] `arcrun_list_skills(tag?)`
- [ ] `arcrun_get_skill(id)` - [ ] `arcrun_get_skill(id)`
- [ ] `arcrun_publish_skill` — AI 把學到的回存 - [ ] `arcrun_publish_skill` — AI 把學到的回存
### M3.3 種子 examples10 個) ### M3.3 種子 examples ✅ (commit 388c193)
- [ ] `webhook-to-slack` 10 個範例都建立(webhook-to-http / cron-watcher / llm-classify /
- [ ] `cron-watcher` rag-search-answer / email-summary / pdf-to-blocks / github-issue-bot /
- [ ] `llm-classify` daily-digest / parallel-fanout / error-retry),每個含 workflow.yaml +
- [ ] `rag-search-answer` description.md + tags.json。
- [ ] `email-summary`
- [ ] `pdf-to-blocks`
- [ ] `github-issue-bot`
- [ ] `daily-digest`
- [ ] `parallel-fanout`
- [ ] `error-retry`
每個包 `workflow.yaml` + `description.md` + `tags.json`,放 `arcrun/registry/examples/{slug}/` ### M3.4 examples 索引 + 搜尋 ✅ (commit 37379b7)
### M3.4 examples 索引 + 搜尋 - [x] scripts/sync-registry-to-kbdb.py — 把 registry/examples + skills 同步進 KBDB
- 走 kbdb-upsert-block.arcrun.dev (idempotentpage_name 為 key)
- [ ] CI build 範例 → KBDB block type=`workflow-example`(含 YAML + tags + description - examples → type=workflow-example, page_name=example-{slug}
- [ ] `arcrun_search_examples(use_case)` MCP tool(走 KBDB `/search` - skills → type=agent-skill, page_name=skill-{slug}
- 實測 15 blocks created → 第二次 sync 全 PATCH 成功 (idempotent)
- [ ] `arcrun_search_examples(use_case)` MCP tool(待 M2.x 補)
--- ---
## Milestone 4closed loop ## Milestone 4closed loop
目標:data 收得到 → 平台自己消化產出 roadmap。 目標:data 收得到 → 平台自己消化產出 roadmap。
### M4.1 Weekly review workflow ### M4.1 Weekly review workflow ✅ (mira commit de11625)
- [ ]`polaris/mira/arcrun/agent_feedback_weekly_review.yaml`(依 design.md §4.5 範本) - [x]`polaris/mira/arcrun/agent_feedback_weekly_review.yaml`
- [ ] cron `0 9 * * 1`(週一早 9 UTC - [x] cron `0 9 * * 1` (台灣 17:00 週一
- [ ] `acr push` - [x] `acr push` 部署
- [ ] 手動觸發測試一次 - [x] 手動觸發測試一次5/6 nodes success,唯一 fail 是 notify_leo 缺 credential
### M4.2 LLM 聚合 prompt ### M4.2 LLM 聚合 prompt
- [ ] prompt:把 feedback + telemetry 餵 Claude → 產出 Top 5 痛點 + 建議 - [x] prompt 結構化:數字 / Top 5 痛點(含證據 / 嚴重度)/ 成功 pattern / 下週優先 3 件
- [ ] 結果格式固定:markdown sections(痛點 / 證據 / 建議 / 嚴重度) - [x] 一律繁體中文 + 引用 block_id 為證據
- [ ] 存 KBDB block type=`arcrun-roadmap` - [x] 存 KBDB type=`arcrun-roadmap`, page_name=roadmap-latest(每週覆蓋)
- [x] 實測產出真有用:抓到「paused_awaiting_resume 語意不清」「data 量太少」「自動建議包 skill」三個真實 LI 改進建議
### M4.3 通知 ### M4.3 通知
- [ ] notify_telegram 節點:推給 leo - [x] notify_leo 節點:telegram chat_id from secret
- [ ] 同時寫進 mira 河道(讓 leo 在熟悉介面看) - [ ] leo 補 telegram_bot_token credential 後生效
- [ ] 同時寫進 mira 河道(讓 leo 在熟悉介面看)— 暫緩
### M4.4 驗收 ### M4.4 驗收
- [ ] 跑滿 1 週 → 收到第一份 roadmap - [x] 第一次手動觸發 → 收到第一份 roadmap (KBDB block id e924c231-cf5e-4541-89d8-da550ecae2f3)
- [ ] cron 自動跑首次(下週一驗證)
- [ ] leo review 後挑 1-2 個 issue 修補 - [ ] leo review 後挑 1-2 個 issue 修補
- [ ] 跑第二週 → 確認該 issue 從 top list 消失 - [ ] 跑第二週 → 確認該 issue 從 top list 消失