JSPM

  • Created
  • Published
  • Downloads 140
  • Score
    100M100P100Q108446F
  • License MIT

A meta-prompting, context engineering and spec-driven development system for Claude Code by MayStudios.

Package Exports

  • maxsimcli
  • maxsimcli/dist/cli.cjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (maxsimcli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MAXSIM

Meta-prompting and project orchestration system for Claude Code.

npm version npm downloads GitHub stars License

Website Docs


The Problem

You start a Claude Code session. The first 20 minutes go well. Then it forgets your architecture decisions, repeats the same mistakes, and output quality drops. You open a fresh session and lose all context.

That is context rot. It gets worse the bigger your project grows.

What MAXSIM Does

MAXSIM breaks your work into phases, plans each one separately, and runs every task in a fresh agent with only the context it needs. Your decisions, requirements, and project state live in a .planning/ directory. Agents read from it and write back to it. Nothing gets lost between sessions.

It does not call any LLM API directly. MAXSIM orchestrates Claude Code agents through markdown prompts and workflow files. No API keys, no extra costs beyond your existing Claude Code usage. v6 is Claude Code only.

You install it with one command. It lands in your project's .claude/ directory and shows up as slash commands in Claude Code.

npx maxsimcli@latest

Quick Start

npx maxsimcli@latest

Then inside Claude Code:

/maxsim:init        # Set up the planning structure
/maxsim:plan 1      # Plan phase 1
/maxsim:execute 1   # Run phase 1

That is the core loop. Init, plan, execute, verify. Each phase is isolated, each task gets a fresh agent, every change gets an atomic commit.


What You Get

MAXSIM ships 9 slash commands, 4 agents, 14 skills, and 20 workflows. Here is what that means in practice.

Spec-driven development. All work flows through structured markdown files in .planning/. PROJECT.md, ROADMAP.md, STATE.md, REQUIREMENTS.md. The spec is the single source of truth. Agents read from it and update it as they work.

4 generic agents with clear roles. Executor builds things. Planner creates plans. Researcher investigates the codebase. Verifier checks the results. Each one does one job.

3 model profiles. Pick quality, balanced, or budget to control which Claude model tier each agent uses. You can override individual agents too.

GitHub Issues as the source of truth. Phases become tracking issues. Plans become sub-issues. A 4-column project board (To Do, In Progress, In Review, Done) tracks execution progress.

Parallel execution with git worktrees. Independent plans run concurrently in separate worktrees. MAXSIM groups them into dependency-ordered waves and runs each wave in parallel.

Review gates you can toggle. Three gates (spec review, code review, simplify review) can be turned on or off. Each supports a retry limit before it escalates.

Drift detection. MAXSIM compares your codebase against the spec and flags divergence before it snowballs.


Installation

You need Node.js 22+ and Claude Code. Git is required for parallel execution. GitHub CLI (gh) is optional, only needed for the Issues integration.

npx maxsimcli@latest

Run this from your project root. Everything goes into .claude/.

CLI Flags

Flag Alias What it does
--uninstall Remove all MAXSIM files from .claude/
--quiet -q Suppress output
--help -h Show usage
--version -v Print version

What Lands in Your Project

The installer copies these files into .claude/:

  • 9 slash commands (/maxsim:init, /maxsim:plan, etc.)
  • 4 agent definitions (executor, planner, researcher, verifier)
  • 14 skills (TDD, debugging, code review, and more)
  • 20 workflow files
  • 15 reference documents, 2 rules files
  • 6 hooks (statusline, update checker, sounds, capture-learnings)
  • 1 tool binary (maxsim-tools.cjs)
  • CLAUDE.md in your project root

Directory Layout

.claude/
├── commands/maxsim/          # 9 slash commands
├── maxsim/
│   ├── bin/maxsim-tools.cjs  # Tool binary
│   ├── workflows/            # 20 workflows
│   ├── templates/            # Planning document templates
│   ├── references/           # 15 reference docs
│   └── hooks/                # 6 hook scripts (.cjs)
├── agents/                   # 4 agents
├── skills/                   # 14 skill directories
├── rules/                    # 2 rules files
├── settings.json
└── CLAUDE.md                 # Generated project context

Upgrading

Run npx maxsimcli@latest again. The installer overwrites MAXSIM-managed files. Custom skills you have added to .claude/skills/ and your own agents are not touched.

Uninstall

npx maxsimcli --uninstall

Removes MAXSIM files from .claude/. Your own skills, agents, and Claude Code config stay untouched.


Commands

Command What it does
/maxsim:init Initialize MaxsimCLI in current project with GitHub integration
/maxsim:plan <phase> Plan a specific phase with discussion, research, and task breakdown
/maxsim:execute <phase> Execute all plans in a phase with parallel agents and auto-verification
/maxsim:go Auto-detect project state and execute the right action
/maxsim:quick <description> Quick task — create a GitHub Issue and execute in simplified flow
/maxsim:progress Show project status from GitHub Project Board with next-action recommendation
/maxsim:debug Systematic debugging with reproduce-hypothesize-isolate-verify-fix cycle
/maxsim:settings View and modify MaxsimCLI configuration
/maxsim:help Show available MaxsimCLI commands and usage

Core Workflow

MAXSIM organizes development into phases. Each phase moves through five stages.

1. Initialize (/maxsim:init)

Run once per project. Creates the .planning/ directory with PROJECT.md, ROADMAP.md, STATE.md, REQUIREMENTS.md, and config files. Optionally connects GitHub Issues and a Project Board for tracking.

2. Plan (/maxsim:plan <phase>)

Three steps happen in sequence. A researcher agent inspects the codebase. You discuss scope and acceptance criteria. A planner agent writes structured plan files into .planning/phases/<phase>/.

3. Execute (/maxsim:execute <phase>)

An executor agent picks up each plan, makes the code changes, commits atomically, and runs verification before moving on. Independent plans can run in parallel across multiple agents.

4. Verify

A verifier agent checks that every plan has a summary, expected artifacts exist, requirements have evidence, and the project passes health checks. Gaps get surfaced before the phase closes.

5. Complete

The phase is marked done and progress updates. The next phase becomes active.

Want to plan and execute in one go? Use /maxsim:go <phase>. Got a quick fix that does not fit a phase? Use /maxsim:quick <description>.

Phase Lifecycle

empty → discussed → researched → planned → partial → complete
State Meaning
empty Phase directory exists, no work started
discussed Requirements gathered
researched Codebase research done
planned Plan files written
partial Execution started but not finished
complete All plans executed and verified

Phase numbers are flexible. Integer (01, 02), letter suffixes for parallel tracks (02A, 02B), and decimal inserts (02.1) all work.


Agents

4 agents, each with one job:

Agent Role What it does
Executor Builds things Reads plans, makes code changes, commits atomically, handles deviations
Planner Creates plans Turns research into structured PLAN.md files with tasks, waves, and dependencies
Researcher Investigates Explores the codebase, gathers technical context, can use Brave Search
Verifier Checks results Validates plan structure, artifacts, requirement evidence, commit integrity

Each agent is a markdown file at .claude/agents/{name}.md with YAML frontmatter for tools, model tier, and preloaded skills.

Model Profiles

Set model_profile in .planning/config.json to control which Claude model each agent uses:

Agent Type quality balanced (default) budget
planner opus opus sonnet
executor opus sonnet sonnet
researcher opus sonnet haiku
verifier sonnet sonnet haiku

opus maps to inherit, meaning it uses your Claude Code session model. sonnet and haiku are passed directly to subagent invocations.

Per-Agent Overrides

Override individual agents regardless of profile:

{
  "model_profile": "balanced",
  "model_overrides": {
    "executor": "opus",
    "researcher": "haiku"
  }
}

GitHub Integration

MAXSIM tracks phase and plan progress through GitHub Issues. Your .planning/ files hold project-level documents (roadmap, state, config). Execution progress lives in GitHub. GitHub CLI (gh) and a GitHub-hosted repository are required for this feature.

Setup

Configured during /maxsim:init:

  1. Creates a "MAXSIM Task Board" project with 4 columns (To Do, In Progress, In Review, Done)
  2. Creates labels: phase (purple), task (blue), blocker (red)
  3. Optionally creates a GitHub Milestone

How It Works

Each phase gets a tracking issue. Each plan becomes a sub-issue linked to its phase. Plan content goes into structured comments. Completion data (commit SHA, files changed) gets posted to task issues. Progress is computed from open vs closed sub-issue counts.

A local cache file maps phase numbers to GitHub issue numbers and is rebuilt from GitHub when needed.

Tool Commands

Subcommand What it does
github setup Create board, labels, milestone
github create-phase Create a phase tracking issue
github create-task / batch-create-tasks Create task sub-issues
github move-issue Move issue between board columns
github status Show progress and board overview
github sync-check Verify local cache matches GitHub
github all-progress Show progress for all phases

Configuration

Project config lives in .planning/config.json, created during /maxsim:init.

Full Reference

Setting Type Default What it does
execution.modelProfile 'quality' | 'balanced' | 'budget' 'balanced' Model tier for all agents
model_overrides Record<AgentType, ModelTier> Per-agent model overrides
execution.parallelism.maxAgentsPerWave number 3 Cap on concurrent agents per wave
execution.parallelism.maxRetries number 3 Max retries per failed plan
execution.parallelism.competitionStrategy 'none' | 'quick' | 'standard' | 'deep' 'standard' Parallel competition strategy
execution.verification.strictMode boolean true Enforce all verification gates
execution.verification.requireCodeReview boolean true Code review gate
execution.verification.autoResolveConflicts boolean true Auto-resolve merge conflicts
worktrees.basePath string '.maxsim-worktrees/' Worktree base directory
worktrees.autoCleanup boolean true Remove worktrees after completion
worktrees.branchPrefix string 'maxsim/' Branch prefix for worktree branches
automation.autoCommitOnSuccess boolean true Auto-commit .planning/ changes
automation.conventionalCommits boolean true Enforce conventional commit format
planning.commit_docs boolean true Commit planning artifacts to git
planning.search_gitignored boolean false Include gitignored files in searches
git.branching_strategy 'none' | 'phase' | 'milestone' 'none' Git branching strategy
git.phase_branch_template string 'maxsim/phase-{phase}-{slug}' Branch name template for phases
git.milestone_branch_template string 'maxsim/{milestone}-{slug}' Branch name template for milestones
workflow.research boolean true Run research before planning
workflow.plan_checker boolean true Run plan checker agent
workflow.verifier boolean true Run verifier after execution

Config Example

{
  "execution": {
    "modelProfile": "balanced",
    "parallelism": {
      "maxAgentsPerWave": 3,
      "maxRetries": 3,
      "competitionStrategy": "standard"
    },
    "verification": {
      "strictMode": true,
      "requireCodeReview": true,
      "autoResolveConflicts": true
    }
  },
  "worktrees": {
    "basePath": ".maxsim-worktrees/",
    "autoCleanup": true,
    "branchPrefix": "maxsim/"
  },
  "automation": {
    "autoCommitOnSuccess": true,
    "conventionalCommits": true
  }
}

User-Level Defaults

Put global defaults in ~/.maxsim/defaults.json. These merge with hardcoded defaults when a new .planning/config.json gets created. They do not override existing project configs.

Environment Variables

Variable Purpose
BRAVE_API_KEY Brave Search API key (or put it in ~/.maxsim/brave_api_key)
MAXSIM_DEBUG Verbose debug logging to stderr
MAXSIM_SOUND=0 Turn off notification sounds
CI=true Suppress sounds in CI
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 Enable Agent Teams for parallel execution

Skills

Skills are reusable prompt modules that agents load on demand. Each skill is a SKILL.md file with YAML frontmatter and a markdown body.

Built-in Skills (14)

Skill Category What it does
tdd Task Test-driven development, Red-Green-Refactor cycle with atomic commits
systematic-debugging Methodology Root-cause analysis: reproduce, hypothesize, isolate, verify, fix
verification Methodology Evidence-based verification with quality gates and anti-rationalization enforcement
maxsim-simplify Task Reviews changed code for reuse opportunities and unnecessary complexity
code-review Task Checks security, interfaces, error handling, test coverage
project-memory Task GitHub-native persistence for learnings, decisions, and patterns
using-maxsim Task Routes work through MaxsimCLI commands based on project state
brainstorming Task Explores multiple approaches with structured comparison before committing
roadmap-writing Task Creates phased roadmaps with dependency graphs and GitHub Milestone structure
maxsim-batch Task Decomposes tasks for parallel worktree execution
commit-conventions Convention Conventional commit format and version trigger rules
github-operations Reference Unified GitHub interaction: artifacts, comments, CLI, issue lifecycle
handoff-contract Protocol Agent-to-agent handoff protocol
research Methodology Systematic investigation using parallel agents and source hierarchy

Skill Types

Protocol skills load automatically (handoff-contract). Methodology skills guide how agents think. Task skills are user-invocable workflows like TDD or code review. Reference skills provide static information.

Managing Skills

Built-in skills update when you upgrade MAXSIM. Custom skills you place in .claude/skills/ are preserved.


Parallel Execution

MAXSIM can run multiple plans at the same time using git worktrees. Each plan gets its own isolated working directory.

Plans within a phase are grouped into waves. Wave 1 runs first, wave 2 starts after wave 1 finishes. Plans in the same wave run in parallel if they do not touch the same files.

Each parallel plan gets a worktree at .maxsim-worktrees/{planId}/ on its own branch. Worktrees are cleaned up automatically after completion.

When It Activates

Parallel execution kicks in when a wave has at least parallelization.min_plans_for_parallel plans (default 2). execution.parallelism.maxAgentsPerWave caps concurrent agents per wave (default 3). CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set automatically in settings.json during installation.

Before running in parallel, MAXSIM checks that plans do not modify the same files. If there is a conflict, it falls back to sequential mode.


Hooks

MAXSIM installs 6 Claude Code hooks:

Hook Event What it does
maxsim-statusline statusLine Shows model tier, phase number, board column, and milestone progress
maxsim-check-update SessionStart Checks npm for new MAXSIM versions in the background
maxsim-notification-sound Notification Plays a sound when Claude asks you a question
maxsim-stop-sound Stop Plays a sound when Claude finishes
maxsim-capture-learnings Stop Appends a dated learning entry to .claude/agent-memory/ from the last 5 commits
maxsim-sync-reminder PostToolUse No-op stub, kept for structural reasons

Statusline

[update] model | P{N} {BoardColumn} | milestone: pct% | dirname

Sounds are suppressed when MAXSIM_SOUND=0, CI=true, or SSH_CONNECTION is set. On Windows sounds play as .wav via PowerShell, on macOS as .aiff via afplay, on Linux it falls back to a terminal bell.


Architecture

Monorepo

npm workspaces monorepo with two packages:

maxsim/
├── packages/
│   ├── cli/          # maxsimcli, the published npm package
│   └── website/      # maxsimcli.dev, project website (private)
├── templates/        # Markdown assets copied into dist during build
└── package.json      # Workspace root

Only packages/cli gets published to npm as maxsimcli.

Build

npm run build        # tsdown (CJS) then copy-assets into dist/
npm test             # Vitest unit tests
npm run e2e          # Vitest e2e tests
npm run lint         # Biome

tsdown compiles TypeScript to CJS. copy-assets bundles templates, workflows, agents, skills, hooks, and references into dist/assets/. semantic-release handles versioning and npm publish on push to main.

Contributing

Conventional commits. See CONTRIBUTING.md.

  • fix: triggers a patch release
  • feat: triggers a minor release
  • feat!: or BREAKING CHANGE: triggers a major release

License

MIT