Design review

From codybrom/clairvoyance · View interactive version

Design review is an AI agent skill from the GitHub repository codybrom/clairvoyance. Orchestrates a structured design review, running the other skills as a diagnostic funnel from complexity triage to a full red-flags sweep. Use when the user asks for a comprehensive or prioritized design assessment of a file, module, or PR. Not for an open-ended \"anything off here?\" or \"take a lo

How to use this skill

Skill file

Design Review Orchestrator

When invoked with $ARGUMENTS, scope the entire review to the specified target. Read the target code first, then proceed through the phases below in order. This skill orchestrates other skills from Clairvoyance (https://clairvoyance.fyi). It works best when the full collection is installed.

This skill does not replace individual lenses. It sequences them into a diagnostic funnel that moves from broad to narrow, skipping work when early phases find nothing actionable.

Diagnostic Funnel

Phase 1: Complexity Triage

Apply complexity-recognition checks against the target.

This phase determines whether the target has measurable complexity problems. If it does, subsequent phases diagnose where.

Phase 2: Structural Review

Apply these lenses to the target's module-level architecture:

Focus on the modules that Phase 1 identified as highest-complexity. If Phase 1 found nothing, scan the largest or most-connected modules.

Phase 3: Interface Review

Apply these lenses to the interfaces exposed by the modules from Phase 2:

Phase 4: Surface Review

Apply these lenses to naming and documentation:

Phase 5: Red Flags Sweep

Run the full red-flags 17-flag checklist against the target. Any flag triggered in Phases 1-4 will already be marked. This phase catches flags that earlier phases may not have surfaced (especially Process flags 15-17: No Alternatives Considered, Tactical Momentum, Catch-and-Ignore).

Early Termination

If Phase 1 finds no measurable complexity AND Phase 5 triggers zero flags, stop. Report the target as clean. Do not force findings where none exist.

Prioritization

Rank findings in this order:

  1. Syndrome clusters: Multiple flags pointing to the same root cause (e.g., information leakage + conjoined methods + repetition all stemming from one misplaced boundary). These indicate systemic issues. Fixing the root cause resolves all flags in the cluster.
  2. Boundary issues: Information leakage, module boundary problems and abstraction mismatches. These compound over time and infect adjacent code.
  3. Canary flags: Hard to Pick Name, Hard to Describe, Non-obvious Code, No Alternatives Considered. These are the cheapest signals. Catch them and the structural flags never materialize.
  4. Structural issues: Shallow modules, pass-through methods, classitis. These require refactoring but affect a bounded area.
  5. Surface issues: Naming and documentation problems. Important but lowest cost to fix and lowest risk if deferred.

Reviewing at Scale

The funnel above is written for one target reviewed in-conversation. When the target is an entire codebase, a large PR spanning many files, or the user asks for a "thorough" or "comprehensive" review, running it once per file in a single conversation burns context fast and serializes work that has no reason to be serial.

If Dynamic Workflows are available in this session (the user said "workflow," used the ultracode keyword, or /effort ultracode is set), build one instead of running the funnel manually file by file. See references/workflow-builder.md for how to map these five phases onto a workflow script — what fans out, what needs a barrier, and where to add adversarial verification. If workflows aren't available, fall back to running the funnel per file or module in sequence, same as a single-target review.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.