From clairvoyance
Evaluates whether code modifications maintain or degrade design quality. Guides reviewing diffs and PRs to decide if changes are designed-in or bolted-on.
How this skill is triggered — by the user, by Claude, or both
Slash command
/clairvoyance:code-evolution [file, module, or PR][file, module, or PR]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
When invoked with $ARGUMENTS, focus the analysis on the specified file, module, or pull request. Read the target code first, then apply the checks below.
When invoked with $ARGUMENTS, focus the analysis on the specified file, module, or pull request. Read the target code first, then apply the checks below.
Evaluate whether code modifications maintain or degrade design quality.
Technical debt doesn't come from catastrophic decisions. It comes from hundreds of small, reasonable shortcuts that compound silently until the codebase starts fighting back. Calling it "debt" at all is generous because the financial kind gets repaid.
Refactoring is not a special event. It is the normal expression of strategic programming applied to existing code. Continuous small improvements, not periodic large refactors.
"Ideally, when you have finished with each change, the system will have the structure it would have had if you had designed it from the start with that change in mind." — John Ousterhout, A Philosophy of Software Design
The design of a mature system is determined more by changes made during its evolution than by any initial conception. Every modifier either continues toward the original trajectory or bends away.
When the ideal refactoring would require touching far more of the codebase than the current task budget allows, the question isn't "can I afford the full redesign?" It's "what's the best I can do within this change's scope?" That question often surfaces an approach nearly as clean as the ideal, achievable within the current diff, that the smallest-change mindset would never find because it anchors on the current code.
There is no neutral gear. Every change either improves the design or degrades it.
Each minimal change typically introduces a special case, a dependency, or a conditional that doesn't belong. Once, negligible. Across hundreds of modifications over years, this is how well-designed systems become legacy nightmares.
After a modification, ask yourself:
Repeated code is a red flag that the right abstraction hasn't been found yet.
When not to extract: Code that looks identical can represent two independent decisions that happen to be expressed the same way. Merging them creates artificial coupling.
Stale comments are worse than missing comments because they actively mislead. Once readers discover comments can't be trusted, they stop reading them entirely.
Five maintenance rules:
Keep comments near the code they describe: proximity is a maintenance mechanism
Put comments in code, not commit logs: developers navigate code spatially, not chronologically
Document each decision exactly once: duplicated documentation drifts invisibly
Check the diffs before committing: verify documentation still matches behavior
Prefer higher-level comments: abstract comments that describe what and why survive code changes better than detailed how comments. As Ousterhout writes, "the farther a comment is from the code it describes, the more abstract it should be"
Red flag signals for code evolution are cataloged in red-flags (Repetition, Tactical Momentum).
npx claudepluginhub codybrom/clairvoyance --plugin clairvoyanceGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.