Step 1: Locate the Hub Vault
- Read
brain.yaml in the current directory's .brain/ to find the architecture mode
- If Hub+Spokes: find the hub path (default
~/Brain)
- If no hub: operate on the current vault's root instead
- Confirm the hub vault exists and is readable
Step 2: Take a "Before" Snapshot
Count and record:
- Total
.md files in the hub vault (top-level only, not Machine/ subdirs)
- Total
[[wikilinks]] across all hub vault .md files
- List of all existing note filenames (to avoid overwriting)
- Orphan count: notes with 0 incoming links from other notes
Step 3: Discover Entities from All Registered Projects
Read {hub}/Machine/Memory/projects.md to get all registered projects.
For each registered project, scan these sources silently:
README.md → project purpose, tech stack
CLAUDE.md → tools, conventions, domain
package.json / pyproject.toml / Cargo.toml / go.mod → dependencies and language
.brain/brain.yaml → module type, framework
Machine/Memory/context-cache.md → existing context
Machine/Memory/entities.md → already-known entities
- Key source directories (scan filenames, not content — for speed)
Build a master list of:
- Domains → will become MOC notes (e.g., Trading, AI Tooling, Web Development, DevOps)
- Tools → will become entity notes (e.g., Supabase, Playwright, Vite, Docker)
- Platforms → entity notes (e.g., TradingView, Vercel, GitHub Actions)
- Languages/Frameworks → entity notes (e.g., Pine Script, React, FastAPI)
- Data sources → entity notes (e.g., COT, market sentiment data)
- Concepts → entity notes (e.g., Gann Analysis, WebSocket, MCP)
- People → entity notes (if referenced in project context)
Deduplication: Normalize names (lowercase comparison). If a note already exists in the hub vault, skip it. Only create new notes.
Step 4: Create MOC Hub Notes
For each discovered domain, create a MOC — {Domain}.md note if it doesn't exist:
---
tags: [type/MOC, domain/{domain-slug}]
created: {today}
---
# MOC — {Domain Name}
{One-line description connecting to [[{owner-name}]]'s work.}
## Projects
- [[{project}]] — {brief description}
## Tools & Platforms
- [[{tool}]] — {role in this domain}
## Concepts
- [[{concept}]] — {brief description}
Rules:
- Every MOC must link to the owner note and at least 3 other notes
- Always create
MOC — Projects if it doesn't exist (indexes all projects)
- MOCs should cross-link to each other where domains overlap
Step 5: Create Entity Notes
For each discovered entity (tool, platform, language, data source, concept), create {Entity Name}.md if it doesn't exist:
---
tags: [type/{tool|language|data-source|concept|platform|person}, domain/{domain-slug}]
created: {today}
---
# {Entity Name}
{One-line description.}
## How [[{owner}]] Uses It
- {Usage in project 1 — with [[project-link]]}
- {Usage in project 2 — with [[project-link]]}
## Related
- [[{parent MOC}]]
- [[{related-entity-1}]]
- [[{related-entity-2}]]
Rules:
- Every entity must link to at least 1 MOC and 1 project
- Target 4-8 outgoing
[[wikilinks]] per note
- Use bidirectional linking: if A links to B, ensure B links back to A (update B if it already exists)
Step 6: Fill Empty Stubs
Scan all [[wikilink]] targets across the hub vault. For each target that:
- Has no corresponding
.md file, OR
- Has a
.md file that is empty (0 bytes or only whitespace)
Create or fill the note with:
- Frontmatter (tags, created date)
- Brief description inferred from the linking context
- Links back to the notes that reference it
- At least 1 MOC link
Exceptions — do NOT create notes for:
- Machine/ subdirectory references (like
[[active-rules]], [[decisions]])
- Inline text fragments that aren't real entities (like
[[double-bracket]])
- Generic words that aren't meaningful entities
Step 7: Enrich Sparse Notes
Scan all existing notes in the hub vault. For any note with fewer than 3 outgoing [[wikilinks]]:
- Add relevant cross-links to MOCs, related entities, or projects
- Ensure the owner note links to all MOCs and all projects
- Ensure all project notes link to their relevant MOCs, tools, and data sources
Do NOT change the meaning or content of existing notes — only add ## Related links or append links to existing sections.
Step 8: Report Results
Take an "After" snapshot and report:
🌐 Knowledge Graph Seeded
Before → After:
Notes: {before} → {after} (+{diff})
Wikilinks: {before} → {after} (+{diff})
Orphans: {before} → {after}
Created:
{N} MOC hub notes: {list names}
{M} entity notes: {list names}
{K} stubs filled: {list names}
{J} sparse notes enriched
Avg links per note: {total_links / total_notes}
Open Obsidian graph view to see the changes.
Next run of /brain-seed will discover any new entities from project changes.
1---2name: brain-seed3description: Enrich the Obsidian knowledge graph with MOC hubs, entity notes, and cross-links. Use when the user says "seed the graph", "enrich graph", "graph seeding", "add nodes", "make graph richer", or wants to grow their knowledge graph from project context.4---56<objective>7Scan all registered projects and the hub vault, discover entities (tools, platforms, concepts, data sources, people), create MOC hub notes and entity notes with dense cross-links, fill empty wikilink stubs, and report before/after graph density stats. Idempotent — safe to run repeatedly.8</objective>910<protocol>1112## Step 1: Locate the Hub Vault13141. Read `brain.yaml` in the current directory's `.brain/` to find the architecture mode152. If Hub+Spokes: find the hub path (default `~/Brain`)163. If no hub: operate on the current vault's root instead174. Confirm the hub vault exists and is readable1819## Step 2: Take a "Before" Snapshot2021Count and record:22- Total `.md` files in the hub vault (top-level only, not Machine/ subdirs)23- Total `[[wikilinks]]` across all hub vault `.md` files24- List of all existing note filenames (to avoid overwriting)25- Orphan count: notes with 0 incoming links from other notes2627## Step 3: Discover Entities from All Registered Projects2829Read `{hub}/Machine/Memory/projects.md` to get all registered projects.3031For **each registered project**, scan these sources silently:32- `README.md` → project purpose, tech stack33- `CLAUDE.md` → tools, conventions, domain34- `package.json` / `pyproject.toml` / `Cargo.toml` / `go.mod` → dependencies and language35- `.brain/brain.yaml` → module type, framework36- `Machine/Memory/context-cache.md` → existing context37- `Machine/Memory/entities.md` → already-known entities38- Key source directories (scan filenames, not content — for speed)3940Build a master list of:41- **Domains** → will become MOC notes (e.g., Trading, AI Tooling, Web Development, DevOps)42- **Tools** → will become entity notes (e.g., Supabase, Playwright, Vite, Docker)43- **Platforms** → entity notes (e.g., TradingView, Vercel, GitHub Actions)44- **Languages/Frameworks** → entity notes (e.g., Pine Script, React, FastAPI)45- **Data sources** → entity notes (e.g., COT, market sentiment data)46- **Concepts** → entity notes (e.g., Gann Analysis, WebSocket, MCP)47- **People** → entity notes (if referenced in project context)4849**Deduplication:** Normalize names (lowercase comparison). If a note already exists in the hub vault, skip it. Only create new notes.5051## Step 4: Create MOC Hub Notes5253For each discovered domain, create a `MOC — {Domain}.md` note if it doesn't exist:5455```markdown56---57tags: [type/MOC, domain/{domain-slug}]58created: {today}59---60# MOC — {Domain Name}6162{One-line description connecting to [[{owner-name}]]'s work.}6364## Projects65- [[{project}]] — {brief description}6667## Tools & Platforms68- [[{tool}]] — {role in this domain}6970## Concepts71- [[{concept}]] — {brief description}72```7374**Rules:**75- Every MOC must link to the owner note and at least 3 other notes76- Always create `MOC — Projects` if it doesn't exist (indexes all projects)77- MOCs should cross-link to each other where domains overlap7879## Step 5: Create Entity Notes8081For each discovered entity (tool, platform, language, data source, concept), create `{Entity Name}.md` if it doesn't exist:8283```markdown84---85tags: [type/{tool|language|data-source|concept|platform|person}, domain/{domain-slug}]86created: {today}87---88# {Entity Name}8990{One-line description.}9192## How [[{owner}]] Uses It93- {Usage in project 1 — with [[project-link]]}94- {Usage in project 2 — with [[project-link]]}9596## Related97- [[{parent MOC}]]98- [[{related-entity-1}]]99- [[{related-entity-2}]]100```101102**Rules:**103- Every entity must link to at least 1 MOC and 1 project104- Target 4-8 outgoing `[[wikilinks]]` per note105- Use bidirectional linking: if A links to B, ensure B links back to A (update B if it already exists)106107## Step 6: Fill Empty Stubs108109Scan all `[[wikilink]]` targets across the hub vault. For each target that:110- Has no corresponding `.md` file, OR111- Has a `.md` file that is empty (0 bytes or only whitespace)112113Create or fill the note with:114- Frontmatter (tags, created date)115- Brief description inferred from the linking context116- Links back to the notes that reference it117- At least 1 MOC link118119**Exceptions — do NOT create notes for:**120- Machine/ subdirectory references (like `[[active-rules]]`, `[[decisions]]`)121- Inline text fragments that aren't real entities (like `[[double-bracket]]`)122- Generic words that aren't meaningful entities123124## Step 7: Enrich Sparse Notes125126Scan all existing notes in the hub vault. For any note with fewer than 3 outgoing `[[wikilinks]]`:127- Add relevant cross-links to MOCs, related entities, or projects128- Ensure the owner note links to all MOCs and all projects129- Ensure all project notes link to their relevant MOCs, tools, and data sources130131**Do NOT change the meaning or content** of existing notes — only add `## Related` links or append links to existing sections.132133## Step 8: Report Results134135Take an "After" snapshot and report:136137```138🌐 Knowledge Graph Seeded139140Before → After:141 Notes: {before} → {after} (+{diff})142 Wikilinks: {before} → {after} (+{diff})143 Orphans: {before} → {after}144145Created:146 {N} MOC hub notes: {list names}147 {M} entity notes: {list names}148 {K} stubs filled: {list names}149 {J} sparse notes enriched150151Avg links per note: {total_links / total_notes}152153Open Obsidian graph view to see the changes.154Next run of /brain-seed will discover any new entities from project changes.155```156157</protocol>158159<rules>160- NEVER overwrite existing notes — only create new ones or append links to existing ones161- NEVER fabricate entities — only create notes for things actually discovered in project context162- ALWAYS use `[[wikilinks]]` for internal references163- ALWAYS include YAML frontmatter with tags, created date164- ALWAYS use ISO dates (YYYY-MM-DD)165- Target 4-8 outgoing wikilinks per note — this is the density threshold for a useful graph166- Bidirectional linking: if you create A→B, ensure B→A exists too167- Skip Machine/ subdirectory files when scanning for stubs (they're not graph nodes)168- Run silently — don't narrate each file creation, just show the final report169- This skill is idempotent — running it twice produces the same result (no duplicates)170</rules>171172<success_criteria>173- Zero orphan notes after seeding (every note has at least 1 incoming link)174- Every new note has 4+ outgoing wikilinks175- Every MOC links to the owner note and at least 3 entities176- Every entity links to at least 1 MOC and 1 project177- No existing notes were overwritten or had content removed178- Before/after stats reported clearly179- Graph view in Obsidian shows visible clusters around MOC hubs180</success_criteria>