capy-cortex
Installation
SKILL.md
Capy Cortex - Autonomous Learning System
You have a persistent learning brain powered by SQLite + FTS5 + sklearn TF-IDF. Knowledge is automatically loaded via hooks. This file describes manual operations.
Architecture
- Database:
~/.claude/skills/capy-cortex/cortex.db(SQLite + FTS5 + WAL) - Hooks (automatic, never call manually):
- SessionStart: Loads anti-patterns, preferences, principles
- UserPromptSubmit: Retrieves task-relevant rules via FTS5
- PreToolUse(Bash): Blocks known dangerous commands
- PostToolUseFailure: Records errors as anti-patterns
- Stop: Extracts corrections and preferences from conversation
- Scripts (for manual/scheduled use):
cortex.py: Core engine (retrieve, add rules, stats)reflect.py: Deep session analysisconsolidate.py: Cluster rules into principles (sklearn)bootstrap.py: Mine historical sessions