tribunal-kit 5.7.0 → 5.8.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 (59) hide show
  1. package/.agent/ARCHITECTURE.md +6 -7
  2. package/.agent/agents/frontend-reviewer.md +13 -0
  3. package/.agent/agents/frontend-specialist.md +14 -0
  4. package/.agent/agents/logic-reviewer.md +11 -0
  5. package/.agent/agents/orchestrator.md +15 -0
  6. package/.agent/agents/project-planner.md +5 -0
  7. package/.agent/agents/security-auditor.md +13 -0
  8. package/.agent/agents/ui-ux-auditor.md +7 -31
  9. package/.agent/history/memory/.memory.idx +1693 -0
  10. package/.agent/history/memory/MEMORY.md +123 -0
  11. package/.agent/routing_index.json +694 -714
  12. package/.agent/rules/GEMINI.md +88 -13
  13. package/.agent/scripts/_colors.js +131 -89
  14. package/.agent/scripts/_utils.js +163 -128
  15. package/.agent/scripts/auto_preview.js +207 -197
  16. package/.agent/scripts/bundle_analyzer.js +227 -192
  17. package/.agent/scripts/case_law_manager.js +991 -689
  18. package/.agent/scripts/checklist.js +233 -190
  19. package/.agent/scripts/context_broker.js +930 -605
  20. package/.agent/scripts/dependency_analyzer.js +275 -184
  21. package/.agent/scripts/graph_builder.js +412 -341
  22. package/.agent/scripts/graph_visualizer.js +392 -390
  23. package/.agent/scripts/graph_zoom.js +198 -156
  24. package/.agent/scripts/inner_loop_validator.js +523 -445
  25. package/.agent/scripts/lint_runner.js +199 -157
  26. package/.agent/scripts/marathon_harness.js +819 -661
  27. package/.agent/scripts/minify_context.js +115 -100
  28. package/.agent/scripts/mutation_runner.js +321 -280
  29. package/.agent/scripts/prompt_compiler.js +62 -42
  30. package/.agent/scripts/schema_validator.js +373 -280
  31. package/.agent/scripts/security_scan.js +333 -190
  32. package/.agent/scripts/session_manager.js +306 -270
  33. package/.agent/scripts/skill_evolution.js +810 -637
  34. package/.agent/scripts/skill_integrator.js +327 -307
  35. package/.agent/scripts/strengthen_skills.js +203 -193
  36. package/.agent/scripts/swarm_dispatcher.js +558 -457
  37. package/.agent/scripts/test_runner.js +178 -152
  38. package/.agent/scripts/verify_all.js +200 -168
  39. package/.agent/skills/fabel-protocol/SKILL.md +271 -0
  40. package/.agent/skills/thinking-protocol/SKILL.md +27 -0
  41. package/.agent/workflows/generate.md +2 -1
  42. package/.agent/workflows/tribunal-full.md +4 -3
  43. package/.agent/workflows/tribunal-speed.md +1 -1
  44. package/README.md +184 -58
  45. package/bin/mcp-server.js +496 -173
  46. package/bin/tribunal-kit.js +1245 -987
  47. package/bin/wrapper.js +108 -74
  48. package/dist/cli.js +44 -0
  49. package/dist/commands/align.js +201 -0
  50. package/dist/commands/case.js +23 -0
  51. package/dist/commands/compile.js +84 -0
  52. package/dist/commands/init.js +42 -0
  53. package/dist/commands/learn.js +57 -0
  54. package/dist/commands/memory.js +456 -0
  55. package/package.json +22 -10
  56. package/scripts/benchmark.js +162 -125
  57. package/scripts/changelog.js +196 -168
  58. package/scripts/sync-version.js +94 -81
  59. 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("Usage: node prompt_compiler.js \"Your conversational prompt here\"");
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(/^(?:(?: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);
16
- const action = actionMatch ? actionMatch[1].toLowerCase() : 'execute';
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
- 'react', 'tailwind', 'next.js', 'sql', 'postgres', 'express',
21
- 'python', 'node', 'vue', 'svelte', 'typescript', 'js', 'css',
22
- 'html', 'prisma', 'drizzle'
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('.', '\\.')}\\b`, 'i');
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
- 'react': ['react-specialist', 'frontend-design'],
36
- 'tailwind': ['tailwind-patterns'],
37
- 'next.js': ['nextjs-react-expert', 'react-specialist'],
38
- 'sql': ['sql-pro', 'database-design'],
39
- 'postgres': ['database-design'],
40
- 'express': ['nodejs-best-practices'],
41
- 'python': ['python-pro'],
42
- 'node': ['nodejs-best-practices'],
43
- 'vue': ['vue-expert'],
44
- 'svelte': ['frontend-design'],
45
- 'typescript': ['typescript-advanced'],
46
- 'js': ['clean-code'],
47
- 'css': ['tailwind-patterns'],
48
- 'html': ['frontend-design'],
49
- 'prisma': ['database-design'],
50
- 'drizzle': ['database-design']
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
- 'build': ['architecture'],
55
- 'create': ['architecture'],
56
- 'fix': ['systematic-debugging'],
57
- 'debug': ['systematic-debugging'],
58
- 'refactor': ['clean-code'],
59
- 'update': ['clean-code'],
60
- 'write': ['clean-code'],
61
- 'design': ['frontend-design'],
62
- 'audit': ['vulnerability-scanner', 'lint-and-validate']
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.split('\n').map(line => ' ' + line).join('\n');
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("---");