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/scripts/sync-version.js
CHANGED
|
@@ -1,94 +1,147 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* sync-version.js —
|
|
3
|
+
* sync-version.js — Release metadata consistency check for Tribunal Kit.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Run manually or as a preversion npm script:
|
|
9
|
-
* node scripts/sync-version.js
|
|
5
|
+
* Verifies the package version, native package metadata, lockfile metadata,
|
|
6
|
+
* and public asset-count claims before a release. It intentionally performs
|
|
7
|
+
* no implicit writes: a failed check makes stale release metadata visible.
|
|
10
8
|
*/
|
|
11
9
|
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
12
|
const fs = require("fs");
|
|
13
13
|
const path = require("path");
|
|
14
14
|
|
|
15
15
|
const ROOT = path.resolve(__dirname, "..");
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
const PKG_PATH = path.join(ROOT, "package.json");
|
|
17
|
+
const PKG = JSON.parse(fs.readFileSync(PKG_PATH, "utf8"));
|
|
18
|
+
const VERSION = PKG.version;
|
|
19
|
+
|
|
20
|
+
function readText(relativePath) {
|
|
21
|
+
return fs.readFileSync(path.join(ROOT, relativePath), "utf8");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function readJson(relativePath) {
|
|
25
|
+
return JSON.parse(readText(relativePath));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function countDirectory(relativePath, predicate) {
|
|
29
|
+
const directory = path.join(ROOT, relativePath);
|
|
30
|
+
if (!fs.existsSync(directory)) return 0;
|
|
31
|
+
return fs.readdirSync(directory, { withFileTypes: true }).filter(predicate).length;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function countReviewers() {
|
|
35
|
+
const agentsDir = path.join(ROOT, ".agent", "agents");
|
|
36
|
+
return countDirectory(".agent/agents", (entry) => {
|
|
37
|
+
if (!entry.isFile() || !entry.name.endsWith(".md")) return false;
|
|
38
|
+
const content = fs.readFileSync(path.join(agentsDir, entry.name), "utf8");
|
|
39
|
+
return /reviewer|auditor|tester|throughput-optimizer/i.test(entry.name) || /^role:\s*reviewer\s*$/im.test(content);
|
|
40
|
+
});
|
|
25
41
|
}
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
expected
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
43
|
+
|
|
44
|
+
const COUNTS = {
|
|
45
|
+
agents: countDirectory(".agent/agents", (entry) => entry.isFile() && entry.name.endsWith(".md")),
|
|
46
|
+
reviewers: countReviewers(),
|
|
47
|
+
skills: countDirectory(".agent/skills", (entry) => entry.isDirectory() && fs.existsSync(path.join(ROOT, ".agent", "skills", entry.name, "SKILL.md"))),
|
|
48
|
+
workflows: countDirectory(".agent/workflows", (entry) => entry.isFile() && entry.name.endsWith(".md")),
|
|
49
|
+
scripts: countDirectory(".agent/scripts", (entry) => entry.isFile() && /\.(?:js|py)$/.test(entry.name)),
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const failures = [];
|
|
53
|
+
|
|
54
|
+
function fail(message) {
|
|
55
|
+
failures.push(message);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function checkVersionMetadata() {
|
|
59
|
+
const expectedOptionalVersion = `^${VERSION}`;
|
|
60
|
+
for (const [name, declaredVersion] of Object.entries(PKG.optionalDependencies || {})) {
|
|
61
|
+
if (declaredVersion !== expectedOptionalVersion) {
|
|
62
|
+
fail(`package.json optional dependency ${name} is ${declaredVersion}, expected ${expectedOptionalVersion}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const lock = readJson("package-lock.json");
|
|
67
|
+
if (lock.version !== VERSION || lock.packages?.[""]?.version !== VERSION) {
|
|
68
|
+
fail(`package-lock.json root version does not match package.json (${VERSION})`);
|
|
69
|
+
}
|
|
70
|
+
for (const [name, declaredVersion] of Object.entries(lock.packages?.[""]?.optionalDependencies || {})) {
|
|
71
|
+
if (declaredVersion !== expectedOptionalVersion) {
|
|
72
|
+
fail(`package-lock.json optional dependency ${name} is ${declaredVersion}, expected ${expectedOptionalVersion}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const cargoToml = readText("crates/core/Cargo.toml");
|
|
77
|
+
const cargoTomlVersion = cargoToml.match(/^version\s*=\s*"([^"]+)"/m)?.[1];
|
|
78
|
+
if (cargoTomlVersion !== VERSION) {
|
|
79
|
+
fail(`crates/core/Cargo.toml version is ${cargoTomlVersion || "missing"}, expected ${VERSION}`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const cargoLock = readText("Cargo.lock");
|
|
83
|
+
const cargoLockVersion = cargoLock.match(/name\s*=\s*"tribunal-core"\s*\nversion\s*=\s*"([^"]+)"/)?.[1];
|
|
84
|
+
if (cargoLockVersion !== VERSION) {
|
|
85
|
+
fail(`Cargo.lock tribunal-core version is ${cargoLockVersion || "missing"}, expected ${VERSION}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const readmeRelease = readText("README.md").match(/Release-v([0-9]+\.[0-9]+\.[0-9]+)/)?.[1];
|
|
89
|
+
if (readmeRelease !== VERSION) {
|
|
90
|
+
fail(`README release badge is ${readmeRelease || "missing"}, expected ${VERSION}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const DOCUMENTS = [
|
|
95
|
+
"README.md",
|
|
96
|
+
".agent/ARCHITECTURE.md",
|
|
97
|
+
".agent/rules/GEMINI.md",
|
|
98
|
+
"CONTRIBUTING.md",
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
const CLAIM_PATTERNS = [
|
|
102
|
+
{ entity: "agents", regex: /(\d+)\s*(?:specialist\s+)?agents?\b/gi },
|
|
103
|
+
{
|
|
104
|
+
entity: "reviewers",
|
|
105
|
+
regex: /(\d+)\s*(?:-\s*)?(?:(?:parallel|domain(?:-specific)?|tribunal|code)\s+)*reviewers?\b/gi,
|
|
106
|
+
},
|
|
107
|
+
{ entity: "skills", regex: /(\d+)\s*(?:valid\s+|modular\s+)?skills?(?:\s+(?:packages?|modules?))?\b/gi },
|
|
108
|
+
{ entity: "workflows", regex: /(\d+)\s*(?:slash\s+)?workflows?\b/gi },
|
|
109
|
+
{ entity: "scripts", regex: /(\d+)\s*(?:JS\s+)?(?:automation\s+)?scripts?\b/gi },
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
function checkDocumentCounts() {
|
|
113
|
+
for (const relativePath of DOCUMENTS) {
|
|
114
|
+
const content = readText(relativePath);
|
|
115
|
+
for (const { entity, regex } of CLAIM_PATTERNS) {
|
|
116
|
+
regex.lastIndex = 0;
|
|
117
|
+
let match;
|
|
118
|
+
while ((match = regex.exec(content)) !== null) {
|
|
119
|
+
const claimed = Number.parseInt(match[1], 10);
|
|
120
|
+
if (claimed < 5 || claimed > 500) continue;
|
|
121
|
+
if (claimed !== COUNTS[entity]) {
|
|
122
|
+
const line = content.slice(0, match.index).split(/\r?\n/).length;
|
|
123
|
+
fail(`${relativePath}:${line} says ${claimed} ${entity}, actual is ${COUNTS[entity]}`);
|
|
124
|
+
}
|
|
78
125
|
}
|
|
79
126
|
}
|
|
80
127
|
}
|
|
81
128
|
}
|
|
82
129
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
);
|
|
130
|
+
console.log(`\n Tribunal Kit v${VERSION} — Release Metadata Check`);
|
|
131
|
+
console.log(" ────────────────────────────────────────────────");
|
|
132
|
+
console.log(` Agents: ${COUNTS.agents} (${COUNTS.reviewers} reviewers)`);
|
|
133
|
+
console.log(` Skills: ${COUNTS.skills}`);
|
|
134
|
+
console.log(` Workflows: ${COUNTS.workflows}`);
|
|
135
|
+
console.log(` Scripts: ${COUNTS.scripts}`);
|
|
136
|
+
|
|
137
|
+
checkVersionMetadata();
|
|
138
|
+
checkDocumentCounts();
|
|
139
|
+
|
|
140
|
+
if (failures.length > 0) {
|
|
141
|
+
console.log();
|
|
142
|
+
for (const message of failures) console.log(` ✗ ${message}`);
|
|
143
|
+
console.log(`\n Found ${failures.length} release metadata inconsistency${failures.length === 1 ? "" : "ies"}.`);
|
|
144
|
+
process.exitCode = 1;
|
|
87
145
|
} else {
|
|
88
|
-
console.log(
|
|
89
|
-
`\n ❌ Found ${staleFound} stale reference(s). Update manually or run the sync tool.`,
|
|
90
|
-
);
|
|
91
|
-
process.exit(1);
|
|
146
|
+
console.log(`\n ✓ Version metadata and public count claims are in sync across ${DOCUMENTS.length} documents.\n`);
|
|
92
147
|
}
|
|
93
|
-
|
|
94
|
-
console.log();
|