tribunal-kit 1.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 (190) hide show
  1. package/.agent/.shared/ui-ux-pro-max/README.md +4 -0
  2. package/.agent/ARCHITECTURE.md +75 -0
  3. package/.agent/GEMINI.md +89 -0
  4. package/.agent/agents/backend-specialist.md +178 -0
  5. package/.agent/agents/code-archaeologist.md +119 -0
  6. package/.agent/agents/database-architect.md +164 -0
  7. package/.agent/agents/debugger.md +151 -0
  8. package/.agent/agents/dependency-reviewer.md +55 -0
  9. package/.agent/agents/devops-engineer.md +175 -0
  10. package/.agent/agents/documentation-writer.md +137 -0
  11. package/.agent/agents/explorer-agent.md +142 -0
  12. package/.agent/agents/frontend-reviewer.md +80 -0
  13. package/.agent/agents/frontend-specialist.md +185 -0
  14. package/.agent/agents/game-developer.md +184 -0
  15. package/.agent/agents/logic-reviewer.md +66 -0
  16. package/.agent/agents/mobile-developer.md +152 -0
  17. package/.agent/agents/orchestrator.md +140 -0
  18. package/.agent/agents/penetration-tester.md +131 -0
  19. package/.agent/agents/performance-optimizer.md +139 -0
  20. package/.agent/agents/performance-reviewer.md +72 -0
  21. package/.agent/agents/product-manager.md +108 -0
  22. package/.agent/agents/product-owner.md +99 -0
  23. package/.agent/agents/project-planner.md +142 -0
  24. package/.agent/agents/qa-automation-engineer.md +138 -0
  25. package/.agent/agents/security-auditor.md +170 -0
  26. package/.agent/agents/seo-specialist.md +132 -0
  27. package/.agent/agents/sql-reviewer.md +73 -0
  28. package/.agent/agents/test-coverage-reviewer.md +81 -0
  29. package/.agent/agents/test-engineer.md +139 -0
  30. package/.agent/agents/type-safety-reviewer.md +65 -0
  31. package/.agent/mcp_config.json +40 -0
  32. package/.agent/rules/GEMINI.md +206 -0
  33. package/.agent/scripts/auto_preview.py +180 -0
  34. package/.agent/scripts/checklist.py +209 -0
  35. package/.agent/scripts/session_manager.py +120 -0
  36. package/.agent/scripts/verify_all.py +195 -0
  37. package/.agent/skills/api-patterns/SKILL.md +81 -0
  38. package/.agent/skills/api-patterns/api-style.md +42 -0
  39. package/.agent/skills/api-patterns/auth.md +24 -0
  40. package/.agent/skills/api-patterns/documentation.md +26 -0
  41. package/.agent/skills/api-patterns/graphql.md +41 -0
  42. package/.agent/skills/api-patterns/rate-limiting.md +31 -0
  43. package/.agent/skills/api-patterns/response.md +37 -0
  44. package/.agent/skills/api-patterns/rest.md +40 -0
  45. package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
  46. package/.agent/skills/api-patterns/security-testing.md +122 -0
  47. package/.agent/skills/api-patterns/trpc.md +41 -0
  48. package/.agent/skills/api-patterns/versioning.md +22 -0
  49. package/.agent/skills/app-builder/SKILL.md +75 -0
  50. package/.agent/skills/app-builder/agent-coordination.md +71 -0
  51. package/.agent/skills/app-builder/feature-building.md +53 -0
  52. package/.agent/skills/app-builder/project-detection.md +34 -0
  53. package/.agent/skills/app-builder/scaffolding.md +118 -0
  54. package/.agent/skills/app-builder/tech-stack.md +40 -0
  55. package/.agent/skills/app-builder/templates/SKILL.md +39 -0
  56. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  57. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  58. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  59. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  60. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  61. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  62. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  63. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
  64. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
  65. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
  66. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
  67. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  68. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
  69. package/.agent/skills/architecture/SKILL.md +55 -0
  70. package/.agent/skills/architecture/context-discovery.md +43 -0
  71. package/.agent/skills/architecture/examples.md +94 -0
  72. package/.agent/skills/architecture/pattern-selection.md +68 -0
  73. package/.agent/skills/architecture/patterns-reference.md +50 -0
  74. package/.agent/skills/architecture/trade-off-analysis.md +77 -0
  75. package/.agent/skills/bash-linux/SKILL.md +199 -0
  76. package/.agent/skills/behavioral-modes/SKILL.md +242 -0
  77. package/.agent/skills/brainstorming/SKILL.md +163 -0
  78. package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
  79. package/.agent/skills/clean-code/SKILL.md +201 -0
  80. package/.agent/skills/code-review-checklist/SKILL.md +109 -0
  81. package/.agent/skills/database-design/SKILL.md +52 -0
  82. package/.agent/skills/database-design/database-selection.md +43 -0
  83. package/.agent/skills/database-design/indexing.md +39 -0
  84. package/.agent/skills/database-design/migrations.md +48 -0
  85. package/.agent/skills/database-design/optimization.md +36 -0
  86. package/.agent/skills/database-design/orm-selection.md +30 -0
  87. package/.agent/skills/database-design/schema-design.md +56 -0
  88. package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
  89. package/.agent/skills/deployment-procedures/SKILL.md +241 -0
  90. package/.agent/skills/doc.md +177 -0
  91. package/.agent/skills/documentation-templates/SKILL.md +194 -0
  92. package/.agent/skills/frontend-design/SKILL.md +418 -0
  93. package/.agent/skills/frontend-design/animation-guide.md +331 -0
  94. package/.agent/skills/frontend-design/color-system.md +311 -0
  95. package/.agent/skills/frontend-design/decision-trees.md +418 -0
  96. package/.agent/skills/frontend-design/motion-graphics.md +306 -0
  97. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  98. package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
  99. package/.agent/skills/frontend-design/typography-system.md +345 -0
  100. package/.agent/skills/frontend-design/ux-psychology.md +1116 -0
  101. package/.agent/skills/frontend-design/visual-effects.md +383 -0
  102. package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
  103. package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
  104. package/.agent/skills/game-development/SKILL.md +167 -0
  105. package/.agent/skills/game-development/game-art/SKILL.md +185 -0
  106. package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
  107. package/.agent/skills/game-development/game-design/SKILL.md +129 -0
  108. package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
  109. package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
  110. package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
  111. package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
  112. package/.agent/skills/game-development/web-games/SKILL.md +150 -0
  113. package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
  114. package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  115. package/.agent/skills/i18n-localization/SKILL.md +154 -0
  116. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  117. package/.agent/skills/intelligent-routing/SKILL.md +335 -0
  118. package/.agent/skills/lint-and-validate/SKILL.md +45 -0
  119. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  120. package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  121. package/.agent/skills/mcp-builder/SKILL.md +176 -0
  122. package/.agent/skills/mobile-design/SKILL.md +394 -0
  123. package/.agent/skills/mobile-design/decision-trees.md +516 -0
  124. package/.agent/skills/mobile-design/mobile-backend.md +491 -0
  125. package/.agent/skills/mobile-design/mobile-color-system.md +420 -0
  126. package/.agent/skills/mobile-design/mobile-debugging.md +122 -0
  127. package/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
  128. package/.agent/skills/mobile-design/mobile-navigation.md +458 -0
  129. package/.agent/skills/mobile-design/mobile-performance.md +767 -0
  130. package/.agent/skills/mobile-design/mobile-testing.md +356 -0
  131. package/.agent/skills/mobile-design/mobile-typography.md +433 -0
  132. package/.agent/skills/mobile-design/platform-android.md +666 -0
  133. package/.agent/skills/mobile-design/platform-ios.md +561 -0
  134. package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
  135. package/.agent/skills/mobile-design/touch-psychology.md +537 -0
  136. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  137. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  138. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  139. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  140. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  141. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  142. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  143. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  144. package/.agent/skills/nextjs-react-expert/SKILL.md +286 -0
  145. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  146. package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  147. package/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
  148. package/.agent/skills/parallel-agents/SKILL.md +175 -0
  149. package/.agent/skills/performance-profiling/SKILL.md +143 -0
  150. package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  151. package/.agent/skills/plan-writing/SKILL.md +152 -0
  152. package/.agent/skills/powershell-windows/SKILL.md +167 -0
  153. package/.agent/skills/python-patterns/SKILL.md +441 -0
  154. package/.agent/skills/red-team-tactics/SKILL.md +199 -0
  155. package/.agent/skills/rust-pro/SKILL.md +176 -0
  156. package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
  157. package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  158. package/.agent/skills/server-management/SKILL.md +161 -0
  159. package/.agent/skills/systematic-debugging/SKILL.md +109 -0
  160. package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
  161. package/.agent/skills/tdd-workflow/SKILL.md +149 -0
  162. package/.agent/skills/testing-patterns/SKILL.md +178 -0
  163. package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
  164. package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
  165. package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
  166. package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  167. package/.agent/skills/web-design-guidelines/SKILL.md +57 -0
  168. package/.agent/skills/webapp-testing/SKILL.md +187 -0
  169. package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  170. package/.agent/workflows/brainstorm.md +100 -0
  171. package/.agent/workflows/create.md +86 -0
  172. package/.agent/workflows/debug.md +104 -0
  173. package/.agent/workflows/deploy.md +102 -0
  174. package/.agent/workflows/enhance.md +107 -0
  175. package/.agent/workflows/generate.md +100 -0
  176. package/.agent/workflows/orchestrate.md +102 -0
  177. package/.agent/workflows/plan.md +108 -0
  178. package/.agent/workflows/preview.md +81 -0
  179. package/.agent/workflows/review.md +88 -0
  180. package/.agent/workflows/status.md +69 -0
  181. package/.agent/workflows/test.md +117 -0
  182. package/.agent/workflows/tribunal-backend.md +69 -0
  183. package/.agent/workflows/tribunal-database.md +88 -0
  184. package/.agent/workflows/tribunal-frontend.md +69 -0
  185. package/.agent/workflows/tribunal-full.md +77 -0
  186. package/.agent/workflows/ui-ux-pro-max.md +153 -0
  187. package/LICENSE +21 -0
  188. package/README.md +136 -0
  189. package/bin/tribunal-kit.js +289 -0
  190. package/package.json +34 -0
@@ -0,0 +1,100 @@
1
+ ---
2
+ description: Generate code using the full Tribunal Anti-Hallucination pipeline. Maker generates at low temperature → selected reviewers audit in parallel → Human Gate for final approval.
3
+ ---
4
+
5
+ # /generate — Hallucination-Free Code Generation
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command runs code generation through the full Tribunal pipeline. Code reaches you only after being reviewed. Nothing is written to disk without your explicit approval.
12
+
13
+ ---
14
+
15
+ ## Pipeline Flow
16
+
17
+ ```
18
+ Your request
19
+
20
+
21
+ Context read — existing files, schema, package.json scanned
22
+
23
+
24
+ Maker generates at temperature 0.1
25
+ (grounded in context, never inventing)
26
+
27
+
28
+ Selected reviewers run in parallel
29
+
30
+
31
+ Human Gate — you see all verdicts and the diff
32
+ Only then: write to disk (Y) or discard (N) or revise (R)
33
+ ```
34
+
35
+ ---
36
+
37
+ ## Who Reviews It
38
+
39
+ Default (always active):
40
+
41
+ ```
42
+ logic-reviewer → Hallucinated methods, impossible logic, undefined refs
43
+ security-auditor → OWASP vulnerabilities, SQL injection, hardcoded secrets
44
+ ```
45
+
46
+ Auto-activated by keywords in your request:
47
+
48
+ | Keyword | Additional Reviewer |
49
+ |---|---|
50
+ | api, route, endpoint | `dependency-reviewer` + `type-safety-reviewer` |
51
+ | sql, query, database | `sql-reviewer` |
52
+ | component, hook, react | `frontend-reviewer` + `type-safety-reviewer` |
53
+ | test, spec, coverage | `test-coverage-reviewer` |
54
+ | slow, memory, optimize | `performance-reviewer` |
55
+
56
+ ---
57
+
58
+ ## What the Maker Is Not Allowed to Do
59
+
60
+ ```
61
+ ❌ Import a package not in the project's package.json
62
+ ❌ Call a method it hasn't seen documented
63
+ ❌ Use `any` in TypeScript without a comment explaining why
64
+ ❌ Generate an entire application in one shot
65
+ ❌ Guess at a database column name
66
+ ```
67
+
68
+ When unsure about any call: it writes `// VERIFY: [reason]` instead of hallucinating.
69
+
70
+ ---
71
+
72
+ ## Output Format
73
+
74
+ ```
75
+ ━━━ Tribunal: [Domain] ━━━━━━━━━━━━━━━━━━
76
+
77
+ Active reviewers: logic · security · [others]
78
+
79
+ [Generated code]
80
+
81
+ ━━━ Verdicts ━━━━━━━━━━━━━━━━━━━━━━━━━━━
82
+
83
+ logic-reviewer: ✅ APPROVED
84
+ security-auditor: ✅ APPROVED
85
+
86
+ ━━━ Human Gate ━━━━━━━━━━━━━━━━━━━━━━━━
87
+
88
+ Write to disk? Y = approve | N = discard | R = revise with feedback
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Usage
94
+
95
+ ```
96
+ /generate a JWT middleware for Express with algorithm enforcement
97
+ /generate a Prisma query for users with their posts included
98
+ /generate a debounced search hook in React
99
+ /generate a function to validate and normalize email addresses
100
+ ```
@@ -0,0 +1,102 @@
1
+ ---
2
+ description: Coordinate multiple agents for complex tasks. Use for multi-perspective analysis, comprehensive reviews, or tasks requiring different domain expertise.
3
+ ---
4
+
5
+ # /orchestrate — Multi-Agent Coordination
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command coordinates multiple specialists to solve a problem that requires more than one domain. One agent is not orchestration.
12
+
13
+ ---
14
+
15
+ ## The Minimum Rule
16
+
17
+ > **Fewer than 3 agents = not orchestration.**
18
+ >
19
+ > Before marking any orchestration session as complete, count the agents invoked. If the count is less than 3, activate more. A single agent delegated to is just a delegation.
20
+
21
+ ---
22
+
23
+ ## Agent Selection by Task Type
24
+
25
+ | Task | Required Specialists |
26
+ |---|---|
27
+ | Full-stack feature | `frontend-specialist` + `backend-specialist` + `test-engineer` |
28
+ | API build | `backend-specialist` + `security-auditor` + `test-engineer` |
29
+ | Database-heavy work | `database-architect` + `backend-specialist` + `security-auditor` |
30
+ | Complete product | `project-planner` + `frontend-specialist` + `backend-specialist` + `devops-engineer` |
31
+ | Security investigation | `security-auditor` + `penetration-tester` + `devops-engineer` |
32
+ | Complex bug | `debugger` + `explorer-agent` + `test-engineer` |
33
+
34
+ ---
35
+
36
+ ## Two-Phase Protocol (Strict)
37
+
38
+ ### Phase A — Planning Only
39
+
40
+ Only two agents are allowed during planning:
41
+
42
+ ```
43
+ project-planner → writes docs/PLAN-{slug}.md
44
+ explorer-agent → (if working in existing code) maps the codebase
45
+ ```
46
+
47
+ No other agent runs. No code is produced.
48
+
49
+ After planning, the plan is shown to the user:
50
+
51
+ ```
52
+ ✅ Plan ready: docs/PLAN-{slug}.md
53
+
54
+ Approve to start implementation? (Y / N)
55
+ ```
56
+
57
+ **Phase B does NOT start without a Y.**
58
+
59
+ ### Phase B — Implementation (Parallel)
60
+
61
+ After approval, specialists activate:
62
+
63
+ ```
64
+ Foundation tier: database-architect + security-auditor (run first)
65
+ Core tier: backend-specialist + frontend-specialist (after foundation)
66
+ Quality tier: test-engineer + qa-automation-engineer (after core)
67
+ ```
68
+
69
+ Each tier's output goes through its Tribunal gate before the next tier begins.
70
+
71
+ ---
72
+
73
+ ## Cross-Agent Context Handoff
74
+
75
+ When one agent's output feeds the next:
76
+
77
+ ```
78
+ The context passed to Agent B must include:
79
+ "Agent A produced: [result]
80
+ Build on this. Do not re-derive it."
81
+ ```
82
+
83
+ Never let Agent B re-invent what Agent A already established.
84
+
85
+ ---
86
+
87
+ ## Hallucination Guard
88
+
89
+ - Every agent's output goes through Tribunal before it reaches the user
90
+ - The Human Gate fires before any file is written — the user sees the diff and approves
91
+ - Retry limit: 3 Maker revisions per agent. After 3 failures, stop and report to the user.
92
+ - Per-agent scope is enforced — `frontend-specialist` never writes DB migrations
93
+
94
+ ---
95
+
96
+ ## Usage
97
+
98
+ ```
99
+ /orchestrate build a complete auth system with JWT and refresh tokens
100
+ /orchestrate review the entire API layer for security issues
101
+ /orchestrate build a multi-tenant SaaS onboarding flow
102
+ ```
@@ -0,0 +1,108 @@
1
+ ---
2
+ description: Create project plan using project-planner agent. No code writing - only plan file generation.
3
+ ---
4
+
5
+ # /plan — Write the Plan First
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command produces one thing: a structured plan file. Nothing is implemented. No code is written. The plan is the output.
12
+
13
+ ---
14
+
15
+ ## Why Plan Before Building
16
+
17
+ > Tasks without plans get rebuilt three times.
18
+ > Plans expose ambiguity before it becomes broken code.
19
+
20
+ ---
21
+
22
+ ## How It Works
23
+
24
+ ### Gate: Clarify Before You Plan
25
+
26
+ The `project-planner` agent asks:
27
+
28
+ ```
29
+ What outcome needs to exist that doesn't exist today?
30
+ What are the hard constraints? (stack, existing code, deadline)
31
+ What's explicitly not being built in this version?
32
+ How will we confirm it's done?
33
+ ```
34
+
35
+ If any answer is "I don't know" — those are clarified before the plan is written, not after.
36
+
37
+ ### Plan File Creation
38
+
39
+ ```
40
+ Location: docs/PLAN-{task-slug}.md
41
+
42
+ Slug naming:
43
+ Pull 2–3 key words from the request
44
+ Lowercase + hyphens
45
+ Max 30 characters
46
+ "build auth with JWT" → PLAN-auth-jwt.md
47
+ "shopping cart checkout" → PLAN-cart-checkout.md
48
+ ```
49
+
50
+ ### After the File is Written
51
+
52
+ ```
53
+ ✅ Plan written: docs/PLAN-{slug}.md
54
+
55
+ Review it, then:
56
+ Run /create to begin implementation
57
+ Or edit the file to refine scope first
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Plan File Structure
63
+
64
+ ```markdown
65
+ # Plan: [Feature Name]
66
+
67
+ ## What Done Looks Like
68
+ [Observable outcome — one sentence]
69
+
70
+ ## Won't Include in This Version
71
+ - [Explicit exclusion]
72
+
73
+ ## Unresolved Questions
74
+ - [Thing that needs external confirmation: VERIFY]
75
+
76
+ ## Estimates (Ranges + Confidence)
77
+ All time estimates include: optimistic / realistic / pessimistic + confidence level
78
+
79
+ ## Task Table
80
+ | # | Task | Agent | Depends on | Done when |
81
+ |---|------|-------|-----------|-----------|
82
+ | 1 | ... | database-architect | none | migration runs |
83
+ | 2 | ... | backend-specialist | #1 | returns 201 |
84
+
85
+ ## Review Gates
86
+ | Task | Tribunal |
87
+ |---|---|
88
+ | #1 schema | /tribunal-database |
89
+ | #2 API | /tribunal-backend |
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Hallucination Guard
95
+
96
+ - Every tool/library mentioned in the plan must be real and verified
97
+ - All time estimates are ranges with a confidence label — never single-point guarantees
98
+ - External dependencies that aren't confirmed get a `[VERIFY: check this exists]` tag
99
+
100
+ ---
101
+
102
+ ## Usage
103
+
104
+ ```
105
+ /plan REST API with user auth
106
+ /plan dark mode toggle for the settings page
107
+ /plan multi-tenant account switching
108
+ ```
@@ -0,0 +1,81 @@
1
+ ---
2
+ description: Preview server start, stop, and status check. Local development server management.
3
+ ---
4
+
5
+ # /preview — Local Server Control
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ Start, stop, or check the development server so you can verify generated code before approving it for your codebase.
12
+
13
+ ---
14
+
15
+ ## Sub-commands
16
+
17
+ ```
18
+ /preview start → Launch the dev server
19
+ /preview stop → Shut down the running server
20
+ /preview status → Check if server is live and on which URL
21
+ /preview restart → Stop + start in sequence
22
+ ```
23
+
24
+ ---
25
+
26
+ ## On Start
27
+
28
+ ```
29
+ Step 1: Check if a process is already using the target port (warn if yes)
30
+ Step 2: Read package.json → scripts.dev or scripts.start to find the actual command
31
+ Step 3: Launch the server
32
+ Step 4: Wait for the ready signal (port open or "ready" in output)
33
+ Step 5: Report back
34
+
35
+ ━━━ Server Started ━━━━━━━━━━━━━━━
36
+ URL: http://localhost:[port]
37
+ Command: [actual command used]
38
+
39
+ Run /preview stop to shut down.
40
+ ```
41
+
42
+ ---
43
+
44
+ ## On Stop
45
+
46
+ ```
47
+ Step 1: Locate the running process by port or PID
48
+ Step 2: Send graceful shutdown
49
+ Step 3: Confirm port is released
50
+
51
+ ━━━ Server Stopped ━━━━━━━━━━━━━━━
52
+ Port [N] is now free.
53
+ ```
54
+
55
+ ---
56
+
57
+ ## On Status
58
+
59
+ ```
60
+ 🟢 Running — http://localhost:[port] (PID [N])
61
+ 🔴 Not running — no active process found on this port
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Hallucination Guard
67
+
68
+ - `package.json` is always read before assuming the start command — never assume it's `npm run dev`
69
+ - The actual port is checked from the config — never hardcoded to 3000
70
+ - No invented server flags added to the start command
71
+
72
+ ---
73
+
74
+ ## Usage
75
+
76
+ ```
77
+ /preview start
78
+ /preview stop
79
+ /preview status
80
+ /preview restart
81
+ ```
@@ -0,0 +1,88 @@
1
+ ---
2
+ description: Audit existing code for hallucinations. Runs Logic + Security reviewers on any code without generating anything new.
3
+ ---
4
+
5
+ # /review — Code Audit (No Generation)
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command audits code you already have. Nothing is generated. The reviewers read, analyze, and report — that's it.
12
+
13
+ Paste code directly after the command, or point to a file.
14
+
15
+ ---
16
+
17
+ ## How to Use It
18
+
19
+ ```
20
+ /review
21
+
22
+ [paste code here]
23
+ ```
24
+
25
+ Or:
26
+
27
+ ```
28
+ /review src/services/auth.service.ts
29
+ ```
30
+
31
+ ---
32
+
33
+ ## What Always Runs
34
+
35
+ ```
36
+ logic-reviewer → Methods that don't exist, conditions that can't be true,
37
+ undefined variables used before assignment
38
+
39
+ security-auditor → SQL injection, hardcoded credentials, auth bypass,
40
+ unvalidated input, exposed stack traces
41
+ ```
42
+
43
+ ## What Also Runs (Based on Code Type)
44
+
45
+ | Code Contains | Additional Reviewer |
46
+ |---|---|
47
+ | SQL / ORM queries | `sql-reviewer` |
48
+ | React hooks / components | `frontend-reviewer` |
49
+ | TypeScript types / generics | `type-safety-reviewer` |
50
+ | Import statements | `dependency-reviewer` |
51
+
52
+ ---
53
+
54
+ ## Audit Report Format
55
+
56
+ ```
57
+ ━━━ Audit: [filename or snippet] ━━━━━━━━━
58
+
59
+ logic-reviewer: ✅ No hallucinated APIs found
60
+ security-auditor: ❌ REJECTED
61
+
62
+ Findings:
63
+ ❌ Critical — Line 8
64
+ Type: SQL injection
65
+ Code: `db.query(\`SELECT * WHERE id = ${id}\`)`
66
+ Fix: Use parameterized: `db.query('SELECT * WHERE id = $1', [id])`
67
+
68
+ ⚠️ Warning — Line 22
69
+ Type: Unguarded optional access
70
+ Code: `user.profile.name`
71
+ Fix: `user?.profile?.name ?? 'Unknown'`
72
+
73
+ ━━━ Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
74
+
75
+ 1 Critical issue blocking integration.
76
+ 1 Warning — review before shipping.
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Usage
82
+
83
+ ```
84
+ /review the auth middleware
85
+ /review this SQL query [paste]
86
+ /review src/routes/user.ts for injection risks
87
+ /review my React component for hooks violations
88
+ ```
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: Display agent and project status. Progress tracking and status board.
3
+ ---
4
+
5
+ # /status — Session View
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command shows the current state of the active Tribunal session — what has run, what passed, what was rejected, and what is waiting at the Human Gate.
12
+
13
+ ---
14
+
15
+ ## Session Dashboard
16
+
17
+ ```
18
+ ━━━ Tribunal Session ━━━━━━━━━━━━━━━━━━━━
19
+
20
+ Mode: [Generate | Review | Plan | Audit]
21
+ Request: [original prompt or task name]
22
+
23
+ ━━━ Agent Activity ━━━━━━━━━━━━━━━━━━━━━
24
+
25
+ logic-reviewer ✅ APPROVED
26
+ security-auditor ❌ REJECTED — 1 issue
27
+ dependency-reviewer ✅ APPROVED
28
+ type-safety-reviewer 🔄 Running
29
+ performance-reviewer ⏸️ Queued
30
+
31
+ ━━━ Blocked Issues ━━━━━━━━━━━━━━━━━━━━━
32
+
33
+ ❌ security-auditor flagged:
34
+ File: src/routes/user.ts — Line 34
35
+ Type: SQL injection
36
+ Fix: Replace string interpolation with parameterized query
37
+
38
+ ━━━ Human Gate ━━━━━━━━━━━━━━━━━━━━━━━━
39
+
40
+ Status: ⏸️ Awaiting your decision before any file is written.
41
+
42
+ Options:
43
+ ✅ Approve — write the approved changes to disk
44
+ 🔄 Revise — send back to the Maker with feedback
45
+ ❌ Discard — drop this generation entirely
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Status Symbols
51
+
52
+ | Symbol | Meaning |
53
+ |---|---|
54
+ | ✅ | Agent complete — verdict returned |
55
+ | 🔄 | Agent currently running |
56
+ | ⏸️ | Queued — waiting for a prior stage |
57
+ | ❌ | Rejected — issue found, cannot proceed |
58
+ | ⚠️ | Warning — non-blocking, review before approving |
59
+
60
+ ---
61
+
62
+ ## Sub-commands
63
+
64
+ ```
65
+ /status → Full session view
66
+ /status issues → Show only REJECTED and WARNING verdicts
67
+ /status gate → Show what's currently at the Human Gate awaiting approval
68
+ /status agents → Show only the agent activity table
69
+ ```
@@ -0,0 +1,117 @@
1
+ ---
2
+ description: Test generation and test running command. Creates and executes tests for code.
3
+ ---
4
+
5
+ # /test — Test Quality Engine
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command either generates tests that actually test things, or audits existing tests to find ones that don't. A test that always passes isn't protecting anything.
12
+
13
+ ---
14
+
15
+ ## Modes
16
+
17
+ ```
18
+ /test [file or function] → Generate tests for the target
19
+ /test audit → Check existing tests for quality issues
20
+ /test coverage → Identify code paths with no test coverage
21
+ /test edge [function] → Generate edge-case tests only (null, empty, boundary)
22
+ ```
23
+
24
+ ---
25
+
26
+ ## When Generating Tests
27
+
28
+ **First, the code is read:**
29
+ - Every execution path is mapped (normal path, error path, edge cases)
30
+ - Direct external dependencies are identified (to mock)
31
+ - Expected inputs and outputs are derived from the function signature and behavior
32
+
33
+ **Then a test plan is written before code:**
34
+
35
+ ```
36
+ Target: [function or module]
37
+
38
+ Path inventory:
39
+ › Normal path with valid input
40
+ › Null / undefined input
41
+ › Empty string / empty array
42
+ › Boundary value (0, -1, MAX)
43
+ › Async rejection / network failure
44
+ › Invalid type input
45
+
46
+ Dependencies to mock: [list — minimal, only direct deps]
47
+ ```
48
+
49
+ **Then tests are written and passed through `test-coverage-reviewer`.**
50
+
51
+ ---
52
+
53
+ ## Test Structure Standard
54
+
55
+ Every generated test file follows this format:
56
+
57
+ ```typescript
58
+ describe('[Unit under test]', () => {
59
+
60
+ describe('[scenario group]', () => {
61
+ it('[specific behavior]', () => {
62
+ // Arrange
63
+ const input = [setup value];
64
+
65
+ // Act
66
+ const result = functionUnderTest(input);
67
+
68
+ // Assert — specific value, not .toBeDefined()
69
+ expect(result).toBe([exact expected value]);
70
+ });
71
+ });
72
+
73
+ describe('edge cases', () => {
74
+ it('throws when input is null', () => {
75
+ expect(() => functionUnderTest(null)).toThrow('[exact message]');
76
+ });
77
+
78
+ it('handles empty string', () => {
79
+ expect(() => functionUnderTest('')).toThrow('[exact message]');
80
+ });
81
+ });
82
+
83
+ });
84
+ ```
85
+
86
+ ---
87
+
88
+ ## When Auditing Existing Tests
89
+
90
+ The `test-coverage-reviewer` flags:
91
+
92
+ | Problem | What It Looks Like |
93
+ |---|---|
94
+ | Tautology test | `expect(fn(x)).toBe(fn(x))` — always passes |
95
+ | No assertion | `it('works', () => { fn(); })` — nothing checked |
96
+ | Missing edge cases | Suite has happy path only |
97
+ | Over-mocking | Every dependency mocked — nothing real tested |
98
+
99
+ ---
100
+
101
+ ## Hallucination Guard
102
+
103
+ - Only documented Vitest/Jest methods are used — never `test.eventually()`, `expect.when()`, or invented matchers
104
+ - Assertions test specific values — `toBe('exact')`, not `toBeDefined()` or `toBeTruthy()`
105
+ - Mocks are **minimal** — only the direct external dependency of the unit, not the whole world
106
+ - After auditing existing tests: all conclusions are backed by reading the actual test code
107
+
108
+ ---
109
+
110
+ ## Usage
111
+
112
+ ```
113
+ /test src/services/auth.service.ts
114
+ /test the validateEmail function
115
+ /test audit — check whether my existing tests actually assert anything
116
+ /test coverage — show branches with no test
117
+ ```