tribunal-kit 5.7.0 → 5.8.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/ARCHITECTURE.md +6 -7
- package/.agent/agents/frontend-reviewer.md +13 -0
- package/.agent/agents/frontend-specialist.md +14 -0
- package/.agent/agents/logic-reviewer.md +11 -0
- package/.agent/agents/orchestrator.md +15 -0
- package/.agent/agents/security-auditor.md +13 -0
- package/.agent/agents/ui-ux-auditor.md +7 -31
- package/.agent/history/memory/.memory.idx +766 -0
- package/.agent/history/memory/MEMORY.md +62 -0
- package/.agent/routing_index.json +694 -714
- package/.agent/rules/GEMINI.md +58 -8
- package/.agent/scripts/_colors.js +131 -89
- package/.agent/scripts/_utils.js +163 -128
- package/.agent/scripts/auto_preview.js +207 -197
- package/.agent/scripts/bundle_analyzer.js +227 -192
- package/.agent/scripts/case_law_manager.js +991 -689
- package/.agent/scripts/checklist.js +233 -190
- package/.agent/scripts/context_broker.js +930 -605
- package/.agent/scripts/dependency_analyzer.js +275 -184
- package/.agent/scripts/graph_builder.js +412 -341
- package/.agent/scripts/graph_visualizer.js +392 -390
- package/.agent/scripts/graph_zoom.js +198 -156
- package/.agent/scripts/inner_loop_validator.js +523 -445
- package/.agent/scripts/lint_runner.js +199 -157
- package/.agent/scripts/marathon_harness.js +819 -661
- package/.agent/scripts/minify_context.js +115 -100
- package/.agent/scripts/mutation_runner.js +321 -280
- package/.agent/scripts/prompt_compiler.js +62 -42
- package/.agent/scripts/schema_validator.js +373 -280
- package/.agent/scripts/security_scan.js +333 -190
- package/.agent/scripts/session_manager.js +306 -270
- package/.agent/scripts/skill_evolution.js +810 -637
- package/.agent/scripts/skill_integrator.js +327 -307
- package/.agent/scripts/strengthen_skills.js +203 -193
- package/.agent/scripts/swarm_dispatcher.js +558 -457
- package/.agent/scripts/test_runner.js +178 -152
- package/.agent/scripts/verify_all.js +200 -168
- package/.agent/skills/fabel-protocol/SKILL.md +235 -0
- package/.agent/skills/thinking-protocol/SKILL.md +27 -0
- package/.agent/workflows/generate.md +1 -1
- package/.agent/workflows/tribunal-speed.md +1 -1
- package/README.md +53 -53
- package/bin/mcp-server.js +460 -175
- package/bin/tribunal-kit.js +1245 -987
- package/bin/wrapper.js +104 -74
- package/dist/cli.js +31 -0
- package/dist/commands/case.js +23 -0
- package/dist/commands/compile.js +84 -0
- package/dist/commands/init.js +42 -0
- package/dist/commands/learn.js +57 -0
- package/dist/commands/memory.js +456 -0
- package/package.json +2 -2
- package/scripts/benchmark.js +162 -125
- package/scripts/changelog.js +196 -168
- package/scripts/sync-version.js +94 -81
- package/scripts/validate-payload.js +85 -78
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// VERIFY: Using native Node.js only. Zero dependencies to ensure instant execution.
|
|
3
3
|
|
|
4
|
-
const rawInput = process.argv.slice(2).join(
|
|
4
|
+
const rawInput = process.argv.slice(2).join(" ");
|
|
5
5
|
|
|
6
6
|
if (!rawInput) {
|
|
7
|
-
console.error(
|
|
7
|
+
console.error(
|
|
8
|
+
'Usage: node prompt_compiler.js "Your conversational prompt here"',
|
|
9
|
+
);
|
|
8
10
|
process.exit(1);
|
|
9
11
|
}
|
|
10
12
|
|
|
@@ -12,19 +14,34 @@ if (!rawInput) {
|
|
|
12
14
|
const cleanInput = rawInput.trim();
|
|
13
15
|
|
|
14
16
|
// 2. Extract Action (Intent mapping)
|
|
15
|
-
const actionMatch = cleanInput.match(
|
|
16
|
-
|
|
17
|
+
const actionMatch = cleanInput.match(
|
|
18
|
+
/^(?:(?:hey,?\s*|please\s+|can you\s+|could you\s+|would you\s+|i need you to\s+|i want to\s+)*)(build|create|fix|debug|refactor|update|write|design|audit)\b/i,
|
|
19
|
+
);
|
|
20
|
+
const action = actionMatch ? actionMatch[1].toLowerCase() : "execute";
|
|
17
21
|
|
|
18
22
|
// 3. Extract Technology Stack
|
|
19
23
|
const techKeywords = [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
"react",
|
|
25
|
+
"tailwind",
|
|
26
|
+
"next.js",
|
|
27
|
+
"sql",
|
|
28
|
+
"postgres",
|
|
29
|
+
"express",
|
|
30
|
+
"python",
|
|
31
|
+
"node",
|
|
32
|
+
"vue",
|
|
33
|
+
"svelte",
|
|
34
|
+
"typescript",
|
|
35
|
+
"js",
|
|
36
|
+
"css",
|
|
37
|
+
"html",
|
|
38
|
+
"prisma",
|
|
39
|
+
"drizzle",
|
|
23
40
|
];
|
|
24
41
|
|
|
25
42
|
const stack = [];
|
|
26
|
-
techKeywords.forEach(tech => {
|
|
27
|
-
const regex = new RegExp(`\\b${tech.replace(
|
|
43
|
+
techKeywords.forEach((tech) => {
|
|
44
|
+
const regex = new RegExp(`\\b${tech.replace(".", "\\.")}\\b`, "i");
|
|
28
45
|
if (regex.test(cleanInput)) {
|
|
29
46
|
stack.push(tech.toLowerCase());
|
|
30
47
|
}
|
|
@@ -32,56 +49,59 @@ techKeywords.forEach(tech => {
|
|
|
32
49
|
|
|
33
50
|
// 4. Intelligent Pre-Routing
|
|
34
51
|
const routerMap = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
react: ["react-specialist", "frontend-design"],
|
|
53
|
+
tailwind: ["tailwind-patterns"],
|
|
54
|
+
"next.js": ["nextjs-react-expert", "react-specialist"],
|
|
55
|
+
sql: ["sql-pro", "database-design"],
|
|
56
|
+
postgres: ["database-design"],
|
|
57
|
+
express: ["nodejs-best-practices"],
|
|
58
|
+
python: ["python-pro"],
|
|
59
|
+
node: ["nodejs-best-practices"],
|
|
60
|
+
vue: ["vue-expert"],
|
|
61
|
+
svelte: ["frontend-design"],
|
|
62
|
+
typescript: ["typescript-advanced"],
|
|
63
|
+
js: ["clean-code"],
|
|
64
|
+
css: ["tailwind-patterns"],
|
|
65
|
+
html: ["frontend-design"],
|
|
66
|
+
prisma: ["database-design"],
|
|
67
|
+
drizzle: ["database-design"],
|
|
51
68
|
};
|
|
52
69
|
|
|
53
70
|
const actionRouter = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
71
|
+
build: ["architecture"],
|
|
72
|
+
create: ["architecture"],
|
|
73
|
+
fix: ["systematic-debugging"],
|
|
74
|
+
debug: ["systematic-debugging"],
|
|
75
|
+
refactor: ["clean-code"],
|
|
76
|
+
update: ["clean-code"],
|
|
77
|
+
write: ["clean-code"],
|
|
78
|
+
design: ["frontend-design"],
|
|
79
|
+
audit: ["vulnerability-scanner", "lint-and-validate"],
|
|
63
80
|
};
|
|
64
81
|
|
|
65
82
|
const recommendedSkills = new Set();
|
|
66
83
|
|
|
67
84
|
if (actionRouter[action]) {
|
|
68
|
-
actionRouter[action].forEach(s => recommendedSkills.add(s));
|
|
85
|
+
actionRouter[action].forEach((s) => recommendedSkills.add(s));
|
|
69
86
|
}
|
|
70
87
|
|
|
71
|
-
stack.forEach(tech => {
|
|
88
|
+
stack.forEach((tech) => {
|
|
72
89
|
if (routerMap[tech]) {
|
|
73
|
-
routerMap[tech].forEach(s => recommendedSkills.add(s));
|
|
90
|
+
routerMap[tech].forEach((s) => recommendedSkills.add(s));
|
|
74
91
|
}
|
|
75
92
|
});
|
|
76
93
|
|
|
77
94
|
const finalSkills = Array.from(recommendedSkills).slice(0, 3);
|
|
78
95
|
|
|
79
96
|
// 5. Output highly compressed YAML
|
|
80
|
-
console.log(
|
|
97
|
+
console.log("---");
|
|
81
98
|
console.log(`action: ${action}`);
|
|
82
99
|
console.log(`target: |`);
|
|
83
|
-
const indentedTarget = cleanInput
|
|
100
|
+
const indentedTarget = cleanInput
|
|
101
|
+
.split("\n")
|
|
102
|
+
.map((line) => " " + line)
|
|
103
|
+
.join("\n");
|
|
84
104
|
console.log(indentedTarget);
|
|
85
|
-
console.log(`stack: [${stack.join(
|
|
86
|
-
console.log(`recommended_skills: [${finalSkills.join(
|
|
87
|
-
console.log(
|
|
105
|
+
console.log(`stack: [${stack.join(", ")}]`);
|
|
106
|
+
console.log(`recommended_skills: [${finalSkills.join(", ")}]`);
|
|
107
|
+
console.log("---");
|