{"id":"4793fc97-439c-4268-acbc-3912ee6c014c","slug":"muscle","kind":"skill","name":"muscle","summary":"MUSCLE - Self-learning code review that gets smarter with every task","owner":"LivingEthos","repoUrl":"https://github.com/LivingEthos/muscle","license":"MIT","licenseTier":"permissive","trust":"community","stars":1,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-03-31T19:30:01.000Z","addedAt":"2026-10-22T02:37:13.577Z","logoUrl":"https://avatars.githubusercontent.com/u/272620297?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","productivity"],"tags":[],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-23T09:41:15.416Z","sample":false,"url":"https://conduits.dev/tools/muscle","language":"Python","transports":["stdio"],"install":{"pypi":"muscle"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<p align=\"center\">\n  <img src=\"docs/assets/muscle-github-hero.svg\" alt=\"MUSCLE — self-learning code review and dynamic harness for AI coding agents\" width=\"100%\">\n</p>\n\n<h1 align=\"center\">MUSCLE</h1>\n\n<p align=\"center\">\n  <strong>MiniMax Unified Self-Correcting Learning Engine</strong>\n</p>\n\n<p align=\"center\">\n  A self-learning code-review engine and dynamic harness for Claude Code,<br>\n  Codex, and any terminal AI coding workflow.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/LivingEthos/muscle\"><img alt=\"GitHub\" src=\"https://img.shields.io/badge/GitHub-LivingEthos%2Fmuscle-113B2C?logo=github\"></a>\n  <img alt=\"Python\" src=\"https://img.shields.io/badge/Python-3.10%2B-2E6F95?logo=python&logoColor=white\">\n  <img alt=\"License\" src=\"https://img.shields.io/badge/License-MIT-8A6F3D\">\n  <img alt=\"Claude Code\" src=\"https://img.shields.io/badge/Claude%20Code-plugin-1F7A5B\">\n  <img alt=\"Codex\" src=\"https://img.shields.io/badge/Codex-bundle-244C3A\">\n  <img alt=\"Model\" src=\"https://img.shields.io/badge/Model-MiniMax%20M3-244C3A\">\n</p>\n\n---\n\n## TL;DR\n\n> MUSCLE gives your AI coding agent a **second brain for code quality** —\n> one that remembers what matters in *this* project, and a **dynamic harness**\n> that wraps your existing workflow with review hooks, isolated fix worktrees,\n> background investigations, model routing, and verifiable evidence.\n\nIt works with **Claude Code** (as a first-class plugin), **Codex** (via the\nshipped bundle), and from the **terminal** as a standalone CLI.\n\n```bash\n# install, point at MiniMax, run your first self-learning review\ncurl -fsSL https://raw.githubusercontent.com/LivingEthos/muscle/main/install.sh | bash\nexport MINIMAX_API_KEY=\"your-token-plan-key\"\nmuscle init && muscle review --target . --mode review\n```\n\n---\n\n## Why MUSCLE?\n\nMost AI review tools are one-shot: send code, get comments, forget everything.\nMUSCLE treats review as a **learning loop** — and it bolts onto whatever AI\ncoding agent you already use.\n\n| You want… | MUSCLE gives you… |\n|---|---|\n| **Reviews that get smarter over time** | A project-local memory that learns *your* repo's patterns and never leaks across projects. |\n| **Confidence that fixes are real** | Static analysis + semantic review + a verification agent + isolated worktree fixes. |\n| **A safer AI agent loop** | Hooks that run on session start, prompt submit, and stop — keeping the host model's memory aligned with project reality. |\n| **Less wasted host-model spend** | Routing classifier delegates bulk work to the cheaper M3 model. Your premium host model handles planning. |\n| **Auditable evidence** | Every finding, fix, decision, and skill promotion is recorded in a local SQLite DB you can inspect. |\n| **Works without lock-in** | The CLI does everything. Plugins are optional sugar on top. |\n\n---\n\n## How it works\n\nMUSCLE is built around two ideas working together.\n\n### 1. The self-learning loop\n\n```\n        ┌──────────────────────────────────────────────────────┐\n        │  muscle review                                       │\n        │                                                      │\n        │   static analysis  ─►  semantic review (M3)        │\n        │          │                     │                     │\n        │          ▼                     ▼                     │\n        │      findings + suggested fixes + evidence           │\n        │                       │                              │\n        │                       ▼                              │\n        │              learning pipeline                       │\n        │     ┌─────────────────┴────────────────┐             │\n        │     │                                  │             │\n        │     ▼                                  ▼             │\n        │  project_memory.db          host CLAUDE.md /         │\n        │  (rules, decisions,         AGENTS.md (published     │\n        │   patterns, skills,         dynamic + pinned         │\n        │   agents, audit trail)      guidance)                │\n        └──────────────────────────────────────────────────────┘\n                       │\n                       ▼ next review starts already smarter\n```\n\nEvery review feeds **`project_memory.db`** — the single source of truth for\nlearned rules, recurring patterns, fix outcomes, and decision provenance. As\npatterns repeat, MUSCLE promotes them into project-specific **skills** and\n**agents**, and publishes a bounded summary into your root `CLAUDE.md` and\n`AGENTS.md` so the *host* coding agent (Opus 4.8, Codex, etc.) starts every\nnew session aware of the project's hard-won lessons.\n\n### 2. The dynamic harness\n\nMUSCLE doesn't replace your AI coding agent — it wraps one around it.\n\n```\n                    ┌─────────────────────────────────────┐\n       you ────►    │  Claude Code / Codex (host model)   │\n                    └─────────────────────────────────────┘\n                       │            ▲             │\n              hooks    │            │ refreshed   │ delegates\n              fire on  ▼            │ guidance    ▼ bulk work\n                    ┌─────────────────────────────────────┐\n                    │           MUSCLE harness            │\n                    │                                     │\n                    │  • SessionStart / Prompt / Stop     │\n                    │  • Worktree isolation for fixes     │\n                    │  • Shadow background reviews        │\n                    │  • Verification agent               │\n                    │  • Model routing (M3 vs host)     │\n                    │  • Trust-gated output filters       │\n                    │  • Token & cost evidence            │\n                    └─────────────────────────────────────┘\n```\n\nThe harness is **opt-in by command**, **inspectable by default**, and\n**never silently changes** what your host model sees.\n\n---\n\n## Quick start (5 minutes)\n\n### Prerequisites\n\n- macOS or Linux (or any shell with `bash`)\n- Python 3.10+ and `git`\n- A **MiniMax** API key ([api.minimax.io](https://api.minimax.io/) — token plan)\n- *Optional:* [Claude Code](https://claude.ai/code) for the first-class plugin UI\n\n> **Note:** Your Claude/Codex subscription and your MiniMax key are different\n> things. The host agent UI is one tool; MUSCLE uses MiniMax M3 for its own\n> review and learning calls because it's roughly **5–10× cheaper per token**\n> than premium host models.\n\n### 1. Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/LivingEthos/muscle/main/install.sh | bash\n```\n\nThe installer checks Python, uses `uv` when available, clones MUSCLE to\n`~/.muscle/src`, and installs the `muscle` CLI.\n\n### 2. Add your API key\n\n```bash\nexport MINIMAX_API_KEY=\"your-token-plan-api-key\"\n# Optional explicit Anthropic-compatible endpoint override:\n# export ANTHROPIC_BASE_URL=\"https://api.minimax.io/anthropic\"\n# China Anthropic-compatible endpoint:\n# export ANTHROPIC_BASE_URL=\"https://api.minimaxi.com/anthropic\"\n```\n\n`MINIMAX_API_KEY` (or its legacy alias `ANTHROPIC_API_KEY`) authenticates\nMiniMax. By default MUSCLE uses MiniMax's OpenAI-compatible\n`https://api.minimax.io/v1` endpoint; set `ANTHROPIC_BASE_URL` only when you\nneed an explicit Anthropic-compatible endpoint override.\n\n### 3. Initialize your project\n\n```bash\ncd /path/to/your/repo\nmuscle init --non-interactive --related-mode suggest --pack-mode suggest\nmuscle status\nmuscle doctor                 # confirm health\n```\n\nThis creates `.muscle/` with project-local state and writes nothing global.\n\n### 4. Run your first self-learning review\n\n```bash\nmuscle review --target . --mode review                    # full project\nmuscle review --target ./src --mode review --format json  # for CI / scripts\nmuscle review --target ./src --mode review --no-db         # no learning writes\n```\n\nYou'll get severity-ranked findings, optional auto-fix flows, and the first\nentries in your project's learning database.\n\n### 5. Install the Claude Code plugin (optional)\n\nInside Claude Code:\n\n```text\n/plugin marketplace add LivingEthos/muscle\n/plugin install muscle@muscle-marketplace\n```\n\nThen try:\n\n```text\n/muscle:doctor       — verify everything is wired\n/muscle:review       — run a self-learning review\n/muscle:pressure     — adversarial pressure test\n/muscle:rescue       — directed bug investigation\n/muscle:savings      — see what was saved on tokens\n```\n\n---\n\n## Core workflows\n\n### Review code\n\nThe everyday command. Combines local analyzers + M3 semantic review +\nlearning capture.\n\n```bash\nmuscle review --target ./src --mode review                 # report only\nmuscle review --target ./src --mode auto-fix               # apply safe fixes\nmuscle review --target ./src --mode hybrid                 # fix easy, plan hard\nmuscle review --target ./src --mode hybrid --execution worktree  # isolated\nmuscle review --target ./src --mode pressure --intensity intensive\nmuscle review --target ./src --mode review --format json   # machine-readable\nmuscle review --target ./src --format json --output review.json\nmuscle review --target ./src --mode review --no-db         # skip memory/learning writes\nmuscle review --target ./src --shadow                      # background, async\n```\n\n| Mode | What it does |\n|---|---|\n| `review` | Report findings ranked by severity. Default. |\n| `auto-fix` | Apply suggested fixes for low-risk issues. Backups kept. |\n| `plan` | Produce a markdown handoff plan instead of editing files. |\n| `hybrid` | Auto-fix the easy stuff, plan the rest. |\n| `pressure` | Adversarial review focused on failure modes, design risk, edge cases. |\n\n### Quick check (no semantic review)\n\nRun only compiler / linter / test evaluators — fast, deterministic, free.\n\n```bash\nmuscle check --target .\n```\n\nGood for \"is this commit-ready?\" gates and for warming up before a full review.\n\n### Investigate a bug (lifeline / rescue)\n\nWhen you have a confusing failure or \"only fails in CI\" mystery, delegate the\ninvestigation to MUSCLE's rescue agent.\n\n```bash\nmuscle lifeline --target . --prompt \"Find why this test only fails in CI\"\nmuscle lifeline --target ./src --prompt \"Find the regression\" --history\n```\n\n`/muscle:rescue` is the slash-command equivalent and routes through the\n`rescue_agent` subagent shipped in the plugin bundle.\n\n### Generate code iteratively\n\nThe other half of MUSCLE: a generate → evaluate → evolve loop with full\nsession history.\n\n```bash\nmuscle run --task \"Build a small FastAPI service with tests\" \\\n           --language python --output ./out\nmuscle history          # list past sessions\nmuscle resume <id>      # pick up where a paused session left off\nmuscle abort <id>       # stop a running session\n```\n\nEach iteration is recorded under `.muscle/sessions/<session_id>/` —\n`meta.json`, `iterations.jsonl`, `report.json`, and any artifacts.\n\n---\n\n## The dynamic harness\n\nThese are the features that wrap MUSCLE around your existing AI coding loop.\n\n### Hooks — keep the host model aligned\n\nWhen you install the plugin, MUSCLE registers three Claude Code hooks:\n\n| Hook | What it does |\n|---|---|\n| `SessionStart` | Refreshes `.muscle/active-review.md` with latest project state. |\n| `UserPromptSubmit` | Logs the event and updates the active-review snapshot. |\n| `Stop` | Triggers learning capture and any pending consolidation. |\n\nAll three call `muscle _host-hook` and are graceful no-ops on projects that\nhaven't been initialized. The host CLI's memory file (`CLAUDE.md` for Claude\nCode, `AGENTS.md` for Codex / cross-tool) stays in sync with current\nproject-memory state.\n\n### Worktree isolation for fixes\n\n```bash\nmuscle review --target . --mode auto-fix --execution worktree\nmuscle settings review --execution worktree   # make it the default\n```\n\n`worktree` mode runs every fix in an isolated `git worktree`, so a bad fix\ncan't dirty your working tree.\n\n### Shadow (background) reviews\n\nLong reviews can run async without blocking your terminal:\n\n```bash\nmuscle review --target . --mode review --shadow   # queue\nmuscle probe                                       # check status\nmuscle diagnosis                                   # read completed results\n```\n\n### Verification agent\n\nThe plugin ships a verification subagent (`verification_agent.md`) that\nfollows the **apply → validate → record only-if-passing** pattern, so MUSCLE\nnever learns from a fix that didn't actually work.\n\n### Model routing\n\nBefore you spend expensive host-model context on a mechanical task, ask the\nrouter where the work belongs.\n\n```bash\nmuscle route --task \"Add validation tests for the settings parser\" --json\n```\n\nThe classifier returns one of three buckets:\n\n- **mechanical** — M3 can execute directly\n- **reasoning** — M3 with a verification pass\n- **architectural** — keep with the host model (Opus / Codex)\n\n### Reusable context packs\n\nRepeated subtasks reuse distilled scope, with stable IDs based on content.\n\n```bash\nmuscle pack --task \"Review auth for input validation\" --scope src/auth/\nmuscle pack list\nmuscle pack gc --older-than 30d\n```\n\n### Trust-gated output filters\n\nProject-local filters can clean up noisy command output, but they **never run\nsilently**. They require explicit digest-based trust before they affect what\nyou (or your host model) see.\n\n```bash\nmuscle filters verify\nmuscle filters verify --require-all\nmuscle filters trust       # opt in by digest\nmuscle filters untrust\n```\n\n### Token & cost evidence\n\n```bash\nmuscle savings              # human-readable\nmuscle savings --json       # machine-readable\nmuscle cost stats\nmuscle cost delegation-report\n```\n\nTracks token totals by stage, cache impact, prompt and command-output\ncompaction, and per-stage cost — so model spend is never a mystery.\n\n### Discovery (read-only)\n\nFind places MUSCLE *could* have helped without touching memory.\n\n```bash\nmuscle discover\nmuscle discover --since 14\nmuscle discover --json\n```\n\nUseful for spotting repeated failed test/lint loops in imported host sessions.\n\n---\n\n## Self-learning features\n\nThese are the features that make MUSCLE actually get better.\n\n### Project memory (the source of truth)\n\nEvery project gets a local SQLite database at `.muscle/project_memory.db`.\nIt's the **authoritative store** for:\n\n- learned rules and validated lessons\n- review run history and findings\n- fix attempts and outcomes\n- recurring-pattern decisions\n- generated skills and agents\n- transferred-lesson provenance and validation\n- model identity history\n- backups and audit trail\n\nYou can inspect it with any SQLite tool. MUSCLE never reaches into another\nproject's database without an explicit import command.\n\n### Learning pipeline\n\nAfter every `muscle review`, the **`LearningPipeline`** runs:\n\n1. Writes findings and run metadata to the DB.\n2. Scores each finding through the **memory decision engine**.\n3. Promotes high/critical issues into root-CLAUDE.md rules.\n4. Validates and ages existing rules — auto-archives the ones that no longer\n   appear after a clean window.\n5. Detects recurring patterns and generates project-specific **skills**.\n6. Generates specialized **agents** for complex multi-step patterns.\n7. Publishes a final, bounded snapshot to `CLAUDE.md` and `AGENTS.md`.\n\nEach step is recorded with provenance, so you can always answer \"why does\nMUSCLE care about this rule?\".\n\n### Host-doc publishing\n\nMUSCLE publishes structured guidance into the **host model's** memory files —\n`CLAUDE.md` (Claude Code) and `AGENTS.md` (Codex / cross-tool) — inside a\n`MUSCLE_PUBLISHED_START` / `MUSCLE_PUBLISHED_END` marker block.\n\n| Section type | Examples | Behavior |\n|---|---|---|\n| **Pinned** | Methodology, Delegation Protocol, Effort & Tool Guidance | Byte-identical across cycles, exempt from size caps. |\n| **Dynamic** | Critical Rules, Frequent Mistakes, Active Agents, Active Skills, Tooling Notes | Sourced from `project_memory.db`, capped per section, consolidated by M3 when caps are exceeded. |\n\nPre-existing `CLAUDE.md` / `AGENTS.md` content **outside** the markers is\nnever reordered, rewritten, or deleted.\n\n```bash\nmuscle optimize-host-docs            # non-destructive cleanup pass\nmuscle optimize-host-docs --dry-run  # preview only\n```\n\n### Cross-project learning (opt-in only)\n\nMUSCLE can suggest related projects, but **it never auto-imports** their\nlessons.\n\n```bash\nmuscle memory related                       # see suggestions\nmuscle memory related --refresh --prune-stale\nmuscle memory import-project --project /path/to/other/project --mode snapshot\nmuscle memory promotion-candidates          # provisional → validated\nmuscle memory history\n```\n\nImported lessons stay provisional until your current project's reviews\nvalidate them, or you explicitly promote them.\n\n### Model identity & model packs\n\nWhen a provider returns an ambiguous label, you can lock in a canonical\nidentity. Model packs are optional canonical-model overlays — never global\ndefaults.\n\n```bash\nmuscle model status\nmuscle model history\nmuscle model select --canonical-model minimax/m2.7@1\nmuscle model packs install --pack-id minimax-m27-core\n```\n\n### Release gates & benchmarks\n\n```bash\nmuscle long-eval reports\nmuscle long-eval benchmark --suite all --enforce-gates\n```\n\nThe benchmark suite compares review strategies on recall, false-positive\nrate, token cost, and duration — and refuses to promote a candidate that\nregresses any axis without an offsetting gain.\n\n---\n\n## Plugin slash commands\n\nMUSCLE ships **37 slash commands** for Claude Code (and an equivalent Codex\nbundle). Group them by intent:\n\n#### Setup & lifecycle\n\n| Command | Purpose |\n|---|---|\n| `/muscle:setup` | Initialize, enable, disable, or inspect MUSCLE. |\n| `/muscle:status` | Project status + optional active-review refresh. |\n| `/muscle:doctor` | Diagnose plugin lifecycle, manifests, hooks, assets, runtime state. |\n| `/muscle:history` | List past MUSCLE sessions. |\n\n#### Review & validate\n\n| Command | Purpose |\n|---|---|\n| `/muscle:review` | Standard self-learning code review. |\n| `/muscle:check` | Compiler / linter / test only (no semantic review). |\n| `/muscle:pressure` | Adversarial review (`--intensity` from minimal to exhaustive). |\n| `/muscle:rescue` | Focused root-cause investigation through the `rescue_agent`. |\n| `/muscle:lifeline` | Direct CLI entry to a rescue investigation. |\n| `/muscle:foresight` | Explicit offline preflight planning; experimental and opt-in only. |\n\n#### Background & evidence\n\n| Command | Purpose |\n|---|---|\n| `/muscle:probe` | Check background shadow review job status. |\n| `/muscle:diagnosis` | Read completed shadow job results. |\n| `/muscle:result` | Alias for `/muscle:diagnosis`. |\n| `/muscle:cancel` | How to stop foreground / shadow sessions. |\n| `/muscle:savings` | Token, cache, parser, and command-output savings. |\n| `/muscle:discover` | Missed review/check opportunities (read-only). |\n\n#### Routing, packs, filters\n\n| Command | Purpose |\n|---|---|\n| `/muscle:route` | Classify a task: M3, M3 + verification, or host model. |\n| `/muscle:pack` | Build a reusable context pack. |\n| `/muscle:filters` | Verify, trust, or untrust output filters. |\n\n#### Memory & model identity\n\n| Command | Purpose |\n|---|---|\n| `/muscle:memory-related` | Suggest related projects (no auto-import). |\n| `/muscle:memory-import-project` | Import provisional lessons from another project. |\n| `/muscle:memory-history` | Recent lesson usage and validation history. |\n| `/muscle:model-status` | Show resolved canonical model and pack overlays. |\n| `/muscle:model-history` | Model identity history. |\n| `/muscle:model-select` | Set or clear the canonical model manually. |\n| `/muscle:model-pack-install` | Install or update model-pack overlays. |\n| `/muscle:model-pack-submit` | Export and submit a draft pack PR. |\n\n#### Evaluation & maintenance\n\n| Command | Purpose |\n|---|---|\n| `/muscle:long-eval-reports` | List recent benchmark / evaluation reports. |\n| `/muscle:long-eval-benchmark` | Compare strategies, enforce release gates. |\n| `/muscle:optimize-host-docs` | Non-destructive `CLAUDE.md` / `AGENTS.md` cleanup. |\n| `/muscle:kb-stats` | Knowledge-base statistics. |\n| `/muscle:settings-show` | Current MUSCLE configuration. |\n| `/muscle:settings-review` | Switch review execution between local and worktree. |\n| `/muscle:settings-model` | Configure related-project / model-pack policies. |\n| `/muscle:settings-api-key` | Inspect or configure API key source. |\n\n---\n\n## CLI reference\n\nThe CLI is the source of truth — plugin commands are thin wrappers around it.\n\n| Area | Commands |\n|---|---|\n| **Setup & lifecycle** | `init`, `enable`, `disable`, `status`, `settings`, `uninstall`, `doctor` |\n| **Review & validation** | `review`, `check`, `lifeline`, `foresight`, `probe`, `diagnosis` |\n| **Iterative generation** | `run`, `history`, `resume`, `abort` |\n| **Evidence & savings** | `savings`, `discover`, `filters`, `cache`, `cost`, `optimize` |\n| **Memory & learning** | `memory`, `kb`, `improve`, `skills`, `agents`, `notes`, `optimize-host-docs` |\n| **Model & routing** | `model`, `route`, `pack` |\n| **Evaluation & gates** | `long-eval`, `escalation` |\n| **Operations** | `backups`, `audit`, `tui` |\n\nFor full details:\n\n```bash\nmuscle --help\nmuscle <command> --help\n```\n\n### Interactive terminal dashboard\n\n```bash\nmuscle tui\n```\n\nLive views over review history, project memory, fixes, skills, agents,\nsettings, backups, audit activity, optimization data, and notes.\n\n---\n\n## Codex bundle\n\nThe same plugin source ships a Codex manifest and root hook file:\n\n```text\ntools/muscle/plugin/.codex-plugin/plugin.json\ntools/muscle/plugin/hooks.json\n```\n\nThe bundle reuses the same commands, skills, assets, and lifecycle\ndiagnostics as the Claude Code plugin. If your Codex build has a plugin\nvalidator, validate those files directly. If your Codex CLI only exposes\nmarketplace management, treat validation as skipped and use\n`muscle doctor --json` for local manifest, hook, asset, and command-doc\nparity evidence.\n\n---\n\n## What gets stored\n\n### Per-project (`.muscle/` in your repo)\n\n```text\n.muscle/\n├── config.yaml\n├── project_memory.db          ← authoritative learning store\n├── active-review.md           ← refreshed by hooks\n├── CLAUDE.md                  ← internal mirror (not authoritative)\n├── AGENT.md\n├── MEMORY.md\n├── skills/                    ← generated project-specific skills\n├── agents/                    ← generated specialist agents\n├── sessions/                  ← per-run history + artifacts\n├── reports/\n│   └── release_evidence/\n├── knowledge/strategies.db\n└── review_kb/review_kb.db\n```\n\n### Shared (`~/.muscle/`)\n\n```text\n~/.muscle/\n├── system.db                  ← cross-project fingerprints + aliases + packs\n├── model-pack-cache/\n├── cache/cache.db\n└── prompts/\n```\n\nThe root-of-repo `CLAUDE.md` / `AGENTS.md` files are **published**, not\nauthoritative — the DB is the truth.\n\n---\n\n## Safety & privacy\n\nMUSCLE is built to be inspectable, opt-in, and incrementally trusted.\n\n- **API keys** come from environment variables or local settings — never committed.\n- **Project memory** stays in the project unless you import, export, or submit a model pack.\n- **Cross-project lessons and model packs** are overlays, not global defaults.\n- **Discovery is read-only** by default.\n- **Project-local filters** require digest trust before they're used.\n- **Doctor** is observational — it never modifies state unless you pass `--refresh`.\n- **Foresight** is explicit-only and offline; it writes only bounded short-term\n  state when requested and never promotes learned memory.\n- **JSON output** modes avoid human progress text on stdout, so they're safe for piping into automation.\n- **Hooks** never block the host CLI — they fail gracefully if MUSCLE isn't initialized.\n\nRead more:\n\n- [Privacy notes](docs/PRIVACY.md)\n- [Security policy](SECURITY.md)\n- [Terms](docs/TERMS.md)\n\n---\n\n## For developers\n\n### Local plugin development\n\n```bash\ngit clone https://github.com/LivingEthos/muscle.git\ncd muscle\nuv sync --extra dev\nclaude --plugin-dir ./tools/muscle/plugin\n```\n\n### Quality gates\n\nAll of these must pass before merging:\n\n```bash\nuv sync --frozen --extra dev               # reproducible install\nuv run mypy tools/muscle/                  # type check\nuv run ruff check tools/muscle/            # lint\nuv run ruff format --check tools/muscle/   # format\nuv run pytest tests/ -v                    # tests\n```\n\n### Build & inspect a wheel\n\n```bash\nuv build --out-dir /tmp/muscle-dist\npython -m zipfile -l /tmp/muscle-dist/*.whl | rg 'plugin|savings|discover|filters'\n```\n\n### Architecture deep dive\n\nSee [docs/architecture.md](docs/architecture.md) for the runtime map, the two\nprimary loops, the resolver subsystems, the persistence model, and the\nhost-memory contract.\n\n---\n\n## Release evidence\n\nThe current plugin-readiness pass validates:\n\n- Claude plugin manifest and marketplace metadata\n- Codex manifest, root hooks, and shared assets\n- Slash-command-doc parity across the bundle\n- `muscle review --format json` as parseable JSON from the first stdout byte,\n  including `--output` JSON file writes\n- `muscle doctor --json`, `muscle savings --json`, `muscle discover --json`,\n  `muscle foresight --task \"smoke\" --no-write --json`,\n  `muscle filters verify --json`, and `muscle check --format json` as\n  parseable machine JSON\n- Full type, lint, format, package, and test gates\n\nSee the latest [plugin readiness release notes](docs/release-notes-2026-05-01-plugin-readiness.md).\n\n---\n\n## License\n\nMUSCLE is released under the [MIT License](LICENSE).\n"}