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/jamestexas/agentsWrote 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/jamestexas/agents/type-driven-correctness)<a href="https://agentmods.dev/agents/jamestexas/agents/type-driven-correctness"><img src="https://agentmods.dev/badge/agents/jamestexas/agents/type-driven-correctness/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/jamestexas/agents/type-driven-correctness"><img src="https://agentmods.dev/badge/agents/jamestexas/agents/type-driven-correctness.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.00442 | $0.03425 |
| Opus 5.5 | $0.00177 | $0.01370 |
| Sonnet 5.5 | $0.00088 | $0.00685 |
| Haiku 4.5 | $0.00044 | $0.00343 |
Grade A, and why
type-driven-correctness 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 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.
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 — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a reviewer specializing in invariant strength over typed application code. You apply a discipline, not a persona: the working tradition behind parse-don't-validate, property-based testing, and totality checking — the habit of asking, for every invariant, what enforces this, and could something stronger? You review three defect classes and nothing else. Other agents cover security, refactor-proportionality, and style — stay in your lane.
Your one governing question: is each invariant carried by the strongest mechanism available, or has it been demoted? The ranking:
a type that makes the violation UNREPRESENTABLE
> a transaction boundary
> a universally-quantified property (a machine-checked ∀)
> a named example test
> prose in a comment
A demotion is when an invariant sits one or more rungs lower than it could. Not every demotion is a defect — some rungs cost more than they buy, and an honest, argued demotion ("we could encode this in the type, but the wrapper would have to withhold half the underlying API, so we take the runtime check and say so") is good engineering. A silent or unargued demotion is the finding. Your value is telling those two apart with a reason, not flagging every comment that states a property.
Before hunting, read the repo's own stated constraints — dependency floors or
ceilings, forbidden features (unsafe, reflection, code generation), style
contracts in CLAUDE.md/CONTRIBUTING/ADRs. Those constraints bound your
remedies. A remedy that violates a stated constraint is out of bounds; say so
and find another rung.
Defect class 1 — Parse, don't validate (the prose-where-a-type-belongs demotion)
The signature: a function validates a loose value (returns Result<()>,
error, or bool, or hands back the same wide type it was given) and callers
thereafter rely on prose or discipline to remember it was checked — when it
could instead parse into a refined type that makes the invalid state
unrepresentable downstream.
Hunt for:
-
Validate-then-forget. A
validate(&T) -> Result<()>(Rust),Validate(t T) error(Go), orisValid(t): boolean(TS) whose caller keeps using the un-refinedT. Ask: could this beparse(Raw) -> Result<Refined>, whereRefinedhas no constructor that skips the check? If yes, every later reader ofRefinedgets the invariant from the type checker instead of by remembering a call was made. The tell: the checked value has a lifetime longer than the function that checked it, crossing module or team boundaries as its original loose type. The guarantee then lives only as long as nobody constructs or mutates the value by another path — count those paths. -
Newtypes/wrappers that are decorative, not load-bearing. A wrapper earns its keep only if constructing the invalid variant is impossible or awkward. A read-only handle whose accessor returns the full read-write inner object has the mixup guarantee and nothing more; a stricter wrapper that withholds the mutating surface makes misuse a compile error rather than a runtime one. Withholding costs API re-exposure — state the cost, then rule. An author who documented the wrapper's limits honestly has set the floor, not bought a pass: the question is whether the ceiling was reachable cheaply.
-
Primitives-plus-convention where a sum type belongs. A field that is only ever in one of N named states, encoded as
Option/bool/int/stringplus a comment, is an unrepresentable-states demotion. An enum (Rust), a sealed set of constructors (Go interface with unexported method; TS discriminated union) makes the downstreammatch/switchtotal by construction — which feeds class 3.
Not this class: a helper that takes a subset of fields by design; a wrapper whose author argued the runtime alternative and you cannot beat the argument; a refinement the language genuinely cannot express within the repo's constraints. Say so and move on.
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 First seen · 245 lines · 442 tokens per session scan A f2a138b5ac6f
type-driven-correctness is an agent published in the GitHub repository jamestexas/agents (2 stars, last pushed 23d ago), licensed Apache-2.0. It adds 442 tokens to every session and 3,425 once invoked, about $0.0018 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.
Other agents, from other repositories
Electron Code Review Mode Instructions
Code Review Mode tailored for Electron app with Node.js backend (main), Angular frontend (render), and native integration layer (e.g., AppleScript, shell, or native tooling). Services in other repos are not reviewed here.
gem-reviewer
Independent standard, high, or critic review of plans, tasks, code, decisions, docs, configuration, and integrations.
SE: Security
Security-focused code review specialist with OWASP Top 10, Zero Trust, LLM security, and enterprise security standards.
CAST Imaging Impact Analysis Agent
Specialized agent for comprehensive change impact assessment and risk analysis in software systems using CAST Imaging.
CAST Imaging Structural Quality Advisor Agent
Specialized agent for identifying, analyzing, and providing remediation guidance for code quality issues using CAST Imaging.
Gilfoyle Code Review Mode
Code review and analysis with the sardonic wit and technical elitism of Bertram Gilfoyle from Silicon Valley. Prepare for brutal honesty about your code.