Project Structure
Monorepo layout and package organization
the-brain/
├── apps/
│ ├── cli/ # CLI (cac-based, 14 commands)
│ ├── docs/ # Fumadocs documentation
│ └── menu-bar/ # macOS menu bar (Swift)
├── packages/
│ ├── core/ # Types, hooks, plugin manager, DB
│ ├── plugin-graph-memory/ # ⚡ Instant Layer
│ ├── plugin-spm-curator/ # ⚖️ Selection Layer
│ ├── plugin-harvester-cursor/# Cursor IDE harvester
│ ├── plugin-harvester-claude/# Claude Code harvester
│ ├── plugin-identity-anchor/ # ⚓ Stable self-vector
│ ├── plugin-auto-wiki/ # Weekly wiki output
│ ├── trainer-local-mlx/ # Local MLX LoRA training
│ ├── python-sidecar/ # Python MLX train script
│ ├── mcp-server/ # MCP protocol implementation
│ └── storage-libsql/ # Turso/LibSQL backend
├── scripts/
├── docs/ # Legacy docs (pre-Fumadocs)
├── AGENTS.md # Development rules
├── CONTRIBUTING.md
├── README.md
├── LICENSE
├── biome.json
├── install.sh
└── package.jsonAdding a Package
- Create
packages/<name>/withpackage.json src/index.tsexportingdefault definePlugin({...})- Tests in
src/__tests__/ CHANGELOG.md- Register in
apps/cli/src/engine.tsplugin loading - Update docs in
apps/docs/content/docs/customization/