Skip to main content

MAP Framework installer - Modular Agentic Planner for Claude Code

Project description

MAP Framework

PyPI version Python 3.11+

A structured AI development workflow for engineers who need control, not just generated code.

MAP turns Claude Code and Codex CLI from ad-hoc coding assistants into a repeatable engineering loop with explicit artifacts, review points, and project memory.

Without MAP:

idea -> prompt -> code -> hope

With MAP:

SPEC -> PLAN -> TEST -> CODE -> REVIEW -> LEARN

AI already writes code quickly. MAP helps you keep the architecture, scope, tests, and review process under control while it does.

Why MAP Exists

Ad-hoc prompting feels fast on simple tasks. On complex systems, it often 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 is a lightweight workflow for moving 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

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, either start it with codex --enable codex_hooks or upgrade Codex first. Upgrading is recommended.

Pick a context-compression policy if you want non-default behaviour (auto is the default; see docs/USAGE.md#context-budget-policy):

mapify init . --compression never                 # quality > cost
mapify init . --compression aggressive            # cost > quality
mapify init . --compression-threshold 250000      # Opus 1M project

3. Use the golden path for serious work

When a task has unclear behavior, multiple files, or real review risk, run the full loop:

/map-plan define the behavior and split the task
/map-efficient implement the approved plan
/map-check
/map-review
/map-learn

Direct /map-efficient is for already-scoped tasks. If you are unsure, start with /map-plan.

Codex users should invoke MAP skills with $: type $map-plan, $map-fast, or $map-check instead of /map-plan, /map-fast, or /map-check. See the Usage Guide for provider details.

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-learn preserving 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.

Why Engineers Stick With It

  • Daily-driver speed - optimized for repeated use, not occasional demo workflows.
  • Low overhead - structured enough to prevent chaos, lightweight enough to keep token and time cost under control.
  • Calibrated workflow effort - each shipped slash skill declares a thinking_policy and parallel_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 from it. 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.
  • Reviewable diffs - planning and task contracts keep changes small enough to inspect.
  • Contract-sized subtasks - /map-plan and /map-efficient require per-subtask expected_diff_size, concern_type, one_logical_step, hard_constraints, soft_constraints, and coverage_map metadata, then validate blueprint.json before implementation so oversized, mixed-concern, untraceable, or hard-constraint-dropping plans fail early instead of surprising reviewers later. Soft constraints can be consciously traded off only with explicit rationale.
  • Useful quality gates - /map-check and /map-review validate against the plan instead of just asking whether code "looks fine".
  • Review bundle - /map-review auto-generates .map/<branch>/review-bundle.json and .map/<branch>/review-bundle.md before launching reviewer agents, bundling spec, plan, tests, verification, latest code review, coverage_map acceptance-tag evidence, and prior-stage consumption status into a single durable input contract. Reviewers read the bundle first; raw diff is secondary. Use /map-review --detached to open an isolated read-only git worktree at .map/<branch>/detached-review/ for clean-room inspection without touching the source branch. Bundle generation records the review stage in .map/<branch>/artifact_manifest.json; python3 .map/scripts/map_step_runner.py validate_prior_stage_consumption review can fail missing spec/blueprint/test/diff inputs before review. Section-order flags reduce anchoring bias: --reverse-sections (invert order), --shuffle-sections [--seed N] (seeded random order), --compare-orderings (run default + reverse, aggregate via strict-wins, surface drift).
  • Run health report - /map-efficient, /map-debug, /map-check, and /map-review write .map/<branch>/run_health_report.json during closeout via .map/scripts/map_step_runner.py write_run_health_report. The report is a machine-readable snapshot of terminal status, step progress, retry counters, artifact presence, and latest hook-injection status, including explicit skipped reasons for malformed hook input or insignificant Bash commands when branch state can be safely updated. CI or operators can fail inconsistent closeouts with python3 .map/scripts/map_step_runner.py validate_run_health_report.
  • Project memory - /map-learn turns hard-won fixes and gotchas into reusable context for the next session.

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

Detailed usage and options ->

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

/map-plan records a workflow-fit decision first, so trivial work can exit early with a direct edit or /map-fast recommendation instead of forcing full MAP planning.

These workflows maintain branch-scoped artifacts like blueprint.json with subtask size/concern contracts, code-review-001.md, qa-001.md, verification-summary.md with acceptance coverage and prior-stage consumption, pr-draft.md, artifact_manifest.json, run_health_report.json diagnostics, and run dossiers under .map/<branch>/. Targeted TDD flows also persist test_contract_ST-00N.md and test_handoff_ST-00N.json so /map-task can resume implementation from a clean red-phase handoff.

LEARN is the memory step of the MAP cycle. After implementation, checks, or review, MAP writes a learning handoff under .map/<branch>/ so /map-learn can run later without reconstructing context. Pass /map-learn [workflow-summary] when you want to provide an explicit summary.

Case Study

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.

DevOpsConf 2026 case study ->

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. The .claude/commands/ directory is reserved for user-custom commands and a README that points back to the skill-backed MAP surfaces. The shipped skill catalog classifies skills with skillClass: MAP slash workflows are task skills, while map-state is a hybrid skill because it combines planning guidance with hooks/scripts that manage .map/<branch>/ focus artifacts.

For Codex CLI, mapify init . --provider codex creates .codex/skills/, .codex/agents/, .codex/config.toml, hooks, and shared .map/scripts/.

MAP is inspired by MAP cognitive architecture (Nature Communications, 2025), which reported a 74% improvement in planning tasks. The CLI turns that idea into a practical software development workflow.

Architecture deep-dive ->

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 init in your project first.
  • Agent errors -> Check .claude/agents/ has all shipped agent .md files, or run mapify doctor.
  • Poor output on a complex task -> Start with /map-plan and feed /map-efficient the 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mapify_cli-3.10.0.tar.gz (464.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapify_cli-3.10.0-py3-none-any.whl (528.0 kB view details)

Uploaded Python 3

File details

Details for the file mapify_cli-3.10.0.tar.gz.

File metadata

  • Download URL: mapify_cli-3.10.0.tar.gz
  • Upload date:
  • Size: 464.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mapify_cli-3.10.0.tar.gz
Algorithm Hash digest
SHA256 3041069ecb069072b9532eb8941e450c53b034b8da02da28ba883ebe6506d9a0
MD5 4a05aaf88db7fc29b216075cbb83f1af
BLAKE2b-256 0035ce8d7fa9eab1e423d82a3755efcfd5edc77c0cb03c65b13a624308794f84

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapify_cli-3.10.0.tar.gz:

Publisher: release.yml on azalio/map-framework

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mapify_cli-3.10.0-py3-none-any.whl.

File metadata

  • Download URL: mapify_cli-3.10.0-py3-none-any.whl
  • Upload date:
  • Size: 528.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mapify_cli-3.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1da973ac8e7cd4320b3e29263c0b4566d13284ce5de982308a5d605cad53be36
MD5 318b05c4780892fd554c02546fa99f47
BLAKE2b-256 2cfbfac67ac22238b7455a50a71d08c52a0fd140d541bbd52ed9d4bfa911d9d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapify_cli-3.10.0-py3-none-any.whl:

Publisher: release.yml on azalio/map-framework

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page