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.
- package/.agent/ARCHITECTURE.md +12 -12
- package/.agent/agents/complexity-reviewer.md +53 -0
- package/.agent/agents/precedence-reviewer.md +12 -12
- package/.agent/agents/swarm-worker-registry.md +3 -3
- package/.agent/history/integrity_manifest.json +958 -0
- package/.agent/history/memory/.memory.idx +305 -1
- package/.agent/history/memory/MEMORY.md +21 -1
- package/.agent/rules/GEMINI.md +31 -28
- package/.agent/scripts/case_law_manager.js +3 -15
- package/.agent/scripts/context_broker.js +3 -1
- package/.agent/scripts/guardrail_engine.js +643 -0
- package/.agent/scripts/integrity_manifest.js +486 -0
- package/.agent/scripts/signal_detector.js +1 -1
- package/.agent/scripts/skill_evolution.js +3 -15
- package/.agent/scripts/skill_integrator.js +2 -12
- package/.agent/scripts/swarm_dispatcher.js +2 -12
- package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
- package/.agent/skills/60fps-animation/SKILL.md +78 -0
- package/.agent/skills/accessible-animation/SKILL.md +86 -0
- package/.agent/skills/adapt/SKILL.md +75 -0
- package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
- package/.agent/skills/animation-systems/SKILL.md +69 -0
- package/.agent/skills/antfu-conventions/SKILL.md +74 -0
- package/.agent/skills/app-builder/SKILL.md +1 -1
- package/.agent/skills/apple-design/SKILL.md +108 -0
- package/.agent/skills/audit-and-fix/SKILL.md +83 -0
- package/.agent/skills/baseline-ui/SKILL.md +74 -0
- package/.agent/skills/better-colors/SKILL.md +124 -0
- package/.agent/skills/better-typography/SKILL.md +111 -0
- package/.agent/skills/better-ui/SKILL.md +102 -0
- package/.agent/skills/bolder/SKILL.md +68 -0
- package/.agent/skills/build-primitive/SKILL.md +70 -0
- package/.agent/skills/clarify/SKILL.md +75 -0
- package/.agent/skills/cobejs/SKILL.md +96 -0
- package/.agent/skills/codebase-design/SKILL.md +84 -0
- package/.agent/skills/colorize/SKILL.md +77 -0
- package/.agent/skills/compact-landing/SKILL.md +70 -0
- package/.agent/skills/company-logos/SKILL.md +73 -0
- package/.agent/skills/create-design-md/SKILL.md +104 -0
- package/.agent/skills/critique/SKILL.md +95 -0
- package/.agent/skills/delight/SKILL.md +65 -0
- package/.agent/skills/design-lab/SKILL.md +59 -0
- package/.agent/skills/diagnosing-bugs/SKILL.md +190 -0
- package/.agent/skills/distill/SKILL.md +65 -0
- package/.agent/skills/domain-modeling/SKILL.md +78 -0
- package/.agent/skills/fixing-accessibility/SKILL.md +98 -0
- package/.agent/skills/fixing-metadata/SKILL.md +97 -0
- package/.agent/skills/fixing-motion-performance/SKILL.md +96 -0
- package/.agent/skills/gpt-taste/SKILL.md +68 -0
- package/.agent/skills/harden/SKILL.md +74 -0
- package/.agent/skills/impeccable/SKILL.md +72 -0
- package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
- package/.agent/skills/improve-ui/SKILL.md +83 -0
- package/.agent/skills/landing-page/SKILL.md +88 -0
- package/.agent/skills/lint-and-validate/SKILL.md +1 -2
- package/.agent/skills/local-first-architecture/SKILL.md +66 -0
- package/.agent/skills/lottie-animation/SKILL.md +82 -0
- package/.agent/skills/marquee-loop/SKILL.md +96 -0
- package/.agent/skills/masked-reveal/SKILL.md +88 -0
- package/.agent/skills/micro-interaction/SKILL.md +100 -0
- package/.agent/skills/morphing-icons/SKILL.md +85 -0
- package/.agent/skills/page-transition-animation/SKILL.md +108 -0
- package/.agent/skills/parallel-agents/SKILL.md +5 -5
- package/.agent/skills/polish/SKILL.md +63 -0
- package/.agent/skills/pricing-page/SKILL.md +68 -0
- package/.agent/skills/progressive-blur/SKILL.md +100 -0
- package/.agent/skills/project-idioms/SKILL.md +7 -7
- package/.agent/skills/quieter/SKILL.md +68 -0
- package/.agent/skills/react-doctor/SKILL.md +70 -0
- package/.agent/skills/redesign-skill/SKILL.md +65 -0
- package/.agent/skills/shape/SKILL.md +73 -0
- package/.agent/skills/soft-skill/SKILL.md +72 -0
- package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
- package/.agent/skills/svg-animation/SKILL.md +91 -0
- package/.agent/skills/swiss-design/SKILL.md +64 -0
- package/.agent/skills/taste-skill/SKILL.md +71 -0
- package/.agent/skills/tdd-workflow/SKILL.md +36 -165
- package/.agent/skills/test-result-analyzer/SKILL.md +1 -1
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
- package/.agent/skills/transitions-dev/SKILL.md +101 -0
- package/.agent/skills/typeset/SKILL.md +76 -0
- package/.agent/skills/ui-skills-root/SKILL.md +85 -0
- package/.agent/skills/web-quality-audit/SKILL.md +67 -0
- package/.agent/workflows/fix.md +2 -2
- package/.agent/workflows/preview.md +5 -5
- package/.agent/workflows/status.md +1 -1
- package/.agent/workflows/tribunal-full.md +3 -3
- package/.agent/workflows/tribunal-speed.md +2 -2
- package/README.md +348 -238
- package/bin/tribunal-kit.js +62 -1482
- package/dist/cli.js +13 -0
- package/dist/commands/align.js +1 -1
- package/dist/commands/compile.js +1 -1
- package/dist/commands/guardrail.js +275 -0
- package/dist/commands/init.js +10 -9
- package/dist/commands/optimize.js +318 -0
- package/dist/utils/version.js +1 -1
- package/package.json +10 -8
- package/scripts/fix-vbc.js +98 -0
- package/scripts/fix-vbc.ps1 +119 -0
package/.agent/ARCHITECTURE.md
CHANGED
|
@@ -71,7 +71,7 @@ Type any of these in your AI IDE chat:
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
-
## The
|
|
74
|
+
## The 20 Tribunal Reviewers
|
|
75
75
|
|
|
76
76
|
| Agent | File | Activates When |
|
|
77
77
|
| ------------------------ | ---------------------------------- | ----------------------------------------------------------------------------------- |
|
|
@@ -150,7 +150,7 @@ The Swarm system decomposes complex multi-domain goals into independent sub-task
|
|
|
150
150
|
| `agent-organizer` | Specialist agent operations |
|
|
151
151
|
| `project-planner` | 4-phase structured planning |
|
|
152
152
|
| `backend-specialist` | API, server, auth |
|
|
153
|
-
| `
|
|
153
|
+
| `csharp-developer` | C# / .NET architecture |
|
|
154
154
|
| `python-pro` | Python backend development |
|
|
155
155
|
| `frontend-specialist` | Web UI / Components |
|
|
156
156
|
| `react-specialist` | React / Next.js architecture |
|
|
@@ -228,17 +228,17 @@ All scripts live in `.agent/scripts/`:
|
|
|
228
228
|
| -------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
229
229
|
| `checklist.js` | Priority-ordered project audit | `node .agent/scripts/checklist.js .` |
|
|
230
230
|
| `verify_all.js` | Full pre-deploy validation | `node .agent/scripts/verify_all.js` |
|
|
231
|
-
| `auto_preview.
|
|
231
|
+
| `auto_preview.js` | Local dev server management | `node .agent/scripts/auto_preview.js start` |
|
|
232
232
|
| `session_manager.js` | Multi-session state tracking | `node .agent/scripts/session_manager.js status` |
|
|
233
|
-
| `lint_runner.
|
|
234
|
-
| `test_runner.
|
|
233
|
+
| `lint_runner.js` | Standalone lint runner | `node .agent/scripts/lint_runner.js . --fix` |
|
|
234
|
+
| `test_runner.js` | Auto-detecting test runner | `node .agent/scripts/test_runner.js . --coverage` |
|
|
235
235
|
| `security_scan.js` | OWASP-aware source code scanner | `node .agent/scripts/security_scan.js .` |
|
|
236
|
-
| `dependency_analyzer.
|
|
237
|
-
| `schema_validator.
|
|
238
|
-
| `bundle_analyzer.
|
|
239
|
-
| `strengthen_skills.
|
|
236
|
+
| `dependency_analyzer.js` | Unused/phantom dep checker | `node .agent/scripts/dependency_analyzer.js . --audit` |
|
|
237
|
+
| `schema_validator.js` | DB schema validator | `node .agent/scripts/schema_validator.js .` |
|
|
238
|
+
| `bundle_analyzer.js` | JS/TS bundle size analyzer | `node .agent/scripts/bundle_analyzer.js . --build` |
|
|
239
|
+
| `strengthen_skills.js` | Appends Tribunal guardrails (LLM Traps + Pre-Flight + VBC) to skills missing them | `node .agent/scripts/strengthen_skills.js . --dry-run` |
|
|
240
240
|
| `swarm_dispatcher.js` | Validate Orchestrator micro-worker JSON payloads | `node .agent/scripts/swarm_dispatcher.js --file payload.json` |
|
|
241
|
-
| `skill_integrator.
|
|
241
|
+
| `skill_integrator.js` | Map active skills to executable scripts | `node .agent/scripts/skill_integrator.js` |
|
|
242
242
|
| `test_swarm_dispatcher.js` | Unit tests for swarm_dispatcher | `npx jest test/integration/swarm_dispatcher.test.js` |
|
|
243
243
|
|
|
244
244
|
---
|
|
@@ -267,12 +267,12 @@ Script failures follow cascade rules:
|
|
|
267
267
|
.agent/
|
|
268
268
|
├── ARCHITECTURE.md ← This file
|
|
269
269
|
├── GEMINI.md ← Root behavior config (includes /swarm routing)
|
|
270
|
-
├── agents/ ←
|
|
270
|
+
├── agents/ ← 44 specialist + reviewer agents (19 reviewers + 25 domain)
|
|
271
271
|
│ ├── supervisor-agent.md ← Swarm triage, dispatch, synthesis
|
|
272
272
|
│ ├── swarm-worker-contracts.md ← WorkerRequest/WorkerResult schemas
|
|
273
273
|
│ └── swarm-worker-registry.md ← Task type → agent routing map
|
|
274
274
|
├── rules/GEMINI.md ← Master rules (P0 priority)
|
|
275
|
-
├── scripts/ ←
|
|
275
|
+
├── scripts/ ← 29 JS automation scripts
|
|
276
276
|
├── skills/ ← 106 modular skill packages (all hardened)
|
|
277
277
|
├── patterns/ ← 5 ADK skill base patterns
|
|
278
278
|
├── history/ ← Case Law + Skill Evolution data (user-generated, preserved on update)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: complexity-reviewer
|
|
3
|
+
description: Enforces the Dependency Ladder to prevent over-engineering. Audits every generated code snippet for redundant dependencies, unnecessary abstractions, premature optimization, and custom implementations of standard library or native platform features. Activates automatically on all /generate, /review, and /tribunal-* commands.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-18
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Complexity Reviewer — The Pragmatist
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Core Mandate
|
|
13
|
+
|
|
14
|
+
You have one job: enforce the **Dependency Ladder** and prevent over-engineering. Audit code changes to ensure that the developer has chosen the simplest possible implementation and avoided unnecessary dependencies.
|
|
15
|
+
|
|
16
|
+
**Your burden of proof:** Every custom utility or imported package must justify its existence. If a feature can be implemented using native platform elements, standard library functions, or packages already present in `package.json`, you must reject the proposal and guide the developer back down the ladder.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## The 6 Rungs of the Dependency Ladder
|
|
21
|
+
|
|
22
|
+
Before code is accepted, you must verify that the implementation sits at the lowest successful rung:
|
|
23
|
+
|
|
24
|
+
1. **Existence**: Does the feature actually need to exist?
|
|
25
|
+
2. **Stdlib**: Can this be done with the language standard library?
|
|
26
|
+
3. **Platform**: Can the native platform (HTML5, CSS, Web APIs, standard browser features) handle it?
|
|
27
|
+
4. **Installed Dep**: Can an already-installed dependency solve it?
|
|
28
|
+
5. **One Line**: Can this be solved in a single line of custom code?
|
|
29
|
+
6. **Minimum**: Write the absolute minimum custom code that works (no premature abstractions).
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Section 1: Common Over-Engineering Patterns to Reject
|
|
34
|
+
|
|
35
|
+
| Anti-Pattern | Why It's Rejected | Real Alternative (Lower Rung) |
|
|
36
|
+
| :--- | :--- | :--- |
|
|
37
|
+
| Importing `lodash` or similar utility library | Standard library handles most collections/strings | Use native `Array.prototype` methods or modern JS features |
|
|
38
|
+
| Custom React/Vue slider/carousel component | Heavy, complex, prone to accessibility bugs | Native CSS Scroll Snap or standard platform elements |
|
|
39
|
+
| Hand-rolling custom cryptographic / hashing utils | Prone to security vulnerabilities and bugs | Use standard Node.js `crypto` or Web Crypto API |
|
|
40
|
+
| Elaborate helper/wrapper layers for simple APIs | Wastes context, adds cognitive overhead | Direct API consumption (Keep It Simple) |
|
|
41
|
+
| Adding new NPM packages for simple tasks | Bloats bundle, introduces supply-chain risk | Write a simple pure function locally |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Section 2: Review Verdict Guidelines
|
|
46
|
+
|
|
47
|
+
Your review should output one of two verdicts:
|
|
48
|
+
|
|
49
|
+
### 1. `✅ APPROVED`
|
|
50
|
+
The code is simple, uses native platform capabilities, does not introduce unnecessary dependencies, and follows the Dependency Ladder.
|
|
51
|
+
|
|
52
|
+
### 2. `❌ REJECTED`
|
|
53
|
+
The code is over-engineered, introduces a redundant dependency, or implements custom logic where a standard library/platform API exists. Provide a clear alternative showing how to rewrite the code at a lower rung.
|
|
@@ -59,7 +59,7 @@ Keywords to flag:
|
|
|
59
59
|
Run the following command to search for relevant precedents:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
|
|
62
|
+
node .agent/scripts/case_law_manager.js search-cases --query "<extracted keywords>"
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
This uses **TF-IDF weighted cosine similarity**. No LLM is called. No tokens consumed.
|
|
@@ -95,7 +95,7 @@ reviewer delivers a verdict.
|
|
|
95
95
|
□ Developer explicitly overrides this precedent (requires human approval)
|
|
96
96
|
|
|
97
97
|
To override, run:
|
|
98
|
-
|
|
98
|
+
node .agent/scripts/case_law_manager.js add-case
|
|
99
99
|
And record a new case with verdict: APPROVED_WITH_CONDITIONS
|
|
100
100
|
```
|
|
101
101
|
|
|
@@ -109,7 +109,7 @@ reviewer delivers a verdict.
|
|
|
109
109
|
Summary : [REASON_SUMMARY]
|
|
110
110
|
|
|
111
111
|
The proposed code may be related to a past decision. Review before approving.
|
|
112
|
-
Run:
|
|
112
|
+
Run: node .agent/scripts/case_law_manager.js show --id [ID]
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
### If similarity score < 0.2 → CLEAR
|
|
@@ -131,7 +131,7 @@ Case Law, prompt the developer:
|
|
|
131
131
|
The [reviewer-name] just rejected code for a new reason not in Case Law.
|
|
132
132
|
Record this decision to prevent future repetition:
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
node .agent/scripts/case_law_manager.js add-case
|
|
135
135
|
|
|
136
136
|
This takes < 60 seconds and permanently strengthens your Tribunal.
|
|
137
137
|
```
|
|
@@ -148,7 +148,7 @@ rejection as a new case. This is NOT optional — the Supreme Court depends on i
|
|
|
148
148
|
**Action:** Run the following command (non-interactive, no human input needed):
|
|
149
149
|
|
|
150
150
|
```bash
|
|
151
|
-
|
|
151
|
+
node .agent/scripts/case_law_manager.js auto-record \
|
|
152
152
|
--diff "<the rejected code snippet>" \
|
|
153
153
|
--reason "<the reviewer's rejection reason>" \
|
|
154
154
|
--domain <domain> \
|
|
@@ -229,23 +229,23 @@ Human Gate receives your hold as a hard blocker alongside their verdicts.
|
|
|
229
229
|
|
|
230
230
|
```bash
|
|
231
231
|
# Search Case Law (TF-IDF cosine — zero tokens)
|
|
232
|
-
|
|
232
|
+
node .agent/scripts/case_law_manager.js search-cases --query "useEffect dependency"
|
|
233
233
|
|
|
234
234
|
# Record a new rejection (interactive)
|
|
235
|
-
|
|
235
|
+
node .agent/scripts/case_law_manager.js add-case
|
|
236
236
|
|
|
237
237
|
# Auto-record a rejection (non-interactive — for AI agents)
|
|
238
|
-
|
|
238
|
+
node .agent/scripts/case_law_manager.js auto-record --diff "code" --reason "why" --domain security
|
|
239
239
|
|
|
240
240
|
# View full case
|
|
241
|
-
|
|
241
|
+
node .agent/scripts/case_law_manager.js show --id 7
|
|
242
242
|
|
|
243
243
|
# Overrule a past precedent
|
|
244
|
-
|
|
244
|
+
node .agent/scripts/case_law_manager.js overrule --id 7 --reason "no longer applicable"
|
|
245
245
|
|
|
246
246
|
# See all cases
|
|
247
|
-
|
|
247
|
+
node .agent/scripts/case_law_manager.js list
|
|
248
248
|
|
|
249
249
|
# Export full history
|
|
250
|
-
|
|
250
|
+
node .agent/scripts/case_law_manager.js export
|
|
251
251
|
```
|
|
@@ -16,7 +16,7 @@ All agents listed here MUST exist as `.md` files in `.agent/agents/`.
|
|
|
16
16
|
| `research` | performance, profiling, optimization | `performance-optimizer` |
|
|
17
17
|
| `generate_code` | api, route, endpoint, server, express, auth, jwt | `backend-specialist` |
|
|
18
18
|
| `generate_code` | python, fastapi, django, flask | `python-pro` |
|
|
19
|
-
| `generate_code` | c#, .net, blazor, aspnet | `
|
|
19
|
+
| `generate_code` | c#, .net, blazor, aspnet | `csharp-developer` |
|
|
20
20
|
| `generate_code` | component, hook, react, next, ui, css | `frontend-specialist` |
|
|
21
21
|
| `generate_code` | mobile, react native, flutter, ios, android | `mobile-developer` |
|
|
22
22
|
| `generate_code` | docker, ci, cd, deploy, github actions, cloud | `devops-engineer` |
|
|
@@ -54,7 +54,7 @@ Quick reference for Supervisor triage. Full instructions are in each agent's `.m
|
|
|
54
54
|
| -------------------------- | ------------------------------------------------ | ----------------------- |
|
|
55
55
|
| `backend-specialist.md` | REST APIs, auth flows, server logic | React components |
|
|
56
56
|
| `python-pro.md` | FastAPI, Django, data scripts | Node/TypeScript code |
|
|
57
|
-
| `
|
|
57
|
+
| `csharp-developer` | .NET 8+, C#, Blazor, AOT | Python or Node backends |
|
|
58
58
|
| `frontend-specialist.md` | Web UI, CSS, components | Server code |
|
|
59
59
|
| `react-specialist.md` | Advanced React patterns, Next.js architecture | Vue or mobile |
|
|
60
60
|
| `vue-expert.md` | Vue 3, Nuxt 3, Pinia | React or Angular |
|
|
@@ -89,4 +89,4 @@ When a new specialist agent is added to `.agent/agents/`, update this registry:
|
|
|
89
89
|
|
|
90
90
|
1. Add a row to the **Primary Routing Table** for each `type` and keyword combination it handles
|
|
91
91
|
2. Add a row to the **Agent Capability Summary** with "Best For" and "Do NOT Use For" guidance
|
|
92
|
-
3. Run `
|
|
92
|
+
3. Run `node .agent/scripts/verify_all.js` to verify consistency
|