Skip to content
map-planning logo

MAP Planning Skill

map-planning

Implements file-based planning for MAP Framework workflows with branch-scoped task tracking in .map/ directory. Prevents goal drift via automatic plan synchronization before tool use and validates completion state on exit.

SKILL.md

Full skill instructions

MAP Planning Skill

Implements Manus-style file-based planning adapted for MAP Framework workflows. Uses branch-scoped persistent files to track goals, tasks, progress, and learnings across agent sessions.

Core Concept

Instead of relying solely on conversation context (limited window), this skill externalizes planning artifacts to the filesystem. The agent reads/​writes structured files that survive context resets, enable progress resumption, and provide explicit traceability.

Key Principle: Filesystem as Extended Memory

  • Plan defines "what to do" (phases, dependencies, criteria)
  • Notes capture "what learned" (findings, errors, decisions)
  • Progress tracked via checkboxes (visual state)
  • Branch-specific scope (isolation between features/​bugs)

File Structure

All files reside in .map/ directory with branch-based naming:

.map/
├── task_plan_<branch>.md    # Primary plan with phases and status
├── findings_<branch>.md     # Research findings, decisions, key files
└── progress_<branch>.md     # Action log, errors, test results

Example: On branch feature-auth:

  • .map/​task_plan_feature-auth.md
  • .map/​findings_feature-auth.md
  • .map/​progress_feature-auth.md

Hook Behavior

PreToolUse Hook (Before Write/​Edit/​Bash)

Runs show-focus.sh → extracts only the in_progress section (~200 tokens) and displays Goal + current phase. Purpose: Re-anchors agent to original goal before taking action, prevents goal drift.

Stop Hook (Before Agent Exit)

Runs check-complete.sh → validates all phases have terminal state before allowing exit.

Terminal States: complete, blocked, won't_do, superseded

Plan File Structure

# Task Plan: <Brief Title>

## Goal
<One sentence describing end state>

## Current Phase
ST-001

## Phases

### ST-001: <Title>
**Status:** in_progress
Risk: low|medium|high
Complexity: 1-10
Files: <paths>

Validation:
- [ ] <criterion 1>
- [ ] <criterion 2>

### ST-002: <Title>
**Status:** pending
...

## Terminal State
**Status:** pending
Reason: [Not yet complete]

Workflow Integration

Initialization

${CLAUDE_PLUGIN_ROOT}/​scripts/​init-session.sh

Creates .map/ directory and skeleton files for current branch.

Progress Tracking

  • PreToolUse hook auto-displays focus before Write/​Edit/​Bash
  • Update Status: in_progress → Status: complete as phases finish
  • Check validation criteria checkboxes [x] when done

3-Strike Error Protocol

Log errors to progress_<branch>.md after attempt 3+. After 3 failed attempts:

  1. Escalate to user (CONTINUE/​SKIP/​ABORT options)
  2. If SKIP: mark phase blocked, move to next subtask
  3. If ABORT: mark workflow blocked, exit

Terminal State

Update ## Terminal State with final status before exiting. Stop hook validates this.

MAP Workflow Integration

When /​map-efficient runs:

  1. init-session.sh creates .map/ skeleton
  2. task-decomposer populates phases from blueprint
  3. Actor implements → PreToolUse hook shows focus
  4. Monitor validates → outputs status_update field
  5. Orchestrator updates task_plan using Monitor's status_update
  6. Stop hook validates terminal state before exit

/​map-fast skips planning — hooks are no-op if plan missing.

Single-Writer Governance

Only Monitor agent updates task_plan status (via status_update output field).

AgentRead task_planWrite task_plan
task-decomposerNoYes (creates)
ActorYesNo
MonitorYesYes (status only)
PredictorYesNo
OrchestratorYesNo (applies Monitor output)

Why: Prevents race conditions, ensures consistent state, clear ownership.

Best Practices

  • Goal clarity: Specific, measurable outcomes
  • Granular phases: Each phase = 1 agent action
  • Checkpoint frequently: Update status immediately after completion
  • Terminal state early: Mark blocked as soon as blocker identified

Error Handling

IssueFix
Plan not foundRun init-session.sh
Stop hook warns "No terminal state"Update ## Terminal State section
Branch name with /Scripts sanitize: feature/​auth → feature-auth

Terminal States

StateWhen
completeAll phases finished, criteria met
blockedNeeds external input (human, resource)
won't_doTask intentionally cancelled
supersededReplaced by different approach

Version: 1.0.0 (2025-01-10)

References:

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View