MAP Framework installer - Modular Agentic Planner for Claude Code
Project description
MAP Framework
Plan-then-build AI coding for Claude Code & Codex CLI.
/map-plandecomposes your task into small, reviewable subtasks you approve before any code is written;/map-efficientimplements the approved plan, subtask by subtask. The AI still writes the code — you keep the architecture, scope, and review.
The MAP loop
Most AI agents rush straight to code before they understand the task — so you get fast wrong answers and silent rework. MAP inserts a plan you approve first, then implements it in reviewable steps:
idea -> prompt -> code -> hope # without MAP
SPEC -> PLAN -> TEST -> CODE -> REVIEW -> LEARN # with MAP
You drive the whole loop with two core commands plus three gates:
/map-plan "add rate limiting to the public API" # 1. PLAN — decompose the task; you approve before any code
/map-efficient # 2. BUILD — implement the approved plan, subtask by subtask
/map-check # 3. CHECK — quality gates against the plan
/map-review # 4. REVIEW — semantic review vs spec, tests, and diff
/map-learn # 5. LEARN — save the gotchas for next session
- Start with
/map-planfor anything non-trivial — it clarifies behavior and splits the work into contract-sized subtasks. - Already scoped? Go straight to
/map-efficient. - Tiny edit?
/map-planoff-ramps you to a direct edit or/map-fastinstead of forcing full planning.
Codex CLI users invoke the same skills with
$:$map-plan,$map-efficient,$map-check. See the Usage Guide.
Quick Start
1. Install
uv tool install mapify-cli
# or with pip
pip install mapify-cli
2. Initialize your project
Claude Code is the default provider:
cd your-project
mapify init
claude
Codex CLI is also supported:
cd your-project
mapify init . --provider codex
codex
Then enable the Codex hook manually: run /hooks, select PreToolUse, press t to toggle it on, then press Esc. If your Codex version does not support the hooks feature key yet, start it with codex --enable codex_hooks or upgrade Codex first (upgrading is recommended).
3. Run the loop
/map-plan define the behavior and split the task
/map-efficient implement the approved plan
/map-check
/map-review
/map-learn
That's the whole golden path. Everything below explains why it works and when to reach for it.
Why MAP Exists
Ad-hoc prompting feels fast on simple tasks. On complex systems it creates a different problem: code appears quickly, but the engineering process disappears.
Common failure modes:
- AI silently makes architecture decisions you did not approve.
- One prompt produces a large diff that is hard to review.
- Tests are written around the generated implementation, including its mistakes.
- The output compiles, but you cannot explain why the design is correct.
- The next session forgets the gotchas you already paid to discover.
MAP moves engineering judgment earlier: write down the behavior, split the work into small contracts, verify each stage, review against the spec, and save lessons for the next run.
When To Use MAP
| Good fits | Poor fits |
|---|---|
| Complex backend features | Typos and tiny edits |
| Kubernetes controllers and operators | Small one-off scripts |
| Internal platform tooling | Product ideas where the desired behavior is still unknown |
| API, CRD, or domain-model changes with invariants | Broad rewrites without clear boundaries |
| Refactoring with a meaningful test harness | Tasks cheaper to do directly than to plan |
What Success Looks Like
After a good first workflow, you should see:
- a written plan or spec before implementation starts;
- small implementation contracts instead of one giant AI diff;
- verification and review artifacts under
.map/<branch>/; - review comments focused on correctness and semantics, not formatting noise;
/map-learnpreserving project rules, gotchas, and handoffs for future sessions.
MAP review is useful, but it is not a replacement for engineering judgment. Serious changes still need human review. The goal is to make that review smaller, earlier, and better grounded.
Case Study: 90 days → 7 days
The DevOpsConf 2026 case study applies this process to a production Kubernetes Project Operator, not a toy CRUD app:
- human estimate: 90 days;
- MAP-style delivery: 7 days;
- workflow:
SPEC -> PLAN -> TEST -> CODE -> REVIEW -> LEARN; - small reviewable PRs instead of one giant generated diff;
- tests before implementation for critical pieces;
- semantic bugs caught in review before merge.
Core Commands
| Command | Use For |
|---|---|
/map-plan |
Start here for non-trivial work; clarify behavior and decompose tasks |
/map-efficient |
Implement an approved plan or already-scoped task |
/map-fast |
Small, low-risk changes where full planning would be overhead |
/map-check |
Quality gates, verification, and artifact checks |
/map-review |
Pre-commit semantic review against the plan, tests, and diff |
/map-learn |
Capture project memory and reusable lessons |
/map-debug |
Bug fixes and debugging |
/map-task |
Execute a single subtask from an existing plan |
/map-tdd |
Test-first implementation workflow |
/map-release |
Package release workflow |
/map-resume |
Resume interrupted workflows |
Canonical MAP flows:
- Standard:
/map-plan->/map-efficient->/map-check->/map-review->/map-learn - Full TDD:
/map-plan->/map-tdd->/map-check->/map-review->/map-learn - Targeted subtask TDD:
/map-plan->/map-tdd ST-001->/map-task ST-001-> ... ->/map-check->/map-review->/map-learn
These flows maintain branch-scoped artifacts under .map/<branch>/ — blueprint.json (subtask size/concern contracts), code-review-001.md, verification-summary.md, pr-draft.md, run dossiers, and more — so research, review lineage, and verification survive context resets.
Why Engineers Stick With It
- Daily-driver speed — optimized for repeated use, not occasional demo workflows. Structured enough to prevent chaos, lightweight enough to keep token and time cost under control.
- Reviewable diffs —
/map-planand/map-efficientrequire per-subtask size, concern, and constraint metadata, then validateblueprint.jsonbefore implementation, so oversized or mixed-concern plans fail early instead of surprising reviewers later. - Gates that check the plan, not vibes —
/map-checkand/map-reviewvalidate against the spec, tests, and diff instead of asking whether code "looks fine". - Clean-room review —
/map-reviewauto-bundles spec, plan, tests, verification, and coverage evidence into a single durable input (.map/<branch>/review-bundle.json);--detachedopens a read-only worktree for inspection without touching your branch. Withminimalityenabled, review also runs an advisory what-to-delete lens for over-engineering cuts. - Project memory —
/map-learnturns hard-won fixes and gotchas into reusable context, so the next session doesn't relearn them.
More under the hood (calibrated effort, mutation boundaries, token budgets, retry quarantine, run-health diagnostics, skill IR audit)
- Calibrated workflow effort — each shipped slash skill declares a
thinking_policyandparallel_tool_policy, so lightweight commands stay direct while planning, review, and release workflows reserve deeper reasoning and parallel fan-out for the stages that benefit. Non-release prompts use targeted guardrails instead of blanket all-caps prohibition blocks, reducing over-triggered agents and tool calls while keeping true hard stops explicit. - Mutation boundary constraints — write-capable Claude and Codex surfaces tell agents not to edit unrelated files, add or upgrade dependencies, or refactor neighboring code unless the current subtask requires it. Broader scope is reported as a blocker or tradeoff instead of silently expanding the diff.
- Context-first prompt envelopes — high-context
/map-plan,/map-efficient,/map-debug, and/map-reviewprompts wrap branch artifacts in XML-style<documents>, then state the<task>and<expected_output>, so specs, diffs, logs, and schemas stay separated for the model. - Contract-sized subtasks — blueprints require
expected_diff_size,concern_type,one_logical_step,hard_constraints,soft_constraints, andcoverage_map. Hard constraints must be owned incoverage_mapand cited in the owning subtask; soft constraints can be traded off only with explicittradeoff_rationale. - Token budget report — Actor and review prompt builders append active-path budget decisions to
.map/<branch>/token_budget.json(before/after estimated tokens, clipped sections, source artifacts). The operator breadcrumb for diagnosing missing context. - Clean retry quarantine — after repeated Monitor rejection, write-capable workflows switch the next attempt into clean-retry mode using
.map/<branch>/retry_quarantine.json(constraints, required evidence, do-not-repeat feedback) instead of raw failed-session context. - Run health report — workflows write
.map/<branch>/run_health_report.jsonduring closeout: terminal status, step progress, retry counters, artifact presence, hook-injection status. CI can fail inconsistent closeouts withpython3 .map/scripts/map_step_runner.py validate_run_health_report. - Compact recovery surface —
/map-resumekeeps the active recovery flow short and moves low-frequency notes toresume-reference.md, so recovery after/clearor context exhaustion gives the next checkpoint action without loading the whole appendix. - Skill IR audit — release checks lower shipped Claude and Codex
SKILL.mdfiles into a typedSkillIR, verify content hashes, catch unsupported frontmatter, reject missing supporting-file links, and block injection-like instructions beforemapify initcopies surfaces into user repos.
How It Works
MAP orchestrates specialized roles through slash commands and skills:
TaskDecomposer -> breaks goals into subtasks
Actor -> implements scoped tasks
Monitor -> validates quality and blocks invalid output
Predictor -> analyzes impact for risky changes
Learner -> captures reusable project memory
For Claude Code, MAP slash surfaces live in .claude/skills/map-*/SKILL.md files created by mapify init. For Codex CLI, mapify init . --provider codex creates .agents/skills/, .codex/agents/, .codex/config.toml, hooks, and shared .map/scripts/.
MAP is inspired by the MAP cognitive architecture (Nature Communications, 2025), which reported a 74% improvement on planning tasks. The CLI turns that idea into a practical software-development workflow.
Options
Minimality doctrine, context-compression policy, Stack Overflow for Agents (SOFA), and other init flags
Minimality doctrine (controls how strongly MAP pushes Actor/Monitor/Evaluator toward the smallest sufficient safe change):
# .map/config.yaml
minimality: lite # new installs default to lite; existing repos without the key stay off
Allowed values: off, lite, full, ultra. Phase 1 ships conservative lite defaults: Actor prefers the fewest moving parts, Monitor blocks scope drift only when it affects required behavior, and Evaluator scores simplicity without letting it hide missing required work. /map-review also adds an advisory what-to-delete lens when minimality is not off; its net: -N estimate is informational, not a gate.
Context-compression policy (controls the /compact nudge; default never — opt-in):
mapify init . --compression never # default — no nudge
mapify init . --compression auto # nudge at threshold
mapify init . --compression aggressive # nudge at 0.4 x threshold
mapify init . --compression-threshold 250000 # Opus 1M / 50+ subtask plans
Actor and reviewer prompts always carry the full bundled context — context-block truncation was removed. If the conversation grows beyond your model's window, opt into /compact via --compression auto or trigger it manually. See docs/USAGE.md#context-budget-policy.
Stack Overflow for Agents (SOFA) read-only prior-art search — off by default, no network or credentials unless you enable it:
mapify init . --sofa # opt-in: enable the map-so-search skill
This writes sofa.enabled: true to .map/config.yaml and adds .sofa/ to your .gitignore. Without the flag, no SOFA code path runs. See the SOFA usage guide.
Documentation
| Guide | Description |
|---|---|
| Installation | All install methods, PATH setup, troubleshooting |
| Usage Guide | Workflows, examples, cost optimization, playbook |
| Architecture | Agents, MCP integration, customization |
| Platform Spec | Platform refactor roadmap, codebase analysis |
Trouble?
- Command not found -> Run
mapify initin your project first. - Agent errors -> Check
.claude/agents/has all shipped agent.mdfiles, or runmapify doctor. - Poor output on a complex task -> Start with
/map-planand feed/map-efficientthe approved plan instead of asking it to infer the architecture. - More help ->
Contributing
Improvements welcome: prompts for specific languages, new agents, provider integrations, and CI/CD workflow support.
License
MIT
Start with /map-plan. Keep the model inside your engineering process, not the other way around.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mapify_cli-3.15.1.tar.gz.
File metadata
- Download URL: mapify_cli-3.15.1.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42181d2efb01f272c5cff46e78ec162ccbe5ad711ab0467358c7d94eafedd65d
|
|
| MD5 |
55d0450dde6efbad0c9d7a8eaf6bec44
|
|
| BLAKE2b-256 |
1ccd597305a95e9d580fc66b0c74e87d3fa7377ea048ca68a554c10b9bfcbf9a
|
Provenance
The following attestation bundles were made for mapify_cli-3.15.1.tar.gz:
Publisher:
release.yml on azalio/map-framework
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mapify_cli-3.15.1.tar.gz -
Subject digest:
42181d2efb01f272c5cff46e78ec162ccbe5ad711ab0467358c7d94eafedd65d - Sigstore transparency entry: 1824999983
- Sigstore integration time:
-
Permalink:
azalio/map-framework@6c8a5de6c2963819c53386e00e65fe4d7fa40eb4 -
Branch / Tag:
refs/tags/v3.15.1 - Owner: https://github.com/azalio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6c8a5de6c2963819c53386e00e65fe4d7fa40eb4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mapify_cli-3.15.1-py3-none-any.whl.
File metadata
- Download URL: mapify_cli-3.15.1-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd0c818c62ec8a1ccc9a70a9dbb1abbd4e8ba3b47d4ee147058257dc4fb48c0a
|
|
| MD5 |
ca9058088947c5226ae19793c3e8cdd3
|
|
| BLAKE2b-256 |
22d2f7ef1dd724fb5eccd2b5ddc477e650b38c94ab8d73fe66367994cd452f88
|
Provenance
The following attestation bundles were made for mapify_cli-3.15.1-py3-none-any.whl:
Publisher:
release.yml on azalio/map-framework
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mapify_cli-3.15.1-py3-none-any.whl -
Subject digest:
dd0c818c62ec8a1ccc9a70a9dbb1abbd4e8ba3b47d4ee147058257dc4fb48c0a - Sigstore transparency entry: 1825000006
- Sigstore integration time:
-
Permalink:
azalio/map-framework@6c8a5de6c2963819c53386e00e65fe4d7fa40eb4 -
Branch / Tag:
refs/tags/v3.15.1 - Owner: https://github.com/azalio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6c8a5de6c2963819c53386e00e65fe4d7fa40eb4 -
Trigger Event:
push
-
Statement type: