com um clique
agentic-systematic-debugging
// Use when encountering any bug, test failure, or unexpected behavior. Enforces a strict reproduce-first, root-cause-first, failing-test-first debugging workflow before fixing.
// Use when encountering any bug, test failure, or unexpected behavior. Enforces a strict reproduce-first, root-cause-first, failing-test-first debugging workflow before fixing.
Use when a user's request is vague, ambiguous, or underspecified. Launches an iterative Q&A loop to resolve ambiguity, using an explorer subagent only when codebase context is needed. Outputs a Goal Contract for the durable /goal runtime. Triggers on "I want to...", "I need...", "let's build...", "can you help me...", "we should...", or any request where the full scope isn't immediately clear.
Primary execution workflow for durable /goal runtime. Use when a Goal Contract is active or when the user asks to execute, continue, verify, or complete a goal.
Review changed code for reuse opportunities, quality issues, and inefficiencies using three parallel review agents, then fix any issues found. Triggers when the user says "agentic-simplify", "clean up the code", "review the changes", or after goal implementation when code quality verification is needed.
Interactive idea development through guided Q&A dialogue. This skill helps users clarify and develop their ideas by asking targeted questions, expanding on possibilities, and producing a structured markdown document capturing the essence of their thinking. Triggers: "brainstorm", "idea", "organize ideas", "I want to organize my thoughts", "whatever comes to mind"
Behavioral guardrails to prevent common LLM coding mistakes — enforces surgical changes, assumption verification, and scope discipline before and during implementation. Use when implementing features, modifying code, or when you notice yourself about to make changes without reading the existing code first.
Rob Pike's 5 Rules of Programming — a decision framework that prevents premature optimization and enforces measurement-driven development. Use when the user says "optimize", "slow", "performance", "bottleneck", "speed up", "make faster", "too slow", or any request to improve code speed/efficiency. Also use when you notice yourself about to suggest a performance optimization without measurement data. This is a thinking discipline, not a tooling workflow.
| name | agentic-systematic-debugging |
| description | Use when encountering any bug, test failure, or unexpected behavior. Enforces a strict reproduce-first, root-cause-first, failing-test-first debugging workflow before fixing. |
A strict debugging workflow. Use when dealing with bugs, test failures, or unexpected behavior.
Three core purposes:
These rules have no exceptions.
Attempt reproduction FIRST, before any analysis.
ask_user_question) to ask: "How can I reproduce this bug? What steps, inputs, or conditions trigger it?"Do not fix until you have a reproducible or observable state.
Do not fix until you have stated a root-cause hypothesis.
Do not fix until you have a failing test or equivalent reproduction mechanism.
Verify only one hypothesis at a time.
No "while I'm here" refactoring during a fix.
If three fix attempts fail, suspect a structural issue before applying another patch.
Violating this process is considered a debugging failure.
Use this skill in the following situations:
The following excuses are not accepted:
When using this skill, the following items must be locked internally:
If any of these seven items are missing, the work is not done.
Follow the steps below in order.
Before anything else, try to reproduce the bug.
If you cannot figure out how to reproduce:
→ Stop immediately. Do not proceed to analysis.
→ Use ask_user_question to ask the user:
If reproduction environment is too complex to set up:
→ Ask the user: "The reproduction environment seems complex. Would you like me to create a setup goal for the test environment?"
→ If the user agrees, create or update a /goal entry for the setup work.
→ If the user declines, document the required environment and proceed with caution (gathering evidence via logs, code analysis, etc.).
First, condense the problem.
Output format:
Problem: <expected> but got <actual> under <condition>
Do not mix symptoms with speculation.
Good: Product detail API returns 500 when brand is null.
Bad: Serializer is broken because brand mapping seems wrong.
You must be able to see the failure again before fixing it.
Priority:
Rules:
What to do when reproduction is not possible:
Collect only observable facts.
Always check:
For multi-component problems, check at each boundary.
Examples:
At each boundary, check:
Do not fix until you have pinpointed the problem location.
Formulate exactly one cause candidate.
Format:
Hypothesis: <root cause> because <evidence>
Qualities of a good hypothesis:
Examples of bad hypotheses:
Trace the cause back to the source. If the error appears deep in the stack, trace the origin of the input, not the symptom.
Lock the failure before fixing.
Priority:
Rules:
If an automated test is feasible, use the test-driven-development skill alongside this one.
The fix addresses only one hypothesis.
Allowed:
Forbidden:
If the fix fails, immediately return to Phase 1 or Phase 3. The previous hypothesis was wrong.
All of the following must be satisfied before closing:
For intermittent bugs, a single pass is not enough. Verification under repeated runs or varying conditions is required.
Stop and reframe in the following situations.
If reproduction fails after multiple attempts:
Changing code without reproduction is forbidden.
If three consecutive fixes miss the mark, conclude:
From this point, a "fourth patch" is not the answer — a structural discussion is needed.
If you cannot create a failing test or equivalent reproduction mechanism, do not declare completion. At minimum, leave behind the reproduction command and observed results.
If any of the following thoughts arise, stop immediately and return to an earlier phase.
Use this checklist for self-verification during execution.
The completion criterion for this skill is not "the code changed."
Completion criteria:
Without these four, debugging is not finished.