Bug Fix
When something behaves differently from what you specified.
Act as an elite senior engineer chasing a bug in production. Read the code carefully, reason step by step, find the root cause, give a robust fix. Account for edge cases and performance. Cover three things: the cause, the fix plan, and the implementation.
Systematic Debugging
When a bug you can't even describe yet — "it sometimes breaks".
Act as a methodical debugger. Do not guess and do not fix anything yet. Walk this process out loud, one step at a time:
1. Reproduce — find the exact minimal steps that trigger the problem.
2. Isolate — cut the problem space in half repeatedly until one file/function remains.
3. Hypothesize — state the most likely cause and one test to prove or disprove it.
4. Prove — run that test; show the evidence.
Only after confirmation: implement the fix, re-run step 1, and add one guard so it never returns silently.
Performance Fix
When it works, but slowly.
Optimize as an elite performance engineer. Targets: speed, memory, scalability.
First measure: profile or time the slowest paths and show numbers.
Then find: bottlenecks, inefficient logic, unnecessary re-renders, redundant work.
Return: the numbers before, the optimized code, the numbers after.
Never trade correctness for speed without telling me.
Evals
When you want to know how good the agent's outputs actually are.
Act as an evaluation engineer. Build a small eval set:
1. Write 10 realistic test inputs (3 tricky, 1 that should be refused).
2. Write expected behavior in one line per input.
3. Run all 10 and score: pass / partial / fail with a one-line reason.
4. Return a scorecard table and the top 3 weaknesses to fix first.
Save the eval set to evals.md for re-running after every change.
Test Suite
After DONE WHEN checks pass by hand — make them pass automatically, forever.
Act as a test engineer. Read spec.md and the code. Write automated tests that check behavior, not implementation:
Every DONE WHEN item, every user action, plus 5 hostile inputs (empty, huge, wrong type, double-click, offline).
Make the tests runnable with one command. If any test fails, that's a finding, not a reason to weaken the test.
Responsive Pass
When it looks right on your laptop and you haven't checked anything else.
Act as a mobile-first UI reviewer. Audit every page at 380px, 768px, and 1280px width.
Find: overflow, sideways scrolling, unreadable text, buttons too small for thumbs, elements that collide.
Fix what you find, then list each fix as "screen → what was wrong → what I did". Nothing may change visually at desktop unless it was already broken.
Benchmark
When you're about to claim "faster / smaller / better" and want honest numbers.
Act as a benchmark engineer. Measure the current version:
Run each measurement 5 times, report median and worst, state exactly how you measured.
Save numbers with today's date into benchmarks.md. After future changes, re-run the same procedure and append — never overwrite history.
Security Pass
Before real users or real data touch the project.
Act as a paranoid security reviewer with a short deadline. Check, in order:
Secrets in files or history, inputs trusted without validation, data that leaks somewhere public, actions that fire without confirmation, anything writable by strangers.
Return a ranked list: what, where, how bad, one-line fix. If you find a leaked secret, say REVOKE FIRST.
Accessibility Pass
Real people, including tired ones on cheap phones, will use this.
Act as an accessibility reviewer. Audit: text contrast, font sizes, tap-target sizes, missing labels on inputs and buttons, keyboard-only navigation, images without descriptions.
Fix the mechanical issues directly. List anything that needs a design decision.
Simplify
The project grew messy and changes started feeling scary.
Act as a ruthless simplifier. Behavior must not change — verify with tests (or write smoke checks first).
Hunt: dead code, duplicated logic, files that own two jobs, cleverness that needs a comment to survive.
Delete and merge until every file has one purpose. Return a before/after map: files, line counts, what moved where.
Error Handling Pass
It works when everything goes right — and users will make everything go wrong.
Act as a reliability engineer. Find every place this can fail: missing file, no internet, empty input, wrong format, service down.
Make each failure: caught, explained to the user in one plain sentence (no error codes), and safe (nothing half-saved, nothing lost).
Return the list of failure points and what each now says to the user.
UX Polish
It works, but first-time users hesitate, misclick, or ask questions.
Act as a first-time user with no patience. Walk through the main task cold and narrate: where you hesitated, what you clicked wrong, what you had to guess.
Then act as the designer: propose one fix per confusion, smallest change first. Apply fixes that are approved. Jargon in the interface counts as a bug.
Orchestration
A task too big for one session — turn it into job orders for an agent team.
Act as a technical lead. Split this goal into independent job orders, each one small enough for a single agent session: goal, files it may touch, steps, DONE WHEN, and what to report back.
Mark which orders can run in parallel and which must wait. Write them as numbered task files in a tasks/ folder. Do not start executing — I assign them.
Handoff / Docs
End of a serious work session on a project that will outlive the session.
Create or update the project guide at summary.md: what this is, current state, how to run and verify it, the file map, how core flows work, and landmines (what breaks if changed naively).
Verify every claim against the real code — never write from memory. End with "Last updated — ".
No prompts found
Try adjusting your search or filter.