mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
feat: add orchestration workflows and harness skills
This commit is contained in:
parent
51eec12764
commit
cb43402d7d
46 changed files with 5618 additions and 80 deletions
59
scripts/orchestration-status.js
Normal file
59
scripts/orchestration-status.js
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const { collectSessionSnapshot } = require('./lib/orchestration-session');
|
||||
|
||||
function usage() {
|
||||
console.log([
|
||||
'Usage:',
|
||||
' node scripts/orchestration-status.js <session-name|plan.json> [--write <output.json>]',
|
||||
'',
|
||||
'Examples:',
|
||||
' node scripts/orchestration-status.js workflow-visual-proof',
|
||||
' node scripts/orchestration-status.js .claude/plan/workflow-visual-proof.json',
|
||||
' node scripts/orchestration-status.js .claude/plan/workflow-visual-proof.json --write /tmp/snapshot.json'
|
||||
].join('\n'));
|
||||
}
|
||||
|
||||
function parseArgs(argv) {
|
||||
const args = argv.slice(2);
|
||||
const target = args.find(arg => !arg.startsWith('--'));
|
||||
const writeIndex = args.indexOf('--write');
|
||||
const writePath = writeIndex >= 0 ? args[writeIndex + 1] : null;
|
||||
|
||||
return { target, writePath };
|
||||
}
|
||||
|
||||
function main() {
|
||||
const { target, writePath } = parseArgs(process.argv);
|
||||
|
||||
if (!target) {
|
||||
usage();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const snapshot = collectSessionSnapshot(target, process.cwd());
|
||||
const json = JSON.stringify(snapshot, null, 2);
|
||||
|
||||
if (writePath) {
|
||||
const absoluteWritePath = path.resolve(writePath);
|
||||
fs.mkdirSync(path.dirname(absoluteWritePath), { recursive: true });
|
||||
fs.writeFileSync(absoluteWritePath, json + '\n', 'utf8');
|
||||
}
|
||||
|
||||
console.log(json);
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
try {
|
||||
main();
|
||||
} catch (error) {
|
||||
console.error(`[orchestration-status] ${error.message}`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { main };
|
||||
Loading…
Add table
Add a link
Reference in a new issue