tribunal-kit 4.0.1 → 4.3.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 (196) hide show
  1. package/.agent/ARCHITECTURE.md +21 -14
  2. package/.agent/GEMINI.md +4 -2
  3. package/.agent/agents/api-architect.md +66 -0
  4. package/.agent/agents/db-latency-auditor.md +216 -0
  5. package/.agent/agents/precedence-reviewer.md +41 -4
  6. package/.agent/agents/resilience-reviewer.md +88 -0
  7. package/.agent/agents/schema-reviewer.md +67 -0
  8. package/.agent/agents/swarm-worker-contracts.md +5 -5
  9. package/.agent/agents/throughput-optimizer.md +299 -0
  10. package/.agent/agents/ui-ux-auditor.md +292 -0
  11. package/.agent/agents/vitals-reviewer.md +223 -0
  12. package/.agent/history/case-law/cases/case-0001.json +33 -0
  13. package/.agent/history/case-law/index.json +35 -0
  14. package/.agent/rules/GEMINI.md +28 -11
  15. package/.agent/scripts/__pycache__/_colors.cpython-311.pyc +0 -0
  16. package/.agent/scripts/__pycache__/_utils.cpython-311.pyc +0 -0
  17. package/.agent/scripts/__pycache__/case_law_manager.cpython-311.pyc +0 -0
  18. package/.agent/scripts/_colors.js +18 -0
  19. package/.agent/scripts/_utils.js +42 -0
  20. package/.agent/scripts/auto_preview.js +197 -0
  21. package/.agent/scripts/bundle_analyzer.js +290 -0
  22. package/.agent/scripts/case_law_manager.js +684 -0
  23. package/.agent/scripts/checklist.js +266 -0
  24. package/.agent/scripts/colors.js +17 -0
  25. package/.agent/scripts/compress_skills.js +141 -0
  26. package/.agent/scripts/consolidate_skills.js +149 -0
  27. package/.agent/scripts/context_broker.js +609 -0
  28. package/.agent/scripts/deep_compress.js +150 -0
  29. package/.agent/scripts/dependency_analyzer.js +272 -0
  30. package/.agent/scripts/inner_loop_validator.js +465 -0
  31. package/.agent/scripts/lint_runner.js +187 -0
  32. package/.agent/scripts/minify_context.js +100 -0
  33. package/.agent/scripts/patch_skills_meta.js +156 -0
  34. package/.agent/scripts/patch_skills_output.js +244 -0
  35. package/.agent/scripts/schema_validator.js +297 -0
  36. package/.agent/scripts/security_scan.js +303 -0
  37. package/.agent/scripts/session_manager.js +276 -0
  38. package/.agent/scripts/skill_evolution.js +644 -0
  39. package/.agent/scripts/skill_integrator.js +313 -0
  40. package/.agent/scripts/strengthen_skills.js +193 -0
  41. package/.agent/scripts/strip_tribunal.js +47 -0
  42. package/.agent/scripts/swarm_dispatcher.js +360 -0
  43. package/.agent/scripts/test_runner.js +193 -0
  44. package/.agent/scripts/utils.js +32 -0
  45. package/.agent/scripts/verify_all.js +256 -0
  46. package/.agent/skills/agent-organizer/SKILL.md +42 -0
  47. package/.agent/skills/agentic-patterns/SKILL.md +42 -0
  48. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +42 -0
  49. package/.agent/skills/api-patterns/SKILL.md +42 -0
  50. package/.agent/skills/api-security-auditor/SKILL.md +42 -0
  51. package/.agent/skills/app-builder/SKILL.md +42 -0
  52. package/.agent/skills/app-builder/templates/SKILL.md +70 -0
  53. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +1 -1
  54. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
  55. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +1 -1
  56. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
  57. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +1 -1
  58. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +1 -1
  59. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +1 -1
  60. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +1 -1
  61. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +1 -1
  62. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +1 -1
  63. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +1 -1
  64. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +1 -1
  65. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +1 -1
  66. package/.agent/skills/appflow-wireframe/SKILL.md +42 -0
  67. package/.agent/skills/architecture/SKILL.md +42 -0
  68. package/.agent/skills/authentication-best-practices/SKILL.md +42 -0
  69. package/.agent/skills/bash-linux/SKILL.md +42 -0
  70. package/.agent/skills/behavioral-modes/SKILL.md +42 -0
  71. package/.agent/skills/brainstorming/SKILL.md +42 -0
  72. package/.agent/skills/building-native-ui/SKILL.md +42 -0
  73. package/.agent/skills/clean-code/SKILL.md +42 -0
  74. package/.agent/skills/code-review-checklist/SKILL.md +42 -0
  75. package/.agent/skills/config-validator/SKILL.md +42 -0
  76. package/.agent/skills/csharp-developer/SKILL.md +42 -0
  77. package/.agent/skills/data-validation-schemas/SKILL.md +320 -0
  78. package/.agent/skills/database-design/SKILL.md +42 -0
  79. package/.agent/skills/deployment-procedures/SKILL.md +42 -0
  80. package/.agent/skills/devops-engineer/SKILL.md +42 -0
  81. package/.agent/skills/devops-incident-responder/SKILL.md +42 -0
  82. package/.agent/skills/doc.md +1 -1
  83. package/.agent/skills/documentation-templates/SKILL.md +42 -0
  84. package/.agent/skills/edge-computing/SKILL.md +42 -0
  85. package/.agent/skills/error-resilience/SKILL.md +420 -0
  86. package/.agent/skills/extract-design-system/SKILL.md +42 -0
  87. package/.agent/skills/framer-motion-expert/SKILL.md +42 -1
  88. package/.agent/skills/frontend-design/SKILL.md +42 -0
  89. package/.agent/skills/game-design-expert/SKILL.md +42 -0
  90. package/.agent/skills/game-engineering-expert/SKILL.md +42 -0
  91. package/.agent/skills/geo-fundamentals/SKILL.md +42 -0
  92. package/.agent/skills/github-operations/SKILL.md +42 -0
  93. package/.agent/skills/gsap-core/SKILL.md +300 -0
  94. package/.agent/skills/gsap-frameworks/SKILL.md +199 -0
  95. package/.agent/skills/gsap-performance/SKILL.md +125 -0
  96. package/.agent/skills/gsap-plugins/SKILL.md +472 -0
  97. package/.agent/skills/gsap-react/SKILL.md +181 -0
  98. package/.agent/skills/gsap-scrolltrigger/SKILL.md +342 -0
  99. package/.agent/skills/gsap-timeline/SKILL.md +153 -0
  100. package/.agent/skills/gsap-utils/SKILL.md +330 -0
  101. package/.agent/skills/i18n-localization/SKILL.md +42 -0
  102. package/.agent/skills/intelligent-routing/SKILL.md +72 -1
  103. package/.agent/skills/lint-and-validate/SKILL.md +42 -0
  104. package/.agent/skills/llm-engineering/SKILL.md +42 -0
  105. package/.agent/skills/local-first/SKILL.md +42 -0
  106. package/.agent/skills/mcp-builder/SKILL.md +42 -0
  107. package/.agent/skills/mobile-design/SKILL.md +42 -0
  108. package/.agent/skills/monorepo-management/SKILL.md +326 -0
  109. package/.agent/skills/motion-engineering/SKILL.md +42 -0
  110. package/.agent/skills/nextjs-react-expert/SKILL.md +42 -0
  111. package/.agent/skills/nodejs-best-practices/SKILL.md +42 -0
  112. package/.agent/skills/observability/SKILL.md +42 -0
  113. package/.agent/skills/parallel-agents/SKILL.md +42 -0
  114. package/.agent/skills/performance-profiling/SKILL.md +42 -0
  115. package/.agent/skills/plan-writing/SKILL.md +42 -0
  116. package/.agent/skills/platform-engineer/SKILL.md +42 -0
  117. package/.agent/skills/playwright-best-practices/SKILL.md +42 -0
  118. package/.agent/skills/powershell-windows/SKILL.md +42 -0
  119. package/.agent/skills/project-idioms/SKILL.md +42 -0
  120. package/.agent/skills/python-patterns/SKILL.md +42 -0
  121. package/.agent/skills/python-pro/SKILL.md +42 -0
  122. package/.agent/skills/react-specialist/SKILL.md +42 -0
  123. package/.agent/skills/readme-builder/SKILL.md +42 -0
  124. package/.agent/skills/realtime-patterns/SKILL.md +42 -0
  125. package/.agent/skills/red-team-tactics/SKILL.md +42 -0
  126. package/.agent/skills/rust-pro/SKILL.md +42 -0
  127. package/.agent/skills/seo-fundamentals/SKILL.md +42 -0
  128. package/.agent/skills/server-management/SKILL.md +42 -0
  129. package/.agent/skills/shadcn-ui-expert/SKILL.md +42 -0
  130. package/.agent/skills/skill-creator/SKILL.md +42 -0
  131. package/.agent/skills/sql-pro/SKILL.md +42 -0
  132. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +42 -0
  133. package/.agent/skills/swiftui-expert/SKILL.md +42 -0
  134. package/.agent/skills/systematic-debugging/SKILL.md +42 -0
  135. package/.agent/skills/tailwind-patterns/SKILL.md +42 -0
  136. package/.agent/skills/tdd-workflow/SKILL.md +42 -0
  137. package/.agent/skills/test-result-analyzer/SKILL.md +42 -0
  138. package/.agent/skills/testing-patterns/SKILL.md +42 -0
  139. package/.agent/skills/trend-researcher/SKILL.md +42 -0
  140. package/.agent/skills/typescript-advanced/SKILL.md +327 -0
  141. package/.agent/skills/ui-ux-pro-max/SKILL.md +42 -0
  142. package/.agent/skills/ui-ux-researcher/SKILL.md +42 -0
  143. package/.agent/skills/vue-expert/SKILL.md +42 -0
  144. package/.agent/skills/vulnerability-scanner/SKILL.md +42 -0
  145. package/.agent/skills/web-accessibility-auditor/SKILL.md +42 -0
  146. package/.agent/skills/web-design-guidelines/SKILL.md +42 -0
  147. package/.agent/skills/webapp-testing/SKILL.md +42 -0
  148. package/.agent/skills/whimsy-injector/SKILL.md +42 -0
  149. package/.agent/skills/workflow-optimizer/SKILL.md +42 -0
  150. package/.agent/workflows/audit.md +6 -6
  151. package/.agent/workflows/deploy.md +1 -1
  152. package/.agent/workflows/generate.md +23 -6
  153. package/.agent/workflows/session.md +5 -5
  154. package/.agent/workflows/swarm.md +2 -2
  155. package/.agent/workflows/tribunal-backend.md +13 -2
  156. package/.agent/workflows/tribunal-full.md +15 -8
  157. package/.agent/workflows/tribunal-speed.md +183 -0
  158. package/README.md +64 -8
  159. package/bin/tribunal-kit.js +281 -41
  160. package/package.json +9 -6
  161. package/scripts/changelog.js +167 -0
  162. package/scripts/sync-version.js +81 -0
  163. package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
  164. package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
  165. package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
  166. package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
  167. package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
  168. package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
  169. package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
  170. package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
  171. package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
  172. package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
  173. package/.agent/scripts/auto_preview.py +0 -180
  174. package/.agent/scripts/bundle_analyzer.py +0 -259
  175. package/.agent/scripts/case_law_manager.py +0 -525
  176. package/.agent/scripts/checklist.py +0 -209
  177. package/.agent/scripts/compress_skills.py +0 -167
  178. package/.agent/scripts/consolidate_skills.py +0 -173
  179. package/.agent/scripts/deep_compress.py +0 -202
  180. package/.agent/scripts/dependency_analyzer.py +0 -247
  181. package/.agent/scripts/lint_runner.py +0 -188
  182. package/.agent/scripts/minify_context.py +0 -80
  183. package/.agent/scripts/patch_skills_meta.py +0 -177
  184. package/.agent/scripts/patch_skills_output.py +0 -285
  185. package/.agent/scripts/schema_validator.py +0 -279
  186. package/.agent/scripts/security_scan.py +0 -224
  187. package/.agent/scripts/session_manager.py +0 -261
  188. package/.agent/scripts/skill_evolution.py +0 -563
  189. package/.agent/scripts/skill_integrator.py +0 -234
  190. package/.agent/scripts/strengthen_skills.py +0 -220
  191. package/.agent/scripts/strip_tribunal.py +0 -41
  192. package/.agent/scripts/swarm_dispatcher.py +0 -350
  193. package/.agent/scripts/test_runner.py +0 -192
  194. package/.agent/scripts/test_swarm_dispatcher.py +0 -163
  195. package/.agent/scripts/verify_all.py +0 -195
  196. package/.agent/skills/gsap-expert/SKILL.md +0 -194
@@ -273,3 +273,45 @@ Every file with animations MUST include:
273
273
  - **Verify `will-change` usage** — only apply to actively animating elements, remove after animation completes.
274
274
 
275
275
  ---
276
+
277
+
278
+ ---
279
+
280
+
281
+
282
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
283
+
284
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
285
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
286
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
287
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
288
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
289
+
290
+ ---
291
+
292
+
293
+
294
+ **Slash command: `/review` or `/tribunal-full`**
295
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
296
+
297
+ ### ❌ Forbidden AI Tropes
298
+
299
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
300
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
301
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
302
+
303
+
304
+
305
+ Review these questions before confirming output:
306
+ ```
307
+ ✅ Did I rely ONLY on real, verified tools and methods?
308
+ ✅ Is this solution appropriately scoped to the user's constraints?
309
+ ✅ Did I handle potential failure modes and edge cases?
310
+ ✅ Have I avoided generic boilerplate that doesn't add value?
311
+ ```
312
+
313
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
314
+
315
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
316
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
317
+ - ✅ **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.
@@ -177,3 +177,45 @@ Before analyzing, check for these common quick wins:
177
177
  - **Acknowledge uncertainty**: "Cannot determine if calls 3-5 had data dependency — may be correctly sequential."
178
178
 
179
179
  ---
180
+
181
+
182
+ ---
183
+
184
+
185
+
186
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
187
+
188
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
189
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
190
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
191
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
192
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
193
+
194
+ ---
195
+
196
+
197
+
198
+ **Slash command: `/review` or `/tribunal-full`**
199
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
200
+
201
+ ### ❌ Forbidden AI Tropes
202
+
203
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
204
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
205
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
206
+
207
+
208
+
209
+ Review these questions before confirming output:
210
+ ```
211
+ ✅ Did I rely ONLY on real, verified tools and methods?
212
+ ✅ Is this solution appropriately scoped to the user's constraints?
213
+ ✅ Did I handle potential failure modes and edge cases?
214
+ ✅ Have I avoided generic boilerplate that doesn't add value?
215
+ ```
216
+
217
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
218
+
219
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
220
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
221
+ - ✅ **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.
@@ -26,25 +26,25 @@ Security failures early in the pipeline halt subsequent steps. Lint/test failure
26
26
 
27
27
  ```
28
28
  Priority 1 — Security (HALT if critical finding)
29
- python .agent/scripts/security_scan.py .
29
+ node .agent/scripts/security_scan.js .
30
30
 
31
31
  Priority 2 — Dependencies (HALT if exploitable CVE found)
32
- python .agent/scripts/dependency_analyzer.py . --audit
32
+ node .agent/scripts/dependency_analyzer.js . --audit
33
33
 
34
34
  Priority 3 — Type Checking (CONTINUE but flag)
35
35
  npx tsc --noEmit
36
36
 
37
37
  Priority 4 — Lint (CONTINUE but flag as deployment blocker)
38
- python .agent/scripts/lint_runner.py .
38
+ node .agent/scripts/lint_runner.js .
39
39
 
40
40
  Priority 5 — Schema Validation (CONTINUE but flag)
41
- python .agent/scripts/schema_validator.py .
41
+ node .agent/scripts/schema_validator.js .
42
42
 
43
43
  Priority 6 — Tests (CONTINUE but mark incomplete)
44
- python .agent/scripts/test_runner.py . --coverage
44
+ node .agent/scripts/test_runner.js . --coverage
45
45
 
46
46
  Priority 7 — Bundle Analysis (INFORM only)
47
- python .agent/scripts/bundle_analyzer.py . --build
47
+ node .agent/scripts/bundle_analyzer.js . --build
48
48
  ```
49
49
 
50
50
  ### Cascade Failure Rules
@@ -34,7 +34,7 @@ Every step is logged. Every step has a rollback path. No surprises.
34
34
  # T-minus safety sequence (in exact order)
35
35
 
36
36
  # 1. Security: halt on critical
37
- python .agent/scripts/security_scan.py . --level=critical
37
+ node .agent/scripts/security_scan.js . --level=critical
38
38
 
39
39
  # 2. Dependencies: no exploitable CVEs
40
40
  npm audit --audit-level=high
@@ -25,6 +25,14 @@ $ARGUMENTS
25
25
  Your request
26
26
 
27
27
 
28
+ [Phase 6] Context Broker — Skill Selection
29
+ ├── Scores all 90+ skills against your task keywords
30
+ ├── Level 0 (Essential): top skills — full content, injected first
31
+ ├── Level 1 (Supplementary): medium relevance — key rules only
32
+ ├── Level 2 (Available): listed for reference only
33
+ └── Large models: Essential + Supplementary | Small models: Essential only
34
+
35
+
28
36
  Context scan (MANDATORY before first line of code)
29
37
  ├── Read package.json → verify all imports exist
30
38
  ├── Read tsconfig.json → understand strictness, paths aliases
@@ -39,7 +47,17 @@ Maker generates at temperature 0.1
39
47
  └── No full application generation — modules only
40
48
 
41
49
 
42
- Reviewers run in parallel (auto-selected by keyword)
50
+ [Phase 6] Inner-Loop Validator (AUTO runs before you see the code)
51
+ ├── Scans generated snippet for OWASP patterns (critical/high/medium/low)
52
+ ├── Runs structural heuristics (empty catch, throw strings, env without fallback)
53
+ ├── Verdict: APPROVED / WARNING / REJECTED
54
+ │ ├── APPROVED → continues to Tribunal Review
55
+ │ ├── WARNING → noted, continues with flag
56
+ │ └── REJECTED → Maker auto-corrects (up to 2 inner-loop attempts)
57
+ └── Only clean code reaches the Tribunal reviewers
58
+
59
+
60
+ Tribunal Reviewers run in parallel (auto-selected by keyword)
43
61
 
44
62
 
45
63
  Human Gate — verdicts shown + unified diff
@@ -84,13 +102,14 @@ security-auditor → OWASP vulnerabilities, hardcoded secrets, injection
84
102
  |:---|:---|
85
103
  | `api`, `route`, `endpoint`, `handler`, `server action` | `dependency-reviewer` + `type-safety-reviewer` |
86
104
  | `sql`, `query`, `database`, `prisma`, `drizzle`, `orm` | `sql-reviewer` |
87
- | `component`, `hook`, `react`, `vue`, `jsx`, `tsx` | `frontend-reviewer` + `type-safety-reviewer` |
88
- | `animation`, `gsap`, `framer`, `motion`, `scroll` | `frontend-reviewer` + `performance-reviewer` |
105
+ | `component`, `hook`, `react`, `vue`, `jsx`, `tsx` | `frontend-reviewer` + `type-safety-reviewer` + `ui-ux-auditor` |
106
+ | `ui`, `design`, `landing`, `page`, `layout`, `style`, `css` | `ui-ux-auditor` + `accessibility-reviewer` |
107
+ | `animation`, `gsap`, `framer`, `motion`, `scroll` | `frontend-reviewer` + `performance-reviewer` + `ui-ux-auditor` |
89
108
  | `test`, `spec`, `vitest`, `jest`, `playwright` | `test-coverage-reviewer` |
90
109
  | `slow`, `optimize`, `cache`, `performance`, `bundle` | `performance-reviewer` |
91
110
  | `mobile`, `react native`, `expo` | `mobile-reviewer` |
92
111
  | `llm`, `openai`, `anthropic`, `gemini`, `embedding`, `ai` | `ai-code-reviewer` |
93
- | `aria`, `wcag`, `a11y`, `accessibility` | `accessibility-reviewer` |
112
+ | `aria`, `wcag`, `a11y`, `accessibility` | `accessibility-reviewer` + `ui-ux-auditor` |
94
113
  | `import`, `package`, `npm`, `require` | `dependency-reviewer` |
95
114
 
96
115
  > For maximum safety on critical code: use `/tribunal-full` for all 11 reviewers simultaneously.
@@ -136,8 +155,6 @@ Write to disk? Y = approve | N = discard | R = revise with feedback
136
155
 
137
156
  ---
138
157
 
139
- ## Cross-Workflow Navigation
140
-
141
158
  | After /generate shows... | Go to |
142
159
  |:---|:---|
143
160
  | Multiple files need changing | `/enhance` for impact-zone analysis |
@@ -23,11 +23,11 @@ $ARGUMENTS
23
23
  ## Execution
24
24
 
25
25
  ```bash
26
- python .agent/scripts/session_manager.py save
27
- python .agent/scripts/session_manager.py restore
28
- python .agent/scripts/session_manager.py status
29
- python .agent/scripts/session_manager.py new
30
- python .agent/scripts/session_manager.py list
26
+ node .agent/scripts/session_manager.js save
27
+ node .agent/scripts/session_manager.js restore
28
+ node .agent/scripts/session_manager.js status
29
+ node .agent/scripts/session_manager.js new
30
+ node .agent/scripts/session_manager.js list
31
31
  ```
32
32
 
33
33
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Multi-Agent Swarm Orchestration. Supervisor decomposes a complex goal into sub-tasks, dispatches to specialist Workers via structured JSON contracts, collects results via allSettled fan-in, and synthesizes a unified deliverable. Validates payloads via swarm_dispatcher.py before dispatch.
2
+ description: Multi-Agent Swarm Orchestration. Supervisor decomposes a complex goal into sub-tasks, dispatches to specialist Workers via structured JSON contracts, collects results via allSettled fan-in, and synthesizes a unified deliverable. Validates payloads via swarm_dispatcher.js before dispatch.
3
3
  ---
4
4
 
5
5
  # /swarm — Multi-Agent Swarm Execution
@@ -69,7 +69,7 @@ Every worker receives a structured JSON contract (not natural language):
69
69
  Before dispatching, validate all worker contracts:
70
70
 
71
71
  ```bash
72
- python .agent/scripts/swarm_dispatcher.py --file payload.json
72
+ node .agent/scripts/swarm_dispatcher.js --file payload.json
73
73
  ```
74
74
 
75
75
  If validation passes → dispatch workers in parallel.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Backend-specific Tribunal. Runs Logic + Security + Dependency + Type Safety reviewers. Use for API routes, server logic, auth code, middleware, Server Actions, and any server-side business logic.
2
+ description: Backend-specific Tribunal. Runs Logic + Security + Dependency + Type Safety + Resilience + Schema reviewers. Use for API routes, server logic, auth code, middleware, Server Actions, and any server-side business logic.
3
3
  ---
4
4
 
5
5
  # /tribunal-backend — Backend Code Audit
@@ -20,7 +20,7 @@ $ARGUMENTS
20
20
 
21
21
  ---
22
22
 
23
- ## 4 Active Reviewers (All Run Simultaneously)
23
+ ## 6 Active Reviewers (All Run Simultaneously)
24
24
 
25
25
  ### precedence-reviewer → Checks local repo Case Law for past rejections
26
26
  logic-reviewer
@@ -50,6 +50,17 @@ logic-reviewer
50
50
  - Unsafe type assertions (`as User` without runtime check)
51
51
  - Return type mismatches
52
52
 
53
+ ### schema-reviewer
54
+ - Missing input validation on req.body/req.query
55
+ - Validation applied client-side only
56
+ - Loosely defined Zod/Pydantic schemas
57
+
58
+ ### resilience-reviewer
59
+ - Swallowed errors (empty catch blocks)
60
+ - Missing timeouts on network fetches
61
+ - Unhandled Promise rejections
62
+ - Missing retries for temporal network failures
63
+
53
64
  ---
54
65
 
55
66
  ## Verdict System
@@ -1,8 +1,8 @@
1
1
  ---
2
- description: Run ALL 11 Tribunal reviewer agents simultaneously. Maximum hallucination coverage. Use before merging any AI-generated code, before production deployments, or when maximum confidence is required.
2
+ description: Run ALL 16 Tribunal reviewer agents simultaneously. Maximum hallucination coverage. Use before merging any AI-generated code, before production deployments, or when maximum confidence is required.
3
3
  ---
4
4
 
5
- # /tribunal-full — Complete 11-Reviewer Audit
5
+ # /tribunal-full — Complete 16-Reviewer Audit
6
6
 
7
7
  $ARGUMENTS
8
8
 
@@ -20,17 +20,19 @@ $ARGUMENTS
20
20
 
21
21
  ---
22
22
 
23
- ## 11 Reviewers — All Active Simultaneously
23
+ ## 16 Reviewers — All Active Simultaneously
24
24
 
25
25
  ```
26
26
  Tier 1: Always active (universal concerns)
27
27
  ├── precedence-reviewer → Checks local repo Case Law for past rejections
28
28
  ├── logic-reviewer → Hallucinated methods, impossible logic, undefined refs
29
- └── security-auditor → OWASP 2025, injection, JWT, SSRF, IDOR
29
+ ├── security-auditor → OWASP 2025, injection, JWT, SSRF, IDOR
30
+ └── resilience-reviewer → Swallowed errors, unhandled rejections, missing retries
30
31
 
31
32
  Tier 2: Code quality
32
33
  ├── dependency-reviewer → Fabricated packages, supply chain, version compatibility
33
34
  ├── type-safety-reviewer → 'any' epidemic, Zod parse vs cast, unguarded access
35
+ ├── schema-reviewer → Missing input validation, loose schemas, raw req.body
34
36
  └── sql-reviewer → Injection, N+1, missing indexes, unscoped mutations
35
37
 
36
38
  Tier 3: Domain-specific
@@ -40,6 +42,11 @@ Tier 3: Domain-specific
40
42
  ├── ai-code-reviewer → Model name hallucinations, prompt injection, cost explosion
41
43
  ├── test-coverage-reviewer → Happy path only, brittle selectors, missing edge cases
42
44
  └── accessibility-reviewer → WCAG 2.2 AA, ARIA misuse, focus management, live regions
45
+
46
+ Tier 4: Performance Swarm (token-scoped specialists)
47
+ ├── vitals-reviewer → Frontend CWV depth: Suspense waterfalls, paint jank, animation leaks
48
+ ├── db-latency-auditor → DB layer: N+1, unbounded queries, unindexed WHERE, pool config
49
+ └── throughput-optimizer → Server runtime: event-loop blocks, serialized awaits, memory leaks
43
50
  ```
44
51
 
45
52
  ---
@@ -50,9 +57,9 @@ Not all 11 reviewers produce meaningful findings on all code types. Active revie
50
57
 
51
58
  |Code Under Review|Critical Reviewers|
52
59
  |:---|:---|
53
- |REST API route|logic, security, dependency, type-safety, sql|
54
- |React component|logic, frontend, accessibility, type-safety|
55
- |Database query|logic, security, sql|
60
+ |REST API route|logic, security, dependency, type-safety, sql, schema, resilience|
61
+ |React component|logic, frontend, accessibility, type-safety, resilience|
62
+ |Database query|logic, security, sql, resilience|
56
63
  |AI LLM integration|logic, security, ai-code, dependency|
57
64
  |Test file|test-coverage, logic|
58
65
  |React Native / Expo|mobile, logic, security, performance|
@@ -64,7 +71,7 @@ Not all 11 reviewers produce meaningful findings on all code types. Active revie
64
71
  ## Verdict Aggregation
65
72
 
66
73
  ```
67
- All 11 verdicts are collected. Aggregated result:
74
+ All 16 verdicts are collected. Aggregated result:
68
75
 
69
76
  If ANY reviewer = ❌ REJECTED → Global verdict: ❌ REJECTED (must fix before Human Gate)
70
77
  If any reviewer = ⚠️ WARNING → Global verdict: ⚠️ WARNINGS (proceed with attention)
@@ -0,0 +1,183 @@
1
+ ---
2
+ description: Full-stack parallel performance audit. Runs 3 scoped specialists simultaneously — vitals-reviewer (Frontend CWV), db-latency-auditor (SQL/ORM), throughput-optimizer (Node.js server) — then synthesizes a single ranked report. Maximum 5 AI calls regardless of project size. Use when full-stack performance profiling is needed.
3
+ ---
4
+
5
+ # /tribunal-speed — Full-Stack Performance Swarm
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ ## When to Use /tribunal-speed
12
+
13
+ |Use `/tribunal-speed` when...|Use something else when...|
14
+ |:---|:---|
15
+ |Full-stack performance audit needed|Frontend only → `/tribunal-performance`|
16
+ |Changes span UI + DB + Server layers|Single file review → `/review`|
17
+ |Pre-deploy performance validation|Security-focused → `/tribunal-full`|
18
+ |Investigating end-to-end latency|Architecture planning → `/plan`|
19
+ |Need scoped specialist depth (not generic)|Quick generic check → `/tribunal-performance`|
20
+
21
+ ---
22
+
23
+ ## Architecture: 3-Phase Fan-Out (5 AI Calls Max)
24
+
25
+ ```
26
+ Phase 1 — File Classification (1 call)
27
+
28
+ │ Classify all submitted files into:
29
+ │ ├── Frontend (.tsx, .jsx, .css, .module.css)
30
+ │ ├── Database (.sql, schema.prisma, files with prisma./db./drizzle(/knex()
31
+ │ └── Server (.ts/.js in /api, /server, /lib, /utils, /routes, /middleware)
32
+
33
+ │ Files that don't match any category → skip (not performance-relevant)
34
+
35
+
36
+ Phase 2 — Parallel Specialist Audit (3 concurrent calls)
37
+
38
+ │ ┌──────────────────────┬──────────────────────┬───────────────────────┐
39
+ │ │ vitals-reviewer │ db-latency-auditor │ throughput-optimizer │
40
+ │ │ │ │ │
41
+ │ │ Receives ONLY │ Receives ONLY │ Receives ONLY │
42
+ │ │ Frontend files │ Database files │ Server files │
43
+ │ │ │ │ │
44
+ │ │ Checks: │ Checks: │ Checks: │
45
+ │ │ - LCP blockers │ - N+1 queries │ - Event-loop blocks │
46
+ │ │ - INP violations │ - Missing LIMIT │ - Serialized awaits │
47
+ │ │ - CLS triggers │ - Unindexed WHERE │ - Memory leaks │
48
+ │ │ - Suspense waterfalls│ - SELECT * abuse │ - Missing Workers │
49
+ │ │ - Paint jank │ - Pool config │ - Streaming gaps │
50
+ │ │ - Animation leaks │ - Wide transactions │ - No keep-alive │
51
+ │ └──────────────────────┴──────────────────────┴───────────────────────┘
52
+
53
+ │ Each specialist returns findings in its verdict format.
54
+ │ allSettled — one specialist failure does NOT block siblings.
55
+
56
+
57
+ Phase 3 — Synthesis (1 call)
58
+
59
+ │ Merges 3 specialist reports into a single ranked issue list.
60
+ │ Priority: Critical → High → Medium → Low
61
+ │ Each issue tagged with: [AGENT] [FILE:LINE] [IMPACT METRIC] [FIX]
62
+
63
+
64
+ Human Gate — Final report shown
65
+ Y = acknowledge | N = discard | R = re-audit with different scope
66
+ ```
67
+
68
+ **Total cost: 5 AI calls maximum** — predictable, repeatable, project-size-independent.
69
+
70
+ ---
71
+
72
+ ## Token Discipline Rules
73
+
74
+ ```
75
+ Rule 1: Each specialist reads ONLY its scoped files — never the full project
76
+ Rule 2: If a category has zero files, that specialist is skipped (saves 1 call)
77
+ Rule 3: File contents are trimmed to relevant sections via targeted grep
78
+ Rule 4: Synthesis call receives only verdict summaries, not full file contents
79
+ ```
80
+
81
+ ---
82
+
83
+ ## 3 Specialist Agents
84
+
85
+ ### vitals-reviewer (Frontend)
86
+ - **Scope:** `.tsx`, `.jsx`, `.css`, `.module.css`
87
+ - **Metrics:** INP, LCP, CLS, FCP
88
+ - **Key patterns:** React 19 `use()` waterfalls, non-passive listeners, missing `content-visibility`, `useGSAP` leaks, View Transitions jank, Suspense placement
89
+
90
+ ### db-latency-auditor (Database)
91
+ - **Scope:** `.sql`, `schema.prisma`, files with `prisma.`, `db.`, `drizzle(`, `knex(`
92
+ - **Metrics:** Query count, query latency, connection overhead
93
+ - **Key patterns:** N+1 queries, missing LIMIT, unindexed WHERE, SELECT *, no connection pooling, over-scoped transactions, mass assignment
94
+
95
+ ### throughput-optimizer (Server)
96
+ - **Scope:** `.ts/.js` in `/api`, `/server`, `/lib`, `/utils`, `/routes`, `/middleware`
97
+ - **Metrics:** RPS, p95 latency, memory usage
98
+ - **Key patterns:** Sync `fs.*`, serialized `await` loops, global Map without TTL, no Worker Threads for CPU ops, buffer bloat, missing keep-alive
99
+
100
+ ---
101
+
102
+ ## Synthesis Output Format
103
+
104
+ ```
105
+ ━━━ Tribunal Speed: Full-Stack Performance Audit ━━━━━━━━━━━━━━
106
+
107
+ Specialists dispatched: 3 | Completed: 3 | Skipped: 0
108
+
109
+ ━━━ Critical Issues ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
110
+
111
+ [CRITICAL] throughput-optimizer | api/orders.ts:47
112
+ Pattern: SERIALIZED-AWAIT
113
+ Issue: await inside for-loop serializes 5 DB calls (1500ms vs 300ms parallel)
114
+ Fix: const results = await Promise.all(ids.map(id => fetchOrder(id)));
115
+ Impact: -1200ms p95 API latency
116
+
117
+ [CRITICAL] db-latency-auditor | lib/users.ts:23
118
+ Pattern: N+1
119
+ Issue: findMany in loop generates 101 queries for 100 users
120
+ Fix: Use prisma.user.findMany({ include: { posts: true } })
121
+ Impact: 101 queries → 1 query
122
+
123
+ ━━━ High Issues ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
124
+
125
+ [HIGH] vitals-reviewer | components/Hero.tsx:12
126
+ Pattern: LCP
127
+ Issue: Hero image without priority prop — browser discovers it late
128
+ Fix: Add priority={true} to next/image component
129
+ Impact: LCP improvement ~500ms
130
+
131
+ ━━━ Medium Issues ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
132
+
133
+ [MEDIUM] vitals-reviewer | app/feed/page.tsx:89
134
+ Pattern: CLS
135
+ Issue: Feed items missing content-visibility: auto
136
+ Fix: Add content-visibility: auto; contain-intrinsic-size: auto 200px;
137
+ Impact: Reduced off-screen rendering cost
138
+
139
+ ━━━ Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
140
+
141
+ Total issues: 7 (2 Critical, 2 High, 3 Medium)
142
+ AI calls used: 5
143
+ Token budget: Within scope (specialists read only categorized files)
144
+
145
+ ━━━ Human Gate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
146
+ Acknowledged? Y = close | R = re-audit different scope
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Specialist Failure Handling
152
+
153
+ ```
154
+ If a specialist fails after 3 retries:
155
+ → Log failure with agent name + error
156
+ → Continue with remaining specialists
157
+ → Include "[SPECIALIST FAILED]" in synthesis report
158
+ → Never silently skip — always visible in output
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Versus Other Commands
164
+
165
+ |Command|Agents|Depth|When to Use|
166
+ |:---|:---|:---|:---|
167
+ |`/tribunal-performance`|logic + performance-reviewer|Generic CWV check|Quick single-file perf scan|
168
+ |`/tribunal-speed`|vitals + db-latency + throughput|Deep 3-domain parallel|Full-stack perf audit|
169
+ |`/tribunal-full`|All 14 agents|Everything|Maximum coverage (security + perf + all)|
170
+ |`/performance-benchmarker`|Lighthouse + bundle|Measurement only|Get actual scores, not code review|
171
+
172
+ ---
173
+
174
+ ## Usage Examples
175
+
176
+ ```
177
+ /tribunal-speed the entire checkout flow (UI + API + DB queries)
178
+ /tribunal-speed all files changed in this PR for performance regression
179
+ /tribunal-speed the dashboard page end-to-end (data fetch + render + DB)
180
+ /tribunal-speed the search feature: autocomplete UI + search API + query plan
181
+ ```
182
+
183
+ ---
package/README.md CHANGED
@@ -7,14 +7,14 @@
7
7
 
8
8
  [![NPM](https://img.shields.io/npm/v/tribunal-kit?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/tribunal-kit)
9
9
  [![License](https://img.shields.io/badge/License-MIT-8b5cf6?style=for-the-badge)](LICENSE)
10
- [![Version](https://img.shields.io/badge/Version-4.0.0_Supreme_Court-black?style=for-the-badge)](CHANGELOG.md)
10
+ [![Version](https://img.shields.io/badge/Version-4.2.0_Supreme_Court-black?style=for-the-badge)](CHANGELOG.md)
11
11
  </div>
12
12
 
13
13
 
14
14
  <br><br>
15
15
 
16
16
  > 🚨 **AI GENERATES CODE. TRIBUNAL ENSURES IT WORKS.**
17
- > A plug-in `.agent/` intelligence payload that upgrades your IDE with **32 specialist agents**, **25 slash commands**, **8 parallel Tribunal reviewers**, and a core **Swarm/Supervisor** engine.
17
+ > A plug-in `.agent/` intelligence payload that upgrades your IDE with **41 specialist agents**, **31 slash commands**, **16 parallel Tribunal reviewers**, and a core **Swarm/Supervisor** engine.
18
18
 
19
19
  ---
20
20
 
@@ -30,7 +30,63 @@ npx tribunal-kit init
30
30
  ```
31
31
  *(Installs the `.agent/` architecture directly. No bloat. Pure capability.)*
32
32
 
33
- > ⚠️ **CRITICAL PATH WARNING:** Do **not** let your IDE ignore the agents. If using Cursor or Windsurf, keep `.agent/` **out** of `.gitignore` so the IDE can index the commands. Use `.git/info/exclude` instead.
33
+ <details>
34
+ <summary><b>📺 Quick Demo — What happens when you run it</b></summary>
35
+ <br>
36
+
37
+ ```
38
+ $ npx tribunal-kit init
39
+
40
+ ████████╗██████╗ ██╗██████╗ ██╗ ██╗███╗ ██╗ █████╗ ██╗
41
+ ╚══██╔══╝██╔══██╗██║██╔══██╗██║ ██║████╗ ██║██╔══██╗██║
42
+ ██║ ██████╔╝██║██████╔╝██║ ██║██╔██╗ ██║███████║██║
43
+ ██║ ██╔══██╗██║██╔══██╗██║ ██║██║╚██╗██║██╔══██║██║
44
+ ██║ ██║ ██║██║██████╔╝╚██████╔╝██║ ╚████║██║ ██║███████╗
45
+ ╚═╝ ╚═╝ ╚═╝╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝
46
+
47
+ ╔══════════════════════════════════════════════════════════════╗
48
+ ║ Anti-Hallucination Agent System ║
49
+ ╚══════════════════════════════════════════════════════════════╝
50
+
51
+ ✔ Installed → .agent/
52
+
53
+ ╔══════════════════════════════════════════════════════════════╗
54
+ ║ 🤖 Agents 40 installed ║
55
+ ║ ⚡ Workflows 31 installed ║
56
+ ║ 🧠 Skills 90 installed ║
57
+ ║ 🔧 Scripts 27 installed ║
58
+ ╚══════════════════════════════════════════════════════════════╝
59
+
60
+ ✔ 700+ files installed. 16 parallel Tribunal reviewers armed.
61
+
62
+ $ npx tribunal-kit status
63
+
64
+ ✔ Installed at .agent/
65
+ 🤖 agents 40 files
66
+ ⚡ workflows 31 files
67
+ 🧠 skills 90 files
68
+ 🔧 scripts 27 files
69
+ ```
70
+
71
+ > 💡 **Lighter install?** Use `npx tribunal-kit init --minimal` for just 13 core agents + 15 essential skills.
72
+
73
+ </details>
74
+
75
+ > ✅ **IDE Auto-Detection:** `init` automatically generates bridge files for every major AI coding IDE:
76
+ >
77
+ > | IDE | Bridge File Generated |
78
+ > | :--- | :--- |
79
+ > | **Cursor** | `.cursorrules` |
80
+ > | **Windsurf** | `.windsurfrules` |
81
+ > | **Gemini / Antigravity** | `.gemini/settings.json` + `.gemini/GEMINI.md` |
82
+ > | **GitHub Copilot** | `.github/copilot-instructions.md` |
83
+ > | **Claude** | `.claude/CLAUDE.md` |
84
+ >
85
+ > Bridge files are never overwritten on re-init — your customizations are safe.
86
+
87
+ **Prerequisites:** Node.js ≥ 18 • Python ≥ 3.10 *(optional — required for utility scripts like `checklist.py`, `security_scan.py`)*
88
+
89
+ > 💡 **Shorthand alias:** You can use `tk` instead of `tribunal-kit` for all commands (e.g., `tk init`, `tk status`).
34
90
 
35
91
  <br>
36
92
 
@@ -79,10 +135,10 @@ You no longer need to write manual rules. The system reads your Git commits, str
79
135
 
80
136
  | System Asset | Count | Operational Scope |
81
137
  | :--- | :---: | :--- |
82
- | 🤖 **Agents** | `33` | Specialist personas (Security, DB Architect, DevOps Responder, QA Engineer) |
83
- | 🧠 **Skills** | `77` | Domain modules (Edge Computing, Red Team Tactics, GSAP, Framer Motion) |
84
- | ⚡ **Workflows** | `30` | Slash command procedures including `/swarm`, `/tribunal-full`, `/ui-ux-pro-max` |
85
- | 🛠️ **Scripts** | `16` | CI/CD, linting, payload dispatching, security scanning, test suite runners |
138
+ | 🤖 **Agents** | `40` | Specialist personas 16 reviewers + 24 domain specialists |
139
+ | 🧠 **Skills** | `90` | Domain modules (Edge Computing, Red Team Tactics, GSAP, Framer Motion, TypeScript Advanced) |
140
+ | ⚡ **Workflows** | `31` | Slash command procedures including `/swarm`, `/tribunal-full`, `/ui-ux-pro-max` |
141
+ | 🛠️ **Scripts** | `25` | CI/CD, linting, payload dispatching, security scanning, case law, skill evolution |
86
142
 
87
143
 
88
144
  <br>
@@ -112,7 +168,7 @@ Unleash parallel reviewers on existing code.
112
168
  | Command | Action |
113
169
  | :--- | :--- |
114
170
  | <code>/review</code> | Audit code for silent degradation and logic holes. |
115
- | <code>/tribunal-full</code> | Unleash **ALL 11** reviewers simultaneously. Maximum scrutiny. |
171
+ | <code>/tribunal-full</code> | Unleash **ALL 16** reviewers simultaneously. Maximum scrutiny. |
116
172
  | <code>/tribunal-backend</code> | Summons <code>[ Logic + Security + Dependency + Types ]</code> |
117
173
  | <code>/tribunal-frontend</code> | Summons <code>[ Logic + Security + Frontend + Types ]</code> |
118
174
  | <code>/tribunal-database</code> | Summons <code>[ Logic + Security + SQL ]</code> |