STOP - Read before ANY tool call
- Read
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/rules/guardrails.md
- Read
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/sdd-artifacts/SESSION.md; load session-state for $Cwd
- If the relevant gate is not approved: STOP - ask user (pt-BR) - do NOT Write/Shell
- SDD/develop skills: after ONE step/task, STOP session - handoff only
- This skill body is English; user-facing prompts may be (pt-BR)
Step -1 - Gate check (report in chat before continuing)
Gate check:
[ ] guardrails.mdc read
[ ] SESSION.md read; session-state loaded
[ ] PIPELINE.md read (SDD skills only)
[ ] User confirmed current action (sim)
-> If any unchecked: STOP
Skill: i18n-manager
Trigger
Invoke when the user requests: /i18n-manager, localize code, /i18n-manager, or asks to internationalize a component.
Arguments (optional):
| Input |
Meaning |
| Target directory |
Scopes the scan for string literals to a specific subfolder |
Outcome
- Refactored code files where raw strings are replaced by framework-native translation variables or helpers (e.g.
_localizer["Key"], t('Key')).
- Updated localization resource files (
.resx for C#, .json translation dictionaries for JavaScript/TypeScript).
Lazy-load
| When |
Path (after scripts/sync-cursor.ps1) |
| C# projects |
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/dotnet-guidelines/string-manipulation.md |
| React / Angular |
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/frontend-guidelines/frontend-practices.md |
| Caveman Mode (if active) |
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/caveman/CAVEMAN.md - Full cap |
Process
Step -1b - Caveman Mode (Full cap)
- Read
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/sdd/preferences.json (create { "caveman_mode": false, "caveman_level": "full" } if missing).
- If
caveman_mode is false: continue without compression.
- If true: load
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/caveman/CAVEMAN.md; apply Full participation cap + prefs caveman_level (Lite skills never escalate); show once: [Caveman] Modo ativo (respostas compactas, level={effective}). Digite caveman off para desativar.
- Honor
caveman on|off|status|lite|full|ultra (and stop caveman / normal mode) during the session.
- Auto-Clarity + never-compress gates/drafts/paths per
CAVEMAN.md.
-1. Re-check guardrails and session
Confirm guardrails.mdc and SESSION.md are loaded.
If missing, ask user (pt-BR):
Antes da localizacao, confirme:
- guardrails.mdc lido
- SESSION.md carregado
Posso seguir? (sim / ajustar / cancelar)
0. Frame the Context
- Identify the localization pattern used in the repository:
- Dotnet:
.resx resources with IStringLocalizer<T>.
- React:
react-i18next (useTranslation() hook, t('key')).
- Angular:
@angular/core i18n attributes or packages like ngx-translate/transloco.
- Confirm the primary language (usually English for resources) and target translation languages.
1. Scan for String Literals & Workflow Decision
- Read target files and identify raw text content in HTML tags or hardcoded string variables.
- Filter out:
- Log templates (like warning logs).
- System keys (like routing paths, config names, constants, and dictionary keys).
- Present a list of candidate strings with suggested keys (e.g.
WelcomeMessage, SubmitButtonLabel).
- Stop and ask the user to choose the workflow execution path to refactor and localize these strings:
- Option A - Direct Developer Skill (
/developer): For straightforward local string extraction and key replacements.
- Option B - Classic SDD (
/sdd-spec -> sdd-plan -> sdd-develop): For massive application-wide localization tasks requiring formal specifications (PRD) and a detailed plan (PLAN) in Portuguese.
- Option D - Plain Chat Plan: Establish a simple task list directly in the chat, executing steps one by one without extra file creations.
- Wait for explicit user choice before writing code or initializing another workflow.
2. Update Resource Bundles
- Write or append the translations to the resource files:
- JSON bundles: add key/value fields in
en.json, pt.json, etc.
- Dotnet XML: add
<data name="Key"><value>Text</value></data> nodes in target .resx files.
- Ensure keys are sorted alphabetically to prevent duplicate entries and maintain layout.
3. Code Refactoring
- Replace the hardcoded string literal in the code file with the dynamic localization call.
- Inject the localizer dependency if it is not already available (e.g. adding
private readonly IStringLocalizer<T> _localizer to C# constructor, or const { t } = useTranslation() in React component).
4. Build and Verify
- Run the project build script (
dotnet build, npm run build) to ensure that imports, injections, and variables compile correctly.
5. Handoff
- Offer committing the refactored code and resources:
/commit
Must not
- Extract string keys with generic names (like
Text1, String2).
- Mutate logger strings or database connection configurations.
1---2name: i18n-manager-23description: Extract hardcoded strings into .resx or .json localization files and replace with translation keys. Use when localizing code or invoking /i18n-manager.4---567## STOP - Read before ANY tool call891. Read `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/rules/guardrails.md`102. Read `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/sdd-artifacts/SESSION.md`; load session-state for `$Cwd`113. If the relevant gate is not approved: **STOP** - ask user **(pt-BR)** - do **NOT** Write/Shell124. SDD/develop skills: after **ONE** step/task, **STOP** session - handoff only135. This skill body is **English**; user-facing prompts may be **(pt-BR)**1415### Step -1 - Gate check (report in chat before continuing)1617```18Gate check:19[ ] guardrails.mdc read20[ ] SESSION.md read; session-state loaded21[ ] PIPELINE.md read (SDD skills only)22[ ] User confirmed current action (sim)23-> If any unchecked: STOP24```2526---2728# Skill: i18n-manager2930## Trigger3132Invoke when the user requests: `/i18n-manager`, `localize code`, `/i18n-manager`, or asks to internationalize a component.3334**Arguments (optional):**3536| Input | Meaning |37|-------|---------|38| Target directory | Scopes the scan for string literals to a specific subfolder |3940## Outcome41421. Refactored code files where raw strings are replaced by framework-native translation variables or helpers (e.g. `_localizer["Key"]`, `t('Key')`).432. Updated localization resource files (`.resx` for C#, `.json` translation dictionaries for JavaScript/TypeScript).4445## Lazy-load4647| When | Path (after `scripts/sync-cursor.ps1`) |48|------|----------------------------------------|49| C# projects | `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/dotnet-guidelines/string-manipulation.md` |50| React / Angular | `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/frontend-guidelines/frontend-practices.md` |51| Caveman Mode (if active) | `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/caveman/CAVEMAN.md` - **Full cap** |5253## Process5455### Step -1b - Caveman Mode (Full cap)561. Read `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/sdd/preferences.json` (create `{ "caveman_mode": false, "caveman_level": "full" }` if missing).572. If `caveman_mode` is false: continue without compression.583. If true: load `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/opencode/skills/_shared/caveman/CAVEMAN.md`; apply **Full** participation cap + prefs `caveman_level` (Lite skills never escalate); show once: `[Caveman] Modo ativo (respostas compactas, level={effective}). Digite caveman off para desativar.`594. Honor `caveman on|off|status|lite|full|ultra` (and `stop caveman` / `normal mode`) during the session.605. Auto-Clarity + never-compress gates/drafts/paths per `CAVEMAN.md`.6162### -1. Re-check guardrails and session6364Confirm `guardrails.mdc` and `SESSION.md` are loaded.65If missing, ask user (pt-BR):6667```text68Antes da localizacao, confirme:69- guardrails.mdc lido70- SESSION.md carregado7172Posso seguir? (sim / ajustar / cancelar)73```747576### 0. Frame the Context7778* Identify the localization pattern used in the repository:79 * Dotnet: `.resx` resources with `IStringLocalizer<T>`.80 * React: `react-i18next` (`useTranslation()` hook, `t('key')`).81 * Angular: `@angular/core` i18n attributes or packages like `ngx-translate`/`transloco`.82* Confirm the primary language (usually English for resources) and target translation languages.8384### 1. Scan for String Literals & Workflow Decision8586* Read target files and identify raw text content in HTML tags or hardcoded string variables.87* **Filter out:**88 * Log templates (like warning logs).89 * System keys (like routing paths, config names, constants, and dictionary keys).90* Present a list of candidate strings with suggested keys (e.g. `WelcomeMessage`, `SubmitButtonLabel`).91* Stop and ask the user to choose the workflow execution path to refactor and localize these strings:92 * **Option A - Direct Developer Skill (`/developer`):** For straightforward local string extraction and key replacements.93 * **Option B - Classic SDD (`/sdd-spec` -> `sdd-plan` -> `sdd-develop`):** For massive application-wide localization tasks requiring formal specifications (PRD) and a detailed plan (PLAN) in Portuguese.94 * **Option D - Plain Chat Plan:** Establish a simple task list directly in the chat, executing steps one by one without extra file creations.95* **Wait for explicit user choice** before writing code or initializing another workflow.9697### 2. Update Resource Bundles9899* Write or append the translations to the resource files:100 * JSON bundles: add key/value fields in `en.json`, `pt.json`, etc.101 * Dotnet XML: add `<data name="Key"><value>Text</value></data>` nodes in target `.resx` files.102* Ensure keys are sorted alphabetically to prevent duplicate entries and maintain layout.103104### 3. Code Refactoring105106* Replace the hardcoded string literal in the code file with the dynamic localization call.107* Inject the localizer dependency if it is not already available (e.g. adding `private readonly IStringLocalizer<T> _localizer` to C# constructor, or `const { t } = useTranslation()` in React component).108109### 4. Build and Verify110111* Run the project build script (`dotnet build`, `npm run build`) to ensure that imports, injections, and variables compile correctly.112113### 5. Handoff114115* Offer committing the refactored code and resources:116117```118/commit119```120121## Must not122123* Extract string keys with generic names (like `Text1`, `String2`).124* Mutate logger strings or database connection configurations.