| 7 | const { buildSkillCatalog } = require('../core/skills/catalog'); |
| 8 | |
| 9 | function parseArgs(argv) { |
| 10 | const args = { projectRoot: process.cwd(), json: false }; |
| 11 | for (let index = 2; index < argv.length; index++) { |
| 12 | const arg = argv[index]; |
| 13 | const value = argv[index + 1]; |
| 14 | if (arg === '--project-root') { args.projectRoot = path.resolve(value); index++; } |
| 15 | else if (arg === '--task-class') { args.taskClass = value; index++; } |
| 16 | else if (arg === '--risk-level') { args.riskLevel = value; index++; } |
| 17 | else if (arg === '--json') args.json = true; |
| 18 | else if (arg === '--help' || arg === '-h') args.help = true; |
| 19 | } |
| 20 | return args; |
| 21 | } |
| 22 | |
| 23 | function usage() { |
| 24 | return 'Usage: node scripts/skill-catalog.js [--task-class quality] [--risk-level medium] [--json]'; |