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/keez97/phase-gateWrote 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/commands/keez97/phase-gate/debug-sweep)<a href="https://agentmods.dev/commands/keez97/phase-gate/debug-sweep"><img src="https://agentmods.dev/badge/commands/keez97/phase-gate/debug-sweep/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/keez97/phase-gate/debug-sweep"><img src="https://agentmods.dev/badge/commands/keez97/phase-gate/debug-sweep.svg" alt="Reviewed on agentmods" width="80" 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.00037 | $0.00953 |
| Opus 5.5 | $0.00015 | $0.00381 |
| Sonnet 5.5 | $0.00007 | $0.00191 |
| Haiku 4.5 | $0.00004 | $0.00095 |
Grade A, and why
debug-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 3mo 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/debug-sweep — Adversarial Post-Implement Audit
Fires N sequential debug-agent sweeps against a plan's implementation diff. Each sweep uses a distinct lens (correctness / robustness / architecture / adversarial). Findings go to the plan's own sweeps/ directory: <plan-dir>/sweeps/. Flag-only — no code is modified.
Invocation
/debug-sweep <plan-path> Auto-severity (from diff)
/debug-sweep <plan-path> --severity critical Force severity level
/debug-sweep <plan-path> --base <commit> Override diff base (default: HEAD~1)
/debug-sweep <plan-path> --lens robustness Run only specific lens(es)
/debug-sweep <plan-path> --no-aggregate Skip summary report
/debug-sweep <plan-path> --severity-paths-config <file>
Override the critical-path marker
list (default: scripts/debug-severity-paths.txt)
Under the hood: scripts/debug-sweep.sh.
Severity → sweeps
| Severity | Sweeps | Lenses |
|---|---|---|
| low | 0 | (skipped) |
| medium | 2 | correctness, robustness |
| high | 3 | + architecture |
| critical | 4 | + adversarial |
Severity is auto-classified by scripts/debug-severity.sh:
- Docs-only diff →
low - Critical-path match (default list at
scripts/debug-severity-paths.txt; override with--severity-paths-config) →critical - New agent / hook / command / script →
high - Multi-file or >50 insertions →
medium
The default critical-path list is empty in phase-gate — it ships as a stub for projects to populate with their own load-bearing path globs (e.g. scripts/payments/, lib/auth/). Pass --severity-paths-config <file> to point at a project-local list without modifying the plugin tree.
When to run
Manual: any time you want a second pass on recent work. Ideal targets:
- Just-shipped plans that touched critical infrastructure
- Plans where the original author had limited bandwidth for self-review
- Refactors that crossed multiple modules
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.
- 3mo ago First seen · 84 lines · 37 tokens per session scan A 25ad724902cf
debug-sweep is a command published in the GitHub repository keez97/phase-gate (1 stars, last pushed 7mo ago), licensed MIT. It adds 37 tokens to every session and 953 once invoked, about $0.0001 per session on Opus 5.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.
debug-sweep compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| debug-sweepkeez97/phase-gate | Command | 1 | 7mo ago | MIT | A | 37 | Claude Code |
| bugolehsvyrydov/AI-development-team | Command | 18 | 14d ago | MIT | A | 19 | Claude Code |
| issueolehsvyrydov/AI-development-team | Command | 18 | 14d ago | MIT | A | 26 | Claude Code |
| debugHigorAlves/orc | Command | 7 | 6d ago | MIT | A | 53 | Claude Code |
| ccc-debug-sessionKevinZai/commander | Command | 6 | today | MIT | A | 42 | Claude Code |
| ciHigorAlves/orc | Command | 7 | 6d ago | MIT | A | 47 | Claude Code |
| bifrost-debugneXenio/bifrost-plugin | Command | 5 | 22d ago | MIT | A | 18 | Claude Code |