Files
Arcrun/system-dev/docs/3-specs/user-cc-harness/tasks.md
T
uncle6me-web 5d00e71275 chore: D22 落地——docs/SDD/wiki/CLAUDE.md 進 repo(Gitea private 預設全 push)
頂層 D22 決策(leo 2026-07-03 拍板):推什麼由開發環境歸屬決定,
Gitea private=除機敏值/build 產物/.github 外全 push。
解 T1.5 卡點:雲端工人 clone 拿得到 credential-store-migration.md,可就地改寫 SDD。
機敏掃描兩輪通過(新增 189 檔約 2.1MB,node_modules/dist/wasm 照舊排除)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 07:13:33 +08:00

54 lines
4.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Tasks: 用戶 CC harnessacr install-harness
> 對應 design.md。**design 待 richblack review 後才動 code。**
> 每完成一個 task 立刻標 [x],不批次。
---
## 待 review 確認(design §8 開放問題)
- [ ] Q1 python 提醒強度:「提醒 + 要 CC 自證」(傾向)vs 硬擋?
- [ ] Q2 CLAUDE.md append(標記包夾,傾向)vs 獨立檔?
- [ ] Q3 CLAUDE.md 放靜態零件清單 vs 只指「跑 acr parts」(傾向動態)?
- [ ] Q4design §8.5,壓測 §9)暴露動作同意機制:選③「AI 代跑」+「以後不要問我」+ 同意記錄要不要支援?(a) 維持選①/② 誠實告知選③不支援(傾向)/ (b) arcrun 預留「hook 驗同意 token」那半 / (c) 法律記錄。**安全約束:同意訊號不可由 AI 自產,需 harness 寫、hook 驗。本次只修了選②的字串 bug(A6),其餘待 richblack 拍板**
## 第一接觸點(§1.0,用戶只丟連結 + 聊天)
- [x] E1 `llms.txt`(repo 根):給 CC 的啟動指南(第一步 install-harness + 鐵則 + 啟動流程 + CF 白話引導)。部署到 arcrun.dev/llms.txt 待網站部署
- [x] E2 README 開頭加「🤖 給 AI 操盤手」段:導向 install-harness + llms.txt
- [x] E3 CF 憑證話術(不講術語、照抄式)內建進 llms.txt(design §1.0 步驟2 已定稿,CF 白癡化焦點)
## A. harness 素材(內嵌 npm 套件,SSOT=cli/harness/
- [x] A1 `cli/harness/CLAUDE.block.md`CLAUDE.md arcrun 區塊(標記包夾)
- [x] A2 `cli/harness/skills/arcrun-mindset/SKILL.md`:mindset + 「資源去哪取」表 + 去 DECISIONS 引用
- [x] A3 `cli/harness/commands/arcrun.md`/arcrun slash command
- [x] A4 `cli/harness/hooks/arcrun-guard.sh`:用戶版 guardpython 提醒不硬擋 / 暴露 exit 2 / 每條含正路)
- [x] A5 `cli/harness/settings.fragment.json`hook 註冊片段
- [x] A6 修正壓測 §9.5 字串比對 bugguard hook 用 `grep "acr push"` 連「輸出/heredoc 裡**提到** push 字串」都擋 → 違反 §0.5「擋下必須印出正路」自身鐵則(連選②的可貼指令都印不出)。啟發式區分「執行 push」vs「展示指令」,誠實標明(mindset §7:shell 層無法 100% 區分,降低誤殺非完美)✓ 改法:awk 抽掉 heredoc 主體 → 看 push 是否在「實際執行命令列」的命令位置(行首 / ; & | && ||);block 訊息一併補上選②可貼指令(符合 §0.5)
## B. install-harness 指令
- [x] B1 `cli/src/commands/install-harness.ts`:冪等安裝 —— CLAUDE.md append(標記包夾)、複製 skill/command/hook、settings 合併不覆蓋
- [x] B2 從已安裝套件目錄解析 harness 路徑(import.meta.url → dist/commands → ../../harness
- [x] B3 `cli/src/index.ts` 註冊 `acr install-harness`
- [x] B4 `cli/src/commands/init.ts` 末尾呼叫 install-harness(失敗不擋 init
- [x] B5 `cli/package.json` `files``harness/`(素材原樣打包,不經 build
- [ ] B6 install-harness 加 P7`claude mcp add` arcrun MCP**待 MCP 對齊**,§2.5optional
- [ ] B7 `acr update` 納入 MCP 連線對齊(**待 MCP 對齊**,§2.5
> MCP 對齊本身(u6u_*→arcrun 命名 / finally.click→arcrun.dev / 移除 api_config 反模式 / 確認薄殼)
> 是**另一條 BACKLOG 線**,不在本 SDD;本 SDD 只做「MCP 納入 install-harness/update 的接點」。
## C. 驗收(design §7,客觀證據)
- [x] C1 空目錄 install-harness → 產生 5 檔(CLAUDE.md + skills/arcrun-mindset + commands/arcrun.md + hooks + settings.json)✓ 實測
- [x] C2 重跑不重複(冪等)✓ 實測:跑兩次 CLAUDE.md 區塊仍 1 對、guard hook 仍 1 個
- [x] C3 已有 CLAUDE.md + settings.json(含用戶自己 hook/設定)→ 合併不破壞 ✓ 實測:原內容/hook/設定全保留
- [ ] C4 trust 後試「寫 python 自動化」→ 收到提醒(需真 Claude Code session 測,hook 邏輯已寫)
- [x] C5 每個 guard 訊息含可執行下一步(§0.5 鐵則)✓ hook 內 remind/block 都帶「正路:」
- [ ] C6 打 `/arcrun <需求>` → CC 走 command 流程(需真 session 測,command 內容已寫)
- [ ] C7 `npm pack` tarball 含 harness/ 素材(待 npm 發布步驟驗)
- [x] C8 cli `tsc --noEmit` exit 0 ✓
- [x] C9 (A6) guard hook 執行 vs 展示啟發式:8/8 案例正確(真執行 4 種全 BLOCK:純執行/cd&&/echo;/recipe;展示 4 種全 ALLOWecho提到/printf提到/cat-heredoc/無關)+ 邊角(env 同意放行、pipe||後執行 BLOCK、heredoc-dash ALLOW);`bash -n` 語法 OK