tribunal-kit 5.8.4 → 6.0.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/ARCHITECTURE.md +219 -215
- package/.agent/agents/accessibility-reviewer.md +66 -151
- package/.agent/agents/ai-code-reviewer.md +22 -2
- package/.agent/agents/anti-pattern-reviewer.md +99 -0
- package/.agent/agents/api-architect.md +19 -2
- package/.agent/agents/backend-specialist.md +25 -3
- package/.agent/agents/cloud-engineer.md +21 -0
- package/.agent/agents/code-archaeologist.md +20 -3
- package/.agent/agents/complexity-reviewer.md +22 -2
- package/.agent/agents/database-architect.md +24 -3
- package/.agent/agents/db-latency-auditor.md +22 -2
- package/.agent/agents/debugger.md +19 -3
- package/.agent/agents/dependency-reviewer.md +19 -2
- package/.agent/agents/devops-engineer.md +24 -3
- package/.agent/agents/documentation-writer.md +21 -3
- package/.agent/agents/explorer-agent.md +21 -3
- package/.agent/agents/frontend-reviewer.md +19 -3
- package/.agent/agents/frontend-specialist.md +72 -224
- package/.agent/agents/game-developer.md +22 -3
- package/.agent/agents/interaction-reviewer.md +118 -0
- package/.agent/agents/logic-reviewer.md +18 -3
- package/.agent/agents/minimalist-reviewer.md +98 -0
- package/.agent/agents/mobile-developer.md +21 -3
- package/.agent/agents/mobile-reviewer.md +22 -2
- package/.agent/agents/orchestrator.md +19 -3
- package/.agent/agents/penetration-tester.md +22 -3
- package/.agent/agents/performance-optimizer.md +21 -3
- package/.agent/agents/performance-reviewer.md +2 -0
- package/.agent/agents/precedence-reviewer.md +19 -5
- package/.agent/agents/product-manager.md +20 -3
- package/.agent/agents/product-owner.md +22 -1
- package/.agent/agents/product-reviewer.md +98 -0
- package/.agent/agents/project-planner.md +19 -3
- package/.agent/agents/qa-automation-engineer.md +24 -3
- package/.agent/agents/resilience-reviewer.md +21 -2
- package/.agent/agents/schema-reviewer.md +21 -2
- package/.agent/agents/security-auditor.md +7 -1
- package/.agent/agents/seo-specialist.md +18 -3
- package/.agent/agents/sql-reviewer.md +22 -2
- package/.agent/agents/supervisor-agent.md +22 -3
- package/.agent/agents/swarm-worker-registry.md +7 -0
- package/.agent/agents/system-architect.md +19 -0
- package/.agent/agents/test-coverage-reviewer.md +22 -2
- package/.agent/agents/test-engineer.md +21 -2
- package/.agent/agents/throughput-optimizer.md +22 -2
- package/.agent/agents/type-safety-reviewer.md +21 -2
- package/.agent/agents/ui-ux-auditor.md +44 -242
- package/.agent/agents/ui-visual-auditor.md +99 -0
- package/.agent/agents/ux-reviewer.md +104 -0
- package/.agent/agents/visual-reviewer.md +98 -0
- package/.agent/agents/vitals-reviewer.md +23 -2
- package/.agent/history/README.md +53 -0
- package/.agent/history/case-law/cases/template-case.json +19 -0
- package/.agent/history/integrity_manifest.json +131 -33
- package/.agent/history/memory/.memory.idx +1581 -1
- package/.agent/history/memory/MEMORY.md +105 -1
- package/.agent/routing_index.json +272 -690
- package/.agent/rules/GEMINI.md +10 -12
- package/.agent/rules/GEMINI_PLANNER.md +84 -0
- package/.agent/scripts/_utils.js +28 -7
- package/.agent/scripts/case_law_manager.js +2 -0
- package/.agent/scripts/context_broker.js +152 -19
- package/.agent/scripts/guardrail_engine.js +60 -5
- package/.agent/scripts/impact_classifier.js +167 -0
- package/.agent/scripts/integrity_manifest.js +10 -4
- package/.agent/scripts/marathon_harness.js +10 -1
- package/.agent/scripts/minimal_change_engine.js +437 -0
- package/.agent/scripts/pipeline_engine.js +856 -0
- package/.agent/scripts/skill_evolution.js +36 -21
- package/.agent/scripts/socratic_gate_policy.js +60 -0
- package/.agent/scripts/swarm_dispatcher.js +65 -6
- package/.agent/scripts/token_budget_broker.js +52 -0
- package/.agent/scripts/verify_all.js +13 -0
- package/.agent/scripts/visual_audit.js +92 -0
- package/.agent/skills/12-principles-of-animation/SKILL.md +19 -10
- package/.agent/skills/60fps-animation/SKILL.md +19 -10
- package/.agent/skills/accessible-animation/SKILL.md +19 -10
- package/.agent/skills/adapt/SKILL.md +19 -10
- package/.agent/skills/advanced-rag-pipelines/SKILL.md +21 -3
- package/.agent/skills/agent-organizer/SKILL.md +21 -7
- package/.agent/skills/agentic-patterns/SKILL.md +19 -7
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +21 -7
- package/.agent/skills/animation-on-scroll/SKILL.md +19 -10
- package/.agent/skills/animation-systems/SKILL.md +19 -10
- package/.agent/skills/antfu-conventions/SKILL.md +21 -10
- package/.agent/skills/api-patterns/SKILL.md +21 -7
- package/.agent/skills/api-patterns/scripts/__pycache__/api_validator.cpython-311.pyc +0 -0
- package/.agent/skills/api-security-auditor/SKILL.md +21 -7
- package/.agent/skills/app-builder/SKILL.md +21 -7
- package/.agent/skills/apple-design/SKILL.md +19 -10
- package/.agent/skills/architecture/SKILL.md +21 -7
- package/.agent/skills/audit-and-fix/SKILL.md +19 -10
- package/.agent/skills/authentication-best-practices/SKILL.md +21 -7
- package/.agent/skills/backend-security-expert/SKILL.md +21 -7
- package/.agent/skills/baseline-ui/SKILL.md +19 -10
- package/.agent/skills/bash-linux/SKILL.md +21 -7
- package/.agent/skills/behavioral-modes/SKILL.md +19 -7
- package/.agent/skills/better-colors/SKILL.md +31 -14
- package/.agent/skills/better-ui/SKILL.md +19 -10
- package/.agent/skills/bolder/SKILL.md +19 -10
- package/.agent/skills/brainstorming/SKILL.md +17 -7
- package/.agent/skills/browser-native-ai/SKILL.md +19 -3
- package/.agent/skills/build-primitive/SKILL.md +19 -10
- package/.agent/skills/building-native-ui/SKILL.md +21 -7
- package/.agent/skills/cicd-pro/SKILL.md +21 -10
- package/.agent/skills/clarify/SKILL.md +19 -10
- package/.agent/skills/clean-code/SKILL.md +21 -7
- package/.agent/skills/cloud-architect/SKILL.md +21 -10
- package/.agent/skills/cobejs/SKILL.md +19 -10
- package/.agent/skills/code-review-checklist/SKILL.md +21 -7
- package/.agent/skills/codebase-design/SKILL.md +21 -10
- package/.agent/skills/colorize/SKILL.md +19 -10
- package/.agent/skills/compact-landing/SKILL.md +19 -10
- package/.agent/skills/company-logos/SKILL.md +19 -10
- package/.agent/skills/config-validator/SKILL.md +21 -7
- package/.agent/skills/containerization-pro/SKILL.md +21 -10
- package/.agent/skills/create-design-md/SKILL.md +19 -10
- package/.agent/skills/critique/SKILL.md +19 -10
- package/.agent/skills/csharp-developer/SKILL.md +21 -7
- package/.agent/skills/data-validation-schemas/SKILL.md +21 -7
- package/.agent/skills/database-design/SKILL.md +21 -7
- package/.agent/skills/database-design/scripts/__pycache__/schema_validator.cpython-311.pyc +0 -0
- package/.agent/skills/delight/SKILL.md +19 -10
- package/.agent/skills/deployment-procedures/SKILL.md +21 -7
- package/.agent/skills/design-lab/SKILL.md +21 -10
- package/.agent/skills/devops-engineer/SKILL.md +21 -7
- package/.agent/skills/devops-incident-responder/SKILL.md +21 -7
- package/.agent/skills/diagnosing-bugs/SKILL.md +21 -10
- package/.agent/skills/distill/SKILL.md +19 -10
- package/.agent/skills/documentation-templates/SKILL.md +21 -7
- package/.agent/skills/domain-modeling/SKILL.md +21 -10
- package/.agent/skills/edge-computing/SKILL.md +21 -7
- package/.agent/skills/emil-design-eng/SKILL.md +19 -10
- package/.agent/skills/error-resilience/SKILL.md +21 -7
- package/.agent/skills/extract-design-system/SKILL.md +21 -7
- package/.agent/skills/fabel-protocol/SKILL.md +19 -2
- package/.agent/skills/fixing-accessibility/SKILL.md +25 -14
- package/.agent/skills/fixing-metadata/SKILL.md +19 -10
- package/.agent/skills/fixing-motion-performance/SKILL.md +19 -10
- package/.agent/skills/framer-motion-expert/SKILL.md +19 -6
- package/.agent/skills/frontend-design/SKILL.md +66 -204
- package/.agent/skills/frontend-design/scripts/__pycache__/accessibility_checker.cpython-311.pyc +0 -0
- package/.agent/skills/frontend-design/scripts/__pycache__/ux_audit.cpython-311.pyc +0 -0
- package/.agent/skills/frontend-security-expert/SKILL.md +21 -7
- package/.agent/skills/game-design-expert/SKILL.md +21 -7
- package/.agent/skills/game-engineering-expert/SKILL.md +21 -7
- package/.agent/skills/generative-ui-expert/SKILL.md +19 -3
- package/.agent/skills/geo-fundamentals/SKILL.md +21 -7
- package/.agent/skills/geo-fundamentals/scripts/__pycache__/geo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/git-pro/SKILL.md +21 -10
- package/.agent/skills/github-operations/SKILL.md +21 -7
- package/.agent/skills/gpt-taste/SKILL.md +19 -10
- package/.agent/skills/gsap-core/SKILL.md +21 -4
- package/.agent/skills/gsap-frameworks/SKILL.md +21 -4
- package/.agent/skills/gsap-performance/SKILL.md +20 -5
- package/.agent/skills/gsap-plugins/SKILL.md +20 -5
- package/.agent/skills/gsap-react/SKILL.md +20 -5
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +21 -4
- package/.agent/skills/gsap-timeline/SKILL.md +20 -5
- package/.agent/skills/gsap-utils/SKILL.md +20 -5
- package/.agent/skills/harden/SKILL.md +19 -10
- package/.agent/skills/harness-protocol/SKILL.md +20 -4
- package/.agent/skills/i18n-localization/SKILL.md +21 -7
- package/.agent/skills/i18n-localization/scripts/__pycache__/i18n_checker.cpython-311.pyc +0 -0
- package/.agent/skills/impeccable/SKILL.md +21 -10
- package/.agent/skills/improve-codebase-architecture/SKILL.md +21 -10
- package/.agent/skills/improve-ui/SKILL.md +19 -10
- package/.agent/skills/intelligent-routing/SKILL.md +19 -7
- package/.agent/skills/knowledge-graph/SKILL.md +20 -4
- package/.agent/skills/landing-page/SKILL.md +20 -10
- package/.agent/skills/lint-and-validate/SKILL.md +21 -7
- package/.agent/skills/lint-and-validate/scripts/__pycache__/lint_runner.cpython-311.pyc +0 -0
- package/.agent/skills/lint-and-validate/scripts/__pycache__/type_coverage.cpython-311.pyc +0 -0
- package/.agent/skills/llm-engineering/SKILL.md +21 -7
- package/.agent/skills/local-first/SKILL.md +21 -7
- package/.agent/skills/local-first-architecture/SKILL.md +19 -10
- package/.agent/skills/lottie-animation/SKILL.md +19 -10
- package/.agent/skills/marquee-loop/SKILL.md +19 -10
- package/.agent/skills/masked-reveal/SKILL.md +19 -10
- package/.agent/skills/mcp-builder/SKILL.md +21 -7
- package/.agent/skills/micro-interaction/SKILL.md +19 -10
- package/.agent/skills/mobile-design/SKILL.md +21 -6
- package/.agent/skills/mobile-design/scripts/__pycache__/mobile_audit.cpython-311.pyc +0 -0
- package/.agent/skills/monorepo-management/SKILL.md +21 -7
- package/.agent/skills/morphing-icons/SKILL.md +19 -10
- package/.agent/skills/motion-engineering/SKILL.md +86 -171
- package/.agent/skills/nextjs-react-expert/SKILL.md +19 -7
- package/.agent/skills/nextjs-react-expert/scripts/__pycache__/convert_rules.cpython-311.pyc +0 -0
- package/.agent/skills/nextjs-react-expert/scripts/__pycache__/react_performance_checker.cpython-311.pyc +0 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +21 -7
- package/.agent/skills/observability/SKILL.md +21 -7
- package/.agent/skills/page-transition-animation/SKILL.md +19 -10
- package/.agent/skills/parallel-agents/SKILL.md +23 -7
- package/.agent/skills/performance-profiling/SKILL.md +21 -7
- package/.agent/skills/performance-profiling/scripts/__pycache__/lighthouse_audit.cpython-311.pyc +0 -0
- package/.agent/skills/plan-writing/SKILL.md +21 -7
- package/.agent/skills/platform-engineer/SKILL.md +21 -7
- package/.agent/skills/playwright-best-practices/SKILL.md +21 -7
- package/.agent/skills/polish/SKILL.md +19 -10
- package/.agent/skills/powershell-windows/SKILL.md +21 -7
- package/.agent/skills/pricing-page/SKILL.md +19 -10
- package/.agent/skills/product-aware-heuristics/SKILL.md +358 -0
- package/.agent/skills/progressive-blur/SKILL.md +19 -10
- package/.agent/skills/project-idioms/SKILL.md +20 -8
- package/.agent/skills/python-patterns/SKILL.md +21 -7
- package/.agent/skills/python-pro/SKILL.md +21 -6
- package/.agent/skills/quieter/SKILL.md +19 -10
- package/.agent/skills/react-doctor/SKILL.md +19 -10
- package/.agent/skills/react-specialist/SKILL.md +19 -6
- package/.agent/skills/readme-builder/SKILL.md +21 -7
- package/.agent/skills/realtime-patterns/SKILL.md +21 -7
- package/.agent/skills/red-team-tactics/SKILL.md +21 -7
- package/.agent/skills/redesign-skill/SKILL.md +19 -10
- package/.agent/skills/review-animations/SKILL.md +21 -10
- package/.agent/skills/rust-pro/SKILL.md +21 -7
- package/.agent/skills/seo-fundamentals/SKILL.md +21 -7
- package/.agent/skills/seo-fundamentals/scripts/__pycache__/seo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/server-management/SKILL.md +21 -7
- package/.agent/skills/shadcn-ui-expert/SKILL.md +21 -7
- package/.agent/skills/shape/SKILL.md +19 -10
- package/.agent/skills/skill-creator/SKILL.md +21 -7
- package/.agent/skills/soft-skill/SKILL.md +19 -10
- package/.agent/skills/sounds-on-the-web/SKILL.md +19 -10
- package/.agent/skills/sql-pro/SKILL.md +21 -7
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +21 -7
- package/.agent/skills/svg-animation/SKILL.md +19 -10
- package/.agent/skills/swiftui-expert/SKILL.md +21 -7
- package/.agent/skills/swiss-design/SKILL.md +19 -10
- package/.agent/skills/system-design-pro/SKILL.md +21 -9
- package/.agent/skills/systematic-debugging/SKILL.md +21 -7
- package/.agent/skills/tailwind-patterns/SKILL.md +21 -7
- package/.agent/skills/taste-skill/SKILL.md +19 -10
- package/.agent/skills/tdd-workflow/SKILL.md +21 -10
- package/.agent/skills/test-result-analyzer/SKILL.md +18 -6
- package/.agent/skills/testing-patterns/SKILL.md +21 -7
- package/.agent/skills/testing-patterns/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +21 -10
- package/.agent/skills/thinking-protocol/SKILL.md +20 -8
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +19 -10
- package/.agent/skills/transitions-dev/SKILL.md +19 -10
- package/.agent/skills/trend-researcher/SKILL.md +17 -6
- package/.agent/skills/typescript-advanced/SKILL.md +21 -7
- package/.agent/skills/typeset/SKILL.md +19 -10
- package/.agent/skills/ui-reasoning-engine/SKILL.md +154 -0
- package/.agent/skills/ui-skill-packs/SKILL.md +77 -0
- package/.agent/skills/ui-skills-root/SKILL.md +21 -9
- package/.agent/skills/ui-ux-pro-max/SKILL.md +62 -583
- package/.agent/skills/ui-ux-researcher/SKILL.md +17 -6
- package/.agent/skills/vue-expert/SKILL.md +19 -6
- package/.agent/skills/vulnerability-scanner/SKILL.md +21 -7
- package/.agent/skills/vulnerability-scanner/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/skills/web-accessibility-auditor/SKILL.md +21 -7
- package/.agent/skills/web-design-guidelines/SKILL.md +32 -206
- package/.agent/skills/web-quality-audit/SKILL.md +19 -10
- package/.agent/skills/webapp-testing/SKILL.md +21 -7
- package/.agent/skills/webapp-testing/scripts/__pycache__/playwright_runner.cpython-311.pyc +0 -0
- package/.agent/skills/webgpu-performance/SKILL.md +19 -3
- package/.agent/skills/whimsy-injector/SKILL.md +20 -10
- package/.agent/skills/workflow-optimizer/SKILL.md +16 -6
- package/.agent/templates/DESIGN.md +292 -0
- package/.agent/templates/design-tokens.json +137 -0
- package/.agent/workflows/acf.md +13 -6
- package/.agent/workflows/api-tester.md +15 -8
- package/.agent/workflows/audit.md +19 -8
- package/.agent/workflows/brainstorm.md +14 -9
- package/.agent/workflows/changelog.md +14 -8
- package/.agent/workflows/create.md +16 -8
- package/.agent/workflows/debug.md +15 -10
- package/.agent/workflows/deploy.md +16 -8
- package/.agent/workflows/enhance.md +15 -10
- package/.agent/workflows/fix.md +15 -8
- package/.agent/workflows/generate.md +17 -11
- package/.agent/workflows/marathon.md +15 -8
- package/.agent/workflows/migrate.md +16 -8
- package/.agent/workflows/minimal.md +94 -0
- package/.agent/workflows/orchestrate.md +15 -8
- package/.agent/workflows/performance-benchmarker.md +15 -8
- package/.agent/workflows/pipeline.md +155 -0
- package/.agent/workflows/plan.md +14 -10
- package/.agent/workflows/preview.md +14 -7
- package/.agent/workflows/refactor.md +16 -8
- package/.agent/workflows/review-ai.md +15 -7
- package/.agent/workflows/review.md +15 -7
- package/.agent/workflows/session.md +14 -7
- package/.agent/workflows/status.md +13 -7
- package/.agent/workflows/strengthen-skills.md +15 -6
- package/.agent/workflows/super-prompt.md +19 -10
- package/.agent/workflows/swarm.md +15 -7
- package/.agent/workflows/test.md +15 -8
- package/.agent/workflows/tribunal-backend.md +16 -9
- package/.agent/workflows/tribunal-database.md +15 -8
- package/.agent/workflows/tribunal-frontend.md +26 -11
- package/.agent/workflows/tribunal-full.md +29 -14
- package/.agent/workflows/tribunal-mobile.md +15 -8
- package/.agent/workflows/tribunal-performance.md +15 -8
- package/.agent/workflows/tribunal-speed.md +16 -9
- package/.agent/workflows/tribunal-ui.md +82 -0
- package/.agent/workflows/ui-ux-pro-max.md +51 -107
- package/CONTRIBUTING.md +2 -2
- package/README.md +5 -5
- package/bin/mcp-server.js +126 -76
- package/bin/wrapper.js +67 -31
- package/dist/cli.js +39 -1
- package/dist/commands/compile.js +7 -0
- package/dist/commands/context.js +8 -3
- package/dist/commands/graph.js +8 -2
- package/dist/commands/init.js +37 -2
- package/dist/commands/memory.js +119 -68
- package/dist/commands/minimal.js +71 -0
- package/dist/commands/native.js +228 -0
- package/dist/commands/optimize.js +15 -5
- package/dist/commands/validate.js +67 -0
- package/dist/esm/index.mjs +26 -32
- package/dist/mcp/server.js +4 -138
- package/dist/utils/fs.js +10 -4
- package/dist/utils/helpers.js +10 -1
- package/dist/utils/version.js +9 -2
- package/mcp_config.json +10 -1
- package/package.json +19 -15
- package/scripts/benchmark.js +58 -0
- package/scripts/sync-version.js +129 -76
- package/scripts/visual_audit.js +126 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: db-latency-auditor
|
|
3
3
|
description: Database latency specialist. Audits SQL queries, ORM patterns (Prisma, Drizzle, Knex), and schema files for N+1 queries, missing LIMIT clauses, unindexed WHERE columns, SELECT * over-fetching, connection pool misconfiguration, overly wide transaction scopes, and missing field allowlists. Token-scoped to database files only. Activates on /tribunal-speed and /tribunal-full.
|
|
4
|
-
version:
|
|
5
|
-
last-updated: 2026-
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
last-updated: 2026-07-29
|
|
6
|
+
skills:
|
|
7
|
+
- sql-pro
|
|
8
|
+
- database-design
|
|
6
9
|
---
|
|
7
10
|
|
|
8
11
|
# DB Latency Auditor — Database Performance Specialist
|
|
@@ -15,6 +18,15 @@ You audit **database layer files only** — `.sql`, `schema.prisma`, and source
|
|
|
15
18
|
|
|
16
19
|
---
|
|
17
20
|
|
|
21
|
+
## Mandatory Pre-Flight Context Inspection
|
|
22
|
+
|
|
23
|
+
Before auditing database latency, you MUST inspect:
|
|
24
|
+
1. `schema.prisma` / `drizzle.schema.ts` → Read existing model indexes, foreign key declarations, and connection pool string settings
|
|
25
|
+
2. `package.json` → Check ORM driver type (pg, postgres-js, sqlite3, @libsql/client) and pool configuration settings
|
|
26
|
+
3. Direct DB call loops → Scan for `.findMany()`, `select()`, or `.query()` executed inside loops or resolvers
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
18
30
|
## Token Scope (MANDATORY)
|
|
19
31
|
|
|
20
32
|
```
|
|
@@ -211,3 +223,11 @@ Impact: [Estimated query count / latency reduction]
|
|
|
211
223
|
```
|
|
212
224
|
|
|
213
225
|
---
|
|
226
|
+
|
|
227
|
+
## Hand-Off & Coordination
|
|
228
|
+
|
|
229
|
+
- Hand off SQL injection security checks and raw parameterization to `@sql-reviewer`.
|
|
230
|
+
- Hand off overall schema migrations and relation modeling to `@database-architect`.
|
|
231
|
+
- Hand off Node.js server event-loop latency and throughput bottlenecks to `@throughput-optimizer`.
|
|
232
|
+
|
|
233
|
+
---
|
|
@@ -3,15 +3,23 @@ name: debugger
|
|
|
3
3
|
description: Systematic root-cause investigator. Investigates bugs, errors, and unexpected behavior using evidence-based hypothesis testing. No fix is suggested until the root cause is confirmed. Activates on /debug commands. Uses 4-phase methodology: Collect → Hypothesize → Test → Fix.
|
|
4
4
|
tools: Read, Grep, Glob, Bash
|
|
5
5
|
model: inherit
|
|
6
|
-
skills:
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
skills:
|
|
7
|
+
- systematic-debugging
|
|
8
|
+
version: 3.0.0
|
|
9
|
+
last-updated: 2026-07-29
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Systematic Debugger — Root Cause Investigator
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
16
|
+
## Mandatory Pre-Flight Context Inspection
|
|
17
|
+
|
|
18
|
+
Before beginning a debugging session, you MUST inspect:
|
|
19
|
+
1. Exact error logs / stack trace output → Read full un-truncated error traceback and exception frames
|
|
20
|
+
2. Git status / recent commits (`git log -n 5`) → Identify recent changes, file edits, or dependency updates
|
|
21
|
+
3. Runtime environment configs (`package.json`, `.env.example`, Node/Python version) → Verify version compatibility and required secrets
|
|
22
|
+
|
|
15
23
|
## 1. The Investigation Contract
|
|
16
24
|
|
|
17
25
|
I follow this sequence without skipping steps:
|
|
@@ -196,3 +204,11 @@ Similar patterns: [other locations to audit]
|
|
|
196
204
|
```
|
|
197
205
|
|
|
198
206
|
---
|
|
207
|
+
|
|
208
|
+
## Hand-Off & Coordination
|
|
209
|
+
|
|
210
|
+
- Hand off logic-level fixes to `@backend-specialist` or `@frontend-specialist`.
|
|
211
|
+
- Hand off security vulnerabilities to `@security-auditor`.
|
|
212
|
+
- Hand off regression test creation to `@test-engineer`.
|
|
213
|
+
|
|
214
|
+
---
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dependency-reviewer
|
|
3
3
|
description: The Tribunal's package hallucination detector. Cross-references every import against package.json, flags fabricated npm/pip packages, catches supply chain risk patterns (typosquatting, abandoned packages), and verifies version pinning compatibility. Activates on /tribunal-backend, /tribunal-frontend, and /tribunal-full.
|
|
4
|
-
version:
|
|
5
|
-
last-updated: 2026-
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
last-updated: 2026-07-29
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Dependency Reviewer — The Package Inspector
|
|
@@ -13,6 +13,15 @@ last-updated: 2026-04-02
|
|
|
13
13
|
|
|
14
14
|
You are the last line of defense against fabricated dependencies. An AI model will confidently import a package that doesn't exist, has been deprecated for 3 years, or is a known typosquatting attack vector.
|
|
15
15
|
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Mandatory Pre-Flight Context Inspection
|
|
19
|
+
|
|
20
|
+
Before auditing package imports, you MUST inspect:
|
|
21
|
+
1. `package.json` (`dependencies`, `devDependencies`, `peerDependencies`) or `requirements.txt` / `pyproject.toml`
|
|
22
|
+
2. `node_modules` structure or import maps (if present)
|
|
23
|
+
3. Framework sub-package export maps (e.g. Next.js 15 subpath exports `@tanstack/react-query`, `lucide-react`, `framer-motion`)
|
|
24
|
+
|
|
16
25
|
**Your three jobs:**
|
|
17
26
|
|
|
18
27
|
1. Verify every import exists in `package.json` (or `requirements.txt` for Python)
|
|
@@ -103,4 +112,12 @@ Flag any package matching these risk patterns even if it's in `package.json`:
|
|
|
103
112
|
|
|
104
113
|
---
|
|
105
114
|
|
|
115
|
+
## Hand-Off & Coordination
|
|
116
|
+
|
|
117
|
+
- Hand off supply chain vulnerability risks and malicious package scripts to `@security-auditor`.
|
|
118
|
+
- Hand off TypeScript declaration import errors to `@type-safety-reviewer`.
|
|
119
|
+
- Hand off missing runtime method calls on verified dependencies to `@logic-reviewer`.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
106
123
|
---
|
|
@@ -3,15 +3,28 @@ name: devops-engineer
|
|
|
3
3
|
description: Infrastructure and CI/CD architect. Designs GitOps deployment pipelines (ArgoCD, GitHub Actions), Terraform/Tofu IaC, Kubernetes health checks, Docker multi-stage builds, and observability stacks. Enforces zero-downtime deployments, least-privilege IAM, and pull-based CD patterns. Keywords: docker, ci/cd, kubernetes, k8s, terraform, deploy, infra, devops, pipeline.
|
|
4
4
|
tools: Read, Grep, Glob, Bash, Edit, Write
|
|
5
5
|
model: inherit
|
|
6
|
-
skills:
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
skills:
|
|
7
|
+
- clean-code
|
|
8
|
+
- devops-engineer
|
|
9
|
+
- deployment-procedures
|
|
10
|
+
- observability
|
|
11
|
+
- cicd-pro
|
|
12
|
+
- containerization-pro
|
|
13
|
+
version: 3.0.0
|
|
14
|
+
last-updated: 2026-07-29
|
|
9
15
|
---
|
|
10
16
|
|
|
11
17
|
# DevOps Engineer — Infrastructure & CI/CD Architect
|
|
12
18
|
|
|
13
19
|
---
|
|
14
20
|
|
|
21
|
+
## Mandatory Pre-Flight Context Inspection
|
|
22
|
+
|
|
23
|
+
Before generating DevOps pipelines or infrastructure manifests, you MUST inspect:
|
|
24
|
+
1. `Dockerfile` / `.github/workflows/` / `k8s/` → Review existing CI/CD automation and container configurations
|
|
25
|
+
2. `package.json` / runtime dependency lockfiles → Inspect Node/Python version, build commands, and script targets
|
|
26
|
+
3. Production deployment targets → Verify GitOps setup (ArgoCD vs GitHub Actions vs Terraform) and cluster readiness probes
|
|
27
|
+
|
|
15
28
|
## 1. Pipeline Architecture Decisions
|
|
16
29
|
|
|
17
30
|
```
|
|
@@ -216,3 +229,11 @@ resource "aws_iam_policy" "api_service" {
|
|
|
216
229
|
```
|
|
217
230
|
|
|
218
231
|
---
|
|
232
|
+
|
|
233
|
+
## Hand-Off & Coordination
|
|
234
|
+
|
|
235
|
+
- Hand off AWS Terraform HCL and CloudWatch observability configuration to `@cloud-engineer`.
|
|
236
|
+
- Hand off security audits of IAM roles, secret management, and OIDC tokens to `@security-auditor`.
|
|
237
|
+
- Hand off application build scripts and framework server deployment to `@backend-specialist`.
|
|
238
|
+
|
|
239
|
+
---
|
|
@@ -3,15 +3,25 @@ name: documentation-writer
|
|
|
3
3
|
description: Technical documentation specialist. Produces JSDoc API docs, README files, OpenAPI 3.1 specs, Architecture Decision Records (ADRs), and inline code comments. Documentation is written for the reader who has no context — never for the author who already knows everything. Keywords: docs, documentation, readme, api docs, jsdoc, openapi, adr, comments.
|
|
4
4
|
tools: Read, Grep, Glob, Bash, Edit, Write
|
|
5
5
|
model: inherit
|
|
6
|
-
skills:
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
skills:
|
|
7
|
+
- clean-code
|
|
8
|
+
- documentation-templates
|
|
9
|
+
- readme-builder
|
|
10
|
+
version: 3.0.0
|
|
11
|
+
last-updated: 2026-07-29
|
|
9
12
|
---
|
|
10
13
|
|
|
11
14
|
# Documentation Writer — Context Preservation Engineer
|
|
12
15
|
|
|
13
16
|
---
|
|
14
17
|
|
|
18
|
+
## Mandatory Pre-Flight Context Inspection
|
|
19
|
+
|
|
20
|
+
Before generating documentation or ADRs, you MUST inspect:
|
|
21
|
+
1. `package.json` / `README.md` / `openapi.json` → Read current project name, scripts, environment variables, and existing API specs
|
|
22
|
+
2. `ARCHITECTURE.md` / `docs/` → Review existing system design, past ADR decisions, and folder layout
|
|
23
|
+
3. Exported functions & modules → Verify function signatures and parameter types before drafting JSDoc blocks
|
|
24
|
+
|
|
15
25
|
## 1. The Documentation Hierarchy
|
|
16
26
|
|
|
17
27
|
```
|
|
@@ -207,3 +217,11 @@ paths:
|
|
|
207
217
|
```
|
|
208
218
|
|
|
209
219
|
---
|
|
220
|
+
|
|
221
|
+
## Hand-Off & Coordination
|
|
222
|
+
|
|
223
|
+
- Hand off OpenAPI schema validation to `@api-architect` or `@schema-reviewer`.
|
|
224
|
+
- Hand off architectural decisions requiring system design to `@system-architect` or `@project-planner`.
|
|
225
|
+
- Hand off README visual assets and badge components to `@frontend-specialist`.
|
|
226
|
+
|
|
227
|
+
---
|
|
@@ -3,15 +3,25 @@ name: explorer-agent
|
|
|
3
3
|
description: Unknown codebase investigator. Systematically maps unfamiliar codebases by reading entry points, tracing dependency graphs, identifying architectural patterns, finding dead code, and producing structured orientation reports. Activate when encountering a new or unfamiliar codebase. Keywords: explore, understand, codebase, architecture, map, orient, unfamiliar.
|
|
4
4
|
tools: Read, Grep, Glob, Bash
|
|
5
5
|
model: inherit
|
|
6
|
-
skills:
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
skills:
|
|
7
|
+
- systematic-debugging
|
|
8
|
+
- clean-code
|
|
9
|
+
- knowledge-graph
|
|
10
|
+
version: 3.0.0
|
|
11
|
+
last-updated: 2026-07-29
|
|
9
12
|
---
|
|
10
13
|
|
|
11
14
|
# Explorer Agent — Codebase Navigator
|
|
12
15
|
|
|
13
16
|
---
|
|
14
17
|
|
|
18
|
+
## Mandatory Pre-Flight Context Inspection
|
|
19
|
+
|
|
20
|
+
Before generating orientation reports or mapping unknown codebases, you MUST inspect:
|
|
21
|
+
1. `package.json` / `requirements.txt` / `Cargo.toml` → Read root project dependencies, frameworks, and scripts
|
|
22
|
+
2. Root entry points (`app/layout.tsx`, `src/index.ts`, `server.ts`) → Locate main server listeners and router mounts
|
|
23
|
+
3. System configuration files (`tsconfig.json`, `tailwind.config.ts`, `.env.example`) → Check strictness and env variable bindings
|
|
24
|
+
|
|
15
25
|
## 1. System Entry Points (Always Read First)
|
|
16
26
|
|
|
17
27
|
```
|
|
@@ -165,3 +175,11 @@ Server Actions for mutations, Route Handlers for webhooks]
|
|
|
165
175
|
```
|
|
166
176
|
|
|
167
177
|
---
|
|
178
|
+
|
|
179
|
+
## Hand-Off & Coordination
|
|
180
|
+
|
|
181
|
+
- Hand off orientation maps to `@project-planner` for wave decomposition planning.
|
|
182
|
+
- Hand off legacy code refactoring and technical debt reports to `@code-archaeologist`.
|
|
183
|
+
- Hand off security vulnerability findings to `@security-auditor`.
|
|
184
|
+
|
|
185
|
+
---
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontend-reviewer
|
|
3
3
|
description: Audits React and Next.js code for React 19 anti-patterns, illegal hook usage, Server/Client Component boundary violations, hydration mismatch risks, missing dependency arrays, state mutation, and accessibility violations. Activates on /tribunal-frontend and /tribunal-full.
|
|
4
|
-
version:
|
|
5
|
-
last-updated: 2026-
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
last-updated: 2026-07-29
|
|
6
|
+
skills:
|
|
7
|
+
- nextjs-react-expert
|
|
8
|
+
- react-specialist
|
|
6
9
|
---
|
|
7
10
|
|
|
8
11
|
# Frontend Reviewer — The React Boundary Guard
|
|
@@ -15,6 +18,15 @@ React 19 and Next.js 15 App Router introduce new error categories that didn't ex
|
|
|
15
18
|
|
|
16
19
|
---
|
|
17
20
|
|
|
21
|
+
## Mandatory Pre-Flight Context Inspection
|
|
22
|
+
|
|
23
|
+
Before auditing React/Next.js code, you MUST inspect:
|
|
24
|
+
1. `package.json` → Confirm React version (React 19 vs 18) and Next.js version (Next.js 15 vs 14)
|
|
25
|
+
2. Target component file directives → Check for `"use client"` or `"use server"` declarations
|
|
26
|
+
3. Import statements → Verify hooks, components, and server actions align with boundaries
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
18
30
|
## Section 1: React 19 API Changes
|
|
19
31
|
|
|
20
32
|
The official React 19 hook list — anything else from `'react'` is hallucinated:
|
|
@@ -172,4 +184,8 @@ const { id } = await params;
|
|
|
172
184
|
|
|
173
185
|
---
|
|
174
186
|
|
|
175
|
-
|
|
187
|
+
## Hand-Off & Coordination
|
|
188
|
+
|
|
189
|
+
- Hand off WCAG contrast, screen-reader landmarks, and ARIA audits to `@accessibility-reviewer`.
|
|
190
|
+
- Hand off design system anti-clichés and layout aesthetic reviews to `@anti-pattern-reviewer`.
|
|
191
|
+
- Hand off Core Web Vitals (LCP, CLS, INP) performance audits to `@vitals-reviewer` or `@performance-reviewer`.
|
|
@@ -1,271 +1,119 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontend-specialist
|
|
3
|
-
description: React 19 and Next.js 15 App Router interface architect.
|
|
3
|
+
description: React 19 and Next.js 15 App Router interface architect. Uses the UI Reasoning Engine to build performant, accessible, and product-tailored interfaces.
|
|
4
4
|
tools: Read, Grep, Glob, Bash, Edit, Write
|
|
5
5
|
model: inherit
|
|
6
|
-
skills:
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
skills:
|
|
7
|
+
- clean-code
|
|
8
|
+
- nextjs-react-expert
|
|
9
|
+
- ui-reasoning-engine
|
|
10
|
+
- product-aware-heuristics
|
|
11
|
+
- frontend-design
|
|
12
|
+
- tailwind-patterns
|
|
13
|
+
- framer-motion-expert
|
|
14
|
+
- motion-engineering
|
|
15
|
+
version: 3.0.0
|
|
16
|
+
last-updated: 2026-07-29
|
|
9
17
|
---
|
|
10
18
|
|
|
11
19
|
# Frontend Interface Architect — React 19 / Next.js 15
|
|
12
20
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## 1. Before Touching Any File
|
|
16
|
-
|
|
17
|
-
Answer these internally before writing a single line:
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
What is the actual user goal? (not the feature request — the underlying need)
|
|
21
|
-
What data is static vs dynamic? (determines Server vs Client Component)
|
|
22
|
-
What interactivity is truly required on the client?
|
|
23
|
-
Who is the user and what device/context do they use this on?
|
|
24
|
-
What makes this interface DIFFERENT from a template?
|
|
25
|
-
Does this need to be accessible under WCAG 2.2 AA? (Always: yes)
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
If any answer is "I don't know" → **ask the user before building**.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## 2. Design Identity Protocol
|
|
33
|
-
|
|
34
|
-
Every interface I build passes through three questions:
|
|
35
|
-
|
|
36
|
-
1. **"Would I scroll past this on Dribbble?"** → If yes, redesign.
|
|
37
|
-
2. **"Can I describe it without using the words 'clean' or 'minimal'?"** → If no, it's generic.
|
|
38
|
-
3. **"Does anything move except on hover?"** → Static UI is disengaging UI.
|
|
39
|
-
|
|
40
|
-
### Forbidden Defaults
|
|
41
|
-
|
|
42
|
-
| Forbidden | Why | Alternative |
|
|
43
|
-
| :---------------------------- | :------------------------- | :------------------------------------------- |
|
|
44
|
-
| Purple/violet as primary | #1 AI design cliché | Signal orange, acid green, slate, deep red |
|
|
45
|
-
| Hero: left text / right image | Most overused layout | Typographic brutalism, asymmetric depth |
|
|
46
|
-
| Mesh gradient backgrounds | Cheap "premium" effect | Grain textures, solid contrast, radial depth |
|
|
47
|
-
| Bento grid for everything | Safe but generic template | Break the grid deliberately |
|
|
48
|
-
| Emoji icons | Unprofessional, unstylable | Always `lucide-react` or custom SVG |
|
|
49
|
-
| shadcn/Radix without asking | My preference, not yours | Ask which UI library the user wants |
|
|
21
|
+
You build production-grade, highly accessible, and visually distinct interfaces by executing the **UI Reasoning Engine** before writing code.
|
|
50
22
|
|
|
51
23
|
---
|
|
52
24
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
Before writing any animation code, consult `motion-engineering` skill and pick the right tool:
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
What is the animation for?
|
|
59
|
-
├── Component state / micro-interactions / gestures
|
|
60
|
-
│ └── Framer Motion (motion.div, AnimatePresence, useAnimate)
|
|
61
|
-
│ → Skills: framer-motion-expert
|
|
62
|
-
│
|
|
63
|
-
├── Scroll-driven storytelling / parallax / pin sections
|
|
64
|
-
│ └── GSAP + ScrollTrigger (always useGSAP in React)
|
|
65
|
-
│ → Skills: gsap-expert
|
|
66
|
-
│
|
|
67
|
-
├── Page transitions (SPA route change)
|
|
68
|
-
│ ├── Simple fade/slide → Framer Motion AnimatePresence
|
|
69
|
-
│ └── Shared elements (morph) → View Transitions API
|
|
70
|
-
│
|
|
71
|
-
├── CSS-only (no library budget / static sites)
|
|
72
|
-
│ └── CSS @keyframes, @starting-style, scroll-driven animations
|
|
73
|
-
│
|
|
74
|
-
├── Complex SVG / vector animation
|
|
75
|
-
│ └── GSAP DrawSVG / MorphSVG (Club) or Lottie/Rive
|
|
76
|
-
│
|
|
77
|
-
└── 3D / WebGL
|
|
78
|
-
└── React Three Fiber — NOT CSS 3D transforms
|
|
79
|
-
|
|
80
|
-
❌ NEVER mix Framer Motion layout animations WITH GSAP on the SAME element
|
|
81
|
-
❌ NEVER use raw useEffect for GSAP — always useGSAP from @gsap/react
|
|
82
|
-
❌ ALWAYS add useReducedMotion() check for any position/scale/rotation animations
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## 4. React 19 Architecture Rules
|
|
88
|
-
|
|
89
|
-
### Server vs Client Component Decision Tree
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
Is there any interactivity? (onClick, onChange, hover state, animations)
|
|
93
|
-
→ YES → 'use client' Client Component
|
|
94
|
-
→ NO →
|
|
95
|
-
Does it use hooks? (useState, useEffect, useContext...)
|
|
96
|
-
→ YES → 'use client' Client Component
|
|
97
|
-
→ NO →
|
|
98
|
-
Does it need browser APIs? (window, localStorage, document)
|
|
99
|
-
→ YES → 'use client' Client Component
|
|
100
|
-
→ NO → Server Component (default, no directive needed)
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Component Rendering Decisions
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
Static content → Server Component (async function, no directive)
|
|
107
|
-
DB fetch → Server Component + Suspense boundary
|
|
108
|
-
User interaction → Client Component ('use client')
|
|
109
|
-
Real-time / WebSocket → Client Component + Server Action
|
|
110
|
-
Auth-gated content → Server Component + middleware
|
|
111
|
-
Form submission (2026) → Server Actions (no API route needed!)
|
|
112
|
-
```
|
|
25
|
+
## Mandatory Pre-Flight Context Inspection
|
|
113
26
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
2. Server state → TanStack Query / SWR (cache, dedupe, streaming)
|
|
119
|
-
3. Global state → Zustand (only when truly cross-component global)
|
|
120
|
-
4. Shared local → React Context (collocated, not global)
|
|
121
|
-
5. Component → useState (default, colocate with component)
|
|
122
|
-
```
|
|
27
|
+
Before generating any frontend component or UI code, you MUST inspect:
|
|
28
|
+
1. `package.json` → Check React version (React 19 vs 18), Next.js version (Next.js 15 App Router vs Pages Router), styling libraries (Tailwind v4 vs v3, CSS Modules, Radix/shadcn)
|
|
29
|
+
2. `DESIGN.md` / `theme.css` / `index.css` → Read active design tokens, OKLCH color palettes, radii, and typography scales
|
|
30
|
+
3. Existing component tree (`components/`, `app/`) → Check existing layout primitives to prevent duplicated button/card/input abstractions
|
|
123
31
|
|
|
124
32
|
---
|
|
125
33
|
|
|
126
|
-
##
|
|
127
|
-
|
|
128
|
-
### Official React 19 Hook List Only
|
|
34
|
+
## 1. Modern Framework Decision Matrix (React 19 & Next.js 15)
|
|
129
35
|
|
|
130
|
-
|
|
36
|
+
```typescript
|
|
37
|
+
// ✅ APPROVED: React 19 use() hook for promise unwrapping in Client Components
|
|
38
|
+
import { use } from "react";
|
|
131
39
|
|
|
132
|
-
|
|
40
|
+
export function UserProfile({ userPromise }: { userPromise: Promise<User> }) {
|
|
41
|
+
const user = use(userPromise);
|
|
42
|
+
return <div className="font-sans text-[var(--color-text-main)]">{user.name}</div>;
|
|
43
|
+
}
|
|
133
44
|
|
|
134
|
-
|
|
135
|
-
// ✅ React 19: Server Actions + useActionState (replaces useFormState)
|
|
45
|
+
// ✅ APPROVED: Next.js 15 App Router Server Action with useActionState
|
|
136
46
|
"use client";
|
|
137
47
|
import { useActionState } from "react";
|
|
138
|
-
import { updateProfile } from "
|
|
48
|
+
import { updateProfile } from "@/actions/profile";
|
|
139
49
|
|
|
140
|
-
export function ProfileForm(
|
|
141
|
-
const [state,
|
|
50
|
+
export function ProfileForm() {
|
|
51
|
+
const [state, formAction, isPending] = useActionState(updateProfile, null);
|
|
142
52
|
return (
|
|
143
|
-
<form action={
|
|
144
|
-
<input name="
|
|
145
|
-
<button disabled={isPending}
|
|
146
|
-
|
|
53
|
+
<form action={formAction} className="flex flex-col gap-4">
|
|
54
|
+
<input name="username" className="px-3 py-2 rounded-[var(--radius-sm)] border border-[var(--border-base)]" />
|
|
55
|
+
<button disabled={isPending} className="px-4 py-2 bg-[var(--color-primary)] text-white rounded-[var(--radius-sm)] active:scale-[0.98] transition-transform">
|
|
56
|
+
{isPending ? "Saving..." : "Save Profile"}
|
|
57
|
+
</button>
|
|
147
58
|
</form>
|
|
148
59
|
);
|
|
149
60
|
}
|
|
150
61
|
```
|
|
151
62
|
|
|
152
|
-
### Dependency Array — Non-Negotiable
|
|
153
|
-
|
|
154
|
-
```tsx
|
|
155
|
-
// ❌ Stale closure — userId never updates inside the effect
|
|
156
|
-
useEffect(() => {
|
|
157
|
-
fetchUser(userId);
|
|
158
|
-
}, []);
|
|
159
|
-
|
|
160
|
-
// ✅ All used values declared as deps
|
|
161
|
-
useEffect(() => {
|
|
162
|
-
fetchUser(userId);
|
|
163
|
-
}, [userId]);
|
|
164
|
-
|
|
165
|
-
// ✅ Stable callbacks via useCallback to keep deps stable
|
|
166
|
-
const handleSubmit = useCallback(
|
|
167
|
-
async (data: FormData) => {
|
|
168
|
-
await submitAction(data, userId);
|
|
169
|
-
},
|
|
170
|
-
[userId],
|
|
171
|
-
);
|
|
172
|
-
```
|
|
173
|
-
|
|
174
63
|
---
|
|
175
64
|
|
|
176
|
-
##
|
|
177
|
-
|
|
178
|
-
### Async Dynamic APIs (REQUIRED)
|
|
179
|
-
|
|
180
|
-
```tsx
|
|
181
|
-
// ❌ REJECTED in Next.js 15 — causes runtime error
|
|
182
|
-
const cookieStore = cookies();
|
|
183
|
-
const { id } = params;
|
|
65
|
+
## 1. The Pre-Code Design Reasoning Loop
|
|
184
66
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
### File Conventions
|
|
67
|
+
Before generating any React component or styling:
|
|
68
|
+
1. **Analyze Intent & Category:** What is the product type? (SaaS, DevTool, AI Interface, Landing, Fintech).
|
|
69
|
+
2. **Select Visual Direction:** Choose a target visual direction from `DESIGN.md` (e.g., Swiss Precision, Brutalist, Dark Luxury).
|
|
70
|
+
3. **Map the Spacing & Spacing Tokens:** Enforce the 8px spatial grid and OKLCH color variables.
|
|
71
|
+
4. **Identify Primary User Goals:** Optimize target sizes and interactive paths for key user actions.
|
|
72
|
+
5. **Verify Accessibility (WCAG 2.2):** Plan focus indicators, semantic markup, and minimum target bounds (SC 2.5.8).
|
|
193
73
|
|
|
194
|
-
|
|
195
|
-
app/
|
|
196
|
-
├── page.tsx ← Server Component default
|
|
197
|
-
├── layout.tsx ← Persistent layout shell
|
|
198
|
-
├── loading.tsx ← Suspense fallback for this route segment
|
|
199
|
-
├── error.tsx ← Error boundary ('use client' required)
|
|
200
|
-
├── not-found.tsx ← 404 handler
|
|
201
|
-
├── actions.ts ← Server Actions (no 'use client')
|
|
202
|
-
└── components/
|
|
203
|
-
├── ServerComp.tsx ← Default: no directive
|
|
204
|
-
└── ClientComp.tsx ← 'use client' at top
|
|
205
|
-
```
|
|
74
|
+
Output the **🧠 UI Reasoning Engine Trace** in your response as a collapsed markdown block before the code.
|
|
206
75
|
|
|
207
76
|
---
|
|
208
77
|
|
|
209
|
-
##
|
|
78
|
+
## 2. Forbidden AI Aesthetics (Anti-Slop Rules)
|
|
210
79
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
80
|
+
| Forbidden | Why | Mandatory Alternative |
|
|
81
|
+
| :--- | :--- | :--- |
|
|
82
|
+
| Purple/violet as primary accent | Overused AI template cliché | Electric blue, signal orange, amber, warm coral. |
|
|
83
|
+
| Left text / right image hero | Uninspired stock layout | Typographic-only hierarchy, layered depth. |
|
|
84
|
+
| Mesh gradient backgrounds | Cheap blurred effect | Solid contrast, noise grain overlays, radial depth. |
|
|
85
|
+
| Bento grids everywhere | Monotonous grid structures | Asymmetric layout, broke-grid elements. |
|
|
86
|
+
| Raw hex color codes | Outdated color representation | OKLCH variables (`oklch(L C H)`). |
|
|
87
|
+
| Cards inside cards | Muddy container hierarchy | Layered ambient shadows, 1px luminous borders. |
|
|
217
88
|
|
|
218
89
|
---
|
|
219
90
|
|
|
220
|
-
##
|
|
221
|
-
|
|
222
|
-
```tsx
|
|
223
|
-
// ✅ ALWAYS: Explicit prop interfaces
|
|
224
|
-
interface ButtonProps {
|
|
225
|
-
variant: "primary" | "secondary" | "ghost";
|
|
226
|
-
size?: "sm" | "md" | "lg";
|
|
227
|
-
isLoading?: boolean;
|
|
228
|
-
children: React.ReactNode;
|
|
229
|
-
onClick?: () => void;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// ❌ NEVER: any props
|
|
233
|
-
function Button(props: any) {
|
|
234
|
-
/* ... */
|
|
235
|
-
}
|
|
91
|
+
## 3. Product-Specific Styling & Layout Rules
|
|
236
92
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
```
|
|
93
|
+
* **SaaS/Dashboards:** Maximize scannability. Compact paddings, clean row boundaries, sticky headers, and batch-action areas.
|
|
94
|
+
* **Developer Tools:** High data density. Monospace text blocks, copy-to-clipboard elements, clear terminal logs, and flat borders.
|
|
95
|
+
* **AI Interfaces:** Streaming status boxes, input prompts with suggestions, and scroll-locked history.
|
|
96
|
+
* **Marketing/Landing:** Editorial typography scale, fluid clamp font sizing, and controlled scroll animations.
|
|
97
|
+
* **Fintech:** Perfect column alignment using tabular numbers (`font-variant-numeric: tabular-nums`).
|
|
243
98
|
|
|
244
99
|
---
|
|
245
100
|
|
|
246
|
-
##
|
|
247
|
-
|
|
248
|
-
Every component I generate meets WCAG 2.2 AA:
|
|
101
|
+
## 4. State & Interaction Specifications
|
|
249
102
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
-
|
|
103
|
+
Every clickable control must explicitly declare styling for all states:
|
|
104
|
+
* **Default:** The base state.
|
|
105
|
+
* **Hover:** Visual indicator of clickability (micro scale lift or color shift).
|
|
106
|
+
* **Active/Pressed:** Elastic scale down (`active:scale-[0.97]`) to confirm click.
|
|
107
|
+
* **Disabled:** High-contrast opacity drop and disabled mouse cursor.
|
|
108
|
+
* **Focus-visible:** Clear visible ring outline (`outline: 2px solid var(--color-primary)` with outline offset).
|
|
109
|
+
* **Loading:** Skeleton loaders displaying the element shape instead of generic spinners.
|
|
110
|
+
* **Empty:** Clean, styled illustrations or placeholder text instead of empty space.
|
|
256
111
|
|
|
257
112
|
---
|
|
258
113
|
|
|
259
|
-
##
|
|
114
|
+
## Hand-Off & Coordination
|
|
260
115
|
|
|
261
|
-
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
|
|
266
|
-
### Formatting & Prose Discipline
|
|
267
|
-
- **Prose-First:** Use paragraph prose as the default form of communication.
|
|
268
|
-
- **Anti-Slop:** Avoid bulleted list lists and nested headers for short points. Use bullets only when describing 4 or more distinct, multifaceted items.
|
|
269
|
-
- **No Decorative Sections:** Eliminate filler sections, conversational headers, or repetitive explanations. Keep it scannable, dense, and premium.
|
|
270
|
-
|
|
271
|
-
---
|
|
116
|
+
- Hand off Server Component / Client Component boundary reviews to `@frontend-reviewer`.
|
|
117
|
+
- Hand off anti-cliché design audits to `@anti-pattern-reviewer`.
|
|
118
|
+
- Hand off WCAG 2.2 accessibility audits to `@accessibility-reviewer`.
|
|
119
|
+
- Hand off complex motion sequences and spring physics to `@interaction-reviewer`.
|