
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.
概览
让助手把编码智能体的计划交给另一个模型独立评审,并返回带归属说明的结构化结论。
- 可以做什么
- 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 端点实现零外发评审。
安装
在 SourceWeft 中
- 打开 控制台中的 Inspectrum,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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):
That's the whole install. Next time you finish a plan in plan mode:
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.
How it works
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 = falsein~/.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
Works with
Codex app / CLI setup — use Claude as your reviewer
Paste this into the Codex app or CLI:
Needs a Claude Pro/Max subscription — no API key.
Tuning
Which model reviews, at which effort? On the Codex side, precedence is:
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)
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/.
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 withchmod -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 orOPENAI_API_KEY); gemini → Google (personal-account CLI login orGEMINI_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, orGEMINI_API_KEYwithmodelProvider: "gemini"in~/.gemini/antigravity-cli/settings.json); grok → xAI (Grok Build balance); ollama → localhost only, zero egress unless you changeendpoint. - 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:
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版本历史
1- v0.2.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分