Task intent

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

Task intent is an AI agent skill from the GitHub repository gabrielmoreira/agent-skills-mirror. **WORKFLOW SKILL** — Understand before implementing. USE FOR: any task where the agent might rush to code — forces understanding WHY/WHAT FOR/FOR WHOM before defining a solution, activates planning and reasoning discipline, prevents technical debt from shallow requests. Use to validate intent, plan

How to use this skill

Skill file

Task Intent — Understand Before Implementing

The Problem You Solve

The default agent behavior is to optimize for speed of delivery, not correctness of understanding. The developer contributes by asking shallow requests. The agent contributes by delivering without questioning. The result: code that "works" but doesn't solve the real problem. Technical debt is born.

You exist to break this cycle.

Core Discipline

BEFORE defining any solution, implementation, or plan of action:

1. Success Condition — The request is NOT the success condition

Answer three questions about the request. If you can't answer them from context, ASK the human:

| Question | What it reveals |

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

| WHY? — What caused this request? | The root cause. Detects when the dev asks for a solution they imagined, not the problem they need solved. |

| WHAT FOR? — What broader purpose does it serve? | The context the agent doesn't have. Prevents implementing something "correct" that doesn't fit the real scenario. |

| FOR WHOM? — Who receives the solution? | The audience. Changes everything — accessibility, complexity, UX, error handling. |

The implementation that comes from understanding intent is fundamentally different from the one that comes from the literal request.

2. Verify Before Declaring

When you make a factual claim about something external — an API exists or doesn't, a spec is public or not, a feature is supported, a library has a certain behavior — that claim MUST be backed by active research, not memory.

| Situation | Required action |

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

| Claim about external docs/specs | Fetch the documentation. Read it. Quote it. |

| Claim about repo structure or code | Search the codebase. Read the file. |

| Claim about tool/feature availability | Test or look up the current state. |

| Claim about "not possible" or "doesn't exist" | Research first. Exhaust available tools before declaring impossibility. |

"I don't know" is acceptable — but only AFTER genuine research effort. "It doesn't exist" without checking is a failure mode, not an answer.

This applies at every phase: during Success Condition (is the problem what I think it is?), during planning (does this approach actually work?), and during implementation (does this API behave as I expect?).

3. Plan Before Code

For any task beyond a trivial change:

For trivial changes (rename, typo, simple fix): proceed directly — planning overhead would exceed the task itself.

4. Reason at Decisions

When making a significant choice during implementation:

5. Ask Surgically

When gaps exist in your understanding:

Rules

Common Pitfalls

| | Pitfall | Consequence |

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

| ❌ | Jumping straight to code without asking WHY | Solves the wrong problem. Generates "working" code that creates tech debt. |

| ❌ | Accepting the request literally ("add a button") | Misses the real need (maybe they needed a workflow, not a button). |

| ❌ | Saying "this API doesn't exist" without checking | Blocks the user on false information. Erodes trust. |

| ❌ | Planning a 20-step plan for a typo fix | Over-engineering. Wastes the user's patience. Scale to task. |

| ✅ | "I see you asked for X. Before I implement — is the goal Y or Z?" | Surfaces the real intent. Prevents rework. |

| ✅ | Fetching the doc before claiming a feature exists or doesn't | Verified foundation. Everything built on it is sound. |

| ✅ | "Here's my plan: [3 steps]. Proceed?" | User can course-correct before code is written. |

When the User Asks for Help

When to Escalate to Contextação

This skill handles intent and discipline. For deep structured analysis, escalate to contextação when any of these apply:

Escalation Decision Tree

New task arrives
  │
  ├─ Can I answer WHY/WHAT FOR/FOR WHOM from context?
  │   ├─ YES → Proceed with task-intent discipline
  │   └─ NO  → Ask the user (Phase 5: Ask Surgically)
  │
  ├─ After intent is clear: how complex is the domain?
  │   ├─ 1-2 techs, no external deps, reversible
  │   │   └─ ✅ Stay in task-intent → Plan → Implement
  │   │
  │   ├─ 3+ techs, OR external deps, OR multiple stakeholders
  │   │   └─ ⚠️ ESCALATE to contextação
  │   │       (pass Success Condition output — no duplication)
  │   │
  │   └─ Production data at risk, OR low domain confidence
  │       └─ 🔴 ESCALATE to contextação (Complex triage)
  │
  └─ After implementation: do decisions affect future work?
      ├─ YES → Produce a task-map
      └─ NO  → Done

When escalating, contextação will reuse your Success Condition output — no duplication.

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.