tribunal-kit 9.0.1 → 9.2.1

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 (625) hide show
  1. package/.agent/agents/backend-specialist.md +1 -1
  2. package/.agent/agents/code-archaeologist.md +1 -1
  3. package/.agent/agents/database-architect.md +1 -1
  4. package/.agent/agents/debugger.md +1 -1
  5. package/.agent/agents/devops-engineer.md +1 -1
  6. package/.agent/agents/documentation-writer.md +1 -1
  7. package/.agent/agents/explorer-agent.md +1 -1
  8. package/.agent/agents/game-developer.md +1 -1
  9. package/.agent/agents/minimalist-reviewer.md +1 -1
  10. package/.agent/agents/mobile-developer.md +1 -1
  11. package/.agent/agents/orchestrator.md +42 -2
  12. package/.agent/agents/penetration-tester.md +1 -1
  13. package/.agent/agents/performance-optimizer.md +1 -1
  14. package/.agent/agents/product-manager.md +1 -1
  15. package/.agent/agents/product-owner.md +1 -1
  16. package/.agent/agents/project-planner.md +1 -1
  17. package/.agent/agents/qa-automation-engineer.md +1 -1
  18. package/.agent/agents/seo-specialist.md +1 -1
  19. package/.agent/agents/test-engineer.md +1 -1
  20. package/.agent/routing_index.json +265 -1530
  21. package/.agent/scripts/browser_audit.js +13 -5
  22. package/.agent/scripts/bundle_analyzer.js +7 -3
  23. package/.agent/scripts/dependency_analyzer.js +16 -16
  24. package/.agent/scripts/inner_loop_validator.js +1 -1
  25. package/.agent/scripts/payload_schemas.js +18 -0
  26. package/.agent/scripts/pipeline_engine.js +3 -2
  27. package/.agent/scripts/schema_validator.js +2 -1
  28. package/.agent/scripts/swarm_dispatcher.js +29 -2
  29. package/.agent/scripts/test_runner.js +1 -2
  30. package/.agent/skills/12-principles-of-animation/SKILL.md +21 -21
  31. package/.agent/skills/60fps-animation/SKILL.md +24 -22
  32. package/.agent/skills/accessible-animation/SKILL.md +29 -31
  33. package/.agent/skills/adapt/SKILL.md +21 -21
  34. package/.agent/skills/advanced-rag-pipelines/SKILL.md +21 -21
  35. package/.agent/skills/agent-organizer/SKILL.md +21 -21
  36. package/.agent/skills/agentic-patterns/SKILL.md +21 -21
  37. package/.agent/skills/agentic-workflows-2026/SKILL.md +21 -20
  38. package/.agent/skills/ai-app-hardening/SKILL.md +21 -20
  39. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +21 -21
  40. package/.agent/skills/animation-on-scroll/SKILL.md +36 -32
  41. package/.agent/skills/animation-systems/SKILL.md +35 -35
  42. package/.agent/skills/antfu-conventions/SKILL.md +21 -21
  43. package/.agent/skills/api-patterns/SKILL.md +21 -21
  44. package/.agent/skills/api-security-auditor/SKILL.md +21 -21
  45. package/.agent/skills/app-builder/SKILL.md +21 -21
  46. package/.agent/skills/appflow-wireframe/SKILL.md +21 -23
  47. package/.agent/skills/apple-design/SKILL.md +21 -21
  48. package/.agent/skills/architecture/SKILL.md +21 -21
  49. package/.agent/skills/audit-and-fix/SKILL.md +21 -21
  50. package/.agent/skills/authentication-best-practices/SKILL.md +21 -21
  51. package/.agent/skills/backend-security-expert/SKILL.md +21 -21
  52. package/.agent/skills/baseline-ui/SKILL.md +21 -21
  53. package/.agent/skills/bash-linux/SKILL.md +20 -20
  54. package/.agent/skills/behavioral-modes/SKILL.md +21 -21
  55. package/.agent/skills/better-colors/SKILL.md +21 -21
  56. package/.agent/skills/better-typography/SKILL.md +21 -20
  57. package/.agent/skills/better-ui/SKILL.md +38 -26
  58. package/.agent/skills/bolder/SKILL.md +21 -21
  59. package/.agent/skills/brainstorming/SKILL.md +21 -20
  60. package/.agent/skills/browser-audit/SKILL.md +35 -28
  61. package/.agent/skills/browser-native-ai/SKILL.md +21 -21
  62. package/.agent/skills/build-primitive/SKILL.md +21 -21
  63. package/.agent/skills/building-native-ui/SKILL.md +21 -21
  64. package/.agent/skills/cicd-pro/SKILL.md +20 -20
  65. package/.agent/skills/clarify/SKILL.md +21 -21
  66. package/.agent/skills/clean-code/SKILL.md +21 -21
  67. package/.agent/skills/cloud-architect/SKILL.md +20 -20
  68. package/.agent/skills/cobejs/SKILL.md +21 -21
  69. package/.agent/skills/code-review-checklist/SKILL.md +21 -21
  70. package/.agent/skills/codebase-design/SKILL.md +21 -21
  71. package/.agent/skills/colorize/SKILL.md +21 -21
  72. package/.agent/skills/compact-landing/SKILL.md +21 -21
  73. package/.agent/skills/company-logos/SKILL.md +21 -21
  74. package/.agent/skills/config-validator/SKILL.md +21 -21
  75. package/.agent/skills/containerization-pro/SKILL.md +20 -20
  76. package/.agent/skills/context-engineering-pro/SKILL.md +21 -20
  77. package/.agent/skills/create-design-md/SKILL.md +21 -21
  78. package/.agent/skills/critique/SKILL.md +21 -21
  79. package/.agent/skills/csharp-developer/SKILL.md +21 -21
  80. package/.agent/skills/data-validation-schemas/SKILL.md +21 -21
  81. package/.agent/skills/database-design/SKILL.md +21 -21
  82. package/.agent/skills/delight/SKILL.md +21 -21
  83. package/.agent/skills/deployment-procedures/SKILL.md +20 -20
  84. package/.agent/skills/design-lab/SKILL.md +22 -22
  85. package/.agent/skills/devops-engineer/SKILL.md +20 -20
  86. package/.agent/skills/devops-incident-responder/SKILL.md +20 -20
  87. package/.agent/skills/diagnosing-bugs/SKILL.md +22 -22
  88. package/.agent/skills/distill/SKILL.md +21 -21
  89. package/.agent/skills/documentation-templates/SKILL.md +21 -21
  90. package/.agent/skills/domain-modeling/SKILL.md +21 -21
  91. package/.agent/skills/duckdb-analytical-sql/SKILL.md +21 -20
  92. package/.agent/skills/edge-ai-mobile/SKILL.md +21 -20
  93. package/.agent/skills/edge-computing/SKILL.md +21 -21
  94. package/.agent/skills/emil-design-eng/SKILL.md +21 -21
  95. package/.agent/skills/error-resilience/SKILL.md +21 -21
  96. package/.agent/skills/expo-router-v4/SKILL.md +21 -20
  97. package/.agent/skills/extract-design-system/SKILL.md +21 -21
  98. package/.agent/skills/fabel-protocol/SKILL.md +21 -21
  99. package/.agent/skills/fixing-accessibility/SKILL.md +21 -21
  100. package/.agent/skills/fixing-metadata/SKILL.md +21 -21
  101. package/.agent/skills/fixing-motion-performance/SKILL.md +21 -21
  102. package/.agent/skills/framer-motion-expert/SKILL.md +21 -21
  103. package/.agent/skills/frontend-design/SKILL.md +21 -21
  104. package/.agent/skills/frontend-security-expert/SKILL.md +21 -21
  105. package/.agent/skills/game-design-expert/SKILL.md +21 -21
  106. package/.agent/skills/game-engineering-expert/SKILL.md +21 -21
  107. package/.agent/skills/generative-ui-expert/SKILL.md +21 -21
  108. package/.agent/skills/geo-fundamentals/SKILL.md +21 -21
  109. package/.agent/skills/git-pro/SKILL.md +21 -21
  110. package/.agent/skills/github-operations/SKILL.md +21 -21
  111. package/.agent/skills/gpt-taste/SKILL.md +21 -21
  112. package/.agent/skills/gsap-core/SKILL.md +21 -21
  113. package/.agent/skills/gsap-frameworks/SKILL.md +21 -21
  114. package/.agent/skills/gsap-performance/SKILL.md +21 -21
  115. package/.agent/skills/gsap-plugins/SKILL.md +21 -21
  116. package/.agent/skills/gsap-react/SKILL.md +21 -21
  117. package/.agent/skills/gsap-scrolltrigger/SKILL.md +21 -21
  118. package/.agent/skills/gsap-timeline/SKILL.md +21 -21
  119. package/.agent/skills/gsap-utils/SKILL.md +21 -21
  120. package/.agent/skills/harden/SKILL.md +21 -21
  121. package/.agent/skills/harness-protocol/SKILL.md +21 -21
  122. package/.agent/skills/i18n-localization/SKILL.md +21 -21
  123. package/.agent/skills/impeccable/SKILL.md +21 -21
  124. package/.agent/skills/improve-codebase-architecture/SKILL.md +21 -21
  125. package/.agent/skills/improve-ui/SKILL.md +21 -21
  126. package/.agent/skills/intelligent-routing/SKILL.md +21 -20
  127. package/.agent/skills/knowledge-graph/SKILL.md +21 -21
  128. package/.agent/skills/landing-page/SKILL.md +21 -21
  129. package/.agent/skills/lint-and-validate/SKILL.md +21 -21
  130. package/.agent/skills/llm-engineering/SKILL.md +21 -21
  131. package/.agent/skills/local-first/SKILL.md +21 -21
  132. package/.agent/skills/local-first-architecture/SKILL.md +21 -21
  133. package/.agent/skills/lottie-animation/SKILL.md +21 -21
  134. package/.agent/skills/marquee-loop/SKILL.md +21 -21
  135. package/.agent/skills/masked-reveal/SKILL.md +21 -21
  136. package/.agent/skills/mcp-builder/SKILL.md +21 -21
  137. package/.agent/skills/micro-interaction/SKILL.md +39 -32
  138. package/.agent/skills/mobile-design/SKILL.md +21 -21
  139. package/.agent/skills/monorepo-management/SKILL.md +21 -21
  140. package/.agent/skills/morphing-icons/SKILL.md +21 -21
  141. package/.agent/skills/motion-engineering/SKILL.md +21 -21
  142. package/.agent/skills/nextjs-react-expert/SKILL.md +21 -21
  143. package/.agent/skills/nodejs-best-practices/SKILL.md +21 -21
  144. package/.agent/skills/observability/SKILL.md +21 -21
  145. package/.agent/skills/opentelemetry-observability/SKILL.md +20 -19
  146. package/.agent/skills/page-transition-animation/SKILL.md +21 -21
  147. package/.agent/skills/parallel-agents/SKILL.md +21 -21
  148. package/.agent/skills/performance-profiling/SKILL.md +21 -21
  149. package/.agent/skills/plan-writing/SKILL.md +21 -21
  150. package/.agent/skills/platform-engineer/SKILL.md +20 -20
  151. package/.agent/skills/platform-engineering-opentofu/SKILL.md +20 -19
  152. package/.agent/skills/playwright-ai-e2e/SKILL.md +21 -20
  153. package/.agent/skills/playwright-best-practices/SKILL.md +21 -21
  154. package/.agent/skills/polish/SKILL.md +21 -21
  155. package/.agent/skills/powershell-windows/SKILL.md +20 -20
  156. package/.agent/skills/pricing-page/SKILL.md +21 -21
  157. package/.agent/skills/product-aware-heuristics/SKILL.md +21 -21
  158. package/.agent/skills/progressive-blur/SKILL.md +21 -21
  159. package/.agent/skills/project-idioms/SKILL.md +21 -21
  160. package/.agent/skills/property-based-testing/SKILL.md +21 -20
  161. package/.agent/skills/python-patterns/SKILL.md +21 -21
  162. package/.agent/skills/python-pro/SKILL.md +21 -21
  163. package/.agent/skills/quieter/SKILL.md +21 -21
  164. package/.agent/skills/react-doctor/SKILL.md +21 -21
  165. package/.agent/skills/react-specialist/SKILL.md +21 -21
  166. package/.agent/skills/readme-builder/SKILL.md +21 -21
  167. package/.agent/skills/realtime-patterns/SKILL.md +21 -21
  168. package/.agent/skills/red-team-tactics/SKILL.md +21 -21
  169. package/.agent/skills/redesign-skill/SKILL.md +21 -21
  170. package/.agent/skills/review-animations/SKILL.md +21 -21
  171. package/.agent/skills/rust-pro/SKILL.md +21 -21
  172. package/.agent/skills/seo-fundamentals/SKILL.md +21 -21
  173. package/.agent/skills/server-management/SKILL.md +20 -20
  174. package/.agent/skills/shadcn-ui-expert/SKILL.md +21 -21
  175. package/.agent/skills/shape/SKILL.md +21 -21
  176. package/.agent/skills/skill-creator/SKILL.md +28 -21
  177. package/.agent/skills/soft-skill/SKILL.md +21 -21
  178. package/.agent/skills/sounds-on-the-web/SKILL.md +21 -21
  179. package/.agent/skills/sql-pro/SKILL.md +21 -21
  180. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +21 -21
  181. package/.agent/skills/svg-animation/SKILL.md +21 -21
  182. package/.agent/skills/swiftui-expert/SKILL.md +21 -21
  183. package/.agent/skills/swiss-design/SKILL.md +21 -21
  184. package/.agent/skills/system-design-pro/SKILL.md +21 -21
  185. package/.agent/skills/systematic-debugging/SKILL.md +22 -21
  186. package/.agent/skills/systematic-debugging/condition-based-waiting.md +14 -9
  187. package/.agent/skills/systematic-debugging/defense-in-depth.md +9 -3
  188. package/.agent/skills/systematic-debugging/root-cause-tracing.md +14 -0
  189. package/.agent/skills/tailwind-patterns/SKILL.md +21 -21
  190. package/.agent/skills/taste-skill/SKILL.md +21 -21
  191. package/.agent/skills/tdd-workflow/SKILL.md +28 -27
  192. package/.agent/skills/test-result-analyzer/SKILL.md +21 -21
  193. package/.agent/skills/testing-patterns/SKILL.md +21 -21
  194. package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +21 -21
  195. package/.agent/skills/thinking-protocol/SKILL.md +21 -20
  196. package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +21 -21
  197. package/.agent/skills/transitions-dev/SKILL.md +21 -21
  198. package/.agent/skills/trend-researcher/SKILL.md +21 -21
  199. package/.agent/skills/typescript-advanced/SKILL.md +21 -21
  200. package/.agent/skills/typeset/SKILL.md +21 -21
  201. package/.agent/skills/ui-reasoning-engine/SKILL.md +21 -21
  202. package/.agent/skills/ui-skill-packs/SKILL.md +21 -21
  203. package/.agent/skills/ui-skills-root/SKILL.md +21 -21
  204. package/.agent/skills/ui-ux-pro-max/SKILL.md +21 -21
  205. package/.agent/skills/ui-ux-researcher/SKILL.md +21 -21
  206. package/.agent/skills/vector-search-pgvector/SKILL.md +21 -20
  207. package/.agent/skills/verification-before-completion/SKILL.md +40 -36
  208. package/.agent/skills/vue-expert/SKILL.md +21 -21
  209. package/.agent/skills/vulnerability-scanner/SKILL.md +21 -21
  210. package/.agent/skills/web-accessibility-auditor/SKILL.md +21 -21
  211. package/.agent/skills/web-design-guidelines/SKILL.md +21 -21
  212. package/.agent/skills/web-quality-audit/SKILL.md +21 -21
  213. package/.agent/skills/webapp-testing/SKILL.md +21 -21
  214. package/.agent/skills/webgpu-performance/SKILL.md +21 -21
  215. package/.agent/skills/whimsy-injector/SKILL.md +21 -21
  216. package/.agent/skills/workflow-optimizer/SKILL.md +21 -21
  217. package/.agent/skills/zero-trust-passkeys/SKILL.md +21 -20
  218. package/.agent/templates/DESIGN.md +312 -290
  219. package/.agent/templates/sdd/task-reviewer-prompt.md +2 -2
  220. package/.agent/workflows/audit-live.md +4 -3
  221. package/.agent/workflows/brainstorm.md +1 -0
  222. package/.agent/workflows/context.md +9 -7
  223. package/.agent/workflows/minimal.md +3 -2
  224. package/.agent/workflows/plan.md +1 -1
  225. package/.agent/workflows/sdd.md +15 -0
  226. package/.agent/workflows/skill-enhancement-engine.md +11 -11
  227. package/.agent/workflows/super-prompt.md +25 -24
  228. package/.agents/skills/12-principles-of-animation/SKILL.md +21 -21
  229. package/.agents/skills/60fps-animation/SKILL.md +24 -22
  230. package/.agents/skills/accessible-animation/SKILL.md +29 -31
  231. package/.agents/skills/adapt/SKILL.md +21 -21
  232. package/.agents/skills/advanced-rag-pipelines/SKILL.md +21 -21
  233. package/.agents/skills/agent-organizer/SKILL.md +21 -21
  234. package/.agents/skills/agentic-patterns/SKILL.md +21 -21
  235. package/.agents/skills/agentic-workflows-2026/SKILL.md +21 -20
  236. package/.agents/skills/ai-app-hardening/SKILL.md +21 -20
  237. package/.agents/skills/ai-prompt-injection-defense/SKILL.md +21 -21
  238. package/.agents/skills/animation-on-scroll/SKILL.md +36 -32
  239. package/.agents/skills/animation-systems/SKILL.md +35 -35
  240. package/.agents/skills/antfu-conventions/SKILL.md +21 -21
  241. package/.agents/skills/api-patterns/SKILL.md +21 -21
  242. package/.agents/skills/api-security-auditor/SKILL.md +21 -21
  243. package/.agents/skills/app-builder/SKILL.md +21 -21
  244. package/.agents/skills/appflow-wireframe/SKILL.md +21 -23
  245. package/.agents/skills/apple-design/SKILL.md +21 -21
  246. package/.agents/skills/architecture/SKILL.md +21 -21
  247. package/.agents/skills/audit-and-fix/SKILL.md +21 -21
  248. package/.agents/skills/authentication-best-practices/SKILL.md +21 -21
  249. package/.agents/skills/backend-security-expert/SKILL.md +21 -21
  250. package/.agents/skills/baseline-ui/SKILL.md +21 -21
  251. package/.agents/skills/bash-linux/SKILL.md +20 -20
  252. package/.agents/skills/behavioral-modes/SKILL.md +21 -21
  253. package/.agents/skills/better-colors/SKILL.md +21 -21
  254. package/.agents/skills/better-typography/SKILL.md +21 -20
  255. package/.agents/skills/better-ui/SKILL.md +38 -26
  256. package/.agents/skills/bolder/SKILL.md +21 -21
  257. package/.agents/skills/brainstorming/SKILL.md +21 -20
  258. package/.agents/skills/browser-audit/SKILL.md +35 -28
  259. package/.agents/skills/browser-native-ai/SKILL.md +21 -21
  260. package/.agents/skills/build-primitive/SKILL.md +21 -21
  261. package/.agents/skills/building-native-ui/SKILL.md +21 -21
  262. package/.agents/skills/cicd-pro/SKILL.md +20 -20
  263. package/.agents/skills/clarify/SKILL.md +21 -21
  264. package/.agents/skills/clean-code/SKILL.md +21 -21
  265. package/.agents/skills/cloud-architect/SKILL.md +20 -20
  266. package/.agents/skills/cobejs/SKILL.md +21 -21
  267. package/.agents/skills/code-review-checklist/SKILL.md +21 -21
  268. package/.agents/skills/codebase-design/SKILL.md +21 -21
  269. package/.agents/skills/colorize/SKILL.md +21 -21
  270. package/.agents/skills/compact-landing/SKILL.md +21 -21
  271. package/.agents/skills/company-logos/SKILL.md +21 -21
  272. package/.agents/skills/config-validator/SKILL.md +21 -21
  273. package/.agents/skills/containerization-pro/SKILL.md +20 -20
  274. package/.agents/skills/context-engineering-pro/SKILL.md +21 -20
  275. package/.agents/skills/create-design-md/SKILL.md +21 -21
  276. package/.agents/skills/critique/SKILL.md +21 -21
  277. package/.agents/skills/csharp-developer/SKILL.md +21 -21
  278. package/.agents/skills/data-validation-schemas/SKILL.md +21 -21
  279. package/.agents/skills/database-design/SKILL.md +21 -21
  280. package/.agents/skills/delight/SKILL.md +21 -21
  281. package/.agents/skills/deployment-procedures/SKILL.md +20 -20
  282. package/.agents/skills/design-lab/SKILL.md +22 -22
  283. package/.agents/skills/devops-engineer/SKILL.md +20 -20
  284. package/.agents/skills/devops-incident-responder/SKILL.md +20 -20
  285. package/.agents/skills/diagnosing-bugs/SKILL.md +22 -22
  286. package/.agents/skills/distill/SKILL.md +21 -21
  287. package/.agents/skills/documentation-templates/SKILL.md +21 -21
  288. package/.agents/skills/domain-modeling/SKILL.md +21 -21
  289. package/.agents/skills/duckdb-analytical-sql/SKILL.md +21 -20
  290. package/.agents/skills/edge-ai-mobile/SKILL.md +21 -20
  291. package/.agents/skills/edge-computing/SKILL.md +21 -21
  292. package/.agents/skills/emil-design-eng/SKILL.md +21 -21
  293. package/.agents/skills/error-resilience/SKILL.md +21 -21
  294. package/.agents/skills/expo-router-v4/SKILL.md +21 -20
  295. package/.agents/skills/extract-design-system/SKILL.md +21 -21
  296. package/.agents/skills/fabel-protocol/SKILL.md +21 -21
  297. package/.agents/skills/fixing-accessibility/SKILL.md +21 -21
  298. package/.agents/skills/fixing-metadata/SKILL.md +21 -21
  299. package/.agents/skills/fixing-motion-performance/SKILL.md +21 -21
  300. package/.agents/skills/framer-motion-expert/SKILL.md +21 -21
  301. package/.agents/skills/frontend-design/SKILL.md +21 -21
  302. package/.agents/skills/frontend-security-expert/SKILL.md +21 -21
  303. package/.agents/skills/game-design-expert/SKILL.md +21 -21
  304. package/.agents/skills/game-engineering-expert/SKILL.md +21 -21
  305. package/.agents/skills/generative-ui-expert/SKILL.md +21 -21
  306. package/.agents/skills/geo-fundamentals/SKILL.md +21 -21
  307. package/.agents/skills/git-pro/SKILL.md +21 -21
  308. package/.agents/skills/github-operations/SKILL.md +21 -21
  309. package/.agents/skills/gpt-taste/SKILL.md +21 -21
  310. package/.agents/skills/gsap-core/SKILL.md +21 -21
  311. package/.agents/skills/gsap-frameworks/SKILL.md +21 -21
  312. package/.agents/skills/gsap-performance/SKILL.md +21 -21
  313. package/.agents/skills/gsap-plugins/SKILL.md +21 -21
  314. package/.agents/skills/gsap-react/SKILL.md +21 -21
  315. package/.agents/skills/gsap-scrolltrigger/SKILL.md +21 -21
  316. package/.agents/skills/gsap-timeline/SKILL.md +21 -21
  317. package/.agents/skills/gsap-utils/SKILL.md +21 -21
  318. package/.agents/skills/harden/SKILL.md +21 -21
  319. package/.agents/skills/harness-protocol/SKILL.md +21 -21
  320. package/.agents/skills/i18n-localization/SKILL.md +21 -21
  321. package/.agents/skills/impeccable/SKILL.md +21 -21
  322. package/.agents/skills/improve-codebase-architecture/SKILL.md +21 -21
  323. package/.agents/skills/improve-ui/SKILL.md +21 -21
  324. package/.agents/skills/intelligent-routing/SKILL.md +21 -20
  325. package/.agents/skills/knowledge-graph/SKILL.md +21 -21
  326. package/.agents/skills/landing-page/SKILL.md +21 -21
  327. package/.agents/skills/lint-and-validate/SKILL.md +21 -21
  328. package/.agents/skills/llm-engineering/SKILL.md +21 -21
  329. package/.agents/skills/local-first/SKILL.md +21 -21
  330. package/.agents/skills/local-first-architecture/SKILL.md +21 -21
  331. package/.agents/skills/lottie-animation/SKILL.md +21 -21
  332. package/.agents/skills/marquee-loop/SKILL.md +21 -21
  333. package/.agents/skills/masked-reveal/SKILL.md +21 -21
  334. package/.agents/skills/mcp-builder/SKILL.md +21 -21
  335. package/.agents/skills/micro-interaction/SKILL.md +39 -32
  336. package/.agents/skills/mobile-design/SKILL.md +21 -21
  337. package/.agents/skills/monorepo-management/SKILL.md +21 -21
  338. package/.agents/skills/morphing-icons/SKILL.md +21 -21
  339. package/.agents/skills/motion-engineering/SKILL.md +21 -21
  340. package/.agents/skills/nextjs-react-expert/SKILL.md +21 -21
  341. package/.agents/skills/nodejs-best-practices/SKILL.md +21 -21
  342. package/.agents/skills/observability/SKILL.md +21 -21
  343. package/.agents/skills/opentelemetry-observability/SKILL.md +20 -19
  344. package/.agents/skills/page-transition-animation/SKILL.md +21 -21
  345. package/.agents/skills/parallel-agents/SKILL.md +21 -21
  346. package/.agents/skills/performance-profiling/SKILL.md +21 -21
  347. package/.agents/skills/plan-writing/SKILL.md +21 -21
  348. package/.agents/skills/platform-engineer/SKILL.md +20 -20
  349. package/.agents/skills/platform-engineering-opentofu/SKILL.md +20 -19
  350. package/.agents/skills/playwright-ai-e2e/SKILL.md +21 -20
  351. package/.agents/skills/playwright-best-practices/SKILL.md +21 -21
  352. package/.agents/skills/polish/SKILL.md +21 -21
  353. package/.agents/skills/powershell-windows/SKILL.md +20 -20
  354. package/.agents/skills/pricing-page/SKILL.md +21 -21
  355. package/.agents/skills/product-aware-heuristics/SKILL.md +21 -21
  356. package/.agents/skills/progressive-blur/SKILL.md +21 -21
  357. package/.agents/skills/project-idioms/SKILL.md +21 -21
  358. package/.agents/skills/property-based-testing/SKILL.md +21 -20
  359. package/.agents/skills/python-patterns/SKILL.md +21 -21
  360. package/.agents/skills/python-pro/SKILL.md +21 -21
  361. package/.agents/skills/quieter/SKILL.md +21 -21
  362. package/.agents/skills/react-doctor/SKILL.md +21 -21
  363. package/.agents/skills/react-specialist/SKILL.md +21 -21
  364. package/.agents/skills/readme-builder/SKILL.md +21 -21
  365. package/.agents/skills/realtime-patterns/SKILL.md +21 -21
  366. package/.agents/skills/red-team-tactics/SKILL.md +21 -21
  367. package/.agents/skills/redesign-skill/SKILL.md +21 -21
  368. package/.agents/skills/review-animations/SKILL.md +21 -21
  369. package/.agents/skills/rust-pro/SKILL.md +21 -21
  370. package/.agents/skills/seo-fundamentals/SKILL.md +21 -21
  371. package/.agents/skills/server-management/SKILL.md +20 -20
  372. package/.agents/skills/shadcn-ui-expert/SKILL.md +21 -21
  373. package/.agents/skills/shape/SKILL.md +21 -21
  374. package/.agents/skills/skill-creator/SKILL.md +28 -21
  375. package/.agents/skills/soft-skill/SKILL.md +21 -21
  376. package/.agents/skills/sounds-on-the-web/SKILL.md +21 -21
  377. package/.agents/skills/sql-pro/SKILL.md +21 -21
  378. package/.agents/skills/supabase-postgres-best-practices/SKILL.md +21 -21
  379. package/.agents/skills/svg-animation/SKILL.md +21 -21
  380. package/.agents/skills/swiftui-expert/SKILL.md +21 -21
  381. package/.agents/skills/swiss-design/SKILL.md +21 -21
  382. package/.agents/skills/system-design-pro/SKILL.md +21 -21
  383. package/.agents/skills/systematic-debugging/SKILL.md +22 -21
  384. package/.agents/skills/systematic-debugging/condition-based-waiting.md +14 -9
  385. package/.agents/skills/systematic-debugging/defense-in-depth.md +9 -3
  386. package/.agents/skills/systematic-debugging/root-cause-tracing.md +14 -0
  387. package/.agents/skills/tailwind-patterns/SKILL.md +21 -21
  388. package/.agents/skills/taste-skill/SKILL.md +21 -21
  389. package/.agents/skills/tdd-workflow/SKILL.md +28 -27
  390. package/.agents/skills/test-result-analyzer/SKILL.md +21 -21
  391. package/.agents/skills/testing-patterns/SKILL.md +21 -21
  392. package/.agents/skills/thermo-nuclear-code-quality-review/SKILL.md +21 -21
  393. package/.agents/skills/thinking-protocol/SKILL.md +21 -20
  394. package/.agents/skills/to-spring-or-not-to-spring/SKILL.md +21 -21
  395. package/.agents/skills/transitions-dev/SKILL.md +21 -21
  396. package/.agents/skills/trend-researcher/SKILL.md +21 -21
  397. package/.agents/skills/typescript-advanced/SKILL.md +21 -21
  398. package/.agents/skills/typeset/SKILL.md +21 -21
  399. package/.agents/skills/ui-reasoning-engine/SKILL.md +21 -21
  400. package/.agents/skills/ui-skill-packs/SKILL.md +21 -21
  401. package/.agents/skills/ui-skills-root/SKILL.md +21 -21
  402. package/.agents/skills/ui-ux-pro-max/SKILL.md +21 -21
  403. package/.agents/skills/ui-ux-researcher/SKILL.md +21 -21
  404. package/.agents/skills/vector-search-pgvector/SKILL.md +21 -20
  405. package/.agents/skills/verification-before-completion/SKILL.md +40 -36
  406. package/.agents/skills/vue-expert/SKILL.md +21 -21
  407. package/.agents/skills/vulnerability-scanner/SKILL.md +21 -21
  408. package/.agents/skills/web-accessibility-auditor/SKILL.md +21 -21
  409. package/.agents/skills/web-design-guidelines/SKILL.md +21 -21
  410. package/.agents/skills/web-quality-audit/SKILL.md +21 -21
  411. package/.agents/skills/webapp-testing/SKILL.md +21 -21
  412. package/.agents/skills/webgpu-performance/SKILL.md +21 -21
  413. package/.agents/skills/whimsy-injector/SKILL.md +21 -21
  414. package/.agents/skills/workflow-optimizer/SKILL.md +21 -21
  415. package/.agents/skills/zero-trust-passkeys/SKILL.md +21 -20
  416. package/.codex-plugin/plugin.json +1 -5
  417. package/.kimi-plugin/plugin.json +1 -5
  418. package/.opencode/INSTALL.md +1 -0
  419. package/.opencode/plugins/tribunal.js +15 -6
  420. package/.pi/extensions/tribunal.ts +26 -29
  421. package/AGENTS.md +15 -13
  422. package/CLAUDE.md +3 -1
  423. package/README.md +542 -535
  424. package/bin/adapter-install.js +263 -263
  425. package/bin/mcp-server.js +17 -12
  426. package/bin/wrapper.js +12 -1
  427. package/dist/tui/banner.js +77 -77
  428. package/gemini-extension.json +1 -1
  429. package/package.json +176 -176
  430. package/plugin.json +1 -1
  431. package/scripts/apply-version.js +57 -0
  432. package/scripts/audit_skill_sdo.js +6 -4
  433. package/scripts/context_compiler.js +207 -83
  434. package/scripts/modernize_skills.js +25 -11
  435. package/scripts/package-cores.js +4 -1
  436. package/scripts/skill_enhancement_engine.js +211 -50
  437. package/scripts/telemetry_gc.js +154 -0
  438. package/skills/12-principles-of-animation/SKILL.md +21 -21
  439. package/skills/60fps-animation/SKILL.md +24 -22
  440. package/skills/accessible-animation/SKILL.md +29 -31
  441. package/skills/adapt/SKILL.md +21 -21
  442. package/skills/advanced-rag-pipelines/SKILL.md +21 -21
  443. package/skills/agent-organizer/SKILL.md +21 -21
  444. package/skills/agentic-patterns/SKILL.md +21 -21
  445. package/skills/agentic-workflows-2026/SKILL.md +21 -20
  446. package/skills/ai-app-hardening/SKILL.md +21 -20
  447. package/skills/ai-prompt-injection-defense/SKILL.md +21 -21
  448. package/skills/animation-on-scroll/SKILL.md +36 -32
  449. package/skills/animation-systems/SKILL.md +35 -35
  450. package/skills/antfu-conventions/SKILL.md +21 -21
  451. package/skills/api-patterns/SKILL.md +21 -21
  452. package/skills/api-security-auditor/SKILL.md +21 -21
  453. package/skills/app-builder/SKILL.md +21 -21
  454. package/skills/appflow-wireframe/SKILL.md +21 -23
  455. package/skills/apple-design/SKILL.md +21 -21
  456. package/skills/architecture/SKILL.md +21 -21
  457. package/skills/audit-and-fix/SKILL.md +21 -21
  458. package/skills/authentication-best-practices/SKILL.md +21 -21
  459. package/skills/backend-security-expert/SKILL.md +21 -21
  460. package/skills/baseline-ui/SKILL.md +21 -21
  461. package/skills/bash-linux/SKILL.md +20 -20
  462. package/skills/behavioral-modes/SKILL.md +21 -21
  463. package/skills/better-colors/SKILL.md +21 -21
  464. package/skills/better-typography/SKILL.md +21 -20
  465. package/skills/better-ui/SKILL.md +38 -26
  466. package/skills/bolder/SKILL.md +21 -21
  467. package/skills/brainstorming/SKILL.md +21 -20
  468. package/skills/browser-audit/SKILL.md +35 -28
  469. package/skills/browser-native-ai/SKILL.md +21 -21
  470. package/skills/build-primitive/SKILL.md +21 -21
  471. package/skills/building-native-ui/SKILL.md +21 -21
  472. package/skills/cicd-pro/SKILL.md +20 -20
  473. package/skills/clarify/SKILL.md +21 -21
  474. package/skills/clean-code/SKILL.md +21 -21
  475. package/skills/cloud-architect/SKILL.md +20 -20
  476. package/skills/cobejs/SKILL.md +21 -21
  477. package/skills/code-review-checklist/SKILL.md +21 -21
  478. package/skills/codebase-design/SKILL.md +21 -21
  479. package/skills/colorize/SKILL.md +21 -21
  480. package/skills/compact-landing/SKILL.md +21 -21
  481. package/skills/company-logos/SKILL.md +21 -21
  482. package/skills/config-validator/SKILL.md +21 -21
  483. package/skills/containerization-pro/SKILL.md +20 -20
  484. package/skills/context-engineering-pro/SKILL.md +21 -20
  485. package/skills/create-design-md/SKILL.md +21 -21
  486. package/skills/critique/SKILL.md +21 -21
  487. package/skills/csharp-developer/SKILL.md +21 -21
  488. package/skills/data-validation-schemas/SKILL.md +21 -21
  489. package/skills/database-design/SKILL.md +21 -21
  490. package/skills/delight/SKILL.md +21 -21
  491. package/skills/deployment-procedures/SKILL.md +20 -20
  492. package/skills/design-lab/SKILL.md +22 -22
  493. package/skills/devops-engineer/SKILL.md +20 -20
  494. package/skills/devops-incident-responder/SKILL.md +20 -20
  495. package/skills/diagnosing-bugs/SKILL.md +22 -22
  496. package/skills/distill/SKILL.md +21 -21
  497. package/skills/documentation-templates/SKILL.md +21 -21
  498. package/skills/domain-modeling/SKILL.md +21 -21
  499. package/skills/duckdb-analytical-sql/SKILL.md +21 -20
  500. package/skills/edge-ai-mobile/SKILL.md +21 -20
  501. package/skills/edge-computing/SKILL.md +21 -21
  502. package/skills/emil-design-eng/SKILL.md +21 -21
  503. package/skills/error-resilience/SKILL.md +21 -21
  504. package/skills/expo-router-v4/SKILL.md +21 -20
  505. package/skills/extract-design-system/SKILL.md +21 -21
  506. package/skills/fabel-protocol/SKILL.md +21 -21
  507. package/skills/fixing-accessibility/SKILL.md +21 -21
  508. package/skills/fixing-metadata/SKILL.md +21 -21
  509. package/skills/fixing-motion-performance/SKILL.md +21 -21
  510. package/skills/framer-motion-expert/SKILL.md +21 -21
  511. package/skills/frontend-design/SKILL.md +21 -21
  512. package/skills/frontend-security-expert/SKILL.md +21 -21
  513. package/skills/game-design-expert/SKILL.md +21 -21
  514. package/skills/game-engineering-expert/SKILL.md +21 -21
  515. package/skills/generative-ui-expert/SKILL.md +21 -21
  516. package/skills/geo-fundamentals/SKILL.md +21 -21
  517. package/skills/git-pro/SKILL.md +21 -21
  518. package/skills/github-operations/SKILL.md +21 -21
  519. package/skills/gpt-taste/SKILL.md +21 -21
  520. package/skills/gsap-core/SKILL.md +21 -21
  521. package/skills/gsap-frameworks/SKILL.md +21 -21
  522. package/skills/gsap-performance/SKILL.md +21 -21
  523. package/skills/gsap-plugins/SKILL.md +21 -21
  524. package/skills/gsap-react/SKILL.md +21 -21
  525. package/skills/gsap-scrolltrigger/SKILL.md +21 -21
  526. package/skills/gsap-timeline/SKILL.md +21 -21
  527. package/skills/gsap-utils/SKILL.md +21 -21
  528. package/skills/harden/SKILL.md +21 -21
  529. package/skills/harness-protocol/SKILL.md +21 -21
  530. package/skills/i18n-localization/SKILL.md +21 -21
  531. package/skills/impeccable/SKILL.md +21 -21
  532. package/skills/improve-codebase-architecture/SKILL.md +21 -21
  533. package/skills/improve-ui/SKILL.md +21 -21
  534. package/skills/intelligent-routing/SKILL.md +21 -20
  535. package/skills/knowledge-graph/SKILL.md +21 -21
  536. package/skills/landing-page/SKILL.md +21 -21
  537. package/skills/lint-and-validate/SKILL.md +21 -21
  538. package/skills/llm-engineering/SKILL.md +21 -21
  539. package/skills/local-first/SKILL.md +21 -21
  540. package/skills/local-first-architecture/SKILL.md +21 -21
  541. package/skills/lottie-animation/SKILL.md +21 -21
  542. package/skills/marquee-loop/SKILL.md +21 -21
  543. package/skills/masked-reveal/SKILL.md +21 -21
  544. package/skills/mcp-builder/SKILL.md +21 -21
  545. package/skills/micro-interaction/SKILL.md +39 -32
  546. package/skills/mobile-design/SKILL.md +21 -21
  547. package/skills/monorepo-management/SKILL.md +21 -21
  548. package/skills/morphing-icons/SKILL.md +21 -21
  549. package/skills/motion-engineering/SKILL.md +21 -21
  550. package/skills/nextjs-react-expert/SKILL.md +21 -21
  551. package/skills/nodejs-best-practices/SKILL.md +21 -21
  552. package/skills/observability/SKILL.md +21 -21
  553. package/skills/opentelemetry-observability/SKILL.md +20 -19
  554. package/skills/page-transition-animation/SKILL.md +21 -21
  555. package/skills/parallel-agents/SKILL.md +21 -21
  556. package/skills/performance-profiling/SKILL.md +21 -21
  557. package/skills/plan-writing/SKILL.md +21 -21
  558. package/skills/platform-engineer/SKILL.md +20 -20
  559. package/skills/platform-engineering-opentofu/SKILL.md +20 -19
  560. package/skills/playwright-ai-e2e/SKILL.md +21 -20
  561. package/skills/playwright-best-practices/SKILL.md +21 -21
  562. package/skills/polish/SKILL.md +21 -21
  563. package/skills/powershell-windows/SKILL.md +20 -20
  564. package/skills/pricing-page/SKILL.md +21 -21
  565. package/skills/product-aware-heuristics/SKILL.md +21 -21
  566. package/skills/progressive-blur/SKILL.md +21 -21
  567. package/skills/project-idioms/SKILL.md +21 -21
  568. package/skills/property-based-testing/SKILL.md +21 -20
  569. package/skills/python-patterns/SKILL.md +21 -21
  570. package/skills/python-pro/SKILL.md +21 -21
  571. package/skills/quieter/SKILL.md +21 -21
  572. package/skills/react-doctor/SKILL.md +21 -21
  573. package/skills/react-specialist/SKILL.md +21 -21
  574. package/skills/readme-builder/SKILL.md +21 -21
  575. package/skills/realtime-patterns/SKILL.md +21 -21
  576. package/skills/red-team-tactics/SKILL.md +21 -21
  577. package/skills/redesign-skill/SKILL.md +21 -21
  578. package/skills/review-animations/SKILL.md +21 -21
  579. package/skills/rust-pro/SKILL.md +21 -21
  580. package/skills/seo-fundamentals/SKILL.md +21 -21
  581. package/skills/server-management/SKILL.md +20 -20
  582. package/skills/shadcn-ui-expert/SKILL.md +21 -21
  583. package/skills/shape/SKILL.md +21 -21
  584. package/skills/skill-creator/SKILL.md +28 -21
  585. package/skills/soft-skill/SKILL.md +21 -21
  586. package/skills/sounds-on-the-web/SKILL.md +21 -21
  587. package/skills/sql-pro/SKILL.md +21 -21
  588. package/skills/supabase-postgres-best-practices/SKILL.md +21 -21
  589. package/skills/svg-animation/SKILL.md +21 -21
  590. package/skills/swiftui-expert/SKILL.md +21 -21
  591. package/skills/swiss-design/SKILL.md +21 -21
  592. package/skills/system-design-pro/SKILL.md +21 -21
  593. package/skills/systematic-debugging/SKILL.md +22 -21
  594. package/skills/systematic-debugging/condition-based-waiting.md +14 -9
  595. package/skills/systematic-debugging/defense-in-depth.md +9 -3
  596. package/skills/systematic-debugging/root-cause-tracing.md +14 -0
  597. package/skills/tailwind-patterns/SKILL.md +21 -21
  598. package/skills/taste-skill/SKILL.md +21 -21
  599. package/skills/tdd-workflow/SKILL.md +28 -27
  600. package/skills/test-result-analyzer/SKILL.md +21 -21
  601. package/skills/testing-patterns/SKILL.md +21 -21
  602. package/skills/thermo-nuclear-code-quality-review/SKILL.md +21 -21
  603. package/skills/thinking-protocol/SKILL.md +21 -20
  604. package/skills/to-spring-or-not-to-spring/SKILL.md +21 -21
  605. package/skills/transitions-dev/SKILL.md +21 -21
  606. package/skills/trend-researcher/SKILL.md +21 -21
  607. package/skills/typescript-advanced/SKILL.md +21 -21
  608. package/skills/typeset/SKILL.md +21 -21
  609. package/skills/ui-reasoning-engine/SKILL.md +21 -21
  610. package/skills/ui-skill-packs/SKILL.md +21 -21
  611. package/skills/ui-skills-root/SKILL.md +21 -21
  612. package/skills/ui-ux-pro-max/SKILL.md +21 -21
  613. package/skills/ui-ux-researcher/SKILL.md +21 -21
  614. package/skills/vector-search-pgvector/SKILL.md +21 -20
  615. package/skills/verification-before-completion/SKILL.md +40 -36
  616. package/skills/vue-expert/SKILL.md +21 -21
  617. package/skills/vulnerability-scanner/SKILL.md +21 -21
  618. package/skills/web-accessibility-auditor/SKILL.md +21 -21
  619. package/skills/web-design-guidelines/SKILL.md +21 -21
  620. package/skills/web-quality-audit/SKILL.md +21 -21
  621. package/skills/webapp-testing/SKILL.md +21 -21
  622. package/skills/webgpu-performance/SKILL.md +21 -21
  623. package/skills/whimsy-injector/SKILL.md +21 -21
  624. package/skills/workflow-optimizer/SKILL.md +21 -21
  625. package/skills/zero-trust-passkeys/SKILL.md +21 -20
@@ -36,14 +36,14 @@ Before generating, refactoring, or reviewing code in the `svg-animation` domain,
36
36
 
37
37
  Execute all non-trivial tasks through this 7-pass cognitive loop:
38
38
 
39
- | Pass | Phase | Core Action |
40
- |:---|:---|:---|
41
- | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
42
- | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
43
- | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
44
- | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
45
- | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
46
- | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
39
+ | Pass | Phase | Core Action |
40
+ | :--------- | :--------------- | :------------------------------------------------------------------------------------------- |
41
+ | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
42
+ | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
43
+ | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
44
+ | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
45
+ | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
46
+ | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
47
47
  | **Pass 7** | **Quality Gate** | Enforce Verification-Before-Completion (VBC) with concrete terminal proof before finalizing. |
48
48
 
49
49
  ---
@@ -54,7 +54,6 @@ SVG motion represents the intersection of analytical geometry and hardware-accel
54
54
 
55
55
  ---
56
56
 
57
-
58
57
  ---
59
58
 
60
59
  ## 1. Vector Coordinate Systems & Rendering Fidelity
@@ -389,23 +388,23 @@ export function AudioWaveVisualizer({ isPlaying }: { isPlaying: boolean }) {
389
388
 
390
389
  ## 🚨 Edge-Case & Failure Mode Matrix
391
390
 
392
- | Scenario | Risk | Mitigation Strategy |
393
- |:---|:---|:---|
394
- | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
395
- | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
396
- | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
397
- | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
398
- | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
391
+ | Scenario | Risk | Mitigation Strategy |
392
+ | :------------------------------------- | :--------------------------------------------------- | :------------------------------------------------------------------------------ |
393
+ | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
394
+ | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
395
+ | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
396
+ | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
397
+ | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
399
398
 
400
399
  ---
401
400
 
402
401
  ## 🤖 LLM-Specific Traps Table
403
402
 
404
- | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
405
- |:---|:---|:---|
406
- | **The Instant Pop Trap** | Conditionally unmounting elements without animated interpolation | Use AnimatePresence or coordinate morphs with continuous geometry |
407
- | **Layout Thrashing** | Animating width, height, top, or left inside animation loops | Animate composite-only transform (translate3d, scale) and opacity |
408
- | **Sluggish Duration** | Setting micro-interaction transitions to 600ms+ causing interface lag | Cap interactive feedback at 160ms–240ms with snappy ease-out curves |
403
+ | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
404
+ | :----------------------- | :-------------------------------------------------------------------- | :------------------------------------------------------------------ |
405
+ | **The Instant Pop Trap** | Conditionally unmounting elements without animated interpolation | Use AnimatePresence or coordinate morphs with continuous geometry |
406
+ | **Layout Thrashing** | Animating width, height, top, or left inside animation loops | Animate composite-only transform (translate3d, scale) and opacity |
407
+ | **Sluggish Duration** | Setting micro-interaction transitions to 600ms+ causing interface lag | Cap interactive feedback at 160ms–240ms with snappy ease-out curves |
409
408
 
410
409
  ---
411
410
 
@@ -427,5 +426,6 @@ export function AudioWaveVisualizer({ isPlaying }: { isPlaying: boolean }) {
427
426
  ### 🛑 Verification-Before-Completion (VBC) Protocol
428
427
 
429
428
  **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
429
+
430
430
  - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
431
431
  - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing test suites, compiler success, or equivalent operational proof) that your output works as intended.
@@ -34,14 +34,14 @@ Before generating, refactoring, or reviewing code in the `swiftui-expert` domain
34
34
 
35
35
  Execute all non-trivial tasks through this 7-pass cognitive loop:
36
36
 
37
- | Pass | Phase | Core Action |
38
- |:---|:---|:---|
39
- | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
40
- | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
41
- | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
42
- | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
43
- | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
44
- | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
37
+ | Pass | Phase | Core Action |
38
+ | :--------- | :--------------- | :------------------------------------------------------------------------------------------- |
39
+ | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
40
+ | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
41
+ | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
42
+ | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
43
+ | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
44
+ | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
45
45
  | **Pass 7** | **Quality Gate** | Enforce Verification-Before-Completion (VBC) with concrete terminal proof before finalizing. |
46
46
 
47
47
  ---
@@ -50,7 +50,6 @@ Execute all non-trivial tasks through this 7-pass cognitive loop:
50
50
 
51
51
  ---
52
52
 
53
-
54
53
  ## Hallucination Traps (Read First)
55
54
 
56
55
  - ❌ Using `@State` for shared data between views -> ✅ `@State` is local to a view; use `@Binding`, `@Environment`, or `@Observable` for sharing
@@ -197,23 +196,23 @@ While MVVM is historically popular, SwiftUI natively represents View-as-a-functi
197
196
 
198
197
  ## 🚨 Edge-Case & Failure Mode Matrix
199
198
 
200
- | Scenario | Risk | Mitigation Strategy |
201
- |:---|:---|:---|
202
- | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
203
- | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
204
- | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
205
- | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
206
- | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
199
+ | Scenario | Risk | Mitigation Strategy |
200
+ | :------------------------------------- | :--------------------------------------------------- | :------------------------------------------------------------------------------ |
201
+ | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
202
+ | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
203
+ | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
204
+ | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
205
+ | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
207
206
 
208
207
  ---
209
208
 
210
209
  ## 🤖 LLM-Specific Traps Table
211
210
 
212
- | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
213
- |:---|:---|:---|
214
- | **JS Thread Animation Lag** | Driving gestures and scrolling physics on the React Native JS thread | Use React Native Reanimated worklets running directly on the UI thread |
215
- | **Missing Keyboard Offset** | Forms hidden behind native software keyboard on iOS/Android | Wrap form views in KeyboardAvoidingView with platform-calibrated behavior |
216
- | **Uncached Image Flooding** | Rendering raw image URLs in list items without memory caching | Use FastImage or Expo Image with disk cache policies and thumbnail previews |
211
+ | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
212
+ | :-------------------------- | :------------------------------------------------------------------- | :-------------------------------------------------------------------------- |
213
+ | **JS Thread Animation Lag** | Driving gestures and scrolling physics on the React Native JS thread | Use React Native Reanimated worklets running directly on the UI thread |
214
+ | **Missing Keyboard Offset** | Forms hidden behind native software keyboard on iOS/Android | Wrap form views in KeyboardAvoidingView with platform-calibrated behavior |
215
+ | **Uncached Image Flooding** | Rendering raw image URLs in list items without memory caching | Use FastImage or Expo Image with disk cache policies and thumbnail previews |
217
216
 
218
217
  ---
219
218
 
@@ -235,5 +234,6 @@ While MVVM is historically popular, SwiftUI natively represents View-as-a-functi
235
234
  ### 🛑 Verification-Before-Completion (VBC) Protocol
236
235
 
237
236
  **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
237
+
238
238
  - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
239
239
  - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing test suites, compiler success, or equivalent operational proof) that your output works as intended.
@@ -34,14 +34,14 @@ Before generating, refactoring, or reviewing code in the `swiss-design` domain,
34
34
 
35
35
  Execute all non-trivial tasks through this 7-pass cognitive loop:
36
36
 
37
- | Pass | Phase | Core Action |
38
- |:---|:---|:---|
39
- | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
40
- | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
41
- | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
42
- | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
43
- | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
44
- | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
37
+ | Pass | Phase | Core Action |
38
+ | :--------- | :--------------- | :------------------------------------------------------------------------------------------- |
39
+ | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
40
+ | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
41
+ | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
42
+ | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
43
+ | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
44
+ | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
45
45
  | **Pass 7** | **Quality Gate** | Enforce Verification-Before-Completion (VBC) with concrete terminal proof before finalizing. |
46
46
 
47
47
  ---
@@ -50,7 +50,6 @@ Execute all non-trivial tasks through this 7-pass cognitive loop:
50
50
 
51
51
  ---
52
52
 
53
-
54
53
  ---
55
54
 
56
55
  ## 4 Swiss Design Pillars
@@ -77,23 +76,23 @@ Execute all non-trivial tasks through this 7-pass cognitive loop:
77
76
 
78
77
  ## 🚨 Edge-Case & Failure Mode Matrix
79
78
 
80
- | Scenario | Risk | Mitigation Strategy |
81
- |:---|:---|:---|
82
- | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
83
- | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
84
- | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
85
- | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
86
- | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
79
+ | Scenario | Risk | Mitigation Strategy |
80
+ | :------------------------------------- | :--------------------------------------------------- | :------------------------------------------------------------------------------ |
81
+ | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
82
+ | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
83
+ | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
84
+ | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
85
+ | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
87
86
 
88
87
  ---
89
88
 
90
89
  ## 🤖 LLM-Specific Traps Table
91
90
 
92
- | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
93
- |:---|:---|:---|
94
- | **Uncontrolled Re-render Loop** | Mutating state inside render bodies or omitting hook dependencies | Wrap effects with explicit deps and isolate reactive derivations in useMemo |
95
- | **Accessibility Neglect** | Interactive <div> without role="button", tabIndex, or onKeyDown | Use semantic <button> or provide ARIA role, keyboard handlers, and focus ring |
96
- | **Layout Shift Flash** | Images/dynamic content without aspect-ratio or explicit dimensions | Enforce aspect-ratio or skeleton placeholders to guarantee zero CLS |
91
+ | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
92
+ | :------------------------------ | :----------------------------------------------------------------- | :---------------------------------------------------------------------------- |
93
+ | **Uncontrolled Re-render Loop** | Mutating state inside render bodies or omitting hook dependencies | Wrap effects with explicit deps and isolate reactive derivations in useMemo |
94
+ | **Accessibility Neglect** | Interactive <div> without role="button", tabIndex, or onKeyDown | Use semantic <button> or provide ARIA role, keyboard handlers, and focus ring |
95
+ | **Layout Shift Flash** | Images/dynamic content without aspect-ratio or explicit dimensions | Enforce aspect-ratio or skeleton placeholders to guarantee zero CLS |
97
96
 
98
97
  ---
99
98
 
@@ -115,5 +114,6 @@ Execute all non-trivial tasks through this 7-pass cognitive loop:
115
114
  ### 🛑 Verification-Before-Completion (VBC) Protocol
116
115
 
117
116
  **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
117
+
118
118
  - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
119
119
  - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing test suites, compiler success, or equivalent operational proof) that your output works as intended.
@@ -34,14 +34,14 @@ Before generating, refactoring, or reviewing code in the `system-design-pro` dom
34
34
 
35
35
  Execute all non-trivial tasks through this 7-pass cognitive loop:
36
36
 
37
- | Pass | Phase | Core Action |
38
- |:---|:---|:---|
39
- | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
40
- | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
41
- | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
42
- | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
43
- | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
44
- | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
37
+ | Pass | Phase | Core Action |
38
+ | :--------- | :--------------- | :------------------------------------------------------------------------------------------- |
39
+ | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
40
+ | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
41
+ | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
42
+ | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
43
+ | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
44
+ | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
45
45
  | **Pass 7** | **Quality Gate** | Enforce Verification-Before-Completion (VBC) with concrete terminal proof before finalizing. |
46
46
 
47
47
  ---
@@ -50,7 +50,6 @@ Execute all non-trivial tasks through this 7-pass cognitive loop:
50
50
 
51
51
  ---
52
52
 
53
-
54
53
  ## Hallucination Traps (Read First)
55
54
 
56
55
  - ❌ "Just use microservices" for <10K RPM → ✅ Microservices add operational complexity that kills small teams. Start monolith.
@@ -351,23 +350,23 @@ Failure handling:
351
350
 
352
351
  ## 🚨 Edge-Case & Failure Mode Matrix
353
352
 
354
- | Scenario | Risk | Mitigation Strategy |
355
- |:---|:---|:---|
356
- | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
357
- | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
358
- | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
359
- | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
360
- | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
353
+ | Scenario | Risk | Mitigation Strategy |
354
+ | :------------------------------------- | :--------------------------------------------------- | :------------------------------------------------------------------------------ |
355
+ | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
356
+ | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
357
+ | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
358
+ | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
359
+ | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
361
360
 
362
361
  ---
363
362
 
364
363
  ## 🤖 LLM-Specific Traps Table
365
364
 
366
- | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
367
- |:---|:---|:---|
368
- | **Hallucinated Tool Capabilities** | Assuming an external library or CLI command exists without verification | Run a verification check or verify package.json before referencing tools |
369
- | **Premature Completion Claim** | Declaring a task finished because code was generated without verification | Execute tests, linters, or terminal commands to provide concrete proof |
370
- | **Context Bloat Dumping** | Pasting entire multi-thousand-line files into prompt context | Extract targeted excerpts, symbols, and signatures to preserve tokens |
365
+ | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
366
+ | :--------------------------------- | :------------------------------------------------------------------------ | :----------------------------------------------------------------------- |
367
+ | **Hallucinated Tool Capabilities** | Assuming an external library or CLI command exists without verification | Run a verification check or verify package.json before referencing tools |
368
+ | **Premature Completion Claim** | Declaring a task finished because code was generated without verification | Execute tests, linters, or terminal commands to provide concrete proof |
369
+ | **Context Bloat Dumping** | Pasting entire multi-thousand-line files into prompt context | Extract targeted excerpts, symbols, and signatures to preserve tokens |
371
370
 
372
371
  ---
373
372
 
@@ -389,5 +388,6 @@ Failure handling:
389
388
  ### 🛑 Verification-Before-Completion (VBC) Protocol
390
389
 
391
390
  **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
391
+
392
392
  - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
393
393
  - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing test suites, compiler success, or equivalent operational proof) that your output works as intended.
@@ -35,14 +35,14 @@ Before generating, refactoring, or reviewing code in the `systematic-debugging`
35
35
 
36
36
  Execute all non-trivial tasks through this 7-pass cognitive loop:
37
37
 
38
- | Pass | Phase | Core Action |
39
- |:---|:---|:---|
40
- | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
41
- | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
42
- | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
43
- | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
44
- | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
45
- | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
38
+ | Pass | Phase | Core Action |
39
+ | :--------- | :--------------- | :------------------------------------------------------------------------------------------- |
40
+ | **Pass 1** | **Understand** | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. |
41
+ | **Pass 2** | **Plan** | Decompose the task into smallest logical steps; map dependencies and required tool calls. |
42
+ | **Pass 3** | **Execute** | Implement the solution with production-grade craft, zero placeholders, and strict typing. |
43
+ | **Pass 4** | **Verify** | Run linters, unit tests, or compiler checks to validate structural correctness. |
44
+ | **Pass 5** | **Attack** | Perform an adversarial review searching for edge-case failures, race conditions, and traps. |
45
+ | **Pass 6** | **Improve** | Eliminate discovered friction, optimize performance, and harden error boundaries. |
46
46
  | **Pass 7** | **Quality Gate** | Enforce Verification-Before-Completion (VBC) with concrete terminal proof before finalizing. |
47
47
 
48
48
  ---
@@ -51,7 +51,6 @@ Execute all non-trivial tasks through this 7-pass cognitive loop:
51
51
 
52
52
  ---
53
53
 
54
-
55
54
  ## Hallucination Traps (Read First)
56
55
 
57
56
  - ❌ Changing multiple things at once to fix a bug -> ✅ Change ONE variable at a time; multiple changes make it impossible to identify the fix
@@ -97,6 +96,7 @@ Never jump straight into modifying code when a bug is reported.
97
96
  ## 2. Specialized Diagnostic Techniques
98
97
 
99
98
  When debugging intricate or elusive bugs, reference these specialized technique guides:
99
+
100
100
  - **Root Cause Tracing (`./root-cause-tracing.md`):** Trace backwards up the call stack to identify where invalid data originated, rather than fixing where the error appears.
101
101
  - **Condition-Based Waiting (`./condition-based-waiting.md`):** Eliminate flaky tests and timing bugs by waiting for specific deterministic state conditions instead of arbitrary `setTimeout` or `sleep` calls.
102
102
  - **Defense in Depth (`./defense-in-depth.md`):** Add validation and runtime assertions at multiple component boundaries.
@@ -156,23 +156,23 @@ Do not skim. Stack traces tell the exact sequence of destruction.
156
156
 
157
157
  ## 🚨 Edge-Case & Failure Mode Matrix
158
158
 
159
- | Scenario | Risk | Mitigation Strategy |
160
- |:---|:---|:---|
161
- | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
162
- | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
163
- | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
164
- | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
165
- | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
159
+ | Scenario | Risk | Mitigation Strategy |
160
+ | :------------------------------------- | :--------------------------------------------------- | :------------------------------------------------------------------------------ |
161
+ | **Empty or Null Inputs** | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
162
+ | **Network Timeout / Latency** | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
163
+ | **Concurrency / Race Conditions** | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
164
+ | **Invalid Schema / Malformed Payload** | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
165
+ | **Resource / Memory Saturation** | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
166
166
 
167
167
  ---
168
168
 
169
169
  ## 🤖 LLM-Specific Traps Table
170
170
 
171
- | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
172
- |:---|:---|:---|
173
- | **Hallucinated Tool Capabilities** | Assuming an external library or CLI command exists without verification | Run a verification check or verify package.json before referencing tools |
174
- | **Premature Completion Claim** | Declaring a task finished because code was generated without verification | Execute tests, linters, or terminal commands to provide concrete proof |
175
- | **Context Bloat Dumping** | Pasting entire multi-thousand-line files into prompt context | Extract targeted excerpts, symbols, and signatures to preserve tokens |
171
+ | Anti-Pattern | What AI Commonly Does Wrong | What Is Actually Correct |
172
+ | :--------------------------------- | :------------------------------------------------------------------------ | :----------------------------------------------------------------------- |
173
+ | **Hallucinated Tool Capabilities** | Assuming an external library or CLI command exists without verification | Run a verification check or verify package.json before referencing tools |
174
+ | **Premature Completion Claim** | Declaring a task finished because code was generated without verification | Execute tests, linters, or terminal commands to provide concrete proof |
175
+ | **Context Bloat Dumping** | Pasting entire multi-thousand-line files into prompt context | Extract targeted excerpts, symbols, and signatures to preserve tokens |
176
176
 
177
177
  ---
178
178
 
@@ -194,5 +194,6 @@ Do not skim. Stack traces tell the exact sequence of destruction.
194
194
  ### 🛑 Verification-Before-Completion (VBC) Protocol
195
195
 
196
196
  **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
197
+
197
198
  - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
198
199
  - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing test suites, compiler success, or equivalent operational proof) that your output works as intended.
@@ -22,12 +22,14 @@ digraph when_to_use {
22
22
  ```
23
23
 
24
24
  **Use when:**
25
+
25
26
  - Tests have arbitrary delays (`setTimeout`, `sleep`, `time.sleep()`)
26
27
  - Tests are flaky (pass sometimes, fail under load)
27
28
  - Tests timeout when run in parallel
28
29
  - Waiting for async operations to complete
29
30
 
30
31
  **Don't use when:**
32
+
31
33
  - Testing actual timing behavior (debounce, throttle intervals)
32
34
  - Always document WHY if using arbitrary timeout
33
35
 
@@ -47,22 +49,23 @@ expect(result).toBeDefined();
47
49
 
48
50
  ## Quick Patterns
49
51
 
50
- | Scenario | Pattern |
51
- |----------|---------|
52
- | Wait for event | `waitFor(() => events.find(e => e.type === 'DONE'))` |
53
- | Wait for state | `waitFor(() => machine.state === 'ready')` |
54
- | Wait for count | `waitFor(() => items.length >= 5)` |
55
- | Wait for file | `waitFor(() => fs.existsSync(path))` |
56
- | Complex condition | `waitFor(() => obj.ready && obj.value > 10)` |
52
+ | Scenario | Pattern |
53
+ | ----------------- | ---------------------------------------------------- |
54
+ | Wait for event | `waitFor(() => events.find(e => e.type === 'DONE'))` |
55
+ | Wait for state | `waitFor(() => machine.state === 'ready')` |
56
+ | Wait for count | `waitFor(() => items.length >= 5)` |
57
+ | Wait for file | `waitFor(() => fs.existsSync(path))` |
58
+ | Complex condition | `waitFor(() => obj.ready && obj.value > 10)` |
57
59
 
58
60
  ## Implementation
59
61
 
60
62
  Generic polling function:
63
+
61
64
  ```typescript
62
65
  async function waitFor<T>(
63
66
  condition: () => T | undefined | null | false,
64
67
  description: string,
65
- timeoutMs = 5000
68
+ timeoutMs = 5000,
66
69
  ): Promise<T> {
67
70
  const startTime = Date.now();
68
71
 
@@ -97,11 +100,12 @@ See `condition-based-waiting-example.ts` in this directory for complete implemen
97
100
  ```typescript
98
101
  // Tool ticks every 100ms - need 2 ticks to verify partial output
99
102
  await waitForEvent(manager, 'TOOL_STARTED'); // First: wait for condition
100
- await new Promise(r => setTimeout(r, 200)); // Then: wait for timed behavior
103
+ await new Promise(r => setTimeout(r, 200)); // Then: wait for timed behavior
101
104
  // 200ms = 2 ticks at 100ms intervals - documented and justified
102
105
  ```
103
106
 
104
107
  **Requirements:**
108
+
105
109
  1. First wait for triggering condition
106
110
  2. Based on known timing (not guessing)
107
111
  3. Comment explaining WHY
@@ -109,6 +113,7 @@ await new Promise(r => setTimeout(r, 200)); // Then: wait for timed behavior
109
113
  ## Real-World Impact
110
114
 
111
115
  From debugging session (2025-10-03):
116
+
112
117
  - Fixed 15 flaky tests across 3 files
113
118
  - Pass rate: 60% → 100%
114
119
  - Execution time: 40% faster
@@ -12,6 +12,7 @@ Single validation: "We fixed the bug"
12
12
  Multiple layers: "We made the bug impossible"
13
13
 
14
14
  Different layers catch different cases:
15
+
15
16
  - Entry validation catches most bugs
16
17
  - Business logic catches edge cases
17
18
  - Environment guards prevent context-specific dangers
@@ -20,6 +21,7 @@ Different layers catch different cases:
20
21
  ## The Four Layers
21
22
 
22
23
  ### Layer 1: Entry Point Validation
24
+
23
25
  **Purpose:** Reject obviously invalid input at API boundary
24
26
 
25
27
  ```typescript
@@ -38,6 +40,7 @@ function createProject(name: string, workingDirectory: string) {
38
40
  ```
39
41
 
40
42
  ### Layer 2: Business Logic Validation
43
+
41
44
  **Purpose:** Ensure data makes sense for this operation
42
45
 
43
46
  ```typescript
@@ -50,6 +53,7 @@ function initializeWorkspace(projectDir: string, sessionId: string) {
50
53
  ```
51
54
 
52
55
  ### Layer 3: Environment Guards
56
+
53
57
  **Purpose:** Prevent dangerous operations in specific contexts
54
58
 
55
59
  ```typescript
@@ -60,9 +64,7 @@ async function gitInit(directory: string) {
60
64
  const tmpDir = normalize(resolve(tmpdir()));
61
65
 
62
66
  if (!normalized.startsWith(tmpDir)) {
63
- throw new Error(
64
- `Refusing git init outside temp dir during tests: ${directory}`
65
- );
67
+ throw new Error(`Refusing git init outside temp dir during tests: ${directory}`);
66
68
  }
67
69
  }
68
70
  // ... proceed
@@ -70,6 +72,7 @@ async function gitInit(directory: string) {
70
72
  ```
71
73
 
72
74
  ### Layer 4: Debug Instrumentation
75
+
73
76
  **Purpose:** Capture context for forensics
74
77
 
75
78
  ```typescript
@@ -98,12 +101,14 @@ When you find a bug:
98
101
  Bug: Empty `projectDir` caused `git init` in source code
99
102
 
100
103
  **Data flow:**
104
+
101
105
  1. Test setup → empty string
102
106
  2. `Project.create(name, '')`
103
107
  3. `WorkspaceManager.createWorkspace('')`
104
108
  4. `git init` runs in `process.cwd()`
105
109
 
106
110
  **Four layers added:**
111
+
107
112
  - Layer 1: `Project.create()` validates not empty/exists/writable
108
113
  - Layer 2: `WorkspaceManager` validates projectDir not empty
109
114
  - Layer 3: `WorktreeManager` refuses git init outside tmpdir in tests
@@ -114,6 +119,7 @@ Bug: Empty `projectDir` caused `git init` in source code
114
119
  ## Key Insight
115
120
 
116
121
  All four layers were necessary. During testing, each layer caught bugs the others missed:
122
+
117
123
  - Different code paths bypassed entry validation
118
124
  - Mocks bypassed business logic checks
119
125
  - Edge cases on different platforms needed environment guards
@@ -24,6 +24,7 @@ digraph when_to_use {
24
24
  ```
25
25
 
26
26
  **Use when:**
27
+
27
28
  - Error happens deep in execution (not at entry point)
28
29
  - Stack trace shows long call chain
29
30
  - Unclear where invalid data originated
@@ -32,17 +33,21 @@ digraph when_to_use {
32
33
  ## The Tracing Process
33
34
 
34
35
  ### 1. Observe the Symptom
36
+
35
37
  ```
36
38
  Error: git init failed in ~/project/packages/core
37
39
  ```
38
40
 
39
41
  ### 2. Find Immediate Cause
42
+
40
43
  **What code directly causes this?**
44
+
41
45
  ```typescript
42
46
  await execFileAsync('git', ['init'], { cwd: projectDir });
43
47
  ```
44
48
 
45
49
  ### 3. Ask: What Called This?
50
+
46
51
  ```typescript
47
52
  WorktreeManager.createSessionWorktree(projectDir, sessionId)
48
53
  → called by Session.initializeWorkspace()
@@ -51,13 +56,17 @@ WorktreeManager.createSessionWorktree(projectDir, sessionId)
51
56
  ```
52
57
 
53
58
  ### 4. Keep Tracing Up
59
+
54
60
  **What value was passed?**
61
+
55
62
  - `projectDir = ''` (empty string!)
56
63
  - Empty string as `cwd` resolves to `process.cwd()`
57
64
  - That's the source code directory!
58
65
 
59
66
  ### 5. Find Original Trigger
67
+
60
68
  **Where did empty string come from?**
69
+
61
70
  ```typescript
62
71
  const context = setupCoreTest(); // Returns { tempDir: '' }
63
72
  Project.create('name', context.tempDir); // Accessed before beforeEach!
@@ -85,11 +94,13 @@ async function gitInit(directory: string) {
85
94
  **Critical:** Use `console.error()` in tests (not logger - may not show)
86
95
 
87
96
  **Run and capture:**
97
+
88
98
  ```bash
89
99
  npm test 2>&1 | grep 'DEBUG git init'
90
100
  ```
91
101
 
92
102
  **Analyze stack traces:**
103
+
93
104
  - Look for test file names
94
105
  - Find the line number triggering the call
95
106
  - Identify the pattern (same test? same parameter?)
@@ -111,6 +122,7 @@ Runs tests one-by-one, stops at first polluter. See script for usage.
111
122
  **Symptom:** `.git` created in `packages/core/` (source code)
112
123
 
113
124
  **Trace chain:**
125
+
114
126
  1. `git init` runs in `process.cwd()` ← empty cwd parameter
115
127
  2. WorktreeManager called with empty projectDir
116
128
  3. Session.create() passed empty string
@@ -122,6 +134,7 @@ Runs tests one-by-one, stops at first polluter. See script for usage.
122
134
  **Fix:** Made tempDir a getter that throws if accessed before beforeEach
123
135
 
124
136
  **Also added defense-in-depth:**
137
+
125
138
  - Layer 1: Project.create() validates directory
126
139
  - Layer 2: WorkspaceManager validates not empty
127
140
  - Layer 3: NODE_ENV guard refuses git init outside tmpdir
@@ -163,6 +176,7 @@ digraph principle {
163
176
  ## Real-World Impact
164
177
 
165
178
  From debugging session (2025-10-03):
179
+
166
180
  - Found root cause through 5-level trace
167
181
  - Fixed at source (getter validation)
168
182
  - Added 4 layers of defense