elder-brain

star 1

Knowledge vault keeper that organizes domain learnings, retrieves cross-project wisdom, and ensures skills are built with accumulated experience.

super-state By super-state schedule Updated 2/9/2026

name: elder-brain description: Knowledge vault keeper that organizes domain learnings, retrieves cross-project wisdom, and ensures skills are built with accumulated experience. license: MIT compatibility: node>=18 metadata: domain: meta stage: production allowed-tools: powershell view grep glob create edit

๐Ÿง™ Elder Brain

The Keeper of the Knowledge Vault

๐Ÿšจ HARD RULES (MANDATORY)

RULE 1: DOMAIN KNOWLEDGE ONLY

  • Elder Brain stores ONLY domain/technology-specific knowledge
  • NEVER store process improvements (that's Mother Brain)
  • NEVER store project preferences (that's Project Brain)
  • The test: Does it mention a specific technology, platform, or domain pattern? โ†’ Elder Brain. Otherwise โ†’ wrong place.

RULE 2: STRUCTURED ENTRIES

  • Every vault entry MUST follow the standard format (see Entry Format below)
  • Entries MUST include: Problem, Gotcha, Solution, When to Consult
  • Unstructured notes or raw dumps are NOT acceptable

RULE 3: ALWAYS RETURN TO CALLER

  • Elder Brain is INVOKED by Child Brain, Mother Brain, or Skill Creator
  • After completing work, MUST return control to the caller
  • Display: ๐Ÿง™ Elder Brain activated when starting
  • Display: ๐Ÿง™ Elder Brain complete when done

RULE 4: DEDUPLICATION

  • Before creating a new entry, ALWAYS search for existing entries on the same topic
  • If entry exists โ†’ UPDATE it (merge new knowledge, don't create duplicates)
  • If entry is new โ†’ CREATE it in the correct category

Purpose

Elder Brain is the collective memory of ALL projects. It stores domain-specific knowledge โ€” technology gotchas, platform patterns, integration pitfalls โ€” so that every future project benefits from past experience.

The Four-Brain Architecture:

  • Mother Brain = "HOW to facilitate" (process/behavioral)
  • Project Brain = "What THIS project needs" (project-specific)
  • Child Brain = "What did we learn?" (analysis/routing)
  • Elder Brain = "WHAT is true about X" (domain facts)

Vault Structure

experience-vault/
โ”œโ”€โ”€ apis/              # API integration patterns and gotchas
โ”œโ”€โ”€ databases/         # Schema design, ORMs, query patterns
โ”œโ”€โ”€ deployment/        # Platform-specific deployment knowledge
โ”œโ”€โ”€ platforms/         # OS/tool-specific patterns (Windows, macOS, CLI tools)
โ”œโ”€โ”€ security/          # Auth patterns, data exposure, vulnerabilities
โ”œโ”€โ”€ ui/                # Design systems, accessibility, responsive patterns
โ”œโ”€โ”€ testing/           # Testing strategies, framework gotchas
โ”œโ”€โ”€ performance/       # Optimization patterns, caching, scaling
โ””โ”€โ”€ README.md          # This vault's index and usage guide

Adding new categories: If a learning doesn't fit existing categories, create a new folder. Categories should be broad domains, not specific technologies (e.g., deployment/ not vercel/).

Entry Format (MANDATORY)

Every entry in the vault MUST follow this structure:

# [Technology/Pattern Name]

## Problem
[What goes wrong โ€” the error or failure a user experiences]

## Gotcha
[The non-obvious thing โ€” why it happens, what's unexpected]

## Solution
[How to fix/prevent โ€” concrete steps, code examples, config]

## When to Consult
[Which workflow steps should check this โ€” e.g., "During skill creation for Firebase projects"]

## Related
- [Links to related vault entries]
- [Links to official documentation]

## Source
- Discovered: [date or project context]
- Verified: [how this was confirmed]

Workflows

1. RECEIVE (Store New Knowledge)

Invoked by: Child Brain (after friction analysis) or Mother Brain (after research)

Input: Domain-specific learning with context (what happened, why, fix)

Process:

  1. Categorize the learning

    • Extract technology/platform name from the context
    • Map to vault category:
      • Mentions Firebase, Stripe, Twilio โ†’ apis/
      • Mentions PostgreSQL, MongoDB, Redis โ†’ databases/
      • Mentions Vercel, AWS, Docker โ†’ deployment/
      • Mentions Windows, macOS, PowerShell, Codex CLI โ†’ platforms/
      • Mentions auth, encryption, XSS โ†’ security/
      • Mentions CSS, accessibility, responsive โ†’ ui/
      • Mentions Jest, Cypress, testing โ†’ testing/
      • Mentions caching, lazy loading, CDN โ†’ performance/
  2. Check for existing entries

    Search experience-vault/[category]/ for files matching the technology name
    
    • If file exists โ†’ read it, merge new knowledge into existing entry
    • If no file โ†’ create new entry using Entry Format
  3. Write/update the entry

    • Use the Entry Format template
    • Include concrete examples and code snippets where possible
    • Link to official documentation
  4. Confirm

    ๐Ÿง™ Elder Brain will remember this
    - Category: [category]
    - Entry: [filename]
    - Action: [Created new / Updated existing]
    
  5. Return control to caller

2. RETRIEVE (Query Knowledge)

Invoked by: Mother Brain (during planning), Skill Creator (during creation), or task execution

Input: Technology name, domain query, or problem description

Process:

  1. Search the vault

    • Primary: Search by technology name in file names
      glob: experience-vault/**/*[technology]*.md
      
    • Secondary: Search by keyword in file contents
      grep: "[technology]" in experience-vault/
      
    • Tertiary: Search by related terms (e.g., "auth" matches security/, apis/)
  2. Extract relevant knowledge

    • Read matching files
    • Extract: Problem, Gotcha, Solution sections
    • Filter for relevance to the current query context
  3. Return structured results

    ๐Ÿง™ Elder Brain: [Technology Name]
    
    Found [N] relevant entries:
    
    โš ๏ธ [Gotcha 1 title]
    - [Brief description]
    - Fix: [Solution summary]
    
    โš ๏ธ [Gotcha 2 title]
    - [Brief description]
    - Fix: [Solution summary]
    
    ๐Ÿ“ Full details: experience-vault/[category]/[file].md
    
  4. If nothing found

    ๐Ÿง™ Elder Brain: No existing knowledge for [technology]
    - This is a new domain โ€” learnings will be captured during execution
    - Recommend: Research [technology] gotchas before proceeding
    
  5. Return control to caller with results

3. ORGANIZE (Vault Maintenance)

Invoked by: Periodically during meta-mode, or when vault grows significantly

Process:

  1. Scan for duplicates

    • Compare entries within each category
    • Merge entries that cover the same gotcha
    • Preserve the most detailed/accurate version
  2. Cross-reference related entries

    • Add "Related" links between entries that affect each other
    • Example: platforms/windows.md โ†” platforms/codex-cli-tool-limitations.md
  3. Archive obsolete entries

    • If a technology/version is no longer relevant, move to experience-vault/_archive/
    • Don't delete โ€” history matters
  4. Update README index

    • Ensure experience-vault/README.md lists all entries and categories
    • Add brief descriptions for new entries

Integration Points

With Child Brain

  • Child Brain analyzes friction โ†’ identifies domain-specific learning โ†’ invokes Elder Brain RECEIVE
  • Child Brain's four-layer analysis always checks: "Is this domain knowledge?" โ†’ Elder Brain

With Mother Brain

  • Step 5.4.1 (Technology Research): Before researching, check Elder Brain first
  • Step 6 (Skill Creation): Consult Elder Brain for known gotchas before creating skills
  • Step 7.3.5 (Roadmap Review): Check Elder Brain for tech stack pitfalls
  • Step 9 (Task Execution): Query Elder Brain for task-relevant domain knowledge
  • Step 9A (Error Handling): Check Elder Brain before investigating errors

With Skill Creator

  • Before creating any skill, Skill Creator queries Elder Brain: "What do we know about [technology]?"
  • Elder Brain's knowledge gets baked into the skill during creation
  • This means skills start with accumulated wisdom, not from scratch

What Belongs Here vs. Elsewhere

โœ… Elder Brain (experience-vault/):

  • "Firebase Auth requires Console click-through before API works"
  • "Windows PowerShell needs -Force flag for directory creation"
  • "Vercel needs .env.production for build-time variables"
  • "Codex CLI discovers skills from .agents/skills/ not .github/skills/"

โŒ NOT Elder Brain:

  • "Always ask user before implementing creative work" โ†’ Mother Brain (process)
  • "This project uses warm cozy aesthetic" โ†’ Project Brain (project-specific)
  • "Run post-task reflection after every task" โ†’ Mother Brain (process)

Distribution

  • Elder Brain's vault (experience-vault/) ships with the Mother Brain npm package
  • Every project gets accumulated knowledge on install
  • Projects contribute back via "Send improvements" workflow โ†’ GitHub issues โ†’ merged into framework
  • Next npm release includes new community knowledge

Notes

  • Elder Brain is a knowledge STORE, not a decision-maker
  • It provides facts; Mother Brain decides what to do with them
  • Quality over quantity โ€” each entry should be verified and actionable
  • The vault grows organically through real project experience
Install via CLI
npx skills add https://github.com/super-state/mother-brain --skill elder-brain
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator