Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

docs: update Brain storage layout (#5436)

[._.]/ Adam Eivyb31155d8c5c1
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 9929200ffe..a2cb2f46ff 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -113,13 +113,21 @@ PortOS/
│ │ └── sessions/ # Per-session prompt, output, metadata
│ ├── brain/ # Brain second-brain data (file-primary)
│ │ ├── meta.json # Settings
-│ │ ├── inbox.json # Captured thoughts
-│ │ ├── people.json # People records
-│ │ ├── projects.json # Project records
-│ │ ├── ideas.json # Ideas
-│ │ ├── admin.json # Admin tasks
-│ │ ├── links.json # Saved links (+ buckets.json, journals.json, memories.json)
-│ │ └── digests.jsonl # Daily/weekly digests (+ reviews.jsonl)
+│ │ ├── admin/ # Admin tasks (collectionStore: <id>/index.json)
+│ │ ├── buckets/ # Custom bucket definitions (collectionStore: <id>/index.json)
+│ │ ├── ideas/ # Ideas and concepts (collectionStore: <id>/index.json)
+│ │ ├── inbox/ # Captured thoughts (collectionStore: <id>/index.json)
+│ │ ├── journals/ # Daily Log entries (collectionStore: <id>/index.json)
+│ │ ├── links/ # Cross-record links (collectionStore: <id>/index.json)
+│ │ ├── memories/ # Brain memories (collectionStore: <id>/index.json)
+│ │ ├── people/ # People records (collectionStore: <id>/index.json)
+│ │ ├── projects/ # Projects with status tracking (collectionStore: <id>/index.json)
+│ │ ├── songs/ # SongBook songs (collectionStore: <id>/index.json)
+│ │ ├── memory-bridge-map.json # Brain↔CoS memory bridge mapping
+│ │ ├── obsidian-vaults.json # Obsidian vault sync config
+│ │ ├── sync_log.jsonl # Obsidian sync history
+│ │ ├── digests.jsonl # Daily digest history
+│ │ └── reviews.jsonl # Weekly review history
│ ├── digital-twin/ # Digital twin identity documents
│ │ ├── meta.json # Settings and state
│ │ └── documents/ # Markdown identity documents
@@ -132,6 +140,9 @@ PortOS/
└── ecosystem.config.cjs # PM2 configuration
```
+Each Brain `collectionStore` directory contains a schema-versioned `index.json`
+and stores every record at `<id>/index.json`.
+
## Data Flow
### HTTP Request Flow
diff --git a/docs/features/brain-system.md b/docs/features/brain-system.md
index f5d35eaf90..69c2f07cc2 100644
--- a/docs/features/brain-system.md
+++ b/docs/features/brain-system.md
@@ -65,15 +65,16 @@ Track administrative tasks:
```
./data/brain/
├── meta.json # Settings and scheduler state
-├── inbox.json # All captured thoughts with classifications
-├── people.json # People records
-├── projects.json # Projects with status tracking
-├── ideas.json # Ideas and concepts
-├── admin.json # Administrative tasks
-├── buckets.json # Custom bucket definitions
-├── links.json # Cross-record links
-├── memories.json # Brain memories
-├── journals.json # Daily Log entries
+├── admin/ # Admin tasks (collectionStore: <id>/index.json)
+├── buckets/ # Custom bucket definitions (collectionStore: <id>/index.json)
+├── ideas/ # Ideas and concepts (collectionStore: <id>/index.json)
+├── inbox/ # Captured thoughts (collectionStore: <id>/index.json)
+├── journals/ # Daily Log entries (collectionStore: <id>/index.json)
+├── links/ # Cross-record links (collectionStore: <id>/index.json)
+├── memories/ # Brain memories (collectionStore: <id>/index.json)
+├── people/ # People records (collectionStore: <id>/index.json)
+├── projects/ # Projects with status tracking (collectionStore: <id>/index.json)
+├── songs/ # SongBook songs (collectionStore: <id>/index.json)
├── memory-bridge-map.json # Brain↔CoS memory bridge mapping
├── obsidian-vaults.json # Obsidian vault sync config
├── sync_log.jsonl # Obsidian sync history
@@ -81,6 +82,9 @@ Track administrative tasks:
└── reviews.jsonl # Weekly review history
```
+Each `collectionStore` directory contains a schema-versioned `index.json` and
+stores every record at `<id>/index.json`.
+
## AI Classification
The classifier uses LM Studio to analyze captured thoughts and:
@@ -288,7 +292,7 @@ not export itself back.
| `server/services/brainScheduler.js` | Daily/weekly job scheduler |
| `server/services/youtubeIngest.js` | YouTube ingest orchestration (transcript / video / audio → brain + Obsidian + CoS task) |
| `server/lib/vttTranscript.js` | WebVTT/SRT → readable prose (collapses auto-caption repetition) |
-| `server/routes/brain.js` | Aggregator router mounting brainCapture, brainCrud, brainDigest, brainSettings, brainLinks, brainGraph, brainSync, brainDailyLog, brainSongbook, and brainYoutube |
+| `server/routes/brain.js` | Aggregator router mounting brainCapture, brainIdeaLoom, brainCrud, brainDigest, brainSettings, brainLinks, brainGraph, brainSync, brainDailyLog, brainSongbook, and brainYoutube |
| `client/src/pages/Brain.jsx` | Main page with tabs |
| `client/src/components/brain/tabs/*.jsx` | Tab components |
| `data/prompts/stages/brain-*.md` | Prompt templates |