tribunal-kit 6.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/.agent/.manifest.json +78 -0
  2. package/.agent/ARCHITECTURE.md +19 -241
  3. package/.agent/agents/accessibility-reviewer.md +23 -16
  4. package/.agent/agents/ai-code-reviewer.md +25 -21
  5. package/.agent/agents/anti-pattern-reviewer.md +12 -7
  6. package/.agent/agents/api-architect.md +1 -0
  7. package/.agent/agents/backend-specialist.md +23 -22
  8. package/.agent/agents/cloud-engineer.md +1 -0
  9. package/.agent/agents/code-archaeologist.md +1 -0
  10. package/.agent/agents/complexity-reviewer.md +10 -7
  11. package/.agent/agents/database-architect.md +3 -2
  12. package/.agent/agents/db-latency-auditor.md +6 -2
  13. package/.agent/agents/debugger.md +3 -2
  14. package/.agent/agents/dependency-reviewer.md +1 -0
  15. package/.agent/agents/devops-engineer.md +9 -8
  16. package/.agent/agents/documentation-writer.md +6 -5
  17. package/.agent/agents/explorer-agent.md +1 -0
  18. package/.agent/agents/frontend-reviewer.md +21 -17
  19. package/.agent/agents/frontend-specialist.md +23 -20
  20. package/.agent/agents/game-developer.md +1 -0
  21. package/.agent/agents/interaction-reviewer.md +10 -5
  22. package/.agent/agents/logic-reviewer.md +3 -0
  23. package/.agent/agents/minimalist-reviewer.md +6 -0
  24. package/.agent/agents/mobile-developer.md +7 -6
  25. package/.agent/agents/mobile-reviewer.md +14 -13
  26. package/.agent/agents/orchestrator.md +3 -0
  27. package/.agent/agents/penetration-tester.md +1 -0
  28. package/.agent/agents/performance-optimizer.md +6 -5
  29. package/.agent/agents/performance-reviewer.md +6 -6
  30. package/.agent/agents/pipeline-reviewer.md +144 -0
  31. package/.agent/agents/precedence-reviewer.md +1 -0
  32. package/.agent/agents/product-manager.md +1 -0
  33. package/.agent/agents/product-owner.md +1 -0
  34. package/.agent/agents/product-reviewer.md +12 -7
  35. package/.agent/agents/project-planner.md +3 -0
  36. package/.agent/agents/qa-automation-engineer.md +50 -43
  37. package/.agent/agents/resilience-reviewer.md +1 -0
  38. package/.agent/agents/schema-reviewer.md +1 -0
  39. package/.agent/agents/security-auditor.md +24 -24
  40. package/.agent/agents/seo-specialist.md +33 -23
  41. package/.agent/agents/sql-reviewer.md +5 -4
  42. package/.agent/agents/supervisor-agent.md +12 -2
  43. package/.agent/agents/swarm-worker-contracts.md +13 -13
  44. package/.agent/agents/swarm-worker-registry.md +51 -51
  45. package/.agent/agents/system-architect.md +1 -0
  46. package/.agent/agents/test-coverage-reviewer.md +25 -22
  47. package/.agent/agents/test-engineer.md +12 -11
  48. package/.agent/agents/throughput-optimizer.md +45 -40
  49. package/.agent/agents/type-safety-reviewer.md +5 -4
  50. package/.agent/agents/ui-ux-auditor.md +6 -4
  51. package/.agent/agents/ui-visual-auditor.md +3 -0
  52. package/.agent/agents/ux-reviewer.md +11 -6
  53. package/.agent/agents/visual-reviewer.md +11 -6
  54. package/.agent/agents/vitals-reviewer.md +5 -4
  55. package/.agent/history/memory/.memory.idx +3716 -1
  56. package/.agent/history/memory/MEMORY.md +246 -1
  57. package/.agent/mcp_config.json +1 -6
  58. package/.agent/routing_index.json +2034 -263
  59. package/.agent/rules/GEMINI.md +12 -10
  60. package/.agent/rules/GEMINI_PLANNER.md +19 -21
  61. package/.agent/scripts/_colors.js +52 -54
  62. package/.agent/scripts/_utils.js +52 -53
  63. package/.agent/scripts/auto_preview.js +39 -43
  64. package/.agent/scripts/bundle_analyzer.js +47 -60
  65. package/.agent/scripts/case_law_manager.js +200 -294
  66. package/.agent/scripts/checklist.js +73 -94
  67. package/.agent/scripts/cicd_validator.js +305 -0
  68. package/.agent/scripts/compile_router.py +4 -111
  69. package/.agent/scripts/context_broker.js +317 -412
  70. package/.agent/scripts/contract_engine.js +402 -0
  71. package/.agent/scripts/dependency_analyzer.js +112 -124
  72. package/.agent/scripts/graph_builder.js +75 -103
  73. package/.agent/scripts/graph_visualizer.js +10 -12
  74. package/.agent/scripts/graph_zoom.js +38 -55
  75. package/.agent/scripts/guardrail_engine.js +195 -145
  76. package/.agent/scripts/impact_classifier.js +55 -30
  77. package/.agent/scripts/inner_loop_validator.js +108 -159
  78. package/.agent/scripts/integrity_manifest.js +59 -67
  79. package/.agent/scripts/lint_runner.js +65 -75
  80. package/.agent/scripts/marathon_harness.js +131 -208
  81. package/.agent/scripts/migrate_skills_frontmatter.py +4 -63
  82. package/.agent/scripts/minify_context.js +29 -33
  83. package/.agent/scripts/minimal_change_engine.js +95 -87
  84. package/.agent/scripts/mutation_runner.js +46 -62
  85. package/.agent/scripts/pipeline_engine.js +320 -209
  86. package/.agent/scripts/prompt_compiler.js +118 -93
  87. package/.agent/scripts/schema_validator.js +73 -121
  88. package/.agent/scripts/security_scan.js +88 -117
  89. package/.agent/scripts/session_manager.js +52 -69
  90. package/.agent/scripts/signal_detector.js +24 -22
  91. package/.agent/scripts/skill_evolution.js +184 -245
  92. package/.agent/scripts/skill_integrator.js +35 -48
  93. package/.agent/scripts/socratic_gate_policy.js +15 -12
  94. package/.agent/scripts/strengthen_skills.js +29 -33
  95. package/.agent/scripts/swarm_dispatcher.js +120 -151
  96. package/.agent/scripts/test_runner.js +54 -56
  97. package/.agent/scripts/token_budget_broker.js +9 -7
  98. package/.agent/scripts/trace_engine.js +126 -0
  99. package/.agent/scripts/verify_all.js +76 -93
  100. package/.agent/scripts/visual_audit.js +16 -21
  101. package/.agent/skill_topic_map.json +237 -0
  102. package/.agent/skills/12-principles-of-animation/SKILL.md +7 -0
  103. package/.agent/skills/60fps-animation/SKILL.md +7 -0
  104. package/.agent/skills/accessible-animation/SKILL.md +5 -1
  105. package/.agent/skills/adapt/SKILL.md +7 -1
  106. package/.agent/skills/advanced-rag-pipelines/SKILL.md +1 -0
  107. package/.agent/skills/agent-organizer/SKILL.md +1 -0
  108. package/.agent/skills/agentic-patterns/SKILL.md +33 -25
  109. package/.agent/skills/agentic-workflows-2026/SKILL.md +80 -0
  110. package/.agent/skills/ai-app-hardening/SKILL.md +59 -0
  111. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +7 -6
  112. package/.agent/skills/animation-on-scroll/SKILL.md +24 -15
  113. package/.agent/skills/animation-systems/SKILL.md +11 -10
  114. package/.agent/skills/antfu-conventions/SKILL.md +7 -2
  115. package/.agent/skills/api-patterns/SKILL.md +14 -10
  116. package/.agent/skills/api-security-auditor/SKILL.md +15 -14
  117. package/.agent/skills/app-builder/SKILL.md +1 -0
  118. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +2 -2
  119. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +1 -1
  120. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +12 -12
  121. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +3 -3
  122. package/.agent/skills/apple-design/SKILL.md +8 -7
  123. package/.agent/skills/architecture/SKILL.md +3 -2
  124. package/.agent/skills/audit-and-fix/SKILL.md +8 -5
  125. package/.agent/skills/authentication-best-practices/SKILL.md +9 -8
  126. package/.agent/skills/backend-security-expert/SKILL.md +1 -0
  127. package/.agent/skills/baseline-ui/SKILL.md +8 -7
  128. package/.agent/skills/bash-linux/SKILL.md +1 -0
  129. package/.agent/skills/behavioral-modes/SKILL.md +1 -0
  130. package/.agent/skills/better-colors/SKILL.md +11 -7
  131. package/.agent/skills/better-typography/SKILL.md +30 -16
  132. package/.agent/skills/better-ui/SKILL.md +17 -10
  133. package/.agent/skills/bolder/SKILL.md +6 -0
  134. package/.agent/skills/brainstorming/SKILL.md +6 -4
  135. package/.agent/skills/browser-native-ai/SKILL.md +5 -4
  136. package/.agent/skills/build-primitive/SKILL.md +5 -0
  137. package/.agent/skills/building-native-ui/SKILL.md +1 -0
  138. package/.agent/skills/cicd-pro/SKILL.md +2 -1
  139. package/.agent/skills/clarify/SKILL.md +19 -14
  140. package/.agent/skills/clean-code/SKILL.md +16 -15
  141. package/.agent/skills/cloud-architect/SKILL.md +1 -0
  142. package/.agent/skills/cobejs/SKILL.md +7 -9
  143. package/.agent/skills/code-review-checklist/SKILL.md +1 -0
  144. package/.agent/skills/codebase-design/SKILL.md +7 -2
  145. package/.agent/skills/colorize/SKILL.md +8 -3
  146. package/.agent/skills/compact-landing/SKILL.md +8 -3
  147. package/.agent/skills/company-logos/SKILL.md +6 -0
  148. package/.agent/skills/config-validator/SKILL.md +10 -9
  149. package/.agent/skills/containerization-pro/SKILL.md +6 -5
  150. package/.agent/skills/context-engineering-pro/SKILL.md +70 -0
  151. package/.agent/skills/create-design-md/SKILL.md +13 -5
  152. package/.agent/skills/critique/SKILL.md +10 -8
  153. package/.agent/skills/csharp-developer/SKILL.md +1 -0
  154. package/.agent/skills/data-validation-schemas/SKILL.md +28 -23
  155. package/.agent/skills/database-design/SKILL.md +2 -1
  156. package/.agent/skills/delight/SKILL.md +6 -0
  157. package/.agent/skills/deployment-procedures/SKILL.md +2 -1
  158. package/.agent/skills/design-lab/SKILL.md +5 -0
  159. package/.agent/skills/devops-engineer/SKILL.md +3 -2
  160. package/.agent/skills/devops-incident-responder/SKILL.md +2 -1
  161. package/.agent/skills/diagnosing-bugs/SKILL.md +12 -2
  162. package/.agent/skills/distill/SKILL.md +7 -2
  163. package/.agent/skills/documentation-templates/SKILL.md +3 -2
  164. package/.agent/skills/domain-modeling/SKILL.md +12 -4
  165. package/.agent/skills/duckdb-analytical-sql/SKILL.md +59 -0
  166. package/.agent/skills/edge-ai-mobile/SKILL.md +50 -0
  167. package/.agent/skills/edge-computing/SKILL.md +9 -8
  168. package/.agent/skills/emil-design-eng/SKILL.md +43 -27
  169. package/.agent/skills/error-resilience/SKILL.md +34 -16
  170. package/.agent/skills/expo-router-v4/SKILL.md +81 -0
  171. package/.agent/skills/extract-design-system/SKILL.md +12 -11
  172. package/.agent/skills/fabel-protocol/SKILL.md +24 -17
  173. package/.agent/skills/fixing-accessibility/SKILL.md +23 -16
  174. package/.agent/skills/fixing-metadata/SKILL.md +24 -13
  175. package/.agent/skills/fixing-motion-performance/SKILL.md +7 -5
  176. package/.agent/skills/framer-motion-expert/SKILL.md +29 -15
  177. package/.agent/skills/frontend-design/SKILL.md +21 -13
  178. package/.agent/skills/frontend-security-expert/SKILL.md +1 -0
  179. package/.agent/skills/game-design-expert/SKILL.md +1 -0
  180. package/.agent/skills/game-engineering-expert/SKILL.md +1 -0
  181. package/.agent/skills/generative-ui-expert/SKILL.md +3 -2
  182. package/.agent/skills/geo-fundamentals/SKILL.md +2 -1
  183. package/.agent/skills/git-pro/SKILL.md +10 -9
  184. package/.agent/skills/github-operations/SKILL.md +2 -1
  185. package/.agent/skills/gpt-taste/SKILL.md +7 -0
  186. package/.agent/skills/gsap-core/SKILL.md +26 -22
  187. package/.agent/skills/gsap-frameworks/SKILL.md +6 -5
  188. package/.agent/skills/gsap-performance/SKILL.md +4 -3
  189. package/.agent/skills/gsap-plugins/SKILL.md +34 -33
  190. package/.agent/skills/gsap-react/SKILL.md +9 -8
  191. package/.agent/skills/gsap-scrolltrigger/SKILL.md +34 -33
  192. package/.agent/skills/gsap-timeline/SKILL.md +18 -15
  193. package/.agent/skills/gsap-utils/SKILL.md +25 -24
  194. package/.agent/skills/harden/SKILL.md +9 -3
  195. package/.agent/skills/harness-protocol/SKILL.md +1 -0
  196. package/.agent/skills/i18n-localization/SKILL.md +10 -9
  197. package/.agent/skills/impeccable/SKILL.md +5 -0
  198. package/.agent/skills/improve-codebase-architecture/SKILL.md +10 -5
  199. package/.agent/skills/improve-ui/SKILL.md +12 -5
  200. package/.agent/skills/intelligent-routing/SKILL.md +7 -6
  201. package/.agent/skills/knowledge-graph/SKILL.md +1 -0
  202. package/.agent/skills/landing-page/SKILL.md +1 -0
  203. package/.agent/skills/lint-and-validate/SKILL.md +9 -4
  204. package/.agent/skills/llm-engineering/SKILL.md +55 -54
  205. package/.agent/skills/local-first/SKILL.md +20 -19
  206. package/.agent/skills/local-first-architecture/SKILL.md +6 -1
  207. package/.agent/skills/lottie-animation/SKILL.md +7 -3
  208. package/.agent/skills/marquee-loop/SKILL.md +1 -0
  209. package/.agent/skills/masked-reveal/SKILL.md +17 -4
  210. package/.agent/skills/mcp-builder/SKILL.md +13 -10
  211. package/.agent/skills/micro-interaction/SKILL.md +20 -5
  212. package/.agent/skills/mobile-design/SKILL.md +26 -15
  213. package/.agent/skills/monorepo-management/SKILL.md +3 -2
  214. package/.agent/skills/morphing-icons/SKILL.md +16 -6
  215. package/.agent/skills/motion-engineering/SKILL.md +19 -15
  216. package/.agent/skills/nextjs-react-expert/SKILL.md +26 -21
  217. package/.agent/skills/nodejs-best-practices/SKILL.md +89 -76
  218. package/.agent/skills/observability/SKILL.md +45 -44
  219. package/.agent/skills/opentelemetry-observability/SKILL.md +59 -0
  220. package/.agent/skills/page-transition-animation/SKILL.md +6 -3
  221. package/.agent/skills/parallel-agents/SKILL.md +7 -2
  222. package/.agent/skills/performance-profiling/SKILL.md +24 -13
  223. package/.agent/skills/plan-writing/SKILL.md +1 -0
  224. package/.agent/skills/platform-engineer/SKILL.md +3 -2
  225. package/.agent/skills/platform-engineering-opentofu/SKILL.md +68 -0
  226. package/.agent/skills/playwright-ai-e2e/SKILL.md +60 -0
  227. package/.agent/skills/playwright-best-practices/SKILL.md +29 -28
  228. package/.agent/skills/polish/SKILL.md +13 -12
  229. package/.agent/skills/powershell-windows/SKILL.md +1 -0
  230. package/.agent/skills/pricing-page/SKILL.md +8 -3
  231. package/.agent/skills/product-aware-heuristics/SKILL.md +122 -72
  232. package/.agent/skills/progressive-blur/SKILL.md +9 -4
  233. package/.agent/skills/project-idioms/SKILL.md +1 -0
  234. package/.agent/skills/property-based-testing/SKILL.md +58 -0
  235. package/.agent/skills/python-patterns/SKILL.md +1 -0
  236. package/.agent/skills/python-pro/SKILL.md +1 -0
  237. package/.agent/skills/quieter/SKILL.md +6 -0
  238. package/.agent/skills/react-doctor/SKILL.md +6 -0
  239. package/.agent/skills/react-specialist/SKILL.md +32 -28
  240. package/.agent/skills/readme-builder/SKILL.md +1 -0
  241. package/.agent/skills/realtime-patterns/SKILL.md +34 -33
  242. package/.agent/skills/red-team-tactics/SKILL.md +1 -0
  243. package/.agent/skills/redesign-skill/SKILL.md +6 -0
  244. package/.agent/skills/review-animations/SKILL.md +5 -2
  245. package/.agent/skills/review-animations/STANDARDS.md +37 -23
  246. package/.agent/skills/rust-pro/SKILL.md +1 -0
  247. package/.agent/skills/seo-fundamentals/SKILL.md +4 -3
  248. package/.agent/skills/server-management/SKILL.md +1 -0
  249. package/.agent/skills/shadcn-ui-expert/SKILL.md +28 -22
  250. package/.agent/skills/shape/SKILL.md +9 -2
  251. package/.agent/skills/skill-creator/SKILL.md +1 -0
  252. package/.agent/skills/soft-skill/SKILL.md +6 -0
  253. package/.agent/skills/sounds-on-the-web/SKILL.md +1 -0
  254. package/.agent/skills/sql-pro/SKILL.md +1 -0
  255. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +1 -0
  256. package/.agent/skills/svg-animation/SKILL.md +16 -7
  257. package/.agent/skills/swiftui-expert/SKILL.md +1 -0
  258. package/.agent/skills/swiss-design/SKILL.md +5 -0
  259. package/.agent/skills/system-design-pro/SKILL.md +1 -0
  260. package/.agent/skills/systematic-debugging/SKILL.md +1 -0
  261. package/.agent/skills/tailwind-patterns/SKILL.md +25 -11
  262. package/.agent/skills/taste-skill/SKILL.md +6 -0
  263. package/.agent/skills/tdd-workflow/SKILL.md +5 -0
  264. package/.agent/skills/test-result-analyzer/SKILL.md +1 -0
  265. package/.agent/skills/testing-patterns/SKILL.md +123 -115
  266. package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +5 -0
  267. package/.agent/skills/thinking-protocol/SKILL.md +3 -0
  268. package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +9 -8
  269. package/.agent/skills/transitions-dev/SKILL.md +19 -6
  270. package/.agent/skills/trend-researcher/SKILL.md +1 -0
  271. package/.agent/skills/typescript-advanced/SKILL.md +23 -18
  272. package/.agent/skills/typeset/SKILL.md +10 -1
  273. package/.agent/skills/ui-reasoning-engine/SKILL.md +67 -48
  274. package/.agent/skills/ui-skill-packs/SKILL.md +6 -1
  275. package/.agent/skills/ui-skills-root/SKILL.md +39 -38
  276. package/.agent/skills/ui-ux-pro-max/SKILL.md +34 -26
  277. package/.agent/skills/ui-ux-researcher/SKILL.md +1 -0
  278. package/.agent/skills/vector-search-pgvector/SKILL.md +78 -0
  279. package/.agent/skills/vue-expert/SKILL.md +22 -19
  280. package/.agent/skills/vulnerability-scanner/SKILL.md +22 -21
  281. package/.agent/skills/web-accessibility-auditor/SKILL.md +2 -1
  282. package/.agent/skills/web-design-guidelines/SKILL.md +16 -10
  283. package/.agent/skills/web-quality-audit/SKILL.md +5 -0
  284. package/.agent/skills/webapp-testing/SKILL.md +14 -13
  285. package/.agent/skills/webgpu-performance/SKILL.md +1 -0
  286. package/.agent/skills/whimsy-injector/SKILL.md +9 -5
  287. package/.agent/skills/workflow-optimizer/SKILL.md +1 -0
  288. package/.agent/skills/zero-trust-passkeys/SKILL.md +90 -0
  289. package/.agent/templates/DESIGN.md +119 -110
  290. package/.agent/templates/design-tokens.json +9 -6
  291. package/.agent/workflows/acf.md +1 -0
  292. package/.agent/workflows/api-tester.md +1 -0
  293. package/.agent/workflows/audit.md +1 -0
  294. package/.agent/workflows/brainstorm.md +1 -0
  295. package/.agent/workflows/changelog.md +1 -0
  296. package/.agent/workflows/contract.md +60 -0
  297. package/.agent/workflows/create.md +1 -0
  298. package/.agent/workflows/debug.md +1 -0
  299. package/.agent/workflows/deploy.md +1 -0
  300. package/.agent/workflows/enhance.md +1 -0
  301. package/.agent/workflows/fix-ci.md +89 -0
  302. package/.agent/workflows/fix.md +1 -0
  303. package/.agent/workflows/generate.md +1 -0
  304. package/.agent/workflows/marathon.md +1 -0
  305. package/.agent/workflows/migrate.md +1 -0
  306. package/.agent/workflows/minimal.md +9 -7
  307. package/.agent/workflows/orchestrate.md +1 -0
  308. package/.agent/workflows/performance-benchmarker.md +1 -0
  309. package/.agent/workflows/pipeline.md +26 -21
  310. package/.agent/workflows/plan.md +1 -0
  311. package/.agent/workflows/preview.md +1 -0
  312. package/.agent/workflows/refactor.md +3 -2
  313. package/.agent/workflows/review-ai.md +4 -3
  314. package/.agent/workflows/review.md +1 -0
  315. package/.agent/workflows/session.md +1 -0
  316. package/.agent/workflows/status.md +1 -0
  317. package/.agent/workflows/strengthen-skills.md +1 -0
  318. package/.agent/workflows/super-prompt.md +1 -0
  319. package/.agent/workflows/swarm.md +15 -3
  320. package/.agent/workflows/test.md +8 -7
  321. package/.agent/workflows/tribunal-backend.md +3 -2
  322. package/.agent/workflows/tribunal-cicd.md +104 -0
  323. package/.agent/workflows/tribunal-database.md +1 -0
  324. package/.agent/workflows/tribunal-frontend.md +8 -6
  325. package/.agent/workflows/tribunal-full.md +15 -14
  326. package/.agent/workflows/tribunal-mobile.md +6 -5
  327. package/.agent/workflows/tribunal-performance.md +1 -0
  328. package/.agent/workflows/tribunal-speed.md +1 -0
  329. package/.agent/workflows/tribunal-ui.md +29 -21
  330. package/.agent/workflows/ui-ux-pro-max.md +19 -15
  331. package/CONTRIBUTING.md +3 -3
  332. package/README.md +160 -88
  333. package/SECURITY.md +11 -11
  334. package/bin/mcp-server.js +512 -233
  335. package/bin/tribunal-kit.js +29 -30
  336. package/bin/wrapper.js +45 -48
  337. package/dist/cli.js +26 -0
  338. package/dist/commands/case.js +2 -0
  339. package/dist/commands/contract.js +440 -0
  340. package/dist/commands/memory.js +3 -2
  341. package/dist/commands/native.js +36 -0
  342. package/dist/commands/status.js +6 -0
  343. package/dist/esm/index.mjs +32 -0
  344. package/dist/index.d.ts +58 -3
  345. package/package.json +20 -16
  346. package/scripts/benchmark.js +62 -86
  347. package/scripts/changelog.js +67 -73
  348. package/scripts/fix-vbc.js +13 -15
  349. package/scripts/fix-vbc.ps1 +2 -118
  350. package/scripts/stress_benchmark.js +358 -0
  351. package/scripts/sync-version.js +71 -41
  352. package/scripts/validate-payload.js +23 -30
  353. package/scripts/visual_audit.js +23 -13
@@ -10,41 +10,42 @@
10
10
 
11
11
  Choose **ONE** direction from the list below to define the brand visual system. Do not mix directions:
12
12
 
13
- * **Swiss Precision:** Clean, grid-locked alignment, sans-serif typography, clinical whitespace, no decoration.
14
- * **Brutalist:** Raw, exposed 1px borders, monospace display fonts, high contrast, sharp corners (`radius: 2px`).
15
- * **Editorial:** Magazine-inspired layout, large display headings, generous margins, serif headings, single-column reading paths.
16
- * **Neo-Glassmorphism:** Tinted overlays, high backdrop blur (`blur(20px)`), luminous hairlines, floating modules.
17
- * **Soft Minimal:** Warm tinted grays (`oklch`), rounded shapes (`radius: 12px`), deep shadows, spacious margins.
18
- * **Dark Luxury:** Near-black base (`#0A0A0F`), gold/amber accent lines, thin fonts, subtle animations.
19
- * **Neon Cyberpunk:** Dark base surfaces, highly saturated vivid accents (neon cyan/green), glow effects, sharp geometry.
20
- * **Retro Analog:** Warm grain overlay, rounded typography, muted color palettes, physical paper-like textures.
13
+ - **Swiss Precision:** Clean, grid-locked alignment, sans-serif typography, clinical whitespace, no decoration.
14
+ - **Brutalist:** Raw, exposed 1px borders, monospace display fonts, high contrast, sharp corners (`radius: 2px`).
15
+ - **Editorial:** Magazine-inspired layout, large display headings, generous margins, serif headings, single-column reading paths.
16
+ - **Neo-Glassmorphism:** Tinted overlays, high backdrop blur (`blur(20px)`), luminous hairlines, floating modules.
17
+ - **Soft Minimal:** Warm tinted grays (`oklch`), rounded shapes (`radius: 12px`), deep shadows, spacious margins.
18
+ - **Dark Luxury:** Near-black base (`#0A0A0F`), gold/amber accent lines, thin fonts, subtle animations.
19
+ - **Neon Cyberpunk:** Dark base surfaces, highly saturated vivid accents (neon cyan/green), glow effects, sharp geometry.
20
+ - **Retro Analog:** Warm grain overlay, rounded typography, muted color palettes, physical paper-like textures.
21
21
 
22
22
  ---
23
23
 
24
24
  ## 2. Visual Identities CSS Tokens Definition
25
25
 
26
26
  ### 1. Swiss Precision
27
+
27
28
  ```css
28
29
  :root {
29
- --font-display: "General Sans", sans-serif;
30
- --font-body: "Satoshi", sans-serif;
31
- --font-mono: "JetBrains Mono", monospace;
30
+ --font-display: 'General Sans', sans-serif;
31
+ --font-body: 'Satoshi', sans-serif;
32
+ --font-mono: 'JetBrains Mono', monospace;
32
33
 
33
34
  /* Surfaces */
34
- --bg-base: oklch(0.98 0.002 240);
35
- --bg-surface: oklch(1.00 0 0);
35
+ --bg-base: oklch(0.98 0.002 240);
36
+ --bg-surface: oklch(1 0 0);
36
37
  --bg-surface-raised: oklch(0.95 0.003 240);
37
38
 
38
39
  /* Accents */
39
- --color-primary: oklch(0.20 0.01 240); /* Minimal black/slate */
40
- --color-primary-hover: oklch(0.40 0.01 240);
40
+ --color-primary: oklch(0.2 0.01 240); /* Minimal black/slate */
41
+ --color-primary-hover: oklch(0.4 0.01 240);
41
42
 
42
43
  /* Spacing Grid */
43
- --space-xs: 4px;
44
- --space-sm: 8px;
45
- --space-md: 16px;
46
- --space-lg: 24px;
47
- --space-xl: 32px;
44
+ --space-xs: 4px;
45
+ --space-sm: 8px;
46
+ --space-md: 16px;
47
+ --space-lg: 24px;
48
+ --space-xl: 32px;
48
49
 
49
50
  /* Radii */
50
51
  --radius-sm: 0px;
@@ -59,54 +60,56 @@ Choose **ONE** direction from the list below to define the brand visual system.
59
60
  ```
60
61
 
61
62
  ### 2. Brutalist
63
+
62
64
  ```css
63
65
  :root {
64
- --font-display: "JetBrains Mono", monospace;
65
- --font-body: "General Sans", sans-serif;
66
- --font-mono: "JetBrains Mono", monospace;
66
+ --font-display: 'JetBrains Mono', monospace;
67
+ --font-body: 'General Sans', sans-serif;
68
+ --font-mono: 'JetBrains Mono', monospace;
67
69
 
68
- --bg-base: oklch(1.00 0 0);
69
- --bg-surface: oklch(1.00 0 0);
70
+ --bg-base: oklch(1 0 0);
71
+ --bg-surface: oklch(1 0 0);
70
72
  --bg-surface-raised: oklch(0.95 0.005 240);
71
73
 
72
- --color-primary: oklch(0.60 0.28 140); /* Acid Green */
73
- --color-primary-hover: oklch(0.50 0.28 140);
74
+ --color-primary: oklch(0.6 0.28 140); /* Acid Green */
75
+ --color-primary-hover: oklch(0.5 0.28 140);
74
76
 
75
- --space-xs: 4px;
76
- --space-sm: 8px;
77
- --space-md: 16px;
78
- --space-lg: 24px;
79
- --space-xl: 32px;
77
+ --space-xs: 4px;
78
+ --space-sm: 8px;
79
+ --space-md: 16px;
80
+ --space-lg: 24px;
81
+ --space-xl: 32px;
80
82
 
81
83
  --radius-sm: 2px;
82
84
  --radius-md: 2px;
83
85
  --radius-lg: 2px;
84
86
 
85
- --shadow-sm: 2px 2px 0px oklch(10% 0.01 240); /* Hard drop shadows */
87
+ --shadow-sm: 2px 2px 0px oklch(10% 0.01 240); /* Hard drop shadows */
86
88
  --shadow-md: 4px 4px 0px oklch(10% 0.01 240);
87
89
  --border-subtle: 2px solid oklch(10% 0.01 240);
88
90
  }
89
91
  ```
90
92
 
91
93
  ### 3. Editorial
94
+
92
95
  ```css
93
96
  :root {
94
- --font-display: "Playfair Display", serif;
95
- --font-body: "Source Sans 3", sans-serif;
96
- --font-mono: "Courier New", monospace;
97
+ --font-display: 'Playfair Display', serif;
98
+ --font-body: 'Source Sans 3', sans-serif;
99
+ --font-mono: 'Courier New', monospace;
97
100
 
98
- --bg-base: oklch(0.97 0.005 60); /* Warm alabaster tint */
99
- --bg-surface: oklch(0.99 0.002 60);
101
+ --bg-base: oklch(0.97 0.005 60); /* Warm alabaster tint */
102
+ --bg-surface: oklch(0.99 0.002 60);
100
103
  --bg-surface-raised: oklch(0.94 0.008 60);
101
104
 
102
- --color-primary: oklch(0.35 0.12 25); /* Deep terracotta red */
105
+ --color-primary: oklch(0.35 0.12 25); /* Deep terracotta red */
103
106
  --color-primary-hover: oklch(0.25 0.12 25);
104
107
 
105
- --space-xs: 6px;
106
- --space-sm: 12px;
107
- --space-md: 24px;
108
- --space-lg: 36px;
109
- --space-xl: 48px;
108
+ --space-xs: 6px;
109
+ --space-sm: 12px;
110
+ --space-md: 24px;
111
+ --space-lg: 36px;
112
+ --space-xl: 48px;
110
113
 
111
114
  --radius-sm: 4px;
112
115
  --radius-md: 8px;
@@ -119,24 +122,25 @@ Choose **ONE** direction from the list below to define the brand visual system.
119
122
  ```
120
123
 
121
124
  ### 4. Neo-Glassmorphism
125
+
122
126
  ```css
123
127
  :root {
124
- --font-display: "Clash Display", sans-serif;
125
- --font-body: "Satoshi", sans-serif;
126
- --font-mono: "JetBrains Mono", monospace;
128
+ --font-display: 'Clash Display', sans-serif;
129
+ --font-body: 'Satoshi', sans-serif;
130
+ --font-mono: 'JetBrains Mono', monospace;
127
131
 
128
- --bg-base: oklch(0.12 0.01 220); /* Deep indigo gradient base */
129
- --bg-surface: oklch(100% 0 0 / 0.15); /* Translucent glass */
132
+ --bg-base: oklch(0.12 0.01 220); /* Deep indigo gradient base */
133
+ --bg-surface: oklch(100% 0 0 / 0.15); /* Translucent glass */
130
134
  --bg-surface-raised: oklch(100% 0 0 / 0.25);
131
135
 
132
- --color-primary: oklch(0.70 0.22 200); /* Electric cyan */
133
- --color-primary-hover: oklch(0.60 0.22 200);
136
+ --color-primary: oklch(0.7 0.22 200); /* Electric cyan */
137
+ --color-primary-hover: oklch(0.6 0.22 200);
134
138
 
135
- --space-xs: 4px;
136
- --space-sm: 8px;
137
- --space-md: 16px;
138
- --space-lg: 24px;
139
- --space-xl: 32px;
139
+ --space-xs: 4px;
140
+ --space-sm: 8px;
141
+ --space-md: 16px;
142
+ --space-lg: 24px;
143
+ --space-xl: 32px;
140
144
 
141
145
  --radius-sm: 4px;
142
146
  --radius-md: 16px;
@@ -149,24 +153,25 @@ Choose **ONE** direction from the list below to define the brand visual system.
149
153
  ```
150
154
 
151
155
  ### 5. Soft Minimal
156
+
152
157
  ```css
153
158
  :root {
154
- --font-display: "Geist Sans", sans-serif;
155
- --font-body: "Geist Sans", sans-serif;
156
- --font-mono: "Geist Mono", monospace;
159
+ --font-display: 'Geist Sans', sans-serif;
160
+ --font-body: 'Geist Sans', sans-serif;
161
+ --font-mono: 'Geist Mono', monospace;
157
162
 
158
- --bg-base: oklch(0.98 0.003 80); /* Warm off-white */
159
- --bg-surface: oklch(1.00 0 0);
163
+ --bg-base: oklch(0.98 0.003 80); /* Warm off-white */
164
+ --bg-surface: oklch(1 0 0);
160
165
  --bg-surface-raised: oklch(0.96 0.005 80);
161
166
 
162
- --color-primary: oklch(0.40 0.06 200); /* Muted graphite slate */
163
- --color-primary-hover: oklch(0.30 0.06 200);
167
+ --color-primary: oklch(0.4 0.06 200); /* Muted graphite slate */
168
+ --color-primary-hover: oklch(0.3 0.06 200);
164
169
 
165
- --space-xs: 4px;
166
- --space-sm: 8px;
167
- --space-md: 16px;
168
- --space-lg: 24px;
169
- --space-xl: 32px;
170
+ --space-xs: 4px;
171
+ --space-sm: 8px;
172
+ --space-md: 16px;
173
+ --space-lg: 24px;
174
+ --space-xl: 32px;
170
175
 
171
176
  --radius-sm: 6px;
172
177
  --radius-md: 12px;
@@ -179,24 +184,25 @@ Choose **ONE** direction from the list below to define the brand visual system.
179
184
  ```
180
185
 
181
186
  ### 6. Dark Luxury
187
+
182
188
  ```css
183
189
  :root {
184
- --font-display: "Cabinet Grotesk", sans-serif;
185
- --font-body: "Satoshi", sans-serif;
186
- --font-mono: "JetBrains Mono", monospace;
190
+ --font-display: 'Cabinet Grotesk', sans-serif;
191
+ --font-body: 'Satoshi', sans-serif;
192
+ --font-mono: 'JetBrains Mono', monospace;
187
193
 
188
- --bg-base: oklch(0.08 0.005 250); /* OLED-friendly black */
189
- --bg-surface: oklch(0.12 0.008 250);
194
+ --bg-base: oklch(0.08 0.005 250); /* OLED-friendly black */
195
+ --bg-surface: oklch(0.12 0.008 250);
190
196
  --bg-surface-raised: oklch(0.16 0.01 250);
191
197
 
192
- --color-primary: oklch(0.78 0.12 85); /* Gold/Amber */
198
+ --color-primary: oklch(0.78 0.12 85); /* Gold/Amber */
193
199
  --color-primary-hover: oklch(0.68 0.12 85);
194
200
 
195
- --space-xs: 4px;
196
- --space-sm: 8px;
197
- --space-md: 16px;
198
- --space-lg: 24px;
199
- --space-xl: 32px;
201
+ --space-xs: 4px;
202
+ --space-sm: 8px;
203
+ --space-md: 16px;
204
+ --space-lg: 24px;
205
+ --space-xl: 32px;
200
206
 
201
207
  --radius-sm: 2px;
202
208
  --radius-md: 6px;
@@ -204,29 +210,30 @@ Choose **ONE** direction from the list below to define the brand visual system.
204
210
 
205
211
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.3);
206
212
  --shadow-md: 0 4px 16px oklch(0% 0 0 / 0.5);
207
- --border-subtle: oklch(22% 0.01 250 / 0.5); /* Thin hairline borders */
213
+ --border-subtle: oklch(22% 0.01 250 / 0.5); /* Thin hairline borders */
208
214
  }
209
215
  ```
210
216
 
211
217
  ### 7. Neon Cyberpunk
218
+
212
219
  ```css
213
220
  :root {
214
- --font-display: "Space Grotesk", sans-serif;
215
- --font-body: "General Sans", sans-serif;
216
- --font-mono: "JetBrains Mono", monospace;
221
+ --font-display: 'Space Grotesk', sans-serif;
222
+ --font-body: 'General Sans', sans-serif;
223
+ --font-mono: 'JetBrains Mono', monospace;
217
224
 
218
- --bg-base: oklch(0.05 0.01 280); /* Deep space navy */
219
- --bg-surface: oklch(0.08 0.015 280);
225
+ --bg-base: oklch(0.05 0.01 280); /* Deep space navy */
226
+ --bg-surface: oklch(0.08 0.015 280);
220
227
  --bg-surface-raised: oklch(0.12 0.02 280);
221
228
 
222
- --color-primary: oklch(0.75 0.28 160); /* Neon green glow */
229
+ --color-primary: oklch(0.75 0.28 160); /* Neon green glow */
223
230
  --color-primary-hover: oklch(0.85 0.28 160);
224
231
 
225
- --space-xs: 4px;
226
- --space-sm: 8px;
227
- --space-md: 16px;
228
- --space-lg: 24px;
229
- --space-xl: 32px;
232
+ --space-xs: 4px;
233
+ --space-sm: 8px;
234
+ --space-md: 16px;
235
+ --space-lg: 24px;
236
+ --space-xl: 32px;
230
237
 
231
238
  --radius-sm: 0px;
232
239
  --radius-md: 4px;
@@ -239,24 +246,25 @@ Choose **ONE** direction from the list below to define the brand visual system.
239
246
  ```
240
247
 
241
248
  ### 8. Retro Analog
249
+
242
250
  ```css
243
251
  :root {
244
- --font-display: "Clash Display", sans-serif;
245
- --font-body: "Switzer", sans-serif;
246
- --font-mono: "Courier New", monospace;
252
+ --font-display: 'Clash Display', sans-serif;
253
+ --font-body: 'Switzer', sans-serif;
254
+ --font-mono: 'Courier New', monospace;
247
255
 
248
- --bg-base: oklch(0.94 0.015 70); /* Warm paper beige */
249
- --bg-surface: oklch(0.96 0.015 70);
256
+ --bg-base: oklch(0.94 0.015 70); /* Warm paper beige */
257
+ --bg-surface: oklch(0.96 0.015 70);
250
258
  --bg-surface-raised: oklch(0.91 0.02 70);
251
259
 
252
- --color-primary: oklch(0.50 0.18 45); /* Muted rust brown */
253
- --color-primary-hover: oklch(0.40 0.18 45);
260
+ --color-primary: oklch(0.5 0.18 45); /* Muted rust brown */
261
+ --color-primary-hover: oklch(0.4 0.18 45);
254
262
 
255
- --space-xs: 5px;
256
- --space-sm: 10px;
257
- --space-md: 20px;
258
- --space-lg: 30px;
259
- --space-xl: 40px;
263
+ --space-xs: 5px;
264
+ --space-sm: 10px;
265
+ --space-md: 20px;
266
+ --space-lg: 30px;
267
+ --space-xl: 40px;
260
268
 
261
269
  --radius-sm: 4px;
262
270
  --radius-md: 8px;
@@ -272,21 +280,22 @@ Choose **ONE** direction from the list below to define the brand visual system.
272
280
 
273
281
  ## 3. Typographical Scaling (Fluid Type)
274
282
 
275
- * Headings must use `clamp()` to scale fluidly with the screen width.
276
- * Always include `text-wrap: balance` to prevent typographical orphans.
277
- * Body text line length must be clamped to `65ch` max width.
283
+ - Headings must use `clamp()` to scale fluidly with the screen width.
284
+ - Always include `text-wrap: balance` to prevent typographical orphans.
285
+ - Body text line length must be clamped to `65ch` max width.
278
286
 
279
287
  ---
280
288
 
281
289
  ## 4. Spacing Rules & Nested Radii
282
290
 
283
- * Maintain the 8px grid alignment.
284
- * Nested Radius Formula: `outer_radius = inner_radius + padding_inner`.
291
+ - Maintain the 8px grid alignment.
292
+ - Nested Radius Formula: `outer_radius = inner_radius + padding_inner`.
285
293
 
286
294
  ---
287
295
 
288
296
  ## 5. Interaction States & Transitions
289
297
 
290
298
  All buttons and active controls must define styled properties for:
291
- * `hover`, `focus-visible`, `active`/`pressed`, and `disabled` states.
292
- * Use spring easing curves: `cubic-bezier(0.34, 1.56, 0.64, 1)`.
299
+
300
+ - `hover`, `focus-visible`, `active`/`pressed`, and `disabled` states.
301
+ - Use spring easing curves: `cubic-bezier(0.34, 1.56, 0.64, 1)`.
@@ -59,7 +59,10 @@
59
59
  "md": { "$value": "16px", "$type": "dimension" }
60
60
  },
61
61
  "typography": {
62
- "family-sans": { "$value": "Plus Jakarta Sans, system-ui, sans-serif", "$type": "fontFamily" }
62
+ "family-sans": {
63
+ "$value": "Plus Jakarta Sans, system-ui, sans-serif",
64
+ "$type": "fontFamily"
65
+ }
63
66
  }
64
67
  },
65
68
  "soft-minimal": {
@@ -122,11 +125,11 @@
122
125
  },
123
126
 
124
127
  "spacing": {
125
- "xs": { "$value": "4px", "$type": "dimension" },
126
- "sm": { "$value": "8px", "$type": "dimension" },
127
- "md": { "$value": "16px", "$type": "dimension" },
128
- "lg": { "$value": "24px", "$type": "dimension" },
129
- "xl": { "$value": "32px", "$type": "dimension" }
128
+ "xs": { "$value": "4px", "$type": "dimension" },
129
+ "sm": { "$value": "8px", "$type": "dimension" },
130
+ "md": { "$value": "16px", "$type": "dimension" },
131
+ "lg": { "$value": "24px", "$type": "dimension" },
132
+ "xl": { "$value": "32px", "$type": "dimension" }
130
133
  },
131
134
 
132
135
  "shadow": {
@@ -19,6 +19,7 @@ $ARGUMENTS
19
19
  ## Mandatory Pre-Flight Context Inspection
20
20
 
21
21
  Before distilling markdown specs into `.acf` YAML files, you MUST inspect:
22
+
22
23
  1. Target Document Source → Read source `.md` specification (PRD, design spec, or architecture doc)
23
24
  2. Existing Context Registry (`context/*.acf`) → Check target directory to prevent duplicate context creation
24
25
  3. YAML Schema Strictness → Validate output against ACF schema (rules, constraints, tech-stack, boundaries) before writing to disk
@@ -21,6 +21,7 @@ $ARGUMENTS
21
21
  ## Mandatory Pre-Flight Context Inspection
22
22
 
23
23
  Before running automated API endpoint tests or auth-aware request sequences, you MUST inspect:
24
+
24
25
  1. Target Route Definition & Data Schemas → Inspect route parameters, body validation schemas (Zod/Pydantic), and auth middleware
25
26
  2. Test Server URL & Credentials (`.env.test`) → Verify base URL and test token environment variables
26
27
  3. Multi-Stage Request Sequence → Enforce sequential execution: Auth Login → Token Capture → CRUD Operations → Error Edge Case Verification
@@ -25,6 +25,7 @@ $ARGUMENTS
25
25
  ## Mandatory Pre-Flight Context Inspection
26
26
 
27
27
  Before triggering a full project audit, you MUST inspect:
28
+
28
29
  1. Workspace Package Manifest (`package.json`) → Verify installed test frameworks, linters, and dependencies
29
30
  2. Executable Scripts Inventory (`.agent/scripts/`) → Verify presence of `security_scan.js`, `lint_runner.js`, and `test_runner.js`
30
31
  3. Pipeline Execution Constraints → Confirm fixed execution order (Security → Dependencies → Type Check → Lint → Schema → Tests → Bundle) and HALT rules on critical CVE findings
@@ -20,6 +20,7 @@ $ARGUMENTS
20
20
  ## Mandatory Pre-Flight Context Inspection
21
21
 
22
22
  Before generating options or conducting Socratic architectural exploration, you MUST inspect:
23
+
23
24
  1. Technology Stack Manifest (`package.json`, `tsconfig.json`) → Confirm existing language/framework versions and active library boundaries
24
25
  2. Workspace File Layout → Understand current module scale and project structure before proposing architectural shifts
25
26
  3. Pure Exploration Constraint → Enforce zero code edits or file creation during brainstorm phase; restrict output to options, tradeoffs, and recommendations
@@ -20,6 +20,7 @@ $ARGUMENTS
20
20
  ## Mandatory Pre-Flight Context Inspection
21
21
 
22
22
  Before generating changelogs or parsing git history, you MUST inspect:
23
+
23
24
  1. Git Commit Trajectory (`git log --oneline -30`) → Verify presence of conventional commit tags (`feat:`, `fix:`, `chore:`, `BREAKING CHANGE:`)
24
25
  2. Package Manifest & Version (`package.json`) → Retrieve current release version and target release tag
25
26
  3. Keep a Changelog Formatting Standard → Enforce categories: Added, Changed, Deprecated, Removed, Fixed, Security
@@ -0,0 +1,60 @@
1
+ # /contract — AI Agent Behavioral Contract Testing & Trace Replay
2
+
3
+ $ARGUMENTS
4
+
5
+ ---
6
+
7
+ ## Mandatory Pre-Flight Context Inspection
8
+
9
+ Before running behavioral contract validation, inspect:
10
+
11
+ 1. Active Contracts Directory (`.tribunal/contracts/`) → Verify active `.yaml` rules and severities
12
+ 2. Target File Scope → Determine modified or targeted files for contract validation
13
+ 3. Failure Context Snapshots (`.tribunal/traces/`) → Check past captured trace snapshots for context
14
+
15
+ ---
16
+
17
+ ## When to Use /contract
18
+
19
+ | Use `/contract` when... | Move to... |
20
+ | :------------------------------------- | :------------------------------------- |
21
+ | Defining team behavioral rules | After contract violation → `/fix` |
22
+ | Verifying AI code before merge | On failure → `tk contract replay <id>` |
23
+ | Converting Case Law to permanent rules | After verification → `/deploy` |
24
+
25
+ ---
26
+
27
+ ## Subcommands Overview
28
+
29
+ ```bash
30
+ # Scaffold .tribunal/contracts/ with starter rules
31
+ npx tribunal-kit contract init
32
+
33
+ # Verify all project code against loaded contracts
34
+ npx tribunal-kit contract verify
35
+
36
+ # Verify a single file against contracts
37
+ npx tribunal-kit contract verify --file src/api/user.ts
38
+
39
+ # List active loaded contracts and rules
40
+ npx tribunal-kit contract list
41
+
42
+ # List failure context snapshots
43
+ npx tribunal-kit contract trace list
44
+
45
+ # Replay a failure context trace snapshot in CLI
46
+ npx tribunal-kit contract replay <trace_id>
47
+
48
+ # Auto-generate a contract template from a Case Law entry
49
+ npx tribunal-kit contract generate --from-case 14
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Behavioral Contract Guard
55
+
56
+ ```
57
+ ❌ Never ignore 'block' severity contract violations before push
58
+ ❌ Never bypass contract checks without explicit team approval
59
+ ❌ Always convert repeated Case Law rejections into behavioral contracts
60
+ ```
@@ -22,6 +22,7 @@ $ARGUMENTS
22
22
  ## Mandatory Pre-Flight Context Inspection
23
23
 
24
24
  Before scaffolding a new application, you MUST inspect:
25
+
25
26
  1. Target Directory State → Confirm directory listing is empty or obtain explicit user confirmation before overwriting existing files
26
27
  2. Runtime & Environment Context → Check Node/npm version and inspect `.env.example` if available
27
28
  3. Human Gate Before Disk Modification → Enforce explicit approval of Socratic requirements, stack selection, and scaffolding plan before creating any files
@@ -21,6 +21,7 @@ $ARGUMENTS
21
21
  ## Mandatory Pre-Flight Context Inspection
22
22
 
23
23
  Before investigating or attempting any code modification during a bug report, you MUST inspect:
24
+
24
25
  1. Exact Error Traceback / Stack Log → Read raw error logs without paraphrasing; ban making diagnostic hypotheses without tracebacks
25
26
  2. Target File & Callers → Inspect file referenced in error trace along with its upstream callers
26
27
  3. Recent Changes (`git diff`) → Inspect recent edits to identify regressions before mutating code
@@ -22,6 +22,7 @@ $ARGUMENTS
22
22
  ## Mandatory Pre-Flight Context Inspection
23
23
 
24
24
  Before triggering production deployment or executing deploy scripts, you MUST inspect:
25
+
25
26
  1. Full Pre-Flight Verification Suite (`verify_all.js`) → Verify tests, type-checking, lint, security scans, and production build output cleanly
26
27
  2. CI/CD Manifests (`.github/workflows`, `fly.toml`, `render.yaml`, etc.) → Check deployment targets and environment variable requirements
27
28
  3. Human Gate & Rollback Baseline → Confirm baseline git tag/commit and secure explicit human approval before publishing release
@@ -21,6 +21,7 @@ $ARGUMENTS
21
21
  ## Mandatory Pre-Flight Context Inspection
22
22
 
23
23
  Before modifying existing features or appending functionality, you MUST inspect:
24
+
24
25
  1. Impact Zone Identification → Grep for all callers and importers of the target file to map blast radius
25
26
  2. Existing Contract & Unit Tests → Inspect existing tests and type signatures for the target module to prevent regression
26
27
  3. Breaking Change Detection → Ensure signature changes update all dependent call sites simultaneously before writing to disk
@@ -0,0 +1,89 @@
1
+ ---
2
+ description: Automated CI/CD Failure Diagnosis & Repair. Parses raw GitHub Actions/GitLab CI runner logs, identifies the root cause (lockfile drift, missing environment variables, matrix incompatibilities, test timeouts, or syntax errors), and produces validated fixes.
3
+ tools: Read, Grep, Glob, Bash, Edit, Write
4
+ version: 3.0.0
5
+ last-updated: 2026-08-14
6
+ required-skills:
7
+ - cicd-pro
8
+ - diagnosing-bugs
9
+ - devops-engineer
10
+ scripts-binding:
11
+ - .agent/scripts/cicd_validator.js
12
+ - .agent/scripts/test_runner.js
13
+ - .agent/scripts/lint_runner.js
14
+ ---
15
+
16
+ # /fix-ci — Automated Pipeline Failure Resolution
17
+
18
+ $ARGUMENTS
19
+
20
+ ---
21
+
22
+ ## Mandatory Pre-Flight Context Inspection
23
+
24
+ Before attempting to fix CI pipeline failures:
25
+
26
+ 1. Parse Failing Runner Log → Identify exact step, exit code, and stack trace or runner error message
27
+ 2. Inspect Workflow YAML & Project Configs → Compare runner environment (Node/Python/OS version) with local workspace
28
+ 3. Human Gate Before Disk Write → Present root cause explanation and proposed diff for approval
29
+
30
+ ---
31
+
32
+ ## 4-Step CI Diagnosis & Repair Loop
33
+
34
+ ```
35
+ ┌─────────────────────────────────────────────────────────────┐
36
+ │ 1. LOG INGESTION │
37
+ │ User pastes failed CI log or step output │
38
+ │ Extract: Step Name, Error Code, Root Stack Trace │
39
+ │ │
40
+ │ 2. CLASSIFICATION │
41
+ │ □ Lockfile / Dependency Drift (npm ci vs package.json) │
42
+ │ □ Environment / Missing Secret / Missing Env Var │
43
+ │ □ Version / Runner Matrix Incompatibility │
44
+ │ □ Test / Lint / Typecheck Failure in CI Context │
45
+ │ □ Service Container (DB/Redis) Connection Timeout │
46
+ │ │
47
+ │ 3. REPRODUCTION & ROOT CAUSE ISOLATION │
48
+ │ Simulate failing step locally using test/lint runners │
49
+ │ │
50
+ │ 4. REMEDIATION & VALIDATION │
51
+ │ Apply fix to code or workflow YAML │
52
+ │ Run .agent/scripts/cicd_validator.js │
53
+ │ Submit through /tribunal-cicd Human Gate │
54
+ └─────────────────────────────────────────────────────────────┘
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Common CI Failure Root Causes & Fix Recipes
60
+
61
+ ### 1. `npm ci` ERESOLVE / Lockfile Drift
62
+
63
+ - **Symptom:** `npm error code EUSAGE / ERESOLVE` or `npm ci can only install when package.json and package-lock.json are in sync`.
64
+ - **Fix:** Run `npm install` locally to update lockfile and commit the synced `package-lock.json`.
65
+
66
+ ### 2. Missing Environment Variables / Secrets
67
+
68
+ - **Symptom:** `process.env.DATABASE_URL is undefined` during build or test steps in CI.
69
+ - **Fix:** Add dummy or mock environment variables to the workflow step `env:` block (e.g. `DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/test"`).
70
+
71
+ ### 3. Missing Service Container Healthchecks
72
+
73
+ - **Symptom:** Test step cannot connect to Postgres/Redis service in GitHub Actions runner.
74
+ - **Fix:** Add `options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5` to the service container definition.
75
+
76
+ ### 4. Runner OS / Architecture Differences
77
+
78
+ - **Symptom:** Native binary module (e.g. `sharp`, `bcrypt`, `@swc/core`) fails to load on `ubuntu-latest`.
79
+ - **Fix:** Ensure correct optional dependencies or add OS matrix build steps.
80
+
81
+ ---
82
+
83
+ ## Usage Examples
84
+
85
+ ```
86
+ /fix-ci [paste failed GitHub Actions log]
87
+ /fix-ci the test job failed on ubuntu-latest Node 22 with exit code 1
88
+ /fix-ci error: package-lock.json out of sync during npm ci
89
+ ```
@@ -21,6 +21,7 @@ $ARGUMENTS
21
21
  ## Mandatory Pre-Flight Context Inspection
22
22
 
23
23
  Before executing auto-fixers or modifying code files to resolve lint/type issues, you MUST inspect:
24
+
24
25
  1. Workspace Linter & Compiler Settings (`tsconfig.json`, `.eslintrc`, `biome.json`) → Confirm rule strictness and formatting standards
25
26
  2. Target File Lint Output → Execute `node .agent/scripts/lint_runner.js` to gather precise error line numbers and rule IDs
26
27
  3. Diff Verification Before Disk Write → Show explicit diff of proposed changes and confirm Human Gate approval before saving
@@ -22,6 +22,7 @@ $ARGUMENTS
22
22
  ## Mandatory Pre-Flight Context Inspection
23
23
 
24
24
  Before generating code modules or invoking the Maker pipeline, you MUST inspect:
25
+
25
26
  1. Workspace Package Dependencies (`package.json`) → Confirm all imported libraries exist; ban unverified phantom imports
26
27
  2. Type Definitions & Path Aliases (`tsconfig.json`) → Verify module resolution paths and compiler strictness
27
28
  3. Parallel Tribunal Review Assignment → Select relevant domain reviewers (`logic`, `security`, `frontend`, `backend`, `database`, `mobile`) prior to Human Gate submission
@@ -21,6 +21,7 @@ $ARGUMENTS
21
21
  ## Mandatory Pre-Flight Context Inspection
22
22
 
23
23
  Before initiating or resuming a multi-session marathon harness, you MUST inspect:
24
+
24
25
  1. Marathon State Ledger (`progress.json`, `feature_list.json`) → Verify current session index, completed features, and active task
25
26
  2. Session Continuity Manager (`.agent/scripts/session_manager.js`) → Verify state snapshot before context truncation
26
27
  3. Atomic Feature Handoff Protocol → Ensure each session completes exactly ONE atomic feature, runs `verify_all.js`, and commits state before handoff