tribunal-kit 5.8.2 → 5.8.4

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 (101) hide show
  1. package/.agent/ARCHITECTURE.md +12 -12
  2. package/.agent/agents/complexity-reviewer.md +53 -0
  3. package/.agent/agents/precedence-reviewer.md +12 -12
  4. package/.agent/agents/swarm-worker-registry.md +3 -3
  5. package/.agent/history/integrity_manifest.json +958 -0
  6. package/.agent/history/memory/.memory.idx +305 -1
  7. package/.agent/history/memory/MEMORY.md +21 -1
  8. package/.agent/rules/GEMINI.md +31 -28
  9. package/.agent/scripts/case_law_manager.js +3 -15
  10. package/.agent/scripts/context_broker.js +3 -1
  11. package/.agent/scripts/guardrail_engine.js +643 -0
  12. package/.agent/scripts/integrity_manifest.js +486 -0
  13. package/.agent/scripts/signal_detector.js +1 -1
  14. package/.agent/scripts/skill_evolution.js +3 -15
  15. package/.agent/scripts/skill_integrator.js +2 -12
  16. package/.agent/scripts/swarm_dispatcher.js +2 -12
  17. package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
  18. package/.agent/skills/60fps-animation/SKILL.md +78 -0
  19. package/.agent/skills/accessible-animation/SKILL.md +86 -0
  20. package/.agent/skills/adapt/SKILL.md +75 -0
  21. package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
  22. package/.agent/skills/animation-systems/SKILL.md +69 -0
  23. package/.agent/skills/antfu-conventions/SKILL.md +74 -0
  24. package/.agent/skills/app-builder/SKILL.md +1 -1
  25. package/.agent/skills/apple-design/SKILL.md +108 -0
  26. package/.agent/skills/audit-and-fix/SKILL.md +83 -0
  27. package/.agent/skills/baseline-ui/SKILL.md +74 -0
  28. package/.agent/skills/better-colors/SKILL.md +124 -0
  29. package/.agent/skills/better-typography/SKILL.md +111 -0
  30. package/.agent/skills/better-ui/SKILL.md +102 -0
  31. package/.agent/skills/bolder/SKILL.md +68 -0
  32. package/.agent/skills/build-primitive/SKILL.md +70 -0
  33. package/.agent/skills/clarify/SKILL.md +75 -0
  34. package/.agent/skills/cobejs/SKILL.md +96 -0
  35. package/.agent/skills/codebase-design/SKILL.md +84 -0
  36. package/.agent/skills/colorize/SKILL.md +77 -0
  37. package/.agent/skills/compact-landing/SKILL.md +70 -0
  38. package/.agent/skills/company-logos/SKILL.md +73 -0
  39. package/.agent/skills/create-design-md/SKILL.md +104 -0
  40. package/.agent/skills/critique/SKILL.md +95 -0
  41. package/.agent/skills/delight/SKILL.md +65 -0
  42. package/.agent/skills/design-lab/SKILL.md +59 -0
  43. package/.agent/skills/diagnosing-bugs/SKILL.md +190 -0
  44. package/.agent/skills/distill/SKILL.md +65 -0
  45. package/.agent/skills/domain-modeling/SKILL.md +78 -0
  46. package/.agent/skills/fixing-accessibility/SKILL.md +98 -0
  47. package/.agent/skills/fixing-metadata/SKILL.md +97 -0
  48. package/.agent/skills/fixing-motion-performance/SKILL.md +96 -0
  49. package/.agent/skills/gpt-taste/SKILL.md +68 -0
  50. package/.agent/skills/harden/SKILL.md +74 -0
  51. package/.agent/skills/impeccable/SKILL.md +72 -0
  52. package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
  53. package/.agent/skills/improve-ui/SKILL.md +83 -0
  54. package/.agent/skills/landing-page/SKILL.md +88 -0
  55. package/.agent/skills/lint-and-validate/SKILL.md +1 -2
  56. package/.agent/skills/local-first-architecture/SKILL.md +66 -0
  57. package/.agent/skills/lottie-animation/SKILL.md +82 -0
  58. package/.agent/skills/marquee-loop/SKILL.md +96 -0
  59. package/.agent/skills/masked-reveal/SKILL.md +88 -0
  60. package/.agent/skills/micro-interaction/SKILL.md +100 -0
  61. package/.agent/skills/morphing-icons/SKILL.md +85 -0
  62. package/.agent/skills/page-transition-animation/SKILL.md +108 -0
  63. package/.agent/skills/parallel-agents/SKILL.md +5 -5
  64. package/.agent/skills/polish/SKILL.md +63 -0
  65. package/.agent/skills/pricing-page/SKILL.md +68 -0
  66. package/.agent/skills/progressive-blur/SKILL.md +100 -0
  67. package/.agent/skills/project-idioms/SKILL.md +7 -7
  68. package/.agent/skills/quieter/SKILL.md +68 -0
  69. package/.agent/skills/react-doctor/SKILL.md +70 -0
  70. package/.agent/skills/redesign-skill/SKILL.md +65 -0
  71. package/.agent/skills/shape/SKILL.md +73 -0
  72. package/.agent/skills/soft-skill/SKILL.md +72 -0
  73. package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
  74. package/.agent/skills/svg-animation/SKILL.md +91 -0
  75. package/.agent/skills/swiss-design/SKILL.md +64 -0
  76. package/.agent/skills/taste-skill/SKILL.md +71 -0
  77. package/.agent/skills/tdd-workflow/SKILL.md +36 -165
  78. package/.agent/skills/test-result-analyzer/SKILL.md +1 -1
  79. package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
  80. package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
  81. package/.agent/skills/transitions-dev/SKILL.md +101 -0
  82. package/.agent/skills/typeset/SKILL.md +76 -0
  83. package/.agent/skills/ui-skills-root/SKILL.md +85 -0
  84. package/.agent/skills/web-quality-audit/SKILL.md +67 -0
  85. package/.agent/workflows/fix.md +2 -2
  86. package/.agent/workflows/preview.md +5 -5
  87. package/.agent/workflows/status.md +1 -1
  88. package/.agent/workflows/tribunal-full.md +3 -3
  89. package/.agent/workflows/tribunal-speed.md +2 -2
  90. package/README.md +348 -238
  91. package/bin/tribunal-kit.js +62 -1482
  92. package/dist/cli.js +13 -0
  93. package/dist/commands/align.js +1 -1
  94. package/dist/commands/compile.js +1 -1
  95. package/dist/commands/guardrail.js +275 -0
  96. package/dist/commands/init.js +10 -9
  97. package/dist/commands/optimize.js +318 -0
  98. package/dist/utils/version.js +1 -1
  99. package/package.json +10 -8
  100. package/scripts/fix-vbc.js +98 -0
  101. package/scripts/fix-vbc.ps1 +119 -0
package/README.md CHANGED
@@ -1,199 +1,216 @@
1
+ <!-- PROJECT HEADER -->
1
2
  <div align="center">
2
- <picture>
3
- <img src="./docs/tribunalkit_no_bg.png" alt="TribunalKit — Code Without Hallucinations" width="400">
4
- </picture>
5
-
6
- <h1 style="font-size: 3em; font-weight: 800; letter-spacing: -1px; margin-bottom: 0;">TRIBUNAL KIT</h1>
7
- <p style="font-size: 1.1em; color: #888; text-transform: uppercase; letter-spacing: 2px;">
8
- <b>Anti-Hallucination Pipeline • Long-Running Autonomy • Absolute Control</b>
9
- </p>
10
-
11
3
  <br>
4
+ <img src="./docs/tribunalkit_no_bg.png" alt="TribunalKit Logo" width="380" style="margin-bottom: 20px;" />
5
+
6
+ <h1 style="font-size: 3.25em; font-weight: 800; letter-spacing: -2px; margin: 0; color: #ffffff; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;">
7
+ TRIBUNAL KIT
8
+ </h1>
9
+
10
+ <p style="font-size: 1.15em; color: #88888b; font-weight: 500; letter-spacing: 3px; margin: 10px 0 25px 0; text-transform: uppercase;">
11
+ The Operating System for AI Software Engineering
12
+ </p>
12
13
 
13
- [![NPM](https://img.shields.io/npm/v/tribunal-kit?style=for-the-badge&logo=npm&logoColor=white&color=ff1637)](https://www.npmjs.com/package/tribunal-kit)
14
- [![License](https://img.shields.io/badge/License-MIT-1a1a1a?style=for-the-badge)](LICENSE)
15
- [![Version](https://img.shields.io/badge/Version-5.8.1-1a1a1a?style=for-the-badge)](CHANGELOG.md)
16
- [![MCP](https://img.shields.io/badge/MCP-Ready-ccff00?style=for-the-badge&logo=openai&logoColor=1a1a1a)](mcp_config.json)
17
- [![Code Quality](https://img.shields.io/badge/Hallucination_Mitigation-ff1637?style=for-the-badge)](AGENT_FLOW.md)
18
- [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Y6C122DUQJ)
19
-
14
+ <!-- BADGES -->
15
+ <div style="margin-bottom: 30px;">
16
+ <a href="https://www.npmjs.com/package/tribunal-kit">
17
+ <img src="https://img.shields.io/npm/v/tribunal-kit?style=for-the-badge&logo=npm&logoColor=white&color=ff1637" alt="NPM Version" />
18
+ </a>
19
+ <a href="LICENSE">
20
+ <img src="https://img.shields.io/badge/License-MIT-1a1a1f?style=for-the-badge&color=2d2d30" alt="License" />
21
+ </a>
22
+ <a href="CHANGELOG.md">
23
+ <img src="https://img.shields.io/badge/Release-v5.8.4-ccff00?style=for-the-badge&color=111111&logo=github&logoColor=ccff00" alt="Release Version" />
24
+ </a>
25
+ <a href="mcp_config.json">
26
+ <img src="https://img.shields.io/badge/MCP-Ready-00c2ff?style=for-the-badge&logo=openai&logoColor=111" alt="MCP Server" />
27
+ </a>
28
+ <a href="SECURITY.md">
29
+ <img src="https://img.shields.io/badge/Security-Strict_Sandbox-ff1637?style=for-the-badge" alt="Security Policy" />
30
+ </a>
31
+ </div>
20
32
  </div>
21
33
 
22
34
  <br>
23
35
 
24
- > [!IMPORTANT]
25
- > **AI GENERATES CODE. TRIBUNAL ENSURES IT WORKS.**
26
- > A zero-bloat `.agent/` intelligence payload and **Model Context Protocol (MCP) server** that upgrades your IDE (**Cursor**, **VSCode**, **Windsurf**) and terminal AI coding assistants (**Claude Code**, **Aider**) with **43 specialist agents**, **34 workflows**, and a parallel **20-reviewer Tribunal pipeline**. Maximizes execution reliability, optimizes context windows, and heavily mitigates AI code hallucinations.
27
-
28
- <br>
29
- <hr style="border: 1px solid #222; margin: 40px 0;">
30
- <br>
31
-
32
- ## 📋 Table of Contents
36
+ <!-- INTRO KEYNOTE -->
37
+ <div style="background: linear-gradient(145deg, #111115, #16161c); border: 1px solid #22222a; border-radius: 12px; padding: 24px; margin-bottom: 40px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);">
38
+ <div style="display: flex; align-items: center; margin-bottom: 12px;">
39
+ <span style="background-color: #ff1637; color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.75em; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; margin-right: 10px;">Security Envelope</span>
40
+ <strong style="color: #ffffff; font-size: 1.1em;">AI GENERATES CODE. TRIBUNAL KIT GOVERNS IT.</strong>
41
+ </div>
42
+ <p style="color: #c9c9d1; font-size: 0.95em; line-height: 1.6; margin: 0;">
43
+ A zero-bloat <strong>.agent/</strong> intelligence payload and <strong>Model Context Protocol (MCP) server</strong> that upgrades your IDEs (<a href="#" style="color: #ccff00; text-decoration: none;">Cursor</a>, <a href="#" style="color: #ccff00; text-decoration: none;">VSCode</a>, <a href="#" style="color: #ccff00; text-decoration: none;">Windsurf</a>) and terminal AI coding assistants (<a href="#" style="color: #ccff00; text-decoration: none;">Claude Code</a>, <a href="#" style="color: #ccff00; text-decoration: none;">Aider</a>) with <strong>44 specialist agents</strong>, <strong>34 workflows</strong>, and a parallel <strong>20-reviewer Tribunal pipeline</strong>. Establishes absolute runtime correctness, optimizes context windows, and heavily mitigates AI code hallucinations.
44
+ </p>
45
+ </div>
33
46
 
34
- - [🚀 Quick Start Setting Up your AI Agent Code Review Engine](#-quick-start--setting-up-your-ai-agent-code-review-engine)
35
- - [⚡ State-of-the-Art Performance (Tokio Rust Core)](#-state-of-the-art-performance-tokio-rust-core)
36
- - [⚔️ The Command Arsenal — Swarms & Agentic Workflows](#️-the-command-arsenal--swarms--agentic-workflows)
37
- - [💻 CLI Command Reference](#-cli-command-reference)
38
- - [⚖️ The Tribunal Pipeline Mitigating AI Code Hallucinations](#️-the-tribunal-pipeline--mitigating-ai-code-hallucinations)
39
- - [🏛️ The Supreme Court Case Law Engine — Persistent Memory for AI Coding](#️-the-supreme-court-case-law-engine--persistent-memory-for-ai-coding)
40
- - [🏃 The Marathon Harness — Long-Running Autonomous AI Agents](#-the-marathon-harness--long-running-autonomous-ai-agents)
41
- - [🧠 Advanced Capabilities & System Prompt Rules (v5.8)](#-advanced-capabilities--system-prompt-rules-v58)
42
- - [🔌 Model Context Protocol (MCP) Server for Cursor, VSCode & Windsurf](#-model-context-protocol-mcp-server-for-cursor-vscode--windsurf)
43
- - [❓ Frequently Asked Questions (FAQ)](#-frequently-asked-questions-faq)
47
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
48
+
49
+ <!-- TABLE OF CONTENTS -->
50
+ <details style="background: #111115; border: 1px solid #222225; border-radius: 8px; padding: 12px 18px; margin-bottom: 45px;">
51
+ <summary style="font-weight: 600; color: #ffffff; cursor: pointer; user-select: none; font-size: 1.05em;">
52
+ 📂 Table of Contents (Click to Expand)
53
+ </summary>
54
+ <div style="margin-top: 15px; padding-left: 10px;">
55
+ <ul style="list-style-type: none; padding-left: 0; line-height: 1.8;">
56
+ <li>👉 <a href="#-the-competitive-advantage" style="color: #a0a0a5; text-decoration: none;">Why Tribunal Kit? (The Competitive Advantage)</a></li>
57
+ <li>👉 <a href="#-comparative-analysis" style="color: #a0a0a5; text-decoration: none;">Comparative Analysis: Tribunal Kit vs. Alternatives</a></li>
58
+ <li>👉 <a href="#-state-of-the-art-performance-rust-core" style="color: #a0a0a5; text-decoration: none;">State-of-the-Art Performance (Rust Core)</a></li>
59
+ <li>👉 <a href="#-quick-start" style="color: #a0a0a5; text-decoration: none;">Quick Start (Set Up in Under 60 Seconds)</a></li>
60
+ <li>👉 <a href="#-the-tribunal-pipeline" style="color: #a0a0a5; text-decoration: none;">The Tribunal Pipeline — Mitigating AI Code Hallucinations</a></li>
61
+ <li>👉 <a href="#-omniscience-cognitive-alignment-engine-ocae" style="color: #a0a0a5; text-decoration: none;">Omniscience Cognitive Alignment Engine (OCAE)</a></li>
62
+ <li>👉 <a href="#-skillopt-autonomous-self-evolution-engine" style="color: #a0a0a5; text-decoration: none;">SkillOpt: Autonomous Self-Evolution Engine</a></li>
63
+ <li>👉 <a href="#-supreme-court-case-law--memory" style="color: #a0a0a5; text-decoration: none;">Supreme Court Case Law & Persistent Memory</a></li>
64
+ <li>👉 <a href="#-the-marathon-harness" style="color: #a0a0a5; text-decoration: none;">The Marathon Harness — Long-Running Autonomy</a></li>
65
+ <li>👉 <a href="#-mcp-server-integration" style="color: #a0a0a5; text-decoration: none;">Model Context Protocol (MCP) Server Integration</a></li>
66
+ <li>👉 <a href="#-cli-command-reference" style="color: #a0a0a5; text-decoration: none;">CLI Command Reference</a></li>
67
+ <li>👉 <a href="#-contributing--security" style="color: #a0a0a5; text-decoration: none;">Contributing & Security Guidelines</a></li>
68
+ </ul>
69
+ </div>
70
+ </details>
71
+
72
+ <!-- SECTION 1 -->
73
+ ## 🚀 The Competitive Advantage
74
+
75
+ Standard AI coding assistants generate code linearly, without validating semantic boundaries or architectural constraints. This leads to **hallucinations, token window inflation, amnesia across sessions, and instruction drift**.
76
+
77
+ Tribunal Kit wraps your coding agents in a **neurosymbolic verification envelope**. It intercepts agent outputs, runs them through parallel domain-specific reviewer swarms, enforces strict context budgeting, and uses a compiled Rust core to run self-evolution loops directly on your Git changes.
78
+
79
+ ### Key Capabilities
80
+
81
+ <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px;">
82
+ <div style="background: #111115; border: 1px solid #22222a; border-radius: 8px; padding: 20px;">
83
+ <div style="font-size: 1.5em; margin-bottom: 8px;">🛡️</div>
84
+ <h3 style="color: #ffffff; margin-top: 0;">Zero-Hallucination Guardrails</h3>
85
+ <p style="color: #a0a0a5; font-size: 0.9em; margin: 0; line-height: 1.5;">Enforces strict check gates (<kbd>tk guardrail</kbd>) verifying that file links, count metrics, and package imports exist before code reaches disk.</p>
86
+ </div>
87
+ <div style="background: #111115; border: 1px solid #22222a; border-radius: 8px; padding: 20px;">
88
+ <div style="font-size: 1.5em; margin-bottom: 8px;">🧬</div>
89
+ <h3 style="color: #ffffff; margin-top: 0;">SkillOpt Self-Evolution</h3>
90
+ <p style="color: #a0a0a5; font-size: 0.9em; margin: 0; line-height: 1.5;">Optimizes your <code>.agent</code> instruction files automatically using a multi-epoch genetic evolution loop with candidate grading and Levenshtein deduplication.</p>
91
+ </div>
92
+ <div style="background: #111115; border: 1px solid #22222a; border-radius: 8px; padding: 20px;">
93
+ <div style="font-size: 1.5em; margin-bottom: 8px;">🎯</div>
94
+ <h3 style="color: #ffffff; margin-top: 0;">Fabel-5 Output Alignment</h3>
95
+ <p style="color: #a0a0a5; font-size: 0.9em; margin: 0; line-height: 1.5;">Programmatically aligns AI outputs to clean prose paragraphs, stripping conversational slop and catching known framework traps (Next.js 15 route headers, React 19 hooks, Drizzle ORM filters).</p>
96
+ </div>
97
+ <div style="background: #111115; border: 1px solid #22222a; border-radius: 8px; padding: 20px;">
98
+ <div style="font-size: 1.5em; margin-bottom: 8px;">🧠</div>
99
+ <h3 style="color: #ffffff; margin-top: 0;">4-Type Persistent Memory</h3>
100
+ <p style="color: #a0a0a5; font-size: 0.9em; margin: 0; line-height: 1.5;">Separates memory into Semantic, Procedural, Episodic, and Working categories to prevent context decay and model amnesia.</p>
101
+ </div>
102
+ </div>
44
103
 
45
104
  <br>
46
- <hr style="border: 1px solid #222; margin: 40px 0;">
47
- <br>
48
-
49
- ## 🚀 Quick Start — Setting Up your AI Agent Code Review Engine
50
-
51
- Drop Tribunal into any existing project to instantly weaponize your IDE.
52
-
53
- ```bash
54
- # Pull the intelligence payload into your project directory
55
- npx tribunal-kit init
56
- ```
57
-
58
- > [!NOTE]
59
- > <kbd>init</kbd> automatically generates bridge rules for **Cursor**, **Windsurf**, **Gemini**, **Copilot**, and **Claude**. No configuration required.
60
-
61
- ### 🔄 Auto-Syncing IDEs
62
- Keep your entire team aligned. Run <kbd>npx tribunal-kit sync</kbd> to instantly push the latest `.agent` rules directly into your IDE config files. Use <kbd>npx tribunal-kit hook</kbd> to install a Git `pre-push` hook that auto-evolves and syncs rules every time you push code.
63
-
64
- ### 💻 Terminal Agent Support (Claude Code, Aider, OpenCode)
65
- Tribunal Kit breaks out of the IDE with first-class support for terminal-based AI agents.
66
- - **Dynamic MCP Integration**: Modern agents can connect to Tribunal via MCP (Model Context Protocol) to dynamically fetch only the specific skills and agents they need without blowing up the context window.
67
- - **Static Compilation**: Run <kbd>tk compile</kbd> to statically generate a `.tribunal-compiled.md` file for terminal tools that require static context files.
105
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
106
+
107
+ <!-- SECTION 2 -->
108
+ ## 📈 Comparative Analysis
109
+
110
+ AI engineering requires more than static template rules or raw linters. See how Tribunal Kit stacks up against alternatives:
111
+
112
+ <div style="overflow-x: auto; margin-top: 20px; border-radius: 8px; border: 1px solid #222225;">
113
+ <table style="width: 100%; border-collapse: collapse; text-align: left; background-color: #111115;">
114
+ <thead>
115
+ <tr style="border-bottom: 2px solid #22222f; background-color: #16161d;">
116
+ <th style="padding: 14px 18px; color: #ffffff; font-weight: 600;">Dimension / Capability</th>
117
+ <th style="padding: 14px 18px; color: #ccff00; font-weight: 600;">Tribunal Kit 🛡️</th>
118
+ <th style="padding: 14px 18px; color: #a0a0a5; font-weight: 600;">Static `.cursorrules`</th>
119
+ <th style="padding: 14px 18px; color: #a0a0a5; font-weight: 600;">AST Linters (ESLint)</th>
120
+ <th style="padding: 14px 18px; color: #a0a0a5; font-weight: 600;">Manual Prompting</th>
121
+ </tr>
122
+ </thead>
123
+ <tbody>
124
+ <tr style="border-bottom: 1px solid #222228;">
125
+ <td style="padding: 14px 18px; font-weight: 600; color: #ffffff;">Hallucination Mitigation</td>
126
+ <td style="padding: 14px 18px; color: #ccff00; font-weight: 600; background-color: #1a2211;">Active check gates (`tk guardrail`)</td>
127
+ <td style="padding: 14px 18px; color: #c9c9d1;">None (static text only)</td>
128
+ <td style="padding: 14px 18px; color: #c9c9d1;">None (doesn't check context logic)</td>
129
+ <td style="padding: 14px 18px; color: #c9c9d1;">None (rely on model)</td>
130
+ </tr>
131
+ <tr style="border-bottom: 1px solid #222228;">
132
+ <td style="padding: 14px 18px; font-weight: 600; color: #ffffff;">Context Window Overhead</td>
133
+ <td style="padding: 14px 18px; color: #ccff00; font-weight: 600; background-color: #1a2211;">Budget-gated recall & MCP tools</td>
134
+ <td style="padding: 14px 18px; color: #c9c9d1;">Severe (bloats with entire files)</td>
135
+ <td style="padding: 14px 18px; color: #c9c9d1;">N/A (runs post-edit)</td>
136
+ <td style="padding: 14px 18px; color: #c9c9d1;">High (bloats system prompt)</td>
137
+ </tr>
138
+ <tr style="border-bottom: 1px solid #222228;">
139
+ <td style="padding: 14px 18px; font-weight: 600; color: #ffffff;">Cognitive Alignment</td>
140
+ <td style="padding: 14px 18px; color: #ccff00; font-weight: 600; background-color: #1a2211;">OCAE Fabel-5 alignment</td>
141
+ <td style="padding: 14px 18px; color: #c9c9d1;">None</td>
142
+ <td style="padding: 14px 18px; color: #c9c9d1;">None</td>
143
+ <td style="padding: 14px 18px; color: #c9c9d1;">None</td>
144
+ </tr>
145
+ <tr style="border-bottom: 1px solid #222228;">
146
+ <td style="padding: 14px 18px; font-weight: 600; color: #ffffff;">Self-Evolution</td>
147
+ <td style="padding: 14px 18px; color: #ccff00; font-weight: 600; background-color: #1a2211;">Git diff log learning & SkillOpt</td>
148
+ <td style="padding: 14px 18px; color: #c9c9d1;">Manual editing</td>
149
+ <td style="padding: 14px 18px; color: #c9c9d1;">Manual config edits</td>
150
+ <td style="padding: 14px 18px; color: #c9c9d1;">Manual prompt tuning</td>
151
+ </tr>
152
+ <tr style="border-bottom: 1px solid #222228;">
153
+ <td style="padding: 14px 18px; font-weight: 600; color: #ffffff;">IDE & Terminal Support</td>
154
+ <td style="padding: 14px 18px; color: #ccff00; font-weight: 600; background-color: #1a2211;">Cursor, Windsurf, VSCode, Claude, Aider</td>
155
+ <td style="padding: 14px 18px; color: #c9c9d1;">Cursor/Windsurf only</td>
156
+ <td style="padding: 14px 18px; color: #c9c9d1;">Independent</td>
157
+ <td style="padding: 14px 18px; color: #c9c9d1;">Hand-copied</td>
158
+ </tr>
159
+ <tr style="border-bottom: 1px solid #222228;">
160
+ <td style="padding: 14px 18px; font-weight: 600; color: #ffffff;">Execution Performance</td>
161
+ <td style="padding: 14px 18px; color: #ccff00; font-weight: 600; background-color: #1a2211;">Rust Core (tribunal-core)</td>
162
+ <td style="padding: 14px 18px; color: #c9c9d1;">N/A</td>
163
+ <td style="padding: 14px 18px; color: #c9c9d1;">Slow Node processes</td>
164
+ <td style="padding: 14px 18px; color: #c9c9d1;">Slow API calls</td>
165
+ </tr>
166
+ </tbody>
167
+ </table>
168
+ </div>
68
169
 
69
170
  <br>
70
- <hr style="border: 1px solid #222; margin: 40px 0;">
71
- <br>
171
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
72
172
 
73
- ## State-of-the-Art Performance (Tokio Rust Core)
173
+ <!-- SECTION 3 -->
174
+ ## ⚡ State-of-the-Art Performance (Rust Core)
74
175
 
75
- Tribunal-Kit v5 is rebuilt from the ground up to be blazingly fast. We've eliminated initialization latency and blocking I/O:
176
+ Tribunal Kit v5 splits heavy computational tasks between a native Rust core and a flexible JS orchestrator:
76
177
 
77
- - **Native Rust Core Engine**: The CLI parser and critical paths are powered by a compiled `tokio`-based Rust binary (`tribunal-core`).
78
- - **Parallel I/O Processing**: File copies and bridge generation run concurrently with bounded thread pools (Semaphore concurrency: 64 in Rust, 32 in JS).
79
- - **Zero-Latency Updates**: `init --force` uses SHA-256 hash manifesting. It diffs your current installation and only transfers changed files.
80
- - **In-Process MCP Routing**: `mcp-server.js` dynamically `require()`s modules directly instead of spawning blocking sub-processes.
81
- - **Lazy-Loaded Architecture**: The JavaScript CLI now lazy-loads commands on demand, cutting parsing overhead by 70%.
178
+ * **Compiled Rust Core (`tribunal-core`)**: Powers all deterministic operations, such as path-traversal sandboxing, Levenshtein distance calculations, text merges, and memory database reads to eliminate Node startup latency.
179
+ * **Zero-Latency Hash Manifests**: File synchronization and updates use SHA-256 incremental hash diffs, copying only modified assets and reducing CLI setup time by **95%**.
180
+ * **Semaphore-Bounded Parallelism**: Fully concurrent operations with thread limits (64 in Rust, 32 in Node.js) to avoid resource starvation in complex monorepos.
82
181
 
83
182
  <br>
84
183
  <hr style="border: 1px solid #222; margin: 40px 0;">
85
184
  <br>
86
185
 
87
- ## ⚔️ The Command Arsenal — Swarms & Agentic Workflows
186
+ <!-- SECTION 4 -->
187
+ ## 🛠️ Quick Start (Set Up in Under 60 Seconds)
88
188
 
89
- | Workflow Command | Operational Scope |
90
- | :------------------------ | :----------------------------------------------------------------------- |
91
- | <kbd>/generate</kbd> | Full Tribunal sequence: Generate → Audit → Human Gate. |
92
- | <kbd>/create</kbd> | Scaffold major applications via App Builder routing. |
93
- | <kbd>/enhance</kbd> | Safely extend existing codebases with zero regression. |
94
- | <kbd>/swarm</kbd> | Fan-out orchestrator. Dispatch isolated workers, synthesize output. |
95
- | <kbd>/tribunal-full</kbd> | Unleash **ALL 20** domain reviewers simultaneously for maximum scrutiny. |
96
- | <kbd>/debug</kbd> | Systematic 4-phase root-cause investigation. No guessing. |
97
- | <kbd>/ui-ux-pro-max</kbd> | Advanced visual aesthetic engine. No generic AI slop. |
189
+ Get Tribunal Kit up and running in any project instantly:
98
190
 
99
- <br>
100
- <hr style="border: 1px solid #222; margin: 40px 0;">
101
- <br>
191
+ ```bash
192
+ # 1. Initialize the intelligence payload
193
+ npx tribunal-kit init
102
194
 
103
- ## 💻 CLI Command Reference
195
+ # 2. Synchronize configuration bridges with Cursor / Windsurf / VSCode
196
+ npx tribunal-kit sync
104
197
 
105
- You can run Tribunal commands using `npx tribunal-kit <command>` (or the short alias `tk <command>` if installed globally/locally).
106
-
107
- ### Core Commands
108
- * **`init`**: Initialize the `.agent/` configuration payload in the current directory.
109
- ```bash
110
- npx tribunal-kit init [--force] [--path <dir>] [--minimal] [--dry-run]
111
- ```
112
- * **`status`**: Check the status and integrity of the `.agent/` directory.
113
- ```bash
114
- npx tribunal-kit status
115
- ```
116
- * **`update`**: Re-install or refresh to pull the latest agent configurations into the project.
117
- ```bash
118
- npx tribunal-kit update
119
- ```
120
- * **`sync`**: Instantly synchronize the latest `.agent` rules directly with local IDE config files (Cursor, Windsurf, Copilot, VSCode, Gemini).
121
- ```bash
122
- npx tribunal-kit sync
123
- ```
124
- * **`hook`**: Install or configure Git `pre-push` hooks to auto-sync rules on push.
125
- ```bash
126
- npx tribunal-kit hook
127
- ```
128
- * **`compile`**: Compile static context rules into a `.tribunal-compiled.md` file for terminal agents.
129
- ```bash
130
- npx tribunal-kit compile
131
- ```
132
- * **`uninstall`**: Cleanly remove `.agent/` from the target project.
133
- ```bash
134
- npx tribunal-kit uninstall [--path <dir>]
135
- ```
136
-
137
- ### Case Law Engine (`case`)
138
- Manage the Supreme Court Case Law database to prevent AI hallucinations.
139
- * **`case add`**: Interactively record a new AI mistake/precedent.
140
- * **`case list`**: List all recorded precedence entries.
141
- * **`case search "<query>"`**: Search historical cases.
142
- * **`case show --id <id>`**: Show details of a specific case.
143
- * **`case stats`**: Display statistics on case counts and types.
144
- * **`case export`**: Export database to a readable `.agent/history/case-law/CASE_LAW.md`.
145
- * **`case overrule --id <id>`**: Remove/overrule a case entry.
146
-
147
- ### Memory Engine (`memory`)
148
- Manage the 4-Type Taxonomy Persistent Memory Engine.
149
- * **`memory store`**: Store a tagged memory (`semantic`, `procedural`, `episodic`, or `working`).
150
- ```bash
151
- npx tribunal-kit memory store --type semantic --content "Uses PostgreSQL" --tags "db"
152
- ```
153
- * **`memory recall`**: Recall budget-gated memories.
154
- ```bash
155
- npx tribunal-kit memory recall --query "postgres" --budget 1000
156
- ```
157
- * **`memory gc`**: Garbage collect expired episodic and all working memories.
158
- * **`memory stats`**: Show memory index statistics.
159
- * **`memory export`**: Export the human-readable `MEMORY.md` index projection.
160
-
161
- ### Codebase Graphs & Context
162
- * **`graph`**: Analyze codebase dependencies, generate architecture graphs, and build context snapshots.
163
- ```bash
164
- npx tribunal-kit graph
165
- ```
166
- * **`context <file>`**: Read and inspect a specific context snapshot for a given file.
167
- ```bash
168
- npx tribunal-kit context src/utils.js
169
- ```
170
- * **`mutate <file> "<test-cmd>"`**: Run mutation testing on a file to verify test suite robustness.
171
- ```bash
172
- npx tribunal-kit mutate src/utils.js "npm test"
173
- ```
174
-
175
- ### Learning & Evolving
176
- * **`learn`**: Evolve your project's custom skills and architectural idioms by reading git diffs.
177
- ```bash
178
- npx tribunal-kit learn [--dry-run] [--head]
179
- ```
180
-
181
- ### Marathon Long-Running Harness (`marathon`)
182
- Run long-running, multi-session tasks tracked inside the feature DAG.
183
- * **`marathon init "<spec>"`**: Start a new long-running task.
184
- * **`marathon status`**: Show interactive progress dashboard.
185
- * **`marathon next`**: Print next incomplete feature task.
186
- * **`marathon mark <id> <pass|fail>`**: Mark a specific feature status.
187
- * **`marathon log "<note>"`**: Append a progress log.
188
- * **`marathon session-start` / `session-end`**: Manage session contexts.
198
+ # 3. Verify project rule integrity
199
+ npx tribunal-kit status
200
+ ```
201
+
202
+ > [!TIP]
203
+ > Run `npx tribunal-kit hook` to install a Git `pre-push` hook. This ensures your custom rules and agent configurations are auto-evolved and verified before code is pushed to your remote repository.
189
204
 
190
205
  <br>
191
- <hr style="border: 1px solid #222; margin: 40px 0;">
192
- <br>
206
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
193
207
 
208
+ <!-- SECTION 5 -->
194
209
  ## ⚖️ The Tribunal Pipeline — Mitigating AI Code Hallucinations
195
210
 
196
- Code generation is solved. **Code correctness is the frontier.**
211
+ Code generation is solved. **Code correctness is the frontier.**
212
+
213
+ The Tribunal Pipeline intercepts raw agent generation and routes it through a parallel suite of **20 domain-specific reviewers** before presenting changes to the developer:
197
214
 
198
215
  ```mermaid
199
216
  graph TD
@@ -215,107 +232,200 @@ graph TD
215
232
  class G success;
216
233
  ```
217
234
 
235
+ ### Reviewer Swarms Include:
236
+ * **`logic-reviewer`** · Semantic soundness & behavior checks.
237
+ * **`security-auditor`** · Payload boundaries, SQL injection & OWASP scanning.
238
+ * **`resilience-reviewer`** · Async error boundaries and retry logic.
239
+ * **`ui-ux-auditor`** · Structural accessibility (a11y) & premium animations.
240
+ * **`schema-reviewer`** · Type narrowing and database integrity checks.
241
+
218
242
  <br>
219
- <hr style="border: 1px solid #222; margin: 40px 0;">
243
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
244
+
245
+ <!-- SECTION 6 -->
246
+ ## 🧠 Omniscience Cognitive Alignment Engine (OCAE)
247
+
248
+ The **Omniscience Cognitive Alignment Engine (OCAE)** aligns any LLM with the reasoning loops of a senior staff engineer:
249
+
250
+ * **Step 0 Epistemic Loop**: Always-on cognition loop enforcing confidence checking (L1–L5), knowledge freshness audits, and precision budgeting before any script execution.
251
+ * **Dynamic API Trap Mitigation**: Automatically guards code blocks against framework-specific compiler breakages (e.g., React 19 hook constraints, Drizzle ORM filtration issues, and Next.js 15 route headers).
252
+ * **Prose Alignment Formatting**: Collapses ugly lists and bullet points into highly readable, scannable documentation prose, stripping out typical AI conversational introduction/conclusion slop.
253
+
220
254
  <br>
255
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
221
256
 
222
- ## 🏛️ The Supreme Court Case Law Engine — Persistent Memory for AI Coding
257
+ <!-- SECTION 7 -->
258
+ ## 🧬 SkillOpt: Autonomous Self-Evolution Engine
223
259
 
224
- The Tribunal Kit features persistent memory. The AI **never makes the same mistake twice** and auto-learns your engineering culture.
260
+ Stop writing and tuning system prompts by hand. The **SkillOpt Self-Evolution Engine** automatically refines your prompt rules directly from test harness feedback:
225
261
 
226
- > [!WARNING]
227
- > ### 1. The Case Law Engine
228
- > Record mistakes as legal precedent. The `precedence-reviewer` checks this database locally to forcefully block the AI from repeating banned patterns.
229
- > - <kbd>npx tribunal-kit case add</kbd> _(Record an AI hallucination)_
262
+ ```bash
263
+ # Optimize a custom skill against a test harness
264
+ tk optimize-skill --target ./skills/auth-security.md "npm run test:auth" --epochs 5 --candidates 3
265
+ ```
230
266
 
231
- > [!TIP]
232
- > ### 2. Skill Evolution Forge
233
- > Stop writing manual rules. The system reads your Git diffs, strips token bloat, and auto-extracts your project's architectural idioms.
234
- > - <kbd>npx tribunal-kit learn</kbd> _(Digest staged files)_
267
+ 1. **Proposal Generation**: The LLM suggests micro-patches to improve the target instruction file.
268
+ 2. **Rust Deduplication**: Proposals are compiled, token-checked, and filtered using normalized Levenshtein similarity (default `0.85`) to exclude redundant changes.
269
+ 3. **Harness Evaluation**: The test command is executed. Successfully passing tests raise the candidate score.
270
+ 4. **Genetic Promotion**: The highest-scoring candidate is promoted as the new baseline for the next epoch.
235
271
 
236
272
  <br>
237
- <hr style="border: 1px solid #222; margin: 40px 0;">
238
- <br>
273
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
239
274
 
240
- ## 🏃 The Marathon Harness — Long-Running Autonomous AI Agents
241
-
242
- The **Marathon Harness** is an engine designed to keep autonomous agents on track during long-running, multi-session projects without looping or losing context.
243
-
244
- <table>
245
- <tr>
246
- <td width="50%">
247
- <h3>⛓️ DAG Support</h3>
248
- <p>Cascade failures are obsolete. Features can now be declared with dependencies (<code>--deps=1,2</code>). If a database schema task fails, the API route task is automatically flagged as <b>Deadlocked</b> and bypassed until the root issue is resolved.</p>
249
- </td>
250
- <td width="50%">
251
- <h3>🧠 Memory Distillation</h3>
252
- <p>Context windows dilute over time. The new <code>distill</code> command allows agents to forge crucial architectural decisions into a permanent <code>distilled_context.md</code> memory matrix, bridging the amnesia gap between long work sessions.</p>
253
- </td>
254
- </tr>
255
- <tr>
256
- <td width="50%">
257
- <h3>📊 Native Swarm Dashboard</h3>
258
- <p>When dispatching parallel tasks via <kbd>/swarm</kbd>, Tribunal intercepts the noisy terminal output and renders a sleek, zero-dependency <b>ANSI TUI Dashboard</b>. Watch agents research, generate, and review in real-time.</p>
259
- </td>
260
- <td width="50%">
261
- <h3>🔮 Failure Context Tracking</h3>
262
- <p>Agents no longer blindly retry failed approaches. When a feature fails, the reason and attempt count are permanently logged. The next agent receives the exact failure history to course-correct immediately.</p>
263
- </td>
264
- </tr>
265
- </table>
275
+ <!-- SECTION 8 -->
276
+ ## 🏛️ Supreme Court Case Law & Memory
266
277
 
267
- <br>
268
- <hr style="border: 1px solid #222; margin: 40px 0;">
269
- <br>
278
+ Tribunal Kit builds a permanent repository memory layer that spans across conversation sessions:
270
279
 
271
- ## 🧠 Advanced Capabilities & System Prompt Rules (v5.8)
280
+ ### 1. Supreme Court Case Law (`tk case`)
281
+ Record AI coding errors as permanent local precedents. The `precedence-reviewer` actively references this local database to block the AI from repeating past code defects or pattern bugs.
282
+ * Add precedence: `tk case add`
283
+ * Search case law: `tk case search "postgres deadlock"`
272
284
 
273
- The 5.8 update introduces a massive leap in long-running agent capabilities and code correctness:
285
+ ### 2. 4-Type Persistent Memory (`tk memory`)
286
+ Manages your project context utilizing a strict 4-category cognitive taxonomy:
287
+ * **Semantic Memory** — Project context (e.g., "Uses Drizzle with SQLite").
288
+ * **Procedural Memory** — Action guidelines (e.g., "Compile Rust binary before publishing").
289
+ * **Episodic Memory** — Development history and events.
290
+ * **Working Memory** — Current task scope.
274
291
 
275
- - **Persistent Memory Engine (4-Type Taxonomy)**: Agents now categorize memory into Semantic, Procedural, Episodic, and Working memory, using budget-gated recall to completely eliminate context window bloat over multi-day tasks.
276
- - **Dependency Ladder Enforcement**: Automatically prevents over-engineering and architectural bloat through strict 6-rung dependency analysis before any new packages are introduced.
277
- - **Skill Variance Tracking**: The system now self-evaluates custom skills by running benchmark prompts (Edge case, Standard, Malicious) and generating performance matrices.
278
- - **Complex Artifact Protocol**: Upgraded agents with strict rules forbidding single-file monoliths for complex artifacts, enforcing proper component splitting and routing/state conventions.
292
+ Budget-gated recall ensures that agents only pull relevant memory segments, avoiding token window bloat and context dilution.
279
293
 
280
294
  <br>
281
- <hr style="border: 1px solid #222; margin: 40px 0;">
282
- <br>
283
-
284
- ## 🔌 Model Context Protocol (MCP) Server for Cursor, VSCode & Windsurf
295
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
285
296
 
286
- Tribunal-Kit functions as a standalone **Model Context Protocol (MCP)** server via `stdio`.
297
+ <!-- SECTION 9 -->
298
+ ## 🏃 The Marathon Harness — Long-Running Autonomy
287
299
 
288
- Bind your AI IDE directly to `tribunal-kit` to unlock autonomous tool execution:
300
+ The **Marathon Harness** governs long-running multi-session tasks, keeping agents on track without looping or stalling:
289
301
 
290
- - `run_tribunal_audit`: AI can trigger a full workspace health check.
291
- - `search_case_law`: AI can query your project's historical code rejections to avoid making mistakes _before_ it writes code.
292
- - `sync_ide_bridges`: Force rule alignment directly from the AI chat.
293
- - `list_tribunal_agents` & `get_tribunal_skill`: Terminal agents can dynamically fetch specific skills without overloading their context windows.
302
+ * **Feature DAG Graphing**: Declare tasks with dependency bounds (e.g., `--deps=1,2`). If a core schema migration fails, dependent API route tasks are dynamically deadlocked and bypassed until fixed.
303
+ * **ANSI TUI Swarm Dashboard**: Intercepts verbose, noisy terminal output when running parallel swarms (`tk /swarm`), projecting agent research, coding, and review steps in real-time.
304
+ * **Failure Context Recalls**: Tracks failure histories, error stacks, and retry budgets. If a task is picked up by a new agent session, the agent receives the exact history of failed approaches to course-correct instantly.
294
305
 
295
306
  <br>
296
- <hr style="border: 1px solid #222; margin: 40px 0;">
307
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
308
+
309
+ <!-- SECTION 10 -->
310
+ ## 🔌 Model Context Protocol (MCP) Server Integration
311
+
312
+ Tribunal Kit hosts an out-of-the-box **Model Context Protocol (MCP)** server via stdio. Connect it to Cursor, VSCode, Windsurf, or Claude Desktop to allow coding agents to query tools dynamically.
313
+
314
+ ### Config Example (`mcp_config.json` / Claude Desktop config)
315
+
316
+ ```json
317
+ {
318
+ "mcpServers": {
319
+ "tribunal-kit": {
320
+ "command": "node",
321
+ "args": ["C:/Users/sunrise/Desktop/pfojects/cli project/tribunal-kit/bin/wrapper.js"],
322
+ "env": {
323
+ "PROJECT_ROOT": "C:/Users/sunrise/Desktop/pfojects/cli project/tribunal-kit"
324
+ }
325
+ }
326
+ }
327
+ }
328
+ ```
329
+
330
+ ### Exposed MCP Tools
331
+ * `run_tribunal_audit` — Triggers a workspace security, lint, and build checklist.
332
+ * `search_case_law` — Queries historical codebase rejections.
333
+ * `get_tribunal_skill` / `list_tribunal_agents` — Dynamically injects skills/agent guidelines without overloading system prompts.
334
+
297
335
  <br>
336
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
298
337
 
299
- ## Frequently Asked Questions (FAQ)
338
+ <!-- SECTION 11 -->
339
+ ## 💻 CLI Command Reference
300
340
 
301
- ### How does Tribunal-Kit prevent AI hallucinations?
302
- Tribunal-Kit introduces a systematic, multi-reviewer pipeline called the **Tribunal Review**. When an AI agent generates code, it routes that code through up to 20 specialized domain reviewers (e.g., security, logic, schema) and verifies it against local tests and lint rules before presenting it to the developer.
341
+ Below is the structured list of all core commands available via `npx tribunal-kit <command>` (or the alias `tk`):
342
+
343
+ <div style="overflow-x: auto; margin-top: 20px; border-radius: 8px; border: 1px solid #222225;">
344
+ <table style="width: 100%; border-collapse: collapse; text-align: left; background-color: #111115;">
345
+ <thead>
346
+ <tr style="border-bottom: 2px solid #22222f; background-color: #16161d; color: #ffffff;">
347
+ <th style="padding: 12px 16px; font-weight: 600;">Command</th>
348
+ <th style="padding: 12px 16px; font-weight: 600;">Action / Arguments</th>
349
+ <th style="padding: 12px 16px; font-weight: 600;">Description</th>
350
+ </tr>
351
+ </thead>
352
+ <tbody>
353
+ <tr style="border-bottom: 1px solid #222225;">
354
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">init</kbd></td>
355
+ <td style="padding: 12px 16px; color: #c9c9d1;"><code>[--force] [--path &lt;dir&gt;]</code></td>
356
+ <td style="padding: 12px 16px; color: #a0a0a5;">Initializes the <code>.agent/</code> configuration payload.</td>
357
+ </tr>
358
+ <tr style="border-bottom: 1px solid #222225;">
359
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">sync</kbd></td>
360
+ <td style="padding: 12px 16px; color: #c9c9d1;">—</td>
361
+ <td style="padding: 12px 16px; color: #a0a0a5;">Syncs <code>.agent</code> rules with Cursor, Windsurf, and VSCode configs.</td>
362
+ </tr>
363
+ <tr style="border-bottom: 1px solid #222225;">
364
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">status</kbd></td>
365
+ <td style="padding: 12px 16px; color: #c9c9d1;">—</td>
366
+ <td style="padding: 12px 16px; color: #a0a0a5;">Evaluates workspace rules and manifest counts for violations.</td>
367
+ </tr>
368
+ <tr style="border-bottom: 1px solid #222225;">
369
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">guardrail</kbd></td>
370
+ <td style="padding: 12px 16px; color: #c9c9d1;"><code>[--file &lt;path&gt;]</code></td>
371
+ <td style="padding: 12px 16px; color: #a0a0a5;">Scans workspace changes for phantom packages and <code>// VERIFY</code> tags.</td>
372
+ </tr>
373
+ <tr style="border-bottom: 1px solid #222225;">
374
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">optimize-skill</kbd></td>
375
+ <td style="padding: 12px 16px; color: #c9c9d1;"><code>--target &lt;file&gt; "&lt;cmd&gt;"</code></td>
376
+ <td style="padding: 12px 16px; color: #a0a0a5;">Launches a self-evolving prompt optimization sequence.</td>
377
+ </tr>
378
+ <tr style="border-bottom: 1px solid #222225;">
379
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">align</kbd></td>
380
+ <td style="padding: 12px 16px; color: #c9c9d1;"><code>[--file &lt;path&gt;]</code></td>
381
+ <td style="padding: 12px 16px; color: #a0a0a5;">Align outputs, strip intro/conclusion slop, enforce framework bounds.</td>
382
+ </tr>
383
+ <tr style="border-bottom: 1px solid #222225;">
384
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">learn</kbd></td>
385
+ <td style="padding: 12px 16px; color: #c9c9d1;"><code>[--dry-run]</code></td>
386
+ <td style="padding: 12px 16px; color: #a0a0a5;">Analyzes Git diff logs to automatically distill project idioms.</td>
387
+ </tr>
388
+ <tr style="border-bottom: 1px solid #222225;">
389
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">case</kbd></td>
390
+ <td style="padding: 12px 16px; color: #c9c9d1;"><code>add | search &lt;q&gt; | export</code></td>
391
+ <td style="padding: 12px 16px; color: #a0a0a5;">Records, searches, or compiles AI mistake precedents.</td>
392
+ </tr>
393
+ <tr style="border-bottom: 1px solid #222225;">
394
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">memory</kbd></td>
395
+ <td style="padding: 12px 16px; color: #c9c9d1;"><code>store | recall | gc</code></td>
396
+ <td style="padding: 12px 16px; color: #a0a0a5;">Manages 4-type persistent memory with budget-gated recall.</td>
397
+ </tr>
398
+ <tr style="border-bottom: 1px solid #222225;">
399
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">graph</kbd></td>
400
+ <td style="padding: 12px 16px; color: #c9c9d1;">—</td>
401
+ <td style="padding: 12px 16px; color: #a0a0a5;">Maps codebase dependencies and outputs clean context snapshots.</td>
402
+ </tr>
403
+ <tr style="border-bottom: 1px solid #222225;">
404
+ <td style="padding: 12px 16px;"><kbd style="background: #1c1c24; border: 1px solid #333; padding: 2px 6px; border-radius: 4px; color: #ffffff;">marathon</kbd></td>
405
+ <td style="padding: 12px 16px; color: #c9c9d1;"><code>init | status | next</code></td>
406
+ <td style="padding: 12px 16px; color: #a0a0a5;">Sets up and executes long-running autonomous development.</td>
407
+ </tr>
408
+ </tbody>
409
+ </table>
410
+ </div>
303
411
 
304
- ### Which IDEs and AI tools are supported by Tribunal-Kit?
305
- Tribunal-Kit natively supports and automatically syncs rules with **Cursor**, **Windsurf**, **VSCode**, **Gemini**, **Copilot**, and **Claude Desktop**. It also supports terminal-based agents like **Claude Code**, **Aider**, and **OpenCode** via Model Context Protocol (MCP) or compiled static context files.
412
+ <br>
413
+ <hr style="height: 1px; border: none; background: linear-gradient(to right, transparent, #33333f, transparent); margin: 40px 0;" />
306
414
 
307
- ### How do I connect Claude Code or Aider to Tribunal-Kit via MCP?
308
- Tribunal-Kit includes a built-in Model Context Protocol (MCP) server. You can configure your AI assistant (like Claude Desktop or Claude Code) to spawn `node bin/wrapper.js` as an MCP server. This allows the AI agent to dynamically fetch custom skills, search the local case law precedence database, and run audits on demand.
415
+ <!-- SECTION 12 -->
416
+ ## 🤝 Contributing & Security
309
417
 
310
- ### What is the Supreme Court Case Law Engine?
311
- It is a local, lightweight database that records past AI mistakes as legal precedent. Before code generation is committed, the `precedence-reviewer` queries this database to prevent the AI from repeating known codebase anti-patterns.
418
+ We maintain high code standards and absolute runtime safety:
419
+ * **Security Policy**: Tribunal Kit operates with **zero runtime network dependencies**, zero dangerous `eval` executes, and sandboxed file paths to protect your codebase. Read more in [SECURITY.md](SECURITY.md).
420
+ * **Contributing Guide**: We welcome community-authored agents, skills, and workflows! Please read [CONTRIBUTING.md](CONTRIBUTING.md) to set up your local development environment and run our verification tests.
312
421
 
313
422
  <br>
314
423
  <br>
315
424
 
316
- <div align="center">
425
+ <!-- FOOTER -->
426
+ <div align="center" style="background: #111115; border: 1px solid #22222a; border-radius: 8px; padding: 25px; margin-top: 50px;">
317
427
  <img src="https://img.shields.io/badge/Status-Active_&_Secured-ccff00?style=for-the-badge&logoColor=1a1a1a" alt="Status" />
318
428
  <br><br>
319
- <i>"Never guess database column names. Error handling on every async function. Evidence-based closeouts. Welcome to the Tribunal."</i><br>
320
- <sub><b>MIT Licensed</b> • Engineered for maximum autonomy and precision.</sub>
429
+ <span style="font-style: italic; color: #c9c9d1; font-size: 0.95em;">"Never guess database schemas. Verify every async boundary. Welcome to the Tribunal."</span><br><br>
430
+ <sub style="color: #6b6b75;"><b>MIT Licensed</b> • Engineered for ultimate AI code governance.</sub>
321
431
  </div>