map-framework

作者 azalio已验证

Plan-then-build AI coding for Claude Code & Codex CLI — you approve the plan before the model writes a line of code. SPEC → PLAN → TEST → CODE → REVIEW → LEARN

159
Stars
6
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/azalio/map-framework

快速入门

使用 map-framework 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

MAP Framework — Plan-then-build AI coding. You approve the plan before the model writes a line of code.

PyPI version Python 3.11+ License: MIT GitHub stars

Why MAP Exists

Most AI agents rush straight to code — fast wrong answers, silent rework.

Without MAP: idea, prompt, code, hope. With MAP: SPEC, PLAN, TEST, CODE, REVIEW, LEARN — a closed loop.

Common failure modes MAP eliminates:

  • 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.

Quick Start

Quick Start — install, init, run the loop

1. Install

uv tool install mapify-cli

# or with pip
pip install mapify-cli

Requires Python 3.11+, and python3 on your PATH must be that interpreter — the installed hooks and .map/scripts/ runners execute through a #!/usr/bin/env python3 shebang, not through the interpreter that ran mapify. mapify init checks it up front and tells you what to fix (details).

2. Initialize your project

Claude Code is the default provider:

cd your-project
mapify init
claude

Codex CLI:

cd your-project
mapify init . --provider codex
codex

Then enable the Codex hook: run /hooks, select PreToolUse, press t to toggle on, then Esc. If your Codex version does not support the hooks feature key yet, start with codex --enable codex_hooks or upgrade first.

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.

  • Start with /map-plan for anything non-trivial — it clarifies behavior and splits the work into contract-sized subtasks.
  • Already scoped? Go straight to /map-efficient.
  • Tiny edit? /map-plan off-ramps you to a direct edit or /map-fast instead of forcing full planning.
  • Too foggy to plan? /map-wayfind resolves open design decisions one at a time on a durable map, then hands settled decisions to /map-plan.
  • Want one entry point? /map-auto routes and drives the chain autonomously; hard-stops only on dangerous_action/safety_guardrail holds.

Codex CLI users invoke the same skills with $: $map-plan, $map-efficient, $map-check. See the Usage Guide.

Framework updates. Automatic stable updates are enabled by default. Normal MAP skills check at most once per project every 24 hours, apply eligible patch and minor releases, and ask before a major release after showing its official feature highlights. Rejecting a major offer is remembered per project for that exact version, so it is not offered again; any different patch, minor, or major version is offered normally. Use these project controls and provider-specific manual skills when needed:

mapify init . --no-auto-update   # persist updates.auto: false
mapify init . --auto-update      # re-enable automatic checks
/map-upgrade                     # Claude manual check/upgrade
$map-upgrade                     # Codex manual check/upgrade

Automatic failures stay silent so they do not block the requested workflow; manual checks report errors explicitly. The public mapify upgrade command is separate and unchanged: it upgrades only the CLI and does not refresh project files. See Automatic and manual framework updates.

Case Study: 90 days → 7 days

The DevOpsConf 2026 case study applies this process to a production Kubernetes Project Operator:

  • 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 →

When To Use MAP

Good fitsPoor fits
Complex backend featuresTypos and tiny edits
Kubernetes controllers and operatorsSmall one-off scripts
Internal platform toolingProduct ideas where behavior is still unknown
API, CRD, or domain-model changes with invariantsBroad rewrites without clear boundaries
Refactoring with a meaningful test harnessTasks cheaper to do directly than to plan

Core Commands

CommandUse For
/map-autoSingle-entry autonomous autopilot: routes a task through existing MAP workflows and drives the chain to a committed branch
/map-planStart here for non-trivial work; clarify behavior and decompose tasks
/map-wayfindToo foggy to plan? Resolve design decisions on a durable map before /map-plan
/map-efficientImplement an approved plan or already-scoped task
/map-fastSmall, low-risk changes where full planning is overhead
/map-checkQuality gates, verification, and artifact checks
/map-reviewPre-commit semantic review against the plan, tests, and diff
/map-learnCapture project memory and reusable lessons
/map-understandInteractive teaching and quiz mode for code, diffs, and workflow results
/map-debugBug fixes and debugging
/map-taskExecute a single subtask from an existing plan
/map-tddTest-first implementation workflow
/map-releasePackage release workflow
/map-resumeResume interrupted workflows

Detailed usage and options →

Why Engineers Stick With It

  • Daily-driver speed — optimized for repeated use, not occasional demos. Structured enough to prevent chaos, lightweight enough to keep token and time cost under control.
  • Reviewable diffs/map-plan and /map-efficient require per-subtask size, concern, and constraint metadata, then validate blueprint.json before implementation, so oversized or mixed-concern plans fail early.
  • Gates that check the plan, not vibes/map-check and /map-review validate against the spec, tests, and diff instead of asking whether code "looks fine".
  • Clean-room review/map-review auto-bundles spec, plan, tests, verification, and coverage evidence into a single durable input (.map/<branch>/review-bundle.json); --detached opens a read-only worktree for inspection without touching your branch.
  • Project memory/map-learn turns 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_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.
  • 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.
  • Context-first prompt envelopes — high-context prompts 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, and coverage_map. Hard constraints must be owned in coverage_map and cited in the owning subtask.
  • Token budget and research ROI reports — Actor and review prompt builders append active-path budget decisions to .map/<branch>/token_budget.json, while token_accounting.json and /map-tokenreport separate research-agent/researcher cost from Actor/Monitor cost.
  • Clean retry quarantine — after repeated Monitor rejection, write-capable workflows switch the next attempt into clean-retry mode using .map/<branch>/retry_quarantine.json instead of raw failed-session context.
  • Run health report — workflows write .map/<branch>/run_health_report.json during closeout: terminal status, step progress, retry counters, artifact presence, hook-injection status, and advisory signals. CI can fail inconsistent closeouts with python3 .map/scripts/map_step_runner.py validate_run_health_report.
  • Compact recovery surface/map-resume keeps the active recovery flow short and moves low-frequency notes to resume-reference.md, so recovery after /clear or context exhaustion gives the next checkpoint action without loading the whole appendix.
  • Skill IR audit — release checks lower shipped Claude and Codex SKILL.md files into a typed SkillIR, verify content hashes, catch unsupported frontmatter, reject missing supporting-file links, and block injection-like instructions before mapify init copies 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.

Architecture deep-dive →

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.

Options

Minimality doctrine, context-compression policy, 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   # default for ALL projects; set 'off' to opt out

Allowed values: off, lite, full, ultra. The global default is lite. lite is conservative: 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. In full/ultra, the decomposer may place speculative omissions in blueprint.deferred_yagni; those items must be shown during plan approval and can be restored with python3 .map/scripts/map_orchestrator.py restore_deferred_yagni YG-NNN. Maintainers can inspect local rollout telemetry with mapify minimality-report --json.

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. When a policy other than never is active, MAP offloads large tool outputs to .map/<branch>/compacted/ before /compact drops them, so a dropped output is re-read from its sidecar instead of re-running broad discovery (these sidecars can hold secrets — they are 0o600 and self-ignored from git; never push .map/). 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.

Autonomy posture (--autonomy, claude provider) — off by default, opt-in "YOLO-minus-git":

mapify init . --autonomy        # auto-approve most tools; keep git commit/push for the human
mapify init . --no-autonomy     # remove the autonomy posture

--autonomy writes a broad auto-approve allowlist plus a git commit/push deny into the per-user, gitignored .claude/settings.local.json (the committed team .claude/settings.json stays the secure baseline). The git block is enforced by the safety-guardrails.py PreToolUse hook. Omit the flag to leave existing local settings untouched on re-init. See the autonomy usage guide.

Documentation

GuideDescription
InstallationAll install methods, PATH setup, troubleshooting
Usage GuideWorkflows, examples, cost optimization, playbook
Prompt LibraryCopyable prompt recipes by SDLC phase and role
ArchitectureAgents, MCP integration, customization
Platform SpecPlatform refactor roadmap, codebase analysis

Trouble?

  • Command not found → Run mapify init in your project first.
  • init stops on a Python versionpython3 on your PATH is older than 3.11; the hooks run under it. Install 3.11+ (brew install python@3.12 / uv python install 3.12), then mapify check. To install anyway, pass --skip-python-check or set MAPIFY_SKIP_PYTHON_CHECK=1 — hooks stay non-functional until python3 is upgraded (details).
  • A hook printed "MAP requires Python 3.11 or newer" → same cause, detected at run time; the message names the interpreter it ran under. Context hooks report and let the session continue; the two PreToolUse gates (safety-guardrails.py, workflow-gate.py) deny the tool call instead of allowing it unguarded, so fix python3 in another terminal to unblock.
  • 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.

常见问题

What is map-framework?

map-framework is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by azalio. Plan-then-build AI coding for Claude Code & Codex CLI — you approve the plan before the model writes a line of code. SPEC → PLAN → TEST → CODE → REVIEW → LEARN. It has 159 GitHub stars.

Is map-framework safe to use?

Yes. map-framework passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install map-framework?

Clone the repository with "git clone https://github.com/azalio/map-framework" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is map-framework written in?

map-framework is primarily written in Python. It is open-source under azalio on GitHub, so you can review or fork the full source.

Are there alternatives to map-framework?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh map-framework against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情