Mega Brain organizes content into three distribution layers (L1, L2, L3) that control what is shared publicly, distributed to premium users, or kept private.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/thiagofinch/mega-brain/llms.txt
Use this file to discover all available pages before exploring further.
Quick Reference
| Layer | Name | Git Status | Distribution | Who Uses It |
|---|---|---|---|---|
| L1 | Community | Tracked | npm package (public) | Everyone — open source core |
| L2 | Premium | Tracked | Private repo (gated) | Paying users |
| L3 | Personal | Gitignored | Local only / personal backup | Individual user only |
Layer 1: Community (npm package)
Purpose
Purpose
The open-source engine that powers Mega Brain. Distributed via npm as
mega-brain-ai. Anyone can install and use this to build their own knowledge management system.Distribution: Public —
npm publishWho uses it: Open source community, all users as the foundation layer
What Belongs in L1
Core Engine
core/- Processing enginecore/tasks/- Task definitionscore/workflows/- Workflow templatescore/schemas/- JSON schemascore/intelligence/- Intelligence scripts
CLI & Tooling
bin/- CLI binaries- Setup wizard
- Validation scripts
- Pre-publish gates
Integration
.claude/- Claude Code integration.claude/hooks/- Lifecycle hooks.claude/commands/- Slash commands.claude/skills/- Skill system.claude/rules/- Operational rules
Templates
agents/_templates/- Agent templatesagents/conclave/- Deliberation agentsdocs/- Documentation.gitkeepfiles (structure markers)
Real Examples
Key rule:
.gitkeep files are always L1, regardless of directory. They mark where populated content will live but contain no personal data.Layer 2: Premium (populated content)
Purpose
Purpose
Content generated through the Mega Brain pipeline — actual knowledge, agent personalities, dossiers, playbooks. Requires a paid subscription or private repository access.
Distribution: Private — premium repository or direct sync
Who uses it: Paying users who have run the pipeline and built their knowledge base
What Belongs in L2
Agents
agents/minds/(populated)agents/cargo/(populated)- Agent personalities and memories
- Agent DNA configurations
Knowledge
knowledge/dossiers/knowledge/playbooks/knowledge/dna/knowledge/sources/
Artifacts
artifacts/insights/artifacts/chunks/artifacts/extractions/- Populated state files
Processed Content
- Dossiers with expert knowledge
- Extracted DNA schemas
- Synthesized narratives
- Theme compilations
Real Examples
Key rule: L2 is a superset of L1. An L2 distribution includes all L1 content plus the populated knowledge content.
Layer 3: Personal (never distributed)
Purpose
Purpose
User-generated content specific to one person’s workflow — raw source materials, processing logs, session history, company-specific data. Never leaves the local machine except in personal backups.
Distribution: Local backup only — never shared
Who uses it: The individual user only — this is their private data
What Belongs in L3
Raw Materials
inbox/- All input materials- Videos, PDFs, transcripts
- Course materials
- Podcast downloads
Logs & History
logs/- Processing logs.claude/sessions/- Session history- Execution reports
- Audit trails
State & Runtime
.claude/mission-control/- Session state files
- Runtime configuration
- Processing checkpoints
Company Data
agents/sua-empresa/- Company-specific agents
- Internal processes
- Proprietary workflows
Real Examples
Key rule: L3 content is the “input” and “runtime state” of your system. Valuable to you personally but meaningless (or sensitive) to others.
Special Categories
NEVER — Secrets and Credentials
Purpose: Files that must never be committed to any git repository. What belongs:.env,.env.local- Environment variablescredentials.json,token.json- API credentials.mcp.json- MCP configuration with tokens*.key,*.pem- Certificate files
DELETE — Obsolete Content
Purpose: Files superseded by newer implementations. Runpython3 core/intelligence/audit_layers.py to identify delete candidates.
Classification Flowchart
Distribution Matrix
| Content Type | L1 (Community) | L2 (Premium) | L3 (Personal) |
|---|---|---|---|
| Core engine | ✅ | ✅ | ✅ |
| CLI tools | ✅ | ✅ | ✅ |
| Agent templates | ✅ | ✅ | ✅ |
| Empty structure | ✅ | ✅ | ✅ |
| Populated agents | ❌ | ✅ | ✅ |
| Knowledge base | ❌ | ✅ | ✅ |
| Processing artifacts | ❌ | ✅ | ✅ |
| Raw materials | ❌ | ❌ | ✅ |
| Logs & sessions | ❌ | ❌ | ✅ |
| Company data | ❌ | ❌ | ✅ |
| API keys | ❌ | ❌ | ❌ |
Community vs Pro Features
| Feature | Community (L1) | Pro (L2) |
|---|---|---|
| CLI and setup wizard | ✅ | ✅ |
| Core engine and templates | ✅ | ✅ |
| Skills and hooks | ✅ | ✅ |
| Agent templates and examples | ✅ | ✅ |
| Populated knowledge base | ❌ | ✅ |
| Mind clone agents | ❌ | ✅ |
| Pipeline processing | ❌ | ✅ |
| Council / Conclave | ❌ | ✅ |
Validation
Verify layer classification before publishing:Layer Management Best Practices
Next Steps
Architecture
Understand the full system architecture
Knowledge Pipeline
Learn how L2 content is generated
