tribunal-kit 3.1.0 → 4.0.1

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 (57) hide show
  1. package/.agent/agents/precedence-reviewer.md +213 -0
  2. package/.agent/scripts/append_flow.js +72 -0
  3. package/.agent/scripts/case_law_manager.py +525 -0
  4. package/.agent/scripts/skill_evolution.py +563 -0
  5. package/.agent/skills/agent-organizer/SKILL.md +8 -0
  6. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +8 -0
  7. package/.agent/skills/app-builder/SKILL.md +8 -0
  8. package/.agent/skills/appflow-wireframe/SKILL.md +8 -0
  9. package/.agent/skills/architecture/SKILL.md +169 -161
  10. package/.agent/skills/bash-linux/SKILL.md +9 -0
  11. package/.agent/skills/brainstorming/SKILL.md +8 -0
  12. package/.agent/skills/building-native-ui/SKILL.md +9 -0
  13. package/.agent/skills/clean-code/SKILL.md +8 -0
  14. package/.agent/skills/config-validator/SKILL.md +8 -0
  15. package/.agent/skills/deployment-procedures/SKILL.md +8 -0
  16. package/.agent/skills/devops-incident-responder/SKILL.md +8 -0
  17. package/.agent/skills/documentation-templates/SKILL.md +8 -0
  18. package/.agent/skills/edge-computing/SKILL.md +8 -0
  19. package/.agent/skills/extract-design-system/SKILL.md +8 -0
  20. package/.agent/skills/game-design-expert/SKILL.md +8 -0
  21. package/.agent/skills/game-engineering-expert/SKILL.md +8 -0
  22. package/.agent/skills/geo-fundamentals/SKILL.md +8 -0
  23. package/.agent/skills/i18n-localization/SKILL.md +9 -0
  24. package/.agent/skills/intelligent-routing/SKILL.md +8 -0
  25. package/.agent/skills/lint-and-validate/SKILL.md +8 -0
  26. package/.agent/skills/local-first/SKILL.md +8 -0
  27. package/.agent/skills/mcp-builder/SKILL.md +8 -0
  28. package/.agent/skills/parallel-agents/SKILL.md +8 -0
  29. package/.agent/skills/plan-writing/SKILL.md +8 -0
  30. package/.agent/skills/platform-engineer/SKILL.md +8 -0
  31. package/.agent/skills/playwright-best-practices/SKILL.md +9 -0
  32. package/.agent/skills/project-idioms/SKILL.md +87 -0
  33. package/.agent/skills/python-patterns/SKILL.md +8 -0
  34. package/.agent/skills/readme-builder/SKILL.md +8 -0
  35. package/.agent/skills/red-team-tactics/SKILL.md +8 -0
  36. package/.agent/skills/seo-fundamentals/SKILL.md +9 -0
  37. package/.agent/skills/server-management/SKILL.md +8 -0
  38. package/.agent/skills/shadcn-ui-expert/SKILL.md +9 -0
  39. package/.agent/skills/skill-creator/SKILL.md +8 -0
  40. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +9 -0
  41. package/.agent/skills/swiftui-expert/SKILL.md +9 -0
  42. package/.agent/skills/systematic-debugging/SKILL.md +8 -0
  43. package/.agent/skills/tdd-workflow/SKILL.md +8 -0
  44. package/.agent/skills/ui-ux-pro-max/SKILL.md +8 -0
  45. package/.agent/skills/web-accessibility-auditor/SKILL.md +9 -0
  46. package/.agent/skills/web-design-guidelines/SKILL.md +8 -0
  47. package/.agent/skills/webapp-testing/SKILL.md +8 -0
  48. package/.agent/workflows/generate.md +1 -0
  49. package/.agent/workflows/tribunal-backend.md +2 -1
  50. package/.agent/workflows/tribunal-database.md +2 -1
  51. package/.agent/workflows/tribunal-frontend.md +2 -1
  52. package/.agent/workflows/tribunal-full.md +1 -0
  53. package/.agent/workflows/tribunal-mobile.md +2 -1
  54. package/.agent/workflows/tribunal-performance.md +2 -1
  55. package/README.md +30 -1
  56. package/bin/tribunal-kit.js +182 -20
  57. package/package.json +28 -4
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Writing plans without verification criteria -> ✅ Every plan needs a 'How to verify this worked' section
12
+ - ❌ Planning at the wrong granularity (too high or too low) -> ✅ Plans should be at the component/feature level, not line-by-line or system-wide
13
+ - ❌ Skipping the 'What could go wrong' section -> ✅ Identifying failure modes before implementation prevents costly rework
14
+
15
+ ---
16
+
17
+
10
18
  # Plan Writing — Execution Blueprints Mastery
11
19
 
12
20
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Building internal platforms without talking to developers -> ✅ Platform engineering exists to reduce developer cognitive load; ask them what hurts
12
+ - ❌ Creating golden paths that are mandatory -> ✅ Golden paths should be the easiest option, not the only option
13
+ - ❌ Over-automating before the process is understood -> ✅ Manual first, then script, then platform; premature automation bakes in bad processes
14
+
15
+ ---
16
+
17
+
10
18
  # Platform Engineering — Developer Experience Mastery
11
19
 
12
20
  ---
@@ -7,6 +7,15 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Using `page.waitForTimeout(3000)` for synchronization -> ✅ Use `page.waitForSelector()`, `expect(locator).toBeVisible()`, or auto-waiting locators
12
+ - ❌ Using CSS selectors or XPath for test locators -> ✅ Use `getByRole()`, `getByLabel()`, `getByTestId()` for resilient selectors
13
+ - ❌ Running tests without `--workers=1` in CI debug mode -> ✅ Parallel tests with shared state cause flaky failures; isolate tests properly
14
+ - ❌ Not using `test.describe.configure({ mode: 'serial' })` when tests have ordering dependencies -> ✅ Explicitly mark serial when needed
15
+
16
+ ---
17
+
18
+
10
19
  # Playwright E2E — Bulletproof Testing Mastery
11
20
 
12
21
  ---
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: project-idioms
3
+ description: >
4
+ Auto-evolved skill containing project-specific architectural idioms extracted
5
+ from the developer's own code decisions. Generated by skill_evolution.py.
6
+ Commit this file to share your Engineering Culture across the team.
7
+ Every agent MUST respect these idioms above generic defaults.
8
+ version: auto
9
+ last-updated: 2026-04-09
10
+ digest-cycles: 0
11
+ pattern: generator
12
+ ---
13
+
14
+ ## Hallucination Traps (Read First)
15
+ - ❌ Overriding project idioms without explicit justification -> ✅ Idioms represent team decisions; flag deviations with reasoning
16
+ - ❌ Applying idioms from one project to a different project -> ✅ Idioms are project-specific; verify they apply to the current codebase
17
+
18
+ ---
19
+
20
+
21
+ # Project Idioms — Auto-Evolved Skill
22
+
23
+ > **Authority Level: ABSOLUTE**
24
+ > These idioms were extracted from this project's actual code decisions.
25
+ > They override all generic agent defaults and best practices.
26
+ > Every agent reads this file on activation and adapts its proposals accordingly.
27
+
28
+ ---
29
+
30
+ ## How Idioms Are Born
31
+
32
+ 1. Developer commits code that **differs** from what the AI proposed.
33
+ 2. `skill_evolution.py digest` extracts the architectural delta (semantic filter).
34
+ 3. A minimal LLM prompt (< 500 tokens) identifies the **WHY** behind the change.
35
+ 4. The idiom is recorded here with a stable pattern + reason pair.
36
+ 5. All future code generations must align with these idioms.
37
+
38
+ ---
39
+
40
+ ## Recorded Idioms
41
+
42
+ | ID | Pattern | Why This Project Uses It | Domain | Since |
43
+ |:---|:--------|:-------------------------|:-------|:------|
44
+ | — | — | _No idioms recorded yet. Run your first digest cycle._ | — | — |
45
+
46
+ ---
47
+
48
+ ## How to Add New Idioms
49
+
50
+ Run after committing or staging a meaningful architectural change:
51
+
52
+ ```bash
53
+ # Analyze staged changes (default)
54
+ python .agent/scripts/skill_evolution.py digest
55
+
56
+ # Preview without writing
57
+ python .agent/scripts/skill_evolution.py digest --dry-run
58
+
59
+ # Analyze last commit instead of staged
60
+ python .agent/scripts/skill_evolution.py digest --head
61
+
62
+ # Check current idiom count and token savings
63
+ python .agent/scripts/skill_evolution.py status
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Enforcement Rules for All Agents
69
+
70
+ ```
71
+ □ Before proposing any code: scan the idiom table above
72
+ □ If your proposal contradicts an idiom → flag it explicitly with:
73
+ "⚠️ Note: My proposal differs from Project Idiom #N. Reason: [explain]"
74
+ □ Never override an idiom silently
75
+ □ When citing an idiom in a review:
76
+ "Per Project Idiom #N: [pattern] — [reason]"
77
+ □ If no idioms yet → proceed with domain-standard approaches
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Digest History
83
+
84
+ Last digest: `never`
85
+ Total cycles: `0`
86
+
87
+ Run `python .agent/scripts/skill_evolution.py status` to see full statistics.
@@ -7,6 +7,14 @@ last-updated: 2026-03-12
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Using `dict` for structured data when a dataclass/Pydantic model exists -> ✅ Dicts have no type safety; use typed models
12
+ - ❌ Catching bare `except:` or `except Exception:` -> ✅ Catch specific exceptions; bare except swallows KeyboardInterrupt and SystemExit
13
+ - ❌ Using `os.path` for path operations -> ✅ Use `pathlib.Path` for modern, readable path manipulation
14
+
15
+ ---
16
+
17
+
10
18
  # Python Development Principles
11
19
 
12
20
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-03-19
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Starting a README with the project name as the only heading -> ✅ Lead with what the project DOES, not just what it IS
12
+ - ❌ Skipping installation and quick-start sections -> ✅ Users need to run the project in under 60 seconds or they leave
13
+ - ❌ Using screenshots without alt text -> ✅ All images need descriptive alt text for accessibility and broken image fallback
14
+
15
+ ---
16
+
17
+
10
18
  # README Builder Skill
11
19
 
12
20
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-03-12
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Testing only happy-path authentication -> ✅ Red teaming must test token reuse, expired tokens, forged tokens, and privilege escalation
12
+ - ❌ Reporting vulnerabilities without proof-of-concept -> ✅ Every finding needs a reproducible PoC and severity rating (CVSS)
13
+ - ❌ Stopping after finding the first vulnerability -> ✅ Real attackers chain multiple low-severity issues; test for escalation paths
14
+
15
+ ---
16
+
17
+
10
18
  # Red Team & Penetration Testing Principles
11
19
 
12
20
  A red team engagement is a controlled attack.
@@ -7,6 +7,15 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Using `<div>` for everything instead of semantic HTML -> ✅ Use `<main>`, `<article>`, `<nav>`, `<section>` for crawler comprehension
12
+ - ❌ Multiple `<h1>` tags on a single page -> ✅ One `<h1>` per page; use `<h2>`-`<h6>` for hierarchy
13
+ - ❌ Generating meta descriptions with AI boilerplate -> ✅ Each page needs a unique, specific meta description under 160 characters
14
+ - ❌ Using client-side rendering for content pages -> ✅ SSR/SSG for pages that need to be indexed; CSR is invisible to crawlers without JS rendering
15
+
16
+ ---
17
+
18
+
10
19
  # SEO Fundamentals — Visibility & Discoverability Mastery
11
20
 
12
21
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Running services as root -> ✅ Create a dedicated service user with minimal permissions; never run as root
12
+ - ❌ Using password-based SSH -> ✅ Disable password auth; use SSH key pairs only with `PermitRootLogin no`
13
+ - ❌ Editing nginx config without testing -> ✅ Always run `nginx -t` before `systemctl reload nginx`; syntax errors take down all sites
14
+
15
+ ---
16
+
17
+
10
18
  # Server Management — Production Linux Mastery
11
19
 
12
20
  ---
@@ -7,6 +7,15 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ `import { Button } from 'shadcn-ui'` -> ✅ shadcn/ui is NOT a package; components are copied into YOUR project. Import from `@/components/ui/button`
12
+ - ❌ Using shadcn/ui without initializing it -> ✅ Run `npx shadcn@latest init` first; it generates tailwind config and utils
13
+ - ❌ Assuming all shadcn components are installed -> ✅ Each component must be added separately: `npx shadcn@latest add button`
14
+ - ❌ Overriding Radix primitive props without understanding accessibility -> ✅ Radix handles focus, keyboard, and ARIA; don't break it
15
+
16
+ ---
17
+
18
+
10
19
  # shadcn/ui Expert — Component Architecture Mastery
11
20
 
12
21
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-03-30
7
7
  applies-to-model: claude-3-7-sonnet, gemini-2.5-pro
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Creating skills without frontmatter (name, description, version) -> ✅ Every SKILL.md MUST start with YAML frontmatter
12
+ - ❌ Making skills too broad (covering multiple unrelated domains) -> ✅ One skill = one domain; split if content exceeds 10KB
13
+ - ❌ Creating skills that duplicate existing skills -> ✅ Always check the skills directory before creating a new skill
14
+
15
+ ---
16
+
17
+
10
18
  # Skill Creator
11
19
 
12
20
  You are a Meta-Agent tasked with defining the capabilities of future AI agents by creating rigorous `SKILL.md` files.
@@ -7,6 +7,15 @@ last-updated: 2026-03-30
7
7
  applies-to-model: claude-3-7-sonnet, gemini-2.5-pro
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Using Supabase without enabling Row Level Security (RLS) -> ✅ ALL tables MUST have RLS enabled; without it, data is publicly accessible
12
+ - ❌ `supabase.from('users').select('*')` in client-side code without RLS -> ✅ This exposes ALL rows to ALL users; add RLS policies first
13
+ - ❌ Storing API keys in client-side JavaScript -> ✅ The `anon` key is public by design; protect data with RLS, not key secrecy
14
+ - ❌ Using Supabase Edge Functions for compute-heavy tasks -> ✅ Edge Functions have 150ms CPU time limit; use server functions for heavy work
15
+
16
+ ---
17
+
18
+
10
19
  # Supabase & Postgres Best Practices
11
20
 
12
21
  You are a Supabase Data Architect. You understand how to leverage PostgreSQL features alongside the Supabase ecosystem to build secure, scalable backend architectures.
@@ -7,6 +7,15 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Using `@State` for shared data between views -> ✅ `@State` is local to a view; use `@Binding`, `@Environment`, or `@Observable` for sharing
12
+ - ❌ Putting heavy computation in the `body` property -> ✅ `body` is called on EVERY re-render; move computation to `.task {}` or `onChange`
13
+ - ❌ `List { ForEach(items) { ... } }` without `id:` parameter -> ✅ Always provide `id:` for `Identifiable` conformance or use `\.self`
14
+ - ❌ Using `NavigationView` -> ✅ Deprecated in iOS 16+; use `NavigationStack` or `NavigationSplitView`
15
+
16
+ ---
17
+
18
+
10
19
  # SwiftUI Expert — Native Apple Platforms Mastery
11
20
 
12
21
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Changing multiple things at once to fix a bug -> ✅ Change ONE variable at a time; multiple changes make it impossible to identify the fix
12
+ - ❌ Assuming the bug is where the error message points -> ✅ The error location is often downstream; trace UP the call stack to find root cause
13
+ - ❌ Not reproducing the bug before attempting a fix -> ✅ If you cannot reproduce it reliably, you cannot verify your fix works
14
+
15
+ ---
16
+
17
+
10
18
  # Systematic Debugging — Root Cause Mastery
11
19
 
12
20
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Writing tests that test implementation details instead of behavior -> ✅ Test WHAT it does (inputs/outputs), not HOW (internal methods)
12
+ - ❌ Skipping the Red phase (writing a failing test first) -> ✅ If the test passes before you write the code, it tests nothing
13
+ - ❌ Refactoring during the Red or Green phase -> ✅ Red: write failing test. Green: make it pass minimally. THEN refactor. Never mix phases
14
+
15
+ ---
16
+
17
+
10
18
  # Test-Driven Development (TDD) — Defect-Free Execution Mastery
11
19
 
12
20
  ---
@@ -6,6 +6,14 @@ last-updated: 2026-03-12
6
6
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
7
7
  ---
8
8
 
9
+ ## Hallucination Traps (Read First)
10
+ - ❌ Using purple/violet as primary color -> ✅ #1 AI design cliche; choose signal orange, deep red, teal, or warm neutrals
11
+ - ❌ Default hero layout (left text, right image) without justification -> ✅ Break the template; asymmetry, full-bleed, or typographic approaches
12
+ - ❌ Mesh gradient backgrounds as 'premium' -> ✅ Use grain, solid contrast, or depth instead; mesh gradients are the new stock photo
13
+
14
+ ---
15
+
16
+
9
17
  # UI/UX Pro Max: Peak Performance Frontend Aesthetics
10
18
 
11
19
  This skill guides the creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
@@ -7,6 +7,15 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Adding `role='button'` to a `<div>` instead of using `<button>` -> ✅ Native HTML elements have built-in keyboard and screen reader support
12
+ - ❌ Using `aria-label` on elements that already have visible text -> ✅ Redundant ARIA overrides visible text for screen readers; use only when needed
13
+ - ❌ Color as the only indicator of state -> ✅ Always pair color with icon, text, or pattern for colorblind users (1 in 12 males)
14
+ - ❌ Assuming accessibility is a checklist to run at the end -> ✅ Build accessible from the start; retrofitting is 10x more expensive
15
+
16
+ ---
17
+
18
+
10
19
  # Web Accessibility (a11y) — Inclusive UI Mastery
11
20
 
12
21
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-03-12
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Designing mobile-last (desktop first, then shrinking) -> ✅ Design mobile-first, then enhance for larger screens
12
+ - ❌ Using more than 2-3 font families -> ✅ Stick to 1-2 font families maximum; more creates visual noise
13
+ - ❌ Ignoring touch target sizes on mobile -> ✅ Minimum 44x44px touch targets (Apple HIG) / 48x48dp (Material Design)
14
+
15
+ ---
16
+
17
+
10
18
  # Next-Gen Web Interface Review Guidelines (Pro-Max Level)
11
19
 
12
20
  ---
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Mocking everything in integration tests -> ✅ Integration tests verify real interactions; mock only external services (APIs, DBs)
12
+ - ❌ Testing Library: using `getByTestId` as the primary selector -> ✅ Prefer `getByRole`, `getByLabelText`, `getByText` for user-centric testing
13
+ - ❌ Writing E2E tests that depend on seed data -> ✅ Each test should create its own data in setup and clean up in teardown
14
+
15
+ ---
16
+
17
+
10
18
  # Webapp Testing — Full Stack Pipeline Mastery
11
19
 
12
20
  ---
@@ -73,6 +73,7 @@ When unsure: write `// VERIFY: [specific reason]` instead of hallucinating.
73
73
 
74
74
  **Always active:**
75
75
  ```
76
+ precedence-reviewer→ Enforces repository Case Law and past rejections (Runs First)
76
77
  logic-reviewer → Hallucinated methods, undefined refs, impossible logic
77
78
  security-auditor → OWASP vulnerabilities, hardcoded secrets, injection
78
79
  ```
@@ -22,7 +22,8 @@ $ARGUMENTS
22
22
 
23
23
  ## 4 Active Reviewers (All Run Simultaneously)
24
24
 
25
- ### logic-reviewer
25
+ ### precedence-reviewer → Checks local repo Case Law for past rejections
26
+ logic-reviewer
26
27
  - Hallucinated Express/Hono/Fastify methods
27
28
  - Missing awaits on async operations
28
29
  - Unreachable code after return statements
@@ -22,7 +22,8 @@ $ARGUMENTS
22
22
 
23
23
  ## 3 Active Reviewers (All Run Simultaneously)
24
24
 
25
- ### logic-reviewer
25
+ ### precedence-reviewer → Checks local repo Case Law for past rejections
26
+ logic-reviewer
26
27
  - Prisma methods that don't exist (`findOne` was removed — use `findUnique`)
27
28
  - Transaction that should be `$transaction` but isn't
28
29
  - Pagination query missing total count (returns wrong metadata)
@@ -22,7 +22,8 @@ $ARGUMENTS
22
22
 
23
23
  ## 4 Active Reviewers (All Run Simultaneously)
24
24
 
25
- ### logic-reviewer
25
+ ### precedence-reviewer → Checks local repo Case Law for past rejections
26
+ logic-reviewer
26
27
  - Hallucinated React 19 hooks (non-existent hook names)
27
28
  - useFormState called instead of useActionState (React 19 rename)
28
29
  - useEffect missing dependencies (stale closure)
@@ -24,6 +24,7 @@ $ARGUMENTS
24
24
 
25
25
  ```
26
26
  Tier 1: Always active (universal concerns)
27
+ ├── precedence-reviewer → Checks local repo Case Law for past rejections
27
28
  ├── logic-reviewer → Hallucinated methods, impossible logic, undefined refs
28
29
  └── security-auditor → OWASP 2025, injection, JWT, SSRF, IDOR
29
30
 
@@ -22,7 +22,8 @@ $ARGUMENTS
22
22
 
23
23
  ## 3 Active Reviewers (All Run Simultaneously)
24
24
 
25
- ### logic-reviewer
25
+ ### precedence-reviewer → Checks local repo Case Law for past rejections
26
+ logic-reviewer
26
27
  - `runOnJS` called inside `onUpdate` instead of `onEnd` (runs every frame)
27
28
  - Missing `'worklet'` directive on functions called inside Reanimated
28
29
  - FlatList inside ScrollView (disables virtualization)
@@ -22,7 +22,8 @@ $ARGUMENTS
22
22
 
23
23
  ## 2 Active Reviewers (Both Run Simultaneously)
24
24
 
25
- ### logic-reviewer
25
+ ### precedence-reviewer → Checks local repo Case Law for past rejections
26
+ logic-reviewer
26
27
  - Expensive computation in render function (runs every render)
27
28
  - Missing memoization where React.memo/useMemo would help
28
29
  - Infinite re-render loop (effect updates a value that triggers the effect)
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  [![NPM](https://img.shields.io/npm/v/tribunal-kit?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/tribunal-kit)
9
9
  [![License](https://img.shields.io/badge/License-MIT-8b5cf6?style=for-the-badge)](LICENSE)
10
- [![Version](https://img.shields.io/badge/Version-3.0.0-black?style=for-the-badge)](CHANGELOG.md)
10
+ [![Version](https://img.shields.io/badge/Version-4.0.0_Supreme_Court-black?style=for-the-badge)](CHANGELOG.md)
11
11
  </div>
12
12
 
13
13
 
@@ -59,6 +59,22 @@ No manual tagging required. The system self-organizes.
59
59
 
60
60
  <br>
61
61
 
62
+ ## ▓▒░ THE SUPREME COURT (v4.0)
63
+
64
+ *(New in v4)* The Tribunal Kit now features persistent memory so the AI **never makes the same mistake twice** and automatically learns your team's coding style.
65
+
66
+ **1. The Case Law Engine (Never repeat mistakes)**
67
+ If an agent makes a mistake, you can record it as a legal precedent. Before writing any future code, the `precedence-reviewer` checks this database locally to forcefully block the AI from repeating that mistake.
68
+ - `npx tribunal-kit case add` *(Record an AI hallucination)*
69
+ - `npx tribunal-kit case search "query"` *(Search your precedents)*
70
+
71
+ **2. Skill Evolution Forge (Auto-learns your style)**
72
+ You no longer need to write manual rules. The system reads your Git commits, strips out the noise to save tokens, and automatically extracts your project's unique architectural patterns to teach the AI.
73
+ - `npx tribunal-kit learn` *(Run a learning digest on staged files)*
74
+ - `npx tribunal-kit hook` *(Automate learning every time you `git push`)*
75
+
76
+ <br>
77
+
62
78
  ## ▓▒░ CAPABILITY MATRIX
63
79
 
64
80
  | System Asset | Count | Operational Scope |
@@ -117,6 +133,19 @@ Unleash parallel reviewers on existing code.
117
133
 
118
134
  </details>
119
135
 
136
+ <details>
137
+ <summary><b>⚖️ SUPREME COURT / MEMORY</b></summary>
138
+ <br>
139
+
140
+ | Command | Action |
141
+ | :--- | :--- |
142
+ | <code>npx tribunal-kit case add</code> | Record an AI hallucination to ban it forever. |
143
+ | <code>npx tribunal-kit case search</code> | Search your local database of banned code. |
144
+ | <code>npx tribunal-kit learn</code> | Auto-extract project idioms from your git diffs. |
145
+ | <code>npx tribunal-kit hook</code> | Install a git hook to auto-learn the moment you push. |
146
+
147
+ </details>
148
+
120
149
  <details>
121
150
  <summary><b>🔧 TROUBLESHOOTING & OPS</b></summary>
122
151
  <br>