tribunal-kit 1.0.0 → 2.4.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/.agent/.shared/ui-ux-pro-max/README.md +3 -3
- package/.agent/ARCHITECTURE.md +205 -10
- package/.agent/GEMINI.md +37 -7
- package/.agent/agents/accessibility-reviewer.md +134 -0
- package/.agent/agents/ai-code-reviewer.md +129 -0
- package/.agent/agents/frontend-specialist.md +3 -0
- package/.agent/agents/game-developer.md +21 -21
- package/.agent/agents/logic-reviewer.md +12 -0
- package/.agent/agents/mobile-reviewer.md +79 -0
- package/.agent/agents/orchestrator.md +56 -26
- package/.agent/agents/performance-reviewer.md +36 -0
- package/.agent/agents/supervisor-agent.md +156 -0
- package/.agent/agents/swarm-worker-contracts.md +166 -0
- package/.agent/agents/swarm-worker-registry.md +92 -0
- package/.agent/rules/GEMINI.md +134 -5
- package/.agent/scripts/bundle_analyzer.py +259 -0
- package/.agent/scripts/dependency_analyzer.py +247 -0
- package/.agent/scripts/lint_runner.py +188 -0
- package/.agent/scripts/patch_skills_meta.py +177 -0
- package/.agent/scripts/patch_skills_output.py +285 -0
- package/.agent/scripts/schema_validator.py +279 -0
- package/.agent/scripts/security_scan.py +224 -0
- package/.agent/scripts/session_manager.py +144 -3
- package/.agent/scripts/skill_integrator.py +234 -0
- package/.agent/scripts/strengthen_skills.py +220 -0
- package/.agent/scripts/swarm_dispatcher.py +317 -0
- package/.agent/scripts/test_runner.py +192 -0
- package/.agent/scripts/test_swarm_dispatcher.py +163 -0
- package/.agent/skills/agent-organizer/SKILL.md +132 -0
- package/.agent/skills/agentic-patterns/SKILL.md +335 -0
- package/.agent/skills/api-patterns/SKILL.md +226 -50
- package/.agent/skills/app-builder/SKILL.md +215 -52
- package/.agent/skills/architecture/SKILL.md +176 -31
- package/.agent/skills/bash-linux/SKILL.md +150 -134
- package/.agent/skills/behavioral-modes/SKILL.md +152 -160
- package/.agent/skills/brainstorming/SKILL.md +148 -101
- package/.agent/skills/brainstorming/dynamic-questioning.md +10 -0
- package/.agent/skills/clean-code/SKILL.md +139 -134
- package/.agent/skills/code-review-checklist/SKILL.md +177 -80
- package/.agent/skills/config-validator/SKILL.md +165 -0
- package/.agent/skills/csharp-developer/SKILL.md +107 -0
- package/.agent/skills/database-design/SKILL.md +252 -29
- package/.agent/skills/deployment-procedures/SKILL.md +122 -175
- package/.agent/skills/devops-engineer/SKILL.md +134 -0
- package/.agent/skills/devops-incident-responder/SKILL.md +98 -0
- package/.agent/skills/documentation-templates/SKILL.md +175 -121
- package/.agent/skills/dotnet-core-expert/SKILL.md +103 -0
- package/.agent/skills/edge-computing/SKILL.md +213 -0
- package/.agent/skills/frontend-design/SKILL.md +76 -0
- package/.agent/skills/frontend-design/color-system.md +18 -0
- package/.agent/skills/frontend-design/typography-system.md +18 -0
- package/.agent/skills/game-development/SKILL.md +69 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +158 -99
- package/.agent/skills/i18n-localization/SKILL.md +158 -96
- package/.agent/skills/intelligent-routing/SKILL.md +89 -285
- package/.agent/skills/intelligent-routing/router-manifest.md +65 -0
- package/.agent/skills/lint-and-validate/SKILL.md +229 -27
- package/.agent/skills/llm-engineering/SKILL.md +258 -0
- package/.agent/skills/local-first/SKILL.md +203 -0
- package/.agent/skills/mcp-builder/SKILL.md +159 -111
- package/.agent/skills/mobile-design/SKILL.md +102 -282
- package/.agent/skills/nextjs-react-expert/SKILL.md +143 -227
- package/.agent/skills/nodejs-best-practices/SKILL.md +201 -254
- package/.agent/skills/observability/SKILL.md +285 -0
- package/.agent/skills/parallel-agents/SKILL.md +124 -118
- package/.agent/skills/performance-profiling/SKILL.md +143 -89
- package/.agent/skills/plan-writing/SKILL.md +133 -97
- package/.agent/skills/platform-engineer/SKILL.md +135 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -104
- package/.agent/skills/python-patterns/SKILL.md +149 -361
- package/.agent/skills/python-pro/SKILL.md +114 -0
- package/.agent/skills/react-specialist/SKILL.md +107 -0
- package/.agent/skills/realtime-patterns/SKILL.md +296 -0
- package/.agent/skills/red-team-tactics/SKILL.md +136 -134
- package/.agent/skills/rust-pro/SKILL.md +237 -173
- package/.agent/skills/seo-fundamentals/SKILL.md +134 -82
- package/.agent/skills/server-management/SKILL.md +155 -104
- package/.agent/skills/sql-pro/SKILL.md +104 -0
- package/.agent/skills/systematic-debugging/SKILL.md +156 -79
- package/.agent/skills/tailwind-patterns/SKILL.md +163 -205
- package/.agent/skills/tdd-workflow/SKILL.md +148 -88
- package/.agent/skills/test-result-analyzer/SKILL.md +299 -0
- package/.agent/skills/testing-patterns/SKILL.md +141 -114
- package/.agent/skills/trend-researcher/SKILL.md +228 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +107 -0
- package/.agent/skills/ui-ux-researcher/SKILL.md +234 -0
- package/.agent/skills/vue-expert/SKILL.md +118 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +228 -188
- package/.agent/skills/web-design-guidelines/SKILL.md +148 -33
- package/.agent/skills/webapp-testing/SKILL.md +171 -122
- package/.agent/skills/whimsy-injector/SKILL.md +349 -0
- package/.agent/skills/workflow-optimizer/SKILL.md +219 -0
- package/.agent/workflows/api-tester.md +279 -0
- package/.agent/workflows/audit.md +168 -0
- package/.agent/workflows/brainstorm.md +65 -19
- package/.agent/workflows/changelog.md +144 -0
- package/.agent/workflows/create.md +67 -14
- package/.agent/workflows/debug.md +122 -30
- package/.agent/workflows/deploy.md +82 -31
- package/.agent/workflows/enhance.md +59 -27
- package/.agent/workflows/fix.md +143 -0
- package/.agent/workflows/generate.md +84 -20
- package/.agent/workflows/migrate.md +163 -0
- package/.agent/workflows/orchestrate.md +66 -17
- package/.agent/workflows/performance-benchmarker.md +305 -0
- package/.agent/workflows/plan.md +76 -33
- package/.agent/workflows/preview.md +73 -17
- package/.agent/workflows/refactor.md +153 -0
- package/.agent/workflows/review-ai.md +140 -0
- package/.agent/workflows/review.md +83 -16
- package/.agent/workflows/session.md +154 -0
- package/.agent/workflows/status.md +74 -18
- package/.agent/workflows/strengthen-skills.md +99 -0
- package/.agent/workflows/swarm.md +194 -0
- package/.agent/workflows/test.md +80 -31
- package/.agent/workflows/tribunal-backend.md +55 -13
- package/.agent/workflows/tribunal-database.md +62 -18
- package/.agent/workflows/tribunal-frontend.md +58 -12
- package/.agent/workflows/tribunal-full.md +70 -11
- package/.agent/workflows/tribunal-mobile.md +123 -0
- package/.agent/workflows/tribunal-performance.md +152 -0
- package/.agent/workflows/ui-ux-pro-max.md +100 -82
- package/README.md +117 -62
- package/bin/tribunal-kit.js +329 -75
- package/package.json +10 -6
|
@@ -1,154 +1,216 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: i18n-localization
|
|
3
3
|
description: Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.
|
|
4
|
-
allowed-tools: Read, Glob, Grep
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
last-updated: 2026-03-12
|
|
7
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
5
8
|
---
|
|
6
9
|
|
|
7
|
-
#
|
|
10
|
+
# Internationalization & Localization
|
|
8
11
|
|
|
9
|
-
> Internationalization (i18n)
|
|
12
|
+
> Internationalization (i18n) is preparing code to support multiple languages.
|
|
13
|
+
> Localization (l10n) is the work of adapting to a specific locale.
|
|
14
|
+
> Do i18n once, properly. Do l10n for each market.
|
|
10
15
|
|
|
11
16
|
---
|
|
12
17
|
|
|
13
|
-
##
|
|
18
|
+
## The Core Rule: No Hardcoded Strings
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
Every user-visible string in the source code is a localization problem waiting to happen.
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
// ❌ Hardcoded — untranslatable
|
|
24
|
+
<button>Save Changes</button>
|
|
25
|
+
<p>You have {count} messages</p>
|
|
26
|
+
<p>Error: Invalid email address</p>
|
|
27
|
+
|
|
28
|
+
// ✅ Key-referenced — translatable
|
|
29
|
+
<button>{t('common.save')}</button>
|
|
30
|
+
<p>{t('inbox.messageCount', { count })}</p>
|
|
31
|
+
<p>{t('errors.invalidEmail')}</p>
|
|
32
|
+
```
|
|
21
33
|
|
|
22
34
|
---
|
|
23
35
|
|
|
24
|
-
##
|
|
36
|
+
## Translation File Structure
|
|
37
|
+
|
|
38
|
+
Organize translation keys hierarchically — flat files become unmaintainable past ~50 keys:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
// en.json
|
|
42
|
+
{
|
|
43
|
+
"common": {
|
|
44
|
+
"save": "Save Changes",
|
|
45
|
+
"cancel": "Cancel",
|
|
46
|
+
"loading": "Loading…",
|
|
47
|
+
"error": "Something went wrong"
|
|
48
|
+
},
|
|
49
|
+
"auth": {
|
|
50
|
+
"login": "Sign In",
|
|
51
|
+
"logout": "Sign Out",
|
|
52
|
+
"register": "Create Account",
|
|
53
|
+
"errors": {
|
|
54
|
+
"invalidEmail": "Enter a valid email address",
|
|
55
|
+
"passwordTooShort": "Password must be at least {{min}} characters"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"inbox": {
|
|
59
|
+
"messageCount_one": "{{count}} message",
|
|
60
|
+
"messageCount_other": "{{count}} messages"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
25
64
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
| Internal tool | ⚠️ Maybe |
|
|
31
|
-
| Single-region app | ⚠️ Consider future |
|
|
32
|
-
| Personal project | ❌ Optional |
|
|
65
|
+
**Key naming conventions:**
|
|
66
|
+
- `feature.element` or `feature.element.state`
|
|
67
|
+
- Error keys under `.errors`
|
|
68
|
+
- Never use the English text as the key (`"Save Changes": "Save Changes"`)
|
|
33
69
|
|
|
34
70
|
---
|
|
35
71
|
|
|
36
|
-
##
|
|
72
|
+
## Pluralization
|
|
37
73
|
|
|
38
|
-
|
|
74
|
+
Pluralization rules differ per language. Use your i18n library's plural system — never manual `if count > 1`:
|
|
39
75
|
|
|
40
|
-
```
|
|
41
|
-
|
|
76
|
+
```ts
|
|
77
|
+
// ❌ Only works for English
|
|
78
|
+
const label = count === 1 ? 'message' : 'messages';
|
|
42
79
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
80
|
+
// ✅ i18next handles per-language plural rules
|
|
81
|
+
t('inbox.messageCount', { count })
|
|
82
|
+
|
|
83
|
+
// Translation files handle the variants:
|
|
84
|
+
// English: { "messageCount_one": "{{count}} message", "messageCount_other": "{{count}} messages" }
|
|
85
|
+
// Arabic: 6 plural forms (zero, one, two, few, many, other)
|
|
86
|
+
// Russian: 3 plural forms with complex rules
|
|
47
87
|
```
|
|
48
88
|
|
|
49
|
-
|
|
89
|
+
---
|
|
50
90
|
|
|
51
|
-
|
|
52
|
-
import { useTranslations } from 'next-intl';
|
|
91
|
+
## Date, Number & Currency Formatting
|
|
53
92
|
|
|
54
|
-
|
|
55
|
-
const t = useTranslations('Home');
|
|
56
|
-
return <h1>{t('title')}</h1>;
|
|
57
|
-
}
|
|
58
|
-
```
|
|
93
|
+
Never format these manually. Use the browser's `Intl` API:
|
|
59
94
|
|
|
60
|
-
|
|
95
|
+
```ts
|
|
96
|
+
// Date
|
|
97
|
+
const date = new Date();
|
|
98
|
+
new Intl.DateTimeFormat('en-US').format(date); // "2/20/2026"
|
|
99
|
+
new Intl.DateTimeFormat('de-DE').format(date); // "20.2.2026"
|
|
61
100
|
|
|
62
|
-
|
|
63
|
-
|
|
101
|
+
// Number
|
|
102
|
+
new Intl.NumberFormat('en-US').format(1234567.89); // "1,234,567.89"
|
|
103
|
+
new Intl.NumberFormat('de-DE').format(1234567.89); // "1.234.567,89"
|
|
64
104
|
|
|
65
|
-
|
|
105
|
+
// Currency
|
|
106
|
+
new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(99.99);
|
|
107
|
+
// "$99.99"
|
|
108
|
+
new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(99.99);
|
|
109
|
+
// "99,99 €"
|
|
66
110
|
```
|
|
67
111
|
|
|
68
112
|
---
|
|
69
113
|
|
|
70
|
-
##
|
|
114
|
+
## RTL (Right-to-Left) Support
|
|
115
|
+
|
|
116
|
+
Arabic, Hebrew, Persian, Urdu are RTL languages. Supporting them requires more than flipping direction.
|
|
117
|
+
|
|
118
|
+
```html
|
|
119
|
+
<!-- Set direction on html element based on locale -->
|
|
120
|
+
<html lang="ar" dir="rtl">
|
|
71
121
|
|
|
122
|
+
<!-- Or dynamically -->
|
|
123
|
+
<html lang={locale} dir={isRTL(locale) ? 'rtl' : 'ltr'}>
|
|
72
124
|
```
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
125
|
+
|
|
126
|
+
```css
|
|
127
|
+
/* Use logical properties — they flip automatically with direction */
|
|
128
|
+
/* ❌ Physical: only works for LTR */
|
|
129
|
+
padding-left: 1rem;
|
|
130
|
+
margin-right: 2rem;
|
|
131
|
+
border-left: 2px solid;
|
|
132
|
+
|
|
133
|
+
/* ✅ Logical: works for both LTR and RTL */
|
|
134
|
+
padding-inline-start: 1rem;
|
|
135
|
+
margin-inline-end: 2rem;
|
|
136
|
+
border-inline-start: 2px solid;
|
|
84
137
|
```
|
|
85
138
|
|
|
86
139
|
---
|
|
87
140
|
|
|
88
|
-
##
|
|
141
|
+
## Detecting Hardcoded Strings (Code Audit)
|
|
89
142
|
|
|
90
|
-
|
|
143
|
+
Look for:
|
|
144
|
+
- JSX text content directly in tags: `<p>some text</p>` (not `<p>{t(...)}</p>`)
|
|
145
|
+
- Template literals with user-facing copy: `` `Welcome, ${name}!` ``
|
|
146
|
+
- Alert/toast calls with string literals: `toast.success('Saved!')`
|
|
147
|
+
- Error messages: `new Error('Invalid input')` shown to users
|
|
148
|
+
- `placeholder`, `aria-label`, `title` attributes hardcoded
|
|
91
149
|
|
|
92
|
-
|
|
93
|
-
- Namespace translations by feature
|
|
94
|
-
- Support pluralization
|
|
95
|
-
- Handle date/number formats per locale
|
|
96
|
-
- Plan for RTL from the start
|
|
97
|
-
- Use ICU message format for complex strings
|
|
150
|
+
---
|
|
98
151
|
|
|
99
|
-
|
|
152
|
+
## Scripts
|
|
100
153
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
- Forget about RTL layout
|
|
105
|
-
- Mix languages in same file
|
|
154
|
+
| Script | Purpose | Run With |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| `scripts/i18n_checker.py` | Scans codebase for hardcoded strings | `python scripts/i18n_checker.py <project_path>` |
|
|
106
157
|
|
|
107
158
|
---
|
|
108
159
|
|
|
109
|
-
##
|
|
160
|
+
## Output Format
|
|
161
|
+
|
|
162
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
━━━ I18N Localization Recommendation ━━━━━━━━━━━━━━━━
|
|
166
|
+
Decision: [what was chosen / proposed]
|
|
167
|
+
Rationale: [why — one concise line]
|
|
168
|
+
Trade-offs: [what is consciously accepted]
|
|
169
|
+
Next action: [concrete next step for the user]
|
|
170
|
+
─────────────────────────────────────────────────
|
|
171
|
+
Pre-Flight: ✅ All checks passed
|
|
172
|
+
or ❌ [blocking item that must be resolved first]
|
|
173
|
+
```
|
|
174
|
+
|
|
110
175
|
|
|
111
|
-
| Issue | Solution |
|
|
112
|
-
|-------|----------|
|
|
113
|
-
| Missing translation | Fallback to default language |
|
|
114
|
-
| Hardcoded strings | Use linter/checker script |
|
|
115
|
-
| Date format | Use Intl.DateTimeFormat |
|
|
116
|
-
| Number format | Use Intl.NumberFormat |
|
|
117
|
-
| Pluralization | Use ICU message format |
|
|
118
176
|
|
|
119
177
|
---
|
|
120
178
|
|
|
121
|
-
##
|
|
179
|
+
## 🤖 LLM-Specific Traps
|
|
122
180
|
|
|
123
|
-
|
|
124
|
-
/* CSS Logical Properties */
|
|
125
|
-
.container {
|
|
126
|
-
margin-inline-start: 1rem; /* Not margin-left */
|
|
127
|
-
padding-inline-end: 1rem; /* Not padding-right */
|
|
128
|
-
}
|
|
181
|
+
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
129
182
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
183
|
+
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
184
|
+
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
185
|
+
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
186
|
+
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
187
|
+
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
134
188
|
|
|
135
189
|
---
|
|
136
190
|
|
|
137
|
-
##
|
|
191
|
+
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
138
192
|
|
|
139
|
-
|
|
193
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
194
|
+
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
140
195
|
|
|
141
|
-
|
|
142
|
-
- [ ] Locale files exist for all supported languages
|
|
143
|
-
- [ ] Date/number formatting uses Intl API
|
|
144
|
-
- [ ] RTL layout tested (if applicable)
|
|
145
|
-
- [ ] Fallback language configured
|
|
146
|
-
- [ ] No hardcoded strings in components
|
|
196
|
+
### ❌ Forbidden AI Tropes
|
|
147
197
|
|
|
148
|
-
|
|
198
|
+
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
199
|
+
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
200
|
+
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
201
|
+
|
|
202
|
+
### ✅ Pre-Flight Self-Audit
|
|
203
|
+
|
|
204
|
+
Review these questions before confirming output:
|
|
205
|
+
```
|
|
206
|
+
✅ Did I rely ONLY on real, verified tools and methods?
|
|
207
|
+
✅ Is this solution appropriately scoped to the user's constraints?
|
|
208
|
+
✅ Did I handle potential failure modes and edge cases?
|
|
209
|
+
✅ Have I avoided generic boilerplate that doesn't add value?
|
|
210
|
+
```
|
|
149
211
|
|
|
150
|
-
|
|
212
|
+
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
151
213
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
214
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
215
|
+
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
216
|
+
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|