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/louisbrulenaudet/monorepo-templateWrote 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/rules/louisbrulenaudet/monorepo-template/type-inference)<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/type-inference"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/type-inference.svg" alt="Measured on agentmods" 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.00000 | $0.00420 |
| Opus 5 | $0.00000 | $0.00210 |
| Sonnet 5 | $0.00000 | $0.00084 |
| Haiku 4.5 | $0.00000 | $0.00042 |
Grade A, and why
type-inference 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 8d 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.
What it actually says
Type Inference First
Derive TypeScript types from the source of truth. Do not hand-write interface / type aliases for shapes a Zod schema already defines. See contracts.mdc for where each schema belongs.
Zod file layout
- Schema exports end in
Schema/RequestSchema/ResponseSchema/InputSchema/PayloadSchema. - All inferred types sit at the bottom of the file, after every schema - never interleaved:
export const ExampleInputSchema = z.object({ /* ... */ }); export type ExampleInput = z.infer<typeof ExampleInputSchema>; - Never use a
Typesuffix on inferred exports (ExampleInputTypeis forbidden). - Shared constrained values live in
@repo/enums-commonasas constobjects - not parallel string-literal unions orexport enum.
Keep schemas lean
- Constrained value members belong in
z.enum(ValueSet)orz.enum([...] as const)from@repo/enums-common- do not also spell them out in.describe()prose. - Per-corpus planning guidance goes inline in the tool
descriptionand input.describe()text; there is no separate discovery catalog.
Do not
- Duplicate HTTP/wire shapes in app-local interfaces.
- Add
types.tsfiles or parallel interfaces for shapes Zod or Drizzle already define. - Use a
Typesuffix on inferred exports (FooRequestTypeis forbidden). - Hand-write DB row types when a Drizzle table exists.
Allowed exceptions
- App-local-only types that never cross a package boundary.
- Mapping helpers between inferred types (e.g. output projection).
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.
- 8d ago First seen · 39 lines · 0 tokens per session scan A 89407dadaa98
type-inference is a cursor rule published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 7d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 420 tokens. 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 cursor rules, from other repositories
vue3-typescript-auto
Vue 3 with TypeScript Standards.
typescript-standards
TypeScript development standards and type safety.
page_layer_rules
Page layer rules for Next.js App Router pages and layouts.
type_layer_rules
Type layer rules for TypeScript type definitions and interfaces.
chrome-extension-dev-js-typescript-cursorrules-pro
Cursor rules for VSCode extension development with Electron and TypeScript integration.
ai-agent-specialist
Cursor rules for TypeScript, React, Node.js, clean architecture, testing, and WHY-oriented engineering guidance.