inspectrum AGENTS.md

A project instruction guide for inspectrum, an MCP server that asks multiple AI coding tools to review a plan and records the results in Markdown. MCP is a standard way for AI assistants to call external tools.

In plain words
What is it for?
Use it when developing or reviewing inspectrum, especially when running its plan-review tool, building the TypeScript project, or running tests.
Why use it?
It explains the repository's purpose, supported scope, setup, development loop, and testing commands so contributors can work consistently.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/yannmenec/inspectrum/agents-md
Clone the repo
git clone --depth 1 https://github.com/yannmenec/inspectrum

Made for: Codex, OpenCode.

Per session 2,382 This file is loaded in full into every session.
When invoked 2,382 The same file — it is already loaded in full.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.02382 $0.02382
Opus 5 $0.01191 $0.01191
Sonnet 5 $0.00476 $0.00476
Haiku 4.5 $0.00238 $0.00238

Measured 2d ago against content hash 67c8337be430, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

inspectrum AGENTS.md scanned grade C with 2 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 2d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Never run `rm -rf`, `git push --force`, `git reset --hard`, `git branch -D`, or `npm publish` without explicit user confirmation.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Wraps peer LLM CLIs via `child_process` (Claude / Codex / Gemini), aggregates
AGENTS.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Inspectrum

Universal MCP server for multi-LLM plan review today, plan + code-change review tomorrow. One tool, many reviewers, flat-Markdown session log.

Stack: TypeScript strict (ES2022, Node16 modules), Node ≥ 20, ESM, MCP SDK 1.29+, Zod v4. Distribution: npx inspectrum. License: MIT.

Target user: a solo dev or small team running multiple coding agents (Claude Code, Codex, Cursor, Gemini CLI) who wants to stop copy-pasting plans between them.

What this repo is

  • A single MCP server (src/server.ts) exposing one tool: review_plan.
  • Wraps peer LLM CLIs via child_process (Claude / Codex / Gemini), aggregates their findings, optionally runs a judge agent for consolidation, writes a flat-Markdown session log to ~/.inspectrum/sessions/<ts>__<id>/.
  • v0.1 = plan-only review. v0.2+ extends to code/PR review and more reviewer backends (Kimi, Qwen, Ollama, OpenRouter). Stay inside the current scope unless an ADR or PR explicitly opens a new surface.

Setup & dev loop

  • Install: npm install
  • Build: npm run build (tsc → dist/)
  • Dev: npm run dev (tsx loader, no build step)
  • Tests: npm test (Vitest)
  • Coverage: npm run test:coverage
  • Lint: npx eslint src/ (flat config, eslint.config.js)
  • Typecheck: npx tsc --noEmit
  • Pre-commit (lefthook): typecheck + lint + tests-with-coverage run automatically.

Repo map

  • src/server.ts — MCP entrypoint, stdio transport, registers review_plan.
  • src/schemas.ts — central Zod v4 schemas. All schemas live here, not per module.
  • src/config.ts~/.inspectrum/config.toml loader (@iarna/toml + Zod).
  • src/tool/review-plan.ts — orchestration, parallel reviewers, verdict aggregation, report assembly, session write.
  • src/reviewers/index.ts (factory) + claude.ts, codex.ts, gemini.ts (CLI wrappers) + health.ts (doctor) + common.ts (shared helpers).
  • src/judge/judge.ts — consolidation pass with validateJudgeInvariants.
  • src/hook/{state,render,plan-gate}.ts — ExitPlanMode plan gate: hash/state loop-protection, budgeted deny rendering, hook orchestration (inspectrum plan-gate; ADR-0002).
  • src/prompts/index.tsREVIEWER_SYSTEM_PROMPT, JUDGE_SYSTEM_PROMPT as inline TS strings, NOT loaded from .md.
  • src/session/{store,resources}.ts — flat-file persistence + MCP resource exposure.
  • src/version.ts — single source for the package version (server metadata + CLI).
  • .claude-plugin/ + hooks/ + commands/ + scripts/plan-gate-shim.sh — Claude Code plugin; the repo doubles as its marketplace.
  • scripts/e2e-plan-gate.sh — headless plan-mode E2E harness (npm run e2e:gate).
  • tests/{contract,unit,e2e}/ — Vitest. Fixtures under tests/fixtures/. tests/integration/ is opt-in-only (INSPECTRUM_E2E_CODEX=1, real codex smoke — ADR-0002); broader integration remains deferred per ADR-0001.

Read the full file on GitHub · 143 lines

Changes

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.

  1. 2d ago First seen · 143 lines · 2,382 tokens per session scan C 67c8337be430

Subscribe to this mod's changes

inspectrum AGENTS.md is an instructions file published in the GitHub repository yannmenec/inspectrum (2 stars, last pushed 23d ago), licensed MIT. It adds 2,382 tokens to every session, about $0.0119 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.