🎭 MUSE

May 8, 2026 Β· View on GitHub

MUSE β€” The AI Coding Governance System

🎭 MUSE

The AI Coding Governance System β€” Roles, Memory, Skills, in Plain Markdown

License: MIT Version Stars Pure Markdown Zero Dependencies

Website X @MythsLabs LinkedIn Myths Labs X Creator

The nine Muses of Greek mythology were daughters of Mnemosyne β€” the Titaness of Memory. They transformed their mother's gift of total recall into mastery of the arts and sciences.

MUSE inherits this lineage. It ensures no insight is lost across AI conversations, transforming raw session data into structured knowledge that drives execution.

MUSE is a pure-Markdown governance system for AI pair programming. It goes beyond format specs (like AGENTS.md or .cursorrules) by providing a full system β€” role isolation, persistent memory, 65 skills, cross-role directives, and visual dashboards β€” all with zero code dependencies.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ L3  Memory Infrastructure   mem0 Β· MemOS Β· memsearchβ”‚  ← MUSE doesn't compete here
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ L2  Governance System       🎭 MUSE                 β”‚  ← Only player at this layer
β”‚     Roles Β· Memory Β· Skills Β· Directives Β· Dashboardβ”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ L1  Workflow Kits           Spec Kit Β· sudocode      β”‚  ← MUSE covers this + more
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ L0  Format Specs            AGENTS.md Β· .cursorrules β”‚  ← MUSE is compatible
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

AGENTS.md defines the format. MUSE builds the system on top of it.

Inspired by LCM (Lossless Context Management) + lossless-claw. MUSE implements LCM's core design principles using pure Markdown SOPs β€” zero code dependencies.

πŸ“– δΈ­ζ–‡ζ–‡ζ‘£ / Chinese Docs


✨ Why MUSE?

Problem: AI coding assistants have context window limits. Format specs like .cursorrules or AGENTS.md give your AI instructions β€” but they can't manage memory, roles, or cross-session knowledge. Long conversations forget early content. New conversations start from scratch.

Solution: MUSE wraps your AI with a governance protocol β€” role isolation, persistent dual-layer memory, 65 reusable skills, cross-role directive queue, and visual dashboards. All in plain Markdown.

Without MUSEWith MUSE
AI forgets early context in long conversationsPre/Post Compaction protocols preserve critical info
New conversations need manual context setup/resume auto-assembles context in 5 steps
One persona for all tasksRole isolation: build / QA / growth each see only their context
No cross-session memoryDual-layer: memory/ (short-term) + MEMORIES.md (long-term)
Same mistakes repeated/distill distills lessons β†’ /search finds them later
No visibility into project healthWeb Dashboard + VS Code Extension

🎯 Benchmark (run ./scripts/benchmark.sh on your own project):

  • /resume loads 16.9Γ— more context than a bare .cursorrules cold start
  • 15/15 governance features vs 0/15 for format-spec-only setups
  • 344 lines of accumulated project knowledge vs 0 retained across sessions

MUSE Demo β€” /resume β†’ boot β†’ work β†’ /ctx β†’ /bye

Without MUSE vs With MUSE

Optional

Works with: Claude Code Β· OpenClaw Β· OpenCode Β· Cursor Β· Windsurf Β· Gemini CLI Β· Codex CLI Β· Copilot Β· Aider Β· Antigravity β€” or any AI tool that supports system prompts.

ToolInstall CommandFormat
Claude Code / OpenClaw./scripts/install.sh --tool claude.agent/skills/ + CLAUDE.md
OpenCode./scripts/install.sh --tool opencode.agents/skills/ + CLAUDE.md
Cursor./scripts/install.sh --tool cursor.cursor/rules/*.mdc
Windsurf./scripts/install.sh --tool windsurf.windsurf/rules/*.md
Gemini CLI./scripts/install.sh --tool gemini.gemini/skills/ + GEMINI.md
Codex CLI./scripts/install.sh --tool codexAGENTS.md (single file)
Copilot./scripts/install.sh --tool copilot.github/copilot-instructions.md
Aider./scripts/install.sh --tool aiderCONVENTIONS.md
Antigravity./scripts/install.sh --tool antigravity.gemini/antigravity/skills/

Recommended companion: nah β€” context-aware permission guard for Claude Code. Deterministic classifier that auto-allows safe operations, asks for ambiguous ones, and blocks dangerous patterns (e.g. curl | bash). Eliminates permission fatigue without sacrificing safety. pip install nah && nah install


πŸš€ Quick Start (5 minutes)

# Clone MUSE
git clone https://github.com/myths-labs/muse.git

# Run interactive setup β€” configures language, model, and preferences
cd muse && ./setup.sh

The setup wizard will ask for your language, AI model, and docs preferences, then configure everything automatically.

Option B: Multi-Tool Install (Cursor / Windsurf / Gemini CLI / Codex CLI)

# Clone MUSE
git clone https://github.com/myths-labs/muse.git

# Install for your tool (auto-converts to the right format)
cd muse && ./scripts/install.sh --tool cursor --target /path/to/your-project

# Or auto-detect installed tools
./scripts/install.sh --target /path/to/your-project

Supported: claude, openclaw, opencode, cursor, windsurf, gemini, codex, or all.

Option C: Manual Setup

# Clone MUSE
git clone https://github.com/myths-labs/muse.git

# Copy templates to your project
cp muse/templates/CLAUDE.md your-project/CLAUDE.md
cp muse/templates/USER.md your-project/USER.md
cp muse/templates/MEMORIES.md your-project/MEMORIES.md
mkdir -p your-project/memory your-project/.muse

# Copy skills & workflows
cp -r muse/skills your-project/.agent/skills
cp -r muse/workflows your-project/.agent/workflows

# Add MUSE entries to your .gitignore
cat muse/templates/.gitignore-template >> your-project/.gitignore

Your project should look like:

your-project/
β”œβ”€β”€ CLAUDE.md              # πŸ“œ Constitution (AI iron rules)
β”œβ”€β”€ ETHOS.md               # πŸ’‘ Builder philosophy (5 principles)
β”œβ”€β”€ USER.md                # πŸ‘€ Your preferences
β”œβ”€β”€ MEMORIES.md            # 🧠 Long-term lessons
β”œβ”€β”€ .muse/                 # 🎭 Role states
β”‚   └── build.md           # βš™οΈ Dev execution
β”œβ”€β”€ memory/                # Short-term memory
β”‚   └── YYYY-MM-DD.md
β”œβ”€β”€ .agent/
β”‚   β”œβ”€β”€ skills/            # Skills library
β”‚   └── workflows/         # resume/bye/sync/distill/ctx/sprint/retro
└── [your code]

2. Customize CLAUDE.md

This is MUSE's core β€” the AI's "constitution". Edit to match your project:

# Iron Rules
1. All communication in [your language]
2. Check Skills before ANY task
3. Large files: view ≀300 lines at a time
4. Context β‰₯ 80%: immediately exit
5. Verify before claiming done
6. End conversations with /bye

3. Start using

You: /resume           ← AI reads constitution β†’ reads memory β†’ starts work
     ... work ...
You: /ctx              ← Check if context is enough
     ... continue ...
You: /bye              ← One-click wrap-up, auto-save

Sprint workflow (v2.29+):

You: /sprint           ← Think β†’ Plan β†’ Build β†’ Review β†’ Test β†’ Ship β†’ Reflect
You: /retro             ← Weekly stats from git log + memory (commits, shipped, lessons)

πŸ› Architecture

graph TB
    subgraph "πŸ› Constitution Layer"
        A["CLAUDE.md"] --> B["Iron Rules + Safety"]
        A --> C["ETHOS.md<br/>Builder Philosophy"]
    end
    
    subgraph "🎭 Role Layer"
        R[".muse/*.md<br/>build Β· qa Β· growth"] --> S["Role Isolation"]
        R --> T["πŸ“‘ Directive Queue<br/>cross-role messaging"]
    end
    
    subgraph "🧠 Memory Layer"
        D["memory/*.md<br/>short-term"] -->|"/distill"| E["MEMORIES.md<br/>long-term"]
        D --> D1["Drift Detection<br/>stale >7d auto-flag"]
        E --> E1["4 Categories<br/>preference Β· feedback<br/>project Β· reference"]
    end
    
    subgraph "πŸ€– Coordinator"
        CO["coordinator-mode"] --> CO1["Understand β†’ Dispatch"]
        CO --> CO2["Sub-agent Synthesis"]
    end
    
    subgraph "⚑ Skills Layer (65)"
        G["Trigger Skills<br/>on-demand"]
        H["Lifecycle Skills<br/>strategic-compact"]
    end
    
    subgraph "πŸ”„ Workflow Layer"
        I["/resume"] --> J["Work"]
        J -->|"/sprint"| SP["Think→Plan→Build<br/>→Review→Test→Ship"]
        J -->|"/ctx"| K{"Healthy?"}
        K -->|"🟒"| J
        K -->|"πŸ”΄"| L["/bye"]
        L --> D
        L --> L1["Digital Twin<br/>profile update"]
    end

LCM Concept Mapping

LCM ConceptMUSE ImplementationDescription
SQLite persistencememory/ + MEMORIES.mdMarkdown as database
Leaf nodesmemory/YYYY-MM-DD.mdDaily conversation snapshots
Condensed nodesMEMORIES.mdCross-day distilled lessons
Condensation/distillLeaf β†’ long-term memory
Assembler/resumeContext assembly
lcm_grep./scripts/search.sh (TF-IDF)Ranked semantic search
compact:beforePre-Compaction ProtocolSave before compress
contextThreshold/ctx 80% red lineAuto health check

πŸ“– Commands

CommandDescriptionInput
/startFirst-time setup β€” configures project, roles, languageNone (interactive)
/resume [scope]Boot β€” restore context & start workbuild, growth, etc.
/sprintFeature sprint β€” Think β†’ Plan β†’ Build β†’ Review β†’ Test β†’ Ship β†’ ReflectNone (guided)
/retroWeekly retrospective β€” stats from git log + memoryNone needed
/settingsChange language, AI model, or preferencesSubcommand (optional)
/ctxContext health check (πŸŸ’πŸŸ‘πŸ”΄)None needed
/byeOne-click wrap-up β€” save, sync, archiveNone needed
/distillCondense memory/ β†’ MEMORIES.mdNone needed
/searchTF-IDF search across memory, roles, skillsQuery string
/sync [direction]Cross-file sync in multi-role setupDirection (optional)
/sync receivePull updates from other roles mid-conversationNone needed
/resume [project] qaStart QA verification (independent from build)Project name (optional)
/resume crashRecover from context blowoutNone needed

Defensive Auto-Save (L0 Defense)

MUSE doesn't wait for context to run out. Every 10 interaction rounds, it silently updates memory/CRASH_CONTEXT.md. If a sudden blowout occurs, at most 10 rounds of progress are lost.

LayerTriggerReliability
L0Every 10 rounds (silent)⭐⭐⭐
L1πŸ”΄ context detection⭐⭐
L2/resume crash scans convo/⭐

Auto-Distill Detection

Every /bye automatically checks memory/ accumulation. Reminds you to /distill when:

  • β‰₯ 7 days of un-distilled logs
  • β‰₯ 5 new log files since last distill
  • β‰₯ 15 total files and never distilled

🧩 Skill System

Loading Behavior

TypeWhen LoadedExamples
Always-onEvery turn automaticallyCLAUDE.md iron rules, Safety
TriggerWhen task matchesgit-commit, systematic-debugging
LifecycleOn specific eventsstrategic-compact (compression), verification (completion)

Tier Classification

TierDescriptionShips with MUSE?Examples
πŸ› CoreRequired for MUSE to functionβœ… Built-incontext-health-check, strategic-compact, verification-before-completion, using-superpowers
πŸ”§ ToolkitGeneral dev tools, recommendedβœ… Includedgit-commit, systematic-debugging, security-review, tdd-workflow, frontend-design, ui-ux-pro-max, +19 more
🎯 DomainUser-created, domain-specific❌ PrivateYour own custom skills

Skill Lifecycle

memory/ lessons repeat β†’ /distill finds pattern β†’ write to MEMORIES.md
β†’ appears β‰₯3 times β†’ upgrade to CLAUDE.md constitution
β†’ methodology is generic enough β†’ create new Skill
β†’ useful across projects β†’ contribute to MUSE Toolkit

πŸ“ Directory Convention

Standard Project Structure

project/
β”œβ”€β”€ CLAUDE.md              # πŸ“œ Constitution
β”œβ”€β”€ README.md              # Public README
β”œβ”€β”€ LICENSE                # License
β”œβ”€β”€ USER.md                # Preferences (private)
β”œβ”€β”€ MEMORIES.md            # Long-term lessons (private)
β”œβ”€β”€ assets/                # 🎨 Project assets (public)
β”‚   β”œβ”€β”€ logo.png           # Project logo
β”‚   β”œβ”€β”€ banner.png         # README/social banner
β”‚   β”œβ”€β”€ screenshots/       # App screenshots
β”‚   β”œβ”€β”€ diagrams/          # Architecture diagrams
β”‚   └── social/            # Social media assets (OG images, previews)
β”œβ”€β”€ .muse/                 # 🎭 Role states (private)
β”‚   β”œβ”€β”€ build.md / qa.md / growth.md / ...
β”œβ”€β”€ memory/                # Short-term memory (private)
β”‚   └── YYYY-MM-DD.md
β”œβ”€β”€ convo/                 # Conversation archives (private)
β”‚   └── YYMMDD/
β”œβ”€β”€ docs/                  # Documentation
β”‚   β”œβ”€β”€ [public docs]      # β†’ git push βœ…
β”‚   └── internal/          # Strategy/fundraising (private)
β”œβ”€β”€ src/ | packages/       # Source code
└── .agent/                # Skills + Workflows (private)

Naming Conventions

CategoryPatternExample
Memory logsYYYY-MM-DD.md2026-03-12.md
ConversationsYYMMDD-NN-desc.md260312-02-muse_setup.md
Crash archives+_CRASH suffix260312-05-debug_CRASH.md
.muse roles[role].md lowercasebuild.md, qa.md

Assets Convention

SubdirectoryPurposeNaming Pattern
assets/ (root)Logo, banner, faviconlogo.png, banner.png, favicon.ico
assets/screenshots/App/feature screenshotsfeature-name.png or YYMMDD-feature.png
assets/diagrams/Architecture, flow chartscomponent-name-diagram.png
assets/social/OG images, social cardsog-default.png, x-card.png

Tip: Keep assets/ in git (public). Large video files (>10MB) should use Git LFS or external hosting.


πŸ”§ Customization

Minimal Setup (Personal Project)

Just 3 things:

  • CLAUDE.md β€” Constitution (required)
  • memory/ β€” Short-term memory (required)
  • MEMORIES.md β€” Long-term memory (recommended)

Standard Setup (Indie Developer)

Add the role system:

  • .muse/build.md β€” Dev state
  • .muse/qa.md β€” Quality verification
  • USER.md β€” Personal preferences

Full Setup (Team / Multi-Project)

Add GM + all roles + sync:

  • .muse/strategy.md β€” Strategy (global, one per workspace)
  • .muse/gm.md β€” Project GM (project-level CEO)
  • .muse/build.md + qa.md + growth.md + ops.md + research.md + fundraise.md
  • /sync workflow β€” Cross-role sync

πŸ”Œ MCP Server (Claude Plugin)

MUSE includes a built-in MCP (Model Context Protocol) server β€” a zero-dependency Bash implementation that lets Claude Code, Cursor, and other tools access your project's role files, memory, and directives through a standard protocol.

Quick Setup

# From your MUSE-enabled project
./scripts/mcp-server.sh --help

Available Tools

ToolDescription
muse_get_statusRead all L0 lines β†’ project overview (~400 tokens)
muse_list_rolesList all role files with summaries
muse_get_roleDeep-read a specific role file
muse_send_directiveSend πŸ“‘ cross-role directive
muse_write_memoryAppend to today's memory log
muse_search_memorySearch across memory files

Configuration

Add to your tool's MCP config (e.g., ~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
    "muse": {
      "command": "/path/to/muse/scripts/mcp-server.sh",
      "args": ["--project-root", "/path/to/your/project"]
    }
  }
}

Requires: jq (brew install jq on macOS, apt install jq on Linux)


🌐 Optional Third-Party MCP Integrations

MUSE links well-vetted third-party MCP servers as optional add-ons. Each runs independently, has its own token / config, and is fully opt-in.

MCPPurposeCostSetup
🎨 LazywebUI design reference search Β· real-app screenshots + semantic descriptions (pricing pages, onboarding, dashboards, etc.)Free (per-user token)/setup-lazyweb β€” 3 steps, ~2 min

How it works: Open the vendor's install page, copy the generated install instructions block (token embedded), paste it to your AI agent (Claude Code / Cursor / Codex / OpenClaw / Windsurf / etc.), and say "install this". The agent picks the right install path for its client. Restart the client to load tools.

Why we link these: design taste calibration is non-trivial without real references. Lazyweb gives MUSE-driven projects access to a curated UI library β€” useful when an agent needs to advise on pricing pages, onboarding flows, dashboard layouts, or compare a mockup to industry patterns.

Want to suggest another MCP for the list? Open a PR Β· we vet for free-tier availability, no-billing safety, and per-user token isolation.


πŸ€” FAQ

Q: Does MUSE require installation? No. MUSE is pure Markdown files. Copy them to your project and you're ready. Zero dependencies.

Q: Which AI tools does it support? Ten tools with native install support: Claude Code, OpenClaw, OpenCode, Cursor, Windsurf, Gemini CLI, Codex CLI, Copilot, Aider, and Antigravity. Run ./scripts/install.sh --tool <name> to install in the correct format for each tool. Additionally, ./scripts/convert-skills.sh --tool <name> exports all 65 skills to any supported format. Import from agency-agents (35K+ ⭐) with --import agency-agents.

Q: How is this different from lossless-claw? lossless-claw is a code plugin (SQLite + DAG + sub-agents) that requires the OpenClaw runtime. MUSE is pure Markdown SOPs, works with any AI tool, zero dependencies. Same principles, different implementation.

Q: What if memory/ files pile up? Archive files older than 30 days to memory/archive/. Use /distill to extract key lessons into MEMORIES.md first, then safely archive the originals.

Q: Is there a visual dashboard? Yes! Two options:

  • Online: Visit muse.mythslabs.ai/dashboard and load your project folder β€” 100% client-side, data stays in your browser.
  • Local: Run ./scripts/dashboard.sh to generate a self-contained HTML dashboard at .muse/dashboard.html.

Q: How do I discover and share skills? Use ./scripts/skill-discovery.sh with commands like recommend "frontend", categories, stats, export <name>, or registry. See CHANGELOG for details.

Q: Is there a VS Code extension? Yes β€” vscode-extension/ provides an activity bar with Roles, Skills, and Memory tree views, plus in-editor dashboard and skill search. Run cd vscode-extension && npm install && npm run compile, then press F5.

πŸ’¬ Follow Us


πŸ™ Credits

  • gstack by Garry Tan β€” Sprint pipeline, builder ethos, and reframing methodology (YC CEO's open-source software factory)
  • LCM Paper by Ehrlich & Blackman β€” Theoretical foundation for lossless context management
  • lossless-claw by Martian Engineering β€” OpenClaw implementation of LCM
  • nah by Manuel Schipper β€” Context-aware permission guard (complements MUSE's Safety Protocol)
  • Greek Mythology β€” Mnemosyne and her nine Muses, eternal symbols of memory and creation

πŸ“œ License

MIT Β© Myths Labs


Built with 🎭 by Myths Labs β€” Solo-developed by JC

MUSE v3.4.0