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.
- package/.agent/history/architecture-graph.yaml +140 -0
- package/.agent/history/graph-cache.json +262 -0
- package/.agent/history/snapshots/bin__tribunal-kit.js.json +19 -0
- package/.agent/history/snapshots/eslint.config.js.json +9 -0
- package/.agent/history/snapshots/migrate_refs.js.json +11 -0
- package/.agent/history/snapshots/scripts__changelog.js.json +13 -0
- package/.agent/history/snapshots/scripts__sync-version.js.json +12 -0
- package/.agent/history/snapshots/scripts__validate-payload.js.json +12 -0
- package/.agent/history/snapshots/test__integration__bridges.test.js.json +14 -0
- package/.agent/history/snapshots/test__integration__init.test.js.json +14 -0
- package/.agent/history/snapshots/test__integration__routing.test.js.json +12 -0
- package/.agent/history/snapshots/test__integration__swarm_dispatcher.test.js.json +14 -0
- package/.agent/history/snapshots/test__integration__wave2.test.js.json +14 -0
- package/.agent/history/snapshots/test__unit__args.test.js.json +20 -0
- package/.agent/history/snapshots/test__unit__case_law_manager.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__context_broker.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__copyDir.test.js.json +23 -0
- package/.agent/history/snapshots/test__unit__graph_tools.test.js.json +12 -0
- package/.agent/history/snapshots/test__unit__inner_loop_validator.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__selfInstall.test.js.json +23 -0
- package/.agent/history/snapshots/test__unit__semver.test.js.json +20 -0
- package/.agent/history/snapshots/test__unit__swarm_dispatcher.test.js.json +12 -0
- package/.agent/scripts/_colors.js +170 -18
- package/.agent/scripts/_utils.js +244 -42
- package/.agent/scripts/bundle_analyzer.js +261 -290
- package/.agent/scripts/case_law_manager.js +1 -7
- package/.agent/scripts/checklist.js +278 -266
- package/.agent/scripts/colors.js +11 -17
- package/.agent/scripts/context_broker.js +1 -7
- package/.agent/scripts/dependency_analyzer.js +234 -272
- package/.agent/scripts/graph_builder.js +46 -18
- package/.agent/scripts/graph_visualizer.js +10 -4
- package/.agent/scripts/graph_zoom.js +6 -4
- package/.agent/scripts/inner_loop_validator.js +2 -8
- package/.agent/scripts/lint_runner.js +186 -187
- package/.agent/scripts/marathon_harness.js +799 -0
- package/.agent/scripts/prompt_compiler.js +56 -0
- package/.agent/scripts/schema_validator.js +8 -25
- package/.agent/scripts/security_scan.js +276 -303
- package/.agent/scripts/session_manager.js +1 -7
- package/.agent/scripts/skill_evolution.js +1 -8
- package/.agent/scripts/skill_integrator.js +1 -7
- package/.agent/scripts/test_runner.js +186 -193
- package/.agent/scripts/utils.js +17 -32
- package/.agent/scripts/verify_all.js +248 -257
- package/.agent/skills/agent-organizer/SKILL.md +42 -0
- package/.agent/skills/agentic-patterns/SKILL.md +42 -0
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +42 -0
- package/.agent/skills/api-patterns/SKILL.md +42 -0
- package/.agent/skills/api-security-auditor/SKILL.md +42 -0
- package/.agent/skills/app-builder/SKILL.md +42 -0
- package/.agent/skills/appflow-wireframe/SKILL.md +42 -0
- package/.agent/skills/architecture/SKILL.md +42 -0
- package/.agent/skills/authentication-best-practices/SKILL.md +42 -0
- package/.agent/skills/backend-security-expert/SKILL.md +122 -0
- package/.agent/skills/bash-linux/SKILL.md +42 -0
- package/.agent/skills/behavioral-modes/SKILL.md +42 -0
- package/.agent/skills/brainstorming/SKILL.md +42 -0
- package/.agent/skills/building-native-ui/SKILL.md +42 -0
- package/.agent/skills/clean-code/SKILL.md +42 -0
- package/.agent/skills/code-review-checklist/SKILL.md +42 -0
- package/.agent/skills/config-validator/SKILL.md +42 -0
- package/.agent/skills/csharp-developer/SKILL.md +42 -0
- package/.agent/skills/data-validation-schemas/SKILL.md +42 -0
- package/.agent/skills/database-design/SKILL.md +42 -0
- package/.agent/skills/deployment-procedures/SKILL.md +42 -0
- package/.agent/skills/devops-engineer/SKILL.md +42 -0
- package/.agent/skills/devops-incident-responder/SKILL.md +42 -0
- package/.agent/skills/documentation-templates/SKILL.md +42 -0
- package/.agent/skills/edge-computing/SKILL.md +42 -0
- package/.agent/skills/error-resilience/SKILL.md +42 -0
- package/.agent/skills/extract-design-system/SKILL.md +42 -0
- package/.agent/skills/framer-motion-expert/SKILL.md +42 -0
- package/.agent/skills/frontend-design/SKILL.md +42 -0
- package/.agent/skills/frontend-security-expert/SKILL.md +123 -0
- package/.agent/skills/game-design-expert/SKILL.md +42 -0
- package/.agent/skills/game-engineering-expert/SKILL.md +42 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +42 -0
- package/.agent/skills/github-operations/SKILL.md +42 -0
- package/.agent/skills/gsap-core/SKILL.md +42 -0
- package/.agent/skills/gsap-frameworks/SKILL.md +42 -0
- package/.agent/skills/gsap-performance/SKILL.md +42 -0
- package/.agent/skills/gsap-plugins/SKILL.md +42 -0
- package/.agent/skills/gsap-react/SKILL.md +42 -0
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +42 -0
- package/.agent/skills/gsap-timeline/SKILL.md +42 -0
- package/.agent/skills/gsap-utils/SKILL.md +42 -0
- package/.agent/skills/i18n-localization/SKILL.md +42 -0
- package/.agent/skills/intelligent-routing/SKILL.md +42 -0
- package/.agent/skills/knowledge-graph/SKILL.md +42 -0
- package/.agent/skills/lint-and-validate/SKILL.md +42 -0
- package/.agent/skills/llm-engineering/SKILL.md +42 -0
- package/.agent/skills/local-first/SKILL.md +42 -0
- package/.agent/skills/mcp-builder/SKILL.md +42 -0
- package/.agent/skills/mobile-design/SKILL.md +42 -0
- package/.agent/skills/monorepo-management/SKILL.md +42 -0
- package/.agent/skills/motion-engineering/SKILL.md +42 -0
- package/.agent/skills/nextjs-react-expert/SKILL.md +42 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +42 -0
- package/.agent/skills/observability/SKILL.md +42 -0
- package/.agent/skills/parallel-agents/SKILL.md +42 -0
- package/.agent/skills/performance-profiling/SKILL.md +42 -0
- package/.agent/skills/plan-writing/SKILL.md +42 -0
- package/.agent/skills/platform-engineer/SKILL.md +42 -0
- package/.agent/skills/playwright-best-practices/SKILL.md +42 -0
- package/.agent/skills/powershell-windows/SKILL.md +42 -0
- package/.agent/skills/project-idioms/SKILL.md +42 -0
- package/.agent/skills/python-patterns/SKILL.md +42 -0
- package/.agent/skills/python-pro/SKILL.md +42 -0
- package/.agent/skills/react-specialist/SKILL.md +42 -0
- package/.agent/skills/readme-builder/SKILL.md +42 -0
- package/.agent/skills/realtime-patterns/SKILL.md +42 -0
- package/.agent/skills/red-team-tactics/SKILL.md +42 -0
- package/.agent/skills/rust-pro/SKILL.md +42 -0
- package/.agent/skills/seo-fundamentals/SKILL.md +42 -0
- package/.agent/skills/server-management/SKILL.md +42 -0
- package/.agent/skills/shadcn-ui-expert/SKILL.md +42 -0
- package/.agent/skills/skill-creator/SKILL.md +42 -0
- package/.agent/skills/sql-pro/SKILL.md +42 -0
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +42 -0
- package/.agent/skills/swiftui-expert/SKILL.md +42 -0
- package/.agent/skills/systematic-debugging/SKILL.md +42 -0
- package/.agent/skills/tailwind-patterns/SKILL.md +42 -0
- package/.agent/skills/tdd-workflow/SKILL.md +42 -0
- package/.agent/skills/test-result-analyzer/SKILL.md +42 -0
- package/.agent/skills/testing-patterns/SKILL.md +42 -0
- package/.agent/skills/trend-researcher/SKILL.md +42 -0
- package/.agent/skills/typescript-advanced/SKILL.md +42 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +42 -0
- package/.agent/skills/ui-ux-researcher/SKILL.md +42 -0
- package/.agent/skills/vue-expert/SKILL.md +42 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +42 -0
- package/.agent/skills/web-accessibility-auditor/SKILL.md +42 -0
- package/.agent/skills/web-design-guidelines/SKILL.md +42 -0
- package/.agent/skills/webapp-testing/SKILL.md +42 -0
- package/.agent/skills/whimsy-injector/SKILL.md +42 -0
- package/.agent/skills/workflow-optimizer/SKILL.md +42 -0
- package/.agent/workflows/marathon.md +247 -0
- package/.agent/workflows/super-prompt.md +27 -0
- package/bin/tribunal-kit.js +47 -1
- 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 {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|