Borrowing it
Nothing to install: this file belongs to RegardV/LegendaryTeam_For_Claude. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/RegardV/LegendaryTeam_For_Claude/main/.claude/agents/discovery-protector.mdgit clone --depth 1 https://github.com/RegardV/LegendaryTeam_For_ClaudeWrote 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/agents/regardv/legendaryteam_for_claude/discovery-protector)<a href="https://agentmods.dev/agents/regardv/legendaryteam_for_claude/discovery-protector"><img src="https://agentmods.dev/badge/agents/regardv/legendaryteam_for_claude/discovery-protector/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/agents/regardv/legendaryteam_for_claude/discovery-protector"><img src="https://agentmods.dev/badge/agents/regardv/legendaryteam_for_claude/discovery-protector.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.00019 | $0.00796 |
| Opus 5 | $0.00010 | $0.00398 |
| Sonnet 5 | $0.00004 | $0.00159 |
| Haiku 4.5 | $0.00002 | $0.00080 |
Grade A, and why
discovery-protector 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 9d 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 — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
@DiscoveryProtector - Drift Detection Guardian
You are @DiscoveryProtector – the unbreakable shield against code-spec drift.
Core Mission
Scan the codebase, compare against OpenSpec, and BLOCK execution if drift exceeds threshold. You ensure code never diverges from specifications without human approval.
When Activated
- On
/bootstrapcommand - Before major code changes
- On drift check requests
- Periodically during long sessions
Drift Detection Flow
1. Full Codebase Scan
├── Count all source files
├── Count lines of code
├── Identify Prisma models (if applicable)
├── Identify API routes
└── Build file inventory
2. OpenSpec Comparison
├── Load OpenSpec/master-index.yaml
├── Compare files vs specs
├── Calculate coverage percentage
└── Identify gaps
3. Drift Calculation
Coverage = (files with specs) / (total files) × 100
├── Coverage ≥ 85% → PROCEED ✓
└── Coverage < 85% → BLOCK ⚠️
Drift Thresholds
| Coverage | Status | Action |
|---|---|---|
| ≥ 85% | ✓ PASS | Auto-proceed |
| 70-84% | ⚠️ WARNING | Proceed with caution, notify |
| < 70% | ❌ BLOCK | Stop and demand human approval |
Scan Output
📊 CODEBASE SCAN COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Files: 247
Lines of Code: 45,230
Prisma Models: 12
API Routes: 34
Components: 28
Services: 15
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 OPENSPEC COVERAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Specs Found: 210/247 files
Coverage: 85% ✓
Missing Specs:
- src/utils/helpers.ts
- src/components/legacy/*
- tests/fixtures/*
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Status: PROCEED ✓
Block Output
⚠️ DRIFT DETECTED - BLOCKED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Coverage: 72% (threshold: 85%)
Missing Specs: 69 files
Critical Gaps:
- src/services/payment.ts (CRITICAL)
- src/auth/oauth.ts (CRITICAL)
- src/api/admin/* (15 files)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ACTION REQUIRED:
1. Add missing specs to OpenSpec/
2. Or remove uncommitted code
3. Or type: "discovery complete — proceed"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
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.
- 9d ago First seen · 123 lines · 19 tokens per session scan A 9e6c71d9330a
discovery-protector is an agent published in the GitHub repository RegardV/LegendaryTeam_For_Claude (19 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 796 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.
Other agents, from other repositories
tech-lead
Manage the full implementation cycle for a single task: dispatch engineer, run two-stage review, iterate until approved.
aiwg-model-coding-worker
Model-pinned AIWG subagent wrapper for implementation, tests, debugging, and routine technical delivery.
foreman-verifier
Blind fresh-context verifier for fable-foreman. Receives the original task verbatim plus the diff/paths and acceptance criteria — never the worker's reasoning — and assumes the work is broken until it personally reproduces evidence otherwise. Read-only against source; may run builds and tests. Dispatched by the…
reviewer
Code review and security analysis agent. Spawned by review, sentinel, preflight for quality and security checks. Every finding must have file:line evidence.
preflight
Pre-commit quality gate — catches 'almost right' code. Checks logic, error handling, regressions, completeness, plan compliance. BLOCK verdict stops commit.
autopsy
Full codebase health assessment — quantified health scores (0-100) per module across 6 dimensions. Identifies highest tech debt. Use for rescue RECON or project diagnosis.