Task map

From gabrielmoreira/agent-skills-mirror · View interactive version

Task map is an AI agent skill from the GitHub repository gabrielmoreira/agent-skills-mirror. **WORKFLOW SKILL** — Persist analysis so it survives context compression and chains between tasks. USE FOR: any task whose decisions affect future work — features, refactors, architecture changes, integrations. Produces a lightweight Task Analysis Map that externalizes intent, decisions, and chain c

How to use this skill

Skill file

Task Map — Externalize and Chain

The Problem You Solve

Everything an agent analyzes lives in the context window. When the window compresses (long conversations, session boundaries, model switching), relevant information is silently lost. Each task starts from zero. Previous decisions, assumptions, and reasoning evaporate.

You exist to make analysis survive.

When to Produce a Map

Not every task needs a map. Produce one when:

Do NOT produce a map for: renames, typo fixes, simple dependency updates, formatting changes.

The Task Analysis Map

Produce this as a markdown file in the project (location agreed with user, default: docs/maps/):

If task-intent was already applied, reuse its Success Condition output in the Intent section — do not re-derive it.

## Task: [brief description]
Related: [link to previous map if this continues earlier work]

### Intent
- WHY: [what caused this request — the root problem]
- WHAT FOR: [broader purpose it serves]
- FOR WHOM: [who receives the solution]

### Key Decisions
| Decision | Why this over alternatives | Verified? |
|----------|--------------------------|:---------:|
| ...      | ...                      | ✅/⚠️    |

> Mark each decision: ✅ = based on verified facts (docs read, code checked, spec confirmed). ⚠️ = based on assumption or memory — flag for future verification.

### Done When
- [ ] [concrete, verifiable criterion derived from intent]
- [ ] [...]

### For Next
[What the NEXT task in this area needs to know.
 Constraints introduced. Assumptions made.
 What should be re-validated if context changes.]

Scaling

| Task impact | What to write |

|-------------|--------------|

| Moderate (feature, refactor) | Intent + Key Decisions + Done When |

| High (architecture, migration, integration) | Full map including For Next |

| Series of related tasks | Full map — For Next is critical |

The Chain Effect

Each map's For Next section becomes the starting context for the next related task. This creates a living thread:

Map #1 (auth module) → For Next: "Uses JWT with refresh. No rate limiting yet."
    ↓
Map #2 (rate limiting) → reads #1's chain → starts informed
    → For Next: "Sliding window. Shares Redis with sessions."
    ↓
Map #3 (session optimization) → reads #2's chain → knows Redis constraint

Without the chain, Map #3 might propose a Redis-heavy solution that conflicts with the constraint discovered in Map #2. With the chain, the agent starts informed.

Rules

Common Pitfalls

| | Pitfall | Consequence |

|---|---------|-------------|

| ❌ | Writing a map for a typo fix or rename | Overhead exceeds value. Maps are for decisions that constrain future work. |

| ❌ | "Decided to use PostgreSQL" (no reasoning) | Next agent doesn't know WHY → might reverse the decision or conflict with it. |

| ❌ | Marking a decision ✅ without actually checking the source | Poisons the chain. Every future task trusts a lie. |

| ❌ | Skipping "For Next" on a multi-task series | Chain breaks. Next task starts from zero, re-discovers constraints the hard way. |

| ❌ | Writing a 500-line map for a 10-line change | Map should be proportional to the task's impact, not a documentation exercise. |

| ✅ | "Chose JWT because: stateless, works with our API gateway, team familiar" | Next agent inherits the reasoning and can validate or extend. |

| ✅ | "For Next: Redis is shared with rate limiter. Don't add heavy caching without checking memory limits." | Prevents the next task from accidentally breaking the constraint. |

| ✅ | Linking to Map #1 when Map #2 continues the same work area | Creates a traceable decision chain across sessions. |

When the User Asks for Help

Companion Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.