Skip to Content
Mind Palace 0.3.1-alpha is out. Check it out →
FeaturesThe Brain: Knowledge Memory

The Brain: Knowledge Memory

Mind Palace doesn’t just index your code; it remembers your intentions, decisions, and learnings. This “Brain” system ensures that AI agents (and future you) understand why something was implemented, not just what was implemented.


Knowledge Types

Knowledge in the Palace is categorized into three types:

TypePurposeSignal Example
DecisionExplicit choices that affect the codebase”We should use Postgres for the main DB.”
IdeaPotential future changes or hypotheses”What if we added a Redis cache here?”
LearningVerified facts or patterns discovered”TIL: JSONC is faster than standard JSON for our use case.”

Storing Knowledge

The CLI uses natural language processing to auto-classify your thoughts.

palace store "Let's use JWT for authentication"

Explicit Typing

You can force a type if the auto-classifier doesn’t match your intent:

palace store "Maybe use Svelte?" --as idea palace store "Always use 8080 as internal port" --as learning

Scoping

Knowledge can be restricted to a specific part of the project:

palace store "TIL: This file has a race condition" --scope file --path src/main.go palace store "We decided to move auth here" --scope room --path auth

Recalling Knowledge

Retrieving knowledge is as simple as searching for it.

palace recall "authentication"

Filtering

palace recall --type decision # See only decisions palace recall --pending # See decisions awaiting an outcome

Decision Lifecycles

Decisions aren’t static. You can track their outcomes to prevent repeating mistakes.

Recording Outcomes

Once a decision is tested in reality, record its success or failure:

palace recall update d_abc123 success palace recall update d_xyz789 failed

Outcome values: success, failed, mixed

Linking Records

Knowledge exists in a web of relationships. Note: flags must come before the source ID:

palace recall link --supersedes d_old d_new palace recall link --supports d_choice l_pattern

Supported Relations:

  • --supersedes
  • --implements
  • --supports
  • --contradicts
  • --inspired-by
  • --related

AI Context Injection

When you generate a context pack (via palace explore --full or check --collect), the Palace automatically injects relevant learnings and decisions based on the files referenced in the pack.

This enables AI agents to be aware of:

  • Avoidance Patterns: “Note: We tried X but it failed because Y.”
  • Architectural Rules: “Remember: All API responses must follow schema Z.”
  • Ongoing Discussions: “Active Idea: We are planning to deprecate this utility.”

By committing these curated knowledge items to Git (stored in .palace/brain/), you build a permanent, shared intelligence for your codebase.

Last updated on