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
@@ -211,3 +211,45 @@ useEffect(() => {
211
211
  - **Edge-to-edge**: Set `android:windowLayoutInDisplayCutoutMode="shortEdges"` in AndroidManifest
212
212
  - **Back gesture prediction**: Wrap routes in `GestureHandlerRootView` at root
213
213
  - **Splash**: Use `expo-splash-screen` — never hardcode a delay
214
+
215
+
216
+ ---
217
+
218
+
219
+
220
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
221
+
222
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
223
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
224
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
225
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
226
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
227
+
228
+ ---
229
+
230
+
231
+
232
+ **Slash command: `/review` or `/tribunal-full`**
233
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
234
+
235
+ ### ❌ Forbidden AI Tropes
236
+
237
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
238
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
239
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
240
+
241
+
242
+
243
+ Review these questions before confirming output:
244
+ ```
245
+ ✅ Did I rely ONLY on real, verified tools and methods?
246
+ ✅ Is this solution appropriately scoped to the user's constraints?
247
+ ✅ Did I handle potential failure modes and edge cases?
248
+ ✅ Have I avoided generic boilerplate that doesn't add value?
249
+ ```
250
+
251
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
252
+
253
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
254
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
255
+ - ✅ **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.
@@ -0,0 +1,326 @@
1
+ ---
2
+ name: monorepo-management
3
+ description: Monorepo architecture and tooling mastery. Turborepo, Nx, pnpm workspaces, shared package design, task pipelines, dependency hoisting, change detection, versioning strategies (independent vs. fixed), shared TypeScript configs, internal packages, and CI optimization for monorepos. Use when setting up monorepos, managing shared code across apps, or optimizing build pipelines.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep
5
+ version: 1.0.0
6
+ last-updated: 2026-04-17
7
+ applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
+ ---
9
+
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Publishing internal packages to npm when they're meant to stay private -> ✅ Internal packages use `"private": true` and workspace protocol `"workspace:*"`
12
+ - ❌ Putting all shared code in a single `packages/shared` dump -> ✅ Split by domain: `packages/ui`, `packages/config`, `packages/utils`
13
+ - ❌ Running all tests on every PR regardless of what changed -> ✅ Use affected/changed detection (Turborepo `--filter`, Nx `affected`)
14
+
15
+ ---
16
+
17
+ # Monorepo Management — Scaling Multi-Package Projects
18
+
19
+ ---
20
+
21
+ ## Tool Selection
22
+
23
+ ```
24
+ ┌──────────────────────────────────────────────────────────────┐
25
+ │ When to Use What │
26
+ ├──────────────────────────────────────────────────────────────┤
27
+ │ pnpm workspaces │ Package linking only, no build orchestration│
28
+ │ Turborepo │ Fast builds, simple config, Vercel ecosystem│
29
+ │ Nx │ Enterprise, generators, dependency graph UI │
30
+ │ npm workspaces │ Zero-dep, basic linking (limited features) │
31
+ │ Yarn workspaces │ Legacy projects already using Yarn │
32
+ ├──────────────────────────────────────────────────────────────┤
33
+ │ Recommendation: pnpm + Turborepo for most projects │
34
+ └──────────────────────────────────────────────────────────────┘
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Directory Structure
40
+
41
+ ```
42
+ my-monorepo/
43
+ ├── apps/
44
+ │ ├── web/ # Next.js frontend
45
+ │ │ ├── package.json
46
+ │ │ └── tsconfig.json
47
+ │ ├── api/ # Fastify/Express backend
48
+ │ │ ├── package.json
49
+ │ │ └── tsconfig.json
50
+ │ └── mobile/ # React Native app
51
+ │ └── package.json
52
+ ├── packages/
53
+ │ ├── ui/ # Shared React components
54
+ │ │ ├── src/
55
+ │ │ ├── package.json
56
+ │ │ └── tsconfig.json
57
+ │ ├── config/ # Shared ESLint, TypeScript, Prettier configs
58
+ │ │ ├── eslint/
59
+ │ │ ├── typescript/
60
+ │ │ └── package.json
61
+ │ ├── utils/ # Shared pure functions
62
+ │ │ └── package.json
63
+ │ └── db/ # Shared database client + schemas
64
+ │ └── package.json
65
+ ├── turbo.json
66
+ ├── pnpm-workspace.yaml
67
+ ├── package.json # Root — devDependencies only
68
+ └── tsconfig.base.json # Shared TS config extended by all
69
+ ```
70
+
71
+ ---
72
+
73
+ ## pnpm Workspace Setup
74
+
75
+ ```yaml
76
+ # pnpm-workspace.yaml
77
+ packages:
78
+ - "apps/*"
79
+ - "packages/*"
80
+ ```
81
+
82
+ ```json
83
+ // Root package.json
84
+ {
85
+ "name": "my-monorepo",
86
+ "private": true,
87
+ "scripts": {
88
+ "dev": "turbo run dev",
89
+ "build": "turbo run build",
90
+ "lint": "turbo run lint",
91
+ "test": "turbo run test",
92
+ "clean": "turbo run clean"
93
+ },
94
+ "devDependencies": {
95
+ "turbo": "^2.0.0"
96
+ }
97
+ }
98
+ ```
99
+
100
+ ```json
101
+ // packages/ui/package.json
102
+ {
103
+ "name": "@myorg/ui",
104
+ "version": "0.0.0",
105
+ "private": true,
106
+ "main": "./src/index.ts",
107
+ "types": "./src/index.ts",
108
+ "exports": {
109
+ ".": "./src/index.ts",
110
+ "./button": "./src/button.tsx",
111
+ "./card": "./src/card.tsx"
112
+ },
113
+ "peerDependencies": {
114
+ "react": "^19.0.0",
115
+ "react-dom": "^19.0.0"
116
+ }
117
+ }
118
+ ```
119
+
120
+ ```json
121
+ // apps/web/package.json — consuming internal package
122
+ {
123
+ "name": "web",
124
+ "dependencies": {
125
+ "@myorg/ui": "workspace:*",
126
+ "@myorg/utils": "workspace:*"
127
+ }
128
+ }
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Turborepo Configuration
134
+
135
+ ```json
136
+ // turbo.json
137
+ {
138
+ "$schema": "https://turbo.build/schema.json",
139
+ "globalDependencies": ["**/.env.*local"],
140
+ "tasks": {
141
+ "build": {
142
+ "dependsOn": ["^build"],
143
+ "outputs": ["dist/**", ".next/**", "!.next/cache/**"]
144
+ },
145
+ "dev": {
146
+ "cache": false,
147
+ "persistent": true
148
+ },
149
+ "lint": {
150
+ "dependsOn": ["^build"]
151
+ },
152
+ "test": {
153
+ "dependsOn": ["^build"],
154
+ "outputs": ["coverage/**"]
155
+ },
156
+ "clean": {
157
+ "cache": false
158
+ }
159
+ }
160
+ }
161
+ ```
162
+
163
+ ```
164
+ Key concepts:
165
+ "^build" = Run build in dependencies FIRST (topological)
166
+ "dependsOn" = Task ordering — lint waits for build
167
+ "outputs" = What gets cached — skip re-runs if unchanged
168
+ "persistent" = Long-running (dev servers) — never cached
169
+ "cache: false" = Always run, never skip
170
+ ```
171
+
172
+ ---
173
+
174
+ ## Shared TypeScript Configuration
175
+
176
+ ```json
177
+ // tsconfig.base.json (root)
178
+ {
179
+ "compilerOptions": {
180
+ "strict": true,
181
+ "target": "ES2022",
182
+ "module": "ESNext",
183
+ "moduleResolution": "bundler",
184
+ "esModuleInterop": true,
185
+ "skipLibCheck": true,
186
+ "forceConsistentCasingInFileNames": true,
187
+ "declaration": true,
188
+ "declarationMap": true,
189
+ "sourceMap": true,
190
+ "isolatedModules": true,
191
+ "resolveJsonModule": true
192
+ }
193
+ }
194
+ ```
195
+
196
+ ```json
197
+ // apps/web/tsconfig.json
198
+ {
199
+ "extends": "../../tsconfig.base.json",
200
+ "compilerOptions": {
201
+ "jsx": "preserve",
202
+ "lib": ["dom", "dom.iterable", "ES2022"],
203
+ "outDir": "./dist"
204
+ },
205
+ "include": ["src/**/*", "../../packages/*/src/**/*"]
206
+ }
207
+ ```
208
+
209
+ ---
210
+
211
+ ## Change Detection (Only Build What Changed)
212
+
213
+ ```bash
214
+ # Turborepo — filter by affected packages
215
+ turbo run build --filter=...[HEAD~1] # packages changed since last commit
216
+ turbo run test --filter=web... # web app + its dependencies
217
+ turbo run lint --filter=@myorg/ui # specific package only
218
+
219
+ # CI: Only run tests for changed packages
220
+ turbo run test --filter="[origin/main...HEAD]"
221
+ ```
222
+
223
+ ```yaml
224
+ # GitHub Actions — with Turborepo cache
225
+ - name: Build & Test (cached)
226
+ run: npx turbo run build test lint --filter="[origin/main...HEAD]"
227
+ env:
228
+ TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
229
+ TURBO_TEAM: ${{ vars.TURBO_TEAM }}
230
+ ```
231
+
232
+ ---
233
+
234
+ ## Versioning Strategies
235
+
236
+ ```
237
+ ┌─────────────────────────────────────────────────────────────┐
238
+ │ Fixed (recommended for apps) │
239
+ │ All packages share one version. Simple. One changelog. │
240
+ │ Example: v1.2.3 applies to web, api, ui, utils, db │
241
+ ├─────────────────────────────────────────────────────────────┤
242
+ │ Independent (for published libraries) │
243
+ │ Each package has its own version + changelog. │
244
+ │ Example: @myorg/ui@2.1.0, @myorg/utils@1.4.2 │
245
+ │ Tools: Changesets, Lerna │
246
+ ├─────────────────────────────────────────────────────────────┤
247
+ │ Recommendation: │
248
+ │ Internal monorepo (1 team) → Fixed versioning │
249
+ │ Open-source multi-package → Independent + Changesets │
250
+ └─────────────────────────────────────────────────────────────┘
251
+ ```
252
+
253
+ ---
254
+
255
+ ## Internal Package Design Rules
256
+
257
+ ```
258
+ ✅ Internal packages are "private": true — never published to npm
259
+ ✅ Use workspace protocol: "@myorg/ui": "workspace:*"
260
+ ✅ Export raw TypeScript (src/index.ts) — let the consuming app bundle it
261
+ ✅ One package per domain: ui, utils, config, db — NOT one giant "shared"
262
+ ✅ Peer dependencies for React/framework — don't bundle the framework
263
+
264
+ ❌ Don't create a package for 1-2 functions — inline until it's reused 3+ times
265
+ ❌ Don't publish internal packages to npm "just in case"
266
+ ❌ Don't share mutable state across packages — each package is a pure module
267
+ ❌ Don't put app-specific code in packages/ — only truly shared code
268
+ ```
269
+
270
+ ---
271
+
272
+ ## Anti-Patterns
273
+
274
+ ```
275
+ ❌ Running all CI checks on every package for every PR — use affected detection
276
+ ❌ Circular dependencies between packages — topological ordering must be acyclic
277
+ ❌ Mixing CommonJS and ESM in the same monorepo — standardize on ESM
278
+ ❌ Installing devDependencies in every package — hoist shared devDeps to root
279
+ ❌ No lockfile — pnpm-lock.yaml MUST be committed
280
+ ❌ Using relative paths (../../packages/ui) — use workspace:* protocol
281
+ ❌ Giant "shared" package — splits into domain-focused packages
282
+ ```
283
+
284
+ ---
285
+
286
+
287
+ ---
288
+
289
+
290
+
291
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
292
+
293
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
294
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
295
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
296
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
297
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
298
+
299
+ ---
300
+
301
+
302
+
303
+ **Slash command: `/review` or `/tribunal-full`**
304
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
305
+
306
+ ### ❌ Forbidden AI Tropes
307
+
308
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
309
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
310
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
311
+
312
+
313
+
314
+ Review these questions before confirming output:
315
+ ```
316
+ ✅ Did I rely ONLY on real, verified tools and methods?
317
+ ✅ Is this solution appropriately scoped to the user's constraints?
318
+ ✅ Did I handle potential failure modes and edge cases?
319
+ ✅ Have I avoided generic boilerplate that doesn't add value?
320
+ ```
321
+
322
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
323
+
324
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
325
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
326
+ - ✅ **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.
@@ -182,3 +182,45 @@ Never animate `width`, `height`, `left`, `top`, `margin`, or `padding`. This tri
182
182
 
183
183
  3. **The Cleanup Rule:**
184
184
  Any GSAP ScrollTrigger timeline must use `ScrollTrigger.killAll()` or React's `useGSAP` cleanup functions to avoid memory leaks on SPA route changes.
185
+
186
+
187
+ ---
188
+
189
+
190
+
191
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
192
+
193
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
194
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
195
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
196
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
197
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
198
+
199
+ ---
200
+
201
+
202
+
203
+ **Slash command: `/review` or `/tribunal-full`**
204
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
205
+
206
+ ### ❌ Forbidden AI Tropes
207
+
208
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
209
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
210
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
211
+
212
+
213
+
214
+ Review these questions before confirming output:
215
+ ```
216
+ ✅ Did I rely ONLY on real, verified tools and methods?
217
+ ✅ Is this solution appropriately scoped to the user's constraints?
218
+ ✅ Did I handle potential failure modes and edge cases?
219
+ ✅ Have I avoided generic boilerplate that doesn't add value?
220
+ ```
221
+
222
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
223
+
224
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
225
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
226
+ - ✅ **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.
@@ -182,3 +182,45 @@ export const config = {
182
182
  matcher: ["/dashboard/:path*"], // Strict matcher is critical for performance
183
183
  };
184
184
  ```
185
+
186
+
187
+ ---
188
+
189
+
190
+
191
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
192
+
193
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
194
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
195
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
196
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
197
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
198
+
199
+ ---
200
+
201
+
202
+
203
+ **Slash command: `/review` or `/tribunal-full`**
204
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
205
+
206
+ ### ❌ Forbidden AI Tropes
207
+
208
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
209
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
210
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
211
+
212
+
213
+
214
+ Review these questions before confirming output:
215
+ ```
216
+ ✅ Did I rely ONLY on real, verified tools and methods?
217
+ ✅ Is this solution appropriately scoped to the user's constraints?
218
+ ✅ Did I handle potential failure modes and edge cases?
219
+ ✅ Have I avoided generic boilerplate that doesn't add value?
220
+ ```
221
+
222
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
223
+
224
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
225
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
226
+ - ✅ **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.
@@ -496,3 +496,45 @@ if (isMainThread) {
496
496
  ```
497
497
 
498
498
  ---
499
+
500
+
501
+ ---
502
+
503
+
504
+
505
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
506
+
507
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
508
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
509
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
510
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
511
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
512
+
513
+ ---
514
+
515
+
516
+
517
+ **Slash command: `/review` or `/tribunal-full`**
518
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
519
+
520
+ ### ❌ Forbidden AI Tropes
521
+
522
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
523
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
524
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
525
+
526
+
527
+
528
+ Review these questions before confirming output:
529
+ ```
530
+ ✅ Did I rely ONLY on real, verified tools and methods?
531
+ ✅ Is this solution appropriately scoped to the user's constraints?
532
+ ✅ Did I handle potential failure modes and edge cases?
533
+ ✅ Have I avoided generic boilerplate that doesn't add value?
534
+ ```
535
+
536
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
537
+
538
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
539
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
540
+ - ✅ **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.
@@ -291,3 +291,45 @@ Alert design rules:
291
291
  ```
292
292
 
293
293
  ---
294
+
295
+
296
+ ---
297
+
298
+
299
+
300
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
301
+
302
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
303
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
304
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
305
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
306
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
307
+
308
+ ---
309
+
310
+
311
+
312
+ **Slash command: `/review` or `/tribunal-full`**
313
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
314
+
315
+ ### ❌ Forbidden AI Tropes
316
+
317
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
318
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
319
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
320
+
321
+
322
+
323
+ Review these questions before confirming output:
324
+ ```
325
+ ✅ Did I rely ONLY on real, verified tools and methods?
326
+ ✅ Is this solution appropriately scoped to the user's constraints?
327
+ ✅ Did I handle potential failure modes and edge cases?
328
+ ✅ Have I avoided generic boilerplate that doesn't add value?
329
+ ```
330
+
331
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
332
+
333
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
334
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
335
+ - ✅ **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.
@@ -94,3 +94,45 @@ for (const result of results) {
94
94
  ```
95
95
 
96
96
  ---
97
+
98
+
99
+ ---
100
+
101
+
102
+
103
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
104
+
105
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
106
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
107
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
108
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
109
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
110
+
111
+ ---
112
+
113
+
114
+
115
+ **Slash command: `/review` or `/tribunal-full`**
116
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
117
+
118
+ ### ❌ Forbidden AI Tropes
119
+
120
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
121
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
122
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
123
+
124
+
125
+
126
+ Review these questions before confirming output:
127
+ ```
128
+ ✅ Did I rely ONLY on real, verified tools and methods?
129
+ ✅ Is this solution appropriately scoped to the user's constraints?
130
+ ✅ Did I handle potential failure modes and edge cases?
131
+ ✅ Have I avoided generic boilerplate that doesn't add value?
132
+ ```
133
+
134
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
135
+
136
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
137
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
138
+ - ✅ **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.
@@ -215,3 +215,45 @@ Performance budget targets:
215
215
  ```
216
216
 
217
217
  ---
218
+
219
+
220
+ ---
221
+
222
+
223
+
224
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
225
+
226
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
227
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
228
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
229
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
230
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
231
+
232
+ ---
233
+
234
+
235
+
236
+ **Slash command: `/review` or `/tribunal-full`**
237
+ **Active reviewers: `logic-reviewer` · `security-auditor`**
238
+
239
+ ### ❌ Forbidden AI Tropes
240
+
241
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
242
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
243
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
244
+
245
+
246
+
247
+ Review these questions before confirming output:
248
+ ```
249
+ ✅ Did I rely ONLY on real, verified tools and methods?
250
+ ✅ Is this solution appropriately scoped to the user's constraints?
251
+ ✅ Did I handle potential failure modes and edge cases?
252
+ ✅ Have I avoided generic boilerplate that doesn't add value?
253
+ ```
254
+
255
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
256
+
257
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
258
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
259
+ - ✅ **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.