tribunal-kit 4.4.1 → 4.4.3

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 (141) hide show
  1. package/.agent/history/architecture-graph.yaml +140 -0
  2. package/.agent/history/graph-cache.json +262 -0
  3. package/.agent/history/snapshots/bin__tribunal-kit.js.json +19 -0
  4. package/.agent/history/snapshots/eslint.config.js.json +9 -0
  5. package/.agent/history/snapshots/migrate_refs.js.json +11 -0
  6. package/.agent/history/snapshots/scripts__changelog.js.json +13 -0
  7. package/.agent/history/snapshots/scripts__sync-version.js.json +12 -0
  8. package/.agent/history/snapshots/scripts__validate-payload.js.json +12 -0
  9. package/.agent/history/snapshots/test__integration__bridges.test.js.json +14 -0
  10. package/.agent/history/snapshots/test__integration__init.test.js.json +14 -0
  11. package/.agent/history/snapshots/test__integration__routing.test.js.json +12 -0
  12. package/.agent/history/snapshots/test__integration__swarm_dispatcher.test.js.json +14 -0
  13. package/.agent/history/snapshots/test__integration__wave2.test.js.json +14 -0
  14. package/.agent/history/snapshots/test__unit__args.test.js.json +20 -0
  15. package/.agent/history/snapshots/test__unit__case_law_manager.test.js.json +11 -0
  16. package/.agent/history/snapshots/test__unit__context_broker.test.js.json +11 -0
  17. package/.agent/history/snapshots/test__unit__copyDir.test.js.json +23 -0
  18. package/.agent/history/snapshots/test__unit__graph_tools.test.js.json +12 -0
  19. package/.agent/history/snapshots/test__unit__inner_loop_validator.test.js.json +11 -0
  20. package/.agent/history/snapshots/test__unit__selfInstall.test.js.json +23 -0
  21. package/.agent/history/snapshots/test__unit__semver.test.js.json +20 -0
  22. package/.agent/history/snapshots/test__unit__swarm_dispatcher.test.js.json +12 -0
  23. package/.agent/scripts/_colors.js +170 -18
  24. package/.agent/scripts/_utils.js +244 -42
  25. package/.agent/scripts/bundle_analyzer.js +261 -290
  26. package/.agent/scripts/case_law_manager.js +1 -7
  27. package/.agent/scripts/checklist.js +278 -266
  28. package/.agent/scripts/colors.js +11 -17
  29. package/.agent/scripts/context_broker.js +1 -7
  30. package/.agent/scripts/dependency_analyzer.js +234 -272
  31. package/.agent/scripts/graph_builder.js +46 -18
  32. package/.agent/scripts/graph_visualizer.js +10 -4
  33. package/.agent/scripts/graph_zoom.js +6 -4
  34. package/.agent/scripts/inner_loop_validator.js +2 -8
  35. package/.agent/scripts/lint_runner.js +186 -187
  36. package/.agent/scripts/marathon_harness.js +799 -0
  37. package/.agent/scripts/prompt_compiler.js +56 -0
  38. package/.agent/scripts/schema_validator.js +8 -25
  39. package/.agent/scripts/security_scan.js +276 -303
  40. package/.agent/scripts/session_manager.js +1 -7
  41. package/.agent/scripts/skill_evolution.js +1 -8
  42. package/.agent/scripts/skill_integrator.js +1 -7
  43. package/.agent/scripts/test_runner.js +186 -193
  44. package/.agent/scripts/utils.js +17 -32
  45. package/.agent/scripts/verify_all.js +248 -257
  46. package/.agent/skills/agent-organizer/SKILL.md +42 -0
  47. package/.agent/skills/agentic-patterns/SKILL.md +42 -0
  48. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +42 -0
  49. package/.agent/skills/api-patterns/SKILL.md +42 -0
  50. package/.agent/skills/api-security-auditor/SKILL.md +42 -0
  51. package/.agent/skills/app-builder/SKILL.md +42 -0
  52. package/.agent/skills/appflow-wireframe/SKILL.md +42 -0
  53. package/.agent/skills/architecture/SKILL.md +42 -0
  54. package/.agent/skills/authentication-best-practices/SKILL.md +42 -0
  55. package/.agent/skills/backend-security-expert/SKILL.md +122 -0
  56. package/.agent/skills/bash-linux/SKILL.md +42 -0
  57. package/.agent/skills/behavioral-modes/SKILL.md +42 -0
  58. package/.agent/skills/brainstorming/SKILL.md +42 -0
  59. package/.agent/skills/building-native-ui/SKILL.md +42 -0
  60. package/.agent/skills/clean-code/SKILL.md +42 -0
  61. package/.agent/skills/code-review-checklist/SKILL.md +42 -0
  62. package/.agent/skills/config-validator/SKILL.md +42 -0
  63. package/.agent/skills/csharp-developer/SKILL.md +42 -0
  64. package/.agent/skills/data-validation-schemas/SKILL.md +42 -0
  65. package/.agent/skills/database-design/SKILL.md +42 -0
  66. package/.agent/skills/deployment-procedures/SKILL.md +42 -0
  67. package/.agent/skills/devops-engineer/SKILL.md +42 -0
  68. package/.agent/skills/devops-incident-responder/SKILL.md +42 -0
  69. package/.agent/skills/documentation-templates/SKILL.md +42 -0
  70. package/.agent/skills/edge-computing/SKILL.md +42 -0
  71. package/.agent/skills/error-resilience/SKILL.md +42 -0
  72. package/.agent/skills/extract-design-system/SKILL.md +42 -0
  73. package/.agent/skills/framer-motion-expert/SKILL.md +42 -0
  74. package/.agent/skills/frontend-design/SKILL.md +42 -0
  75. package/.agent/skills/frontend-security-expert/SKILL.md +123 -0
  76. package/.agent/skills/game-design-expert/SKILL.md +42 -0
  77. package/.agent/skills/game-engineering-expert/SKILL.md +42 -0
  78. package/.agent/skills/geo-fundamentals/SKILL.md +42 -0
  79. package/.agent/skills/github-operations/SKILL.md +42 -0
  80. package/.agent/skills/gsap-core/SKILL.md +42 -0
  81. package/.agent/skills/gsap-frameworks/SKILL.md +42 -0
  82. package/.agent/skills/gsap-performance/SKILL.md +42 -0
  83. package/.agent/skills/gsap-plugins/SKILL.md +42 -0
  84. package/.agent/skills/gsap-react/SKILL.md +42 -0
  85. package/.agent/skills/gsap-scrolltrigger/SKILL.md +42 -0
  86. package/.agent/skills/gsap-timeline/SKILL.md +42 -0
  87. package/.agent/skills/gsap-utils/SKILL.md +42 -0
  88. package/.agent/skills/i18n-localization/SKILL.md +42 -0
  89. package/.agent/skills/intelligent-routing/SKILL.md +42 -0
  90. package/.agent/skills/knowledge-graph/SKILL.md +42 -0
  91. package/.agent/skills/lint-and-validate/SKILL.md +42 -0
  92. package/.agent/skills/llm-engineering/SKILL.md +42 -0
  93. package/.agent/skills/local-first/SKILL.md +42 -0
  94. package/.agent/skills/mcp-builder/SKILL.md +42 -0
  95. package/.agent/skills/mobile-design/SKILL.md +42 -0
  96. package/.agent/skills/monorepo-management/SKILL.md +42 -0
  97. package/.agent/skills/motion-engineering/SKILL.md +42 -0
  98. package/.agent/skills/nextjs-react-expert/SKILL.md +42 -0
  99. package/.agent/skills/nodejs-best-practices/SKILL.md +42 -0
  100. package/.agent/skills/observability/SKILL.md +42 -0
  101. package/.agent/skills/parallel-agents/SKILL.md +42 -0
  102. package/.agent/skills/performance-profiling/SKILL.md +42 -0
  103. package/.agent/skills/plan-writing/SKILL.md +42 -0
  104. package/.agent/skills/platform-engineer/SKILL.md +42 -0
  105. package/.agent/skills/playwright-best-practices/SKILL.md +42 -0
  106. package/.agent/skills/powershell-windows/SKILL.md +42 -0
  107. package/.agent/skills/project-idioms/SKILL.md +42 -0
  108. package/.agent/skills/python-patterns/SKILL.md +42 -0
  109. package/.agent/skills/python-pro/SKILL.md +42 -0
  110. package/.agent/skills/react-specialist/SKILL.md +42 -0
  111. package/.agent/skills/readme-builder/SKILL.md +42 -0
  112. package/.agent/skills/realtime-patterns/SKILL.md +42 -0
  113. package/.agent/skills/red-team-tactics/SKILL.md +42 -0
  114. package/.agent/skills/rust-pro/SKILL.md +42 -0
  115. package/.agent/skills/seo-fundamentals/SKILL.md +42 -0
  116. package/.agent/skills/server-management/SKILL.md +42 -0
  117. package/.agent/skills/shadcn-ui-expert/SKILL.md +42 -0
  118. package/.agent/skills/skill-creator/SKILL.md +42 -0
  119. package/.agent/skills/sql-pro/SKILL.md +42 -0
  120. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +42 -0
  121. package/.agent/skills/swiftui-expert/SKILL.md +42 -0
  122. package/.agent/skills/systematic-debugging/SKILL.md +42 -0
  123. package/.agent/skills/tailwind-patterns/SKILL.md +42 -0
  124. package/.agent/skills/tdd-workflow/SKILL.md +42 -0
  125. package/.agent/skills/test-result-analyzer/SKILL.md +42 -0
  126. package/.agent/skills/testing-patterns/SKILL.md +42 -0
  127. package/.agent/skills/trend-researcher/SKILL.md +42 -0
  128. package/.agent/skills/typescript-advanced/SKILL.md +42 -0
  129. package/.agent/skills/ui-ux-pro-max/SKILL.md +42 -0
  130. package/.agent/skills/ui-ux-researcher/SKILL.md +42 -0
  131. package/.agent/skills/vue-expert/SKILL.md +42 -0
  132. package/.agent/skills/vulnerability-scanner/SKILL.md +42 -0
  133. package/.agent/skills/web-accessibility-auditor/SKILL.md +42 -0
  134. package/.agent/skills/web-design-guidelines/SKILL.md +42 -0
  135. package/.agent/skills/webapp-testing/SKILL.md +42 -0
  136. package/.agent/skills/whimsy-injector/SKILL.md +42 -0
  137. package/.agent/skills/workflow-optimizer/SKILL.md +42 -0
  138. package/.agent/workflows/marathon.md +247 -0
  139. package/.agent/workflows/super-prompt.md +27 -0
  140. package/bin/tribunal-kit.js +47 -1
  141. package/package.json +3 -2
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ // VERIFY: Using native Node.js only. Zero dependencies to ensure instant execution.
3
+
4
+ const rawInput = process.argv.slice(2).join(' ');
5
+
6
+ if (!rawInput) {
7
+ console.error("Usage: node prompt_compiler.js \"Your conversational prompt here\"");
8
+ process.exit(1);
9
+ }
10
+
11
+ // 1. Strip conversational fluff (lowers token count)
12
+ let cleanInput = rawInput
13
+ .replace(/hey,? /gi, '')
14
+ .replace(/can you /gi, '')
15
+ .replace(/could you /gi, '')
16
+ .replace(/please /gi, '')
17
+ .replace(/i want to /gi, '')
18
+ .replace(/i need you to /gi, '')
19
+ .replace(/for me/gi, '')
20
+ .replace(/would it be possible to /gi, '')
21
+ .trim();
22
+
23
+ // 2. Extract Action (Intent mapping)
24
+ const actionMatch = cleanInput.match(/^(build|create|fix|debug|refactor|update|write|design|audit)\b/i);
25
+ const action = actionMatch ? actionMatch[1].toLowerCase() : 'execute';
26
+
27
+ // Remove the action from the target string
28
+ if (actionMatch) {
29
+ cleanInput = cleanInput.substring(actionMatch[0].length).trim();
30
+ }
31
+
32
+ // Strip leading articles
33
+ cleanInput = cleanInput.replace(/^(a|an|some)\s+/i, '');
34
+
35
+ // 3. Extract Technology Stack
36
+ const techKeywords = [
37
+ 'react', 'tailwind', 'next.js', 'sql', 'postgres', 'express',
38
+ 'python', 'node', 'vue', 'svelte', 'typescript', 'js', 'css',
39
+ 'html', 'prisma', 'drizzle'
40
+ ];
41
+
42
+ const stack = [];
43
+ techKeywords.forEach(tech => {
44
+ // Use word boundaries to prevent partial matches
45
+ const regex = new RegExp(`\\b${tech.replace('.', '\\.')}\\b`, 'i');
46
+ if (regex.test(cleanInput)) {
47
+ stack.push(tech.toLowerCase());
48
+ }
49
+ });
50
+
51
+ // 4. Output highly compressed YAML
52
+ console.log('---');
53
+ console.log(`action: ${action}`);
54
+ console.log(`target: ${cleanInput}`);
55
+ console.log(`stack: [${stack.join(', ')}]`);
56
+ console.log('---');
@@ -13,27 +13,10 @@
13
13
  const fs = require('fs');
14
14
  const path = require('path');
15
15
 
16
- const { RED, GREEN, YELLOW, BLUE, BOLD, RESET } = require('./colors.js');
17
-
18
- function header(title) {
19
- console.log(`\n${BOLD}${BLUE}━━━ ${title} ━━━${RESET}`);
20
- }
21
-
22
- function ok(msg) {
23
- console.log(` ${GREEN}✅ ${msg}${RESET}`);
24
- }
25
-
26
- function fail(msg) {
27
- console.log(` ${RED}❌ ${msg}${RESET}`);
28
- }
29
-
30
- function warn(msg) {
31
- console.log(` ${YELLOW}⚠️ ${msg}${RESET}`);
32
- }
33
-
34
- function skip(msg) {
35
- console.log(` ${YELLOW}⏭️ ${msg}${RESET}`);
36
- }
16
+ const {
17
+ RED, GREEN, YELLOW, BLUE, BOLD, DIM, CYAN, RESET,
18
+ sectionHeader: header, ok, fail, warn, skip,
19
+ } = require('./_colors');
37
20
 
38
21
  function detectOrm(projectRoot) {
39
22
  if (fs.existsSync(path.join(projectRoot, "prisma", "schema.prisma"))) {
@@ -221,7 +204,7 @@ function main() {
221
204
  let issuesCount = 0;
222
205
 
223
206
  if (fileArg) {
224
- header(`Validating: ${fileArg}`);
207
+ console.log(header(`Validating: ${fileArg}`));
225
208
  const filepath = path.isAbsolute(fileArg) ? fileArg : path.join(projectRoot, fileArg);
226
209
  let issues = [];
227
210
  if (filepath.endsWith(".prisma")) issues = validatePrisma(filepath);
@@ -239,7 +222,7 @@ function main() {
239
222
  } else if (ormType === "prisma") {
240
223
  const schemaPath = path.join(projectRoot, "prisma", "schema.prisma");
241
224
  if (fs.existsSync(schemaPath)) {
242
- header("Prisma Schema Validation");
225
+ console.log(header("Prisma Schema Validation"));
243
226
  const issues = validatePrisma(schemaPath);
244
227
  for (const [severity, message, line] of issues) {
245
228
  if (severity === "error") { fail(`L${line}: ${message}`); issuesCount++; }
@@ -250,7 +233,7 @@ function main() {
250
233
  skip(`Prisma schema not found at ${schemaPath}`);
251
234
  }
252
235
  } else if (ormType === "sql") {
253
- header("SQL Migration Validation");
236
+ console.log(header("SQL Migration Validation"));
254
237
  // Very basic recursion for migrations dir
255
238
  function findMigrations(dir) {
256
239
  let res = [];
@@ -281,7 +264,7 @@ function main() {
281
264
  }
282
265
  }
283
266
  } else if (ormType === "drizzle") {
284
- header("Drizzle Schema");
267
+ console.log(header("Drizzle Schema"));
285
268
  skip("Drizzle validation not yet implemented — validate manually");
286
269
  }
287
270