Modular Agentic Planner (MAP) - Cognitive architecture for AI agents with 9 specialized agents, ACE learning system, and professional code review integration
This plugin is not yet in any themed marketplace. To install it, you'll need to add it from GitHub directly.
Choose your preferred installation method below
A marketplace is a collection of plugins. Every plugin gets an auto-generated marketplace JSON for individual installation, plus inclusion in category and themed collections. Add a marketplace once (step 1), then install any plugin from it (step 2).
One-time setup for access to all plugins
When to use: If you plan to install multiple plugins now or later
Step 1: Add the marketplace (one-time)
/plugin marketplace add https://claudepluginhub.com/marketplaces/all.json
Run this once to access all plugins
Step 2: Install this plugin
/plugin install map-framework@all
Use this plugin's auto-generated marketplace JSON for individual installation
When to use: If you only want to try this specific plugin
Step 1: Add this plugin's marketplace
/plugin marketplace add https://claudepluginhub.com/marketplaces/plugins/map-framework.json
Step 2: Install the plugin
/plugin install map-framework@map-framework
Implementation of Modular Agentic Planner (MAP) — a cognitive architecture for AI agents inspired by prefrontal cortex functions. Orchestrates 9 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
# Feature development
/map-feature implement user authentication with JWT tokens
# 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
claude --agents '{"orchestrator": {"prompt": "$(cat .claude/agents/orchestrator.md)"}}' \
--print "implement user authentication with JWT tokens"
# In Claude Code:
/plugin marketplace add https://raw.githubusercontent.com/azalio/map-framework/main/.claude-plugin/marketplace.json
/plugin install map-framework
# Then initialize in your project:
mapify init
# Install UV if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install mapify
uv tool install --from git+https://github.com/azalio/map-framework.git mapify-cli
# Initialize in your project
cd your-project
mapify init
# Note: The repository includes .mcp.json.example with sample MCP server configurations.
# Copy and adjust it if you need project-specific MCP settings.
git clone https://github.com/azalio/map-framework.git
cd map-framework
# Start Claude Code in this directory
claude
# Copy agents
cp -r /path/to/map-framework/.claude/agents your-project/.claude/
cp -r /path/to/map-framework/.claude/commands your-project/.claude/
# Configure MCP servers (see MCP Integration section)
9 specialized agents working together:
┌──────────────────────────────────────────┐
│ ORCHESTRATOR │
│ (coordinates entire workflow) │
└───────────────┬──────────────────────────┘
│
┌───────────▼────────────┐
│ TASK DECOMPOSER │
│ (breaks into tasks) │
└───────────┬────────────┘
│
┌───────────▼─────────────────────┐
│ For each subtask: │
│ │
│ ┌──────────────────────┐ │
│ │ ACTOR ←→ MONITOR │ │
│ │ (code ←→ validate) │ │
│ └──────────┬───────────┘ │
│ │ │
│ ┌──────────▼───────────┐ │
│ │ PREDICTOR→EVALUATOR │ │
│ │ (impact → quality) │ │
│ └──────────┬───────────┘ │
│ │ │
│ ┌──────────▼───────────┐ │
│ │ REFLECTOR → CURATOR │ │
│ │ (learn → knowledge) │ │
│ └──────────────────────┘ │
└──────────────────────────────────┘
MAP uses MCP (Model Context Protocol) servers for enhanced capabilities:
MCP Server | Purpose |
---|---|
cipher | Knowledge base — stores successful patterns and solutions |
claude-reviewer | Professional code review with security analysis |
sequential-thinking | Chain-of-thought reasoning for complex problems |
codex-bridge | Code generation (⚠️ requires 10-minute timeout) |
context7 | Up-to-date library documentation |
deepwiki | GitHub repository analysis |
MCP servers are configured in .claude/mcp_config.json
. Example:
{
"mcpServers": {
"cipher": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
Note: MCP server availability depends on your Claude Code installation. Some servers may be built-in, others require separate installation. Check Claude Code documentation for current information.
/map-feature implement user profile page with avatar upload.
Include validation, error handling, and tests.
/map-debug debug why payment processing fails for amounts over $1000
/map-refactor refactor OrderService to use dependency injection.
Maintain all existing functionality.
/map-feature integrate Stripe payment processing.
Use context7 to get latest Stripe docs.
/map-feature implement rate limiter.
Study express-rate-limit via deepwiki, then create optimized version.
Built-in learning system based on ACE:
For meaning-based search instead of keywords:
pip install -r requirements-semantic.txt
Benefits:
Technical details:
all-MiniLM-L6-v2
(80MB, ~500MB on first download).claude/embeddings_cache/
Falls back to keyword matching if not installed.
Details in SEMANTIC_SEARCH_SETUP.md
# Statistics
python -m mapify_cli.playbook_manager stats
# Search patterns
python -m mapify_cli.playbook_manager search "JWT authentication"
# High-quality patterns
python -m mapify_cli.playbook_manager sync
The playbook behavior can be configured via .claude/playbook.json
metadata:
top_k - Limits number of patterns retrieved to reduce context distraction (Phase 1.3):
{
"metadata": {
"top_k": 5
}
}
get_relevant_bullets(query, limit=10)
Benefits:
Customization:
# Good ✅
"Implement registration with email validation, password strength check (8+ chars, 1 number), send confirmation"
# Bad ❌
"Add registration"
Break large features into phases:
Always specify:
MAP Framework supports intelligent model selection per agent to balance capability and cost:
Agent | Model | Reason | Cost Impact |
---|---|---|---|
Predictor | haiku | Fast analysis, simple dependency tracking | ⬇️⬇️⬇️ |
Evaluator | haiku | Scoring doesn't need complex reasoning | ⬇️⬇️⬇️ |
Actor | sonnet | Code generation quality is critical | ➡️ |
Monitor | sonnet | Quality validation requires thoroughness | ➡️ |
TaskDecomposer | sonnet | Requires good understanding of requirements | ➡️ |
Reflector | sonnet | Pattern extraction needs reasoning | ➡️ |
Curator | sonnet | Knowledge management requires care | ➡️ |
DocumentationReviewer | sonnet | Documentation analysis needs thoroughness | ➡️ |
TestGenerator | sonnet | Test quality is important | ➡️ |
Orchestrator | opus | Critical workflow decisions | ⬆️ |
Using this optimized distribution provides:
Agents automatically use their configured model when invoked via slash commands:
# Slash commands use agent-specific models automatically
/map-feature implement authentication # Uses opus orchestrator → sonnet actors
/map-debug fix login bug # Uses opus orchestrator → sonnet actors
To override model for specific agent:
# Use haiku for quick prototype
claude --model haiku --agents '{"actor": {"prompt": "$(cat .claude/agents/actor.md)"}}'
# Use opus for critical refactoring
claude --model opus --agents '{"actor": {"prompt": "$(cat .claude/agents/actor.md)"}}'
Scenario: Implement a feature with 5 subtasks
Approach | Orchestrator | TaskDecomposer | Actor (5x) | Monitor (5x) | Predictor (5x) | Evaluator (5x) | Total Cost* |
---|---|---|---|---|---|---|---|
All Opus | opus | opus | opus | opus | opus | opus | ~$2.50 |
All Sonnet | sonnet | sonnet | sonnet | sonnet | sonnet | sonnet | ~$0.50 |
Optimized | opus | sonnet | sonnet | sonnet | haiku | haiku | ~$0.35 |
*Approximate costs based on typical token usage
Savings: 30% vs all-sonnet, 86% vs all-opus
MAP Framework integrates with Claude Code hooks for automated validation and workflow protection.
PreToolUse hook that prevents accidental removal of critical Handlebars template variables from agent files.
Protects against:
{{language}}
, {{project_name}}
, {{framework}}
(breaks Orchestrator context injection){{#if playbook_bullets}}
(breaks ACE learning system){{#if feedback}}
(breaks Monitor→Actor retry loops)Example:
# Claude Code will block this operation:
❌ BLOCKED: Agent file is missing critical template variables!
File: .claude/agents/actor.md
Missing templates:
- {{language}}
- {{#if playbook_bullets}}
These template variables are used by Orchestrator for context injection.
See .claude/agents/README.md for details.
PostToolUse hook that automatically saves successful patterns to cipher MCP after modifications.
How it works:
UserPromptSubmit hook that enriches user prompts with relevant patterns from cipher before processing.
How it works:
SessionStart hook that loads ACE playbook bullets at the beginning of every session.
What it does:
.claude/sessions/current_context.txt
with project infoSubagentStop hook that tracks MAP agent performance metrics.
What it tracks:
.claude/metrics/agent_metrics.jsonl
Hooks are configured in .claude/settings.hooks.json
and automatically loaded by Claude Code.
To disable hooks (not recommended):
// .claude/settings.local.json
{
"hooks": {
"PreToolUse": []
}
}
See: .claude/hooks/README.md
for detailed documentation.
Error: Agent 'orchestrator' not found
Solution: Ensure you're in a directory with .claude/agents/
Warning: sentence-transformers not installed
Solution:
pip install -r requirements-semantic.txt
See SEMANTIC_SEARCH_SETUP.md for detailed troubleshooting.
Actor-Monitor loop exceeding iterations
Solution: Orchestrator is limited to 3-5 iterations. Clarify requirements or add constraints.
Edit files in .claude/agents/
:
# Example: make monitor stricter
edit .claude/agents/monitor.md
# Add:
# - OWASP Top 10 compliance required
# - All inputs must be sanitized
⚠️ CRITICAL: Do NOT remove template variables!
Agent prompts use Handlebars syntax ({{variable}}
, {{#if condition}}
) for dynamic context injection by Orchestrator:
# ❌ NEVER REMOVE:
{{language}} # Orchestrator injects project language
{{project_name}} # Orchestrator injects project name
{{#if playbook_bullets}} # ACE learning system (Curator → Actor)
{{#if feedback}} # Monitor → Actor retry loops
{{subtask_description}} # TaskDecomposer output
Why they're critical:
Safe to modify:
Unsafe to modify:
{{template}}
variables{{#if}}...{{/if}}
blocksAvailable template variables:
{{project_name}}
{{language}}
{{framework}}
{{standards_url}}
{{playbook_bullets}}
{{feedback}}
{{subtask_description}}
{{allowed_scope}}
MAP Framework is available as a Claude Code plugin for easy installation and distribution.
# Add MAP Framework marketplace
/plugin marketplace add https://raw.githubusercontent.com/azalio/map-framework/main/.claude-plugin/marketplace.json
# Install the plugin
/plugin install map-framework
# Initialize in your project
mapify init
.claude/settings.json
To create extensions for MAP Framework:
plugin.json
See .claude-plugin/PLUGIN.md for plugin documentation.
Validate agent template consistency:
python scripts/lint-agent-templates.py
The linter checks:
See .claude/agents/MCP-PATTERNS.md for:
All agent templates include version metadata:
---
version: 2.0.0
last_updated: 2025-10-17
changelog: .claude/agents/CHANGELOG.md
---
See .claude/agents/CHANGELOG.md for version history.
MAP Framework применяет передовые принципы контекстной инженерии для AI-агентов:
Проблема: На длинных задачах (5+ подзадач) модель теряет фокус и забывает цели.
Решение: Механизм фокусировки внимания — .map/current_plan.md
обновляется перед каждым шагом, держа цели "свежими" в контексте.
# Current Task: feat_auth
## Progress: 2/5 completed
- [✓] 1/5: Create User model
- [→] 2/5: Implement login (CURRENT, Iteration 2)
- Last error: Missing JWT import
- [☐] 3/5: Add token validation
...
Эффект:
Фаза 1 ✅ ЗАВЕРШЕНА (2025-10-18):
Результаты Phase 1:
Фаза 2 (приоритеты):
Фаза 3-4: Параллелизм, автотесты, температура по агентам
Основано на: "Context Engineering for AI Agents" (Manus.im, 2025)
Improvements welcome:
MIT License — see LICENSE file for details.
MAP is not just automation — it's systematic quality improvement through structured validation and iterative approach.
1.0.0