mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
3a6d79639a
Delete 104 bash validate.sh files and 4 validate.template.sh templates. Skill validation now uses validate-config.json (declarative) + validate-skill.cjs (universal runner) — fully cross-platform. - Delete .claude/skills/*/scripts/validate.sh (55 files) - Delete v3/assets/skills/*/scripts/validate.sh (47 files) - Delete v3/.claude/skills/*/scripts/validate.sh (52 files via sync) - Delete validator-lib.sh and validate.template.sh templates (6 files) - Update all SKILL.md frontmatter: validator_path → validate-config.json - Update all eval YAML files to reference validate-config.json - Update trust-tier-manifest.json, CI workflow, docs, and ADR-056 - Fix validate-tier3.cjs to use validate-skill.cjs instead of bash - Remove .sh fallback from validate-skill.cjs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
62 lines
1.6 KiB
JavaScript
62 lines
1.6 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Cross-platform Tier 3 skill validation runner
|
|
*
|
|
* Runs validate-skill.cjs --self-test for each tier 3 skill.
|
|
* Fully cross-platform — no bash/shell dependency.
|
|
*
|
|
* Uses CommonJS for maximum Node.js compatibility.
|
|
*/
|
|
|
|
const { execSync } = require('child_process');
|
|
const { existsSync } = require('fs');
|
|
const { join } = require('path');
|
|
|
|
const RESET = '\x1b[0m';
|
|
const CYAN = '\x1b[36m';
|
|
const GREEN = '\x1b[32m';
|
|
const RED = '\x1b[31m';
|
|
const YELLOW = '\x1b[33m';
|
|
|
|
const TIER3_SKILLS = [
|
|
'api-testing-patterns',
|
|
'security-testing',
|
|
'performance-testing',
|
|
];
|
|
|
|
const projectRoot = join(__dirname, '..');
|
|
const validatorScript = join(__dirname, 'validate-skill.cjs');
|
|
|
|
let failures = 0;
|
|
|
|
for (const skill of TIER3_SKILLS) {
|
|
const configPath = join(projectRoot, '.claude', 'skills', skill, 'scripts', 'validate-config.json');
|
|
|
|
if (!existsSync(configPath)) {
|
|
console.log(`${YELLOW}[tier3]${RESET} Skipping ${skill} — validate-config.json not found`);
|
|
continue;
|
|
}
|
|
|
|
console.log(`${CYAN}[tier3]${RESET} Validating: ${skill}`);
|
|
|
|
try {
|
|
execSync(`node "${validatorScript}" ${skill} --self-test`, {
|
|
cwd: projectRoot,
|
|
stdio: 'inherit',
|
|
timeout: 60000,
|
|
});
|
|
console.log(`${GREEN}[tier3]${RESET} ${skill}: PASS`);
|
|
} catch (err) {
|
|
console.log(`${RED}[tier3]${RESET} ${skill}: FAIL`);
|
|
failures++;
|
|
}
|
|
}
|
|
|
|
if (failures > 0) {
|
|
console.log(`\n${RED}[tier3]${RESET} ${failures} skill(s) failed validation`);
|
|
process.exit(1);
|
|
} else {
|
|
console.log(`\n${GREEN}[tier3]${RESET} All tier 3 skills validated`);
|
|
}
|