Harness i18n process

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

Harness i18n process is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Cognitive mode: **advisory-guide**. Inject i18n considerations into brainstorming, planning, and review workflows. Adapt enforcement based on project configuration — gentle prompts when unconfigured

How to use this skill

Skill file

Harness i18n Process

Cognitive mode: advisory-guide. Inject i18n considerations into brainstorming, planning, and review workflows. Adapt enforcement based on project configuration — gentle prompts when unconfigured, gate-mode validation when enabled.

When to Use

Core Principle

Make i18n impossible to forget.

This skill does not scan code or manage translations. It ensures that i18n is considered at every stage of the development process — before code is written, while it is being planned, and when it is being reviewed. It operates in two modes:

If you find yourself scanning source code for hardcoded strings, STOP. That is harness-i18n's job. This skill operates on artifacts (specs, plans, reviews), not source code.

Process

Phase 1: CHECK-CONFIG — Determine Operating Mode

  1. Read harness configuration. Check harness.config.json for the i18n block:
  1. Load context from configuration (gate mode only). When in gate mode, read:
  1. Determine the current workflow context. Identify which workflow triggered this skill:

Phase 2: INJECT — Add i18n Considerations

Prompt Mode (unconfigured or disabled)

Inject non-blocking i18n consideration prompts at the appropriate workflow point. These are suggestions, not requirements. Present them as questions the team should consider.

During brainstorming (Phase 2 EVALUATE):

Add the following consideration to the evaluation criteria:

i18n Consideration
==================
For this feature, which user-facing strings will need translation?
Consider:
- UI labels, button text, placeholder text, error messages
- Email or notification content
- API error responses shown to users
- Date, number, and currency formatting
- Text that may expand significantly in other languages (+35% for German, +60% for Finnish)
- Content that may need right-to-left layout (Arabic, Hebrew)

If this feature will be used by an international audience, consider enabling i18n:
Run `harness skill run harness-i18n-workflow` to set up translation infrastructure.

During planning (task decomposition):

Suggest adding i18n tasks to the plan:

i18n Tasks to Consider
======================
If this feature includes user-facing strings, consider adding these tasks:
- [ ] Extract user-facing strings into translation keys
- [ ] Update translation files for all target locales
- [ ] Run pseudo-locale testing to check for text overflow and truncation
- [ ] Verify date/number/currency formatting uses locale-aware APIs
- [ ] Test RTL layout if targeting RTL locales

During code review:

Add i18n items to the review checklist:

i18n Review Checklist
=====================
- [ ] No new hardcoded user-facing strings (should use translation keys)
- [ ] Date/number/currency formatting uses Intl APIs or framework equivalents
- [ ] No string concatenation for user-facing messages (use interpolation)
- [ ] New UI elements have adequate space for text expansion
- [ ] lang and dir attributes are set appropriately
Gate Mode (i18n.enabled: true)

Validate that the artifact under review addresses i18n requirements. The enforcement level depends on i18n.strictness.

During brainstorming (Phase 2 EVALUATE):

Check whether the feature evaluation discusses locale considerations. If the feature involves user-facing content and does not mention i18n:

When target locales are configured, provide specific guidance based on locale profiles from agents/skills/shared/i18n-knowledge/locales/:

During planning (task decomposition):

Validate that the plan includes i18n-related tasks for features that touch user-facing content. Check for:

If missing:

During code review:

Validate that the review artifact addresses i18n considerations. Do NOT scan source code directly — that is harness-i18n's responsibility. Instead, check the review context:

If the review does not address i18n for a user-facing change:


Phase 3: VALIDATE — Verify i18n Was Addressed

After the inject phase, verify that the output artifact addresses i18n.

For Specs (brainstorming output)

Check the spec document for i18n coverage:

Gate mode enforcement:

For Plans (planning output)

Check the plan document for i18n tasks:

Gate mode enforcement:

For Reviews (code review output)

Check the review output:

Gate mode enforcement:

Validation Report

Output a summary of the i18n validation:

i18n Process Validation
=======================
Mode:           gate (standard)
Workflow:        planning
Artifact:        docs/changes/checkout-redesign/plans/2026-03-20-checkout-redesign-plan.md

Checks:
[PASS] Plan contains i18n-related task (Task 7: "Extract checkout strings")
[PASS] Plan includes translation file update task (Task 8: "Update locale files")
[WARN] Plan does not include pseudo-locale testing task

Result: PASS with warnings

Harness Integration

Success Criteria

Examples

Example 1: Prompt Mode During Brainstorming (Unconfigured Project)

Context: Team is brainstorming a new checkout flow. Project has no i18n configuration.

Phase 1: CHECK-CONFIG

No i18n block found in harness.config.json. Entering prompt mode.

Phase 2: INJECT (brainstorming EVALUATE)

i18n Consideration
==================
For the checkout flow, which user-facing strings will need translation?
Consider:
- Payment form labels ("Card number", "Expiry date", "CVV")
- Error messages ("Invalid card number", "Payment declined")
- Order summary text ("Subtotal", "Tax", "Total")
- Currency formatting (not all locales use $ or decimal points)
- Address form fields (vary significantly by country)

If this feature will be used by an international audience, consider enabling i18n:
Run `harness skill run harness-i18n-workflow` to set up translation infrastructure.

Phase 3: VALIDATE

i18n Process Validation
=======================
Mode:           prompt (unconfigured)
Workflow:        brainstorming
Result:         Suggestion provided (non-blocking)

Example 2: Gate Mode During Planning (Configured Project, Standard Strictness)

Context: E-commerce project with i18n enabled, targeting es, fr, de, ja, ar. Planning a new product review feature.

Phase 1: CHECK-CONFIG

i18n config loaded:
  enabled: true
  strictness: standard
  targetLocales: [es, fr, de, ja, ar]
  platforms: [web]
  industry: ecommerce
Entering gate mode (standard).

Phase 2: INJECT (planning task decomposition)

Scanning plan for i18n tasks... Found 0 i18n-related tasks in the plan.

[WARN] i18n Tasks Missing
=========================
This plan covers a user-facing feature (product reviews) but includes no i18n tasks.
Your project targets 5 locales: es, fr, de, ja, ar.

Required i18n tasks for this feature:
- Extract review form labels and messages into translation keys
- Update translation files for es, fr, de, ja, ar
- Verify RTL layout for Arabic locale (review cards, rating display, text input)
- Test text expansion for German (+35%) on review form labels
- Add pseudo-locale testing for overflow detection

Industry note (ecommerce): Product reviews often contain user-generated content.
Ensure the review display component handles mixed-direction text (user reviews
in Arabic within an English UI, or vice versa).

Phase 3: VALIDATE

i18n Process Validation
=======================
Mode:           gate (standard)
Workflow:        planning
Artifact:        docs/changes/product-reviews/plans/2026-03-20-product-reviews-plan.md

Checks:
[FAIL] No i18n-related tasks found in plan
[FAIL] No translation file update tasks
[FAIL] No locale testing tasks

Result: WARNING -- plan should include i18n tasks before execution

Example 3: Gate Mode During Review (Configured Project, Strict)

Context: SaaS project with strictness: "strict". Reviewing a PR that adds a new settings page.

Phase 1: CHECK-CONFIG

Entering gate mode (strict).

Phase 2: INJECT (code review)

i18n Review Validation
======================
Checking review context for i18n coverage...

PR: "Add settings page" (#142)
Changed files: src/components/Settings.tsx, src/components/SettingsForm.tsx
PR description mentions: new UI components, form fields, toast notifications

i18n review status:
  - PR description does not mention i18n impact: MISSING
  - harness-i18n scan not referenced in review: MISSING
  - Review checklist does not include i18n items: MISSING

[ERROR] PR touches user-facing code and i18n review is required.
Run `harness-i18n` on the changed files before merging.
Recommended: harness skill run harness-i18n --scope file --path src/components/Settings.tsx src/components/SettingsForm.tsx

Phase 3: VALIDATE

i18n Process Validation
=======================
Mode:           gate (strict)
Workflow:        review
Result:         BLOCKED -- i18n review not conducted for user-facing PR
Action:         Run harness-i18n scan on changed files, address findings, then re-review

Rationalizations to Reject

| Rationalization | Reality |

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

| "I can see hardcoded strings in the component the user is discussing — I'll flag them now as part of the process review." | This skill operates on artifacts (specs, plans, review context), never on source code. Scanning source files is harness-i18n's responsibility. Running Grep on component files from within this skill violates the skill boundary, regardless of how convenient it seems. |

| "The feature clearly has no user-facing strings — it's a background job. I'll skip injection entirely without checking." | The skill must assess whether injection is applicable before skipping. Background jobs can produce user-facing output via notifications, emails, and error responses. A deliberate "not applicable" decision requires reading the feature description, not assuming. |

| "The team is in prompt mode and has dismissed the suggestion twice — I'll escalate to gate mode enforcement to make sure they take i18n seriously." | Escalating to gate mode is a configuration decision the team must make explicitly. Prompt mode is always dismissible. Unilaterally enforcing gate-mode behavior overrides a team's deliberate choice and violates the skill's core operating contract. |

| "The plan has one task called 'polish and cleanup' — that probably includes i18n work. I'll mark the i18n check as passing." | In gate mode, i18n task presence must be verified by keyword match (i18n, translation, locale, localization, l10n), not inferred from vague task names. Ambiguous tasks must be flagged as missing, not assumed to cover the requirement. |

| "The spec mentions 'multi-language support' in passing — that counts as addressing i18n, so I won't require a dedicated section." | A passing mention is not an i18n section. The validation check requires the spec to identify which strings are user-facing, which locales are affected, and any formatting requirements. A vague reference satisfies none of these. |

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.