Harness design

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

Harness design is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Aesthetic direction workflow. Capture design intent, generate DESIGN.md with anti-patterns and platform notes, review components against aesthetic guidelines, and enforce design constraints at confi

How to use this skill

Skill file

Harness Design

Aesthetic direction workflow. Capture design intent, generate DESIGN.md with anti-patterns and platform notes, review components against aesthetic guidelines, and enforce design constraints at configurable strictness levels.

When to Use

Process

Phase 1: INTENT -- Capture Aesthetic Intent

  1. Read existing design artifacts. Search for:
  1. Check harness configuration. Read harness.config.json for:
  1. Load industry profile. If an industry is specified (via CLI --industry arg or config), read the industry profile from agents/skills/shared/design-knowledge/industries/{industry}.yaml. Available industries include: saas, fintech, healthcare, ecommerce, creative, emerging-tech, lifestyle, services. The profile provides sector-specific guidance on:
  1. Capture user intent. Ask the user to define:
  1. Load shared design knowledge. Read anti-pattern awareness from agents/skills/shared/design-knowledge/:
  1. Confirm intent before proceeding. Present a summary of the captured aesthetic intent to the user. This is a hard gate -- no DESIGN.md generation without the user confirming their aesthetic intent.

Phase 2: DIRECTION -- Generate DESIGN.md

  1. Generate or update design-system/DESIGN.md. The document must contain the following sections:

Aesthetic Direction:

Anti-Patterns:

Platform Notes:

Strictness Override:

  1. Populate the knowledge graph. If a graph exists at .harness/graph/:
  1. Run harness validate. After generating DESIGN.md, verify the project still passes all constraints. The new file must not break existing validations.

Phase 3: REVIEW -- Review Components Against Design Intent

  1. Scan for anti-pattern violations. Use Grep to search the codebase for patterns that match declared anti-patterns:
  1. Load detection rules from shared design knowledge. Read from agents/skills/shared/design-knowledge/:
  1. Cross-reference with graph constraints. If a graph exists at .harness/graph/:
  1. Assign severity based on designStrictness:
  1. Report findings. Present each finding with:

Phase 4: ENFORCE -- Surface and Record Violations

  1. Create constraint nodes in the graph. For each violated design rule, if a graph exists at .harness/graph/:
  1. Format violation output. Each violation follows a numbered format:

```

DESIGN-001 [warn] Anti-pattern: gradient used on data visualization element

File: src/components/Chart.tsx

Line: 42

Constraint: No gradients on data elements

Intent: Style "minimal" prohibits decorative effects on informational components

Fix: Replace linear-gradient with solid color from token "neutral.100"

DESIGN-002 [error] Off-brand color: hardcoded #ff6b35 not in token set

File: src/components/Alert.tsx

Line: 18

Constraint: All colors must reference design tokens

Intent: Tone "cool" conflicts with warm orange accent

Fix: Use token "semantic.warning" (#f59e0b) or add color to tokens.json via harness-design-system

DESIGN-003 [info] Typography: decorative font "Playfair Display" used in component

File: src/components/Hero.tsx

Line: 8

Constraint: Heading font must match declared typography pairing

Intent: Style "minimal" uses Inter for all headings

Fix: Replace with token "typography.heading.fontFamily"

```

  1. Control severity by designStrictness:
  1. Run harness validate. After recording violations in the graph, run validation to ensure the enforcement pass is consistent with the project state.

Harness Integration

Graph naming convention: This skill uses PascalCase for node types (AestheticIntent, DesignToken, DesignConstraint) and UPPER_SNAKE for edge types (DECLARES_INTENT, VIOLATES_DESIGN, USES_TOKEN, PLATFORM_BINDING) as conceptual labels. The graph schema registers these as snake_case identifiers (aesthetic_intent, design_token, design_constraint, declares_intent, violates_design, uses_token, platform_binding). The adapter classes (DesignIngestor, DesignConstraintAdapter) handle the mapping — always use the adapters rather than constructing graph queries with raw type names.

Success Criteria

Examples

Example: SaaS Analytics Dashboard Aesthetic Direction

Context: A SaaS analytics dashboard project. Industry: saas. Design tokens already generated by harness-design-system. No existing DESIGN.md aesthetic direction.

INTENT capture:

Industry profile:     Loaded (saas) -- recommends professional, data-focused aesthetic
Style:                Minimal
Tone:                 Cool, professional
Differentiator:       Dense information display with generous whitespace between sections
Anti-patterns:        No gradients on data elements, no decorative borders on cards,
                      no more than 2 font weights per component
Strictness:           standard (from harness.config.json)

DIRECTION output (DESIGN.md excerpt):

## Aesthetic Direction

**Style:** Minimal -- clean lines, flat surfaces, no decorative elements that do not serve
an informational purpose. Every visual element must earn its place by conveying data or
guiding the user's eye.

**Tone:** Cool, professional -- slate and blue palette dominates. Warm colors reserved
exclusively for semantic states (warning, error). No warm accents in neutral UI.

**Differentiator:** Dense information display with generous whitespace between sections.
Components are compact internally but breathe externally. Card padding is tight (12px),
but gaps between cards are generous (24px+).

## Anti-Patterns

| Pattern                    | Description                                  | Why It Conflicts                           |
| -------------------------- | -------------------------------------------- | ------------------------------------------ |
| Gradients on data elements | linear-gradient on charts, tables, cards     | Minimal style: flat surfaces only          |
| Decorative card borders    | border with color on .card elements          | Minimal style: borders are structural only |
| Excess font weights        | More than 2 font-weight values per component | Minimal style: typographic restraint       |

## Strictness Override

Current level: **standard**

To change, update `harness.config.json`:
"design": { "strictness": "strict" | "standard" | "permissive" }

REVIEW findings:

Found 3 anti-pattern violations in 2 files:

DESIGN-001 [warn] Gradient on data element
  File:       src/components/RevenueChart.tsx:42
  Constraint: No gradients on data elements
  Fix:        Replace linear-gradient(#3b82f6, #1d4ed8) with solid token "primary.500"

DESIGN-002 [warn] Decorative border on card
  File:       src/components/MetricCard.tsx:15
  Constraint: No decorative borders on cards
  Fix:        Remove border-color: #3b82f6, use border-color: transparent or remove border

DESIGN-003 [info] Three font weights in one component
  File:       src/components/MetricCard.tsx:8
  Constraint: Max 2 font weights per component
  Fix:        Consolidate font-weight values to 400 (body) and 600 (heading) only

Rationalizations to Reject

| Rationalization | Reality |

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

| "The tokens are already defined, so the aesthetic intent is obvious — I can infer it and skip Phase 1." | Tokens define values, not intent. The style, tone, and differentiator exist in the designer's head, not in a color ramp. DESIGN.md cannot be generated without explicit confirmation. |

| "There are only 3 violations and they're minor — I'll skip recording them in the graph to save time." | Unrecorded violations are invisible to every downstream skill. harness-impact-analysis and harness-accessibility rely on VIOLATES_DESIGN edges existing. Skip graph writes and the enforcement record is permanently incomplete. |

| "The strictness level isn't set in config, so I'll just use strict to be safe." | Defaulting to strict without reading config imposes blocking CI failures the team never agreed to. Always read design.strictness and default to standard when absent — not to the most aggressive level. |

| "This anti-pattern is declared, but there are 40+ instances — it would take forever to report them all, so I'll summarize." | The REVIEW phase must report every finding with file path, line number, and severity. Summarizing hides the scope from the team and makes automated tooling miss violations. |

| "DESIGN.md already exists from a previous run, so I can skip Phase 2 and go straight to REVIEW." | An existing DESIGN.md may be outdated or missing sections. The DIRECTION phase must verify all required sections are present and current before the REVIEW phase can rely on them. |

Gates

These are hard stops. Violating any gate means the process has broken down.

Escalation

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.