tribunal-kit 2.4.3 → 2.4.5

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.
@@ -0,0 +1,9 @@
1
+ # Generator Pattern
2
+
3
+ **Purpose**: Produce structured output by filling a reusable template governed by quality rules.
4
+
5
+ ## Protocol
6
+ When a skill inherits this pattern, the agent is tasked with producing a specific formatted artifact (like a configuration file, documentation page, or scaffolding code).
7
+ 1. **Template Retrieval**: Locate and strictly adhere to the provided template structure (the "assets") defined by the specific skill.
8
+ 2. **Constraint Application**: Apply all quality rules and constraints (the "references") required by the skill while fleshing out the template.
9
+ 3. **No Halucination Formatting**: Do not invent new sections, alter the required Markdown/JSON structure, or add unauthorized commentary unless it fits directly into the predefined template slots.
@@ -0,0 +1,12 @@
1
+ # Inversion Pattern
2
+
3
+ **Purpose**: Interview the user before taking action.
4
+
5
+ ## Protocol
6
+ When a skill inherits this pattern, you MUST NOT proceed with execution immediately. Instead, rely on the "Socratic Gate". You must pause and ask the user questions using the following structured phases:
7
+ 1. **Identify Missing Context**: Evaluate the user's prompt against what is absolutely necessary to execute the skill.
8
+ 2. **Phase 1 (Goal & Constraints)**: Ask the user about the real outcome and any hard constraints.
9
+ 3. **Phase 2 (Out of Scope)**: Confirm what should explicitly NOT be done.
10
+ 4. **Phase 3 (Done Condition)**: Verify how you will know the task is completed.
11
+
12
+ You must receive explicit answers or a "do your best" override before writing code or executing substantive actions.
@@ -0,0 +1,9 @@
1
+ # Pipeline Pattern
2
+
3
+ **Purpose**: Link multiple execution steps together with explicit validation gates between them.
4
+
5
+ ## Protocol
6
+ When a skill inherits this pattern, the agent must execute its instructions sequentially and rigidly.
7
+ 1. **Step-by-Step Execution**: You must not skip steps or combine multiple distinct phases into a single massive generative output.
8
+ 2. **Validation Gates**: After completing Step N, you must validate that the output of Step N meets its success criteria before moving to Step N+1.
9
+ 3. **Halting**: If any gate fails validation, you must HALT the pipeline and either initiate an Error Recovery Protocol or report the failure to the user. Do not proceed with subsequent steps with broken inputs.
@@ -0,0 +1,13 @@
1
+ # Reviewer Pattern
2
+
3
+ **Purpose**: Evaluate code or content against a strict external checklist.
4
+
5
+ ## Protocol
6
+ When a skill inherits this pattern, the agent assumes the role of an evaluator. Do NOT generate novel content or fix the problem automatically unless explicitly instructed.
7
+ 1. **Checklist Enforcement**: You must read the evaluation checklist provided in the specific skill.
8
+ 2. **Review Output**: For every item in the checklist, determine if it passes or fails.
9
+ 3. **Severity Grading**: Group all findings by severity:
10
+ - **Critical**: Must fix before proceeding (e.g. security violations, build errors)
11
+ - **Warning**: Should fix (e.g. best practice violations, performance risks)
12
+ - **Info**: Stylistic or minor suggestions
13
+ 4. **Separation of Concerns**: Only evaluate the "what" (the checklist) based on the "how" (this standard format). Do not blur your own opinions into the checklist constraints.
@@ -0,0 +1,9 @@
1
+ # Tool Wrapper Pattern
2
+
3
+ **Purpose**: Package an external library's or CLI tool's conventions as on-demand, executable knowledge.
4
+
5
+ ## Protocol
6
+ When a skill inherits this pattern, the agent MUST NOT guess how to use the target tool. You are acting strictly as a wrapper for this specific utility.
7
+ 1. **Consult References**: Read the provided documentation, usage examples, or reference notes in the skill definitions BEFORE issuing any commands.
8
+ 2. **Strict Adherence**: Follow the rules defined in the skill exactly as written. Do not improvise flags, parameters, or endpoints that are not explicitly authorized by the reference.
9
+ 3. **Command Execution**: If the tool is a CLI command or Python script (e.g. `test_runner.py`), construct the command accurately based solely on the referenced conventions, execute it, and report the direct output.
@@ -72,7 +72,17 @@ def validate_payload(payload_data: dict, workspace_root: Path, agents_dir: Path)
72
72
 
73
73
 
74
74
  def build_worker_prompts(payload_data: dict, workspace_root: Path) -> list:
75
+ import subprocess
75
76
  prompts = []
77
+
78
+ ast_context = ""
79
+ try:
80
+ res = subprocess.run(["python", "-m", "code_review_graph", "review-delta"], cwd=workspace_root, capture_output=True, text=True)
81
+ if res.returncode == 0 and res.stdout.strip():
82
+ ast_context = "\n\n[AST Blast Radius Context]:\n" + res.stdout.strip()
83
+ except Exception as e:
84
+ logging.warning(f"code-review-graph failed: {e}")
85
+
76
86
  workers = payload_data.get("dispatch_micro_workers", [])
77
87
  for worker in workers:
78
88
  agent = worker.get("target_agent")
@@ -82,7 +92,7 @@ def build_worker_prompts(payload_data: dict, workspace_root: Path) -> list:
82
92
 
83
93
  prompt = f"--- MICRO-WORKER DISPATCH ---\n"
84
94
  prompt += f"Agent: {agent}\n"
85
- prompt += f"Context: {ctx}\n"
95
+ prompt += f"Context: {ctx}{ast_context}\n"
86
96
  prompt += f"Task: {task}\n"
87
97
  prompt += f"Attached Files: {', '.join(files) if files else 'None'}\n"
88
98
  prompt += "-----------------------------"
@@ -298,7 +308,30 @@ def main():
298
308
  if not validate_swarm_payload(payload_data, agents_dir):
299
309
  logging.error("Swarm payload validation failed.")
300
310
  sys.exit(1)
311
+
312
+ import subprocess
313
+ ast_context = ""
314
+ try:
315
+ res = subprocess.run(["python", "-m", "code_review_graph", "review-delta"], cwd=workspace_root, capture_output=True, text=True)
316
+ if res.returncode == 0 and res.stdout.strip():
317
+ ast_context = "\n\n[AST Blast Radius Context]:\n" + res.stdout.strip()
318
+ except Exception as e:
319
+ logging.warning(f"code-review-graph hook failed: {e}")
320
+
321
+ if ast_context:
322
+ items = payload_data.get("workers", payload_data) if isinstance(payload_data, dict) else payload_data
323
+ if isinstance(items, list):
324
+ for item in items:
325
+ if "context" in item:
326
+ item["context"] += ast_context
327
+ elif isinstance(items, dict) and "context" in items:
328
+ items["context"] += ast_context
329
+
301
330
  logging.info("Swarm payload validation successful.")
331
+ # Re-emit the enriched payload for downstream
332
+ if ast_context:
333
+ print("--- ENRICHED SWARM PAYLOAD ---")
334
+ print(json.dumps(payload_data, indent=2))
302
335
  else:
303
336
  # Legacy mode
304
337
  if not validate_payload(payload_data, workspace_root, agents_dir):
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: appflow-wireframe
3
+ description: Skill for the planner agent to generate deterministic application flows (Mermaid) and structural UI wireframes (Pseudo-XML) prior to code execution.
4
+ ---
5
+
6
+ # Appflow & Wireframing Skill
7
+
8
+ This skill empowers the planner agent to outline precise user journeys and screen layouts directly in `PLAN-{slug}.md` files. The output must be perfectly readable by humans and easily parsed by downstream code generation agents (like `frontend-specialist`).
9
+
10
+ ## Phase 1: App Flow Mapping (Mermaid.js)
11
+
12
+ Before creating wireframes, you must map the logical user journey using a Mermaid.js flowchart.
13
+
14
+ ### Rules for Flows:
15
+ - Use `mermaid` blocks with `flowchart TD` (Top-to-Down) or `LR` (Left-to-Right).
16
+ - Focus strictly on state transitions, conditional logic, auth barriers, and API boundaries.
17
+ - Label all decision edges clearly.
18
+
19
+ **Example:**
20
+ ```mermaid
21
+ flowchart TD
22
+ Start([User visits /checkout]) --> Auth{Is Logged In?}
23
+ Auth -- No --> Redirect[Send to /login?return=/checkout]
24
+ Auth -- Yes --> Validate{Cart Not Empty?}
25
+ Validate -- No --> ShowEmpty[Render EmptyCart component]
26
+ Validate -- Yes --> ShowCheckout[Render CheckoutLayout]
27
+ ```
28
+
29
+ ## Phase 2: Semantic Wireframing (Pseudo-XML) & UI Accuracy
30
+
31
+ For mapping UI elements, NEVER use vague bullet points or basic ASCII art. You must use the **Tribunal Structural XML** format. This enforces a component-thinking mindset and provides 1:1 structural intent for the frontend agent.
32
+
33
+ ### Rules for UI Accuracy & Tokens:
34
+ To ensure the frontend agent translates the wireframe with pixel-perfect accuracy, you must use explicit spacing, typography, and layout generic tokens (based on a 4px grid) rather than vague words like "large" or "small".
35
+
36
+ - Use PascalCase for components (`<Sidebar>`, `<DataGrid>`, `<MetricCard>`).
37
+ - Define exact layout constraints: `layout="flex-col"`, `flex="1"`, `items="center"`, `justify="between"`.
38
+ - Define spacing using standard numeric scales (1 = 4px): `p="4"`, `gap="2"`, `m="8"`.
39
+ - Define typography explicit roles: `text="xs | sm | base | lg | xl | 2xl"`, `font="bold"`, `text-color="muted"`.
40
+ - Define explicit widths/heights: `w="full"`, `max-w="7xl"`, `h="100vh"`.
41
+ - Provide responsive breakpoints explicitly: `<Grid cols="1" md-cols="3">`.
42
+
43
+ **Example:**
44
+ ```xml
45
+ <Screen name="Checkout" layout="flex-row" max-w="7xl" mx="auto" p="4" md-p="8">
46
+ <MainColumn layout="flex-col" gap="8" flex="1">
47
+ <Section title="Shipping Details" text="xl" font="semibold">
48
+ <AddressForm fields="Name, Street, City, Zip" gap="4" />
49
+ </Section>
50
+ <Section title="Payment Method" text="xl" font="semibold">
51
+ <PaymentElement provider="Stripe" p="4" border="1" radius="md" />
52
+ </Section>
53
+ </MainColumn>
54
+
55
+ <SidebarColumn layout="sticky" w="full" md-w="96" p="6" bg="surface-variant" radius="lg">
56
+ <OrderSummary layout="flex-col" gap="4">
57
+ <CartList items="[CartContext]" />
58
+ <Divider />
59
+ <Subtotal layout="flex-row" justify="between" text="sm" text-color="muted" />
60
+ <Tax calculation="dynamic" layout="flex-row" justify="between" text="sm" text-color="muted" />
61
+ <Divider />
62
+ <Total layout="flex-row" justify="between" text="lg" font="bold" />
63
+ <Button action="submitCheckout" variant="primary" w="full" py="3" radius="md">Pay Now</Button>
64
+ </OrderSummary>
65
+ </SidebarColumn>
66
+ </Screen>
67
+ ```
68
+
69
+ ## Execution Checklist for the Planner:
70
+ - [ ] Has the logical flow been verified in the Mermaid graph?
71
+ - [ ] Does every screen mentioned in the flow have a corresponding `<Screen>` XML wireframe?
72
+ - [ ] Are the wireframe nodes purely structural (no hallucinated styles)?
@@ -26,6 +26,23 @@ applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
26
26
 
27
27
  ---
28
28
 
29
+ ## Skill Pattern Inheritance
30
+
31
+ The Tribunal Agent Kit supports 5 standard Agent Design Kit (ADK) base patterns.
32
+ To build a skill using a robust, tested agent behavior model, add `pattern: [pattern-name]` to the YAML frontmatter of your `SKILL.md`.
33
+
34
+ | Pattern | Value | When to use |
35
+ |---|---|---|
36
+ | **Inversion** | `pattern: inversion` | Forces the agent to interview the user (Socratic Gate) before acting. |
37
+ | **Reviewer** | `pattern: reviewer` | Evaluates artifacts against a checklist and severity levels. |
38
+ | **Tool Wrapper** | `pattern: tool-wrapper` | Strictly executes external CLI tools via provided documentation without guessing. |
39
+ | **Generator** | `pattern: generator` | Produces structured output (docs, boilerplate) by filling a rigid template. |
40
+ | **Pipeline** | `pattern: pipeline` | Executes sequential tasks with strict halting gates between steps. |
41
+
42
+ *Templates defining the specific rules for these patterns live in `.agent/patterns/`.*
43
+
44
+ ---
45
+
29
46
  ## README Template
30
47
 
31
48
  ```markdown
@@ -162,7 +162,12 @@ All spacing and sizing in multiples of 8:
162
162
  └── Adjust based on content density
163
163
  ```
164
164
 
165
- ### Key Sizing Principles
165
+ ### Key Sizing Principles & UI Building Accuracy
166
+
167
+ To guarantee pixel-perfect accuracy, you must enforce explicit building rules when passing designs to code:
168
+ 1. **Never Hallucinate Spacing:** Use exact numeric styling scales (e.g., a 4px grid: `p-4`, `gap-8`, `m-2`). Do NOT use vague terms like "large padding".
169
+ 2. **Explicit Layout Boundaries:** Always define `flex`, `grid`, and strict alignment. Never rely on browser auto-margins to guess structure.
170
+ 3. **Dimensions:** Explicitly define bounding boxes where applicable (`w-full`, `max-w-7xl`).
166
171
 
167
172
  | Element | Consideration |
168
173
  |---------|---------------|
@@ -113,6 +113,11 @@ Touch screens are wildly imprecise.
113
113
 
114
114
  ---
115
115
 
116
+ ## 📏 UI Building Accuracy
117
+
118
+ - **Mathematical Layouts:** Mobile layouts require mathematical precision to prevent layout shifts. You MUST use exact spacing multiples (e.g., 4px/8px grids).
119
+ - **Strict Containers:** Explicitly define `flex-1`, `align-items`, and `justify-content` on every view layer. Never let RN guess the intrinsic size.
120
+
116
121
  ## ⚡ Performance Extremis (Quick Reference)
117
122
 
118
123
  ### 120Hz Animation Mandate
@@ -184,9 +184,10 @@ Do not mark status as VERIFIED until concrete terminal evidence is provided.
184
184
 
185
185
  ### ❌ Forbidden AI Tropes in Next.js/React
186
186
 
187
- 1. **`"use client"` on everything** — do not convert Server Components to Client unless interaction/state is strictly required.
188
- 2. **`getServerSideProps` in App Router** — never hallucinate legacy Pages router data fetching in an App Router context.
189
- 3. **Unnecessary `useEffect` fetching** — always prefer Server Components or SWR/React Query for data fetching.
187
+ 1. **Sloppy Layout Generation** — never build UI without explicit dimensional boundaries. You MUST apply strict numeric design tokens (e.g. 4px grid spacing) and explicit flex/grid layouts.
188
+ 2. **`"use client"` on everything** — do not convert Server Components to Client unless interaction/state is strictly required.
189
+ 3. **`getServerSideProps` in App Router** — never hallucinate legacy Pages router data fetching in an App Router context.
190
+ 4. **Unnecessary `useEffect` fetching** — always prefer Server Components or SWR/React Query for data fetching.
190
191
  4. **Vercel clones** — do not default to generic black/white Vercel aesthetics unless instructed.
191
192
  5. **Missing `key` in maps** — always provide a unique, stable key. No using iteration index as the key.
192
193
 
@@ -83,9 +83,10 @@ Do not mark status as VERIFIED until concrete terminal evidence is provided.
83
83
  **Active reviewers: `logic` · `security` · `frontend` · `type-safety`**
84
84
 
85
85
  ### ❌ Forbidden AI Tropes in React
86
- 1. **Unnecessary `useEffect` Data Fetching** — never fetch raw data inside a `useEffect` if a framework pattern (Server Components, SWR, React Query) is available.
87
- 2. **Missing `key` in maps** — always provide a unique, stable key. No using iteration index as the key.
88
- 3. **Prop Drilling Nightmare** — avoid passing props more than 3 levels deep; use Context or atomic stores (Zustand) instead.
86
+ 1. **Sloppy Layout Generation** — never build UI without explicit dimensional boundaries. You MUST apply strict numeric design tokens (e.g. 4px grid spacing) and explicit flex/grid layouts.
87
+ 2. **Unnecessary `useEffect` Data Fetching** — never fetch raw data inside a `useEffect` if a framework pattern (Server Components, SWR, React Query) is available.
88
+ 3. **Missing `key` in maps** — always provide a unique, stable key. No using iteration index as the key.
89
+ 4. **Prop Drilling Nightmare** — avoid passing props more than 3 levels deep; use Context or atomic stores (Zustand) instead.
89
90
  4. **Over-Memoization** — do not slap `useMemo`/`useCallback` on everything prematurely. Only use it when profiling proves a performance bottleneck.
90
91
  5. **Class Components** — never hallucinate class `extends React.Component` or lifecycle methods (`componentDidMount`) in a modern React 18+ app unless explicitly requested for legacy migration.
91
92
 
@@ -155,6 +155,11 @@ Do not rely on Javascript to toggle simple dark modes if it can be avoided. Medi
155
155
 
156
156
  ---
157
157
 
158
+ ## UI Building Accuracy (MANDATORY)
159
+ - **Mathematical Spacing:** Tailwind is a constraint system. You MUST use exact 4px grid steps (`p-4`, `gap-6`, `my-2`) to implement UI. Never guess spacing.
160
+ - **Explicit Layouts:** Every container must have explicit layout boundaries (`flex items-center justify-between` or `grid cols-3 gap-4`).
161
+ - **Boundaries:** Define constraints heavily (`w-full`, `max-w-screen-xl`, `overflow-hidden`).
162
+
158
163
  ## Performance Rules
159
164
  - **Layer Splitting:** `@layer components` and `@layer utilities` prevent specificity issues and allow Tailwind's engine to order CSS correctly.
160
165
  - **Do not install plugins without measuring:** Heavy plugins (like unpruned icon libraries) destroy CSS parsing times.
@@ -36,6 +36,7 @@ Focus on:
36
36
  - **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
37
37
  - **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
38
38
  - **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
39
+ - **UI Building Accuracy (MANDATORY)**: You must translate layouts with mathematical precision using strict numeric tokens (4px grid). Every layout must have explicitly defined `flex`/`grid` containers, alignment boundaries, and exact spacing. No vague "auto" spacing unless mathematically intended.
39
40
  - **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
40
41
 
41
42
  **NEVER** use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
@@ -100,9 +100,10 @@ Do not mark status as VERIFIED until concrete terminal evidence is provided.
100
100
  **Active reviewers: `logic` · `security` · `frontend` · `type-safety`**
101
101
 
102
102
  ### ❌ Forbidden AI Tropes in Vue
103
- 1. **Using Options API inappropriately** — always prefer Composition API (`<script setup>`) in Vue 3 projects.
104
- 2. **Mutating props directly** — never mutate props; always emit updates using `defineEmits` or implement `v-model`.
105
- 3. **Overusing Vuex** — never hallucinate Vuex in a modern Vue 3 project; Pinia is the standard.
103
+ 1. **Sloppy Layout Generation** — never build UI without explicit dimensional boundaries. You MUST apply strict numeric design tokens (e.g. 4px grid spacing) and explicit flex/grid layouts.
104
+ 2. **Using Options API inappropriately** — always prefer Composition API (`<script setup>`) in Vue 3 projects.
105
+ 3. **Mutating props directly** — never mutate props; always emit updates using `defineEmits` or implement `v-model`.
106
+ 4. **Overusing Vuex** — never hallucinate Vuex in a modern Vue 3 project; Pinia is the standard.
106
107
  4. **Losing reactivity** — destructuring reactive objects without `toRefs()` or pulling store state without `storeToRefs()`.
107
108
  5. **Missing `key` in `v-for`** — always provide a unique, stable key. No using iteration index as the key.
108
109
 
package/README.md CHANGED
@@ -1,191 +1,161 @@
1
- <div align="center">
2
-
3
- # 🏛️ Tribunal Anti-Hallucination Agent Kit
4
-
5
- **The ultimate guardrail system for AI IDEs (Cursor, Windsurf, Antigravity)**
6
-
7
- [![npm version](https://img.shields.io/npm/v/tribunal-kit.svg?style=flat-square)](https://www.npmjs.com/package/tribunal-kit)
8
- [![license](https://img.shields.io/npm/l/tribunal-kit.svg?style=flat-square)](https://github.com/your-repo/tribunal-kit/blob/main/LICENSE)
9
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
10
-
11
- A plug-in `.agent/` folder that upgrades your AI with **32 specialist agents**, **25 slash commands**, **8 parallel Tribunal reviewers**, and a powerful **Swarm/Supervisor** multi-agent orchestration engine.
12
-
13
- </div>
14
-
15
- ---
16
-
17
- ## ⚡ Quick Install
18
-
19
- Get started in seconds:
20
-
21
- ```bash
22
- npx tribunal-kit init
23
- ```
24
-
25
- Or install globally to use on any project:
26
-
27
- ```bash
28
- npm install -g tribunal-kit
29
- tribunal-kit init
30
- ```
31
-
32
- > **Note:** This installs the `.agent/` folder containing all agents, workflows, skills, and scripts directly into your project.
33
-
34
- ---
35
-
36
- ## ⚠️ Important: `.gitignore` Notice
37
-
38
- If you use AI-powered editors like **Cursor** or **Windsurf**, adding `.agent/` to your `.gitignore` may prevent the IDE from indexing the workflows. Slash commands like `/generate` or `/review` won't appear in your chat suggestion dropdown.
39
-
40
- 💡 **Recommended:** Keep `.agent/` out of `.gitignore`.
41
- If you want it to remain local-only, add it to your repo's exclude file instead:
42
- ```bash
43
- # Add this to .git/info/exclude (not .gitignore)
44
- .agent/
45
- ```
46
-
47
- ---
48
-
49
- ## 📦 What's Included
50
-
51
- | Component | Count | Description |
52
- |---|:---:|---|
53
- | 🤖 **Agents** | **32** | Specialist AI personas including Supervisor, Worker Registry, and Contract schemas |
54
- | 🔄 **Workflows**| **25** | Slash command procedures including `/swarm` orchestration |
55
- | 🧠 **Skills** | **44** | Domain-specific knowledge modules for targeted expertise |
56
- | 🛠️ **Scripts** | **13** | Python utility scripts (checklist, verify, preview, session, swarm dispatcher, etc.) |
57
-
58
- ---
59
-
60
- ## ⚙️ How It Works
61
-
62
- ### 🎯 Auto-Agent Routing
63
- No need to mention agents explicitly. The system automatically detects and summons the right specialist for the job:
64
-
65
- > **You:** "Add JWT authentication" <br>
66
- > **AI:** `🤖 Applying @security-auditor + @backend-specialist...`
67
- >
68
- > **You:** "Fix the dark mode button" <br>
69
- > **AI:** `🤖 Applying @frontend-specialist...`
70
- >
71
- > **You:** "Login returns 500 error" <br>
72
- > **AI:** `🤖 Applying @debugger for systematic analysis...`
73
- >
74
- > **You:** "/swarm build a REST API, PostgreSQL schema, and documentation" <br>
75
- > **AI:** `🤖 supervisor-agent → dispatching 3 Workers in parallel...`
76
-
77
- ### ⚖️ The Tribunal Pipeline
78
- Every piece of generated code goes through rigorous, parallel reviewers before you even see it:
79
-
80
- ```
81
- You type /generate →
82
- Maker generates at low temperature →
83
- Reviewers audit in parallel (logic, security, types, ...) →
84
- Human Gate: you approve the diff before it writes to disk
85
- ```
86
-
87
- ---
88
-
89
- ## ⌨️ Slash Commands
90
-
91
- Supercharge your workflow with these built-in commands:
92
-
93
- <details open>
94
- <summary><b>🛠️ Core Execution</b></summary>
95
- <br>
96
-
97
- | Command | Description |
98
- |---|---|
99
- | `/generate` | Full Tribunal pipeline: generate → review → approve |
100
- | `/create` | Build new features or apps from scratch |
101
- | `/enhance` | Improve existing code safely without breaking it |
102
- | `/deploy` | 3-gate production deployment process |
103
-
104
- </details>
105
-
106
- <details open>
107
- <summary><b>⚖️ Review & Audit</b></summary>
108
- <br>
109
-
110
- | Command | Description |
111
- |---|---|
112
- | `/review` | Audit existing code — no generation |
113
- | `/test` | Generate or audit tests |
114
- | `/tribunal-full` | Run all 8 reviewers simultaneously |
115
- | `/tribunal-backend` | Logic + Security + Dependency + Types |
116
- | `/tribunal-frontend` | Logic + Security + Frontend + Types |
117
- | `/tribunal-database`| Logic + Security + SQL |
118
- | `/tribunal-mobile` | Logic + Security + Mobile (React Native, Flutter, Web) |
119
- | `/tribunal-performance`| Logic + Performance (Optimization & bottlenecks) |
120
-
121
- </details>
122
-
123
- <details open>
124
- <summary><b>🧠 Planning & Orchestration</b></summary>
125
- <br>
126
-
127
- | Command | Description |
128
- |---|---|
129
- | `/brainstorm` | Explore options before implementation |
130
- | `/plan` | Create a structured architectural plan file only |
131
- | `/orchestrate` | Multi-agent coordination for complex tasks |
132
- | `/swarm` | Supervisor decomposes multi-domain goals → parallel Workers → unified output |
133
- | `/ui-ux-pro-max` | Advanced UI/UX design workflow |
134
-
135
- </details>
136
-
137
- <details open>
138
- <summary><b>🔧 Troubleshooting & Ops</b></summary>
139
- <br>
140
-
141
- | Command | Description |
142
- |---|---|
143
- | `/debug` | Systematic root-cause investigation |
144
- | `/preview` | Local dev server control |
145
- | `/status` | Tribunal session dashboard |
146
-
147
- </details>
148
-
149
- ---
150
-
151
- ## 💻 CLI Reference
152
-
153
- Manage your installation directly from the terminal:
154
-
155
- ```bash
156
- tribunal-kit init # Install into current directory
157
- tribunal-kit init --force # Overwrite existing .agent/ folder
158
- tribunal-kit init --path ./my-app # Install in specific directory
159
- tribunal-kit init --quiet # Suppress output (for CI/CD)
160
- tribunal-kit init --dry-run # Preview without writing files
161
- tribunal-kit update # Re-install to get latest version
162
- tribunal-kit status # Check installation status
163
- ```
164
-
165
- ---
166
-
167
- ## 🧰 Utility Scripts *(Post-install)*
168
-
169
- ```bash
170
- python .agent/scripts/checklist.py . # 📋 Pre-commit audit
171
- python .agent/scripts/verify_all.py # 🚀 Pre-deploy full suite
172
- python .agent/scripts/auto_preview.py start # 🌍 Start dev server
173
- python .agent/scripts/session_manager.py save "note" # 💾 Save session state
174
- ```
175
-
176
- ---
177
-
178
- ## 🤝 Compatible IDEs
179
-
180
- | IDE | Support Level |
181
- |---|---|
182
- | **Cursor** | ✅ Reads `.agent/` automatically |
183
- | **Windsurf** | ✅ Reads `.agent/` automatically |
184
- | **Antigravity** | ✅ Native `.agent/` support |
185
- | **GitHub Copilot** | ✅ Manual setup: Copy `GEMINI.md` to `.github/copilot-instructions.md` |
186
-
187
- <br>
188
-
189
- <div align="center">
190
- <sub>Built with ❤️ for safer, hallucination-free AI coding.</sub>
191
- </div>
1
+ <div align="center">
2
+ <picture>
3
+ <img src="./docs/image.png" alt="Tribunal Kit Logo" width="300">
4
+ </picture>
5
+
6
+ <h1><b>TRIBUNAL—KIT</b></h1>
7
+
8
+ <p><code>&lt; ZERO_HALLUCINATION_PROTOCOL /&gt;</code></p>
9
+
10
+ <p>
11
+ <b>The ultimate guardrail system for AI-assisted coding.</b><br>
12
+ Built for <i>Cursor</i>, <i>Windsurf</i>, and <i>Antigravity</i>.
13
+ </p>
14
+
15
+ [![NPM](https://img.shields.io/npm/v/tribunal-kit?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/tribunal-kit)
16
+ [![License](https://img.shields.io/badge/License-MIT-8b5cf6?style=for-the-badge)](LICENSE)
17
+ </div>
18
+
19
+ <br><br>
20
+
21
+ > 🚨 **AI GENERATES CODE. TRIBUNAL ENSURES IT WORKS.**
22
+ > A plug-in `.agent/` intelligence payload that upgrades your IDE with **32 specialist agents**, **25 slash commands**, **8 parallel Tribunal reviewers**, and a core **Swarm/Supervisor** engine.
23
+
24
+ ---
25
+
26
+ <br>
27
+
28
+ ## ▓▒░ INITIATION SEQUENCE
29
+
30
+ Drop Tribunal into any project. Global or local.
31
+
32
+ ```bash
33
+ # Pull the intelligence payload into your project
34
+ npx tribunal-kit init
35
+ ```
36
+ *(Installs the `.agent/` architecture directly. No bloat. Pure capability.)*
37
+
38
+ > ⚠️ **CRITICAL PATH WARNING:** Do **not** let your IDE ignore the agents. If using Cursor or Windsurf, keep `.agent/` **out** of `.gitignore` so the IDE can index the commands. Use `.git/info/exclude` instead.
39
+
40
+ <br>
41
+
42
+ ## ▓▒░ THE PIPELINE // HOW IT WORKS
43
+
44
+ **Code generation is solved. Code correctness is the frontier.** We enforce a strict **Evidence-Based Closeout**.
45
+
46
+ ```diff
47
+ - AI Generates -> Commits to Disk -> You Find Bugs Later
48
+ + AI Generates -> Parallel Tribunal Review -> Human Gate -> Commits to Disk
49
+ ```
50
+
51
+ ### 🎯 Auto-Routing Intelligence
52
+ No manual tagging required. The system self-organizes.
53
+
54
+ <p>
55
+ <kbd>User</kbd> "Add JWT authentication" <br>
56
+ <kbd>System</kbd> <code>🤖 Applying @security-auditor + @backend-specialist...</code> <br><br>
57
+
58
+ <kbd>User</kbd> "Fix the dark mode button" <br>
59
+ <kbd>System</kbd> <code>🤖 Applying @ui-ux-pro-max + @frontend-specialist...</code> <br><br>
60
+
61
+ <kbd>User</kbd> "/swarm build a API" <br>
62
+ <kbd>System</kbd> <code>🤖 supervisor-agent → Dispatching 3 Workers...</code>
63
+ </p>
64
+
65
+ <br>
66
+
67
+ ## ▓▒░ CAPABILITY MATRIX
68
+
69
+ | System Asset | Count | Operational Scope |
70
+ | :--- | :---: | :--- |
71
+ | 🤖 **Agents** | `32` | Specialist personas (Security, DB Architect, DevOps Responder) |
72
+ | 🧠 **Skills** | `44` | Domain modules (Edge Computing, Red Team Tactics, WebXR) |
73
+ | ⚡ **Workflows** | `25` | Slash command procedures including `/swarm` orchestration |
74
+ | 🛠️ **Scripts** | `13` | CI/CD, linting, payload dispatching, test suite runners |
75
+
76
+ <br>
77
+
78
+ ## ▓▒░ COMMAND TERMINAL
79
+
80
+ Expand the accordions to view the operational commands at your disposal.
81
+
82
+ <details open>
83
+ <summary><b>🔥 CORE EXECUTION</b></summary>
84
+ <br>
85
+
86
+ | Command | Action |
87
+ | :--- | :--- |
88
+ | <code>/generate</code> | Trigger full Tribunal: Generate → Audit → Approve. |
89
+ | <code>/create</code> | Scaffold major features or apps, routed by App Builder. |
90
+ | <code>/enhance</code> | Safely extend existing structures without regression. |
91
+ | <code>/deploy</code> | Force the 3-gate production release sequence. |
92
+
93
+ </details>
94
+
95
+ <details>
96
+ <summary><b>⚖️ THE TRIBUNAL GAUNTLET (REVIEWERS)</b></summary>
97
+ <br>
98
+ Unleash parallel reviewers on existing code.
99
+
100
+ | Command | Action |
101
+ | :--- | :--- |
102
+ | <code>/review</code> | Audit code for silent degradation and logic holes. |
103
+ | <code>/tribunal-full</code> | Unleash **ALL 8** reviewers simultaneously. Maximum scrutiny. |
104
+ | <code>/tribunal-backend</code> | Summons <code>[ Logic + Security + Dependency + Types ]</code> |
105
+ | <code>/tribunal-frontend</code> | Summons <code>[ Logic + Security + Frontend + Types ]</code> |
106
+ | <code>/tribunal-database</code> | Summons <code>[ Logic + Security + SQL ]</code> |
107
+ | <code>/tribunal-mobile</code> | Summons <code>[ Logic + Security + Mobile ]</code> |
108
+
109
+ </details>
110
+
111
+ <details>
112
+ <summary><b>🧠 SWARM & ORCHESTRATION</b></summary>
113
+ <br>
114
+
115
+ | Command | Action |
116
+ | :--- | :--- |
117
+ | <code>/swarm</code> | Supervisor breaks goal sends to isolated workers → synthesizes. |
118
+ | <code>/orchestrate</code> | Manual multi-agent sync for complex integrations. |
119
+ | <code>/plan</code> | Architectural mapping before a single line is written. |
120
+ | <code>/ui-ux-pro-max</code>| Triggers peak aesthetic frontend design. |
121
+
122
+ </details>
123
+
124
+ <details>
125
+ <summary><b>🔧 TROUBLESHOOTING & OPS</b></summary>
126
+ <br>
127
+
128
+ | Command | Action |
129
+ | :--- | :--- |
130
+ | <code>/debug</code> | Systematic root-cause investigation. |
131
+ | <code>/preview</code> | Local development server control. |
132
+ | <code>/status</code> | View Tribunal session status. |
133
+
134
+ </details>
135
+
136
+ <br>
137
+
138
+ ## ▓▒░ POST-INSTALL TELEMETRY
139
+
140
+ After initialization, utility scripts unlock local ops:
141
+
142
+ ```bash
143
+ # 01. Pre-commit audit
144
+ python .agent/scripts/checklist.py .
145
+
146
+ # 02. Pre-deploy full suite verification
147
+ python .agent/scripts/verify_all.py
148
+
149
+ # 03. Start local development environment
150
+ python .agent/scripts/auto_preview.py start
151
+ ```
152
+
153
+ <br>
154
+
155
+ <div align="center">
156
+ <br>
157
+ <img src="https://img.shields.io/badge/Status-Active_&_Secured-00e5ff?style=for-the-badge" alt="Status" />
158
+ <br><br>
159
+ <i>"Never guess database column names. Error handling on every async function. Evidence-based closeouts. Welcome to the Tribunal."</i><br>
160
+ <sub><b>MIT Licensed</b> • Hand-forged for high-performance agentic engineering.</sub>
161
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tribunal-kit",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "description": "Anti-Hallucination AI Agent Kit — 33 specialist agents, 25 slash commands, Swarm/Supervisor engine, and Tribunal review pipeline for Cursor, Windsurf, and Antigravity.",
5
5
  "keywords": [
6
6
  "ai",