Files
Arcrun/cli/harness/commands/arcrun.md
T
uncle6me-web 037cf9b6a4 feat(harness): 用戶 CC harness(acr install-harness)+ 公開 repo 只留對外
讓「用 arcrun 開發」的用戶,他的 CC 自動載入 arcrun 防護、不退回自寫 Python。

新增 user-cc-harness(SDD: .agents/specs/user-cc-harness,本機):
- acr install-harness:冪等裝進用戶當前專案(新/舊專案皆可),acr init 末尾也順便裝
  - CLAUDE.md arcrun 區塊(標記包夾,append 不破壞既有)
  - .claude/skills/arcrun-mindset(世界觀 + 資源去哪取 acr parts/auth-recipe)
  - .claude/commands/arcrun.md(/arcrun slash command)
  - .claude/hooks/arcrun-guard.sh(python→提醒不硬擋、暴露→exit 2、每條含正路)
  - settings.json 合併 hook(不覆蓋用戶既有 hooks/設定)
- llms.txt + README「給 AI」段:第一接觸點(用戶丟連結,CC 讀了知道第一步 install-harness)
  含 CF 憑證白話照抄式引導(不對用戶講 KV/Worker/R2 術語)
- harness 素材內嵌 npm 套件(cli/harness/,files 帶上),不依賴用戶有 arcrun repo
- 實測:空目錄/冪等/既有檔合併皆通過,tsc exit 0,npm pack 含 harness 5 檔

公開 repo 清理(richblack:用戶要用不要開發 arcrun):
- git rm --cached 移除開發痕跡 + 思考過程出公開 repo(本機保留供 richblack 開發):
  .claude/CLAUDE.md/AGENTS.md/.agents/docs/DECISIONS/BACKLOG/landing/.github
- .gitignore 防回流;補 MIT LICENSE

MCP(P7)納入 install-harness/update 的接點已設計,實作待 MCP 對齊(BACKLOG 另一條線)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:02:44 +08:00

30 lines
1.7 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.
# 用 arcrun 完成這個自動化需求
使用者想做一個自動化。你的任務:用 arcrun 做出來,全程不要讓使用者自己寫程式。
## 鐵則
- **用 arcrun 工作流 / recipe,絕不自己寫 Python/Node 腳本。** 使用者選 arcrun 就是不想要一次性腳本。
- 打外部 API → 寫 recipe`acr recipe push`),不自刻 HTTP client。
- 不自製零件(WASM)—— 零件由 arcrun 維護。你能用的是現有零件 + recipe + 工作流。
- 需要 AI 判斷時你自己做,不要讓工作流回頭呼叫 LLM。
## 步驟
1. 先讀 **arcrun-mindset** Skill(世界觀 + 資源去哪取)。
2.`acr parts` 看零件、`acr auth-recipe list` 看支援的認證。**先查再動手。**
3. 把使用者需求拆成工作流(哪些零件、什麼順序、什麼條件),寫成 `.yaml`
4. 需要 credentialAPI key / token)→ 用 `acr auth-recipe scaffold <service>` 看要哪些,
明確告訴使用者去哪取得、怎麼 `acr creds push`
5. `acr validate` 通過後 `acr push` 部署,告訴使用者 webhook URL / 怎麼 `acr run`
6. 完成給客觀證據(HTTP 2xx / trace),不要只說「做好了」。
## 遇到要暴露資料(對外 webhook)
停下來,明確告訴使用者「這會讓 X 可被外部呼叫」,要他同意。不要替他決定公開。
## 還沒設定好 arcrun
`acr` 指令不存在或還沒 `acr init`:先帶使用者完成前置設定
(裝 CLI → 拿 Cloudflare 帳號的兩串憑證 → `acr init --self-hosted`)。
拿 Cloudflare 憑證時用白話照抄式引導,不要對使用者講 KV / Worker / R2 等術語。
## 使用者的需求
(使用者打在 /arcrun 後面的文字會接在這裡)