Inspectrum

io.github.yannmenec由 GitHub 帳號 yannmenec 發布v0.2.3更新於 Oct 24, 2026

Review coding-agent plans on demand with peer models, attributed findings, and a structured verdict.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

讓助理把編碼代理的計畫交給另一個模型獨立審查,並取回附歸屬說明的結構化結論。

可以做什麼
Inspectrum 提供 review_plan 介面,把計畫送給一個或多個審查模型,回傳統一的結論形式:核准、修改或拒絕,並依嚴重程度列出問題,同時標明是哪位審查者提出的。它可以平行執行多個審查者,再用裁判模型彙整成單一結論。Claude Code 外掛還會在計畫進入執行前的節點自動觸發審查,限制修改輪數,並在本機記錄每次審查的工作階段日誌。
適用情境
當代理的計畫涉及難以復原的操作時適用,例如資料遷移、驗證變更、付款流程或部署,你希望在核准前有一個可重複的獨立檢查。它也適合希望這項檢查自動執行、而不必依賴記住某段提示的情況。若只是偶爾需要第二意見,用規則讓一個代理呼叫另一個代理可能就夠了。
執行需求
透過 npm 套件 inspectrum 以 stdio 在本機執行,需要 Node 20 或更新版本。預設審查者是 Codex CLI,必須已安裝並以 ChatGPT 訂閱登入;使用 Claude 作為審查者需要 Claude Code 與 Claude Pro 或 Max 訂閱。無介面或 CI 環境可改為在宿主端的 env 區塊傳入 OPENAI_API_KEY、ANTHROPIC_API_KEY 或 GEMINI_API_KEY。也可設定本機 Ollama 端點,達到零外送的審查。
安裝前請注意
計畫與上下文會傳送給所有已設定的審查者,因此不要把機密寫進計畫;使用者家目錄下的工作階段日誌會保存完整計畫與審查結果。審查會消耗現有訂閱的額度,使用 API 金鑰的後端由對應服務商計費。agy 後端無法被限制,只應用於可信任的計畫。這個關卡不會自動核准,遇到執行錯誤時會放行並顯示警告。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Inspectrum,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Inspectrum

Independent review before a risky agent change becomes hard to undo.

[CI] [npm] [License: MIT] [Node >= 20]

Claude plans it. GPT reviews it. You approve it.


A plausible plan can commit an agent to a migration, authentication change, payment flow, compatibility break, or deployment that is expensive to undo.

Inspectrum is an independent pre-flight check before that decision. Its first automatic integration runs when Claude Code exits plan mode: Codex (GPT) reviews the plan before the approval dialog reaches you, findings can send the plan back for revision, and you keep final approval. If the reviewer cannot run, the plan passes through with a visible warning instead of being silently reported as reviewed.

Here, independent means a reviewer distinct from the author model, invoked separately. It does not mean their errors are statistically independent. Inspectrum makes the checkpoint repeatable and its failures visible; a net reliability gain and a defensible moat are not yet proven. The post-0.2.2 strategy defines the evidence gates and keeps code review, pull-request review, and pair programming out of scope.

When a skill is enough

For an occasional second opinion, a rule can tell one agent to call another and compare the replies. That is a reasonable lightweight option.

Inspectrum is for the repeatable checkpoint. In Claude Code, the plugin runs at the plan-to-execution boundary without relying on a remembered prompt, caps revision loops, and fails open on operational errors. Other local MCP hosts can call the same review_plan contract on demand. Both paths keep findings attributed, return a common verdict shape, preserve human control, and write local evidence for successful reviews.

Recreating those guarantees with a skill means maintaining the orchestration, output validation, health checks, failure policy, and session record yourself.

Public availability as of 1 August 2026: npm 0.2.3, the GitHub release, and the repository's Claude and Codex plugins are aligned on 0.2.3. Glama is public. The MCP Registry may still show 0.2.2; it was not republished in this pass. Inspectrum was not in the public Claude Community catalog, while PulseMCP blocked the one-time recheck with HTTP 403, so no current PulseMCP listing claim is made.

The public 0.2.3 activation evidence records exact commands, timings, one useful finding, one null result, one visible fail-open case, and the limits of the measurement.

Quick start

You need Node 20+, Claude Code, and Codex CLI >= 0.99.0 authenticated with a ChatGPT subscription (no API key):

bash
claude plugin marketplace add yannmenec/inspectrumclaude plugin install inspectrum@inspectrum

That's the whole install. Next time you finish a plan in plan mode:

text
⏺ ExitPlanMode  ⎿  inspectrum×codex: REVISE (round 1/2)          # abridged — real output     Majors:                                       # adds a full-report path     - [codex] Migration drops the unique index before backfilling —       concurrent writes can insert duplicates.       Fix: backfill first, drop the index last.     Revise the plan to address these findings, then finish the plan again.
⏺ ExitPlanMode  ⎿  inspectrum: codex approved the plan (session 2026-07-12…).     ┌ Ready to code? ────────────────     │ Here is Claude's plan…        ← your normal approval dialog

No prompt to remember, no button, zero tokens spent on triggering. The gate is a deterministic hook — it fires on every plan, whether your session runs Fable, Sonnet, or Haiku. Two commands give you the automatic gate; the on-demand /inspectrum:review command needs one extra line (registering the MCP server — shown in the assisted setup below).

Prefer the agent to install and check everything for you? Paste this into Claude Code.
text
Set up Inspectrum's Codex plan gate. Use normal approvals only — do notswitch to Bypass Permissions or Full Access.
Steps:1. Run `node --version`. If < 20, stop and tell me to install Node 20+   from https://nodejs.org first.2. Run `codex --version`. If it is missing or older than 0.99.0, run   `npm install -g @openai/codex@latest` and verify again.3. Run `claude plugin marketplace add yannmenec/inspectrum`, then   `claude plugin install inspectrum@inspectrum`.4. Run `claude mcp add --transport stdio --scope user inspectrum -- npx -y inspectrum@latest`   (this powers the on-demand /inspectrum:review command).5. Run `npx -y inspectrum@latest doctor` and show me the output,   including the resolved codex model/effort lines.6. Run `codex login status`.   - If it prints "Logged in", tell me: "✅ Setup complete. Your next     plan-mode plan gets a Codex review automatically." Done.   - Otherwise (not logged in), pop open a Terminal window with codex     already running by executing:       `osascript -e 'tell application "Terminal" to do script "codex"'`     Then tell me: "A Terminal window opened with codex running.     Inside that window, click 'Sign in with ChatGPT', complete the     login in my browser, then close the Terminal window. Inspectrum     is then ready."
Do NOT use sudo, edit shell profiles, push git changes, read .env orcredentials, or publish packages. Report back: Node version, codexinstall status, doctor verdict, and whether login was needed.

How it works

you ──▶ Claude Code ──▶ plan ready ──▶ ExitPlanMode                                          │                              inspectrum plan-gate (hook)                                          │                              Codex reviews the plan                              (read-only sandbox, your ChatGPT sub)                                          │                    ┌─────────────────────┴──────────────────────┐              APPROVE ✅                                REVISE / REJECT ❌                    │                                             │        your approval dialog                    findings go back to Claude,        appears as usual                        it revises, gate runs again                                                       (max 2 rounds)

Built to be boring and safe:

  • Fails open. Codex not installed, logged out, timed out, network down — the plan proceeds with a visible warning. Operational errors don't block your work; the gate degrades, it doesn't brick.
  • Never auto-approves. A green review still lands on your approval dialog. The gate can delay it (while Claude revises) but can never click it — you keep the final call.
  • No wasted reviews. Within a session, an unchanged plan is hash-cached and not re-reviewed; only real revisions spend a round.
  • Read-only reviewer. Codex runs in a pinned read-only sandbox (codex exec -s read-only --ephemeral), and sandbox-weakening flags in your config are stripped. The reviewer reads; it doesn't write.
  • Kill switch. [plan_gate] enabled = false in ~/.inspectrum/config.toml, or disable the plugin per project.

Why a separate reviewer?

  • Plans are leverage. A flaw caught before execution can be cheaper to fix than the same flaw found after a difficult-to-reverse change.
  • Separation makes the check inspectable. The author and reviewer run independently, and findings remain attributed.
  • Cross-provider value is a hypothesis. Claude and GPT can raise different objections, but Inspectrum has not yet proved that this produces a net reliability gain after false positives, triage, cost, and latency.
  • Use an existing subscription. No separate API bill when using your ChatGPT subscription; reviews consume your existing Codex subscription allowance. API-key backends are billed by their provider.

What's in the box

🚦 Plan gateEvery Claude Code plan reviewed by Codex before it reaches you — automatic, max 2 revision rounds
🔍 On-demand review/inspectrum:review or "Review this plan with Inspectrum" from any MCP host
🧑‍⚖️ Multi-reviewer + judgeRun codex + gemini + claude in parallel; a judge consolidates into one verdict
📋 One verdictapprove / revise / reject + findings by severity, with reviewer attribution
🗂️ Session logsMarkdown record of every review — verdict, findings, revised plan — under ~/.inspectrum/sessions/ (0700 perms)
🩺 inspectrum doctorOne command to check your reviewer is installed, authenticated, and resolving the right model — fails loudly if Codex is logged out

Works with

Your agentYour reviewerSetup
Claude CodeCodex (GPT)Plugin — 2 commands above
Codex app / CLIClaudecodex mcp add inspectrum -- npx -y inspectrum@latest + config below
Claude Desktop (macOS)Codex (GPT)Download inspectrum-0.2.3.mcpb, open, confirm. The earlier v0.2.0 bundle was incomplete — use the v0.2.3 asset, not npm/stdio.
CursorCodex (GPT)[Add to Cursor]
Codex app / CLI setup — use Claude as your reviewer

Paste this into the Codex app or CLI:

text
Set up Inspectrum so I can review my plans with Claude. Use normalapprovals only.
Steps:1. Run `node --version`. If < 20, stop and tell me to install Node 20+   from https://nodejs.org first.2. Run `claude --version`. If "command not found", run   `npm install -g @anthropic-ai/claude-code` and verify again.3. If `~/.inspectrum/config.toml` does not exist, create it with:
   [defaults]   reviewers = ["claude"]
4. Run `codex mcp add inspectrum -- npx -y inspectrum@latest`5. Run `npx -y inspectrum@latest doctor` and show me the output.6. Pop open a Terminal window with claude already running so I can   confirm or complete login, by executing:     `osascript -e 'tell application "Terminal" to do script "claude"'`   Then tell me:   - "If claude shows its chat prompt, you're already logged in —     close the Terminal window. Inspectrum is ready."   - "If claude shows /login or opens a browser, complete the sign-in     with your Claude account, then close the Terminal window.     Inspectrum is then ready."   (The ⚠ claude line in the doctor stays even after login because   claude doesn't expose a status command we can detect — harmless.)
Do NOT use sudo, edit shell profiles, push git changes, read .env orcredentials, or publish packages. Report back: Node version, claudeinstall status, doctor verdict, and whether login was needed.

Needs a Claude Pro/Max subscription — no API key.

Tuning

Which model reviews, at which effort? On the Codex side, precedence is:

Setting1st (wins)2nd3rd
model[reviewers.codex] model in ~/.inspectrum/config.tomlmodel in ~/.codex/config.tomlcodex built-in default
reasoning effort[reviewers.codex] effortmodel_reasoning_effort in ~/.codex/config.tomlcodex built-in default

inspectrum doctor prints the resolved values. High effort gives the deepest reviews but can take minutes per plan — drop to effort = "medium" in [reviewers.codex] if the gate feels slow.

Full config — more reviewers, judge, limits (~/.inspectrum/config.toml)
toml
[defaults]reviewers = ["codex", "gemini"]   # called in paralleljudge     = "codex"               # consolidates when >= 2 reviewersfocus     = "all"                 # correctness | completeness | risk | clarity | all
[plan_gate]                       # ExitPlanMode hook behaviorenabled          = truemax_rounds       = 2              # denials before the plan passes throughreason_max_chars = 3000           # budget for findings fed back to Claude# reviewers      = ["codex"]      # gate-specific override of defaults.reviewers
[reviewers.codex]effort          = "high"          # passed as -c model_reasoning_effort=hightimeout_seconds = 300             # per-reviewer override of limits.timeout_seconds# model         = "gpt-5.6-sol"   # passed as -m; omit to inherit ~/.codex/config.toml
[reviewers.gemini]type   = "cli"binary = "gemini"model  = "gemini-2.5-pro"
[reviewers.muse]type   = "cli"binary = "muse"                   # muse exec, prompt passed via --prompt-file# model  = "..."                  # omit to inherit muse's own default# effort = "high"                 # passed as --reasoning-effort
[reviewers.opencode]type   = "cli"binary = "opencode"               # opencode run, prompt on stdin# model  = "google/gemini-2.5-flash"   # -m, provider/model form# effort = "high"                 # passed as --variant
[reviewers.agy]type   = "cli"binary = "agy"                    # schema-constrained structured output# model  = "..."                  # passed as --model# effort = "high"                 # --effort; only some models accept it
[reviewers.grok]type   = "cli"binary = "grok"                   # confined to a read-only tool allow-list# model  = "grok-4.6-build"       # passed as -m# effort = "high"                 # passed as --effort
[reviewers.local]type     = "http"backend  = "ollama"endpoint = "http://localhost:11434"model    = "qwen2.5:0.5b"
[limits]report_max_chars = 8000           # caps the stored reporttimeout_seconds  = 300            # default reviewer wallclock

Without a config file, reviewers = ["codex"] is used. No-API-key setups: the codex CLI works with a ChatGPT login, and the agy backend is Google's Antigravity CLI (curl -fsSL https://antigravity.google/cli/install.sh | bash), which signs in with a personal Google account — the free-tier path that succeeds the retired gemini CLI. Experimental backends: kimi, qwen, openrouter, ollama (local, zero egress). The muse backend runs muse exec confined with --disable-shell --disable-write (a plan under review is untrusted input); --yolo, --disable-sandbox and --enable-shell-tool are rejected from args. The opencode backend runs opencode run --agent summary, a permission set that denies tool use (the default build agent will happily run shell commands from plan text); --agent, --auto and --format are rejected from args. The agy backend (Antigravity CLI) constrains its output with --json-schema, so reviews are schema-checked at the source; --effort is sent only when you set it (some models reject it). agy is the one backend inspectrum cannot confine: --sandbox and --mode plan were both verified NOT to stop a write (agy 1.1.27), so only use agy for plans you trust — muse, opencode and grok are the confined options, and inspectrum doctor warns whenever agy is configured. The grok backend is confined with a --tools allow-list (read_file,grep,list_dir): its --sandbox profile and --disallowed-tools were both verified NOT to stop a shell write, the allow-list was. --tools, --always-approve and --permission-mode are rejected from args. The gemini backend is deprecated and will be removed — migrate to agy.

Headless or CI host that can't run an interactive login? Pass the peer API key through the MCP host's env block instead — OPENAI_API_KEY (codex), ANTHROPIC_API_KEY (claude), GEMINI_API_KEY (gemini). Manual JSON/TOML examples live under examples/.

bash
# Register the MCP server without the plugin:claude mcp add --transport stdio --scope user inspectrum -- npx -y inspectrum@latest   # Claude Codecodex mcp add inspectrum -- npx -y inspectrum@latest                                   # Codex
# The automatic plan gate must use the plugin's pinned fail-open shim; do not# register plan-gate through a mutable npm tag.
# Verify everything:npx -y inspectrum@latest doctor
Privacy — what leaves your machine, what stays
  • Session logs live at ~/.inspectrum/sessions/<timestamp>__<id>/ and contain your full plan plus a Markdown record of each reviewer's verdict and findings. Directory perms are 0700 on POSIX. Logs written by pre-0.1.0 versions keep their original perms — retrofit with chmod -R 700 ~/.inspectrum/sessions/.
  • Never paste secrets into a plan or context. The plan is written to the local session log, and both the plan and context are sent to every active reviewer.
  • Cloud routes: claude → Anthropic (OAuth keychain or ANTHROPIC_API_KEY); codex → OpenAI (ChatGPT login or OPENAI_API_KEY); gemini → Google (personal-account CLI login or GEMINI_API_KEY); openrouter → openrouter.ai; kimi → Moonshot AI (device-code login: kimi login, not an env var); qwen → Alibaba Cloud; muse → the CLI's own stored credentials (muse login); opencode → whichever provider you configure (opencode providers login); agy → Google Antigravity (browser sign-in on first run, or GEMINI_API_KEY with modelProvider: "gemini" in ~/.gemini/antigravity-cli/settings.json); grok → xAI (Grok Build balance); ollama → localhost only, zero egress unless you change endpoint.
  • Codex is invoked as codex exec --ephemeral --skip-git-repo-check -s read-only … in a throwaway temp directory — the sandbox is pinned read-only, sandbox-weakening and cwd-override args from your config are stripped, and codex persists no session files.

FAQ

Does this slow me down? Only when it should. An approve verdict adds one review pass (seconds to a couple of minutes depending on effort); a bounced plan was a plan you wanted bounced. Within a session, an unchanged plan is cached and not re-reviewed.

What if Codex is down / logged out / not installed? The gate fails open with a visible warning and your plan proceeds untouched. An operational error never blocks your work — that's an architecture invariant, not a best effort.

Can it approve a plan behind my back? No. The gate can only delay the approval dialog (while Claude revises) — it can never click it. You see and approve every plan that ships.

Do I need API keys? Not for subscription-backed Codex or Claude CLI logins. Reviews consume the allowance of the existing subscription. API keys are supported for headless/CI setups and are billed by their provider.

My prompt/plan is sensitive — where does it go? To the reviewer(s) you configured, and to a local session log under ~/.inspectrum/sessions/ (0700). Nothing else. Use ollama for a fully local, zero-egress reviewer.

Troubleshooting

sh: inspectrum: command not found / claude mcp list shows ✗ Failed to connect — but only when your current directory is the Inspectrum repo itself. npx inspectrum@<version> resolves the spec against the local package when cwd is inside a package named inspectrum whose version matches, and a package's own bin is never self-linked into its node_modules/.bin. The published package is fine. Fixes: run from any other directory, or install the real binary once and register that instead:

bash
npm install -g inspectrumclaude mcp add --transport stdio --scope user inspectrum -- inspectrum

Gate feels slow? Set effort = "medium" in [reviewers.codex] (see Tuning). Something else? npx -y inspectrum@latest doctor diagnoses install, login, and model resolution in one shot — open an issue with its output.


If Inspectrum caught a bad plan for you, star the repo ⭐ — it's how other agent-wranglers find it.

MIT — Yann Menec. Contributions welcome: CONTRIBUTING.md.

來源:README.md,提交 128a326

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分