User-facing guide for viewing, modifying, and maintaining the brain system. Also serves as a reference for Claude when manually adjusting values.
All commands assume the plugin is loaded. $PLUGIN_ROOT resolves to wherever the plugin is installed.
| What | Where | Safe to delete? |
|---|---|---|
| Config | ~/.claude/brain/config.json |
Re-run setup |
| Lessons + Forces DB | ~/.claude/brain/signals.db |
Loses all behavioral data — re-seed with seed-signals.js |
| Conversation index | ~/.claude/brain/recall.db |
Re-scan rebuilds it |
| Window index | ~/.claude/brain/windows.json |
Re-scan rebuilds it |
| Project DIR files | ~/.claude/brain/hippocampus/*.dir.json |
Re-scan rebuilds them |
| Term index | ~/.claude/brain/hippocampus/terms.db |
Re-scan rebuilds it |
| Short-term recall | ~/.claude/brain/prefrontal-cortex.md |
Loses last 3 session summaries |
| Decision gates | ~/.claude/brain/prefrontal-live.md |
Regenerated from signals.db |
| PFC size marker | ~/.claude/brain/.pfc-loaded-size |
Regenerated automatically |
| Queued plans | ~/.claude/brain/queued-plans.md |
Loses plan tracking |
| Safety config | ~/.claude/brain/hypothalamus-config.json |
Falls back to defaults |
Edit ~/.claude/brain/config.json:
{
"workspaces": [
{ "name": "existing", "path": "/home/user/existing" },
{ "name": "new-project", "path": "/home/user/new-project" }
],
"conversationDirs": [
"~/.claude/projects/-home-user-existing",
"~/.claude/projects/-home-user-new-project"
]
}The conversation dir encoding: take the absolute path, replace all / with -.
Then re-scan:
node $PLUGIN_ROOT/hippocampus/scripts/scan.jsRemove the entries from config.json. Optionally delete its DIR files from ~/.claude/brain/hippocampus/.
cat ~/.claude/brain/config.jsonLessons are behavioral rules stored in signals.db. They have a brain_file that categorizes them:
| Brain File | Purpose | Polarity |
|---|---|---|
amygdala |
Pain points — things to avoid | negative |
nucleus-accumbens |
Patterns that work — things to reinforce | positive |
prefrontal |
Decision rules — things to check before acting | negative |
hippocampus |
Routing insights — where to look for things | negative |
node $PLUGIN_ROOT/scripts/dopamine-helper.js --lessonsnode $PLUGIN_ROOT/scripts/dopamine-helper.js --surface
node $PLUGIN_ROOT/scripts/dopamine-helper.js --surface --all # include low-tier
node $PLUGIN_ROOT/scripts/dopamine-helper.js --surface --brain amygdalanode $PLUGIN_ROOT/scripts/dopamine-helper.js --insert \
--brain "amygdala" \
--domain "workflow" \
--title "Short title" \
--entry "Full description of the lesson" \
--severity "critical"Optional: --weight 80 to set an explicit weight instead of the default 50.
In a Claude session, type /dopamine + (positive) or /dopamine - (negative). Claude walks you through a structured discussion and stores the result.
node -e "
const Database = require('better-sqlite3');
const db = new Database(process.env.HOME + '/.claude/brain/signals.db');
db.prepare('UPDATE lessons SET confirmation_count = ? WHERE title = ? AND status = ?').run(80, 'Lesson Title Here', 'active');
db.close();
console.log('Updated');
"Soft-delete (recommended — preserves history):
node -e "
const Database = require('better-sqlite3');
const db = new Database(process.env.HOME + '/.claude/brain/signals.db');
db.prepare(\"UPDATE lessons SET status = 'inactive' WHERE title = ? AND status = 'active'\").run('Lesson Title Here');
db.close();
console.log('Deactivated');
"Hard delete:
node -e "
const Database = require('better-sqlite3');
const db = new Database(process.env.HOME + '/.claude/brain/signals.db');
db.prepare(\"DELETE FROM lessons WHERE title = ?\").run('Lesson Title Here');
db.close();
console.log('Deleted');
"| Weight | Tier | Behavior |
|---|---|---|
| 75-100 | Rule | Always loaded. Follow without exception. |
| 50-74 | Inclination | Always loaded. Strong default, but can be questioned. |
| 25-49 | Awareness | On-demand. Not loaded into prefrontal by default. |
| 0-24 | Data | Background. Accumulating evidence only. |
After modifying lessons directly in the DB, regenerate the compiled output:
node $PLUGIN_ROOT/scripts/generate-prefrontal.jsThis rebuilds ~/.claude/brain/prefrontal-live.md from the current state of signals.db. The next session start will pick it up automatically.
Forces are relational dynamics stored in signals.db. They shape how Claude collaborates with you.
| Force Type | Purpose |
|---|---|
force |
A relational principle (e.g., "Constraint-driven design") |
connective_tissue |
Links between forces |
behavioral_outcome |
Emergent dynamics forces produce together |
node $PLUGIN_ROOT/scripts/oxytocin-helper.js --forcesnode $PLUGIN_ROOT/scripts/oxytocin-helper.js --surface
node $PLUGIN_ROOT/scripts/oxytocin-helper.js --surface --allnode $PLUGIN_ROOT/scripts/oxytocin-helper.js --insert \
--title "Force Name" \
--description "What this force means and when it applies" \
--score 75 \
--type "force"In a Claude session, type /oxytocin new to create or /oxytocin + to reinforce. Claude walks you through it.
node -e "
const Database = require('better-sqlite3');
const db = new Database(process.env.HOME + '/.claude/brain/signals.db');
db.prepare('UPDATE forces SET score = ? WHERE title = ? AND status = ?').run(85, 'Force Title Here', 'active');
db.close();
console.log('Updated');
"node -e "
const Database = require('better-sqlite3');
const db = new Database(process.env.HOME + '/.claude/brain/signals.db');
db.prepare(\"UPDATE forces SET status = 'inactive' WHERE title = ? AND status = 'active'\").run('Force Title Here');
db.close();
console.log('Deactivated');
"| Score | Tier | Behavior |
|---|---|---|
| 75-100 | Always-on | Shapes every interaction |
| 50-74 | Planning-mode | Active during design and brainstorming |
| 0-49 | Deep context | Archived, accessed on demand |
Same as lessons — run generate-prefrontal.js to recompile.
The prefrontal is a compiled markdown file (prefrontal-live.md) generated from lessons and forces in signals.db. It's loaded into Claude's context at every session start.
Never edit prefrontal-live.md directly — it's overwritten on regeneration.
- Lessons with weight >= 50 (Rule + Inclination tiers)
- Forces with score >= 50 (Always-on + Planning-mode tiers)
- 120-line cap (truncates if too large)
node $PLUGIN_ROOT/scripts/generate-prefrontal.jsThis is separate from prefrontal-live.md. It holds the last 3 session summaries written by /wrapup or /continue save. Format:
## YYYY-MM-DD HH:MM — project-or-scope [SESSION_ID]
Files: file1.js, file2.js
Summary: What was done
Next: What's pending
You can edit this manually if a session entry is wrong. The CC2 indexer reads entries before trimming them.
node $PLUGIN_ROOT/hippocampus/scripts/query.js --resolve <alias>
node $PLUGIN_ROOT/hippocampus/scripts/query.js --blast-radius <file>
node $PLUGIN_ROOT/hippocampus/scripts/query.js --lookup <file>
node $PLUGIN_ROOT/hippocampus/scripts/query.js --find <identifier>
node $PLUGIN_ROOT/hippocampus/scripts/query.js --structure <file>
node $PLUGIN_ROOT/hippocampus/scripts/query.js --list-aliases
node $PLUGIN_ROOT/hippocampus/scripts/query.js --schemanode $PLUGIN_ROOT/hippocampus/scripts/scan.jsEdit the project's DIR file at ~/.claude/brain/hippocampus/<project>.dir.json. Add to the aliases object:
{
"aliases": {
"auth middleware": "lib/middleware/auth.js",
"main server": "server.js"
}
}Aliases are preserved across re-scans.
node $PLUGIN_ROOT/hippocampus/scripts/scan.js --dismiss <project-name> <file-path>node $PLUGIN_ROOT/hippocampus/scripts/scan.js --undismiss <project-name> <file-path>node $PLUGIN_ROOT/hippocampus/scripts/term-scan-cli.jsnode $PLUGIN_ROOT/cerebral-cortex-v2/scripts/search.js "term1,term2" "term3" --limit 5Terms in quotes are comma-separated OR. Separate arguments are additive (more matched = higher score).
# Digest (summary only)
node $PLUGIN_ROOT/cerebral-cortex-v2/scripts/read-window.js <session> <seq> --digest
# Decision context
node $PLUGIN_ROOT/cerebral-cortex-v2/scripts/read-window.js <session> <seq> --decision N
# Full window
node $PLUGIN_ROOT/cerebral-cortex-v2/scripts/read-window.js <session> <seq> --focus <start>-<end>node $PLUGIN_ROOT/cerebral-cortex-v2/scripts/scan.jsnode $PLUGIN_ROOT/cerebral-cortex-v2/scripts/extract.jsnode $PLUGIN_ROOT/cerebral-cortex-v2/scripts/stopword-candidates.js --noise "go,something"
node $PLUGIN_ROOT/cerebral-cortex-v2/scripts/stopword-candidates.js --relevant "term"
node $PLUGIN_ROOT/cerebral-cortex-v2/scripts/stopword-candidates.js --demote "term"
node $PLUGIN_ROOT/cerebral-cortex-v2/scripts/stopword-candidates.js --listThe hypothalamus fires on every Edit/Write/Bash call. It classifies paths and warns about risky operations.
Create or edit ~/.claude/brain/hypothalamus-config.json:
{
"disabled": false,
"whitelisted_paths": ["/path/to/safe/dir"],
"sensitivity_overrides": {
"some-file.db": "green"
},
"warn_on_unparseable": true
}| Field | Default | Purpose |
|---|---|---|
disabled |
false |
Turn off all hypothalamus warnings |
whitelisted_paths |
[] |
Paths that always get GREEN classification |
sensitivity_overrides |
{} |
Override sensitivity for specific files |
warn_on_unparseable |
true |
Warn on bash commands that can't be fully analyzed |
| Level | Meaning | Action |
|---|---|---|
| GREEN | Safe | Proceed silently |
| YELLOW | Has dependents | Warn, proceed |
| AMBER | Unparseable command | Warn, proceed |
| RED (sensitivity) | Database/secrets/roots | Block — requires user confirmation |
| RED (blast radius) | 5+ dependents | Warn strongly, proceed |
| UNKNOWN | Outside known projects | Warn, proceed |
| Command | Usage | What it does |
|---|---|---|
/hello |
Start of session | Restores recent context from PFC |
/continue |
After compaction | Re-grounds in current session |
/continue save |
Before stopping | Saves project state + runs wrapup |
/continue <project> |
New session | Picks up a specific project |
/continue workspace |
New session | Full workspace status overview |
/wrapup |
Before stopping | Alias for /continue save |
/dopamine + |
Mid-session | Flag a positive pattern |
/dopamine - |
Mid-session | Flag a pain point |
/oxytocin new |
Mid-session | Create a new relational force |
/oxytocin + |
Mid-session | Reinforce an existing force |
Runs hippocampus re-scan, term index update, CC2 scan + metadata extraction, PFC trim, prefrontal regeneration, and size marker update:
bash $PLUGIN_ROOT/scripts/wrapup-mechanical.shThis is what /wrapup calls after Claude writes the PFC entry.
Plugin uninstall only removes the plugin registration — it does not delete your brain data.
claude plugins uninstall thebrain@thebrain-local
claude plugins marketplace remove thebrain-localAfter uninstalling the plugin, your learned data still lives in ~/.claude/brain/. To remove it:
rm -rf ~/.claude/brainAll three steps — plugin, data, and source:
claude plugins uninstall thebrain@thebrain-local
claude plugins marketplace remove thebrain-local
rm -rf ~/.claude/brain
rm -rf /path/to/thebrain-packageTo start completely fresh without uninstalling:
rm -rf ~/.claude/brainThen start a new Claude session and say "set up thebrain".
To reset only behavioral data (keep workspaces and indexes):
rm ~/.claude/brain/signals.db ~/.claude/brain/prefrontal-live.md
node $PLUGIN_ROOT/scripts/seed-signals.js
node $PLUGIN_ROOT/scripts/generate-prefrontal.js