Communitygithub.com

design-loop

Runs an evidence-driven design improvement loop using a real reference, a measurable teardown, an independent builder, and three fresh-context critics. Use when the user invokes /design-loop, asks to run the Design Loop or critic loop, or wants a design compared against a specific reference.

What is design-loop?

design-loop is a Claude Code agent skill that runs an evidence-driven design improvement loop using a real reference, a measurable teardown, an independent builder, and three fresh-context critics. Use when the user invokes /design-loop, asks to run the Design Loop or critic loop, or wants a design compared against a specific reference.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/PRushi00/claude-skills/tree/HEAD/design-loop

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

🎯 Design Loop — Independent Design Evaluation

Core principle: The context that creates an artifact must not be the context that judges it. A builder can explain its intentions; a critic must evaluate the rendered result.

The Design Loop is an adaptation of Matt Shumer's Gauntlet Loop. It applies the fresh-context evaluation principle to product and visual design work. The reference material supplied by the user remains the source of truth for the chosen design goal; do not claim authorship of the original Gauntlet Loop.

Mission

Improve a small, clearly defined design target until it satisfies three independent acceptance gates:

  1. Brief critic — verifies that the artifact fulfils the user's functional and communication goal.
  2. System critic — verifies adherence to the project's design system and brand constraints.
  3. Craft critic — compares the rendered artifact against the selected real-world reference using observable design mechanisms.

All three critics must independently return PASS for a piece to be accepted. A score, compliment, or builder self-assessment is not a pass.

Operating rules

  • Follow the four phases in order: Interview → Preflight → Teardown → Loop.
  • Do not implement the target during Phases 1–3.
  • Do not invent a reference, reference details, rendered evidence, critic verdicts, tool availability, or model identity.
  • Each critic must run in a fresh context with only its assigned brief and evidence. Do not provide implementation history, builder reasoning, or other critics' verdicts.
  • Critics judge the visible/rendered output, not source code. Code inspection is allowed only for a separate technical verification requested by the user; it does not replace visual evaluation.
  • Use binary verdicts: PASS or FAIL, followed by evidence and one highest-impact gap.
  • No fixed number of rounds. Stop when all gates pass, the user stops the run, or a cost/safety/technical boundary is reached.
  • Keep the scope small: default to 3–4 independently judgeable pieces.
  • Never claim a result is objectively superior beyond the evidence available. For the craft comparison, record what was compared, which output won, and why.

Phase 1 — Interview

Ask these three questions together, then stop and wait for the user's answers:

  1. What are you building, and what is the intended size or scope?
  2. What specific existing reference does this need to compete with? Provide a URL, file, or exact page/section. If no reference comes to mind, say skip.
  3. What source files should I use? For example: design-system.md, brand guidelines, product requirements, existing implementation, content, or assets.

Clarification rules

  • If the reference is vague (for example, “Apple-like”, “premium SaaS”, or “modern design”), ask once for a specific page, screen, or artifact. Explain that a concrete reference is necessary for a meaningful craft comparison.
  • If the user answers skip, propose three concrete reference candidates with one-line reasons. Do not select one silently. If the user explicitly delegates the choice, select the most demanding relevant candidate and explain the selection.
  • If the user does not know which files are relevant, proceed with the files already identified in the project after confirming their existence during Preflight.
  • Do not ask for details already supplied in the current conversation or project context.

Phase 2 — Preflight

Preflight is a verification step, not an interview. Complete it before any implementation.

2.1 Verify the reference

  • Open the exact URL or inspect the supplied file.
  • For a website, inspect the specific page and relevant responsive states where possible.
  • For video or animation, inspect an appropriate sequence of frames or a filmstrip.
  • For a document, inspect the actual rendered pages, not only extracted text.
  • If access is blocked, the page is missing, or the reference cannot be inspected properly, stop and request another reference. Do not substitute a guessed reference.

2.2 Verify output rendering

Confirm that the project's output can be rendered and inspected:

OutputRequired evidence
Website / appBrowser screenshots or equivalent rendered captures; include relevant viewport sizes
Animation / videoFrame sequence or filmstrip, plus playback inspection when available
Document / PDFRendered page images or a reliable visual preview
Other visual artifactA faithful preview of the final artifact

If no reliable rendering path exists, the Craft critic is blind. Do not run the full loop or claim craft approval. First establish a rendering path or ask the user how they want to proceed.

2.3 Verify generation tools

Identify tools the task actually needs, such as image, video, voice, browser, or document rendering. Confirm availability before relying on them. Do not assume an integration is connected merely because a tool is mentioned in a prompt.

2.4 Verify project inputs

Check the existence and readability of applicable files, including:

  • design-system.md
  • Brand guidelines or design tokens
  • Requirements / product brief
  • Existing implementation and assets

If design-system.md is missing, do not invent one. Ask the user to provide it or offer to derive a draft from explicitly supplied project files and obtain approval before using it as the system standard.

2.5 Report preflight in one block

Use this format:

PREFLIGHT
Reference: PASS | BLOCKED — [evidence]
Output rendering: PASS | BLOCKED — [method]
Required tools: PASS | MISSING — [tools]
Project inputs: PASS | MISSING — [files]
Critic visibility:
- Brief critic: READY | BLOCKED — [reason]
- System critic: READY | BLOCKED — [reason]
- Craft critic: READY | BLIND — [reason]
Decision: PROCEED | STOP

Proceed only when the required evidence is available. State clearly which critic would be blind if any evidence is missing.


Phase 3 — Reference Teardown

Inspect the reference carefully and extract 5–7 observable mechanisms into bar.md at the project root. A mechanism must be something a critic can verify by looking at the output.

Good mechanisms

  • The hero headline is approximately four times the body text size.
  • The page uses three principal type scales, with a fourth reserved for micro-labels.
  • The accent colour appears only on primary actions and selected state indicators.
  • The primary action is visible without scrolling at the target viewport.
  • Repeated cards share consistent alignment, spacing, and image ratios.
  • Section transitions use one coherent motion direction and complete within a defined duration range.
  • The first viewport dedicates roughly one-third of its area to whitespace and visual breathing room.

These are examples only. Derive the actual mechanisms from the selected reference. Do not copy example measurements unless the reference supports them.

Bad mechanisms

Avoid untestable adjectives such as:

  • “Feels premium”
  • “Clean and modern”
  • “Nice whitespace”
  • “Strong hierarchy”

Translate an adjective into visible evidence or remove it.

bar.md requirements

Include:

  1. Reference name and exact URL/file/page.
  2. Date inspected.
  3. Target viewport, playback state, or document page range.
  4. Five to seven numbered mechanisms.
  5. For each mechanism, an observable test and any measured value or clearly labelled estimate.
  6. Any reference limitations or details that could not be verified.

Show the complete bar.md to the user and obtain approval before implementation. If the user requests a correction, revise it and show the updated version.


Phase 4 — Build and Critic Loop

4.1 Decompose the target

Split the task into the smallest independently improvable pieces. Default to three or four pieces maximum. Examples:

  • Hero / first viewport
  • Primary interaction or flagship component
  • Supporting content section
  • Responsive behavior / final polish

Choose pieces based on the actual task. Avoid splitting every tiny component into its own workstream: each additional piece multiplies build and critic work.

Write the piece list to design-loop-progress.md before starting the loop.

4.2 Builder

For each piece:

  1. Prepare a focused implementation brief containing the user's goal, relevant requirements, design-system constraints, applicable bar.md mechanisms, files to modify, and acceptance conditions.
  2. Delegate implementation to a builder context or agent when the environment supports independent contexts.
  3. The builder implements the piece and reports changed files and how to render it.
  4. Render the result and capture the evidence required by the critics.
  5. Do not let the builder write or influence critic verdicts.

If isolated agents are unavailable, use separate model sessions or independent context windows where possible. Do not falsely describe ordinary sequential reasoning in one context as fresh-context evaluation. If true context isolation cannot be achieved, mark the critics as not independent and disclose the limitation.

4.3 Fresh-context critics

Run the following critics independently. Each receives only the evidence permitted by its role. The user-facing result must contain the verdict, evidence, and one biggest gap.

Critic A — Brief critic

Judges against: the user's stated goal and functional requirements only.

Must ignore: visual taste, polish, brand style, and implementation elegance unless those are explicit requirements.

Questions:

  • Does the piece do the intended job?
  • Are all required elements and states present?
  • Is the content understandable and correctly prioritized for the stated task?
  • Are there visible functional failures or missing flows in the rendered evidence?

Required output:

VERDICT: PASS | FAIL
EVIDENCE: [specific visible facts mapped to the brief]
BIGGEST GAP: [one highest-impact unmet requirement, or NONE]

Critic B — System critic

Judges against: design-system.md and any explicitly approved brand constraints only.

Must ignore: the reference teardown and the builder's implementation reasoning.

Questions:

  • Are typography, colour, spacing, components, states, iconography, and motion consistent with the design system where applicable?
  • Are there visible deviations from documented tokens or component rules?
  • Are responsive and interaction states consistent with the system?

Required output:

VERDICT: PASS | FAIL
EVIDENCE: [specific visible facts mapped to system rules]
BIGGEST GAP: [one highest-impact system violation, or NONE]

If the relevant design system is missing or does not specify a rule, do not invent the rule. Mark the critic blocked for that criterion and report the limitation.

Critic C — Craft critic

Judges against: bar.md and rendered output only.

Must not receive: source code, implementation history, builder rationale, the other critics' verdicts, or labels identifying which output is ours and which is the reference.

Blind comparison procedure:

  1. Prepare matched captures of the reference and current output at the same viewport or equivalent presentation state.
  2. Strip labels and other identifying cues where practical.
  3. Present them in a neutral order to the critic.
  4. Ask which output better satisfies the mechanisms in bar.md.
  5. Require the critic to identify the single largest observable gap using concrete evidence.
  6. Restore the identities after the verdict so the result can be recorded accurately.

Required output:

VERDICT: PASS | FAIL
COMPARISON: REFERENCE WINS | OURS WINS | TIE | NOT COMPARABLE
EVIDENCE: [specific observable differences tied to bar.md]
BIGGEST GAP: [one highest-impact craft gap, or NONE]

PASS requires the current output to meet the teardown mechanisms and win the comparison. A tie is not a pass. If the reference and output cannot be compared fairly, mark the critic blocked rather than guessing.

4.4 Verdict and rework rules

  • All three critics must return PASS for a piece to be accepted.
  • Any FAIL sends the piece back to the builder with the single biggest gap from each failing critic. Prioritize the highest-impact issue; do not overwhelm the builder with a long wish list.
  • A blocked critic is not a pass. Resolve the evidence or access problem before accepting the piece.
  • After rework, render a new capture and rerun all three critics in fresh contexts. Do not carry forward old passes after the artifact changes.
  • Keep the reference fixed for the current run unless the user explicitly changes it. If the reference changes, repeat the teardown and obtain approval for the revised bar.md.
  • Do not lower the bar merely to secure approval. Any change to scope or acceptance criteria must be explicit and approved by the user.

4.5 Whole-artifact integration check

After all pieces pass individually:

  1. Render the integrated artifact at the important target viewport(s) or pages.
  2. Check for regressions caused by integration: alignment, spacing, typography, navigation, interactions, responsive behavior, consistency, and missing content.
  3. Re-run any critic whose evidence may have been invalidated by integration.
  4. Record final status in design-loop-progress.md.

Passing isolated pieces does not automatically mean the integrated artifact passes.


Progress tracking

Maintain design-loop-progress.md in the project root. Update it after each build, render, critic round, and acceptance decision.

Use this structure:

# Design Loop Progress

## Run configuration
- Goal:
- Reference:
- Approved bar file: `bar.md`
- Started:
- Current status: INTERVIEW | PREFLIGHT | TEARDOWN | BUILDING | REVIEWING | BLOCKED | ACCEPTED | STOPPED
- User-defined cost checkpoint:
- Scope: [number of pieces]

## Piece tracker
| Piece | Status | Round | Brief | System | Craft | Current biggest gap |
|---|---|---:|---|---|---|---|
| Hero | NOT STARTED | 0 | — | — | — | — |

## Round history
### Piece: [name] — Round [n]
- Builder changes:
- Render evidence:
- Brief critic: PASS/FAIL/BLOCKED — evidence — biggest gap
- System critic: PASS/FAIL/BLOCKED — evidence — biggest gap
- Craft critic: PASS/FAIL/BLOCKED — comparison — evidence — biggest gap
- Decision: ACCEPTED | REWORK | BLOCKED

## Integration review
- Viewports/pages checked:
- Regressions:
- Final critic reruns:
- Final status:

## Stop record
- Reason:
- Remaining gaps:
- User decision, if applicable:

Do not invent elapsed time or token spend. Record elapsed time only when it can be measured reliably. Always record the number of rounds and the number of accepted pieces.


Cost and user control 💸

This workflow can be expensive because it repeats implementation and independent evaluation. Do not present a guessed token count, API bill, or model usage figure as fact.

Cost controls, in priority order

  1. User is the final brake. Pause when the user asks, when usage is uncertain, or when the run reaches a user-defined checkpoint.
  2. Limit pieces. Default to three or four pieces. Do not multiply the scope without explaining the added review workload.
  3. Use checkpoints. If the user specifies a round, time, usage, or spending ceiling, pause before exceeding it and ask for explicit authorization to continue.
  4. Avoid redundant work. Do not rebuild a passing piece unless integration or a changed requirement invalidates its evidence.
  5. Do not claim model spend visibility. If the environment does not expose reliable usage data, say so.

At a checkpoint, report:

COST CHECKPOINT
Completed pieces: X / Y
Rounds completed: N
Accepted pieces: A
Open failures: [count and biggest gaps]
Usage/cost visibility: AVAILABLE — [measured source] | NOT AVAILABLE
Next action: PAUSE — user decision required

Do not continue past a user-defined ceiling without the user's approval.


Model selection and routing

Use the model-routing capabilities actually available in the user's environment. Do not assume a model alias exists, and do not silently downgrade the Craft critic.

Recommended capability tiers:

RolePreferred capabilityRationale
Brief criticFast, reliable text reasoning modelRequirement checking; visual judgment is not central
System criticLow-cost, precise instruction-following modelMechanical design-system conformance
Craft criticStrongest available visual reasoning / vision modelMust compare rendered evidence and apply nuanced design judgment

Routing rules

  • Use the strongest available model with image/visual input for the Craft critic.
  • Never route the Craft critic to a text-only model when the task requires visual comparison.
  • If a requested model is unavailable, report the actual available options and ask the user or use the strongest available model only with explicit disclosure.
  • Do not hardcode model names into this skill. Model availability and aliases change across providers and accounts.
  • The builder and critics should be separate contexts. They may use different model tiers, but context isolation matters more than parallelism.

Safety, scope, and integrity

  • Work only within the user's authorized project and supplied assets.
  • Do not deploy, publish, spend money, purchase assets, or modify production systems unless the user explicitly authorizes that action.
  • Do not delete or overwrite existing work without preserving a recovery path or obtaining approval when the action is destructive.
  • Do not fabricate screenshots, reference measurements, test outcomes, critic identities, or model capabilities.
  • If visual evidence is inaccessible, say so and stop the affected evaluation.
  • If the user stops the run, record the current state and remaining gaps. Do not continue autonomously.

Activation and expected behavior

When the user invokes /design-loop or asks to run this method:

  1. Start Phase 1 and ask the three interview questions together.
  2. Wait for the user's response.
  3. Execute the four phases in order, respecting every stop condition.
  4. Keep bar.md and design-loop-progress.md current in the project root.
  5. Make the final report explicit about accepted pieces, remaining gaps, critic independence, render evidence, and any limitations.

Final report template

DESIGN LOOP — FINAL REPORT
Outcome: ACCEPTED | STOPPED | BLOCKED
Reference: [exact reference]
Pieces accepted: [A / N]
Total rounds: [count]
Critic isolation: VERIFIED | PARTIAL | NOT AVAILABLE
Rendered evidence: [paths or capture locations]
Remaining gaps: [list or NONE]
Cost visibility: MEASURED | NOT AVAILABLE
Notes: [integration result and material limitations]

Remember: A builder that judges its own work is grading its own homework. Fresh-context critics must evaluate the rendered artifact, and the user retains control over scope and stopping.

Related Skills