← Browse

@alex8791-cyber/cognithor

A

Cursor rules for Cognithor · Agent OS

rulescursor

Install

agr install @alex8791-cyber/cognithor --target cursor

Writes 1 file into .cursor/rules/, pinned to git-e2bc5bbe.

  • .cursorrules

Document

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

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-e2bc5bbe252b2026-08-06