fix-agent-issue
Fix Agent Issue
The user wants to change an AI agent's behavior — either because something is wrong (pointing at a trace, pasting an answer they didn't like, describing a failure mode) or because they're introducing a new requirement, business rule, or policy ("lead with our premium line," "never reveal internal docs," "always confirm the order ID first"). A new business rule is not a bug, but it earns the same discipline: it's a behavior change that can silently break other behaviors, so it goes through the loop too. They want the change made with confidence that it sticks and doesn't regress anything else. Drive a disciplined improvement loop, never a one-shot patch.
The non-negotiable loop
EXPLORE → PLAN → IMPLEMENT → VERIFY, in that order. Don't skip phases. Don't edit anything in EXPLORE. Don't write code in PLAN. Don't change tests in VERIFY.
If the user pushes for a quick fix, push back once: "Let me write a test first so we know the fix actually works." Most of the value of this skill is the discipline.
Two kinds of request trigger this skill, and both get the same test-first discipline:
- Fixing a failure — the user shares a bad trace or describes a failure mode ("the agent is hallucinating," "this answer is wrong," "my agent keeps doing X — fix it").
- Introducing a new behavior / business rule / policy — a new requirement that changes how the agent should respond ("lead with X," "new business rule: the agent should X," "always/never do X," "change the default"). Not a bug, but still a behavior change that can silently break other behaviors.
Phase 1: EXPLORE — understand what the trace shows
Goal: a written diagnosis with three answers — what the agent did, what it should have done, why it failed.