MAP Framework installer - Modular Agentic Planner for Claude Code
Project description
MAP Framework for Claude Code
Implementation of Modular Agentic Planner (MAP) โ a cognitive architecture for AI agents inspired by prefrontal cortex functions. Orchestrates 8 specialized agents for development with automatic quality validation.
Based on: Nature Communications research (2025) โ 74% improvement in planning tasks Enhanced with: ACE (Agentic Context Engineering) โ continuous learning from experience
๐ Documentation Structure
- README (this file) - Quick start and overview
- INSTALL.md - Complete installation guide with PATH setup and troubleshooting
- ARCHITECTURE.md - Technical deep dive, customization, and MCP integration
- USAGE.md - Practical examples, best practices, cost optimization, and dependency validation
๐ Quick Start
Inside Claude Code (Recommended)
# Feature development (full quality - 8 agents)
/map-feature implement user authentication with JWT tokens
# โญ RECOMMENDED: Efficient workflow (30-40% token savings, preserves learning)
/map-efficient implement user profile page with avatar upload
# Debugging
/map-debug fix the API 500 error on login endpoint
# Refactoring
/map-refactor refactor UserService class with dependency injection
# Code review
/map-review review the recent changes in auth.py
# โ ๏ธ Fast workflow (40-50% savings, NO learning - throwaway code only)
/map-fast prototype a quick API endpoint mockup
Command Line Usage
MAP Framework works exclusively through slash commands in Claude Code:
# Start Claude Code in your project directory
cd your-project
claude
# Use slash commands inside Claude Code
/map-feature implement user authentication with JWT tokens
Note: Direct claude --agents syntax is not applicable to MAP Framework, as the orchestration logic is implemented in slash command prompts (.claude/commands/map-*.md), not as a separate agent file.
๐ฆ Installation
Stable Release (Recommended)
# Using pip
pip install mapify-cli
# OR using UV (recommended for isolated tools)
uv tool install mapify-cli
# Verify installation
mapify --version
# Initialize in your project
cd your-project
mapify init
# Available commands
mapify --help # Show all available commands
mapify validate graph <file> # Validate task dependency graphs
mapify playbook search <query> # Search playbook patterns
mapify recitation get-context # Get current task plan
Version Pinning:
# Install specific version
pip install mapify-cli==1.0.0
# Install with version constraints (semantic versioning: MAJOR.MINOR.PATCH)
pip install "mapify-cli>=1.0.0,<2.0.0" # Allow 1.x versions, exclude 2.0.0+
Version Information:
- Check installed version:
mapify --version - PyPI releases - Available versions and package details
- GitHub releases - Changelog and release notes
Development Installation
For contributors or testing bleeding-edge features:
# Install from git repository
uv tool install --from git+https://github.com/azalio/map-framework.git mapify-cli
# OR clone and install locally
git clone https://github.com/azalio/map-framework.git
cd map-framework
pip install -e .
Other installation methods (manual copy, troubleshooting): See INSTALL.md
For maintainers: Release process documented in RELEASING.md
๐ Workflow Variants
MAP Framework offers three workflow variants optimized for different scenarios:
| Command | Token Usage | Learning | Quality Gates | Best For |
|---|---|---|---|---|
/map-feature |
100% (baseline) | โ Full (per-subtask) | โ All 8 agents | Critical features, first-time implementations, maximum QA |
/map-efficient โญ |
60-70% | โ Full (batched) | โ Essential agents | RECOMMENDED: Most production tasks |
/map-fast โ ๏ธ |
50-60% | โ None | โ ๏ธ Basic only | Throwaway prototypes, experiments (NOT production) |
Which Workflow Should You Use?
Use /map-efficient (RECOMMENDED) when:
- โ Building production features where token costs matter
- โ Well-understood tasks with low to medium risk
- โ You want learning without excessive token usage
- โ Iterative development with frequent workflows
Use /map-feature (full workflow) when:
- ๐ Implementing security-critical functionality
- ๐ First-time complex features requiring maximum validation
- ๐ High-risk changes affecting many files
- ๐ You need complete quality assurance and impact analysis
Use /map-fast (minimal) ONLY when:
- ๐๏ธ Creating throwaway prototypes you'll discard
- ๐๏ธ Quick experiments where quality doesn't matter
- ๐๏ธ Learning/tutorial contexts where failure is acceptable
- โ ๏ธ NEVER for production code - no learning, quality risks
๐ฏ Auto-Activation System
Don't remember which workflow to use? MAP automatically suggests the right workflow based on your request!
Just describe your task naturally - no need to remember slash commands:
| Your Request | MAP Suggests | Why |
|---|---|---|
| "Fix the failing tests" | /map-debug |
Keywords: fix, failing test |
| "Implement user login" | /map-feature |
Keywords: implement, feature |
| "Optimize database queries" | /map-efficient |
Keywords: optimize |
| "Restructure auth module" | /map-refactor |
Keywords: restructure |
| "Quick prototype for testing" | /map-fast |
Keywords: quick, prototype |
How it works:
- Start typing your request normally
- MAP analyzes keywords and intent patterns
- Suggests the most appropriate workflow
- You can accept the suggestion or proceed with your request
Customization:
Edit .claude/workflow-rules.json to add project-specific trigger words and patterns.
Key Differences
/map-efficient optimizations:
- Conditional Predictor: Only called for high-risk tasks (security, breaking changes)
- Batched Learning: Reflector/Curator run once at end (vs per-subtask)
- Evaluator Skipped: Monitor provides sufficient validation for most tasks
- Result: 30-40% token savings while preserving learning and essential quality gates
/map-fast limitations:
- โ No impact analysis (Predictor skipped)
- โ No quality scoring (Evaluator skipped)
- โ No learning (Reflector/Curator skipped)
- โ Playbook never improves
- โ Cipher knowledge never accumulates
- โ ๏ธ Defeats MAP's core purpose of continuous improvement
See USAGE.md for detailed decision guide and real-world token usage examples.
๐ Skills System
MAP includes interactive skills that provide specialized guidance:
map-workflows-guide - Helps you choose the right workflow
Auto-suggested when you ask:
- "Which workflow should I use?"
- "What's the difference between workflows?"
- "When to use /map-efficient vs /map-feature?"
What you get:
- Quick decision tree (5 questions โ recommended workflow)
- Comparison matrix (token cost, learning, agents, use cases)
- 8 detailed resource guides (progressive disclosure)
Skills vs Agents:
- Skills = Passive documentation (guidance)
- Agents = Active execution (code generation)
See docs/USAGE.md for full details.
Requirements
- Claude Code CLI โ installed and configured
- Python 3.11+ โ for mapify CLI (optional)
- Git โ for cloning repository
๐๏ธ Architecture
MAP Framework orchestrates 8 specialized agents through slash commands:
- TaskDecomposer breaks goals into subtasks
- Actor generates code, Monitor validates quality
- Predictor analyzes impact, Evaluator scores solutions
- Reflector/Curator enable continuous learning via ACE playbook
The orchestration logic lives in .claude/commands/map-*.md prompts, coordinating agents via the Task tool.
See ARCHITECTURE.md for:
- Detailed agent specifications and responsibilities
- MCP integration architecture and tool usage patterns
- Agent coordination protocol and workflow stages
- Template customization guide with examples
- Hooks integration (automated validation, knowledge storage, context enrichment)
- Context engineering principles and optimizations
๐ MCP Integration
MAP uses MCP (Model Context Protocol) servers for enhanced capabilities:
- cipher - Knowledge base for storing and retrieving successful patterns
- claude-reviewer - Professional code review with security analysis
- context7 - Up-to-date library documentation
- sequential-thinking - Chain-of-thought reasoning for complex problems
- codex-bridge - AI code generation (requires extended timeout)
- deepwiki - GitHub repository intelligence
Configuration files: .claude/mcp_config.json and mcp_config.json
See ARCHITECTURE.md for complete setup and usage patterns
๐ Usage Examples
# Feature development
/map-feature implement user profile page with avatar upload
# Bug fixing
/map-debug debug why payment processing fails for amounts over $1000
# Refactoring
/map-refactor refactor OrderService to use dependency injection
See USAGE.md for:
- Comprehensive usage examples with detailed scenarios
- Best practices for optimal results
- Cost optimization strategies (40-60% savings)
- Playbook management commands
๐ ACE Playbook
Built-in learning system that improves with each task:
- Reflector extracts patterns from successes and failures
- Curator maintains structured knowledge base with quality tracking
- Semantic search (optional) finds patterns by meaning, not keywords
- Dependency validation ensures valid task graphs before execution
- Automatically grows high-quality pattern library
Playbook Commands
# View statistics
mapify playbook stats
# Search patterns
mapify playbook search "JWT authentication"
# View high-quality patterns
mapify playbook sync
# Validate task dependencies with visualization
python scripts/validate-dependencies.py decomposer-output.json --visualize
Optional semantic search: pip install -r requirements-semantic.txt for meaning-based matching. Details in SEMANTIC_SEARCH_SETUP.md and ARCHITECTURE.md.
Playbook configuration: See ARCHITECTURE.md for top_k settings and optimization.
Dependency validation: See USAGE.md for comprehensive guide on validating TaskDecomposer output, including cycle detection, visualization, and CI/CD integration.
๐ฐ Cost Optimization
MAP Framework uses intelligent model selection per agent:
- Predictor & Evaluator use haiku (fast analysis) โ โฌ๏ธโฌ๏ธโฌ๏ธ cost
- Actor, Monitor, Reflector, Curator use sonnet (quality-critical) โ balanced cost
Result: 40-60% cost reduction vs all-sonnet while maintaining code quality.
See USAGE.md for detailed cost breakdown and model override strategies
๐ Hooks Integration
MAP integrates with Claude Code hooks for automated validation, knowledge storage, and context enrichment. Active hooks protect template variables, auto-store successful patterns, enrich prompts with relevant knowledge, and track performance metrics.
See ARCHITECTURE.md and .claude/hooks/README.md for configuration
๐ ๏ธ Troubleshooting
Command Not Found
Error: Slash command not recognized
Solution:
- Ensure you're in a directory with
.claude/commands/containingmap-*.mdfiles - Use
/map-feature,/map-debug,/map-refactor, or/map-review - Run
/helpto see available commands
Agent Not Found
Error: Agent file not found
Solution: Ensure .claude/agents/ directory contains all 8 agent files (task-decomposer.md, actor.md, monitor.md, predictor.md, evaluator.md, reflector.md, curator.md, documentation-reviewer.md)
Semantic Search Warning
Warning: sentence-transformers not installed
Solution: pip install -r requirements-semantic.txt
See SEMANTIC_SEARCH_SETUP.md for detailed troubleshooting
Infinite Loops
Actor-Monitor loop exceeding iterations
Solution: Orchestrator limits iterations to 3-5. Clarify requirements or add constraints.
More troubleshooting: See INSTALL.md for PATH issues, MCP configuration, and installation problems
๐ง Customization
Agent prompts in .claude/agents/*.md use Handlebars template syntax for dynamic context injection. You can safely modify instructions, examples, and validation criteria, but MUST NOT remove template variables like {{language}}, {{#if playbook_bullets}}, or {{feedback}} โ these are critical for orchestration and ACE learning.
See ARCHITECTURE.md for:
- Safe vs unsafe modifications with examples
- Template variable reference
- Model selection per agent
- Adding custom agents
- Template validation and git hooks
๐ Success Metrics
- Monitor approval rate: >80% first try
- Evaluator scores: average >7.0/10
- Iteration count: <3 per subtask
- Playbook growth: increasing high-quality patterns
๐ค Contributing
Improvements welcome:
- Prompts for specific languages/frameworks
- New specialized agents
- CI/CD integrations
- Success story examples
- Plugin extensions for MAP Framework
๐ License
MIT License โ see LICENSE file for details
๐ References
MAP is not just automation โ it's systematic quality improvement through structured validation and iterative refinement.
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-1.2.3.tar.gz.
File metadata
- Download URL: mapify_cli-1.2.3.tar.gz
- Upload date:
- Size: 294.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cb8947630bcdaab920c05f23f0ad47d84c6af431482cc45608bc9096472548e
|
|
| MD5 |
1091ee85d659bd57eae1351fc1c91875
|
|
| BLAKE2b-256 |
ca46d5cd7e1ed7a39272aeca3a874a5a2b8c462cf1dd621abcdc702dc041e547
|
Provenance
The following attestation bundles were made for mapify_cli-1.2.3.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-1.2.3.tar.gz -
Subject digest:
3cb8947630bcdaab920c05f23f0ad47d84c6af431482cc45608bc9096472548e - Sigstore transparency entry: 669544351
- Sigstore integration time:
-
Permalink:
azalio/map-framework@5ba7f846116e5c701b3e51d79b518bf9824deb35 -
Branch / Tag:
refs/tags/v1.2.3 - Owner: https://github.com/azalio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5ba7f846116e5c701b3e51d79b518bf9824deb35 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mapify_cli-1.2.3-py3-none-any.whl.
File metadata
- Download URL: mapify_cli-1.2.3-py3-none-any.whl
- Upload date:
- Size: 328.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd4ee8731a4ad4f8d473b8308f78327b242fc600f080b2e24b19b5e8ff59cb14
|
|
| MD5 |
b9acf6c96663acfa63afa7384dfca2fc
|
|
| BLAKE2b-256 |
91aa5a42c1f82fe46b4c890bdf090a570a19a73918dc1befa43ca357d5d968d2
|
Provenance
The following attestation bundles were made for mapify_cli-1.2.3-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-1.2.3-py3-none-any.whl -
Subject digest:
dd4ee8731a4ad4f8d473b8308f78327b242fc600f080b2e24b19b5e8ff59cb14 - Sigstore transparency entry: 669544370
- Sigstore integration time:
-
Permalink:
azalio/map-framework@5ba7f846116e5c701b3e51d79b518bf9824deb35 -
Branch / Tag:
refs/tags/v1.2.3 - Owner: https://github.com/azalio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5ba7f846116e5c701b3e51d79b518bf9824deb35 -
Trigger Event:
push
-
Statement type: