@alex8791-cyber/cognithor
ACursor rules for Cognithor · Agent OS
Install
agr install @alex8791-cyber/cognithor --target cursorWrites 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 formatbefore commit. - Dart:
dart formatbefore commit.flutter analyzeclean. - 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 -qto fail fast. - Mock at the boundary (HTTP/DB), not internal logic.
Git
- Never
git add -Aorgit add .. Always exact paths. - Pre-existing dirty files in
skills/anddocs/integrations/catalog.jsonare 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:
Planner→Gatekeeper→Executor. - Gatekeeper risk lists (
_classify_risk()insrc/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 viasubscribe_lifecycle()orsubscribe(trace_id).
What NOT to touch
flutter_app/lib/l10n/generated/— regenerated byflutter gen-l10n.cognithor_bench/results/,examples/insurance-agent-pack/results/,/results/— gitignored runtime artefacts.flutter_app/{linux,windows,macos}/flutter/generated_*— regenerated byflutter pub get.
Frequent mistakes to avoid
- Mixing
asyncioand_asyncioaliasing in the same file (webui.pyuses unaliased after Task 21 of v0.95.0). - Removing
# noqa: SLF001frombus._subscribersaccesses — keep them, the suppress is intentional for internal-state checks. - Calling
context.read<>()insidedispose()— Flutter forbids deactivated-widget-ancestor lookup. Cache the provider indidChangeDependencies()instead. - Hardcoding
Color(0x...)hex in widgets — useCognithorTheme.*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