Prompt·Architecture and hidden complexity·A03
Layers that don't earn their keep
Finds extra layers of code you could delete so the code, and the agents reading it, get simpler.
Prompt
Identify abstractions that no longer earn their complexity. Find wrappers, factories, inheritance, and generic utilities that make the application harder to understand than a simpler implementation would.
- What it returns
- For each candidate: callers count, what deleting it would move where (the deletion test), and what tests would change.
- Skip it when
- Right after a cleanup of the code, or when the layer walls off an outside company's toolkit.
- Changes
- Changes nothing
- Sessions
- One session
- Tools
- Repository access only.
- Watch for
- Agents call thin adapters redundant when they exist to isolate an unstable SDK or give tests a seam.
- Also called
- Abstractions past their usefulness
Skills it uses
Related prompts
- Old design choices that now cost youPromptSeparates old design choices that now cost real time or bugs from ones that are only out of fashion.
- Simpler firstThinking promptUse it when the proposed fix adds a new setting, table or service.
- Which database objects no longer earn their keep?PromptThe list of views, functions and triggers has grown hard to reason about.
More in Architecture and hidden complexity.