Thinking prompt·Thinking prompts·M12
Deepen modules, simplify interfaces
Use it as a cleanup pass on each pull request, or on a schedule for overdue maintenance. It pushes the agent to merge duplicated code, put core logic in one place and cut lines. Shared by Chris (@_khrus) on X on 7 Nov 2026; the idea is John Ousterhout's, from A Philosophy of Software Design, and Matt Pocock pointed him to it. /improve-codebase-architecture is the longer version: a scan, a report and an interview.
Prompt
Deepen modules and simplify interfaces.
- Also called
- Deep modules (Ousterhout)
Related prompts
- /improve-codebase-architectureCommandLooks at recently busy parts of the code for modules that add little behind their interface, writes a before/after HTML report to the temp folder, then interviews you about one.
- Layers that don't earn their keepPromptFinds extra layers of code you could delete so the code, and the agents reading it, get simpler.
- Simpler firstThinking promptUse it when the proposed fix adds a new setting, table or service.
More in Thinking prompts.