tribunal-kit 5.8.3 ā 5.8.5
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 +5 -5
- package/.agent/history/integrity_manifest.json +1026 -0
- package/.agent/history/memory/.memory.idx +1217 -1
- package/.agent/history/memory/MEMORY.md +81 -1
- package/.agent/rules/GEMINI.md +1 -1
- package/.agent/scripts/_utils.js +28 -7
- package/.agent/scripts/case_law_manager.js +3 -15
- package/.agent/scripts/context_broker.js +3 -20
- package/.agent/scripts/guardrail_engine.js +643 -0
- package/.agent/scripts/integrity_manifest.js +492 -0
- package/.agent/scripts/marathon_harness.js +10 -1
- package/.agent/scripts/signal_detector.js +1 -1
- package/.agent/scripts/skill_evolution.js +39 -36
- package/.agent/scripts/skill_integrator.js +2 -12
- package/.agent/scripts/swarm_dispatcher.js +54 -5
- package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
- package/.agent/skills/60fps-animation/SKILL.md +78 -0
- package/.agent/skills/accessible-animation/SKILL.md +86 -0
- package/.agent/skills/adapt/SKILL.md +75 -0
- package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
- package/.agent/skills/animation-systems/SKILL.md +69 -0
- package/.agent/skills/antfu-conventions/SKILL.md +74 -0
- package/.agent/skills/api-patterns/scripts/__pycache__/api_validator.cpython-311.pyc +0 -0
- package/.agent/skills/apple-design/SKILL.md +108 -0
- package/.agent/skills/audit-and-fix/SKILL.md +83 -0
- package/.agent/skills/baseline-ui/SKILL.md +74 -0
- package/.agent/skills/better-colors/SKILL.md +132 -0
- package/.agent/skills/better-typography/SKILL.md +111 -0
- package/.agent/skills/better-ui/SKILL.md +102 -0
- package/.agent/skills/bolder/SKILL.md +68 -0
- package/.agent/skills/build-primitive/SKILL.md +70 -0
- package/.agent/skills/clarify/SKILL.md +75 -0
- package/.agent/skills/cobejs/SKILL.md +96 -0
- package/.agent/skills/codebase-design/SKILL.md +84 -0
- package/.agent/skills/colorize/SKILL.md +77 -0
- package/.agent/skills/compact-landing/SKILL.md +70 -0
- package/.agent/skills/company-logos/SKILL.md +73 -0
- package/.agent/skills/create-design-md/SKILL.md +104 -0
- package/.agent/skills/critique/SKILL.md +95 -0
- package/.agent/skills/database-design/scripts/__pycache__/schema_validator.cpython-311.pyc +0 -0
- package/.agent/skills/delight/SKILL.md +65 -0
- package/.agent/skills/design-lab/SKILL.md +59 -0
- package/.agent/skills/diagnosing-bugs/SKILL.md +190 -0
- package/.agent/skills/distill/SKILL.md +65 -0
- package/.agent/skills/domain-modeling/SKILL.md +78 -0
- package/.agent/skills/fixing-accessibility/SKILL.md +100 -0
- package/.agent/skills/fixing-metadata/SKILL.md +97 -0
- package/.agent/skills/fixing-motion-performance/SKILL.md +96 -0
- package/.agent/skills/frontend-design/SKILL.md +80 -81
- package/.agent/skills/frontend-design/scripts/__pycache__/accessibility_checker.cpython-311.pyc +0 -0
- package/.agent/skills/frontend-design/scripts/__pycache__/ux_audit.cpython-311.pyc +0 -0
- package/.agent/skills/geo-fundamentals/scripts/__pycache__/geo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/gpt-taste/SKILL.md +68 -0
- package/.agent/skills/harden/SKILL.md +74 -0
- package/.agent/skills/i18n-localization/scripts/__pycache__/i18n_checker.cpython-311.pyc +0 -0
- package/.agent/skills/impeccable/SKILL.md +74 -0
- package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
- package/.agent/skills/improve-ui/SKILL.md +83 -0
- package/.agent/skills/landing-page/SKILL.md +88 -0
- package/.agent/skills/lint-and-validate/SKILL.md +0 -1
- package/.agent/skills/lint-and-validate/scripts/__pycache__/lint_runner.cpython-311.pyc +0 -0
- package/.agent/skills/lint-and-validate/scripts/__pycache__/type_coverage.cpython-311.pyc +0 -0
- package/.agent/skills/local-first-architecture/SKILL.md +66 -0
- package/.agent/skills/lottie-animation/SKILL.md +82 -0
- package/.agent/skills/marquee-loop/SKILL.md +96 -0
- package/.agent/skills/masked-reveal/SKILL.md +88 -0
- package/.agent/skills/micro-interaction/SKILL.md +100 -0
- package/.agent/skills/mobile-design/scripts/__pycache__/mobile_audit.cpython-311.pyc +0 -0
- package/.agent/skills/morphing-icons/SKILL.md +85 -0
- package/.agent/skills/motion-engineering/SKILL.md +66 -164
- package/.agent/skills/nextjs-react-expert/scripts/__pycache__/convert_rules.cpython-311.pyc +0 -0
- package/.agent/skills/nextjs-react-expert/scripts/__pycache__/react_performance_checker.cpython-311.pyc +0 -0
- package/.agent/skills/page-transition-animation/SKILL.md +108 -0
- package/.agent/skills/parallel-agents/SKILL.md +5 -5
- package/.agent/skills/performance-profiling/scripts/__pycache__/lighthouse_audit.cpython-311.pyc +0 -0
- package/.agent/skills/polish/SKILL.md +63 -0
- package/.agent/skills/pricing-page/SKILL.md +68 -0
- package/.agent/skills/progressive-blur/SKILL.md +100 -0
- package/.agent/skills/quieter/SKILL.md +68 -0
- package/.agent/skills/react-doctor/SKILL.md +70 -0
- package/.agent/skills/redesign-skill/SKILL.md +65 -0
- package/.agent/skills/seo-fundamentals/scripts/__pycache__/seo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/shape/SKILL.md +73 -0
- package/.agent/skills/soft-skill/SKILL.md +72 -0
- package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
- package/.agent/skills/svg-animation/SKILL.md +91 -0
- package/.agent/skills/swiss-design/SKILL.md +64 -0
- package/.agent/skills/taste-skill/SKILL.md +71 -0
- package/.agent/skills/tdd-workflow/SKILL.md +36 -165
- package/.agent/skills/testing-patterns/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
- package/.agent/skills/transitions-dev/SKILL.md +101 -0
- package/.agent/skills/typeset/SKILL.md +76 -0
- package/.agent/skills/ui-skills-root/SKILL.md +85 -0
- package/.agent/skills/vulnerability-scanner/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/skills/web-quality-audit/SKILL.md +67 -0
- package/.agent/skills/webapp-testing/scripts/__pycache__/playwright_runner.cpython-311.pyc +0 -0
- package/.agent/workflows/generate.md +1 -1
- package/.agent/workflows/tribunal-full.md +2 -2
- package/.agent/workflows/tribunal-speed.md +2 -2
- package/CONTRIBUTING.md +1 -1
- package/README.md +349 -239
- package/bin/mcp-server.js +45 -45
- package/bin/tribunal-kit.js +62 -1482
- package/bin/wrapper.js +50 -25
- package/dist/cli.js +43 -0
- package/dist/commands/align.js +1 -1
- package/dist/commands/compile.js +1 -1
- package/dist/commands/guardrail.js +275 -0
- package/dist/commands/init.js +35 -10
- package/dist/commands/native.js +228 -0
- package/dist/commands/optimize.js +318 -0
- package/dist/commands/validate.js +67 -0
- package/dist/mcp/server.js +4 -138
- package/dist/utils/version.js +1 -1
- package/package.json +13 -10
- package/scripts/benchmark.js +42 -0
- package/scripts/fix-vbc.js +98 -0
- package/scripts/fix-vbc.ps1 +119 -0
- package/scripts/sync-version.js +129 -76
package/dist/mcp/server.js
CHANGED
|
@@ -1,142 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Uses in-process require() for commands instead of spawning child processes.
|
|
7
|
-
* Protocol: MCP 2024-11-05 over JSON-RPC 2.0 / stdio
|
|
5
|
+
* Compatibility entry point for the historical dist/mcp/server.js path.
|
|
6
|
+
* bin/mcp-server.js is the single canonical MCP implementation.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
const path = require('path');
|
|
11
|
-
|
|
12
|
-
const PKG = require('../../package.json');
|
|
13
|
-
|
|
14
|
-
// Timeout for spawned processes (30 seconds)
|
|
15
|
-
const SPAWN_TIMEOUT_MS = 30000;
|
|
16
|
-
|
|
17
|
-
const readline = require('readline');
|
|
18
|
-
const rl = readline.createInterface({
|
|
19
|
-
input: process.stdin,
|
|
20
|
-
output: process.stdout,
|
|
21
|
-
terminal: false
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
function handleRequest(req) {
|
|
25
|
-
if (req.method === 'initialize') {
|
|
26
|
-
return {
|
|
27
|
-
protocolVersion: "2024-11-05",
|
|
28
|
-
capabilities: { tools: {} },
|
|
29
|
-
serverInfo: {
|
|
30
|
-
name: "tribunal-kit-mcp",
|
|
31
|
-
version: PKG.version
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (req.method === 'tools/list') {
|
|
37
|
-
return {
|
|
38
|
-
tools: [
|
|
39
|
-
{
|
|
40
|
-
name: "run_tribunal_audit",
|
|
41
|
-
description: "Runs a full anti-hallucination audit across the workspace.",
|
|
42
|
-
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "sync_ide_bridges",
|
|
46
|
-
description: "Synchronize IDE bridge files with the current GEMINI.md rules.",
|
|
47
|
-
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: "search_case_law",
|
|
51
|
-
description: "Search historical code rejections and legal precedent.",
|
|
52
|
-
inputSchema: {
|
|
53
|
-
type: "object",
|
|
54
|
-
properties: {
|
|
55
|
-
query: { type: "string", description: "Search query" }
|
|
56
|
-
},
|
|
57
|
-
required: ["query"],
|
|
58
|
-
additionalProperties: false
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (req.method === 'tools/call') {
|
|
66
|
-
const toolName = req.params && req.params.name;
|
|
67
|
-
if (!toolName) {
|
|
68
|
-
throw { code: -32602, message: "Missing required parameter: params.name" };
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (toolName === 'run_tribunal_audit') {
|
|
72
|
-
// Validate uses the Rust binary ā still needs spawn
|
|
73
|
-
const CLI = path.resolve(__dirname, '../../bin/wrapper.js');
|
|
74
|
-
const result = spawnSync(process.execPath, [CLI, 'validate', '--quiet'], {
|
|
75
|
-
encoding: 'utf8',
|
|
76
|
-
timeout: SPAWN_TIMEOUT_MS,
|
|
77
|
-
});
|
|
78
|
-
return { content: [{ type: "text", text: result.stdout || result.stderr || "No output" }] };
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (toolName === 'sync_ide_bridges') {
|
|
82
|
-
// In-process ā no spawn needed
|
|
83
|
-
const CLI = path.resolve(__dirname, '../../bin/wrapper.js');
|
|
84
|
-
const result = spawnSync(process.execPath, [CLI, 'sync', '--quiet'], {
|
|
85
|
-
encoding: 'utf8',
|
|
86
|
-
timeout: SPAWN_TIMEOUT_MS,
|
|
87
|
-
});
|
|
88
|
-
return { content: [{ type: "text", text: result.stdout || result.stderr || "Sync complete" }] };
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (toolName === 'search_case_law') {
|
|
92
|
-
const query = req.params && req.params.arguments && req.params.arguments.query;
|
|
93
|
-
if (!query || typeof query !== 'string') {
|
|
94
|
-
throw { code: -32602, message: "Missing or invalid required argument: query (string)" };
|
|
95
|
-
}
|
|
96
|
-
const script = path.resolve(__dirname, '../../.agent/scripts/case_law_manager.js');
|
|
97
|
-
const result = spawnSync(process.execPath, [script, 'search-cases', '--query', query], {
|
|
98
|
-
encoding: 'utf8',
|
|
99
|
-
timeout: SPAWN_TIMEOUT_MS,
|
|
100
|
-
});
|
|
101
|
-
return { content: [{ type: "text", text: result.stdout || result.stderr || "No results" }] };
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
throw { code: -32601, message: `Unknown tool: ${toolName}` };
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
throw { code: -32601, message: `Unknown method: ${req.method}` };
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
rl.on('line', (line) => {
|
|
111
|
-
if (!line.trim()) return;
|
|
112
|
-
|
|
113
|
-
let req;
|
|
114
|
-
try {
|
|
115
|
-
req = JSON.parse(line);
|
|
116
|
-
} catch (parseErr) {
|
|
117
|
-
const errorRes = {
|
|
118
|
-
jsonrpc: "2.0", id: null,
|
|
119
|
-
error: { code: -32700, message: "Parse error: " + parseErr.message }
|
|
120
|
-
};
|
|
121
|
-
console.log(JSON.stringify(errorRes));
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
try {
|
|
126
|
-
const result = handleRequest(req);
|
|
127
|
-
const res = { jsonrpc: "2.0", id: req.id, result };
|
|
128
|
-
console.log(JSON.stringify(res));
|
|
129
|
-
|
|
130
|
-
if (req.method === 'initialize') {
|
|
131
|
-
console.log(JSON.stringify({ jsonrpc: "2.0", method: "notifications/initialized", params: {} }));
|
|
132
|
-
}
|
|
133
|
-
} catch (e) {
|
|
134
|
-
const code = (e && typeof e.code === 'number') ? e.code : -32603;
|
|
135
|
-
const message = (e && e.message) ? e.message : "Internal server error";
|
|
136
|
-
const errorRes = {
|
|
137
|
-
jsonrpc: "2.0", id: req.id || null,
|
|
138
|
-
error: { code, message }
|
|
139
|
-
};
|
|
140
|
-
console.log(JSON.stringify(errorRes));
|
|
141
|
-
}
|
|
142
|
-
});
|
|
8
|
+
module.exports = require("../../bin/mcp-server.js");
|
package/dist/utils/version.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.compareSemver = compareSemver;
|
|
|
7
7
|
exports.fetchLatestVersion = fetchLatestVersion;
|
|
8
8
|
exports.autoUpdateCheck = autoUpdateCheck;
|
|
9
9
|
const https_1 = __importDefault(require("https"));
|
|
10
|
-
const
|
|
10
|
+
const _child_process_1 = require("child_process");
|
|
11
11
|
const fs_1 = __importDefault(require("fs"));
|
|
12
12
|
const path_1 = __importDefault(require("path"));
|
|
13
13
|
const os_1 = __importDefault(require("os"));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tribunal-kit",
|
|
3
|
-
"version": "5.8.
|
|
4
|
-
"description": "The operating system for AI software engineering ā governance, memory, review pipelines, and reusable skills for every coding agent.
|
|
3
|
+
"version": "5.8.5",
|
|
4
|
+
"description": "The operating system for AI software engineering ā governance, memory, review pipelines, and reusable skills for every coding agent. 44 specialist agents, 34 workflows, 19 parallel Tribunal code reviewers, MCP server, Rust core engine, and long-running autonomous agent harness for Cursor, VSCode, Windsurf, Claude Code, and Aider.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
7
7
|
"ai-agent",
|
|
@@ -91,7 +91,9 @@
|
|
|
91
91
|
"validate-payload": "node scripts/validate-payload.js",
|
|
92
92
|
"benchmark": "node scripts/benchmark.js",
|
|
93
93
|
"benchmark:rust": "cargo build --release && node scripts/benchmark.js",
|
|
94
|
-
"build": "
|
|
94
|
+
"build:rust": "cargo build --release",
|
|
95
|
+
"test:rust": "cargo test --manifest-path crates/core/Cargo.toml",
|
|
96
|
+
"build": "npm run build:rust"
|
|
95
97
|
},
|
|
96
98
|
"devDependencies": {
|
|
97
99
|
"eslint": "^9.1.1",
|
|
@@ -99,12 +101,12 @@
|
|
|
99
101
|
"typescript": "^5.4.5"
|
|
100
102
|
},
|
|
101
103
|
"optionalDependencies": {
|
|
102
|
-
"@tribunal-kit/core-darwin-arm64": "^5.8.
|
|
103
|
-
"@tribunal-kit/core-darwin-x64": "^5.8.
|
|
104
|
-
"@tribunal-kit/core-linux-arm64": "^5.8.
|
|
105
|
-
"@tribunal-kit/core-linux-x64": "^5.8.
|
|
106
|
-
"@tribunal-kit/core-win32-arm64": "^5.8.
|
|
107
|
-
"@tribunal-kit/core-win32-x64": "^5.8.
|
|
104
|
+
"@tribunal-kit/core-darwin-arm64": "^5.8.5",
|
|
105
|
+
"@tribunal-kit/core-darwin-x64": "^5.8.5",
|
|
106
|
+
"@tribunal-kit/core-linux-arm64": "^5.8.5",
|
|
107
|
+
"@tribunal-kit/core-linux-x64": "^5.8.5",
|
|
108
|
+
"@tribunal-kit/core-win32-arm64": "^5.8.5",
|
|
109
|
+
"@tribunal-kit/core-win32-x64": "^5.8.5"
|
|
108
110
|
},
|
|
109
111
|
"jest": {
|
|
110
112
|
"testMatch": [
|
|
@@ -113,7 +115,8 @@
|
|
|
113
115
|
"testEnvironment": "node",
|
|
114
116
|
"coverageDirectory": "coverage",
|
|
115
117
|
"collectCoverageFrom": [
|
|
116
|
-
"bin/**/*.js"
|
|
118
|
+
"bin/**/*.js",
|
|
119
|
+
".agent/scripts/**/*.js"
|
|
117
120
|
]
|
|
118
121
|
}
|
|
119
122
|
}
|
package/scripts/benchmark.js
CHANGED
|
@@ -142,6 +142,48 @@ async function main() {
|
|
|
142
142
|
);
|
|
143
143
|
results.push(initRealResult);
|
|
144
144
|
|
|
145
|
+
// 5. DAG scheduling benchmark
|
|
146
|
+
console.log(c("cyan", " āø Benchmarking: DAG scheduling calculation"));
|
|
147
|
+
const dagResult = await benchmark(
|
|
148
|
+
"DAG wave scheduling",
|
|
149
|
+
() => {
|
|
150
|
+
const workers = [
|
|
151
|
+
{ task_id: "w1", dependencies: [] },
|
|
152
|
+
{ task_id: "w2", dependencies: ["w1"] },
|
|
153
|
+
{ task_id: "w3", dependencies: ["w1"] },
|
|
154
|
+
{ task_id: "w4", dependencies: ["w2", "w3"] },
|
|
155
|
+
];
|
|
156
|
+
const inDegree = {};
|
|
157
|
+
const adjList = {};
|
|
158
|
+
workers.forEach((w) => {
|
|
159
|
+
inDegree[w.task_id] = 0;
|
|
160
|
+
adjList[w.task_id] = [];
|
|
161
|
+
});
|
|
162
|
+
workers.forEach((w) => {
|
|
163
|
+
w.dependencies.forEach((dep) => {
|
|
164
|
+
adjList[dep].push(w.task_id);
|
|
165
|
+
inDegree[w.task_id] += 1;
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
let currentWave = Object.keys(inDegree).filter((id) => inDegree[id] === 0);
|
|
169
|
+
const waves = [];
|
|
170
|
+
while (currentWave.length > 0) {
|
|
171
|
+
waves.push(currentWave);
|
|
172
|
+
const next = [];
|
|
173
|
+
currentWave.forEach((id) => {
|
|
174
|
+
adjList[id].forEach((nbr) => {
|
|
175
|
+
inDegree[nbr] -= 1;
|
|
176
|
+
if (inDegree[nbr] === 0) next.push(nbr);
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
currentWave = next;
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
100,
|
|
183
|
+
);
|
|
184
|
+
results.push(dagResult);
|
|
185
|
+
|
|
186
|
+
|
|
145
187
|
// Print results table
|
|
146
188
|
console.log();
|
|
147
189
|
console.log(bold(` Results`));
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* fix-vbc.js ā Batch appends missing VBC Protocol and Pre-Flight sections
|
|
4
|
+
* to all SKILL.md files in .agent/skills/ that are failing validation.
|
|
5
|
+
*
|
|
6
|
+
* Run: node scripts/fix-vbc.js
|
|
7
|
+
* Dry-run: node scripts/fix-vbc.js --dry-run
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const fs = require("fs");
|
|
11
|
+
const path = require("path");
|
|
12
|
+
|
|
13
|
+
const ROOT = path.resolve(__dirname, "..");
|
|
14
|
+
const SKILLS_DIR = path.join(ROOT, ".agent", "skills");
|
|
15
|
+
const DRY_RUN = process.argv.includes("--dry-run");
|
|
16
|
+
|
|
17
|
+
const PRE_FLIGHT_BLOCK = `
|
|
18
|
+
### ā
Pre-Flight Self-Audit
|
|
19
|
+
|
|
20
|
+
\`\`\`
|
|
21
|
+
ā
Did I rely ONLY on real, verified tools and methods?
|
|
22
|
+
ā
Is this solution appropriately scoped to the user's constraints?
|
|
23
|
+
ā
Did I handle potential failure modes and edge cases?
|
|
24
|
+
ā
Have I avoided generic boilerplate that doesn't add value?
|
|
25
|
+
\`\`\`
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
const VBC_BLOCK = `
|
|
29
|
+
### š Verification-Before-Completion (VBC) Protocol
|
|
30
|
+
|
|
31
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
32
|
+
|
|
33
|
+
- ā **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
34
|
+
- ā
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
let fixedCount = 0;
|
|
38
|
+
let skippedCount = 0;
|
|
39
|
+
let errorCount = 0;
|
|
40
|
+
|
|
41
|
+
const skillDirs = fs.readdirSync(SKILLS_DIR).filter((d) => {
|
|
42
|
+
return fs.statSync(path.join(SKILLS_DIR, d)).isDirectory();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
for (const dir of skillDirs) {
|
|
46
|
+
const skillPath = path.join(SKILLS_DIR, dir, "SKILL.md");
|
|
47
|
+
if (!fs.existsSync(skillPath)) continue;
|
|
48
|
+
|
|
49
|
+
let content;
|
|
50
|
+
try {
|
|
51
|
+
content = fs.readFileSync(skillPath, "utf8");
|
|
52
|
+
} catch (e) {
|
|
53
|
+
console.error(` ā Failed to read: ${dir}/SKILL.md ā ${e.message}`);
|
|
54
|
+
errorCount++;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const hasPreFlight =
|
|
59
|
+
content.includes("Pre-Flight Checklist") || content.includes("Pre-Flight");
|
|
60
|
+
const hasVBC =
|
|
61
|
+
content.includes("VBC Protocol") || content.includes("VBC");
|
|
62
|
+
|
|
63
|
+
if (hasPreFlight && hasVBC) {
|
|
64
|
+
skippedCount++;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
let appendText = "";
|
|
69
|
+
|
|
70
|
+
if (!hasPreFlight) {
|
|
71
|
+
appendText += PRE_FLIGHT_BLOCK;
|
|
72
|
+
console.log(` š§ ${dir}/SKILL.md ā appending Pre-Flight Self-Audit`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (!hasVBC) {
|
|
76
|
+
appendText += VBC_BLOCK;
|
|
77
|
+
console.log(` š§ ${dir}/SKILL.md ā appending VBC Protocol`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (DRY_RUN) {
|
|
81
|
+
console.log(` [DRY-RUN] Would append to ${dir}/SKILL.md`);
|
|
82
|
+
} else {
|
|
83
|
+
try {
|
|
84
|
+
fs.appendFileSync(skillPath, appendText, "utf8");
|
|
85
|
+
fixedCount++;
|
|
86
|
+
} catch (e) {
|
|
87
|
+
console.error(` ā Failed to write: ${dir}/SKILL.md ā ${e.message}`);
|
|
88
|
+
errorCount++;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
console.log(`\nāāā VBC Fix Summary āāāāāāāāāāāāāāāāāāāāā`);
|
|
94
|
+
console.log(` Fixed: ${fixedCount}`);
|
|
95
|
+
console.log(` Skipped: ${skippedCount} (already compliant)`);
|
|
96
|
+
console.log(` Errors: ${errorCount}`);
|
|
97
|
+
console.log(` Mode: ${DRY_RUN ? "DRY-RUN (no changes)" : "LIVE"}`);
|
|
98
|
+
console.log();
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
$ErrorActionPreference = "Stop"
|
|
2
|
+
|
|
3
|
+
$skillsDir = "c:\Users\sunrise\Desktop\pfojects\cli project\tribunal-kit\.agent\skills"
|
|
4
|
+
|
|
5
|
+
$vbcBlock = @"
|
|
6
|
+
|
|
7
|
+
### `u{1F6D1} Verification-Before-Completion (VBC) Protocol
|
|
8
|
+
|
|
9
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
10
|
+
|
|
11
|
+
- `u{274C} **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
12
|
+
- `u{2705} **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
13
|
+
"@
|
|
14
|
+
|
|
15
|
+
$preFlightBlock = @"
|
|
16
|
+
|
|
17
|
+
### `u{2705} Pre-Flight Self-Audit
|
|
18
|
+
|
|
19
|
+
``````
|
|
20
|
+
`u{2705} Did I rely ONLY on real, verified tools and methods?
|
|
21
|
+
`u{2705} Is this solution appropriately scoped to the user's constraints?
|
|
22
|
+
`u{2705} Did I handle potential failure modes and edge cases?
|
|
23
|
+
`u{2705} Have I avoided generic boilerplate that doesn't add value?
|
|
24
|
+
``````
|
|
25
|
+
"@
|
|
26
|
+
|
|
27
|
+
$failingSkills = @(
|
|
28
|
+
"12-principles-of-animation",
|
|
29
|
+
"60fps-animation",
|
|
30
|
+
"accessible-animation",
|
|
31
|
+
"adapt",
|
|
32
|
+
"animation-on-scroll",
|
|
33
|
+
"animation-systems",
|
|
34
|
+
"antfu-conventions",
|
|
35
|
+
"audit-and-fix",
|
|
36
|
+
"bolder",
|
|
37
|
+
"build-primitive",
|
|
38
|
+
"clarify",
|
|
39
|
+
"cobejs",
|
|
40
|
+
"codebase-design",
|
|
41
|
+
"colorize",
|
|
42
|
+
"compact-landing",
|
|
43
|
+
"company-logos",
|
|
44
|
+
"critique",
|
|
45
|
+
"delight",
|
|
46
|
+
"design-lab",
|
|
47
|
+
"diagnosing-bugs",
|
|
48
|
+
"distill",
|
|
49
|
+
"domain-modeling",
|
|
50
|
+
"fixing-metadata",
|
|
51
|
+
"gpt-taste",
|
|
52
|
+
"harden",
|
|
53
|
+
"impeccable",
|
|
54
|
+
"improve-codebase-architecture",
|
|
55
|
+
"landing-page",
|
|
56
|
+
"local-first-architecture",
|
|
57
|
+
"lottie-animation",
|
|
58
|
+
"marquee-loop",
|
|
59
|
+
"masked-reveal",
|
|
60
|
+
"micro-interaction",
|
|
61
|
+
"morphing-icons",
|
|
62
|
+
"page-transition-animation",
|
|
63
|
+
"polish",
|
|
64
|
+
"pricing-page",
|
|
65
|
+
"progressive-blur",
|
|
66
|
+
"quieter",
|
|
67
|
+
"react-doctor",
|
|
68
|
+
"redesign-skill",
|
|
69
|
+
"shape",
|
|
70
|
+
"soft-skill",
|
|
71
|
+
"sounds-on-the-web",
|
|
72
|
+
"svg-animation",
|
|
73
|
+
"swiss-design",
|
|
74
|
+
"taste-skill",
|
|
75
|
+
"tdd-workflow",
|
|
76
|
+
"thermo-nuclear-code-quality-review",
|
|
77
|
+
"to-spring-or-not-to-spring",
|
|
78
|
+
"transitions-dev",
|
|
79
|
+
"typeset",
|
|
80
|
+
"web-quality-audit"
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
$fixedCount = 0
|
|
84
|
+
$errorCount = 0
|
|
85
|
+
|
|
86
|
+
foreach ($skill in $failingSkills) {
|
|
87
|
+
$filePath = Join-Path $skillsDir "$skill\SKILL.md"
|
|
88
|
+
|
|
89
|
+
if (-not (Test-Path $filePath)) {
|
|
90
|
+
Write-Host " SKIP: $skill/SKILL.md not found" -ForegroundColor Yellow
|
|
91
|
+
continue
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
$content = Get-Content $filePath -Raw
|
|
95
|
+
$appendText = ""
|
|
96
|
+
|
|
97
|
+
$hasPreFlight = ($content -match "Pre-Flight Checklist") -or ($content -match "Pre-Flight")
|
|
98
|
+
$hasVBC = ($content -match "VBC Protocol") -or ($content -match "VBC")
|
|
99
|
+
|
|
100
|
+
if (-not $hasPreFlight) {
|
|
101
|
+
$appendText += $preFlightBlock
|
|
102
|
+
Write-Host " FIX: $skill/SKILL.md - adding Pre-Flight" -ForegroundColor Cyan
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (-not $hasVBC) {
|
|
106
|
+
$appendText += $vbcBlock
|
|
107
|
+
Write-Host " FIX: $skill/SKILL.md - adding VBC Protocol" -ForegroundColor Cyan
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if ($appendText -ne "") {
|
|
111
|
+
Add-Content -Path $filePath -Value $appendText -NoNewline
|
|
112
|
+
$fixedCount++
|
|
113
|
+
Write-Host " DONE: $skill/SKILL.md" -ForegroundColor Green
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
Write-Host ""
|
|
118
|
+
Write-Host "Fixed: $fixedCount files" -ForegroundColor Green
|
|
119
|
+
Write-Host "Errors: $errorCount" -ForegroundColor Red
|