mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
2253d05618
Remove the nested v3/ subdirectory by moving all active source code, tests, configs, and assets directly to the project root. Archive v2/ (dead code, 847MB) to v2-archive.tar.gz. Key changes: - Move v3/src/ → src/, v3/tests/ → tests/, v3/packages/ → packages/ - Move v3/tsconfig.json, v3/vitest.config.ts to root - Merge v3/package.json into root package.json (ESM, scripts, deps, exports) - Merge v3/scripts/ into scripts/, v3/implementation/ into docs/implementation/ - Update all CI workflows to remove "cd v3 &&" and v3/ path prefixes - Fix all init installer path resolution (3-level-up → 2-level-up) - Fix hooks to use "node ./dist/cli/bundle.js" instead of bare "aqe" - Update settings.json ADR/DDD directories to docs/implementation/ - Fix helper scripts (statusline, adr-compliance, ddd-tracker, guidance-hooks) - Update 58 agent definitions: aqe/v3/ → aqe/ memory namespaces - Update 15 guidance shards: v3/src/ → src/ path references - Fix sync interfaces: remove v3/ and v2/ path references - Fix test path calculations (process.cwd() + '..' no longer needed) - Fix flaky perf test threshold (500ms → 1000ms for CI environments) - Fix complexity-analyzer test to match ADR-051 keyword-based eligibility Build passes, 17,901 tests pass, CLI and MCP bundles verified. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
83 lines
2.4 KiB
JavaScript
83 lines
2.4 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Check whether the v3 QE agents in the assets directory are in sync with the
|
|
* source files in the repo (cross-platform replacement for the bash sync:agents:check script).
|
|
*
|
|
* Uses CommonJS for maximum Node.js compatibility across Windows, Mac, and Linux.
|
|
*/
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const SCRIPT_DIR = __dirname;
|
|
const V3_DIR = path.dirname(SCRIPT_DIR);
|
|
const REPO_ROOT = path.dirname(V3_DIR);
|
|
|
|
/**
|
|
* Compare two files by reading their contents. Returns true if they are identical.
|
|
* Returns false if either file does not exist or contents differ.
|
|
*/
|
|
function filesMatch(fileA, fileB) {
|
|
try {
|
|
const contentsA = fs.readFileSync(fileA);
|
|
const contentsB = fs.readFileSync(fileB);
|
|
return contentsA.equals(contentsB);
|
|
} catch {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function main() {
|
|
console.log('Checking v3 QE agents sync status:');
|
|
|
|
const sourceAgentsDir = path.join(REPO_ROOT, '.claude', 'agents', 'v3');
|
|
const destAgentsDir = path.join(V3_DIR, 'assets', 'agents', 'v3');
|
|
const sourceSubagentsDir = path.join(sourceAgentsDir, 'subagents');
|
|
const destSubagentsDir = path.join(destAgentsDir, 'subagents');
|
|
|
|
let warnings = 0;
|
|
|
|
// Check main agents
|
|
try {
|
|
const files = fs.readdirSync(sourceAgentsDir).filter(function (f) {
|
|
return f.startsWith('qe-') && f.endsWith('.md');
|
|
});
|
|
for (const file of files) {
|
|
const src = path.join(sourceAgentsDir, file);
|
|
const dest = path.join(destAgentsDir, file);
|
|
if (fs.statSync(src).isFile() && !filesMatch(src, dest)) {
|
|
console.log(' Warning: ' + file);
|
|
warnings++;
|
|
}
|
|
}
|
|
} catch {
|
|
// Source directory missing -- nothing to check
|
|
}
|
|
|
|
// Check subagents
|
|
try {
|
|
const files = fs.readdirSync(sourceSubagentsDir).filter(function (f) {
|
|
return f.startsWith('qe-') && f.endsWith('.md');
|
|
});
|
|
for (const file of files) {
|
|
const src = path.join(sourceSubagentsDir, file);
|
|
const dest = path.join(destSubagentsDir, file);
|
|
if (fs.statSync(src).isFile() && !filesMatch(src, dest)) {
|
|
console.log(' Warning: subagents/' + file);
|
|
warnings++;
|
|
}
|
|
}
|
|
} catch {
|
|
// Subagents directory missing -- nothing to check
|
|
}
|
|
|
|
if (warnings > 0) {
|
|
console.log(warnings + ' file(s) out of sync. Run "npm run sync:agents" to update.');
|
|
}
|
|
|
|
console.log('Check complete');
|
|
}
|
|
|
|
main();
|