verify

A command that checks completed code against its written specification using a fresh review agent and records the result.

In plain words
What is it for?
Use it after completing a task to receive a PASS, DRIFT, or NEEDS-MARTY verdict and update the verification queue.
Why use it?
It helps catch drift, where the implementation gradually stops matching the agreed requirements.

Command

Part of the ss plugin — 10 skills, 34 commands, 6 agents, 4 hooks shipped together

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 commands/martybonacci/specswarm/verify
Clone the repo
git clone --depth 1 https://github.com/MartyBonacci/specswarm

Or install ss, the plugin that ships this one along with the rest of its 10 skills, 34 commands, 6 agents, 4 hooks.

Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,785 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.00068 $0.04785
Opus 5 $0.00034 $0.02393
Sonnet 5 $0.00014 $0.00957
Haiku 4.5 $0.00007 $0.00479

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

Security

Grade A, and why

verify 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 3d 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/ss/commands/verify.md · 401 lines

How it starts

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

SpecSwarm Spec-Mentor Verification

Runs adversarial verification on a completed task: dispatches a fresh spec-mentor subagent (no carried context, no anchoring bias) to compare what the spec says against what the code does, returns a structured verdict, and updates .specswarm/verify-queue/.

This is the architectural piece that replaces the dual mentor↔builder session pattern. Instead of a long-running mentor session catching drift, a fresh subagent fires once per completed task — better adversarial value, lower context cost, fully automatable.

Phase 1: Resolve target task(s)

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck disable=SC1091
source "${PLUGIN_DIR}/lib/verify/queue.sh"
# shellcheck disable=SC1091
source "${PLUGIN_DIR}/lib/verify/task-context.sh"
# shellcheck disable=SC1091
source "${PLUGIN_DIR}/lib/references-loader.sh"
# shellcheck disable=SC1091
[ -f "${PLUGIN_DIR}/lib/notify.sh" ] && source "${PLUGIN_DIR}/lib/notify.sh"

# Parse arguments
TASK_ID=""
PROCESS_ALL=false
FEATURE_OVERRIDE=""
QUEUE_MODE=false
SIGHTED_MODE=false

while [ $# -gt 0 ]; do
  case "$1" in
    --all|--drain) PROCESS_ALL=true; shift ;;
    --queue)   QUEUE_MODE=true;      shift ;;
    --sighted) SIGHTED_MODE=true;    shift ;;
    --feature) FEATURE_OVERRIDE="$2"; shift 2 ;;
    -h|--help)
      cat <<EOF
Usage: /ss:verify [TASK_ID] [options]

Adversarial spec-vs-implementation verification for completed task(s).

Options:
  --all              Process every pending task in the queue
  --drain            Alias for --all (drains the whole queue)
  --feature NUM      Override auto-detected feature number
  --queue            Show queue status (pending / verified / flagged / needs-sighted)
  --sighted TASK_ID  Human sighted sign-off walkthrough for a NEEDS-SIGHTED task

Examples:
  /ss:verify T011
  /ss:verify --all
  /ss:verify --drain
  /ss:verify --queue
  /ss:verify --sighted T012
EOF
      exit 0
      ;;
    *)
      if [ -z "$TASK_ID" ]; then TASK_ID="$1"; fi
      shift
      ;;
  esac
done

# Queue overview mode — useful for "how many pending right now?"
if [ "$QUEUE_MODE" = true ]; then
  PENDING=$(ss_verify_queue_count pending)
  VERIFIED=$(ss_verify_queue_count verified)
  FLAGGED=$(ss_verify_queue_count flagged)
  NEEDS_SIGHTED=$(ss_verify_queue_count needs-sighted)
  echo "📋 SpecSwarm verification queue:"
  echo "  pending:       $PENDING"
  echo "  verified:      $VERIFIED"
  echo "  flagged:       $FLAGGED"
  echo "  needs-sighted: $NEEDS_SIGHTED"
  if [ "$PENDING" -gt 0 ]; then
    echo ""
    echo "Pending:"
    ss_verify_queue_list_pending | sed 's/^/  • /'
  fi
  if [ "$FLAGGED" -gt 0 ]; then
    echo ""
    echo "Flagged (need review):"
    find "$(ss_verify_queue_dir)" -maxdepth 1 -type f -name '*.flagged' \
      -exec basename {} \; 2>/dev/null | sed 's/\.flagged$//' | sed 's/^/  ⚠️  /'
  fi
  exit 0
fi

# Resolve target task list
TARGETS=()
if [ "$PROCESS_ALL" = true ]; then
  while IFS= read -r t; do
    [ -n "$t" ] && TARGETS+=("$t")
  done < <(ss_verify_queue_list_pending)
elif [ -n "$TASK_ID" ]; then
  TARGETS=("$TASK_ID")
else
  # Default: oldest pending
  OLDEST=$(ss_verify_queue_list_pending | head -n1)
  [ -n "$OLDEST" ] && TARGETS=("$OLDEST")
fi

if [ "${#TARGETS[@]}" -eq 0 ]; then
  echo "✅ No pending verifications. Queue is empty."
  exit 0
fi

echo "🔍 Verification targets: ${TARGETS[*]}"
echo ""

Read the full file on GitHub · 401 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. 3d ago First seen · 401 lines · 68 tokens per session scan A a95318e4684e

Subscribe to this mod's changes

verify is a command published in the GitHub repository MartyBonacci/specswarm (65 stars, last pushed 1mo ago), licensed MIT. It adds 68 tokens to every session and 4,785 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.