Harness ux copy

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

Harness ux copy is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Audit microcopy, error messages, and UI strings for voice/tone consistency, clarity, and actionability. Produces a structured report with specific rewrites and a project voice guide when none exists

How to use this skill

Skill file

Harness UX Copy

Audit microcopy, error messages, and UI strings for voice/tone consistency, clarity, and actionability. Produces a structured report with specific rewrites and a project voice guide when none exists.

When to Use

Process

Phase 1: DISCOVER -- Locate UI String Sources

  1. Resolve project root. Use provided path or cwd.
  1. Locate voice/tone guide. Search for VOICE.md, STYLE.md, docs/voice-guide.md, docs/tone.md, or a voice section in harness.config.json. If no guide is found, flag this as a gap and use sensible defaults (clear, concise, respectful, action-oriented).
  1. Identify string sources. Scan the project for UI text using multiple strategies:
  1. Determine audit scope. If --scope is provided, filter to the specified category. If triggered by a PR, scope to changed files only using git diff --name-only.
  1. Build string inventory. Extract all user-facing strings with their source location, category (error, label, help, onboarding, confirmation, empty-state), and surrounding context.
  1. Report discovery summary. Output the count of strings found by category and source type:

```

Discovery: 142 strings found

Errors: 23 | Labels: 48 | Help text: 31 | Onboarding: 12 | Empty states: 8 | Other: 20

Sources: 18 components, 3 string files, 2 i18n bundles

```


Phase 2: AUDIT -- Evaluate Copy Quality

  1. Check error messages against quality rules. Every error message must satisfy:
  1. Check labels and form text. Evaluate:
  1. Check voice/tone alignment. Compare strings against the voice guide (or defaults):
  1. Check empty states and onboarding. Evaluate:
  1. Check confirmation dialogs. Evaluate:
  1. Classify findings by severity:

Phase 3: GUIDE -- Produce Recommendations

  1. Generate specific rewrites. For every error and warning finding, provide:
  1. Produce consistency patches. When terminology is inconsistent (e.g., "Sign in" vs "Log in"), recommend a single canonical term and list all locations that need updating.
  1. Generate voice guide draft. If no voice guide was found in Phase 1, produce a draft VOICE.md covering:
  1. Produce error message template. Generate a reusable template for error messages:

```

[What happened]. [Why / context]. [What to do next].

Example: "We couldn't save your changes. The file may have been modified by someone else. Try refreshing the page and saving again."

```

  1. Prioritize recommendations. Order by impact: error-severity findings first, then warnings grouped by frequency (most repeated patterns first), then informational suggestions.

Phase 4: VALIDATE -- Verify Recommendations

  1. Check rewrites preserve meaning. Verify each recommended rewrite conveys the same information as the original. Flag any rewrite that changes the semantic meaning.
  1. Check i18n compatibility. If the project uses i18n:
  1. Check length constraints. Verify rewrites fit within UI constraints:
  1. Output structured report. Present findings in a format suitable for PR review:

```

UX Copy Audit: [PASS/NEEDS_ATTENTION/FAIL]

Strings audited: N

Findings: E errors, W warnings, I info

ERRORS:

[UXC-ERR-001] src/components/LoginForm.tsx:42

Current: "Invalid credentials"

Recommended: "That email and password combination didn't match. Please try again or reset your password."

Rule: error-missing-recovery-step

WARNINGS:

[UXC-WARN-001] Inconsistent terminology: "Sign in" (4 occurrences) vs "Log in" (2 occurrences)

Recommendation: Standardize on "Sign in" across all 6 locations.

```

  1. Verify voice guide completeness. If a voice guide was generated, confirm it covers all required sections and includes at least 3 examples per section.

Harness Integration

Success Criteria

Examples

Example: React Application with Vague Error Messages

Phase 1: DISCOVER
  Scanned: 34 components, 2 string files, 1 i18n bundle
  Found: 89 strings (18 errors, 32 labels, 14 help text, 25 other)
  Voice guide: not found (will generate draft)

Phase 2: AUDIT
  [UXC-ERR-001] src/components/CheckoutForm.tsx:78
    "Payment failed" -- missing context and recovery step
  [UXC-ERR-002] src/components/SignupForm.tsx:33
    "Invalid email" -- blame language, no guidance
  [UXC-WARN-001] Terminology inconsistency:
    "Shopping cart" (3 files) vs "Cart" (5 files) vs "Basket" (1 file)
  [UXC-WARN-002] src/components/EmptyOrders.tsx:12
    "No orders" -- empty state missing guidance on what to do

Phase 3: GUIDE
  Rewrite: "Payment failed" ->
    "Your payment didn't go through. Please check your card details and try again, or use a different payment method."
  Rewrite: "Invalid email" ->
    "Please enter a valid email address, like name@example.com."
  Terminology: Standardize on "Cart" (most frequent, shortest)
  Generated: VOICE.md draft with friendly-professional tone

Phase 4: VALIDATE
  All rewrites preserve original meaning: YES
  i18n interpolation variables intact: YES
  Length constraints met: 1 warning (payment rewrite exceeds toast limit, suggest truncated variant)
  Result: NEEDS_ATTENTION -- 2 errors, 2 warnings

Example: Vue.js SaaS Dashboard with Existing Voice Guide

Phase 1: DISCOVER
  Voice guide found: docs/VOICE.md (professional, empathetic, action-oriented)
  Scanned: 52 components, 4 string files
  Scope: PR diff (8 changed files, 14 new/modified strings)

Phase 2: AUDIT
  [UXC-ERR-001] src/views/Settings.vue:145
    "Error: 403 Forbidden" -- exposes HTTP status, no user context
  [UXC-WARN-001] src/views/Dashboard.vue:67
    "Click here to learn more" -- vague CTA, accessibility concern
  [UXC-INFO-001] src/components/Sidebar.vue:23
    "Organisations" -- British spelling, rest of app uses American English

Phase 3: GUIDE
  Rewrite: "Error: 403 Forbidden" ->
    "You don't have permission to change these settings. Ask your workspace admin to update your role."
  Rewrite: "Click here to learn more" ->
    "Learn how to configure integrations"
  Consistency: Standardize on American English per voice guide

Phase 4: VALIDATE
  All rewrites align with VOICE.md tone: YES
  Result: NEEDS_ATTENTION -- 1 error, 1 warning, 1 info

Example: Next.js E-commerce with i18n (next-intl)

Phase 1: DISCOVER
  i18n framework: next-intl (detected via next.config.js and messages/ directory)
  Locales: en, es, fr, de
  Scanned: messages/en.json (312 keys)
  Scope: --scope errors

Phase 2: AUDIT
  [UXC-ERR-001] messages/en.json -> errors.generic
    "Something went wrong" -- no context, no recovery
  [UXC-ERR-002] messages/en.json -> errors.network
    "Network error" -- technical, no user action
  [UXC-ERR-003] messages/en.json -> checkout.cardDeclined
    "Your card was declined" -- blame language

Phase 3: GUIDE
  Rewrite: errors.generic ->
    "Something unexpected happened on our end. Please try again, or contact support if the problem continues."
  Rewrite: errors.network ->
    "We're having trouble connecting. Please check your internet connection and try again."
  Rewrite: checkout.cardDeclined ->
    "This card couldn't be processed. Please try a different card or contact your bank."
  Note: All rewrites use {variable} interpolation compatible with next-intl

Phase 4: VALIDATE
  Interpolation variables preserved: YES (no variables in affected keys)
  Translator review needed: YES (3 keys modified, flag for es/fr/de update)
  Result: NEEDS_ATTENTION -- 3 errors requiring translator coordination

Rationalizations to Reject

| Rationalization | Reality |

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

| "There's no voice guide, but the existing strings have a consistent tone — I can infer the voice from them and skip generating VOICE.md." | Inferring voice from existing strings that may themselves have quality problems is circular. The GUIDE phase must produce a VOICE.md draft when none exists. Without a written guide, the audit has no stable reference for subsequent runs. |

| "This error message says 'Invalid credentials' — the rewrite is obvious, so I'll apply it without waiting for confirmation." | The gates require no semantic changes and no bulk changes without confirmation. Even obvious rewrites must be presented in the structured report format with the UXC-ERR code, current string, recommendation, rule, and rationale — not applied directly. |

| "The {count} interpolation variable is in the original string — my rewrite restructured the sentence so the variable moved to a different position. That's still compatible." | Rewrites must preserve interpolation variables exactly as they appear. If restructuring a sentence moves a variable to a position where the resulting translation would be grammatically wrong in target locales, the rewrite is invalid. Flag it for translator review instead. |

| "There are 8 occurrences of 'Sign in' and 3 of 'Log in' — I'll just update all 11 to 'Sign in' since that's clearly the majority term." | Terminology standardization affecting more than 5 files requires presenting the full change list and waiting for human confirmation before recommending. The majority term is a reasonable default recommendation, but the human must approve the batch. |

| "This empty state just says 'No results' — that's a warning, not an error, so I can deprioritize it and skip the rewrite." | Every warning finding requires a specific rewrite, not just a note that one is needed. The GUIDE phase produces rewrites for all error and warning findings. Skipping the rewrite for any classified finding produces an incomplete report. |

Gates

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.