Design review

From xwtro0tk1t-cloud/harness · View interactive version

Design review is an AI agent skill from the GitHub repository xwtro0tk1t-cloud/harness. Dispatch an independent challenger agent to adversarially review a spec or implementation plan against the actual codebase. Catches hallucinated APIs, wrong field names, nonexistent files, and incorrect assumptions. Two modes: (1) spec review — verifies DB model fields, API paths, config attributes,

How to use this skill

Skill file

Design Review (Challenger Agent)

Overview

Specs and plans written by AI often contain hallucinations: references to APIs that don't exist, wrong column names, incorrect file paths, assumed config attributes that were never defined. These errors waste hours during implementation.

This skill dispatches an independent challenger agent that reads the spec or plan, identifies every concrete claim, and verifies each one against the actual codebase. The challenger has zero context from the authoring session — it trusts only grep, read, and the code.

Announce at start: "I'm using the design-review skill to dispatch a challenger agent for adversarial review."

When to Use

Modes

Mode 1: Spec Review — `design-review spec <path>`

Triggered after a spec is written. Verifies:

| Claim Type | Verification Method |

|-----------|-------------------|

| DB model fields mentioned in spec | grep "column_name" models.py or backend/db/models.py |

| API endpoints mentioned in spec | grep "router.*path" backend/api/ |

| Config attributes mentioned in spec | grep "get_setting.*key" backend/ |

| File paths mentioned in spec | ls / test -f to verify existence |

| Function names mentioned in spec | grep "def func_name" backend/ |

Mode 2: Plan Review — `design-review plan <path> [--spec <spec_path>]`

Triggered after a plan is written. Two verification dimensions:

Dimension 1: Technical Reference Verification (same as original plan-review)

| Claim Type | Verification Method |

|-----------|-------------------|

| Import statements | Does the module/function exist? grep "def Y\|class Y" X.py |

| Model field access | Does the column exist? Read model file |

| Function calls | Does the function exist with that signature? |

| File paths | Does the file exist? Is the name correct? |

| Config attributes | Does config have this attribute? |

| Constructor arguments | Does the model/class accept these kwargs? |

Dimension 2: Spec Coverage Verification (requires --spec parameter)

When a spec path is provided, the challenger also verifies plan ↔ spec alignment:

| Check | Method |

|-------|--------|

| Spec requirement → Plan task mapping | Every spec requirement (F1, F2, ...) must have at least one plan task covering it |

| Missing requirements | List any spec sections with NO corresponding plan task → BLOCKER |

| Partial coverage | Spec requirement mentioned in plan but implementation steps incomplete → WARNING |

| Extra scope | Plan tasks that don't trace to any spec requirement → WARNING (scope creep) |

Usage: design-review plan <plan_path> --spec <spec_path> or design-review plan <plan_path> (spec-only review if spec auto-detected from same date prefix)

Graph Enhancement (optional, if graph available)

If .code-review-graph/graph.db exists:

Process

1. Identify the document path and type (spec or plan)
2. If plan review → auto-detect related spec (same date prefix in docs/superpowers/specs/) or use --spec
3. Dispatch challenger agent (general-purpose, in foreground)
4. Receive findings: BLOCKERs + WARNINGs + Coverage matrix (if spec provided)
5. If BLOCKERs exist → fix inline, re-verify
6. If only WARNINGs → present to user, fix if agreed
7. Report final status

Step 1: Identify Inputs

Determine the document type and path:

Spec locations:

Plan locations:

Step 2: Dispatch Challenger Agent

Use the Agent tool:

Agent:
  description: "Adversarial design review"
  subagent_type: general-purpose
  prompt: <see challenger-prompt.md — fill [DOC_PATH], [DOC_TYPE], [SPEC_PATH]>

Critical rules:

Step 3-6: Same as plan-review

See the Process section above. Handle BLOCKERs (must fix) and WARNINGs (should fix) exactly as described in the original plan-review skill.

Severity Levels

BLOCKER (must fix before execution)

WARNING (should fix, won't crash)

Anti-Patterns

| Wrong | Right |

|-------|-------|

| Review the document yourself in the same session | Dispatch a fresh agent with zero context |

| Use superpowers:code-reviewer agent type | Use general-purpose — codebase verification |

| Only check text for readability | Verify every import, field, API against actual code |

| Trust model fields because they "sound right" | grep for the actual column definition |

| Skip spec review because "it's just a design" | Specs with wrong field names become plans with wrong field names |

Key Principle

The challenger trusts nothing from the authoring session. Every concrete reference is verified by reading the actual source.

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.