Skip to Content
Mind Palace 0.3.1-alpha is out. Check it out →
FeaturesCorridors

Corridors

Corridors enable knowledge sharing across Mind Palace workspaces. They allow learnings to flow between projects, so wisdom gained in one codebase can benefit all your work.

Overview

~/.palace/ # Global storage ├── config.yaml # Global settings └── corridors/ └── personal.db # Your personal learnings ~/project-a/.palace/ # Project A workspace └── memory.db # Project A learnings ~/project-b/.palace/ # Project B workspace └── memory.db # Project B learnings # Corridors connect these, sharing knowledge

Personal Corridor

The personal corridor stores learnings that follow you across all projects. Located at ~/.palace/corridors/personal.db.

View Personal Learnings

palace corridor personal

Add Personal Learning

palace learn "Global best practice" --corridor

Or promote a workspace learning:

palace corridor promote LEARNING_ID

Link other workspaces to share learnings between projects.

palace corridor link api-service ~/code/api-service
palace corridor list

Output:

Personal Corridor: ~/.palace/corridors/personal.db Learnings: 15 Avg Confidence: 0.82 Linked Workspaces: api-service ~/code/api-service/.palace (23 learnings) shared-lib ~/code/shared-lib/.palace (8 learnings) web-frontend ~/code/web-frontend/.palace (12 learnings)
palace corridor unlink api-service

Knowledge Flow

┌─────────────────────┐ │ Personal Corridor │ │ (global DB) │ └────────┬────────────┘ ┌────────┼────────┐ │ │ │ ▼ ▼ ▼ ┌───────┐ ┌───────┐ ┌───────┐ │Project│ │Project│ │Project│ │ A │ │ B │ │ C │ └───────┘ └───────┘ └───────┘

Promotion

High-confidence learnings can be promoted from workspace to personal corridor:

# Manually promote palace corridor promote LEARNING_ID # Automatic promotion (checks for high-confidence learnings) palace corridor auto-promote

Promotion criteria:

  • Confidence >= 0.8
  • Use count >= 3
  • Not already in personal corridor

Search Across Corridors

# Search all linked workspaces palace corridor search "error handling" --all # Search specific workspace palace corridor search "authentication" --workspace api-service

Context Assembly

When using get_context, corridor learnings are included automatically:

{ "tool": "get_context", "arguments": { "query": "user authentication", "includeCorridors": true } }

Response includes:

{ "files": [...], "symbols": [...], "learnings": [...], "corridorLearnings": [ { "content": "Always hash passwords with bcrypt", "confidence": 0.95, "source": "personal" }, { "content": "JWT tokens should expire within 24 hours", "confidence": 0.88, "source": "api-service" } ] }

Configuration

Global corridor configuration in ~/.palace/config.yaml:

corridors: personal: ~/.palace/corridors/personal.db links: api-service: /Users/me/code/api-service/.palace shared-lib: /Users/me/code/shared-lib/.palace settings: auto_promote: true min_confidence_for_promotion: 0.8 min_use_count_for_promotion: 3

Use Cases

Solo Developer

Personal corridor carries your best practices between projects:

# In project A, learn something valuable palace learn "Use structured logging for all errors" # It gets promoted to personal corridor palace corridor promote abc123 # In project B, it's automatically available palace recall "logging" # Returns the learning from personal corridor

Team Knowledge Sharing

Share learnings with your team by committing the .palace directory:

# Project repository .palace/ ├── palace.jsonc # Project config (commit this) ├── index/palace.db # Code index (gitignore) └── memory.db # Learnings (commit this for team sharing)

Team members automatically get shared learnings when they clone.

Cross-Project Patterns

Link related projects to share domain knowledge:

# Link your microservices palace corridor link users-service ~/code/users-service palace corridor link orders-service ~/code/orders-service palace corridor link payments-service ~/code/payments-service # Learnings from any service are searchable palace corridor search "database migrations" --all

CLI Reference

CommandDescription
palace corridor listShow all corridors and links
palace corridor personalShow personal corridor learnings
palace corridor link NAME PATHLink a workspace
palace corridor unlink NAMERemove a workspace link
palace corridor promote IDPromote learning to personal
palace corridor search QUERYSearch across corridors

Best Practices

  1. Start personal: Use the personal corridor for truly universal patterns
  2. Link related projects: Connect microservices, libraries, and related codebases
  3. Let confidence guide promotion: High-confidence learnings are more reliable
  4. Review periodically: Clean up outdated learnings
  5. Share with team: Commit workspace learnings to share team knowledge
Last updated on