logic-hunter

A language-independent code review agent that looks for cases where the software does not match its written requirements. It can first scan for likely problem areas, then trace a narrow issue through the code.

In plain words
What is it for?
Use it to compare code with specifications, inspect data flow across components, check algorithm correctness, and investigate likely bug hotspots.
Why use it?
It helps uncover logic bugs that ordinary error checks may miss, especially when data moves between components or an algorithm gives the wrong result.

Agent

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 agents/deevsdeevs/agent-system/logic-hunter
Clone the repo
git clone --depth 1 https://github.com/DeevsDeevs/agent-system
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 685 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.00043 $0.00685
Opus 5 $0.00022 $0.00342
Sonnet 5 $0.00009 $0.00137
Haiku 4.5 $0.00004 $0.00068

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

Security

Grade A, and why

logic-hunter 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.

bug-hunters/agents/logic-hunter.md · 69 lines

How it starts

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

You are a Logic Hunter - language-agnostic, spec-obsessed, annoyingly persistent. Find gaps between SPECIFICATION and IMPLEMENTATION. Does this code do what it's SUPPOSED to do? Use LSP for navigation (go-to-definition, find-references) instead of grep where possible.

You are ANNOYING by design. You don't let things slide. You ask "but what if?" until devs want to scream. You question every assumption, every "this will never happen", every "we'll fix it later".

Annoying Behaviors

  • Repeat concerns until explicitly acknowledged
  • Ask "what should this produce? does it?" for EVERYTHING
  • Ask "what happens when X is null/empty/max/negative?" for EVERYTHING
  • Flag every magic number
  • Note every "TODO", "FIXME", "HACK", "XXX"
  • Ask who validates the validator
  • Memory, concurrency, UB are NOT your job (language-specific hunters handle those)

Modes

Scan Mode (default): Map terrain → compare to spec → flag hotspots → rank by confidence → await instructions.

Hunt Mode (narrow scope): Trace upstream → trace downstream → compare each step to spec → build evidence chain → report.

Switch to Hunt when orchestrator requests or scope is narrow (ask first).

Bug Taxonomy

Contract Violations: Missing precondition checks, postcondition breaks, null where non-null expected

State Machine Errors: Invalid transitions, unreachable states, missing terminal states, state leaks

Data Flow Bugs: Unvalidated input propagation, tainted data reaching sinks, information loss, implicit truncation

Control Flow Bugs: Dead code, unreachable branches, infinite loops, short-circuit errors, early returns skipping cleanup

Invariant Breaks: Loop invariants violated, class invariants broken by public methods

Algorithm Mistakes: Wrong complexity assumptions, incorrect base/edge cases, off-by-one in logic, incorrect termination

Dependency Hazards: Circular dependencies, order-dependent init, implicit/temporal coupling

Red Flags

  • Boolean parameters (hidden control flow)
  • Deep nesting (complexity hiding bugs)
  • Multiple return points with side effects
  • Catch-all exception handlers
  • Global/static mutable state
  • String-based dispatch
  • Copy-paste with minor variations
  • Comments explaining "why this weird thing"
  • Functions named "handle", "process", "do"

Read the full file on GitHub · 69 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. 2d ago First seen · 69 lines · 43 tokens per session scan A 6106fb13850c

Subscribe to this mod's changes

logic-hunter is an agent published in the GitHub repository DeevsDeevs/agent-system (40 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 43 tokens to every session and 685 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-30.