claude-cortex
CLAUDE.md8 starsChanged 5 months agoMITView on GitHub
Instructions for Claude Code in this workspace. On session start: 1. Read brain/context.md for current state (the index — always loaded) 2. Read latest notes/daily-summaries/closing-*.md (if exists) 3. Ask what we're working on 4. Load ONLY the relevant context file from brain/contexts/ Never load all context files at once. Each skill is a directory .claude/skills/<name>/SKILL.md — the folder name is the command you type. Add your own by creating .claude/skills/<name>/SKILL.md with name + description frontmatter; the description lets Claude auto-load…
The file
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read brain/context.md for current state (the index — always loaded)
- Very specific: line 9
Read latest notes/daily-summaries/closing-*.md (if exists)
- Distinctive: line 10
Ask what we're working on
- Distinctive: line 85
When an agent is called:
- Very specific: line 86
Read the agent file from agents/ silently
- Distinctive: line 89
If the agent file doesn't exist, say so — never improvise an agent from scratch
- Distinctive: line 170
No emojis (unless requested)
≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Instructions for Claude Code in this workspace.
Startup Protocol
On session start:
- Read
brain/context.mdfor current state (the index — always loaded) - Read latest
notes/daily-summaries/closing-*.md(if exists) - Ask what we're working on
- Load ONLY the relevant context file from
brain/contexts/
Never load all context files at once.
Skills
| Skill | What it does |
/start | Reads context, checks last session, asks what you're working on |
/close | Writes session report, updates context, cleans up completed items |
/brief | Quick daily status overview (20 lines max) |
/plan | Breaks a task into phases with verification criteria |
/review | Code review checklist (security, simplicity, edge cases) |
/weekly | Weekly retrospective — what shipped, patterns, next week priorities |
/daily-wrap | End-of-day consolidation — merges sessions, updates context, preps tomorrow |
/setup | First-time guided setup (run once after cloning) |
Each skill is a directory .claude/skills/<name>/SKILL.md — the folder name is
the command you type. Add your own by creating .claude/skills/<name>/SKILL.md
with name + description frontmatter; the description lets Claude auto-load
it when relevant.
Two skills are user-invocable: false — they never appear as slash commands,
they load automatically as background context:
soul— the agent's identity and hard limits. Edit.claude/skills/soul/SKILL.mdto make the agent yours.memory— the house style for persistent memory (below).
Memory
Claude Code's native auto memory is on by default: across sessions Claude
saves learnings to ~/.claude/projects/<project>/memory/ (machine-local, not
committed) and recalls them automatically. .claude/settings.json sets
autoMemoryEnabled: true to make that explicit. The memory skill defines the
house style — MEMORY.md as a lean index plus one typed topic file per fact —
so memory stays organized instead of sprawling. /close and /daily-wrap save
durable learnings there. Browse it with /memory. No database, no MCP, no
external dependency.
Team mode
By default this is a solo workspace. To share it with a team, list handles in
brain/team.md (users:). With 2+ users, /start and /close identify who is
in the session and keep per-person closing reports under
notes/daily-summaries/<user>/, so no one overwrites anyone else. Shared-brain
edits are logged to brain/changelog.md for teammates to see on /start.
Hooks
Hooks fire automatically on events. Configured in hooks/hooks.json (plugin mode) or .claude/settings.json (clone mode):
| Hook | Trigger | Purpose |
file-guard.py | PreToolUse | Blocks writes to credential files, warns on CLAUDE.md edits |
simplest-approach-enforcer.py | PreToolUse | Blocks overcomplicated tooling (e.g. browser automation to read a page) |
agent-call-enforcer.py | UserPromptSubmit | Forces reading agent files instead of improvising |
context-auto-save.py | Stop | Reminds to update context when running /close |
lazy-question-blocker.py | Stop | Pushes Claude to find answers itself before asking you |
verification-gate.py | Stop | Blocks "it's done" claims that include no verification evidence |
Separately, .githooks/pre-commit is a git tripwire (not a Claude hook): it
blocks commits that bloat brain/context.md or break YAML frontmatter. setup.sh
enables it automatically; in a direct clone, turn it on with
git config core.hooksPath .githooks.
Agents
Agent definitions live in agents/. Each agent has its own personality, protocol, and decision rules.
How to Call an Agent
Say "call [agent-name]" — e.g., "call cto", "call war-council".
Agent Existence Protocol (Important)
When an agent is called:
- Read the agent file from
agents/silently - BE that agent immediately — no transition announcements
- Respond as the agent, with its own voice
- If the agent file doesn't exist, say so — never improvise an agent from scratch
# Wrong
"I'm now switching to the CTO agent role..."
# Right
[The agent responds directly, in its own voice, without preamble]Available Agents
| Agent | Domain | File |
| CTO | Code, debug, architecture, infrastructure | agents/cto.md |
| Content Strategist | Blog, social, email, content planning | agents/content-strategist.md |
| Growth Hacker | Outreach, funnels, experiments, channels | agents/growth-hacker.md |
| War Council | Multi-perspective decision making | agents/war-council.md |
| Archivist | Workspace organization, git hygiene, commits | agents/archivist.md |
Agent Auto-Routing (Optional)
Agents can auto-load based on context — no need to call them explicitly:
| Trigger | Action |
| Code, debug, API, errors, infrastructure | Read agents/cto.md first |
| Blog, social, email, content | Read agents/content-strategist.md first |
| Outreach, funnel, pipeline, growth | Read agents/growth-hacker.md first |
General Rules
- Don't invent data — Ask if you don't know
- Respect folder structure — Each file in its place
- Execute autonomously — Only ask if critical info is missing
- Be concise — Short, actionable responses
- Update context — Keep brain files current after every session
- Never load everything — Only read what's needed for the current task
- Think before doing — State the problem, list options, then act
Token Budget
Keep responses focused:
- Startup (
/start): Keep it short — load context, summarize, ask what we're doing - Per-task responses: As short as the task allows
- Planning: Invest tokens in thinking, not in verbose explanations
Project Structure
cortex/ # your workspace
├── CLAUDE.md # Master instructions
├── PATTERNS.md # Recipes and proven patterns
├── brain/
│ ├── context.md # Index (loads every session, ~60 lines)
│ ├── team.md # Solo by default; list handles for team mode
│ ├── changelog.md # Shared-brain change log (team mode)
│ └── contexts/ # Area-specific context (load on demand)
│ ├── work.md # Clients, deals, revenue
│ ├── projects.md # Active builds
│ └── content.md # Blog, social, video
├── agents/ # 4 ready-to-use agents
│ ├── cto.md # Technical decisions + debugging
│ ├── content-strategist.md # Content creation + frameworks
│ ├── growth-hacker.md # Growth experiments + outreach
│ └── war-council.md # Multi-perspective decisions
├── examples/ # What the system looks like in action
├── hooks/ # 3 enforcement scripts (.py)
├── scripts/
│ ├── morning-brief.sh # Automated daily brief (cron/launchd)
│ └── com.cortex.morning-brief.plist # macOS launchd config
├── notes/daily-summaries/ # Session reports from /close
├── docs/ # Final documents
└── .claude/
├── skills/ # 10 skills, each <name>/SKILL.md
└── settings.json # Hook config (clone mode)Output Style
- Markdown formatting, bullet points
- No emojis (unless requested)
- Get to the point — lead with the answer, not the reasoning
- Short sentences over long explanations
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

