{
  "markdown": "<div align=\"center\">\n\n# Inspectrum\n\n### Independent review before a risky agent change becomes hard to undo.\n\n[![CI](https://github.com/yannmenec/inspectrum/actions/workflows/ci.yml/badge.svg)](https://github.com/yannmenec/inspectrum/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/inspectrum.svg)](https://www.npmjs.com/package/inspectrum)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Node >= 20](https://img.shields.io/badge/node-%E2%89%A520-brightgreen.svg)](https://nodejs.org/)\n\n**Claude plans it. GPT reviews it. You approve it.**\n\n</div>\n\n---\n\nA plausible plan can commit an agent to a migration, authentication change,\npayment flow, compatibility break, or deployment that is expensive to undo.\n\n**Inspectrum is an independent pre-flight check before that decision.** Its\nfirst automatic integration runs when Claude Code exits plan mode: Codex (GPT)\nreviews the plan before the approval dialog reaches you, findings can send the\nplan back for revision, and you keep final approval. If the reviewer cannot\nrun, the plan passes through with a visible warning instead of being silently\nreported as reviewed.\n\nHere, independent means a reviewer distinct from the author model, invoked\nseparately. It does not mean their errors are statistically independent.\nInspectrum makes the checkpoint repeatable and its failures visible; **a net\nreliability gain and a defensible moat are not yet proven**. The\n[post-0.2.2 strategy](docs/strategy/README.md) defines the evidence gates and\nkeeps code review, pull-request review, and pair programming out of scope.\n\n## When a skill is enough\n\nFor an occasional second opinion, a rule can tell one agent to call another and compare the replies. That is a reasonable lightweight option.\n\nInspectrum 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.\n\nRecreating those guarantees with a skill means maintaining the orchestration, output validation, health checks, failure policy, and session record yourself.\n\nPublic availability as of 1 August 2026:\n[npm 0.2.3](https://www.npmjs.com/package/inspectrum/v/0.2.3), the\n[GitHub release](https://github.com/yannmenec/inspectrum/releases/tag/v0.2.3),\nand the repository's Claude and Codex plugins are aligned on 0.2.3.\n[Glama](https://glama.ai/mcp/servers/yannmenec/inspectrum) is public. The MCP\nRegistry may still show 0.2.2; it was not republished in this pass. Inspectrum\nwas not in the public Claude Community catalog, while PulseMCP blocked the\none-time recheck with HTTP 403, so no current PulseMCP listing claim is made.\n\nThe [public 0.2.3 activation evidence](docs/activation/README.md) records exact\ncommands, timings, one useful finding, one null result, one visible fail-open\ncase, and the limits of the measurement.\n\n## Quick start\n\nYou need [Node 20+](https://nodejs.org), Claude Code, and Codex CLI >= 0.99.0 authenticated with a [ChatGPT subscription](https://chatgpt.com/pricing) (no API key):\n\n```bash\nclaude plugin marketplace add yannmenec/inspectrum\nclaude plugin install inspectrum@inspectrum\n```\n\nThat's the whole install. Next time you finish a plan in plan mode:\n\n```text\n⏺ ExitPlanMode\n  ⎿  inspectrum×codex: REVISE (round 1/2)          # abridged — real output\n     Majors:                                       # adds a full-report path\n     - [codex] Migration drops the unique index before backfilling —\n       concurrent writes can insert duplicates.\n       Fix: backfill first, drop the index last.\n     Revise the plan to address these findings, then finish the plan again.\n\n⏺ ExitPlanMode\n  ⎿  inspectrum: codex approved the plan (session 2026-07-12…).\n     ┌ Ready to code? ────────────────\n     │ Here is Claude's plan…        ← your normal approval dialog\n```\n\nNo 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).\n\n<details>\n<summary>Prefer the agent to install and check everything for you? Paste this into Claude Code.</summary>\n\n````text\nSet up Inspectrum's Codex plan gate. Use normal approvals only — do not\nswitch to Bypass Permissions or Full Access.\n\nSteps:\n1. Run `node --version`. If < 20, stop and tell me to install Node 20+\n   from https://nodejs.org first.\n2. Run `codex --version`. If it is missing or older than 0.99.0, run\n   `npm install -g @openai/codex@latest` and verify again.\n3. Run `claude plugin marketplace add yannmenec/inspectrum`, then\n   `claude plugin install inspectrum@inspectrum`.\n4. Run `claude mcp add --transport stdio --scope user inspectrum -- npx -y inspectrum@latest`\n   (this powers the on-demand /inspectrum:review command).\n5. Run `npx -y inspectrum@latest doctor` and show me the output,\n   including the resolved codex model/effort lines.\n6. Run `codex login status`.\n   - If it prints \"Logged in\", tell me: \"✅ Setup complete. Your next\n     plan-mode plan gets a Codex review automatically.\" Done.\n   - Otherwise (not logged in), pop open a Terminal window with codex\n     already running by executing:\n       `osascript -e 'tell application \"Terminal\" to do script \"codex\"'`\n     Then tell me: \"A Terminal window opened with codex running.\n     Inside that window, click 'Sign in with ChatGPT', complete the\n     login in my browser, then close the Terminal window. Inspectrum\n     is then ready.\"\n\nDo NOT use sudo, edit shell profiles, push git changes, read .env or\ncredentials, or publish packages. Report back: Node version, codex\ninstall status, doctor verdict, and whether login was needed.\n````\n\n</details>\n\n## How it works\n\n```\nyou ──▶ Claude Code ──▶ plan ready ──▶ ExitPlanMode\n                                          │\n                              inspectrum plan-gate (hook)\n                                          │\n                              Codex reviews the plan\n                              (read-only sandbox, your ChatGPT sub)\n                                          │\n                    ┌─────────────────────┴──────────────────────┐\n              APPROVE ✅                                REVISE / REJECT ❌\n                    │                                             │\n        your approval dialog                    findings go back to Claude,\n        appears as usual                        it revises, gate runs again\n                                                       (max 2 rounds)\n```\n\nBuilt to be **boring and safe**:\n\n- **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.\n- **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.\n- **No wasted reviews.** Within a session, an unchanged plan is hash-cached and not re-reviewed; only real revisions spend a round.\n- **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.\n- **Kill switch.** `[plan_gate] enabled = false` in `~/.inspectrum/config.toml`, or disable the plugin per project.\n\n## Why a separate reviewer?\n\n- **Plans are leverage.** A flaw caught before execution can be cheaper to fix than the same flaw found after a difficult-to-reverse change.\n- **Separation makes the check inspectable.** The author and reviewer run independently, and findings remain attributed.\n- **Cross-provider value is a hypothesis.** Claude and GPT can raise different\n  objections, but Inspectrum has not yet proved that this produces a net\n  reliability gain after false positives, triage, cost, and latency.\n- **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.\n\n## What's in the box\n\n| | |\n|---|---|\n| 🚦 **Plan gate** | Every Claude Code plan reviewed by Codex before it reaches you — automatic, max 2 revision rounds |\n| 🔍 **On-demand review** | `/inspectrum:review` or \"Review this plan with Inspectrum\" from any MCP host |\n| 🧑‍⚖️ **Multi-reviewer + judge** | Run codex + gemini + claude in parallel; a judge consolidates into one verdict |\n| 📋 **One verdict** | `approve / revise / reject` + findings by severity, with reviewer attribution |\n| 🗂️ **Session logs** | Markdown record of every review — verdict, findings, revised plan — under `~/.inspectrum/sessions/` (0700 perms) |\n| 🩺 **`inspectrum doctor`** | One command to check your reviewer is installed, authenticated, and resolving the right model — fails loudly if Codex is logged out |\n\n## Works with\n\n| Your agent | Your reviewer | Setup |\n|------------|--------------|-------|\n| **Claude Code** | Codex (GPT) | Plugin — 2 commands above |\n| **Codex app / CLI** | Claude | `codex mcp add inspectrum -- npx -y inspectrum@latest` + config below |\n| **Claude Desktop** (macOS) | Codex (GPT) | Download [`inspectrum-0.2.3.mcpb`](https://github.com/yannmenec/inspectrum/releases/download/v0.2.3/inspectrum-0.2.3.mcpb), open, confirm. The earlier v0.2.0 bundle was incomplete — use the v0.2.3 asset, not npm/stdio. |\n| **Cursor** | Codex (GPT) | [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.png)](https://cursor.com/en/install-mcp?name=inspectrum&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImluc3BlY3RydW1AbGF0ZXN0Il19) |\n\n<details>\n<summary><b>Codex app / CLI setup</b> — use Claude as your reviewer</summary>\n\nPaste this into the Codex app or CLI:\n\n````text\nSet up Inspectrum so I can review my plans with Claude. Use normal\napprovals only.\n\nSteps:\n1. Run `node --version`. If < 20, stop and tell me to install Node 20+\n   from https://nodejs.org first.\n2. Run `claude --version`. If \"command not found\", run\n   `npm install -g @anthropic-ai/claude-code` and verify again.\n3. If `~/.inspectrum/config.toml` does not exist, create it with:\n\n   [defaults]\n   reviewers = [\"claude\"]\n\n4. Run `codex mcp add inspectrum -- npx -y inspectrum@latest`\n5. Run `npx -y inspectrum@latest doctor` and show me the output.\n6. Pop open a Terminal window with claude already running so I can\n   confirm or complete login, by executing:\n     `osascript -e 'tell application \"Terminal\" to do script \"claude\"'`\n   Then tell me:\n   - \"If claude shows its chat prompt, you're already logged in —\n     close the Terminal window. Inspectrum is ready.\"\n   - \"If claude shows /login or opens a browser, complete the sign-in\n     with your Claude account, then close the Terminal window.\n     Inspectrum is then ready.\"\n   (The ⚠ claude line in the doctor stays even after login because\n   claude doesn't expose a status command we can detect — harmless.)\n\nDo NOT use sudo, edit shell profiles, push git changes, read .env or\ncredentials, or publish packages. Report back: Node version, claude\ninstall status, doctor verdict, and whether login was needed.\n````\n\nNeeds a [Claude Pro/Max subscription](https://www.anthropic.com/pricing) — no API key.\n\n</details>\n\n## Tuning\n\n**Which model reviews, at which effort?** On the Codex side, precedence is:\n\n| Setting | 1st (wins) | 2nd | 3rd |\n|---|---|---|---|\n| model | `[reviewers.codex] model` in `~/.inspectrum/config.toml` | `model` in `~/.codex/config.toml` | codex built-in default |\n| reasoning effort | `[reviewers.codex] effort` | `model_reasoning_effort` in `~/.codex/config.toml` | codex built-in default |\n\n`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.\n\n<details>\n<summary><b>Full config</b> — more reviewers, judge, limits (~/.inspectrum/config.toml)</summary>\n\n```toml\n[defaults]\nreviewers = [\"codex\", \"gemini\"]   # called in parallel\njudge     = \"codex\"               # consolidates when >= 2 reviewers\nfocus     = \"all\"                 # correctness | completeness | risk | clarity | all\n\n[plan_gate]                       # ExitPlanMode hook behavior\nenabled          = true\nmax_rounds       = 2              # denials before the plan passes through\nreason_max_chars = 3000           # budget for findings fed back to Claude\n# reviewers      = [\"codex\"]      # gate-specific override of defaults.reviewers\n\n[reviewers.codex]\neffort          = \"high\"          # passed as -c model_reasoning_effort=high\ntimeout_seconds = 300             # per-reviewer override of limits.timeout_seconds\n# model         = \"gpt-5.6-sol\"   # passed as -m; omit to inherit ~/.codex/config.toml\n\n[reviewers.gemini]\ntype   = \"cli\"\nbinary = \"gemini\"\nmodel  = \"gemini-2.5-pro\"\n\n[reviewers.local]\ntype     = \"http\"\nbackend  = \"ollama\"\nendpoint = \"http://localhost:11434\"\nmodel    = \"qwen2.5:0.5b\"\n\n[limits]\nreport_max_chars = 8000           # caps the stored report\ntimeout_seconds  = 300            # default reviewer wallclock\n```\n\nWithout a config file, `reviewers = [\"codex\"]` is used. Free-tier-friendly: the Gemini CLI works with a personal Google account, no API key. Experimental backends: kimi, qwen, openrouter, ollama (local, zero egress).\n\nHeadless 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/`](examples/).\n\n```bash\n# Register the MCP server without the plugin:\nclaude mcp add --transport stdio --scope user inspectrum -- npx -y inspectrum@latest   # Claude Code\ncodex mcp add inspectrum -- npx -y inspectrum@latest                                   # Codex\n\n# The automatic plan gate must use the plugin's pinned fail-open shim; do not\n# register plan-gate through a mutable npm tag.\n\n# Verify everything:\nnpx -y inspectrum@latest doctor\n```\n\n</details>\n\n<details>\n<summary><b>Privacy</b> — what leaves your machine, what stays</summary>\n\n- 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/`.\n- **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.\n- 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; **qwen** → Alibaba Cloud; **ollama** → localhost only, zero egress unless you change `endpoint`.\n- 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.\n\n</details>\n\n## FAQ\n\n**Does this slow me down?**\nOnly 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.\n\n**What if Codex is down / logged out / not installed?**\nThe 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.\n\n**Can it approve a plan behind my back?**\nNo. The gate can only *delay* the approval dialog (while Claude revises) — it can never click it. You see and approve every plan that ships.\n\n**Do I need API keys?**\nNot 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.\n\n**My prompt/plan is sensitive — where does it go?**\nTo 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.\n\n## Troubleshooting\n\n**`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:\n\n```bash\nnpm install -g inspectrum\nclaude mcp add --transport stdio --scope user inspectrum -- inspectrum\n```\n\n**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](https://github.com/yannmenec/inspectrum/issues) with its output.\n\n---\n\n<div align=\"center\">\n\n**If Inspectrum caught a bad plan for you, [star the repo ⭐](https://github.com/yannmenec/inspectrum) — it's how other agent-wranglers find it.**\n\nMIT — [Yann Menec](https://github.com/yannmenec). Contributions welcome: [CONTRIBUTING.md](CONTRIBUTING.md).\n\n</div>\n",
  "bytes": 17963,
  "sha": "0c2aec6b5cd449c923709fa306fb9630891ef1587e45a29a446a328285e23327",
  "repo_slug": "yannmenec/inspectrum",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_yannmenec_inspectrum_6fddd095/readme"
}