| 114 | } |
| 115 | |
| 116 | function validateArgs(args) { |
| 117 | const errors = []; |
| 118 | if (!args.name) errors.push('--name is required'); |
| 119 | if (!args.description || args.description.length < 10) errors.push('--description must be at least 10 characters'); |
| 120 | if (!TASK_CLASSES.includes(args.taskClass)) errors.push(`--task-class must be one of: ${TASK_CLASSES.join(', ')}`); |
| 121 | if (!RISK_LEVELS.includes(args.riskLevel)) errors.push(`--risk-level must be one of: ${RISK_LEVELS.join(', ')}`); |
| 122 | return errors; |
| 123 | } |
| 124 | |
| 125 | function scaffold(args) { |
| 126 | const errors = validateArgs(args); |