bug-sweep

bug-sweep is a command for coding agents from simonrowland/goal-flight. It costs 22 tokens per session (801 once invoked), scanned A, original, MIT.

A repository-wide campaign for finding, combining, checking, and fixing groups of software bugs.

In plain words
What is it for?
Use it for milestone checks, quality-assurance and user-experience sweeps, open-ended bug hunts, or searches for a specific bug pattern.
Why use it?
It coordinates a broad investigation so repeated issues and missed edge cases are easier to find without overloading one review.

Command

Part of the goal-flight plugin — 10 skills, 17 commands, 3 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/simonrowland/goal-flight/bug-sweep
Clone the repo
git clone --depth 1 https://github.com/simonrowland/goal-flight

Or install goal-flight, the plugin that ships this one along with the rest of its 10 skills, 17 commands, 3 hooks.

Wrote 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.

agentmods badge for bug-sweep

README.md
[![agentmods](https://agentmods.dev/badge/commands/simonrowland/goal-flight/bug-sweep.svg)](https://agentmods.dev/commands/simonrowland/goal-flight/bug-sweep)
Your own site
<a href="https://agentmods.dev/commands/simonrowland/goal-flight/bug-sweep"><img src="https://agentmods.dev/badge/commands/simonrowland/goal-flight/bug-sweep.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 801 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.00022 $0.00801
Opus 5 $0.00011 $0.00400
Sonnet 5 $0.00004 $0.00160
Haiku 4.5 $0.00002 $0.00080

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

Security

Grade A, and why

bug-sweep 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 4d 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.

commands/bug-sweep.md · 62 lines

How it starts

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

bug-sweep [--mode <milestone|qa|bug-hunt|predicate>] [--anchor ]

Launch a multi-worker bug-sweep over the repo without saturating controller context. Full procedure: protocols/lane-fill-bug-sweep.md (read it before running). Complements commands/execute.md (build) and protocols/review-mining.md (mint/sweep classes).

When: at a milestone, before committing to a new arc, on an overdue review, or to hunt a bug class — when you want many findings fast and trustworthy without spending controller context on typos/noise.

Modes (set the frame + matrix content; same plumbing)

--mode Campaign
milestone (default) broad correctness/quality pass when a milestone is due
qa behaviour/UX/regression sweep of the running app
bug-hunt open-ended class discovery; new catches get minted (see review-mining)
predicate hunt under-searched bug-class predicates from the shared sweep-corpus

Pipeline (see the protocol for detail)

  1. Frame + matrix — write a shared audit-frame.txt (protocol, BLOCKING rule keyed to the queued backlog, finding schema) + an audit-matrix.txt of N domain × lens rows under docs-private/reviews/<date>-<slug>/. Row count = coverage need; lanes only set wall-clock (rows > lanes drain in waves).
  2. Lane-fill audit — one READ-ONLY one-shot worker per row, lane-split by difficulty (subtle/critical → stronger engine; breadth → cheaper/wider pool). Findings inline to tails. Launch via the durable queue (--submit --drain-on-submit; use --no-drain-on-submit only when an external drainer owns launch) so workers survive; codex workers: instruct "no context-mode / ctx_ tools"* to avoid the exec-mode wedge.
  3. Harvest — parse the tails into append-only BUG-LOG.jsonl (read-only workers can't write the sink themselves; this step is mandatory).
  4. Consolidate — one serial worker: dedup → BLOCKING-vs-backlog triage → rank → systemic clusters → BUG-LOG-CONSOLIDATED.md; mint SPECULATIVE class entries while context is loaded.
  5. Adversarial verify — verifiers grouped by chunk, refute-by-default, classify REAL / FALSE-POSITIVE / ALREADY-FIXED / NOT-BLOCKING. Only verified blockers are work. (A suspiciously clean 0-FP means the refute stance was too soft.)
  6. Fix — routing tiers (A autonomous / B RAG-assisted / C controller-in-loop), disjoint file-set groups, patch-only, serial integrator; worktrees only for Tier-C; poison-pair tests + in-worker falsifier.

Read the full file on GitHub · 62 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. 4d ago First seen · 62 lines · 22 tokens per session scan A c49fbee4d81d

Subscribe to this mod's changes

bug-sweep is a command published in the GitHub repository simonrowland/goal-flight (20 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 801 once invoked, about $0.0001 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.