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,173 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill: webapp-testing
4
+ Script: playwright_runner.py
5
+ Purpose: Run basic Playwright browser tests
6
+ Usage: python playwright_runner.py <url> [--screenshot]
7
+ Output: JSON with page info, health status, and optional screenshot path
8
+ Note: Requires playwright (pip install playwright && playwright install chromium)
9
+ Screenshots: Saved to system temp directory (auto-cleaned by OS)
10
+ """
11
+ import sys
12
+ import json
13
+ import os
14
+ import tempfile
15
+ from datetime import datetime
16
+
17
+ # Fix Windows console encoding for Unicode output
18
+ try:
19
+ sys.stdout.reconfigure(encoding='utf-8', errors='replace')
20
+ sys.stderr.reconfigure(encoding='utf-8', errors='replace')
21
+ except AttributeError:
22
+ pass # Python < 3.7
23
+
24
+ try:
25
+ from playwright.sync_api import sync_playwright
26
+ PLAYWRIGHT_AVAILABLE = True
27
+ except ImportError:
28
+ PLAYWRIGHT_AVAILABLE = False
29
+
30
+
31
+ def run_basic_test(url: str, take_screenshot: bool = False) -> dict:
32
+ """Run basic browser test on URL."""
33
+ if not PLAYWRIGHT_AVAILABLE:
34
+ return {
35
+ "error": "Playwright not installed",
36
+ "fix": "pip install playwright && playwright install chromium"
37
+ }
38
+
39
+ result = {
40
+ "url": url,
41
+ "timestamp": datetime.now().isoformat(),
42
+ "status": "pending"
43
+ }
44
+
45
+ try:
46
+ with sync_playwright() as p:
47
+ browser = p.chromium.launch(headless=True)
48
+ context = browser.new_context(
49
+ viewport={"width": 1280, "height": 720},
50
+ user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
51
+ )
52
+ page = context.new_page()
53
+
54
+ # Navigate
55
+ response = page.goto(url, wait_until="networkidle", timeout=30000)
56
+
57
+ # Basic info
58
+ result["page"] = {
59
+ "title": page.title(),
60
+ "url": page.url,
61
+ "status_code": response.status if response else None
62
+ }
63
+
64
+ # Health checks
65
+ result["health"] = {
66
+ "loaded": response.ok if response else False,
67
+ "has_title": bool(page.title()),
68
+ "has_h1": page.locator("h1").count() > 0,
69
+ "has_links": page.locator("a").count() > 0,
70
+ "has_images": page.locator("img").count() > 0
71
+ }
72
+
73
+ # Console errors
74
+ console_errors = []
75
+ page.on("console", lambda msg: console_errors.append(msg.text) if msg.type == "error" else None)
76
+
77
+ # Performance metrics
78
+ result["performance"] = {
79
+ "dom_content_loaded": page.evaluate("window.performance.timing.domContentLoadedEventEnd - window.performance.timing.navigationStart"),
80
+ "load_complete": page.evaluate("window.performance.timing.loadEventEnd - window.performance.timing.navigationStart")
81
+ }
82
+
83
+ # Screenshot - uses system temp directory (cross-platform, auto-cleaned)
84
+ if take_screenshot:
85
+ # Cross-platform: Windows=%TEMP%, Linux/macOS=/tmp
86
+ screenshot_dir = os.path.join(tempfile.gettempdir(), "maestro_screenshots")
87
+ os.makedirs(screenshot_dir, exist_ok=True)
88
+ screenshot_path = os.path.join(screenshot_dir, f"screenshot_{datetime.now().strftime('%Y%m%d_%H%M%S')}.png")
89
+ page.screenshot(path=screenshot_path, full_page=True)
90
+ result["screenshot"] = screenshot_path
91
+ result["screenshot_note"] = "Saved to temp directory (auto-cleaned by OS)"
92
+
93
+ # Element counts
94
+ result["elements"] = {
95
+ "links": page.locator("a").count(),
96
+ "buttons": page.locator("button").count(),
97
+ "inputs": page.locator("input").count(),
98
+ "images": page.locator("img").count(),
99
+ "forms": page.locator("form").count()
100
+ }
101
+
102
+ browser.close()
103
+
104
+ result["status"] = "success" if result["health"]["loaded"] else "failed"
105
+ result["summary"] = "[OK] Page loaded successfully" if result["status"] == "success" else "[X] Page failed to load"
106
+
107
+ except Exception as e:
108
+ result["status"] = "error"
109
+ result["error"] = str(e)
110
+ result["summary"] = f"[X] Error: {str(e)[:100]}"
111
+
112
+ return result
113
+
114
+
115
+ def run_accessibility_check(url: str) -> dict:
116
+ """Run basic accessibility check."""
117
+ if not PLAYWRIGHT_AVAILABLE:
118
+ return {"error": "Playwright not installed"}
119
+
120
+ result = {"url": url, "accessibility": {}}
121
+
122
+ try:
123
+ with sync_playwright() as p:
124
+ browser = p.chromium.launch(headless=True)
125
+ page = browser.new_page()
126
+ page.goto(url, wait_until="networkidle", timeout=30000)
127
+
128
+ # Basic a11y checks
129
+ result["accessibility"] = {
130
+ "images_with_alt": page.locator("img[alt]").count(),
131
+ "images_without_alt": page.locator("img:not([alt])").count(),
132
+ "buttons_with_label": page.locator("button[aria-label], button:has-text('')").count(),
133
+ "links_with_text": page.locator("a:has-text('')").count(),
134
+ "form_labels": page.locator("label").count(),
135
+ "headings": {
136
+ "h1": page.locator("h1").count(),
137
+ "h2": page.locator("h2").count(),
138
+ "h3": page.locator("h3").count()
139
+ }
140
+ }
141
+
142
+ browser.close()
143
+ result["status"] = "success"
144
+
145
+ except Exception as e:
146
+ result["status"] = "error"
147
+ result["error"] = str(e)
148
+
149
+ return result
150
+
151
+
152
+ if __name__ == "__main__":
153
+ if len(sys.argv) < 2:
154
+ print(json.dumps({
155
+ "error": "Usage: python playwright_runner.py <url> [--screenshot] [--a11y]",
156
+ "examples": [
157
+ "python playwright_runner.py https://example.com",
158
+ "python playwright_runner.py https://example.com --screenshot",
159
+ "python playwright_runner.py https://example.com --a11y"
160
+ ]
161
+ }, indent=2))
162
+ sys.exit(1)
163
+
164
+ url = sys.argv[1]
165
+ take_screenshot = "--screenshot" in sys.argv
166
+ check_a11y = "--a11y" in sys.argv
167
+
168
+ if check_a11y:
169
+ result = run_accessibility_check(url)
170
+ else:
171
+ result = run_basic_test(url, take_screenshot)
172
+
173
+ print(json.dumps(result, indent=2))
@@ -0,0 +1,100 @@
1
+ ---
2
+ description: Structured brainstorming for projects and features. Explores multiple options before implementation.
3
+ ---
4
+
5
+ # /brainstorm — Idea Space
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command puts the AI into **exploration mode** — no implementation, no code. The goal is to map the problem and surface real alternatives before committing to a path.
12
+
13
+ ---
14
+
15
+ ## When to Use This
16
+
17
+ Before any `/create` or `/enhance` command when:
18
+ - The problem is not yet well-defined
19
+ - You want to evaluate multiple architectural paths
20
+ - You need an honest assessment of tradeoffs before starting
21
+
22
+ ---
23
+
24
+ ## What Happens
25
+
26
+ **First, the problem is clarified:**
27
+
28
+ > "What specific outcome should exist that doesn't exist today? Who experiences the problem? What constraints are fixed?"
29
+
30
+ If those aren't answered, I ask before going further.
31
+
32
+ **Then, at least 3 distinct approaches are surfaced.** Not variations — genuinely different paths with different tradeoffs.
33
+
34
+ **Each approach is assessed on:**
35
+ - What problem it solves well
36
+ - Where it creates friction
37
+ - Realistic effort level
38
+
39
+ **Finally, one approach is recommended** — not hedged, not "it depends." A clear pick with a clear reason.
40
+
41
+ ---
42
+
43
+ ## Response Template
44
+
45
+ ```
46
+ ## Exploration: [Problem Statement]
47
+
48
+ Why we're looking at this:
49
+ [What's the actual friction being solved]
50
+
51
+ ────────────────────────────────────────
52
+
53
+ Approach 1 — [Name]
54
+ [What this is and how it works]
55
+
56
+ Where it wins:
57
+ › [Specific advantage 1]
58
+ › [Specific advantage 2]
59
+
60
+ Where it struggles:
61
+ › [Real tradeoff — not a vague concern]
62
+
63
+ Effort: ◼◼◽◽◽ (Low) | ◼◼◼◽◽ (Medium) | ◼◼◼◼◽ (High)
64
+
65
+ ────────────────────────────────────────
66
+
67
+ Approach 2 — [Name]
68
+ ...
69
+
70
+ ────────────────────────────────────────
71
+
72
+ Approach 3 — [Name]
73
+ ...
74
+
75
+ ────────────────────────────────────────
76
+
77
+ Verdict:
78
+ Approach [N] — because [specific reason tied to the user's stated constraints].
79
+
80
+ What direction should we go deeper on?
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Hallucination Guard
86
+
87
+ - No invented libraries or tools — every named option must be a real, documented choice
88
+ - No performance claims without a cited benchmark
89
+ - Every "pro" must be grounded in how this approach actually works — not wishful thinking
90
+ - Assumptions about the user's codebase are always labeled: `[ASSUMPTION — verify first]`
91
+
92
+ ---
93
+
94
+ ## Usage
95
+
96
+ ```
97
+ /brainstorm caching layer for a high-traffic API
98
+ /brainstorm auth approach for a multi-tenant SaaS
99
+ /brainstorm how to structure shared state in a large React app
100
+ ```
@@ -0,0 +1,86 @@
1
+ ---
2
+ description: Create new application command. Triggers App Builder skill and starts interactive dialogue with user.
3
+ ---
4
+
5
+ # /create — Build Something New
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command starts a structured creation process. Code only appears after requirements are clear and a plan is approved.
12
+
13
+ ---
14
+
15
+ ## The Four Stages
16
+
17
+ ### Stage 1 — Understand (not optional)
18
+
19
+ Before any planning begins, these four things must be established:
20
+
21
+ ```
22
+ 1. What is the user's actual goal? (not the feature — the outcome)
23
+ 2. What stack are we working in? (existing project or greenfield?)
24
+ 3. What is explicitly out of scope? (boundary prevents scope creep)
25
+ 4. What's the observable done state? (how do we know it's finished?)
26
+ ```
27
+
28
+ If anything is unclear → ask. Do not skip to Stage 2 on assumptions.
29
+
30
+ ### Stage 2 — Plan
31
+
32
+ Engage `project-planner` to write a structured plan:
33
+
34
+ ```
35
+ Location: docs/PLAN-{task-slug}.md
36
+
37
+ Must contain:
38
+ - Goal (one sentence)
39
+ - OOS list (what we won't build)
40
+ - Task table with: task / agent / dependency / done-condition
41
+ - Tribunal gate per task
42
+ ```
43
+
44
+ **The plan is shown to the user before any code is written.**
45
+
46
+ > ⏸️ "Here's the plan: `docs/PLAN-{slug}.md` — proceed?"
47
+ > Do not advance until explicitly confirmed.
48
+
49
+ ### Stage 3 — Build (Parallel agents, after approval)
50
+
51
+ | Layer | Agent | Review Gate |
52
+ |---|---|---|
53
+ | Data schema | `database-architect` | `/tribunal-database` |
54
+ | API & server | `backend-specialist` | `/tribunal-backend` |
55
+ | UI & components | `frontend-specialist` | `/tribunal-frontend` |
56
+ | Test coverage | `test-engineer` | `logic + test-coverage` |
57
+
58
+ Each agent's code goes through Tribunal before being shown to the user.
59
+
60
+ ### Stage 4 — Verify
61
+
62
+ ```
63
+ Did the code satisfy every done-condition from Stage 1? Y / N
64
+ Did all Tribunal reviewers return APPROVED? Y / N
65
+ Are untested paths labeled // TODO with an explanation? Y / N
66
+ ```
67
+
68
+ All three must be Y before the task is declared done.
69
+
70
+ ---
71
+
72
+ ## Hallucination Rules
73
+
74
+ - Every import must exist in the project's `package.json` or carry `// VERIFY: add to deps`
75
+ - No invented framework methods — `// VERIFY: check docs for this method` on any uncertain call
76
+ - No agent touches code outside its domain
77
+
78
+ ---
79
+
80
+ ## Usage
81
+
82
+ ```
83
+ /create a REST API with JWT auth
84
+ /create a React dashboard with real-time chart updates
85
+ /create a complete user onboarding flow (frontend + backend + DB)
86
+ ```
@@ -0,0 +1,104 @@
1
+ ---
2
+ description: Debugging command. Activates DEBUG mode for systematic problem investigation.
3
+ ---
4
+
5
+ # /debug — Root Cause Investigation
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command switches the AI into **investigation mode**. No fixes are suggested until the root cause is identified. No random changes. No guessing.
12
+
13
+ ---
14
+
15
+ ## The Investigation Contract
16
+
17
+ > "A fix without a root cause is a patch on a symptom. It will fail again."
18
+
19
+ The `debugger` agent follows this sequence without skipping steps:
20
+
21
+ ---
22
+
23
+ ## Investigation Sequence
24
+
25
+ **Collect evidence first:**
26
+ - Exact error text (full stack trace, not a summary)
27
+ - Minimum reproduction steps
28
+ - Last known-good state (commit, date, config)
29
+ - Recent changes (code, dependency updates, env vars, infrastructure)
30
+
31
+ **Map possible causes — label them honestly:**
32
+
33
+ ```
34
+ Cause A: [what it is] — Likelihood: High / Medium / Low
35
+ Cause B: [what it is] — Likelihood: High / Medium / Low
36
+ Cause C: [what it is] — Likelihood: High / Medium / Low
37
+ ```
38
+
39
+ Every entry labeled as a **hypothesis**, not a diagnosis.
40
+
41
+ **Test causes one at a time:**
42
+ Check one. Mark resolved or eliminated. Move to next. Never test two simultaneously.
43
+
44
+ **Find the root cause:**
45
+ The thing that, if changed, prevents the entire failure chain. Fixing a symptom doesn't count.
46
+
47
+ **Apply a targeted fix + prevent recurrence:**
48
+ One change. Then verify. Then add a regression test.
49
+
50
+ ---
51
+
52
+ ## Report Format
53
+
54
+ ```
55
+ ━━━ Debug Report ━━━━━━━━━━━━━━━━━━━━━━━
56
+
57
+ Symptom: [what the user sees]
58
+ Error: [exact message or trace]
59
+ Reproduced: [Yes | No | Sometimes]
60
+ Last working: [commit / date / known-good state]
61
+
62
+ ━━━ Hypotheses ━━━━━━━━━━━━━━━━━━━━━━━
63
+
64
+ H1 [High] — [cause and why it's likely]
65
+ H2 [Medium] — [cause and why it's possible]
66
+ H3 [Low] — [cause and why it's a stretch]
67
+
68
+ ━━━ Investigation ━━━━━━━━━━━━━━━━━━━
69
+
70
+ H1: checked [what was examined] → ✅ Confirmed root cause
71
+ H2: ruled out — [evidence against it]
72
+
73
+ ━━━ Root Cause ━━━━━━━━━━━━━━━━━━━━━
74
+
75
+ [Single sentence explaining WHY this happened]
76
+
77
+ ━━━ Fix ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
78
+
79
+ Before: [original code]
80
+ After: [corrected code]
81
+
82
+ Regression test: [what test was added to prevent this]
83
+ Similar patterns: [anywhere else in the codebase this might exist]
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Hallucination Guard
89
+
90
+ - Every hypothesis is explicitly labeled as a hypothesis — never as confirmed fact
91
+ - Proposed fixes only use real, documented APIs — `// VERIFY: check method exists` on uncertainty
92
+ - One change per fix — multi-file rewrites presented as "a debug session" are a red flag
93
+ - Debug logging added during investigation must be removed before the fix is presented
94
+
95
+ ---
96
+
97
+ ## Usage
98
+
99
+ ```
100
+ /debug TypeError: Cannot read properties of undefined
101
+ /debug API returns 500 only in production
102
+ /debug useEffect runs on every render instead of once
103
+ /debug login works locally but fails in CI
104
+ ```
@@ -0,0 +1,102 @@
1
+ ---
2
+ description: Deployment command for production releases. Pre-flight checks and deployment execution.
3
+ ---
4
+
5
+ # /deploy — Production Release
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command runs a structured, gate-enforced deployment sequence. Nothing reaches production without passing all three gates.
12
+
13
+ ---
14
+
15
+ ## The Non-Negotiable Rule
16
+
17
+ > **The Human Gate is never skipped.**
18
+ > Even if every automated gate passes, a human sees the deployment summary and explicitly approves before anything executes.
19
+
20
+ ---
21
+
22
+ ## Three-Gate Sequence
23
+
24
+ ### Gate 1 — Security Sweep
25
+
26
+ `security-auditor` scans all files in the deployment diff:
27
+
28
+ ```
29
+ Expected clean state:
30
+ ✅ No secrets or credentials in any changed file
31
+ ✅ No unparameterized query added
32
+ ✅ No new CVE-affected dependency introduced
33
+ ✅ No debug endpoints left active
34
+ ```
35
+
36
+ **If any Critical or High issue is found → deployment is blocked.**
37
+ The issue must be fixed and re-scanned before proceeding.
38
+
39
+ ### Gate 2 — Tribunal Verification
40
+
41
+ `/tribunal-full` runs on all changed code:
42
+
43
+ ```
44
+ ✅ logic-reviewer: APPROVED
45
+ ✅ security-auditor: APPROVED
46
+ ✅ dependency-reviewer: APPROVED
47
+ ✅ type-safety-reviewer: APPROVED
48
+ ```
49
+
50
+ **Any REJECTED verdict → deployment blocked.** Fix and re-review.
51
+
52
+ ### Gate 3 — Human Approval
53
+
54
+ A deployment summary is shown before execution:
55
+
56
+ ```
57
+ ━━━ Release Summary ━━━━━━━━━
58
+ Target: [staging | production]
59
+ Files changed: [N]
60
+ Security gate: ✅ Passed
61
+ Tribunal gate: ✅ All APPROVED
62
+ Tests: ✅ N passed
63
+
64
+ Rollback to: [previous tag / commit SHA]
65
+ Rollback time: [estimate]
66
+ DB-safe: [Yes | No — explain]
67
+
68
+ Proceed with deployment? (Y to execute | N to cancel)
69
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Rollback is a Prerequisite
75
+
76
+ Before any deployment executes, the rollback plan must be established:
77
+
78
+ ```
79
+ What does this roll back to? → [tag or SHA]
80
+ How long will rollback take? → [estimate]
81
+ Is the DB migration reversible? → Yes | No
82
+ Who gets notified on rollback? → [name or channel]
83
+ ```
84
+
85
+ No rollback plan = no deployment.
86
+
87
+ ---
88
+
89
+ ## Hallucination Guard
90
+
91
+ - No invented CLI flags — `# VERIFY: check docs for this flag` on any uncertain command
92
+ - All secrets via environment variables — never hardcoded in deploy configs
93
+ - All images tagged with a specific version — `latest` is forbidden in production configs
94
+
95
+ ---
96
+
97
+ ## Usage
98
+
99
+ ```
100
+ /deploy to staging
101
+ /deploy to production after staging validation
102
+ ```
@@ -0,0 +1,107 @@
1
+ ---
2
+ description: Add or update features in existing application. Used for iterative development.
3
+ ---
4
+
5
+ # /enhance — Extend What Exists
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command adds to or improves existing code without breaking what already works. Enhancement is not greenfield — the existing system shapes what can be done and how.
12
+
13
+ ---
14
+
15
+ ## First Rule: Read, Then Write
16
+
17
+ > Never modify code you haven't read.
18
+ > Never modify a function without checking what calls it.
19
+
20
+ The first step of every enhancement is a reading pass — not a writing pass.
21
+
22
+ ---
23
+
24
+ ## Enhancement Sequence
25
+
26
+ ### Step 1 — Map the Impact Zone
27
+
28
+ ```
29
+ Files to change: [list]
30
+ Functions affected: [list]
31
+ Callers of those: [list — these must remain unbroken]
32
+ Tests currently covering them: [list]
33
+ ```
34
+
35
+ This map must exist before any file is opened for editing.
36
+
37
+ ### Step 2 — Define What Changes vs What Stays
38
+
39
+ ```
40
+ Adding: [new capability being added]
41
+ Modifying: [existing behavior being changed]
42
+ Preserving: [things that must not change]
43
+ ```
44
+
45
+ Any change to a public interface (function signature, API response shape, exported type) triggers an update of all callers.
46
+
47
+ ### Step 3 — Implement Through Tribunal Gate
48
+
49
+ | Enhancement Type | Gate |
50
+ |---|---|
51
+ | Backend logic | `/tribunal-backend` |
52
+ | Frontend/UI | `/tribunal-frontend` |
53
+ | DB queries | `/tribunal-database` |
54
+ | Cross-domain | `/tribunal-full` |
55
+
56
+ The code goes through Tribunal before being shown.
57
+
58
+ ### Step 4 — Regression Safety Check
59
+
60
+ ```
61
+ Existing tests: ✅ still pass (none were broken)
62
+ New tests added: ✅ covering new behavior
63
+ Callers updated: ✅ if any interface changed
64
+ ```
65
+
66
+ All three must be true before the enhancement is considered complete.
67
+
68
+ ---
69
+
70
+ ## Response Template
71
+
72
+ ```
73
+ Enhancement: [What was added/changed]
74
+
75
+ Impact Zone:
76
+ Changed: [files]
77
+ Callers updated: [files, or "none — interface preserved"]
78
+
79
+ Tribunal result:
80
+ [reviewer]: [APPROVED | REJECTED — reason]
81
+
82
+ Regression risk:
83
+ 🟢 Low — new path only, no existing path changed
84
+ 🟡 Medium — shared code modified, callers reviewed
85
+ 🔴 High — interface changed, all callers updated
86
+
87
+ Changes:
88
+ [diff]
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Hallucination Guard
94
+
95
+ - **Read existing code before describing it** — never assume what a function does from its name
96
+ - **Preserved interfaces must stay identical** — adding a required parameter breaks every caller silently
97
+ - **Unknown patterns get `// VERIFY`** — never guess at a codebase convention
98
+
99
+ ---
100
+
101
+ ## Usage
102
+
103
+ ```
104
+ /enhance add pagination to the users list API endpoint
105
+ /enhance add rate limiting to all authentication routes
106
+ /enhance upgrade the search component to support filters
107
+ ```