tribunal-kit 4.3.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/history/architecture-explorer.html +352 -0
- package/.agent/history/architecture-graph.yaml +109 -0
- package/.agent/history/graph-cache.json +215 -0
- package/.agent/history/snapshots/migrate_refs.js.json +11 -0
- package/.agent/history/snapshots/scripts__changelog.js.json +12 -0
- package/.agent/history/snapshots/scripts__sync-version.js.json +11 -0
- package/.agent/history/snapshots/scripts__validate-payload.js.json +11 -0
- package/.agent/history/snapshots/test__integration__bridges.test.js.json +13 -0
- package/.agent/history/snapshots/test__integration__init.test.js.json +13 -0
- package/.agent/history/snapshots/test__integration__routing.test.js.json +11 -0
- package/.agent/history/snapshots/test__integration__swarm_dispatcher.test.js.json +13 -0
- package/.agent/history/snapshots/test__integration__wave2.test.js.json +13 -0
- package/.agent/history/snapshots/test__unit__args.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__case_law_manager.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__copyDir.test.js.json +13 -0
- package/.agent/history/snapshots/test__unit__graph_tools.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__selfInstall.test.js.json +13 -0
- package/.agent/history/snapshots/test__unit__semver.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__swarm_dispatcher.test.js.json +11 -0
- package/.agent/scripts/dependency_analyzer.js +1 -1
- package/.agent/scripts/graph_builder.js +311 -199
- package/.agent/scripts/graph_visualizer.js +384 -0
- package/.agent/scripts/mutation_runner.js +280 -0
- package/.agent/skills/knowledge-graph/SKILL.md +52 -36
- package/.agent/skills/testing-patterns/SKILL.md +19 -2
- package/.agent/skills/ui-ux-pro-max/SKILL.md +562 -125
- package/bin/tribunal-kit.js +129 -1
- package/package.json +1 -1
|
@@ -1,36 +1,52 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Knowledge Graph Analyzer
|
|
3
|
-
description: Understands the architecture and dependencies of the codebase without token bloat.
|
|
4
|
-
version:
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /graph — Knowledge Graph Skill
|
|
8
|
-
|
|
9
|
-
Use this skill when the user types `/graph` or when you need to deeply understand the architecture of an unfamiliar codebase without suffering from context-window bloat.
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
---
|
|
2
|
+
name: Knowledge Graph Analyzer
|
|
3
|
+
description: Understands the architecture, risk blast radius, and dependencies of the codebase without token bloat. Now includes Context Snapshots for 27x token reduction.
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /graph — Knowledge Graph Skill v3.0
|
|
8
|
+
|
|
9
|
+
Use this skill when the user types `/graph` or when you need to deeply understand the architecture of an unfamiliar codebase without suffering from context-window bloat.
|
|
10
|
+
|
|
11
|
+
## The Token Reduction Protocol (Option C)
|
|
12
|
+
|
|
13
|
+
**DO NOT READ RAW SOURCE FILES IF A SNAPSHOT EXISTS.**
|
|
14
|
+
Reading raw project files wastes up to 50,000 tokens per edit. You must use the pre-computed Context Snapshots instead. These snapshots contain the file's content, resolved imports, dependent files, and risk scores all in one JSON blob.
|
|
15
|
+
|
|
16
|
+
## Pre-Flight Checklist
|
|
17
|
+
- [ ] Have I run the Macro Mapper to generate the latest Context Snapshots?
|
|
18
|
+
- [ ] Am I reading from `.agent/history/snapshots/` instead of directly grepping the project?
|
|
19
|
+
- [ ] Have I respected the `blastRadius` before modifying a file?
|
|
20
|
+
|
|
21
|
+
## Execution Protocol
|
|
22
|
+
|
|
23
|
+
1. **Step 1: The Macro Map (Blast Radius & Snapshot Engine)**
|
|
24
|
+
Execute the graph builder to map module boundaries and compute downstream risk scores. This also automatically generates a Context Snapshot for every file.
|
|
25
|
+
```bash
|
|
26
|
+
node .agent/scripts/graph_builder.js
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **Step 2: Read Context Snapshots (MANDATORY)**
|
|
30
|
+
Instead of using `cat` or `grep` to read a file, read its snapshot. Snapshots are stored in `.agent/history/snapshots/` with slashes replaced by `__`.
|
|
31
|
+
*Example:* To edit `src/middleware/auth.js`, read `.agent/history/snapshots/src__middleware__auth.js.json`.
|
|
32
|
+
|
|
33
|
+
This gives you:
|
|
34
|
+
- The full source code of the target file.
|
|
35
|
+
- The exported symbols of every file it imports.
|
|
36
|
+
- The list of files that depend on it.
|
|
37
|
+
- Its exact `riskScore` and `blastRadius`.
|
|
38
|
+
|
|
39
|
+
3. **Step 3: Interactive Visualization (For Humans)**
|
|
40
|
+
The user can view a sleek, zero-dependency visualizer of the codebase. You can prompt them to run:
|
|
41
|
+
```bash
|
|
42
|
+
npx tribunal-kit graph
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
4. **Step 4: The Micro Zoom (Legacy Street View)**
|
|
46
|
+
If a snapshot is unavailable or too large, you can fall back to the zoomer to get its structural skeleton:
|
|
47
|
+
```bash
|
|
48
|
+
node .agent/scripts/graph_zoom.js --focus <path_to_file>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## VBC Protocol (Verification-Before-Completion)
|
|
52
|
+
You are explicitly forbidden from guessing or "hallucinating" what functions, props, or variables exist inside a file. You MUST read the Context Snapshot (or use `graph_zoom.js`) to verify a component's exact signature before you attempt to call it, mock it, or rewrite it. Always respect the Blast Radius Risk Score before deleting or mutating files.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
name: testing-patterns
|
|
3
3
|
description: Testing mastery across stacks. Unit testing with Jest/Vitest/pytest, integration testing, E2E with Playwright, mocking strategies, test architecture (AAA, Given-When-Then), code coverage, snapshot testing, API testing, component testing with Testing Library, and TDD workflow. Use when writing tests, designing test architecture, or improving test coverage.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version: 2.
|
|
6
|
-
last-updated: 2026-04-
|
|
5
|
+
version: 2.1.0
|
|
6
|
+
last-updated: 2026-04-26
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -471,6 +471,23 @@ describe("POST /api/users", () => {
|
|
|
471
471
|
|
|
472
472
|
---
|
|
473
473
|
|
|
474
|
+
## Mutation Testing (Tribunal Engine)
|
|
475
|
+
|
|
476
|
+
```bash
|
|
477
|
+
# Run the Tribunal Mutation Engine
|
|
478
|
+
npx tribunal-kit mutate src/math.js "npx jest src/math.test.js"
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
```
|
|
482
|
+
Mutation Engine rules:
|
|
483
|
+
- Code coverage only proves code was EXECUTED, not that it was TESTED.
|
|
484
|
+
- The Mutation Engine swaps operators (=== to !==) and verifies the test suite FAILS.
|
|
485
|
+
- If the test passes despite the mutation, the mutant "survives" (false positive test).
|
|
486
|
+
- Use this engine on critical business logic to eradicate LLM "tautological" tests.
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
474
491
|
## Code Coverage
|
|
475
492
|
|
|
476
493
|
```jsonc
|