/doctrine:improve-codebase-architecturefrom doctrine
Scans a codebase for architectural friction, classifies findings by technical debt quadrant (deliberate/inadvertent, prudent/reckless), and prioritizes deepening opportunities.
Ships in doctrine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Not every rough edge is the same kind of problem. This skill's defining constraint, from Martin Fowler's technical debt quadrant: every finding is classified on two axes before it's prioritized: deliberate vs. inadvertent (was the tradeoff known at the time) and prudent vs. reckless (was it a reasoned tradeoff or a corner cut under pressure). A knowingly-accepted tradeoff and an accidental mistake call for different responses even when the resulting code looks identical.
This skill finds what's shallow; codebase-design supplies the vocabulary (module, interface, depth, seam) for describing why, and the deletion test in Phase 2 is this skill's own. Use that skill's terms exactly rather than drifting into generic words like "component" or "service."
Decide where to look before looking everywhere, scanning a whole codebase uniformly dilutes attention across places that don't need it:
Read any existing domain glossary or ADRs covering the scoped area first, so findings don't re-litigate a decision already made deliberately.
Walk the scoped code looking for Ousterhout-style red flags (see codebase-design for the full vocabulary):
For each candidate, apply the deletion test: would removing it concentrate the complexity somewhere sensible, or just relocate the same mess? Only "concentrates" candidates are worth writing up.
For each finding, place it in Fowler's quadrant before deciding what to recommend:
| Prudent | Reckless | |
|---|---|---|
| Deliberate | Accepted knowingly, for a reason: check first whether an ADR already documents why. If so, this may not be a finding at all; only surface it if the friction now outweighs the original reason. | Cut knowingly, for speed, without reasoning through the cost. Flag directly: this is the case most worth revisiting. |
| Inadvertent | A better approach was learned after the fact; normal to accumulate as understanding grows. Prioritize by current cost, not by fault. | A mistake made without the knowledge to avoid it at the time. Worth fixing, but don't frame it as blame: the point is the code's current state, not who wrote it. |
A Deliberate/Prudent finding that still has a live ADR usually isn't a finding; skip it unless the original tradeoff has genuinely stopped paying off. The other three quadrants are real candidates, but the framing of the recommendation differs by quadrant, not just the priority.
For each surfaced candidate, state:
codebase-design terms.Order candidates by leave-cost, not by how easy the fix is; an easy fix for a low-cost problem is not more urgent than a harder fix for a problem actively slowing the team down. Write the findings without em dashes, using a comma, colon, period, or a reworded sentence instead.
Once the user picks a candidate to act on (or explicitly declines one with a load-bearing reason):
domain-modeling, so the next scan doesn't re-surface the same already-settled question.codebase-design's design-it-twice practice before committing to one interface, rather than taking the first shape that comes to mind.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aethrox/doctrine --plugin doctrine34 skills in this plugin
/api-design-standardsAPI design discipline grounded in the Microsoft/Google REST guidelines, resource and URL conventions, a chosen versioning strategy, what counts as a backward-compatible vs breaking change, and consumer-driven contract testing. Use when designing a new API endpoint, changing an existing API's request/response shape, deciding how to version an API, or asking whether a change to a public interface is breaking./architecture-diagramProduce a software architecture diagram at the right level of zoom, using diagram as code so it can be shown inline, saved, or committed as the user or active workflow authorizes. Use when the user wants to draw, extract, or visualize a project's architecture, a component or request flow, a data flow, or a decision path a design principle hinges on./Other plugins' skills for the same job