Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add SatoruoGojoo/octopus/plugin install octopusWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/satoruogojoo/octopus/build)<a href="https://agentmods.dev/commands/satoruogojoo/octopus/build"><img src="https://agentmods.dev/badge/commands/satoruogojoo/octopus/build/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/satoruogojoo/octopus/build"><img src="https://agentmods.dev/badge/commands/satoruogojoo/octopus/build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.02547 |
| Opus 5 | $0.00036 | $0.01273 |
| Sonnet 5 | $0.00015 | $0.00509 |
| Haiku 4.5 | $0.00007 | $0.00255 |
Grade A, and why
build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
這是 Octopus 的 build 管線(SDD 後半段)。你(主對話)擔任 Core 編排。
設計原則:全自主、不中途等人,但看得到進度。TPM 已在拍板停點放行過,執行中一律「保守預設+留痕」跑到底;同時 Builder 每完成一條 task 你就即時轉呈一則 task 回報(單向,不等回覆),TPM 隨行看得懂每條 task 對應的 code——這守住「理解 vs 盲簽」邊界,跑完不必回頭補看。
步驟
0. 入口閘門(確定性檢查,先做)
- CLI:Bash 跑
openspec --version。失敗 → 停,請使用者先安裝(指令以官方 README 為準:github.com/Fission-AI/OpenSpec)。 - run-marker:把當下 ISO 時間戳寫進目標 repo 的
.claude/.octopus-arena/.run(目錄不存在先建立)——守門 hook 只在 marker 有效期間生效。本管線於步驟 4 呈報告前刪除。
marker 是本管線的責任,任何出口都要清:marker 寫入後,每一條提早結束的路徑(下方的停下、拒絕,或執行中被使用者喊停)都必須先刪除
.run再回話。漏刪會讓守門殘留到 TTL(4 小時)到期,期間使用者日常的 merge/主幹 commit 會被branch-guard誤攔。
解析 change(給名稱就找 openspec/changes/<name>/):
- 找不到 → 停,Bash 跑
openspec list --changes(或 Globopenspec/changes/*/)列出現有 change 供確認;位於changes/archive/→ 拒絕(已歸檔結案,要改版請開新 change) - Read
.openspec.yaml的octopus.status:Locked→ 直接續跑Draft→ 停下請 TPM 拍板(不自動鎖定):依${CLAUDE_PLUGIN_ROOT}/commands/spec.md步驟 3 的格式呈現完整包(proposal 摘要+待拍板決策卡+tasklist),等使用者回 OK;拍板後照 spec.md 步驟 4 用 Edit 標Locked+追記 Arena,再續跑。他不拍板就停在這裡,正常結束(記得刪 marker)Implemented→ 拒絕:「此 change 已 merge。tasks 未全完成者屬結案追蹤(完成後 archive),要再動 code 請開新 change」- 缺
octopus.status→ 停:「change 缺狀態欄位,請先跑 /octopus:init 補登或親手標註」
1. 取得 tasks
Read 同目錄 tasks.md(/octopus:spec 已連 change 一起產出)。
若缺檔(手建的 change)→ 啟動 architect(窄入口:補產 tasks.md)補產,不停等確認,繼續往下。
用主對話的 todo 清單登記全部 tasks——這是 TPM 的進度條,每條回報後勾銷。
2. 實作(Builder 逐 task 派工)
這是「進度可見契約」的當前實作(設計文件 §5.2):逐條派工讓每次 agent 返回帶一條回報,Core 才能即時轉呈——因為 Claude Code 的 subagent 輸出在它返回前你看不到。Builder 本身是純執行層(不管派工節奏),逐條是**你(Core)**的編排選擇。
用 Agent 工具啟動 builder:給 change 路徑+完整 tasks+指定第一條未完成 task。它自驗狀態、建 feature branch(feat/<change-name>)、只做那一條、勾 tasks.md、返回 task 回報。
每次收到回報後:
- 即時轉呈使用者(task 回報原文——做了什麼/code 導讀/自主決定/測試),單向呈現,不停等回覆;todo 清單勾銷該條
- 用 SendMessage 對同一個 builder 指派下一條 task(不要重開新 agent——context 連貫是逐條派工的前提)
- 全部做完 → 取得最終變更摘要
3. 審查與自動修復迴圈(Reviewer ⇄ Builder)
用 Agent 工具啟動 reviewer(branch、主幹、change 路徑)取得驗收報告。
- 有 P1 → 把 P1 清單用 SendMessage 轉回同一個 builder 修,修完重審——自動迴圈,不請示
- 迴圈上限 3 輪:仍有 P1 → 不停下來空等裁決,帶著「修不掉的 P1 與原因」直接進下一步收尾,報告如實標紅、不建議 merge
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago Changed · +2 lines 041075f5fb97
- 9d ago First seen · 80 lines · 73 tokens per session scan A ce1fcf6f8089
build is a command published in the GitHub repository SatoruoGojoo/octopus (2 stars, last pushed 8d ago), licensed MIT. It adds 73 tokens to every session and 2,547 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
simplify
The over-engineering review: five tags (delete, stdlib, native, yagni, shrink), a mandatory replacement per finding, and a real null result when there is nothing to cut.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
init
Install the formatters this repository needs, with every command visible before it runs.
release
Generate changelog, bump version, and create git tag.
statusline
Show the governor fleet in your Claude Code statusline. Explicit, opt-in, and chains — it never replaces an existing statusline.
guide
Interactive guide to fellowship. Walks you through a real task using the structured research-plan-implement flow, then shows you what's next.