@harness-engineering/cli 1.6.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/personas/documentation-maintainer.yaml +3 -1
- package/dist/agents/personas/performance-guardian.yaml +23 -0
- package/dist/agents/personas/planner.yaml +27 -0
- package/dist/agents/personas/verifier.yaml +30 -0
- package/dist/agents/skills/claude-code/align-documentation/SKILL.md +13 -0
- package/dist/agents/skills/claude-code/cleanup-dead-code/SKILL.md +25 -1
- package/dist/agents/skills/claude-code/cleanup-dead-code/skill.yaml +5 -2
- package/dist/agents/skills/claude-code/detect-doc-drift/SKILL.md +12 -0
- package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +67 -1
- package/dist/agents/skills/claude-code/enforce-architecture/skill.yaml +5 -2
- package/dist/agents/skills/claude-code/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/claude-code/harness-accessibility/skill.yaml +51 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +119 -72
- package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +4 -2
- package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +76 -4
- package/dist/agents/skills/claude-code/harness-brainstorming/skill.yaml +2 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +487 -234
- package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +15 -2
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +226 -0
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +64 -0
- package/dist/agents/skills/claude-code/harness-dependency-health/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/claude-code/harness-design/skill.yaml +53 -0
- package/dist/agents/skills/claude-code/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/claude-code/harness-design-mobile/skill.yaml +49 -0
- package/dist/agents/skills/claude-code/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/claude-code/harness-design-system/skill.yaml +50 -0
- package/dist/agents/skills/claude-code/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/claude-code/harness-design-web/skill.yaml +52 -0
- package/dist/agents/skills/claude-code/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/claude-code/harness-docs-pipeline/skill.yaml +69 -0
- package/dist/agents/skills/claude-code/harness-execution/SKILL.md +73 -8
- package/dist/agents/skills/claude-code/harness-execution/skill.yaml +1 -0
- package/dist/agents/skills/claude-code/harness-hotspot-detector/SKILL.md +32 -6
- package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/claude-code/harness-i18n/skill.yaml +54 -0
- package/dist/agents/skills/claude-code/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/claude-code/harness-i18n-process/skill.yaml +43 -0
- package/dist/agents/skills/claude-code/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/claude-code/harness-i18n-workflow/skill.yaml +53 -0
- package/dist/agents/skills/claude-code/harness-impact-analysis/SKILL.md +51 -6
- package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +35 -1
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/SKILL.md +46 -5
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-onboarding/SKILL.md +19 -1
- package/dist/agents/skills/claude-code/harness-perf/SKILL.md +37 -8
- package/dist/agents/skills/claude-code/harness-perf/skill.yaml +3 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +17 -4
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +57 -3
- package/dist/agents/skills/claude-code/harness-planning/skill.yaml +2 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +29 -9
- package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +562 -0
- package/dist/agents/skills/claude-code/harness-roadmap/skill.yaml +43 -0
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +36 -2
- package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +8 -6
- package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +48 -0
- package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-verification/SKILL.md +66 -0
- package/dist/agents/skills/claude-code/harness-verification/skill.yaml +1 -0
- package/dist/agents/skills/claude-code/harness-verify/SKILL.md +37 -0
- package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +15 -1
- package/dist/agents/skills/claude-code/validate-context-engineering/SKILL.md +12 -0
- package/dist/agents/skills/gemini-cli/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/gemini-cli/harness-accessibility/skill.yaml +51 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +119 -72
- package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +4 -2
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +226 -0
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +64 -0
- package/dist/agents/skills/gemini-cli/harness-dependency-health/SKILL.md +35 -6
- package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/gemini-cli/harness-design/skill.yaml +53 -0
- package/dist/agents/skills/gemini-cli/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/gemini-cli/harness-design-mobile/skill.yaml +49 -0
- package/dist/agents/skills/gemini-cli/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/gemini-cli/harness-design-system/skill.yaml +50 -0
- package/dist/agents/skills/gemini-cli/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/gemini-cli/harness-design-web/skill.yaml +52 -0
- package/dist/agents/skills/gemini-cli/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/gemini-cli/harness-docs-pipeline/skill.yaml +69 -0
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/SKILL.md +32 -6
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/gemini-cli/harness-i18n/skill.yaml +54 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-process/skill.yaml +43 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-workflow/skill.yaml +53 -0
- package/dist/agents/skills/gemini-cli/harness-impact-analysis/SKILL.md +51 -6
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/SKILL.md +46 -5
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +37 -8
- package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +3 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +17 -4
- package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +29 -9
- package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +562 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap/skill.yaml +43 -0
- package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +8 -6
- package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +48 -0
- package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +35 -6
- package/dist/agents/skills/node_modules/.bin/vitest +2 -2
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/color.yaml +106 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/layout.yaml +109 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/motion.yaml +109 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/typography.yaml +112 -0
- package/dist/agents/skills/shared/design-knowledge/industries/creative.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/ecommerce.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/emerging-tech.yaml +83 -0
- package/dist/agents/skills/shared/design-knowledge/industries/fintech.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/healthcare.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/lifestyle.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/saas.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/services.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/palettes/curated.yaml +234 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/android.yaml +125 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/flutter.yaml +144 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/ios.yaml +106 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/web.yaml +102 -0
- package/dist/agents/skills/shared/design-knowledge/typography/pairings.yaml +274 -0
- package/dist/agents/skills/shared/i18n-knowledge/accessibility/intersection.yaml +142 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/encoding.yaml +67 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/formatting.yaml +106 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/layout.yaml +80 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/pluralization.yaml +80 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/string-handling.yaml +106 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/android-resources.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/apple-strings.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/backend-patterns.yaml +50 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/flutter-intl.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/i18next.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/react-intl.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/vue-i18n.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/ecommerce.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/fintech.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/gaming.yaml +69 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/healthcare.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/legal.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ar.yaml +41 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/de.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/en.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/es.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/fi.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/fr.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/he.yaml +41 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/hi.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/it.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ja.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ko.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/nl.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/pl.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/pt.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ru.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/sv.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/th.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/tr.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hans.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hant.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/i18next-mcp.yaml +56 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lingo-dev.yaml +56 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lokalise.yaml +60 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/tolgee.yaml +60 -0
- package/dist/agents/skills/shared/i18n-knowledge/testing/locale-testing.yaml +107 -0
- package/dist/agents/skills/shared/i18n-knowledge/testing/pseudo-localization.yaml +86 -0
- package/dist/bin/harness.js +64 -4
- package/dist/{chunk-UDWGSL3T.js → chunk-3JWCBVUZ.js} +3 -3
- package/dist/{chunk-IUFFBBYV.js → chunk-LNI4T7R6.js} +179 -61
- package/dist/{chunk-USEYPS7F.js → chunk-SJECMKSS.js} +2250 -40
- package/dist/{dist-4MYPT3OE.js → dist-BDO5GFEM.js} +295 -14
- package/dist/{dist-RBZXXJHG.js → dist-NT3GXHQZ.js} +95 -1
- package/dist/index.d.ts +266 -7
- package/dist/index.js +7 -3
- package/dist/validate-cross-check-2OPGCGGU.js +7 -0
- package/package.json +7 -7
- package/dist/validate-cross-check-CPEPNLOD.js +0 -7
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
# Harness i18n Process
|
|
2
|
+
|
|
3
|
+
> 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.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- When `on_new_feature` triggers fire and the feature may touch user-facing strings
|
|
8
|
+
- When `on_review` triggers fire to validate i18n was considered in specs, plans, or code
|
|
9
|
+
- When brainstorming a feature that will have user-facing text, labels, messages, or notifications
|
|
10
|
+
- When planning tasks for a feature that involves UI, API responses, emails, or notifications
|
|
11
|
+
- When reviewing code changes that add or modify user-facing strings
|
|
12
|
+
- NOT for scanning code for i18n violations (use harness-i18n)
|
|
13
|
+
- NOT for setting up translation infrastructure (use harness-i18n-workflow)
|
|
14
|
+
- NOT for performing translations (use TMS tools or MCP integrations)
|
|
15
|
+
|
|
16
|
+
## Core Principle
|
|
17
|
+
|
|
18
|
+
**Make i18n impossible to forget.**
|
|
19
|
+
|
|
20
|
+
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:
|
|
21
|
+
|
|
22
|
+
- **Prompt mode** (default): Non-blocking nudges that seed i18n awareness. Used when i18n is not configured or is disabled. The goal is to make teams aware of i18n considerations without being annoying.
|
|
23
|
+
- **Gate mode** (configured): Validation that enforces i18n requirements. Used when `i18n.enabled: true` in `harness.config.json`. The strictness level (`permissive`, `standard`, `strict`) controls whether missing i18n produces informational notes, warnings, or blocking errors.
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
## Process
|
|
28
|
+
|
|
29
|
+
### Phase 1: CHECK-CONFIG — Determine Operating Mode
|
|
30
|
+
|
|
31
|
+
1. **Read harness configuration.** Check `harness.config.json` for the `i18n` block:
|
|
32
|
+
- If `i18n.enabled: true` exists: enter **gate mode**. Load `i18n.strictness` (default: `standard`).
|
|
33
|
+
- If `i18n.enabled: false` exists: enter **prompt mode** with reduced frequency. The team explicitly disabled i18n — respect that, but still nudge on obviously international features.
|
|
34
|
+
- If no `i18n` block exists: enter **prompt mode**. The team has not considered i18n yet — this is where the skill adds the most value.
|
|
35
|
+
|
|
36
|
+
2. **Load context from configuration (gate mode only).** When in gate mode, read:
|
|
37
|
+
- `i18n.targetLocales` — which locales are supported. Use this to provide specific guidance (e.g., "You are targeting Arabic — have you considered RTL layout for this feature?").
|
|
38
|
+
- `i18n.platforms` — which platforms are in scope. Only validate i18n for relevant platforms.
|
|
39
|
+
- `i18n.industry` — load industry-specific i18n guidance from `agents/skills/shared/i18n-knowledge/industries/{industry}.yaml` if configured.
|
|
40
|
+
- `i18n.strictness` — determines enforcement level:
|
|
41
|
+
- `permissive`: informational notes only, never block
|
|
42
|
+
- `standard`: warnings for missing i18n in user-facing features, do not block
|
|
43
|
+
- `strict`: errors that block progression when i18n is unaddressed
|
|
44
|
+
|
|
45
|
+
3. **Determine the current workflow context.** Identify which workflow triggered this skill:
|
|
46
|
+
- **Brainstorming** (`on_new_feature` during `harness-brainstorming`): inject during Phase 2 EVALUATE.
|
|
47
|
+
- **Planning** (`on_new_feature` during `harness-planning`): inject during task decomposition.
|
|
48
|
+
- **Review** (`on_review` during `harness-code-review` or `harness-pre-commit-review`): inject during review checklist.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### Phase 2: INJECT — Add i18n Considerations
|
|
53
|
+
|
|
54
|
+
#### Prompt Mode (unconfigured or disabled)
|
|
55
|
+
|
|
56
|
+
Inject non-blocking i18n consideration prompts at the appropriate workflow point. These are suggestions, not requirements. Present them as questions the team should consider.
|
|
57
|
+
|
|
58
|
+
**During brainstorming (Phase 2 EVALUATE):**
|
|
59
|
+
|
|
60
|
+
Add the following consideration to the evaluation criteria:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
i18n Consideration
|
|
64
|
+
==================
|
|
65
|
+
For this feature, which user-facing strings will need translation?
|
|
66
|
+
Consider:
|
|
67
|
+
- UI labels, button text, placeholder text, error messages
|
|
68
|
+
- Email or notification content
|
|
69
|
+
- API error responses shown to users
|
|
70
|
+
- Date, number, and currency formatting
|
|
71
|
+
- Text that may expand significantly in other languages (+35% for German, +60% for Finnish)
|
|
72
|
+
- Content that may need right-to-left layout (Arabic, Hebrew)
|
|
73
|
+
|
|
74
|
+
If this feature will be used by an international audience, consider enabling i18n:
|
|
75
|
+
Run `harness skill run harness-i18n-workflow` to set up translation infrastructure.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**During planning (task decomposition):**
|
|
79
|
+
|
|
80
|
+
Suggest adding i18n tasks to the plan:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
i18n Tasks to Consider
|
|
84
|
+
======================
|
|
85
|
+
If this feature includes user-facing strings, consider adding these tasks:
|
|
86
|
+
- [ ] Extract user-facing strings into translation keys
|
|
87
|
+
- [ ] Update translation files for all target locales
|
|
88
|
+
- [ ] Run pseudo-locale testing to check for text overflow and truncation
|
|
89
|
+
- [ ] Verify date/number/currency formatting uses locale-aware APIs
|
|
90
|
+
- [ ] Test RTL layout if targeting RTL locales
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**During code review:**
|
|
94
|
+
|
|
95
|
+
Add i18n items to the review checklist:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
i18n Review Checklist
|
|
99
|
+
=====================
|
|
100
|
+
- [ ] No new hardcoded user-facing strings (should use translation keys)
|
|
101
|
+
- [ ] Date/number/currency formatting uses Intl APIs or framework equivalents
|
|
102
|
+
- [ ] No string concatenation for user-facing messages (use interpolation)
|
|
103
|
+
- [ ] New UI elements have adequate space for text expansion
|
|
104
|
+
- [ ] lang and dir attributes are set appropriately
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
#### Gate Mode (i18n.enabled: true)
|
|
108
|
+
|
|
109
|
+
Validate that the artifact under review addresses i18n requirements. The enforcement level depends on `i18n.strictness`.
|
|
110
|
+
|
|
111
|
+
**During brainstorming (Phase 2 EVALUATE):**
|
|
112
|
+
|
|
113
|
+
Check whether the feature evaluation discusses locale considerations. If the feature involves user-facing content and does not mention i18n:
|
|
114
|
+
|
|
115
|
+
- `permissive`: add an informational note suggesting locale considerations
|
|
116
|
+
- `standard`: add a warning: "This feature involves user-facing strings but does not discuss i18n requirements. Consider which strings need translation and which locales are affected."
|
|
117
|
+
- `strict`: add an error: "This feature involves user-facing strings but does not address i18n. Add a locale requirements section before proceeding."
|
|
118
|
+
|
|
119
|
+
When target locales are configured, provide specific guidance based on locale profiles from `agents/skills/shared/i18n-knowledge/locales/`:
|
|
120
|
+
|
|
121
|
+
- If `ar` or `he` in target locales: "This feature needs RTL layout consideration."
|
|
122
|
+
- If `de` or `fi` in target locales: "Expect 35-60% text expansion. Verify UI can accommodate longer strings."
|
|
123
|
+
- If `ja`, `zh-Hans`, or `ko` in target locales: "CJK scripts may need different font sizing and line-break rules."
|
|
124
|
+
|
|
125
|
+
**During planning (task decomposition):**
|
|
126
|
+
|
|
127
|
+
Validate that the plan includes i18n-related tasks for features that touch user-facing content. Check for:
|
|
128
|
+
|
|
129
|
+
- At least one task mentioning string extraction, translation keys, or i18n
|
|
130
|
+
- At least one task mentioning translation file updates (if target locales exist)
|
|
131
|
+
- At least one task mentioning locale testing or pseudo-localization (if strictness is standard or strict)
|
|
132
|
+
|
|
133
|
+
If missing:
|
|
134
|
+
|
|
135
|
+
- `permissive`: note suggesting i18n tasks
|
|
136
|
+
- `standard`: warning: "Plan for a user-facing feature does not include i18n tasks. Add tasks for string extraction, translation file updates, and locale testing."
|
|
137
|
+
- `strict`: error: "Plan for a user-facing feature is missing required i18n tasks. Add at minimum: string extraction task, translation update task. Plan cannot proceed without i18n coverage."
|
|
138
|
+
|
|
139
|
+
**During code review:**
|
|
140
|
+
|
|
141
|
+
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:
|
|
142
|
+
|
|
143
|
+
- Does the PR description mention i18n impact (new strings, locale changes, formatting)?
|
|
144
|
+
- If the PR touches user-facing components (based on file paths and PR description), was `harness-i18n` run as part of the review?
|
|
145
|
+
- Does the review checklist include i18n items (hardcoded string check, locale-aware formatting)?
|
|
146
|
+
|
|
147
|
+
If the review does not address i18n for a user-facing change:
|
|
148
|
+
|
|
149
|
+
- `permissive`: informational note suggesting i18n review items
|
|
150
|
+
- `standard`: warning: "PR touches user-facing code but i18n was not addressed in the review. Recommend running `harness-i18n` on the changed files."
|
|
151
|
+
- `strict`: error: "PR touches user-facing code and i18n review is required. Run `harness-i18n` on the changed files before merging."
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### Phase 3: VALIDATE — Verify i18n Was Addressed
|
|
156
|
+
|
|
157
|
+
After the inject phase, verify that the output artifact addresses i18n.
|
|
158
|
+
|
|
159
|
+
#### For Specs (brainstorming output)
|
|
160
|
+
|
|
161
|
+
Check the spec document for i18n coverage:
|
|
162
|
+
|
|
163
|
+
- Does it contain a "Localization", "i18n", or "Internationalization" section?
|
|
164
|
+
- Does it mention which strings are user-facing?
|
|
165
|
+
- Does it mention which locales are affected?
|
|
166
|
+
- Does it mention locale-specific formatting requirements (dates, numbers, currency)?
|
|
167
|
+
|
|
168
|
+
**Gate mode enforcement:**
|
|
169
|
+
|
|
170
|
+
- `permissive`: log result, do not block
|
|
171
|
+
- `standard`: warn if missing but allow progression
|
|
172
|
+
- `strict`: block progression if the spec lacks an i18n section and the feature touches user-facing content
|
|
173
|
+
|
|
174
|
+
#### For Plans (planning output)
|
|
175
|
+
|
|
176
|
+
Check the plan document for i18n tasks:
|
|
177
|
+
|
|
178
|
+
- Does it include at least one task with i18n-related keywords (i18n, translation, locale, localization, l10n)?
|
|
179
|
+
- Do the i18n tasks cover: extraction, file updates, and testing?
|
|
180
|
+
|
|
181
|
+
**Gate mode enforcement:**
|
|
182
|
+
|
|
183
|
+
- `permissive`: log result, do not block
|
|
184
|
+
- `standard`: warn if no i18n tasks found for user-facing feature
|
|
185
|
+
- `strict`: block progression if no i18n tasks exist
|
|
186
|
+
|
|
187
|
+
#### For Reviews (code review output)
|
|
188
|
+
|
|
189
|
+
Check the review output:
|
|
190
|
+
|
|
191
|
+
- Were i18n checklist items addressed?
|
|
192
|
+
- Were any new hardcoded strings flagged?
|
|
193
|
+
- If hardcoded strings were found, were they resolved or explicitly accepted?
|
|
194
|
+
|
|
195
|
+
**Gate mode enforcement:**
|
|
196
|
+
|
|
197
|
+
- `permissive`: log result, do not block
|
|
198
|
+
- `standard`: warn if i18n checklist was not completed
|
|
199
|
+
- `strict`: block if new hardcoded strings exist without explicit acceptance
|
|
200
|
+
|
|
201
|
+
#### Validation Report
|
|
202
|
+
|
|
203
|
+
Output a summary of the i18n validation:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
i18n Process Validation
|
|
207
|
+
=======================
|
|
208
|
+
Mode: gate (standard)
|
|
209
|
+
Workflow: planning
|
|
210
|
+
Artifact: docs/plans/2026-03-20-checkout-redesign-plan.md
|
|
211
|
+
|
|
212
|
+
Checks:
|
|
213
|
+
[PASS] Plan contains i18n-related task (Task 7: "Extract checkout strings")
|
|
214
|
+
[PASS] Plan includes translation file update task (Task 8: "Update locale files")
|
|
215
|
+
[WARN] Plan does not include pseudo-locale testing task
|
|
216
|
+
|
|
217
|
+
Result: PASS with warnings
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Harness Integration
|
|
221
|
+
|
|
222
|
+
- **`harness-brainstorming`** — Injects i18n considerations during Phase 2 (EVALUATE). In prompt mode, adds a suggestion block. In gate mode, validates that locale requirements are discussed.
|
|
223
|
+
- **`harness-planning`** — Injects i18n task suggestions during task decomposition. In gate mode, validates that the plan includes i18n tasks for user-facing features.
|
|
224
|
+
- **`harness-code-review`** / **`harness-pre-commit-review`** — Adds i18n checklist items to the review. In gate mode, validates that no new hardcoded strings are introduced.
|
|
225
|
+
- **`harness-i18n`** — The process skill defers detailed code scanning to the core i18n skill. During review, the process skill does a lightweight check; the full scan is harness-i18n's responsibility.
|
|
226
|
+
- **`harness-i18n-workflow`** — The process skill recommends running the workflow skill when i18n is not yet configured. In prompt mode, it suggests `harness skill run harness-i18n-workflow` for setup.
|
|
227
|
+
- **Knowledge base** at `agents/skills/shared/i18n-knowledge/` — Locale profiles provide specific guidance for configured target locales. Industry profiles provide domain-specific i18n prompts.
|
|
228
|
+
- **`harness.config.json`** — The `i18n` block drives mode selection and enforcement level. When the config changes, the skill automatically adapts its behavior.
|
|
229
|
+
|
|
230
|
+
## Success Criteria
|
|
231
|
+
|
|
232
|
+
- When i18n is unconfigured, brainstorming/planning receive a non-blocking nudge about locale considerations
|
|
233
|
+
- When `i18n.enabled: true` and `strictness: "standard"`, specs/plans missing i18n handling produce a warning
|
|
234
|
+
- When `i18n.enabled: true` and `strictness: "strict"`, specs/plans missing i18n handling produce an error that blocks progression
|
|
235
|
+
- Prompt mode suggestions are contextual -- they reference the feature being discussed, not generic boilerplate
|
|
236
|
+
- Gate mode validation references configured target locales and their specific requirements
|
|
237
|
+
- The skill never scans source code directly -- that is harness-i18n's job
|
|
238
|
+
- `harness validate` passes after all changes
|
|
239
|
+
|
|
240
|
+
## Examples
|
|
241
|
+
|
|
242
|
+
### Example 1: Prompt Mode During Brainstorming (Unconfigured Project)
|
|
243
|
+
|
|
244
|
+
**Context:** Team is brainstorming a new checkout flow. Project has no i18n configuration.
|
|
245
|
+
|
|
246
|
+
**Phase 1: CHECK-CONFIG**
|
|
247
|
+
|
|
248
|
+
No `i18n` block found in `harness.config.json`. Entering prompt mode.
|
|
249
|
+
|
|
250
|
+
**Phase 2: INJECT (brainstorming EVALUATE)**
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
i18n Consideration
|
|
254
|
+
==================
|
|
255
|
+
For the checkout flow, which user-facing strings will need translation?
|
|
256
|
+
Consider:
|
|
257
|
+
- Payment form labels ("Card number", "Expiry date", "CVV")
|
|
258
|
+
- Error messages ("Invalid card number", "Payment declined")
|
|
259
|
+
- Order summary text ("Subtotal", "Tax", "Total")
|
|
260
|
+
- Currency formatting (not all locales use $ or decimal points)
|
|
261
|
+
- Address form fields (vary significantly by country)
|
|
262
|
+
|
|
263
|
+
If this feature will be used by an international audience, consider enabling i18n:
|
|
264
|
+
Run `harness skill run harness-i18n-workflow` to set up translation infrastructure.
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Phase 3: VALIDATE**
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
i18n Process Validation
|
|
271
|
+
=======================
|
|
272
|
+
Mode: prompt (unconfigured)
|
|
273
|
+
Workflow: brainstorming
|
|
274
|
+
Result: Suggestion provided (non-blocking)
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Example 2: Gate Mode During Planning (Configured Project, Standard Strictness)
|
|
278
|
+
|
|
279
|
+
**Context:** E-commerce project with i18n enabled, targeting es, fr, de, ja, ar. Planning a new product review feature.
|
|
280
|
+
|
|
281
|
+
**Phase 1: CHECK-CONFIG**
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
i18n config loaded:
|
|
285
|
+
enabled: true
|
|
286
|
+
strictness: standard
|
|
287
|
+
targetLocales: [es, fr, de, ja, ar]
|
|
288
|
+
platforms: [web]
|
|
289
|
+
industry: ecommerce
|
|
290
|
+
Entering gate mode (standard).
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Phase 2: INJECT (planning task decomposition)**
|
|
294
|
+
|
|
295
|
+
Scanning plan for i18n tasks... Found 0 i18n-related tasks in the plan.
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
[WARN] i18n Tasks Missing
|
|
299
|
+
=========================
|
|
300
|
+
This plan covers a user-facing feature (product reviews) but includes no i18n tasks.
|
|
301
|
+
Your project targets 5 locales: es, fr, de, ja, ar.
|
|
302
|
+
|
|
303
|
+
Required i18n tasks for this feature:
|
|
304
|
+
- Extract review form labels and messages into translation keys
|
|
305
|
+
- Update translation files for es, fr, de, ja, ar
|
|
306
|
+
- Verify RTL layout for Arabic locale (review cards, rating display, text input)
|
|
307
|
+
- Test text expansion for German (+35%) on review form labels
|
|
308
|
+
- Add pseudo-locale testing for overflow detection
|
|
309
|
+
|
|
310
|
+
Industry note (ecommerce): Product reviews often contain user-generated content.
|
|
311
|
+
Ensure the review display component handles mixed-direction text (user reviews
|
|
312
|
+
in Arabic within an English UI, or vice versa).
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Phase 3: VALIDATE**
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
i18n Process Validation
|
|
319
|
+
=======================
|
|
320
|
+
Mode: gate (standard)
|
|
321
|
+
Workflow: planning
|
|
322
|
+
Artifact: docs/plans/2026-03-20-product-reviews-plan.md
|
|
323
|
+
|
|
324
|
+
Checks:
|
|
325
|
+
[FAIL] No i18n-related tasks found in plan
|
|
326
|
+
[FAIL] No translation file update tasks
|
|
327
|
+
[FAIL] No locale testing tasks
|
|
328
|
+
|
|
329
|
+
Result: WARNING -- plan should include i18n tasks before execution
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Example 3: Gate Mode During Review (Configured Project, Strict)
|
|
333
|
+
|
|
334
|
+
**Context:** SaaS project with `strictness: "strict"`. Reviewing a PR that adds a new settings page.
|
|
335
|
+
|
|
336
|
+
**Phase 1: CHECK-CONFIG**
|
|
337
|
+
|
|
338
|
+
Entering gate mode (strict).
|
|
339
|
+
|
|
340
|
+
**Phase 2: INJECT (code review)**
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
i18n Review Validation
|
|
344
|
+
======================
|
|
345
|
+
Checking review context for i18n coverage...
|
|
346
|
+
|
|
347
|
+
PR: "Add settings page" (#142)
|
|
348
|
+
Changed files: src/components/Settings.tsx, src/components/SettingsForm.tsx
|
|
349
|
+
PR description mentions: new UI components, form fields, toast notifications
|
|
350
|
+
|
|
351
|
+
i18n review status:
|
|
352
|
+
- PR description does not mention i18n impact: MISSING
|
|
353
|
+
- harness-i18n scan not referenced in review: MISSING
|
|
354
|
+
- Review checklist does not include i18n items: MISSING
|
|
355
|
+
|
|
356
|
+
[ERROR] PR touches user-facing code and i18n review is required.
|
|
357
|
+
Run `harness-i18n` on the changed files before merging.
|
|
358
|
+
Recommended: harness skill run harness-i18n --scope file --path src/components/Settings.tsx src/components/SettingsForm.tsx
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**Phase 3: VALIDATE**
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
i18n Process Validation
|
|
365
|
+
=======================
|
|
366
|
+
Mode: gate (strict)
|
|
367
|
+
Workflow: review
|
|
368
|
+
Result: BLOCKED -- i18n review not conducted for user-facing PR
|
|
369
|
+
Action: Run harness-i18n scan on changed files, address findings, then re-review
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Gates
|
|
373
|
+
|
|
374
|
+
These are hard stops. Violating any gate means the process has broken down.
|
|
375
|
+
|
|
376
|
+
- **No source code scanning.** This skill operates on artifacts (specs, plans, review context), not source code. If you are running Grep/Glob on `.tsx` files to find hardcoded strings, STOP. That is `harness-i18n`'s job. During the review phase, check the review artifact (PR description, checklist, whether `harness-i18n` was run) — never scan the code directly.
|
|
377
|
+
- **Respect the configured mode.** If `i18n.enabled: false`, do not enforce gate-mode validation. If `i18n.enabled: true`, do not downgrade to prompt mode. The team made a configuration choice -- honor it.
|
|
378
|
+
- **Respect the configured strictness.** `permissive` never blocks. `standard` warns but does not block. `strict` blocks. Do not escalate or de-escalate the enforcement level.
|
|
379
|
+
- **Prompt mode is always dismissible.** In prompt mode, suggestions must be presented as questions or checklists the team can acknowledge and move past. Never block progression in prompt mode.
|
|
380
|
+
- **Gate mode requires specificity.** When flagging a missing i18n section or task, state exactly what is expected. "Add i18n section" is not specific enough. "Add a Localization section covering: which strings are user-facing, which locales are affected, formatting requirements" is specific.
|
|
381
|
+
|
|
382
|
+
## Escalation
|
|
383
|
+
|
|
384
|
+
- **When the feature clearly has no user-facing strings:** Skip injection. Not every feature needs i18n. Internal tooling, background jobs, data migrations, and infrastructure changes should not receive i18n prompts. Use judgment based on the feature description.
|
|
385
|
+
- **When the team repeatedly dismisses prompt-mode suggestions:** Do not escalate to gate mode. That is a configuration decision the team must make. Instead, note: "If i18n is relevant to your project, consider enabling it: run `harness skill run harness-i18n-workflow` to configure."
|
|
386
|
+
- **When gate-mode validation blocks a plan that genuinely does not need i18n:** The team can either add an explicit "i18n: not applicable -- this feature has no user-facing strings" note to the plan, or adjust `i18n.strictness` to `standard` or `permissive`.
|
|
387
|
+
- **When the spec/plan addresses i18n but not for all configured target locales:** In standard mode, warn about the gap. In strict mode, require explicit acknowledgment of which locales are deferred and why.
|
|
388
|
+
- **When industry-specific guidance conflicts with team practice:** Present the industry guidance as a recommendation, not a requirement. The team's established patterns take precedence unless strictness is set to strict.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: harness-i18n-process
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Upstream i18n process injection — inject internationalization considerations into brainstorming, planning, and review workflows with adaptive prompt-mode or gate-mode enforcement
|
|
4
|
+
cognitive_mode: advisory-guide
|
|
5
|
+
triggers:
|
|
6
|
+
- on_new_feature
|
|
7
|
+
- on_review
|
|
8
|
+
platforms:
|
|
9
|
+
- claude-code
|
|
10
|
+
- gemini-cli
|
|
11
|
+
tools:
|
|
12
|
+
- Read
|
|
13
|
+
- Glob
|
|
14
|
+
- Grep
|
|
15
|
+
cli:
|
|
16
|
+
command: harness skill run harness-i18n-process
|
|
17
|
+
args:
|
|
18
|
+
- name: path
|
|
19
|
+
description: Project root path
|
|
20
|
+
required: false
|
|
21
|
+
- name: mode
|
|
22
|
+
description: Force mode override (prompt, gate)
|
|
23
|
+
required: false
|
|
24
|
+
mcp:
|
|
25
|
+
tool: run_skill
|
|
26
|
+
input:
|
|
27
|
+
skill: harness-i18n-process
|
|
28
|
+
path: string
|
|
29
|
+
type: flexible
|
|
30
|
+
phases:
|
|
31
|
+
- name: check-config
|
|
32
|
+
description: Read harness.config.json to determine mode — gate mode when i18n.enabled is true, prompt mode when unconfigured or disabled
|
|
33
|
+
required: true
|
|
34
|
+
- name: inject
|
|
35
|
+
description: Prompt mode adds i18n consideration nudges to brainstorming/planning/review; gate mode validates specs and plans address i18n
|
|
36
|
+
required: true
|
|
37
|
+
- name: validate
|
|
38
|
+
description: Verify i18n was addressed in output artifact; in gate mode block progression if unaddressed
|
|
39
|
+
required: true
|
|
40
|
+
state:
|
|
41
|
+
persistent: false
|
|
42
|
+
files: []
|
|
43
|
+
depends_on: []
|