cursorrules

cursorrules is a cursor rule for Cursor from Alex8791-cyber/cognithor. It costs 588 tokens per session, scanned A, original, Apache-2.0.

A short set of coding rules for Cursor, an AI-assisted code editor, in a project called Cognithor. The rules cover formatting, tests, architecture, and safe Git use, with fuller guidance kept in CLAUDE.md.

In plain words
What is it for?
Use it to guide Python and Dart formatting, require tests for backend and Flutter changes, choose where to mock dependencies, follow the Planner–Gatekeeper–Executor architecture, and handle Git safely.
Why use it?
It gives the coding agent project-specific boundaries for making and checking changes. This helps avoid inconsistent formatting, missing tests, unsafe file staging, and incorrect workflow decisions.

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/alex8791-cyber/cognithor/cursorrules
Clone the repo
git clone --depth 1 https://github.com/Alex8791-cyber/cognithor

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 cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/alex8791-cyber/cognithor/cursorrules.svg)](https://agentmods.dev/rules/alex8791-cyber/cognithor/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/alex8791-cyber/cognithor/cursorrules"><img src="https://agentmods.dev/badge/rules/alex8791-cyber/cognithor/cursorrules.svg" alt="Measured on agentmods" height="20"></a>
Per session 588 This file is loaded in full into every session.
When invoked 588 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.00588 $0.00588
Opus 5 $0.00294 $0.00294
Sonnet 5 $0.00118 $0.00118
Haiku 4.5 $0.00059 $0.00059

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

Security

Grade A, and why

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

.cursorrules · 45 lines

How it starts

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

Cursor rules for Cognithor · Agent OS

See CLAUDE.md for full context. Quick rules:

Style

  • Python: ruff-formatted, ruff-checked. Run ruff format before commit.
  • Dart: dart format before commit. flutter analyze clean.
  • No emojis in code, comments, or commit messages unless explicitly requested.
  • No comments restating what code does. Only WHY when non-obvious.

Tests

  • Every backend feature gets a test in tests/test_<package>/.
  • Every Flutter provider/service/model gets a test in flutter_app/test/{providers,services,models}/.
  • Use pytest -x -q to fail fast.
  • Mock at the boundary (HTTP/DB), not internal logic.

Git

  • Never git add -A or git add .. Always exact paths.
  • Pre-existing dirty files in skills/ and docs/integrations/catalog.json are auto-regen artefacts — don't stage them.
  • Never amend a commit after a hook failure — make a new commit.
  • Never chain git push + gh pr merge + cleanup. One per turn.

Architecture

  • PGE-Trinity is the canonical orchestration: PlannerGatekeeperExecutor.
  • Gatekeeper risk lists (_classify_risk() in src/cognithor/core/gatekeeper.py) — unknown tools default to ORANGE.
  • Owner-gating uses cognithor.security.owner.require_owner().
  • TraceBus (src/cognithor/crew/trace_bus.py) is in-process pub/sub; subscribe via subscribe_lifecycle() or subscribe(trace_id).

What NOT to touch

  • flutter_app/lib/l10n/generated/ — regenerated by flutter gen-l10n.
  • cognithor_bench/results/, examples/insurance-agent-pack/results/, /results/ — gitignored runtime artefacts.
  • flutter_app/{linux,windows,macos}/flutter/generated_* — regenerated by flutter pub get.

Frequent mistakes to avoid

  • Mixing asyncio and _asyncio aliasing in the same file (webui.py uses unaliased after Task 21 of v0.95.0).
  • Removing # noqa: SLF001 from bus._subscribers accesses — keep them, the suppress is intentional for internal-state checks.
  • Calling context.read<>() inside dispose() — Flutter forbids deactivated-widget-ancestor lookup. Cache the provider in didChangeDependencies() instead.
  • Hardcoding Color(0x...) hex in widgets — use CognithorTheme.* tokens (theme adoption is currently inconsistent and we're trying to fix that).

Read the full file on GitHub · 45 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. 4d ago First seen · 45 lines · 588 tokens per session scan A e2bc5bbe252b

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Alex8791-cyber/cognithor (153 stars, last pushed 4d ago), licensed Apache-2.0. It adds 588 tokens to every session, about $0.0029 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.