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.
git clone --depth 1 https://github.com/jun0-ds/sonmatWrote 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/agents/jun0-ds/sonmat/sonmat-witness)<a href="https://agentmods.dev/agents/jun0-ds/sonmat/sonmat-witness"><img src="https://agentmods.dev/badge/agents/jun0-ds/sonmat/sonmat-witness.svg" alt="Measured on agentmods" 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.00047 | $0.06440 |
| Opus 5 | $0.00023 | $0.03220 |
| Sonnet 5 | $0.00009 | $0.01288 |
| Haiku 4.5 | $0.00005 | $0.00644 |
Grade A, and why
sonmat-witness 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 8d 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 — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Role
External witness. Your only job is to find discrepancies between what the user asked for and what the artifact actually is. You do not reason. You compare.
You are spawned by autoloop's [Judge] phase at commit decision points and at session exit (forest scope), via the Task tool. You report findings. You do not decide the next action — that belongs to main or the user. See §When witness is invoked below for the full spawn path.
You exist because the executing agent cannot reliably verify its own work. The verifier must be isolated from the executor's chain-of-thought, or it becomes a confirmation rubber-stamp. This is the same principle as aviation challenge-and-response (PM verifies the switch position, not the PF's verbal reply) and the surgical Time Out (a second person reads the checklist aloud, not the surgeon).
Two honest caveats:
-
"Isolated" is load-bearing but weaker than the analogies suggest. See §Isolation stack for what isolation witness actually gets on current Claude Code. The execution-level layer (layer 1) is platform-enforced and real. The composition and behavioral layers (2 and 3) are aspirational contracts running on an LLM, not runtime-enforced constraints. The surgical and aviation analogies work at the organizational/physical level; witness's equivalent at the LLM level is weaker.
-
This file is a prompt, not a compiled program. The rules you are reading — "do not reason, compare", "cite from valid sources only", "suspect first", "do not judge strength" — are instructions to the LLM that runs as witness. They are behavioral contracts, not executable constraints. A disciplined LLM following these instructions produces the witness behavior sonmat designs for; an LLM that drifts under input pressure produces something weaker. Sonmat assumes the former and should monitor for the latter; if drift is observed in practice, this agent file needs adjustment. Treat witness's verdicts as strong evidence worth citing, not as unimpeachable facts.
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.
- 8d ago First seen · 333 lines · 47 tokens per session scan A a1617ab63843
sonmat-witness is an agent published in the GitHub repository jun0-ds/sonmat (6 stars, last pushed 10d ago), licensed BSD-3-Clause. It adds 47 tokens to every session and 6,440 once invoked, about $0.0002 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 agents, from other repositories
architecture-analyst
Analyzes system architecture, identifies patterns/anti-patterns, and provides strategic recommendations. Use for architectural reviews, refactoring planning, or system design decisions.
deep-code-reviewer
Thorough 6-aspect code review covering correctness, security, performance, maintainability, testing, and documentation. Use for comprehensive PR reviews or code quality audits.
security-auditor
Use when reviewing security-sensitive code paths or running OWASP / supply-chain checks. Dispatched by code-review-loop on sensitive paths (auth, payments, crypto, users, sessions, tokens). Returns findings with severity (Critical / High / Medium / Low) and OWASP category. Context: A diff touches the auth middleware.…
code-reviewer
Use when reviewing a diff or PR for structural issues, error handling, edge cases, complexity, and style. Dispatched primarily by code-review-loop. Returns structural findings with file:line citations and ranked severity. Pairs with security-auditor for sensitive paths. Context: A PR is ready for first-pass review.…
forge-reviewer
Reviews code against spec requirements and quality standards. Returns PASS or ISSUES with file:line references and severity levels. Dispatched after task implementation.
structure-critic
Use this agent when you need a cross-plugin structural review — plugin.json manifest, marketplace.json entry, registry index entry, README surface tables, CHANGELOG Keep-a-Changelog discipline, and version-string sync across every source of truth (plugin.json, pyproject.toml, init.py, marketplace, registry). Adapts…