Core Assets (Loaded by Claude Code)
| Directory | Purpose |
|-----------|---------|
| agents/ | Claude subagents with dependency metadata. Move to inactive/agents/ to park. |
| commands/ | Slash command definitions (50+ curated commands) |
| skills/ | Reusable skill modules (80+ skills) with activation triggers and dependencies |
| modes/ | Behavioral context modules that toggle workflow defaults |
| rules/ | Rule sets symlinked to ~/.claude/rules/cortex/ on launch |
| flags/ | Modular token-efficient flag packs (22 categories, 3,380 tokens total) |
| hooks/ | Automation hooks for pre/post tool execution and session events |
Orchestration & Templates
| Directory | Purpose |
|-----------|---------|
| profiles/ | Project type presets (frontend, backend, devops, etc.) |
| scenarios/ | Multi-step workflow scenarios |
| workflows/ | Complex workstream orchestration templates |
| prompts/ | Prompt templates: guidelines, personas, and reusable snippets |
| templates/ | Initialization templates for new projects |
| plugins/ | Additional plugin modules (accessibility, frontend, UX) |
Python Package (`claude_ctx_py/`)
| Module | Purpose |
|--------|---------|
| cli.py | Main CLI entrypoint with all subcommands |
| launcher.py | cortex start implementation (plugin resolution, rules symlinking) |
| core/ | Core domain logic (agents, skills, modes, rules, hooks, backups) |
| tui/ | Textual-based terminal UI with 15+ specialized views |
| intelligence/ | AI recommendation engine and pattern learning |
| memory/ | Session memory and knowledge persistence |
| analytics.py | Usage analytics and skill metrics |
Supporting Files
| Path | Purpose |
|------|---------|
| .claude-plugin/plugin.json | Plugin manifest for Claude Code marketplace |
| docs/ | Documentation site (Jekyll-based) |
| tests/ | Test suite with pytest |
| schema/ | JSON schemas for validation |
| scripts/ | Helper scripts for installation and maintenance |
π Latest Updates
- Hook logging β Hook failures now write to
~/.cortex/logs/hooks.log (override via CORTEX_HOOK_LOG_PATH). - Extra plugin dirs β
cortex-config.json supports extra_plugin_dirs to pass multiple --plugin-dir entries. - Watch daemon mode β
cortex ai watch --daemon runs watch mode in the background with status/stop controls. - Template guardrails β The TUI detects missing
templates/ files in the active CLAUDE_PLUGIN_ROOT and offers to initialize them or run the setup wizard. - Multi-LLM consult skill β Ask Gemini, OpenAI (Codex), or Qwen for a second opinion; configure provider API keys via the TUI Command Palette -> "Configure LLM Providers".
- Asset Manager reliability β βUpdate Allβ and βInstall All in Categoryβ now behave consistently with clearer prompts.
- Flag toggles restored β Spacebar toggling works again in the Flag Explorer and Flag Manager, updating
FLAGS.md immediately.
β
Stability Update: AI + Context Management
Weβve fixed major issues across AI recommendations and context state tracking. Auto-activation and watch mode are more reliable, and context activation now uses .active-* state files