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>
78 lines
2.1 KiB
JavaScript
78 lines
2.1 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Sync v3 QE agents from the repo to the v3 package assets (cross-platform).
|
|
* Replaces the bash sync:agents npm 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 PROJECT_ROOT = path.dirname(SCRIPT_DIR);
|
|
|
|
function ensureDir(dirPath) {
|
|
fs.mkdirSync(dirPath, { recursive: true });
|
|
}
|
|
|
|
function main() {
|
|
const sourceAgentsDir = path.join(PROJECT_ROOT, '.claude', 'agents', 'v3');
|
|
const destAgentsDir = path.join(PROJECT_ROOT, 'assets', 'agents', 'v3');
|
|
const sourceSubagentsDir = path.join(sourceAgentsDir, 'subagents');
|
|
const destSubagentsDir = path.join(destAgentsDir, 'subagents');
|
|
|
|
ensureDir(destAgentsDir);
|
|
|
|
let mainCount = 0;
|
|
let subCount = 0;
|
|
|
|
// Copy main qe-*.md 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);
|
|
if (fs.statSync(src).isFile()) {
|
|
fs.copyFileSync(src, path.join(destAgentsDir, file));
|
|
mainCount++;
|
|
}
|
|
}
|
|
} catch {
|
|
// Source directory missing or unreadable -- silently ignore
|
|
}
|
|
|
|
// Copy subagent qe-*.md files
|
|
ensureDir(destSubagentsDir);
|
|
|
|
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);
|
|
if (fs.statSync(src).isFile()) {
|
|
fs.copyFileSync(src, path.join(destSubagentsDir, file));
|
|
subCount++;
|
|
}
|
|
}
|
|
} catch {
|
|
// Subagents directory missing or unreadable -- silently ignore
|
|
}
|
|
|
|
const total = mainCount + subCount;
|
|
console.log(
|
|
'Synced v3 QE agents (' +
|
|
mainCount +
|
|
' main + ' +
|
|
subCount +
|
|
' subagents = ' +
|
|
total +
|
|
' total)'
|
|
);
|
|
}
|
|
|
|
main();
|