incremental-validation

Development rules for checking code after small changes. They cover TypeScript compilation, syntax, imports, unused variables, tests, and integration checks.

In plain words
What is it for?
It helps validate files during development, run TypeScript checks and tests, and fix failures before continuing or committing.
Why use it?
Frequent checks catch errors while the affected change is still easy to understand and fix.

Cursor rule for Cursor

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 rules/rethunk-ai/clodbridge/incremental-validation
Clone the repo
git clone --depth 1 https://github.com/Rethunk-AI/clodbridge

Made for: Cursor.

Per session 332 This file is loaded in full into every session.
When invoked 332 The same file — it is already loaded in full.
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.00332 $0.00332
Opus 5 $0.00166 $0.00166
Sonnet 5 $0.00066 $0.00066
Haiku 4.5 $0.00033 $0.00033

Measured yesterday against content hash a867dd4c0a43, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

incremental-validation 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 yesterday.

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.

.cursor/rules/incremental-validation.mdc · 49 lines

What it actually says

Incremental Validation

Validate after each small increment, not after an entire subsystem.

Validation Frequency

Milestone Do It? How
After 1 file (< 100 LOC) Optional Read for syntax
After 2-3 files (100-300 LOC) YES tsc --noEmit
After finishing a commit YES npm test
Before committing YES Both checks
After a subsystem YES Integration check

Validation Checklist

Before moving to the next feature:

  • TypeScript compiles (zero errors)
  • No syntax errors
  • Tests pass (if written)
  • Imports resolve
  • No unused variables

Error Cascade Prevention

Bad: Write 5 files → validate → 47 errors → debug for an hour

Good: Write 1 file → validate ✓ → Write 1 file → validate ✓ → Each step fast, errors caught immediately

When Validation Fails

Fix the issue, don't work around it:

  • Type error? Fix the code or types
  • Test failure? Debug and fix
  • Import error? Find the missing file or wrong path
  • Syntax error? Fix the typo

Re-validate after each fix.


For detailed validation strategies and error handling, see the incremental-validation skill.

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. yesterday First seen · 49 lines · 332 tokens per session scan A a867dd4c0a43

Subscribe to this mod's changes

incremental-validation is a cursor rule published in the GitHub repository Rethunk-AI/clodbridge (0 stars, last pushed 1mo ago), licensed MIT. It adds 332 tokens to every session, about $0.0017 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-31.