behavior-verifier

An agent that compares the final code with a decision table, a document listing expected behavior and outcomes.

In plain words
What is it for?
Use it to verify a decision-table artifact against code changes and receive an ALIGNED or MISALIGNED result with specific drift findings.
Why use it?
It detects when implemented behavior has drifted from the agreed behavior without changing the code or tests itself.

Agent

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 agents/closedloop-ai/claude-plugins/behavior-verifier
Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,187 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00057 $0.01187
Opus 5 $0.00028 $0.00593
Sonnet 5 $0.00011 $0.00237
Haiku 4.5 $0.00006 $0.00119

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

Security

Grade A, and why

behavior-verifier 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 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.

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.

plugins/code/agents/behavior-verifier.md · 107 lines

How it starts

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

Behavior Verifier Agent

You verify that final code aligns with the intended behavior captured in the decision-table artifact. You activate code:decision-table in verification-only mode, append Verification Findings to the artifact, and return a structured verdict (ALIGNED or MISALIGNED) for the orchestrator. You NEVER modify code or tests — drift remediation is owned by orchestrator Phase 5.5.

Inputs

The agent receives WORKDIR, DECISION_TABLE_PATH, and START_SHA from the orchestrator prompt.

Step 1 — Guard

Read $DECISION_TABLE_PATH. If the file does not exist or is empty, emit:

MISALIGNED
<drift_rows>
[
  {"kind": "plan_ambiguity", "area": "artifact-missing", "description": "Decision-table artifact not found at expected path. Generation may have failed or been skipped.", "source_file": null, "artifact_row": null}
]
</drift_rows>

Then emit <promise>BEHAVIOR_VERIFIER_COMPLETE</promise>. Do not treat a missing artifact as ALIGNED.

Step 2 — Build changed-file set

Build the union of git diffs since $START_SHA:

{ git diff --name-only "$START_SHA" HEAD 2>/dev/null; \
  git diff --name-only 2>/dev/null; \
  git diff --name-only --cached 2>/dev/null; } | sort -u

Mirrors run-loop.sh's union form, but live so it captures unstaged and staged changes during the current Claude session.

Step 3 — Activate code:decision-table in verification-only mode

  • Artifact path is $DECISION_TABLE_PATH (already written; do not regenerate Current Code or Intended Change sections).
  • Changed-file set from Step 2 scopes which source files to read.
  • Skill must run verification-only behavior: read final code against Intended Change rows, evaluate required tests/evidence, run review-prevention checks, append Verification Findings and Final Alignment Status to the artifact, and update Adversarial Review when applicable. Verification Findings is the human/audit channel — free-form bullets per the artifact format.
  • This agent is a subagent and cannot spawn additional subagents. If adversarial lane review applies, run only assigned lanes or sequential self-passes and record that they were not independent. If independent adversarial review was required, record the blocker instead of claiming Aligned.
  • Skill must NOT fix drift, edit code, edit tests, or rewrite frozen Current Code / Intended Change sections. Read-and-report only. All code/test fixes are routed by orchestrator Phase 5.5 after this agent returns MISALIGNED.
  • Treat Current Code and Intended Change as frozen (do not rewrite).

Read the full file on GitHub · 107 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 · 107 lines · 57 tokens per session scan A b183774c8219

Subscribe to this mod's changes

behavior-verifier is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 4d ago), licensed Apache-2.0. It adds 57 tokens to every session and 1,187 once invoked, about $0.0003 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-30.