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.
Files changed (125) hide show
  1. package/.agent/.shared/ui-ux-pro-max/README.md +3 -3
  2. package/.agent/ARCHITECTURE.md +205 -10
  3. package/.agent/GEMINI.md +37 -7
  4. package/.agent/agents/accessibility-reviewer.md +134 -0
  5. package/.agent/agents/ai-code-reviewer.md +129 -0
  6. package/.agent/agents/frontend-specialist.md +3 -0
  7. package/.agent/agents/game-developer.md +21 -21
  8. package/.agent/agents/logic-reviewer.md +12 -0
  9. package/.agent/agents/mobile-reviewer.md +79 -0
  10. package/.agent/agents/orchestrator.md +56 -26
  11. package/.agent/agents/performance-reviewer.md +36 -0
  12. package/.agent/agents/supervisor-agent.md +156 -0
  13. package/.agent/agents/swarm-worker-contracts.md +166 -0
  14. package/.agent/agents/swarm-worker-registry.md +92 -0
  15. package/.agent/rules/GEMINI.md +134 -5
  16. package/.agent/scripts/bundle_analyzer.py +259 -0
  17. package/.agent/scripts/dependency_analyzer.py +247 -0
  18. package/.agent/scripts/lint_runner.py +188 -0
  19. package/.agent/scripts/patch_skills_meta.py +177 -0
  20. package/.agent/scripts/patch_skills_output.py +285 -0
  21. package/.agent/scripts/schema_validator.py +279 -0
  22. package/.agent/scripts/security_scan.py +224 -0
  23. package/.agent/scripts/session_manager.py +144 -3
  24. package/.agent/scripts/skill_integrator.py +234 -0
  25. package/.agent/scripts/strengthen_skills.py +220 -0
  26. package/.agent/scripts/swarm_dispatcher.py +317 -0
  27. package/.agent/scripts/test_runner.py +192 -0
  28. package/.agent/scripts/test_swarm_dispatcher.py +163 -0
  29. package/.agent/skills/agent-organizer/SKILL.md +132 -0
  30. package/.agent/skills/agentic-patterns/SKILL.md +335 -0
  31. package/.agent/skills/api-patterns/SKILL.md +226 -50
  32. package/.agent/skills/app-builder/SKILL.md +215 -52
  33. package/.agent/skills/architecture/SKILL.md +176 -31
  34. package/.agent/skills/bash-linux/SKILL.md +150 -134
  35. package/.agent/skills/behavioral-modes/SKILL.md +152 -160
  36. package/.agent/skills/brainstorming/SKILL.md +148 -101
  37. package/.agent/skills/brainstorming/dynamic-questioning.md +10 -0
  38. package/.agent/skills/clean-code/SKILL.md +139 -134
  39. package/.agent/skills/code-review-checklist/SKILL.md +177 -80
  40. package/.agent/skills/config-validator/SKILL.md +165 -0
  41. package/.agent/skills/csharp-developer/SKILL.md +107 -0
  42. package/.agent/skills/database-design/SKILL.md +252 -29
  43. package/.agent/skills/deployment-procedures/SKILL.md +122 -175
  44. package/.agent/skills/devops-engineer/SKILL.md +134 -0
  45. package/.agent/skills/devops-incident-responder/SKILL.md +98 -0
  46. package/.agent/skills/documentation-templates/SKILL.md +175 -121
  47. package/.agent/skills/dotnet-core-expert/SKILL.md +103 -0
  48. package/.agent/skills/edge-computing/SKILL.md +213 -0
  49. package/.agent/skills/frontend-design/SKILL.md +76 -0
  50. package/.agent/skills/frontend-design/color-system.md +18 -0
  51. package/.agent/skills/frontend-design/typography-system.md +18 -0
  52. package/.agent/skills/game-development/SKILL.md +69 -0
  53. package/.agent/skills/geo-fundamentals/SKILL.md +158 -99
  54. package/.agent/skills/i18n-localization/SKILL.md +158 -96
  55. package/.agent/skills/intelligent-routing/SKILL.md +89 -285
  56. package/.agent/skills/intelligent-routing/router-manifest.md +65 -0
  57. package/.agent/skills/lint-and-validate/SKILL.md +229 -27
  58. package/.agent/skills/llm-engineering/SKILL.md +258 -0
  59. package/.agent/skills/local-first/SKILL.md +203 -0
  60. package/.agent/skills/mcp-builder/SKILL.md +159 -111
  61. package/.agent/skills/mobile-design/SKILL.md +102 -282
  62. package/.agent/skills/nextjs-react-expert/SKILL.md +143 -227
  63. package/.agent/skills/nodejs-best-practices/SKILL.md +201 -254
  64. package/.agent/skills/observability/SKILL.md +285 -0
  65. package/.agent/skills/parallel-agents/SKILL.md +124 -118
  66. package/.agent/skills/performance-profiling/SKILL.md +143 -89
  67. package/.agent/skills/plan-writing/SKILL.md +133 -97
  68. package/.agent/skills/platform-engineer/SKILL.md +135 -0
  69. package/.agent/skills/powershell-windows/SKILL.md +167 -104
  70. package/.agent/skills/python-patterns/SKILL.md +149 -361
  71. package/.agent/skills/python-pro/SKILL.md +114 -0
  72. package/.agent/skills/react-specialist/SKILL.md +107 -0
  73. package/.agent/skills/realtime-patterns/SKILL.md +296 -0
  74. package/.agent/skills/red-team-tactics/SKILL.md +136 -134
  75. package/.agent/skills/rust-pro/SKILL.md +237 -173
  76. package/.agent/skills/seo-fundamentals/SKILL.md +134 -82
  77. package/.agent/skills/server-management/SKILL.md +155 -104
  78. package/.agent/skills/sql-pro/SKILL.md +104 -0
  79. package/.agent/skills/systematic-debugging/SKILL.md +156 -79
  80. package/.agent/skills/tailwind-patterns/SKILL.md +163 -205
  81. package/.agent/skills/tdd-workflow/SKILL.md +148 -88
  82. package/.agent/skills/test-result-analyzer/SKILL.md +299 -0
  83. package/.agent/skills/testing-patterns/SKILL.md +141 -114
  84. package/.agent/skills/trend-researcher/SKILL.md +228 -0
  85. package/.agent/skills/ui-ux-pro-max/SKILL.md +107 -0
  86. package/.agent/skills/ui-ux-researcher/SKILL.md +234 -0
  87. package/.agent/skills/vue-expert/SKILL.md +118 -0
  88. package/.agent/skills/vulnerability-scanner/SKILL.md +228 -188
  89. package/.agent/skills/web-design-guidelines/SKILL.md +148 -33
  90. package/.agent/skills/webapp-testing/SKILL.md +171 -122
  91. package/.agent/skills/whimsy-injector/SKILL.md +349 -0
  92. package/.agent/skills/workflow-optimizer/SKILL.md +219 -0
  93. package/.agent/workflows/api-tester.md +279 -0
  94. package/.agent/workflows/audit.md +168 -0
  95. package/.agent/workflows/brainstorm.md +65 -19
  96. package/.agent/workflows/changelog.md +144 -0
  97. package/.agent/workflows/create.md +67 -14
  98. package/.agent/workflows/debug.md +122 -30
  99. package/.agent/workflows/deploy.md +82 -31
  100. package/.agent/workflows/enhance.md +59 -27
  101. package/.agent/workflows/fix.md +143 -0
  102. package/.agent/workflows/generate.md +84 -20
  103. package/.agent/workflows/migrate.md +163 -0
  104. package/.agent/workflows/orchestrate.md +66 -17
  105. package/.agent/workflows/performance-benchmarker.md +305 -0
  106. package/.agent/workflows/plan.md +76 -33
  107. package/.agent/workflows/preview.md +73 -17
  108. package/.agent/workflows/refactor.md +153 -0
  109. package/.agent/workflows/review-ai.md +140 -0
  110. package/.agent/workflows/review.md +83 -16
  111. package/.agent/workflows/session.md +154 -0
  112. package/.agent/workflows/status.md +74 -18
  113. package/.agent/workflows/strengthen-skills.md +99 -0
  114. package/.agent/workflows/swarm.md +194 -0
  115. package/.agent/workflows/test.md +80 -31
  116. package/.agent/workflows/tribunal-backend.md +55 -13
  117. package/.agent/workflows/tribunal-database.md +62 -18
  118. package/.agent/workflows/tribunal-frontend.md +58 -12
  119. package/.agent/workflows/tribunal-full.md +70 -11
  120. package/.agent/workflows/tribunal-mobile.md +123 -0
  121. package/.agent/workflows/tribunal-performance.md +152 -0
  122. package/.agent/workflows/ui-ux-pro-max.md +100 -82
  123. package/README.md +117 -62
  124. package/bin/tribunal-kit.js +329 -75
  125. 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
- # i18n & Localization
10
+ # Internationalization & Localization
8
11
 
9
- > Internationalization (i18n) and Localization (L10n) best practices.
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
- ## 1. Core Concepts
18
+ ## The Core Rule: No Hardcoded Strings
14
19
 
15
- | Term | Meaning |
16
- |------|---------|
17
- | **i18n** | Internationalization - making app translatable |
18
- | **L10n** | Localization - actual translations |
19
- | **Locale** | Language + Region (en-US, tr-TR) |
20
- | **RTL** | Right-to-left languages (Arabic, Hebrew) |
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
- ## 2. When to Use i18n
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
- | Project Type | i18n Needed? |
27
- |--------------|--------------|
28
- | Public web app | ✅ Yes |
29
- | SaaS product | Yes |
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
- ## 3. Implementation Patterns
72
+ ## Pluralization
37
73
 
38
- ### React (react-i18next)
74
+ Pluralization rules differ per language. Use your i18n library's plural system — never manual `if count > 1`:
39
75
 
40
- ```tsx
41
- import { useTranslation } from 'react-i18next';
76
+ ```ts
77
+ // Only works for English
78
+ const label = count === 1 ? 'message' : 'messages';
42
79
 
43
- function Welcome() {
44
- const { t } = useTranslation();
45
- return <h1>{t('welcome.title')}</h1>;
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
- ### Next.js (next-intl)
89
+ ---
50
90
 
51
- ```tsx
52
- import { useTranslations } from 'next-intl';
91
+ ## Date, Number & Currency Formatting
53
92
 
54
- export default function Page() {
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
- ### Python (gettext)
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
- ```python
63
- from gettext import gettext as _
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
- print(_("Welcome to our app"))
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
- ## 4. File Structure
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
- locales/
74
- ├── en/
75
- │ ├── common.json
76
- │ ├── auth.json
77
- │ └── errors.json
78
- ├── tr/
79
- │ ├── common.json
80
- │ ├── auth.json
81
- │ └── errors.json
82
- └── ar/ # RTL
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
- ## 5. Best Practices
141
+ ## Detecting Hardcoded Strings (Code Audit)
89
142
 
90
- ### DO ✅
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
- - Use translation keys, not raw text
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
- ### DON'T ❌
152
+ ## Scripts
100
153
 
101
- - Hardcode strings in components
102
- - Concatenate translated strings
103
- - Assume text length (German is 30% longer)
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
- ## 6. Common Issues
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
- ## 7. RTL Support
179
+ ## 🤖 LLM-Specific Traps
122
180
 
123
- ```css
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
- [dir="rtl"] .icon {
131
- transform: scaleX(-1);
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
- ## 8. Checklist
191
+ ## 🏛️ Tribunal Integration (Anti-Hallucination)
138
192
 
139
- Before shipping:
193
+ **Slash command: `/review` or `/tribunal-full`**
194
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
140
195
 
141
- - [ ] All user-facing strings use translation keys
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
- ## Script
212
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
151
213
 
152
- | Script | Purpose | Command |
153
- |--------|---------|---------|
154
- | `scripts/i18n_checker.py` | Detect hardcoded strings & missing translations | `python scripts/i18n_checker.py <project_path>` |
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.