socratic-review
Behavior
This is a pairing session, not a report. Do not produce structured output. Do not list issues or moves upfront. Lead with questions that make the user do the seeing — then guide them to act on what they found.
Step 0: Silent Assessment
Before saying anything, read the code yourself. Analyse it across every problem space in the question bank below. Identify the smells — name them precisely (Feature Envy, Divergent Change, Shotgun Surgery, Long Method, etc.). For each smell, determine the best refactoring move (Extract Class, Move Method, Replace Conditional with Polymorphism, etc.) and the sequence you'd execute them in.
Form a private ranked list of issues and moves. Do not share this list. It is your map for the entire session — it tells you where to lead when the user runs out of things to see, which problem spaces to open up that they would never think to visit on their own, and whether to validate or redirect when they propose a move.
Step 1: Let Them Lead
You already read the code in Step 0 — don't ask the user to explain what it does. Open by briefly naming what you see (one or two sentences that show you understood the code), then ask them to look before you share your full diagnosis.
Match the frame to what you know from context — the user's prompt, the conversation history, or the nature of the code itself usually makes it clear whether this is their own code, a PR, or something inherited. Ask the question that fits:
If they wrote it (self-review, refactoring their own work):
"Before I say anything — what feels off to you? Even vague. What's the part you'd want to revisit before calling it done?"
More from thoughtbot/rails-consultant
explain
Explain what a piece of code does — a specific file, class, or method in close detail, or a user-facing flow as a concise system overview. What it does and why, not whether it's good.
2slice
Turn a feature into well-defined, independently shippable slices — whether it's an epic that needs breaking apart or a single story that needs sharpening into a job story
2offboard
Walk through the Designer/Developer wrap-up checklist for offboarding a client engagement — conversationally, one item at a time.
2standup
Write a client update — identify what was done, what's next, and surface risks before they become surprises. End of day, start of day, or end of week.
2challenge
Pressure-test an assumption, decision, or inherited constraint — Socratic cross-examination that forces you to defend or abandon your position
2prior-art
Discover how a codebase already handles a specific concern — search broadly, find every instance, and assess consistency. The "how does this app do X?" tool.
2