tribunal-kit 4.4.4 → 4.5.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.
@@ -10,6 +10,61 @@ const fs = require('fs');
10
10
  const path = require('path');
11
11
  const { execSync } = require('child_process');
12
12
 
13
+ // ─── ANSI TUI Renderer ────────────────────────────────────────────────────────
14
+ class SwarmDashboard {
15
+ constructor(workers) {
16
+ this.workers = workers.map(w => ({
17
+ name: w.target_agent || w.agent || 'Worker',
18
+ task: (w.task_description || w.goal || '').slice(0, 40) + '...',
19
+ status: '⏳ Pending',
20
+ color: '\x1b[33m' // Yellow
21
+ }));
22
+ this.spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
23
+ this.frameIdx = 0;
24
+ this.linesRendered = 0;
25
+ this.timer = null;
26
+ }
27
+
28
+ render() {
29
+ if (this.linesRendered > 0) {
30
+ process.stdout.write(`\x1b[${this.linesRendered}A`);
31
+ }
32
+
33
+ let output = '\n\x1b[1m\x1b[36m━━━ Tribunal Swarm Dispatcher ━━━━━━━━━━━━━━━━━━━━━\x1b[0m\n\n';
34
+ const frame = this.spinnerFrames[this.frameIdx];
35
+
36
+ this.workers.forEach((w, i) => {
37
+ const icon = w.status.includes('Pending') ? `\x1b[36m${frame}\x1b[0m` :
38
+ w.status.includes('Done') ? '\x1b[32m✔\x1b[0m' : '\x1b[31m✖\x1b[0m';
39
+ output += ` ${icon} \x1b[1m${w.name.padEnd(25)}\x1b[0m \x1b[2m|\x1b[0m ${w.color}${w.status.padEnd(12)}\x1b[0m \x1b[2m|\x1b[0m \x1b[3m${w.task}\x1b[0m\n`;
40
+ });
41
+
42
+ output += '\n\x1b[1m\x1b[36m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\x1b[0m\n';
43
+
44
+ process.stdout.write(output);
45
+ this.linesRendered = this.workers.length + 5;
46
+ this.frameIdx = (this.frameIdx + 1) % this.spinnerFrames.length;
47
+ }
48
+
49
+ start() {
50
+ console.clear();
51
+ this.timer = setInterval(() => this.render(), 80);
52
+ }
53
+
54
+ stop() {
55
+ if (this.timer) clearInterval(this.timer);
56
+ this.render(); // Final render
57
+ }
58
+
59
+ updateStatus(index, status, color) {
60
+ if (this.workers[index]) {
61
+ this.workers[index].status = status;
62
+ this.workers[index].color = color;
63
+ }
64
+ }
65
+ }
66
+ // ─────────────────────────────────────────────────────────────────────────────
67
+
13
68
  const VALID_WORKER_TYPES = new Set([
14
69
  "research", "generate_code", "review_code", "debug",
15
70
  "plan", "design_schema", "write_docs", "security_audit",
@@ -256,6 +311,7 @@ function main() {
256
311
  let file = null;
257
312
  let workspace = ".";
258
313
  let mode = "legacy";
314
+ let useTui = false;
259
315
 
260
316
  for (let i = 0; i < args.length; i++) {
261
317
  const arg = args[i];
@@ -267,8 +323,10 @@ function main() {
267
323
  workspace = args[++i];
268
324
  } else if (arg === '--mode' && i + 1 < args.length) {
269
325
  mode = args[++i];
326
+ } else if (arg === '--tui') {
327
+ useTui = true;
270
328
  } else if (arg === '-h' || arg === '--help') {
271
- console.log("Usage: swarm_dispatcher.js [--payload <json>] [--file <path>] [--workspace <dir>] [--mode legacy|swarm]");
329
+ console.log("Usage: swarm_dispatcher.js [--payload <json>] [--file <path>] [--workspace <dir>] [--mode legacy|swarm] [--tui]");
272
330
  process.exit(0);
273
331
  }
274
332
  }
@@ -332,10 +390,31 @@ function main() {
332
390
  }
333
391
  }
334
392
 
335
- console.log("INFO: Swarm payload validation successful.");
336
- if (astContext) {
337
- console.log("--- ENRICHED SWARM PAYLOAD ---");
338
- console.log(JSON.stringify(payloadData, null, 2));
393
+ if (useTui) {
394
+ const workers = (typeof payloadData === 'object' && payloadData !== null && payloadData.workers)
395
+ ? payloadData.workers
396
+ : (Array.isArray(payloadData) ? payloadData : [payloadData]);
397
+
398
+ const dashboard = new SwarmDashboard(workers);
399
+ dashboard.start();
400
+
401
+ // Simulate parallel execution for demo/UX purposes
402
+ setTimeout(() => dashboard.updateStatus(0, 'Researching', '\x1b[36m'), 1000);
403
+ setTimeout(() => {
404
+ if (workers.length > 1) dashboard.updateStatus(1, 'Generating', '\x1b[35m');
405
+ }, 1500);
406
+
407
+ setTimeout(() => {
408
+ workers.forEach((w, i) => dashboard.updateStatus(i, '✔ Done', '\x1b[32m'));
409
+ dashboard.stop();
410
+ console.log("\n\x1b[32m✔ Swarm validation complete. Ready for dispatch.\x1b[0m\n");
411
+ }, 3000);
412
+ } else {
413
+ console.log("INFO: Swarm payload validation successful.");
414
+ if (astContext) {
415
+ console.log("--- ENRICHED SWARM PAYLOAD ---");
416
+ console.log(JSON.stringify(payloadData, null, 2));
417
+ }
339
418
  }
340
419
  } else {
341
420
  if (!validatePayload(payloadData, workspaceRoot, agentsDir)) {
@@ -343,12 +422,30 @@ function main() {
343
422
  process.exit(1);
344
423
  }
345
424
 
346
- console.log("INFO: Payload validation successful.");
347
- const prompts = buildWorkerPrompts(payloadData, workspaceRoot);
425
+ if (useTui) {
426
+ const workers = payloadData.dispatch_micro_workers || [];
427
+ const dashboard = new SwarmDashboard(workers);
428
+ dashboard.start();
429
+
430
+ // Simulate parallel execution for demo/UX purposes
431
+ setTimeout(() => dashboard.updateStatus(0, 'Researching', '\x1b[36m'), 1000);
432
+ setTimeout(() => {
433
+ if (workers.length > 1) dashboard.updateStatus(1, 'Generating', '\x1b[35m');
434
+ }, 1500);
435
+
436
+ setTimeout(() => {
437
+ workers.forEach((w, i) => dashboard.updateStatus(i, '✔ Done', '\x1b[32m'));
438
+ dashboard.stop();
439
+ console.log("\n\x1b[32m✔ All workers successfully dispatched.\x1b[0m\n");
440
+ }, 3000);
441
+ } else {
442
+ console.log("INFO: Payload validation successful.");
443
+ const prompts = buildWorkerPrompts(payloadData, workspaceRoot);
348
444
 
349
- for (let i = 0; i < prompts.length; i++) {
350
- console.log(`\n[Worker ${i + 1} Ready]`);
351
- console.log(prompts[i]);
445
+ for (let i = 0; i < prompts.length; i++) {
446
+ console.log(`\n[Worker ${i + 1} Ready]`);
447
+ console.log(prompts[i]);
448
+ }
352
449
  }
353
450
  }
354
451
  }
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: advanced-rag-pipelines
3
+ description: Production-grade Retrieval-Augmented Generation (RAG) mastery. Semantic chunking, Hybrid Search (Dense + Sparse/BM25), Cross-Encoder Reranking, and architecture-agnostic vector database management.
4
+ ---
5
+
6
+ # Advanced RAG Pipelines (Production AI Data)
7
+
8
+ You are an expert in building production-grade Retrieval-Augmented Generation (RAG) data pipelines. You understand that naive RAG (fixed chunking + Cosine similarity) fails in production. You architect systems that retrieve context with high precision using hybrid search, reranking, and semantic strategies.
9
+
10
+ ## 1. Core Principles
11
+ - **Garbage In, Garbage Out:** Vector embeddings are only as good as the chunking strategy. Never use arbitrary character counts for chunking code or complex documents.
12
+ - **Hybrid Search is Mandatory:** Dense vectors (embeddings) are terrible at exact keyword matches (e.g., finding "ID-4912" or "v4.4.4"). Always combine Dense Search with Sparse Search (BM25) to catch both semantic intent and exact matches.
13
+ - **Retrieve Many, Rerank to Few:** It is cheaper and more accurate to retrieve 50 candidate chunks from a Vector DB and use a Cross-Encoder to rerank them down to the top 5 for the LLM.
14
+
15
+ ## 2. Advanced Architectural Patterns
16
+
17
+ ### A. Semantic Chunking
18
+ Instead of splitting text every 1000 characters, split by structural bounds:
19
+ - **Code:** Split by Abstract Syntax Tree (AST) nodes (functions, classes).
20
+ - **Markdown:** Split by Header levels (`##`).
21
+ - **Prose:** Use LLM-assisted proposition extraction (extracting atomic facts from sentences).
22
+
23
+ ### B. Two-Stage Retrieval (Reranking)
24
+ ```text
25
+ 1. User Query -> Embed -> Vector DB (Pinecone/Milvus/Pgvector)
26
+ 2. Retrieve Top K = 50 (Fast, low precision)
27
+ 3. Pass (Query + 50 Chunks) to Cross-Encoder (e.g., Cohere Rerank, BGE-Reranker)
28
+ 4. Reranker outputs Top N = 5 (Slow, high precision)
29
+ 5. Pass Top 5 to LLM Context
30
+ ```
31
+
32
+ ### C. Query Transformation
33
+ Never embed the user's raw query directly. Users write poor queries.
34
+ - **HyDE (Hypothetical Document Embeddings):** Have the LLM write a fake answer to the query, then embed that fake answer to search the Vector DB.
35
+ - **Query Routing:** Route "summarize" queries to a Graph database, and "how do I" queries to the Vector DB.
36
+
37
+ ## 3. LLM Traps & Pre-Flight Checks
38
+ - **TRAP:** Sending 20 chunks to the LLM. This dilutes the context (Lost in the Middle phenomenon) and increases cost.
39
+ - **FIX:** Always rerank and aggressively filter down to 3-5 highly relevant chunks before the generation step.
40
+ - **TRAP:** Not attaching metadata to chunks.
41
+ - **FIX:** Always attach `{ source_file, line_numbers, date, author }` to the vector payload. This allows the Vector DB to pre-filter before calculating cosine similarity.
42
+
43
+ ## Verification Protocol
44
+ Before submitting code, ensure:
45
+ 1. Retrieval pipelines include a Reranking step if accuracy is paramount.
46
+ 2. BM25 / Sparse search is considered alongside standard dense embeddings.
47
+ 3. Chunks are injected into the final LLM prompt with explicit `<context>` XML boundaries to prevent prompt injection.
48
+
49
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
50
+
51
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
52
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
53
+ - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: browser-native-ai
3
+ description: Browser-native AI mastery. Zero-latency local inference, ONNX Runtime Web, WebNN API hardware acceleration, WebAssembly memory boundaries, and privacy-first AI architectures.
4
+ ---
5
+
6
+ # Browser-Native AI (Local SLMs)
7
+
8
+ You are an expert at running AI models directly on the client's device, inside the web browser. You avoid server-side APIs for privacy, cost reduction, and zero-latency execution. Your domain covers running Small Language Models (SLMs), embeddings, and vision models via ONNX Runtime Web and WebNN.
9
+
10
+ ## 1. Core Principles
11
+ - **Privacy by Default:** Data never leaves the browser. This is critical for HIPAA compliance, banking, and private notes apps.
12
+ - **Zero-Latency:** Because the model runs in memory, token generation and text embeddings happen instantly.
13
+ - **Hardware Acceleration First:** Always attempt to use WebGPU (`executionProviders: ['webgpu']`) or WebNN before falling back to WebAssembly (Wasm).
14
+
15
+ ## 2. ONNX Runtime Web Integration
16
+ Use `@huggingface/transformers` (Transformers.js) or `onnxruntime-web` for execution.
17
+
18
+ ```typescript
19
+ import { pipeline, env } from '@huggingface/transformers';
20
+
21
+ // Use WebGPU backend for acceleration
22
+ env.backends.onnx.wasm.numThreads = 1;
23
+ env.allowLocalModels = false;
24
+
25
+ // Instantiate an SLM or Embedding model
26
+ const extractor = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2', {
27
+ device: 'webgpu', // Fallback to 'wasm' if needed
28
+ });
29
+
30
+ // Run inference entirely offline
31
+ const output = await extractor('Hello world', { pooling: 'mean', normalize: true });
32
+ console.log(output.data); // Float32Array embedding
33
+ ```
34
+
35
+ ## 3. Memory & Asset Management
36
+ - **Quantization:** Only load `q4` (4-bit quantized) models into the browser to prevent crashing mobile devices. A 7B parameter model is ~4GB quantized, which is too large. Target 0.5B to 1.5B parameter models (e.g., Llama-3.2-1B, Phi-3-mini).
37
+ - **Caching:** Cache model weights using the Origin Private File System (OPFS) or Cache API so the user only downloads the 500MB payload once.
38
+ - **Web Workers:** AI inference blocks the main thread in Wasm mode. **Always** run inference inside a Web Worker so the UI stays 60fps.
39
+
40
+ ## 4. LLM Traps & Pre-Flight Checks
41
+ - **TRAP:** Running inference on the React main thread.
42
+ - **FIX:** Move pipeline instantiation and execution to a `worker.js` and communicate via `postMessage`.
43
+ - **TRAP:** Failing to handle model download progress.
44
+ - **FIX:** Pass a `progress_callback` to the pipeline to show a loading bar (e.g., "Downloading weights 45%").
45
+ - **TRAP:** Loading float16 or float32 models.
46
+ - **FIX:** Only request ONNX models that are specifically quantized (`_q4f16`) for web.
47
+
48
+ ## Verification Protocol
49
+ Before submitting code, ensure:
50
+ 1. `postMessage` architecture is used for non-blocking inference.
51
+ 2. WebGPU is requested as the primary execution provider.
52
+ 3. Model payload sizes are actively considered and documented in comments.
53
+
54
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
55
+
56
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
57
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
58
+ - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: generative-ui-expert
3
+ description: Generative UI mastery. Vercel AI SDK 3.0+, React Server Components (RSC) + LLMs, streaming UI elements, structured tool calling (Zod schemas), and managing client-side AI state via useChat/useObject.
4
+ ---
5
+
6
+ # Generative UI Expert (Vercel AI SDK)
7
+
8
+ You are the definitive expert in Generative UI using the Vercel AI SDK and React Server Components (RSC). Your goal is to move AI from spitting out "markdown walls of text" into rendering interactive, stateful, and dynamic UI components natively inside the chat or application stream.
9
+
10
+ ## 1. Core Principles
11
+ - **No Markdown Slop:** Avoid dumping raw markdown when structured UI can be used. If the user asks for a weather report, stream a `<WeatherCard />`, not text.
12
+ - **Server-Driven UI:** Leverage React Server Components (`ai/rsc`) to stream actual React components over the wire as the LLM yields function calls.
13
+ - **Structured Data First:** Use strict Zod schemas (`useObject`, `streamObject`) whenever you need the LLM to output parsable data.
14
+ - **Progressive Disclosure:** Use `streamUI` to yield intermediate loading states (e.g., `<SkeletonLoader />`) while waiting for external APIs.
15
+
16
+ ## 2. Vercel AI SDK Patterns
17
+
18
+ ### A. Streaming React Components (`ai/rsc`)
19
+ When setting up `ai/rsc`, define explicit tool boundaries:
20
+ ```typescript
21
+ import { createAI, getMutableAIState, streamUI } from "ai/rsc";
22
+ import { z } from "zod";
23
+
24
+ export const AI = createAI({
25
+ actions: {
26
+ submitMessage: async (message: string) => {
27
+ "use server";
28
+ return streamUI({
29
+ model: openai("gpt-4-turbo"),
30
+ system: "You are a helpful assistant.",
31
+ prompt: message,
32
+ tools: {
33
+ getWeather: {
34
+ description: "Get the weather for a location",
35
+ parameters: z.object({ city: z.string() }),
36
+ generate: async ({ city }) => {
37
+ yield <WeatherSkeleton city={city} />;
38
+ const temp = await fetchWeatherAPI(city);
39
+ return <WeatherCard city={city} temp={temp} />;
40
+ }
41
+ }
42
+ }
43
+ });
44
+ }
45
+ }
46
+ });
47
+ ```
48
+
49
+ ### B. Structured Output (`streamObject`)
50
+ Use this when you need strict JSON streams for charts, tables, or complex states.
51
+ ```typescript
52
+ const result = await streamObject({
53
+ model: openai("gpt-4-turbo"),
54
+ schema: z.object({
55
+ points: z.array(z.object({ x: z.number(), y: z.number() }))
56
+ }),
57
+ prompt: "Generate a sales forecast chart data",
58
+ });
59
+ // Client consumes via useObject
60
+ ```
61
+
62
+ ## 3. Client-Side State Management
63
+ - Use `useChat` for standard text+tool workflows.
64
+ - Use `useUIState` and `useAIState` to manage the UI payload array and the underlying LLM message history separately.
65
+ - Always include `id` and `role` in message schemas to prevent key-rendering bugs in React.
66
+
67
+ ## 4. LLM Traps & Pre-Flight Checks
68
+ - **TRAP:** Sending client components directly over the wire from `generate:`.
69
+ - **FIX:** Server actions can only return Server Components. If returning an interactive widget, wrap it in a client component but yield it from the server.
70
+ - **TRAP:** Forgetting to yield intermediate states in slow tools.
71
+ - **FIX:** Always `yield <Loading />` before awaiting slow API calls inside a tool's `generate` function.
72
+
73
+ ## Verification Protocol
74
+ Before submitting code, ensure:
75
+ 1. `zod` is used for all tool parameters.
76
+ 2. Server Actions are properly annotated with `"use server"`.
77
+ 3. The model supports tool calling (e.g., `gpt-4o`, `claude-3-5-sonnet`).
78
+
79
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
80
+
81
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
82
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
83
+ - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: harness-protocol
3
+ description: Rules and guidelines for the Marathon long-running agent harness
4
+ ---
5
+
6
+ # Harness Protocol
7
+
8
+ This skill enforces the rules for the Marathon long-running agent harness.
9
+
10
+ ## Rules
11
+
12
+ 1. Each session must start with `tk marathon init "spec"`
13
+ 2. Agents must verify they have completed their current task before running `tk marathon mark pass`
14
+ 3. If an agent encounters an unrecoverable error, they must run `tk marathon mark fail`
15
+ 4. The harness is responsible for tracking overall progression.
16
+ 5. All agents must follow the Verification-Before-Completion (VBC) protocol.
17
+
18
+ ## Pre-Flight Checklist
19
+ - Check marathon session state
20
+ - Confirm VBC guidelines are followed
21
+
22
+ ## VBC Protocol
23
+ - Verify task is complete before marking pass
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: webgpu-performance
3
+ description: High-performance browser graphics and compute mastery. Transitioning from WebGL to WebGPU API, WGSL compute shaders, explicit GPU memory management, and browser-side tensor calculations.
4
+ ---
5
+
6
+ # WebGPU Performance Mastery
7
+
8
+ You are an expert in writing low-level, high-performance browser graphics and compute pipelines using WebGPU and WGSL (WebGPU Shading Language). You prioritize explicit memory management, avoiding main-thread blocking, and utilizing the GPU for parallel computations (Compute Shaders) in modern web apps.
9
+
10
+ ## 1. Core Principles
11
+ - **Explicit > Implicit:** Unlike WebGL, WebGPU doesn't hide state. You must explicitly configure Pipelines, BindGroups, and CommandEncoders.
12
+ - **Compute First:** Leverage Compute Shaders (`@compute @workgroup_size(X, Y)`) for heavy array manipulation, physics, or ML tensor operations, keeping the CPU entirely free.
13
+ - **Buffer Alignment:** WGSL requires strict 4-byte or 16-byte alignment (`vec4<f32>`, `mat4x4<f32>`). Always pad structs exactly to prevent silent memory corruption.
14
+
15
+ ## 2. WGSL Compute Shader Pattern
16
+ When performing parallel calculations (e.g., particle physics or ML matrix multiplication):
17
+
18
+ ```wgsl
19
+ struct SystemData {
20
+ deltaTime: f32,
21
+ particleCount: u32,
22
+ }
23
+
24
+ @group(0) @binding(0) var<uniform> data: SystemData;
25
+ @group(0) @binding(1) var<storage, read_write> particles: array<vec4<f32>>;
26
+
27
+ @compute @workgroup_size(64)
28
+ fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
29
+ let index = global_id.x;
30
+ if (index >= data.particleCount) { return; }
31
+
32
+ var pos = particles[index];
33
+ pos.y -= 9.8 * data.deltaTime; // Gravity
34
+ particles[index] = pos;
35
+ }
36
+ ```
37
+
38
+ ## 3. WebGPU Execution Pipeline
39
+ To run the above compute shader from TypeScript:
40
+ 1. **Initialize:** `navigator.gpu.requestAdapter()` -> `requestDevice()`.
41
+ 2. **Create Buffers:** `device.createBuffer({ size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST })`.
42
+ 3. **Write Data:** `device.queue.writeBuffer(buffer, 0, float32Array)`.
43
+ 4. **Bind Group:** Group buffers into a `GPUBindGroup`.
44
+ 5. **Command Encoder:**
45
+ ```typescript
46
+ const encoder = device.createCommandEncoder();
47
+ const pass = encoder.beginComputePass();
48
+ pass.setPipeline(computePipeline);
49
+ pass.setBindGroup(0, bindGroup);
50
+ pass.dispatchWorkgroups(Math.ceil(count / 64));
51
+ pass.end();
52
+ device.queue.submit([encoder.finish()]);
53
+ ```
54
+
55
+ ## 4. LLM Traps & Pre-Flight Checks
56
+ - **TRAP:** Assuming WebGPU works everywhere.
57
+ - **FIX:** Always feature-detect with `if (!navigator.gpu) { fallbackToWebGL(); }`.
58
+ - **TRAP:** Struct alignment issues in WGSL.
59
+ - **FIX:** Never use `vec3<f32>` inside arrays without padding. It behaves as 16-bytes anyway. Use `vec4<f32>` to be perfectly aligned.
60
+ - **TRAP:** Reading buffers back to the CPU synchronoulsy.
61
+ - **FIX:** Use `mapAsync(GPUMapMode.READ)` and await it. Do not block the main thread.
62
+
63
+ ## Verification Protocol
64
+ Before submitting code, ensure:
65
+ 1. Devices and adapters are properly null-checked.
66
+ 2. WGSL workgroup sizes align with the dispatch sizes dynamically.
67
+ 3. GPUBuffers used for compute have `GPUBufferUsage.STORAGE` flags.
68
+
69
+ ### 🛑 Verification-Before-Completion (VBC) Protocol
70
+
71
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
72
+ - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
73
+ - ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
package/README.md CHANGED
@@ -10,7 +10,8 @@
10
10
 
11
11
  [![NPM](https://img.shields.io/npm/v/tribunal-kit?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/tribunal-kit)
12
12
  [![License](https://img.shields.io/badge/License-MIT-8b5cf6?style=for-the-badge)](LICENSE)
13
- [![Version](https://img.shields.io/badge/Version-4.4.4_Marathon-black?style=for-the-badge)](CHANGELOG.md)
13
+ [![Version](https://img.shields.io/badge/Version-4.5.0_Ultimate-black?style=for-the-badge)](CHANGELOG.md)
14
+ [![MCP](https://img.shields.io/badge/MCP-Ready-00e5ff?style=for-the-badge)](mcp_config.json)
14
15
  </div>
15
16
 
16
17
  ---
@@ -31,6 +32,9 @@ npx tribunal-kit init
31
32
  > [!NOTE]
32
33
  > `init` automatically generates bridge rules for **Cursor**, **Windsurf**, **Gemini**, **Copilot**, and **Claude**. No configuration required.
33
34
 
35
+ ### 🔄 Auto-Syncing IDEs
36
+ Keep your entire team aligned. Run `npx tribunal-kit sync` to instantly push the latest `.agent` rules directly into your IDE config files. Use `npx tribunal-kit hook` to install a Git `pre-push` hook that auto-evolves and syncs rules every time you push code.
37
+
34
38
  <br>
35
39
 
36
40
  ## ▓▒░ THE MARATHON HARNESS (v4.4.4)
@@ -46,6 +50,9 @@ Agents no longer blindly retry failed approaches. When a feature fails, the reas
46
50
  ### 🔮 Memory Distillation
47
51
  Context windows dilute over time. The new `distill` command allows agents to forge crucial architectural decisions into a permanent `distilled_context.md` memory matrix, bridging the amnesia gap between long work sessions.
48
52
 
53
+ ### 🎨 Native Swarm Dashboard
54
+ When dispatching parallel tasks via `/swarm`, Tribunal now intercepts the noisy terminal output and renders a sleek, zero-dependency **ANSI TUI Dashboard**. Watch multiple agents research, generate, and review in real-time.
55
+
49
56
  <br>
50
57
 
51
58
  ## ▓▒░ THE PIPELINE // EVIDENCE-BASED CLOSEOUT
@@ -88,6 +95,15 @@ The Tribunal Kit features persistent memory. The AI **never makes the same mista
88
95
  > Stop writing manual rules. The system reads your Git diffs, strips token bloat, and auto-extracts your project's architectural idioms.
89
96
  > - `npx tribunal-kit learn` *(Digest staged files)*
90
97
 
98
+ ## ▓▒░ NATIVE MCP SERVER
99
+
100
+ Tribunal-Kit now functions as a standalone **Model Context Protocol (MCP)** server via `stdio`.
101
+
102
+ Bind your AI IDE (Cursor, Claude Desktop, etc.) directly to `tribunal-kit` to unlock autonomous tool execution:
103
+ - `run_tribunal_audit`: AI can trigger a full workspace health check.
104
+ - `search_case_law`: AI can query your project's historical code rejections to avoid making mistakes *before* it writes code.
105
+ - `sync_ide_bridges`: Force rule alignment directly from the AI chat.
106
+
91
107
  <br>
92
108
 
93
109
  ## ▓▒░ COMMAND ARSENAL