clare-constrained

clare-constrained is a cursor rule for Cursor from jketreno/clare. It costs 364 tokens per session, scanned A, original, MIT.

A rule for turning project conventions into automatic checks, such as linters and architecture tests, instead of leaving them as written advice.

In plain words
What is it for?
Use it to propose lint rules, add tests for structural requirements, and include those checks in the local verification script.
Why use it?
It catches rule violations consistently during development and reduces reliance on reviewers remembering every convention.

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/jketreno/clare/clare-constrained
Clone the repo
git clone --depth 1 https://github.com/jketreno/clare

Made for: Cursor.

Wrote 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.

agentmods badge for clare-constrained

README.md
[![agentmods](https://agentmods.dev/badge/rules/jketreno/clare/clare-constrained.svg)](https://agentmods.dev/rules/jketreno/clare/clare-constrained)
Your own site
<a href="https://agentmods.dev/rules/jketreno/clare/clare-constrained"><img src="https://agentmods.dev/badge/rules/jketreno/clare/clare-constrained.svg" alt="Measured on agentmods" height="20"></a>
Per session 364 This file is loaded in full into every session.
When invoked 364 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.00364 $0.00364
Opus 5 $0.00182 $0.00182
Sonnet 5 $0.00073 $0.00073
Haiku 4.5 $0.00036 $0.00036

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

Security

Grade A, and why

clare-constrained 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 4d 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.

.cursor/rules/clare-constrained.mdc · 45 lines

What it actually says

[C] Constrained — Make Rules Enforced, Not Suggested

Architecture rules exist in code, not in code review comments.

Core Requirement

If you're about to generate code that violates a rule, stop and add the enforcement first:

  1. Is there an ESLint rule / linter config that would catch this? If not, propose one.
  2. Is there an architecture test that would catch this? If not, propose one.
  3. Add the check to clare/verify-local.sh.

When to Add Architecture Tests

If you find yourself thinking "I need to remember to always do X" — that's an architecture test waiting to be written. Common patterns:

// "All API endpoints need rate limiting"
test('all endpoints have rate limiting', () => { ... });

// "Never import from humans-only modules"
test('supervised code does not depend on humans-only code', () => { ... });

// "All events must have a schema"
test('every event type has a registered Zod schema', () => { ... });

See clare/templates/architecture-tests/ for copy-paste starting points.

ESLint Rules to Propose

When generating code, suggest adding ESLint rules for:

  • no-console → catches debug logging in production code
  • no-restricted-imports → enforces module boundary rules
  • Custom rules for domain-specific patterns

verify-local.sh Integration

Any new constraint must be wired into clare/verify-local.sh (not verify-ci.sh, which is CLARE-owned). Use run_check "Name" "command" — all helpers are available from the parent script.

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. 4d ago First seen · 45 lines · 364 tokens per session scan A de8ffcbe5c22

Subscribe to this mod's changes

clare-constrained is a cursor rule published in the GitHub repository jketreno/clare (5 stars, last pushed 1mo ago), licensed MIT. It adds 364 tokens to every session, about $0.0018 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.