Harness design craft

From Intense-Visions/harness-engineering · View interactive version

Harness design craft is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > LLM-judgment-based design ceiling-raiser. Three branchable phases — CRITIQUE finds what's mediocre, POLISH applies high-craft moves, BENCHMARK scores against curated exemplars. The ceiling counterpa

How to use this skill

Skill file

Harness Design Craft

LLM-judgment-based design ceiling-raiser. Three branchable phases — CRITIQUE finds what's mediocre, POLISH applies high-craft moves, BENCHMARK scores against curated exemplars. The ceiling counterpart to harness-design (declared-intent enforcement, rule-based) and the design-pipeline floor audits.

When to Use

Capability Roles

<!-- Capability seam: this skill participates in a real extension point whose three roles are named and concrete. A seam with only one role filled is accidental single-implementation lock-in. See harness-skill-authoring Phase 1C. -->

Process

Argument Resolution

B' Precondition Check (every invocation)

Before any phase runs, check four preconditions and offer to fulfill missing ones:

| Precondition | Source | If missing |

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

| designMdExists | design-system/DESIGN.md present | Offer to chain to harness-design (INTENT + DIRECTION) |

| aestheticIntentDeclared | DESIGN.md Aesthetic Direction section populated | Offer to chain to harness-design (INTENT) |

| tokensExist | design-system/tokens.json present | Note in summary; do not auto-chain (harness-design-system territory) |

| componentRegistryPopulated | DESIGN.md Component Registry section | Note in summary; falls back to export-name resolution |

autoCapture controls behavior:

Phase: CRITIQUE — Find what is craft-mediocre

  1. Identify targets. Discover components (or pages, when scoped to pages) to critique. Apply files scoping if provided.
  1. Load critique rubrics. Read from catalog (catalog/rubrics/). 10 rubrics in v1 covering: hierarchy clarity, typography craft, motion quality, color confidence, density rhythm, restraint, polish details, copy voice, interaction craft, brand coherence. Filter by catalog.rubrics config if set.
  1. For each target × each rubric, run an LLM critique pass:
  1. Apply harness-design overlap deferral. Per design.craft.enabled = true, when a CRITIQUE finding matches a declared anti-pattern in DESIGN.md, defer to harness-design (suppress this finding) and increment meta.deferralsToHarnessDesign.
  1. Compute derived priority field for each finding (tier × impact × confidence-weighted score) for single-axis sorting when needed.

Phase: POLISH — Apply craft pattern library

  1. Load polish patterns. Read from catalog (catalog/patterns/). 15 patterns in v1 across 5 categories: motion (3), skeleton (3), typography (3), interaction (3), layout (3). Filter by catalog.patterns config if set.
  1. For each target × each applicable pattern, evaluate fit:
  1. No source modification. POLISH only emits suggestions with before/after sketches. The user applies via codemod tools or by hand.

Phase: BENCHMARK — Score against curated exemplars

  1. Load exemplar corpus. Read from catalog (catalog/exemplars/). 50 exemplars in v1 across 5 component types (EmptyState, LoadingState, ErrorState, Modal, Button — 10 each). Filter by catalog.exemplars config if set.
  1. For each target component, identify matching exemplars by component-type tag (e.g., target is an EmptyState → load all 10 EmptyState exemplars).
  1. For each target × matching exemplars, run an LLM benchmark pass:
  1. Cite exemplars used. Each BenchmarkScore lists exemplars (ids) consulted. Increment per-exemplar citationCount for measurement.
  1. Derive the award-tier verdict (machine-computed, not LLM-emitted). Each BenchmarkScore carries an awardBar verdict — cleared, not-cleared, or indeterminate — derived in code from the radar plus the cited exemplars' reference scores, never emitted by the LLM. The bar is per-dimension: each dimension must reach max(dimensionFloor, round(fraction × median(cited-exemplar references))). Any dimension whose confidence falls below the confidence floor forces indeterminate — a score the model is unsure about never certifies award tier. Tunable via design.craft.benchmark.awardBar (dimensionFloor default 80, fraction default 0.95, confidenceFloor default medium).

> Scope: the aesthetic radar certifies desktop craft. Mobile/responsive behavior is enforced separately by the responsive gate (next step), which can veto cleared.

  1. Apply the responsive gate (mechanical, ADR 0085). awardBar.responsive is a machine gate over mobile layout metrics: a horizontal-overflow or unreachable-nav (no visible nav AND no menu toggle) defect makes it defective and vetoes cleared → not-cleared, regardless of the aesthetic score. Supply per-target layout metrics via responsiveMetrics (e.g. from a Playwright MCP run) or a responsiveProbeCommand — a render step that prints a ResponsiveMetrics[] JSON manifest (the CLI ships no browser; a screenshot is insufficient — the gate needs scrollWidth / nav visibility). With no metrics the gate is not-evaluated and the aesthetic verdict stands; set design.craft.benchmark.awardBar.responsive.require to force indeterminate instead of a mobile-blind cleared.

Phase: REPORT — Format and persist outputs

  1. Write to graph: CRITIQUE/POLISH findings → VIOLATES_CRAFT edges via extended DesignConstraintAdapter. BENCHMARK scores → CRAFT_SCORE nodes attached to component nodes. All carry runId for check-design verifier fixpoint detection. Idempotent.
  1. Format markdown report. Grouped by component, with CRAFT-* codes linked to finding-codes.md and rubric/pattern/exemplar names linked to their catalog entries. Low-confidence findings visually distinguished (italic or (low confidence:) prefix).
  1. Emit summary. Total findings, breakdown by phase, mode (fast/deep), LLM cost (llmCalls.{count, costUsd}), catalog applied, deferrals to harness-design, precondition state.
  1. Signal feedback. Append to running aggregate: when the same finding-shape recurs N≥5 times across audits (config: design.craft.signal.proposalThreshold), emit a candidate pattern proposal to .harness/design-craft/proposals/.

Harness Integration

Invoked as a review hook

harness-design-craft auto-activates as an advisory review hook whenever a diff touches the surface it

owns — harness-autopilot at after:REVIEW / after:FINAL_REVIEW, and harness-code-review at

after:mechanical. The domain table is CRAFT_REVIEW_DOMAINS and the per-host events are

CRAFT_REVIEW_EVENTS_BY_HOST, both in packages/core/src/hooks/craft-review-hooks.ts. The host

forwards the subset of the diff this domain owns:

reads it from plan.files["harness-design-craft"], which holds repo-relative POSIX paths, and resolves each

entry against the project root before calling mcp__harness__design_craft. Forwarded unresolved,

this domain does NOT quietly collect nothing: it has no collector, readSource resolves a

relative entry against the process CWD, and runCritique has no try/catch — so the call **throws

ENOENT** and the review loses the opinion loudly. Absolute paths are REQUIRED here. (The other

nine craft domains differ: each has a collector that resolves a relative entry against the

tool's path, so for them absolute is recommended rather than required; collected does not

appear in design-craft at all. Both halves of this domain's behaviour — absolute reads, relative

throws — are pinned by packages/cli/tests/design-craft/phases/files-path-form.test.ts.)

Findings from a hook-triggered run are advisory: reported, never blocking, never counted toward

review severity, and never entered into a host's mechanical exclusion set. A hook-triggered run

that fails is a missing opinion, not a broken gate.

Success Criteria

See docs/changes/design-pipeline/design-craft-elevator/proposal.md for the full 38 success criteria. Highlights:

Rationalizations to Reject

These are common rationalizations that sound reasonable but lead to incorrect results. When you catch yourself thinking any of these, stop and follow the documented process instead.

| Rationalization | Why It Is Wrong |

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

| "The screenshot looks stunning, so I will certify this component award-tier / cleared." | The awardBar verdict is machine-computed in code from the radar plus the cited exemplars' reference scores — never LLM-asserted. And the mechanical responsive gate can veto a strong aesthetic score to not-cleared. You emit dimension scores; the referee derives the verdict. |

| "The model is only medium-confident on craftExecution, but the visual is clearly strong, so I will upgrade it." | Any dimension whose confidence falls below the confidence floor forces indeterminate by design — a score the model is unsure about must never certify award tier. Silently upgrading confidence defeats the honesty the 3-axis output exists to preserve. |

| "POLISH found a better spring curve, so I will apply the codemod to the component." | POLISH emits before/after sketches only (fix kind: codemod-todo); it never modifies source. Applying the change yourself violates the no-autofix gate — the user applies via their own tools. |

| "No DESIGN.md aesthetic intent is declared, so I will skip this component." | The B' check degrades to generic-craft rubrics (or offers to chain to harness-design) — it never skips. Running with generic rubrics and noting the degraded quality is the documented fallback; abstaining abandons the ceiling role. |

| "This CRITIQUE finding matches a declared anti-pattern in DESIGN.md, but it is worth restating for emphasis." | When design.craft.enabled and DESIGN.md declares the matching anti-pattern, defer to harness-design and suppress the finding (increment deferralsToHarnessDesign). Restating double-counts what the rule-based floor already owns. |

Examples

Example: CRITIQUE finds hierarchy muddiness

Input: A Dashboard.tsx page rendering three CTA buttons, all using the same variant="primary".

Output (3-axis finding):

CRAFT-C001 [foundational | medium | high] Hierarchy muddy: three buttons compete for primary
  File:        src/pages/Dashboard.tsx:88
  Rubric:      hierarchy-clarity (rubric-hierarchy-clarity)
  Tier:        foundational  (this is "fix to be not-broken," not polish)
  Impact:      medium        (users can still complete tasks, but decision fatigue is real)
  Confidence:  high          (rule is unambiguous; LLM saw the three buttons + their identical styling)
  Priority:    derived → 0.78
  Message:     Three primary-variant buttons in the same view: "Save", "Export", "Share".
               No visual signal indicates which is the recommended action. Reduce to one
               primary; demote the others to secondary or ghost variant.
  Cite:        rubric "hierarchy-clarity" / source: huashu-design#hierarchy

Example: POLISH suggests spring physics

Input: A Modal.tsx using transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1).

Output (3-axis finding with before/after):

CRAFT-P001 [polish | medium | high] Spring physics would feel more confident here
  File:        src/components/Modal.tsx:42
  Pattern:     spring-physics-microinteraction
  Tier:        polish        (Modal already works; this elevates the feel)
  Impact:      medium        (users notice modal motion every time)
  Before:      transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  After:       transition: transform { duration: spring.medium };
               // stiffness:200 damping:25 for modal entries per emil-design-eng#spring-physics
  Fix kind:    codemod-todo (POLISH does not modify source; suggestion only)

Example: BENCHMARK against Linear

Input: A custom EmptyState component for the project's task list.

Output (5-dim radar):

CRAFT-B001 EmptyState component scored against Linear empty list exemplar

  philosophicalCoherence: 80 [high]   "Restraint aligns with declared minimal aesthetic."
  hierarchy:              65 [medium] "Heading and body OK; action button competes
                                       with secondary 'Learn more' link."
  craftExecution:         55 [medium] "Generic illustration; Linear uses subtle line art
                                       matching their monochromatic palette. Missing the
                                       'breathing room' Linear gets via 64px vertical padding."
  function:               85 [high]   "Action is clear and verb-led."
  innovation:             50 [low]    "Standard 4-part anatomy; not differentiated."

  Overall: 67  [medium confidence]
  Gaps:
    - "Reduce the empty-state to one CTA — the secondary link adds noise"
    - "Replace stock illustration with a custom line art aligned to brand"
    - "Increase top padding from 32px to 56px+ to match the breathing-room pattern"
  Exemplars cited: exemplar-linear-empty-list

Gates

Escalation

Status

v1 — in implementation. See:

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.