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.
npx agentmods add commands/keez97/phase-gate/debug-sweepgit clone --depth 1 https://github.com/keez97/phase-gateWhat 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 | $0.00037 | $0.00953 |
| Opus 5 | $0.00018 | $0.00477 |
| Sonnet 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 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.
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.
- 2d 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 3mo ago), licensed MIT. It adds 37 tokens to every session and 953 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 commands, from other repositories
loop
Iteratively fix issues until all resolved or max iterations reached.
feature
Create a feature specification using spec-driven development.
quality-gate
Command "quality-gate" from VoDaiLocz/kilo-kit-mcp, covering ✅ quality gate command, workflow, gates, gate 1: pre-execution and gate 2: per-behavior.
memory
Search, store, and manage AI Team Memory — agent expertise, decisions, learnings, and code patterns. File-based by default, with an optional memory MCP overlay.
deep-audit.skeleton
Aciklama: Bu bolum Bootstrap tarafindan manifest verileriyle doldurulur. Gerekli manifest alanlari: project.description, stack.primary, project.structure, project.subprojects, stack.orm, stack.authmethod Ornek cikti.
do-it-retrospective
开关本项目的本地行为反馈记录,或输出已记录问题的去敏复盘报告。参数为 on / off / status / report。.