Borrowing it
Nothing to install: this file belongs to WhiteBite/opencode-dejavu. 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/WhiteBite/opencode-dejavu/main/AGENTS.mdgit clone --depth 1 https://github.com/WhiteBite/opencode-dejavuWrote 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/instructions/whitebite/opencode-dejavu/agents-md)<a href="https://agentmods.dev/instructions/whitebite/opencode-dejavu/agents-md"><img src="https://agentmods.dev/badge/instructions/whitebite/opencode-dejavu/agents-md/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/instructions/whitebite/opencode-dejavu/agents-md"><img src="https://agentmods.dev/badge/instructions/whitebite/opencode-dejavu/agents-md.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.04679 | $0.04679 |
| Opus 5.5 | $0.01872 | $0.01872 |
| Sonnet 5.5 | $0.00936 | $0.00936 |
| Haiku 4.5 | $0.00468 | $0.00468 |
Grade A, and why
opencode-dejavu AGENTS.md scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Do NOT count exit 1 from diagnostic verbs (grep/tsc/pytest/curl/ls...) as failure — intended outcome; exit ≥ 2 always counts (OpenCode normalizes exits to 1, so discriminate by command shape) How it starts
The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PROJECT KNOWLEDGE BASE
Generated: 2026-08-22 (refreshed 2026-08-30) Commit: 14ca0c1+ Branch: main
OVERVIEW
dejavu — OpenCode plugin ("memory prosthesis with teeth"): mechanically detects recurring tool-call failures and promotes them into enforced gates (3 failures across 2 distinct sessions). Remind first, hard-block on same-session repeat offense. TypeScript ESM, runs under Bun, ships as raw .ts (no build step).
STRUCTURE
dejavu-opencode-plugin/
├── index.ts # Plugin entry — exports Dejavu (Plugin factory) + all 4 hooks
├── src/
│ ├── patterns.ts # Pure engine: signatures, normalization, secret scrub, detection, blocking policy
│ ├── store.ts # GateStore/Stores: two-scope persistence, locks, promotion, TTL, migration, reconcile
│ └── validate.ts # Invariant layer: strict gate parsing + mechanical repair (parse-don't-validate boundary)
├── test/smoke.ts # Behavioral smoke test — plain bun script, no framework, temp-dir isolated
├── scripts/ # doctor.ts (pathology report), analyze.ts (store summary), migrate.ts (demote+scrub)
├── command/dejavu.md # /dejavu slash-command definition (install → ~/.config/opencode/command/)
├── skills/dejavu/ # Companion agent-protocol skill (install → ~/.config/opencode/skills/)
└── .omo/, .codegraph/ # Tooling artifacts — not project code
WHERE TO LOOK
| Task | Location | Notes |
|---|---|---|
| Gate enforcement (remind/block/override) | index.ts before/after hooks |
blocking gates abort in the before-hook; reminding gates annotate the failing output in the after-hook; session state lives ON THE GATE, read fresh under the store lock |
| Failure detection + recording | index.ts tool.execute.after + event |
two channels: exit/text vs message stream; a cross-channel dedup guard counts one call once |
| Signature/normalization | src/patterns.ts |
callSignature, normalizeCommand, parameterizeError |
| Enforcement policy | src/patterns.ts:canBlock()/canRemind() |
three tiers — bash non-diagnostics block, diagnostics + Unix viewers remind-only, everything else just watches |
| Persistence, locks, promotion, global escalation | src/store.ts |
Stores.recordFailure() is the core; cross-project evidence lives in global index.json |
| Self-healing / reconcile | src/store.ts + src/validate.ts |
Stores.reconcileAll() at every init; doctor --repair on demand |
| Tunables | top of index.ts and src/store.ts |
split: TTL/review caps in index, promote thresholds in store |
| Pathology checks | scripts/doctor.ts |
defect classes: unparseable/bad records, duplicate keys, temporal inversion, nested tokens, enforced-without-evidence, stale blocking/reminding, not-teaching, annoying, stale-correction, review-flagged, reminders-ignored, unsanitized, stale copies, corrupt logs, version drift, cross-store index checks; no-arg run discovers projects from the index |
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.
- 1mo ago Changed · +7 lines · +563 tokens per session 56d68fde8d91
- 2mo ago Changed · +6 lines · +553 tokens per session 0b6d9e8b8d2d
- 2mo ago Changed · +5 lines · +98 tokens per session 5cc9cf7a9c2d
- 2mo ago First seen · 134 lines · 3,465 tokens per session scan A 3cc561845bce
opencode-dejavu AGENTS.md is an instructions file published in the GitHub repository WhiteBite/opencode-dejavu (6 stars, last pushed 1mo ago), licensed MIT. It adds 4,679 tokens to every session, about $0.0187 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
opencode-dejavu AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| opencode-dejavu AGENTS.mdWhiteBite/opencode-dejavu | Instructions file | 6 | 1mo ago | MIT | A | 4,679 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |