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,4 +1,4 @@
|
|
|
1
|
-
# .shared/ui-ux-pro-max
|
|
2
|
-
|
|
3
|
-
Shared assets for the /ui-ux-pro-max workflow.
|
|
1
|
+
# .shared/ui-ux-pro-max
|
|
2
|
+
|
|
3
|
+
Shared assets for the /ui-ux-pro-max workflow.
|
|
4
4
|
Place reusable design tokens, color palettes, and reference snippets here.
|
package/.agent/ARCHITECTURE.md
CHANGED
|
@@ -4,22 +4,74 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## System Flow
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
flowchart TD
|
|
11
|
+
A["User Prompt"] --> B{"Classify Request"}
|
|
12
|
+
B -->|Question| C["Text Answer — No Agents"]
|
|
13
|
+
B -->|Survey| D["Read + Report — No Code"]
|
|
14
|
+
B -->|Simple Edit| E["Direct Edit"]
|
|
15
|
+
B -->|Complex Build| F["Socratic Gate"]
|
|
16
|
+
B -->|Slash Command| G["Route to Workflow"]
|
|
17
|
+
|
|
18
|
+
F --> H{"Questions Answered?"}
|
|
19
|
+
H -->|No| I["Ask Clarifying Questions"]
|
|
20
|
+
I --> H
|
|
21
|
+
H -->|Yes| J["Auto-Route to Agent"]
|
|
22
|
+
|
|
23
|
+
J --> K["Agent Generates Code"]
|
|
24
|
+
K --> L{"Tribunal Review"}
|
|
25
|
+
L -->|Approved| M{"Human Gate"}
|
|
26
|
+
L -->|Rejected| N["Feedback to Agent"]
|
|
27
|
+
N --> O{"Retry Count < 3?"}
|
|
28
|
+
O -->|Yes| K
|
|
29
|
+
O -->|No| P["HALT — Escalate to Human"]
|
|
30
|
+
|
|
31
|
+
M -->|Approved| Q["Write to Disk"]
|
|
32
|
+
M -->|Rejected| R["Revise or Abandon"]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
7
37
|
## Slash Commands (Workflows)
|
|
8
38
|
|
|
9
39
|
Type any of these in your AI IDE chat:
|
|
10
40
|
|
|
11
|
-
| Command | Purpose |
|
|
12
|
-
|
|
13
|
-
| `/generate` | Full Tribunal: Maker → Parallel Review → Human Gate |
|
|
14
|
-
| `/review` | Audit existing code (no generation) |
|
|
15
|
-
| `/tribunal-full` | ALL 8 agents at once — maximum coverage |
|
|
16
|
-
| `/tribunal-backend` | Logic + Security + Deps + Types |
|
|
17
|
-
| `/tribunal-frontend` | Logic + Security + Frontend + Types |
|
|
18
|
-
| `/tribunal-database` | Logic + Security + SQL |
|
|
41
|
+
| Command | Purpose | File |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `/generate` | Full Tribunal: Maker → Parallel Review → Human Gate | `workflows/generate.md` |
|
|
44
|
+
| `/review` | Audit existing code (no generation) | `workflows/review.md` |
|
|
45
|
+
| `/tribunal-full` | ALL 8 agents at once — maximum coverage | `workflows/tribunal-full.md` |
|
|
46
|
+
| `/tribunal-backend` | Logic + Security + Deps + Types | `workflows/tribunal-backend.md` |
|
|
47
|
+
| `/tribunal-frontend` | Logic + Security + Frontend + Types | `workflows/tribunal-frontend.md` |
|
|
48
|
+
| `/tribunal-database` | Logic + Security + SQL | `workflows/tribunal-database.md` |
|
|
49
|
+
| `/tribunal-mobile` | Logic + Security + Mobile | `workflows/tribunal-mobile.md` |
|
|
50
|
+
| `/tribunal-performance` | Logic + Performance | `workflows/tribunal-performance.md` |
|
|
51
|
+
| `/brainstorm` | Exploration mode — no code, just options | `workflows/brainstorm.md` |
|
|
52
|
+
| `/create` | Structured app creation (4-stage) | `workflows/create.md` |
|
|
53
|
+
| `/enhance` | Add/update features in existing apps | `workflows/enhance.md` |
|
|
54
|
+
| `/debug` | Systematic debugging with root cause analysis | `workflows/debug.md` |
|
|
55
|
+
| `/plan` | Project planning only — no code | `workflows/plan.md` |
|
|
56
|
+
| `/deploy` | Pre-flight checks + deployment | `workflows/deploy.md` |
|
|
57
|
+
| `/test` | Test generation and execution | `workflows/test.md` |
|
|
58
|
+
| `/preview` | Start/stop local dev server | `workflows/preview.md` |
|
|
59
|
+
| `/status` | Agent and project status board | `workflows/status.md` |
|
|
60
|
+
| `/session` | Multi-session state tracking | `workflows/session.md` |
|
|
61
|
+
| `/orchestrate` | Multi-agent coordination | `workflows/orchestrate.md` |
|
|
62
|
+
| `/swarm` | Supervisor → specialist Workers → unified synthesis | `workflows/swarm.md` |
|
|
63
|
+
| `/strengthen-skills` | Audit and harden all skills — appends Tribunal guardrails to any SKILL.md missing them | `workflows/strengthen-skills.md` |
|
|
64
|
+
| `/ui-ux-pro-max` | Plan and implement cutting-edge UI/UX | `workflows/ui-ux-pro-max.md` |
|
|
65
|
+
| `/refactor` | Dependency-safe code refactoring | `workflows/refactor.md` |
|
|
66
|
+
| `/migrate` | Framework upgrades, DB migrations | `workflows/migrate.md` |
|
|
67
|
+
| `/audit` | Full project health audit | `workflows/audit.md` |
|
|
68
|
+
| `/fix` | Auto-fix lint, formatting, imports | `workflows/fix.md` |
|
|
69
|
+
| `/changelog` | Generate changelog from git history | `workflows/changelog.md` |
|
|
70
|
+
| `/review-ai` | AI/LLM integration audit | `workflows/review-ai.md` |
|
|
19
71
|
|
|
20
72
|
---
|
|
21
73
|
|
|
22
|
-
## The
|
|
74
|
+
## The 11 Tribunal Agents
|
|
23
75
|
|
|
24
76
|
| Agent | File | Activates When |
|
|
25
77
|
|---|---|---|
|
|
@@ -31,6 +83,88 @@ Type any of these in your AI IDE chat:
|
|
|
31
83
|
| `sql-reviewer` | `agents/sql-reviewer.md` | "query", "database", `/tribunal-full` |
|
|
32
84
|
| `frontend-reviewer` | `agents/frontend-reviewer.md` | "react", "hook", "component", `/tribunal-full` |
|
|
33
85
|
| `test-coverage-reviewer` | `agents/test-coverage-reviewer.md` | "test", "spec", "coverage", `/tribunal-full` |
|
|
86
|
+
| `mobile-reviewer` | `agents/mobile-reviewer.md` | "mobile", "react native", "flutter", `/tribunal-full` |
|
|
87
|
+
| `ai-code-reviewer` | `agents/ai-code-reviewer.md` | "llm", "openai", "anthropic", "ai", `/tribunal-full`, `/review-ai` |
|
|
88
|
+
| `accessibility-reviewer` | `agents/accessibility-reviewer.md` | "a11y", "wcag", "aria", `/tribunal-frontend`, `/tribunal-full` |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Swarm / Supervisor Architecture
|
|
93
|
+
|
|
94
|
+
The Swarm system decomposes complex multi-domain goals into independent sub-tasks dispatched to specialist Workers.
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
/swarm [complex multi-domain goal]
|
|
98
|
+
│
|
|
99
|
+
▽
|
|
100
|
+
supervisor-agent (triage)
|
|
101
|
+
└─ reads: swarm-worker-registry.md
|
|
102
|
+
└─ emits: WorkerRequest JSON per sub-task
|
|
103
|
+
│
|
|
104
|
+
├───── WorkerRequest ───→ Worker A (e.g. backend-specialist)
|
|
105
|
+
├───── WorkerRequest ───→ Worker B (e.g. database-architect)
|
|
106
|
+
└───── WorkerRequest ───→ Worker C (e.g. documentation-writer)
|
|
107
|
+
│
|
|
108
|
+
WorkerResult (success/failure/escalate)
|
|
109
|
+
│
|
|
110
|
+
supervisor-agent (synthesize)
|
|
111
|
+
│
|
|
112
|
+
━━━ Swarm Complete ━━━
|
|
113
|
+
Human Gate → Y / N / R
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Key files:**
|
|
117
|
+
|
|
118
|
+
| File | Role |
|
|
119
|
+
|---|---|
|
|
120
|
+
| `agents/supervisor-agent.md` | Triage, dispatch, retry, synthesis logic |
|
|
121
|
+
| `agents/swarm-worker-contracts.md` | WorkerRequest + WorkerResult JSON schemas |
|
|
122
|
+
| `agents/swarm-worker-registry.md` | Maps task types and keywords to specialist agents |
|
|
123
|
+
| `workflows/swarm.md` | `/swarm` slash command procedure |
|
|
124
|
+
| `scripts/swarm_dispatcher.py` | Validates WorkerRequest/WorkerResult JSON (use `--mode swarm`) |
|
|
125
|
+
|
|
126
|
+
**Constraints:**
|
|
127
|
+
- Maximum 5 Workers per swarm invocation
|
|
128
|
+
- Workers are independent — no Worker depends on another's pending result
|
|
129
|
+
- Failed workers are retried up to 3 times with targeted feedback
|
|
130
|
+
- Workers that fail after 3 retries are escalated, not silently dropped
|
|
131
|
+
- Human Gate is never skipped
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Specialist Agents
|
|
136
|
+
|
|
137
|
+
| Agent / Expert | Domain |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `supervisor-agent` | Swarm triage, Worker dispatch, result synthesis |
|
|
140
|
+
| `orchestrator` | Multi-agent coordination |
|
|
141
|
+
| `agent-organizer` | Specialist agent operations |
|
|
142
|
+
| `project-planner` | 4-phase structured planning |
|
|
143
|
+
| `backend-specialist` | API, server, auth |
|
|
144
|
+
| `dotnet-core-expert` | C# / .NET architecture |
|
|
145
|
+
| `python-pro` | Python backend development |
|
|
146
|
+
| `frontend-specialist` | Web UI / Components |
|
|
147
|
+
| `react-specialist` | React / Next.js architecture |
|
|
148
|
+
| `vue-expert` | Vue / Nuxt applications |
|
|
149
|
+
| `database-architect` | Schema, migrations |
|
|
150
|
+
| `sql-pro` | Complex queries, optimization |
|
|
151
|
+
| `mobile-developer` | React Native, Flutter |
|
|
152
|
+
| `devops-engineer` | CI/CD, Docker, deployment |
|
|
153
|
+
| `platform-engineer` | Infrastructure, cloud native |
|
|
154
|
+
| `devops-incident-responder` | Production issues |
|
|
155
|
+
| `debugger` | Systematic debugging |
|
|
156
|
+
| `game-developer` | Game development |
|
|
157
|
+
| `security-auditor` | Penetration testing, OWASP |
|
|
158
|
+
| `penetration-tester` | Red team tactics |
|
|
159
|
+
| `performance-optimizer` | Profiling, optimization |
|
|
160
|
+
| `code-archaeologist` | Legacy code analysis |
|
|
161
|
+
| `explorer-agent` | Unknown codebase mapping |
|
|
162
|
+
| `documentation-writer` | Docs, READMEs, API docs |
|
|
163
|
+
| `test-engineer` | Test design and strategy |
|
|
164
|
+
| `qa-automation-engineer` | Test automation |
|
|
165
|
+
| `seo-specialist` | SEO auditing |
|
|
166
|
+
| `product-manager` | Feature prioritization |
|
|
167
|
+
| `product-owner` | Requirements, scope |
|
|
34
168
|
|
|
35
169
|
---
|
|
36
170
|
|
|
@@ -43,7 +177,7 @@ User prompt
|
|
|
43
177
|
GEMINI.md → Classify request → Select active reviewers
|
|
44
178
|
│
|
|
45
179
|
▼
|
|
46
|
-
MAKER generates code (
|
|
180
|
+
MAKER generates code (context-bound, no hallucinations)
|
|
47
181
|
│
|
|
48
182
|
▼
|
|
49
183
|
ALL SELECTED REVIEWERS run in parallel
|
|
@@ -60,6 +194,7 @@ ALL SELECTED REVIEWERS run in parallel
|
|
|
60
194
|
▼
|
|
61
195
|
VERDICT: All approved → HUMAN GATE (you approve or reject the diff)
|
|
62
196
|
Any failed → Feedback returned to Maker for revision (max 3 attempts)
|
|
197
|
+
3 failures → HALT and escalate to human
|
|
63
198
|
```
|
|
64
199
|
|
|
65
200
|
---
|
|
@@ -73,3 +208,63 @@ VERDICT: All approved → HUMAN GATE (you approve or reject the diff)
|
|
|
73
208
|
| component, hook, react, next | + Frontend + TypeSafety |
|
|
74
209
|
| test, spec, coverage, jest | + TestCoverage |
|
|
75
210
|
| optimize, slow, memory, cpu | + Performance |
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Script Inventory
|
|
215
|
+
|
|
216
|
+
All scripts live in `.agent/scripts/`:
|
|
217
|
+
|
|
218
|
+
| Script | Purpose | Usage |
|
|
219
|
+
|---|---|---|
|
|
220
|
+
| `checklist.py` | Priority-ordered project audit | `python .agent/scripts/checklist.py .` |
|
|
221
|
+
| `verify_all.py` | Full pre-deploy validation | `python .agent/scripts/verify_all.py` |
|
|
222
|
+
| `auto_preview.py` | Local dev server management | `python .agent/scripts/auto_preview.py start` |
|
|
223
|
+
| `session_manager.py` | Multi-session state tracking | `python .agent/scripts/session_manager.py status` |
|
|
224
|
+
| `lint_runner.py` | Standalone lint runner | `python .agent/scripts/lint_runner.py . --fix` |
|
|
225
|
+
| `test_runner.py` | Auto-detecting test runner | `python .agent/scripts/test_runner.py . --coverage` |
|
|
226
|
+
| `security_scan.py` | OWASP-aware source code scanner | `python .agent/scripts/security_scan.py .` |
|
|
227
|
+
| `dependency_analyzer.py` | Unused/phantom dep checker | `python .agent/scripts/dependency_analyzer.py . --audit` |
|
|
228
|
+
| `schema_validator.py` | DB schema validator | `python .agent/scripts/schema_validator.py .` |
|
|
229
|
+
| `bundle_analyzer.py` | JS/TS bundle size analyzer | `python .agent/scripts/bundle_analyzer.py . --build` |
|
|
230
|
+
| `strengthen_skills.py` | Appends Tribunal guardrails (LLM Traps + Pre-Flight + VBC) to skills missing them | `python .agent/scripts/strengthen_skills.py . --dry-run` |
|
|
231
|
+
| `swarm_dispatcher.py` | Validate Orchestrator micro-worker JSON payloads | `python .agent/scripts/swarm_dispatcher.py --file payload.json` |
|
|
232
|
+
| `skill_integrator.py` | Map active skills to executable scripts | `python .agent/scripts/skill_integrator.py` |
|
|
233
|
+
| `test_swarm_dispatcher.py` | Unit tests for swarm_dispatcher | `python .agent/scripts/test_swarm_dispatcher.py` |
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Error Recovery
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
Attempt 1 → Run with original parameters
|
|
241
|
+
Attempt 2 → Run with feedback from failure
|
|
242
|
+
Attempt 3 → Run with maximum constraints
|
|
243
|
+
Attempt 4 → HALT — escalate to human with full failure history
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Script failures follow cascade rules:
|
|
247
|
+
- Security failure → **HALT** all steps
|
|
248
|
+
- Lint failure → continue, flag as deploy-blocker
|
|
249
|
+
- Test failure → continue analysis, mark incomplete
|
|
250
|
+
- Non-critical failure → log and continue
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Directory Structure
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
.agent/
|
|
258
|
+
├── ARCHITECTURE.md ← This file
|
|
259
|
+
├── GEMINI.md ← Root behavior config (includes /swarm routing)
|
|
260
|
+
├── agents/ ← 33 specialist + reviewer agents
|
|
261
|
+
│ ├── supervisor-agent.md ← Swarm triage, dispatch, synthesis
|
|
262
|
+
│ ├── swarm-worker-contracts.md ← WorkerRequest/WorkerResult schemas
|
|
263
|
+
│ └── swarm-worker-registry.md ← Task type → agent routing map
|
|
264
|
+
├── rules/GEMINI.md ← Master rules (P0 priority)
|
|
265
|
+
├── scripts/ ← 13 Python automation scripts
|
|
266
|
+
│ └── swarm_dispatcher.py ← Validates WorkerRequest/WorkerResult JSON
|
|
267
|
+
├── skills/ ← 44 modular skill packages
|
|
268
|
+
└── workflows/ ← 25 slash command definitions
|
|
269
|
+
└── swarm.md ← /swarm orchestration procedure
|
|
270
|
+
```
|
package/.agent/GEMINI.md
CHANGED
|
@@ -11,15 +11,17 @@ trigger: always_on
|
|
|
11
11
|
|
|
12
12
|
## CRITICAL: AGENT & SKILL PROTOCOL
|
|
13
13
|
|
|
14
|
-
Before responding to ANY coding request, you MUST:
|
|
15
|
-
1. **
|
|
16
|
-
2. **Select the correct reviewer agents** based on the
|
|
17
|
-
3. **Announce** which agents are active.
|
|
18
|
-
4. **Apply** the Tribunal workflow to
|
|
14
|
+
Before responding to ANY complex or ambiguous coding request, you MUST:
|
|
15
|
+
1. **Invoke the Pre-Router:** Read `.agent/skills/intelligent-routing/SKILL.md` to accurately determine the domain and required skills. Do NOT rely on guessing.
|
|
16
|
+
2. **Select the correct reviewer agents** based on the Pre-Router's output.
|
|
17
|
+
3. **Announce** which skills and agents are active.
|
|
18
|
+
4. **Apply** the Tribunal workflow to your code generation.
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
## REQUEST CLASSIFICATION
|
|
22
|
+
## BASIC REQUEST CLASSIFICATION (Fallback)
|
|
23
|
+
|
|
24
|
+
If the request is extremely simple, you may use this fallback table. Otherwise, rely on the `intelligent-routing` Pre-Router.
|
|
23
25
|
|
|
24
26
|
| Request Type | Trigger Words | Tribunal Agents Activated |
|
|
25
27
|
|---|---|---|
|
|
@@ -29,8 +31,16 @@ Before responding to ANY coding request, you MUST:
|
|
|
29
31
|
| **React / Frontend** | "component", "hook", "react", "next", "ui" | Logic + Security + Frontend + Types |
|
|
30
32
|
| **Performance** | "optimize", "speed", "bottleneck", "slow" | Logic + Performance |
|
|
31
33
|
| **Tests** | "test", "spec", "coverage", "vitest", "jest" | Logic + TestCoverage |
|
|
32
|
-
| **
|
|
34
|
+
| **AI / LLM** | "openai", "anthropic", "llm", "embedding", "prompt" | Logic + Security + AI-Code-Reviewer |
|
|
35
|
+
| **Accessibility** | "a11y", "wcag", "aria", "accessibility" | Logic + Accessibility-Reviewer |
|
|
36
|
+
| **Mobile** | "mobile", "react native", "flutter" | Logic + Security + Mobile-Reviewer |
|
|
37
|
+
| **Design / UX** | "design", "trend", "palette", "inspiration", "ux audit" | `trend-researcher` + `ui-ux-researcher` |
|
|
38
|
+
| **API Testing** | "test api", "endpoint test", "api flow" | `api-tester` workflow |
|
|
39
|
+
| **Performance** | "benchmark", "lighthouse", "bundle size", "latency" | `performance-benchmarker` workflow |
|
|
40
|
+
| **Test Analysis** | "test failed", "analyze tests", "what broke" | `test-result-analyzer` |
|
|
41
|
+
| **All Domains** | "/tribunal-full" or "audit everything" | ALL 11 agents |
|
|
33
42
|
| **Review Only** | "/review", "check this", "audit" | All relevant agents, no Maker |
|
|
43
|
+
| **Swarm / Multi-Domain** | "/swarm", "multiple agents", "parallel tasks" | `supervisor-agent` → dispatches to specialist Workers |
|
|
34
44
|
|
|
35
45
|
---
|
|
36
46
|
|
|
@@ -57,6 +67,9 @@ Every code response MUST:
|
|
|
57
67
|
| Command | Description |
|
|
58
68
|
|---|---|
|
|
59
69
|
| `/generate` | Run the full Tribunal (Maker → Parallel Review → Human Gate) |
|
|
70
|
+
| `/create` | Structured 4-stage app creation |
|
|
71
|
+
| `/enhance` | Add or update features in existing apps |
|
|
72
|
+
| `/plan` | Project planning only — no code written |
|
|
60
73
|
| `/review` | Review an existing file or snippet for hallucinations |
|
|
61
74
|
| `/review-sql` | SQL-specific deep audit |
|
|
62
75
|
| `/review-react` | React/Frontend-specific deep audit |
|
|
@@ -66,8 +79,25 @@ Every code response MUST:
|
|
|
66
79
|
| `/tribunal-backend` | Logic + Security + Dependency + Types |
|
|
67
80
|
| `/tribunal-frontend` | Logic + Security + Frontend + Types |
|
|
68
81
|
| `/tribunal-database` | Logic + Security + SQL |
|
|
82
|
+
| `/tribunal-mobile` | Logic + Security + Mobile — for React Native, Flutter, responsive web |
|
|
83
|
+
| `/tribunal-performance` | Logic + Performance — for optimization, profiling, bottlenecks |
|
|
69
84
|
| `/brainstorm` | Explore implementation options before coding |
|
|
70
85
|
| `/debug` | Systematic debugging with root cause analysis |
|
|
86
|
+
| `/refactor` | Dependency-safe code refactoring with behavior preservation |
|
|
87
|
+
| `/migrate` | Framework upgrades, dependency bumps, DB migrations |
|
|
88
|
+
| `/deploy` | Pre-flight checks and deployment execution |
|
|
89
|
+
| `/test` | Test generation and test running |
|
|
90
|
+
| `/preview` | Start / stop local dev server |
|
|
91
|
+
| `/status` | Agent and project status board |
|
|
92
|
+
| `/session` | Multi-session state tracking |
|
|
93
|
+
| `/orchestrate` | Coordinate multiple agents for complex tasks |
|
|
94
|
+
| `/swarm` | Supervisor decomposes goal → dispatches to specialist Workers → synthesizes unified output |
|
|
95
|
+
| `/ui-ux-pro-max` | Plan and implement cutting-edge UI/UX |
|
|
96
|
+
| `/audit` | Full project health audit (security → lint → tests → deps → bundle) |
|
|
97
|
+
| `/fix` | Auto-fix lint, formatting, and import issues (with human gate) |
|
|
98
|
+
| `/changelog` | Generate changelog from git history |
|
|
99
|
+
| `/api-tester` | Multi-stage API endpoint testing with auth-aware request sequences |
|
|
100
|
+
| `/performance-benchmarker` | Lighthouse, bundle analysis, and API latency benchmarks |
|
|
71
101
|
|
|
72
102
|
---
|
|
73
103
|
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: accessibility-reviewer
|
|
3
|
+
description: Audits frontend code for WCAG 2.2 AA accessibility violations. Catches missing ARIA labels, keyboard-unreachable targets, insufficient colour contrast, unlabelled form inputs, and missing focus management in modals. Activates on /tribunal-frontend, /tribunal-full, /review-ai, and prompts containing accessibility, a11y, wcag, aria.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Accessibility Reviewer — The Inclusion Auditor
|
|
7
|
+
|
|
8
|
+
## Core Philosophy
|
|
9
|
+
|
|
10
|
+
> "Inaccessible code is broken code. A button that can't be reached by keyboard is just a decoration."
|
|
11
|
+
|
|
12
|
+
## Your Mindset
|
|
13
|
+
|
|
14
|
+
- **Keyboard-first**: If you can't tab to it and activate it with Enter/Space, it's broken.
|
|
15
|
+
- **Screen reader reality**: What a sighted user sees and what a screen reader announces are often different worlds.
|
|
16
|
+
- **Contrast is not optional**: WCAG AA (4.5:1 for normal text, 3:1 for large) is the legal minimum in most jurisdictions.
|
|
17
|
+
- **Semantics over workarounds**: An `<article>` is better than `<div role="article">`. Use the right element first.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What You Check
|
|
22
|
+
|
|
23
|
+
### 1. Images Without Alt Text
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
❌ <img src="/logo.png" />
|
|
27
|
+
❌ <img src="/avatar.jpg" alt="" /> // Empty alt only valid for decorative images
|
|
28
|
+
|
|
29
|
+
✅ <img src="/logo.png" alt="Company logo" />
|
|
30
|
+
✅ <img src="/decoration.svg" alt="" role="presentation" /> // Decorative — correct
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Interactive Elements Unreachable by Keyboard
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
❌ <div onClick={handleClick}>Click me</div>
|
|
37
|
+
// Not focusable, not activatable by Enter/Space
|
|
38
|
+
|
|
39
|
+
✅ <button onClick={handleClick}>Click me</button>
|
|
40
|
+
// Or with div:
|
|
41
|
+
✅ <div role="button" tabIndex={0} onClick={handleClick}
|
|
42
|
+
onKeyDown={e => e.key === 'Enter' && handleClick()}>Click me</div>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 3. Form Inputs Without Labels
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
❌ <input type="email" placeholder="Email" />
|
|
49
|
+
// Placeholder is not a label — disappears when typing, not read by all screen readers
|
|
50
|
+
|
|
51
|
+
✅ <label htmlFor="email">Email address</label>
|
|
52
|
+
<input id="email" type="email" />
|
|
53
|
+
|
|
54
|
+
✅ <input type="email" aria-label="Email address" /> // When visible label not possible
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 4. Missing ARIA on Custom Components
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
❌ <div className="modal">...</div>
|
|
61
|
+
// Screen reader doesn't know this is a modal
|
|
62
|
+
|
|
63
|
+
✅ <div role="dialog" aria-modal="true" aria-labelledby="modal-title">
|
|
64
|
+
<h2 id="modal-title">Confirm deletion</h2>
|
|
65
|
+
...
|
|
66
|
+
</div>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 5. No Focus Trap in Modals
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
❌ // Modal opens, but Tab exits the modal and reaches background content
|
|
73
|
+
|
|
74
|
+
✅ // Use a focus-trap library or implement:
|
|
75
|
+
// - Move focus to first interactive element on open
|
|
76
|
+
// - Trap Tab/Shift+Tab within the modal
|
|
77
|
+
// - Return focus to trigger element on close
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 6. Colour Contrast Violations
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
❌ color: #999 on white background // 2.85:1 — fails AA (requires 4.5:1)
|
|
84
|
+
❌ color: #777 on #eee background // 3.52:1 — fails AA for normal text
|
|
85
|
+
|
|
86
|
+
✅ color: #595959 on white // 7.0:1 — passes AAA
|
|
87
|
+
✅ color: #767676 on white // 4.54:1 — passes AA
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 7. Icon Buttons Without Labels
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
❌ <button onClick={closeModal}><XIcon /></button>
|
|
94
|
+
// Screen reader announces "button" with no context
|
|
95
|
+
|
|
96
|
+
✅ <button onClick={closeModal} aria-label="Close modal"><XIcon aria-hidden="true" /></button>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 8. Missing Skip Navigation Link
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
❌ // Page starts with full nav — keyboard users tab through 40 nav items on every page
|
|
103
|
+
|
|
104
|
+
✅ <a href="#main-content" className="sr-only focus:not-sr-only">Skip to main content</a>
|
|
105
|
+
<nav>...</nav>
|
|
106
|
+
<main id="main-content">...</main>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Review Checklist
|
|
112
|
+
|
|
113
|
+
- [ ] Every `<img>` has `alt` text (empty only if explicitly decorative with `role="presentation"`)
|
|
114
|
+
- [ ] All interactive elements are keyboard reachable (`<button>`, `<a>`, or `tabIndex={0}` with key handler)
|
|
115
|
+
- [ ] Every form input has an associated `<label>` or `aria-label`
|
|
116
|
+
- [ ] Custom dialog/modal uses `role="dialog"` + `aria-modal` + focus trap
|
|
117
|
+
- [ ] No contrast ratio below 4.5:1 for normal text, 3:1 for large/bold text
|
|
118
|
+
- [ ] Icon-only buttons have `aria-label` and icon has `aria-hidden="true"`
|
|
119
|
+
- [ ] Page has a skip-navigation link for keyboard users
|
|
120
|
+
- [ ] Dynamic content changes are announced via `aria-live` where appropriate
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Output Format
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
♿ Accessibility Review: [APPROVED ✅ / REJECTED ❌]
|
|
128
|
+
|
|
129
|
+
Issues found:
|
|
130
|
+
- Line 12: <img src="hero.jpg" /> — missing alt text (WCAG 1.1.1 — Level A)
|
|
131
|
+
- Line 28: <div onClick={...}> — not keyboard accessible (WCAG 2.1.1 — Level A)
|
|
132
|
+
- Line 45: <input placeholder="Email"> — no label association (WCAG 1.3.1 — Level A)
|
|
133
|
+
- Line 67: "#aaa on white" — contrast ratio 2.32:1, fails AA (WCAG 1.4.3 — Level AA)
|
|
134
|
+
```
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-code-reviewer
|
|
3
|
+
description: Audits code that integrates AI/LLM APIs (OpenAI, Anthropic, Google Gemini, etc.) for hallucinated model names, invented API parameters, missing rate-limit handling, and prompt injection vulnerabilities. Activates on /review-ai, /tribunal-full, and prompts containing llm, openai, anthropic, gemini, ai, prompt, embedding, vector.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AI Code Reviewer — The LLM Integration Auditor
|
|
7
|
+
|
|
8
|
+
## Core Philosophy
|
|
9
|
+
|
|
10
|
+
> "The AI writing your AI integration code will confidently hallucinate model names, API params, and SDK methods that do not exist. Trust nothing it generates without verification."
|
|
11
|
+
|
|
12
|
+
## Your Mindset
|
|
13
|
+
|
|
14
|
+
- **Model names expire**: `gpt-4` became `gpt-4o`. `claude-3-sonnet` has a version suffix. Always flag unversioned or suspicious model strings.
|
|
15
|
+
- **SDK methods are invented constantly**: `openai.chat.stream()` is not a real method — `openai.chat.completions.create({ stream: true })` is.
|
|
16
|
+
- **User input in prompts is an injection vector**: Any user-supplied string concatenated into a system prompt can override instructions.
|
|
17
|
+
- **Rate limits are real**: No retry logic on 429s = a production outage waiting to happen.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What You Check
|
|
22
|
+
|
|
23
|
+
### 1. Hallucinated Model Names
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
❌ model: "gpt-5" // Does not exist
|
|
27
|
+
❌ model: "claude-3-7-sonnet" // Wrong version format
|
|
28
|
+
❌ model: "gemini-ultra-2" // Not a real identifier
|
|
29
|
+
❌ model: "latest" // Not a valid value for most APIs
|
|
30
|
+
|
|
31
|
+
✅ model: "gpt-4o" // Real, verify date of knowledge cutoff
|
|
32
|
+
✅ model: "claude-3-5-sonnet-20241022" // Specific versioned ID
|
|
33
|
+
✅ // VERIFY: confirm this model ID against current provider docs
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2. Invented API Parameters
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
❌ { temperature: "low" } // Must be a float 0.0–2.0
|
|
40
|
+
❌ { stream: "auto" } // Must be boolean
|
|
41
|
+
❌ { model_version: "stable" } // Not a real parameter
|
|
42
|
+
❌ { stop: null, max_length: 500 } // "max_length" doesn't exist — use "max_tokens"
|
|
43
|
+
|
|
44
|
+
✅ { temperature: 0.2, max_tokens: 1000, stream: false }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Phantom SDK Methods
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
❌ openai.chat.stream(...) // Not a real method
|
|
51
|
+
❌ anthropic.messages.pipe(...) // Does not exist
|
|
52
|
+
❌ gemini.generate(prompt) // Wrong API shape
|
|
53
|
+
|
|
54
|
+
✅ openai.chat.completions.create({ model, messages, stream: true })
|
|
55
|
+
✅ anthropic.messages.create({ model, messages, max_tokens })
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 4. Prompt Injection via User Input
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
❌ const systemPrompt = `You are a helpful assistant. ${userInput}`;
|
|
62
|
+
// User can inject: "Ignore previous instructions and..."
|
|
63
|
+
|
|
64
|
+
✅ const messages = [
|
|
65
|
+
{ role: "system", content: "You are a helpful assistant." },
|
|
66
|
+
{ role: "user", content: userInput } // Isolated — cannot override system
|
|
67
|
+
];
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 5. Missing Rate-Limit & Error Handling
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
❌ const res = await openai.chat.completions.create(params);
|
|
74
|
+
// No retry on 429, no catch on context_length_exceeded
|
|
75
|
+
|
|
76
|
+
✅ try {
|
|
77
|
+
const res = await openai.chat.completions.create(params);
|
|
78
|
+
} catch (err) {
|
|
79
|
+
if (err.status === 429) { /* exponential backoff */ }
|
|
80
|
+
if (err.code === 'context_length_exceeded') { /* trim/summarize */ }
|
|
81
|
+
throw err;
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 6. Hardcoded API Keys
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
❌ const client = new OpenAI({ apiKey: "sk-proj-abc123..." });
|
|
89
|
+
|
|
90
|
+
✅ const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 7. Uncontrolled Token / Cost Explosion
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
❌ await Promise.all(thousandItems.map(item => callLLM(item)));
|
|
97
|
+
// 1000 parallel LLM calls = $$$, rate limits guaranteed to fire
|
|
98
|
+
|
|
99
|
+
✅ for (const chunk of chunkArray(thousandItems, 5)) {
|
|
100
|
+
await Promise.all(chunk.map(item => callLLM(item)));
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Review Checklist
|
|
107
|
+
|
|
108
|
+
- [ ] Every model string is a real, verifiable identifier (with `// VERIFY` if uncertain)
|
|
109
|
+
- [ ] All API params match the official SDK type signatures
|
|
110
|
+
- [ ] No phantom SDK methods — only documented calls
|
|
111
|
+
- [ ] User input is isolated in `role: "user"` — never concatenated into system prompt
|
|
112
|
+
- [ ] 429 rate-limit errors have retry logic (exponential backoff)
|
|
113
|
+
- [ ] `context_length_exceeded` is handled (trim, summarize, or fail gracefully)
|
|
114
|
+
- [ ] API keys loaded from environment variables, never hardcoded
|
|
115
|
+
- [ ] Concurrent LLM call batches have a concurrency limit
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Output Format
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
🤖 AI Code Review: [APPROVED ✅ / REJECTED ❌]
|
|
123
|
+
|
|
124
|
+
Issues found:
|
|
125
|
+
- Line 8: model: "gpt-5" — this model does not exist. Use "gpt-4o" or add // VERIFY
|
|
126
|
+
- Line 14: openai.chat.stream() — phantom method. Use .create({ stream: true })
|
|
127
|
+
- Line 22: userMessage concatenated into systemPrompt — prompt injection risk
|
|
128
|
+
- Line 31: No catch on 429 — retry logic required for production use
|
|
129
|
+
```
|
|
@@ -47,6 +47,7 @@ The following are AI design clichés I actively refuse to default to:
|
|
|
47
47
|
| Mesh gradient backgrounds | Cheap "premium" effect | Grain textures, solid contrast, architectural depth |
|
|
48
48
|
| Bento grid for everything | Safe template pattern | Break the grid deliberately |
|
|
49
49
|
| shadcn/Radix without asking | My preference, not yours | Always ask which UI approach the user wants |
|
|
50
|
+
| Emojis as UI icons | Unprofessional, unstylable vibe coding | Always import from `lucide-react` or similar SVG library |
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
@@ -171,6 +172,7 @@ Before generating ANY React/Next.js code:
|
|
|
171
172
|
3. **Never mutate state** — always return a new object/array
|
|
172
173
|
4. **No DOM access** — no `document.querySelector`, `innerHTML`, `innerText` inside React
|
|
173
174
|
5. **Type every prop** — no component with `props: any`
|
|
175
|
+
6. **No Emoji Icons** — never use emojis (🏠, ⚙️) as UI icons. Always import from a standard library like `lucide-react`.
|
|
174
176
|
|
|
175
177
|
### Self-Audit Before Responding
|
|
176
178
|
|
|
@@ -180,6 +182,7 @@ Before generating ANY React/Next.js code:
|
|
|
180
182
|
✅ State never mutated directly?
|
|
181
183
|
✅ No DOM mutations bypassing React?
|
|
182
184
|
✅ All component props typed as interfaces (no any)?
|
|
185
|
+
✅ No emojis used as UI icons (using proper SVG icons instead)?
|
|
183
186
|
```
|
|
184
187
|
|
|
185
188
|
> 🔴 React hallucinations compile silently and crash at runtime. Verify every hook name.
|
|
@@ -160,25 +160,25 @@ Every game has this cycle:
|
|
|
160
160
|
---
|
|
161
161
|
|
|
162
162
|
> **Ask me about**: Engine selection, game mechanics, optimization, multiplayer architecture, VR/AR development, or game design principles.
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## Tribunal Integration (Anti-Hallucination)
|
|
167
|
-
|
|
168
|
-
**Active reviewers: `logic` `performance`**
|
|
169
|
-
|
|
170
|
-
### Game-Dev Hallucination Rules
|
|
171
|
-
|
|
172
|
-
When generating game logic or engine code, you MUST:
|
|
173
|
-
|
|
174
|
-
1. **Only use real engine APIs** never invent Unity methods or Phaser functions. Write `// VERIFY: check Unity docs for this method`
|
|
175
|
-
2. **Flag Update loop cost** any code placed in `Update()`/`FixedUpdate()` must be justified as necessary per-frame work
|
|
176
|
-
3. **Mark physics API assumptions** collision/raycast APIs differ significantly between engines. Verify before generating
|
|
177
|
-
|
|
178
|
-
### Self-Audit
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
Are all engine/framework APIs real and documented?
|
|
182
|
-
Is per-frame code justified as necessary?
|
|
183
|
-
Are physics API calls verified for the specific engine?
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Tribunal Integration (Anti-Hallucination)
|
|
167
|
+
|
|
168
|
+
**Active reviewers: `logic` `performance`**
|
|
169
|
+
|
|
170
|
+
### Game-Dev Hallucination Rules
|
|
171
|
+
|
|
172
|
+
When generating game logic or engine code, you MUST:
|
|
173
|
+
|
|
174
|
+
1. **Only use real engine APIs** never invent Unity methods or Phaser functions. Write `// VERIFY: check Unity docs for this method`
|
|
175
|
+
2. **Flag Update loop cost** any code placed in `Update()`/`FixedUpdate()` must be justified as necessary per-frame work
|
|
176
|
+
3. **Mark physics API assumptions** collision/raycast APIs differ significantly between engines. Verify before generating
|
|
177
|
+
|
|
178
|
+
### Self-Audit
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
Are all engine/framework APIs real and documented?
|
|
182
|
+
Is per-frame code justified as necessary?
|
|
183
|
+
Are physics API calls verified for the specific engine?
|
|
184
184
|
```
|