(argv)
| 213 | } |
| 214 | |
| 215 | async function handleSetup(argv) { |
| 216 | const { options } = parseCommandInput(argv, { |
| 217 | valueOptions: ["cwd"], |
| 218 | booleanOptions: ["json", "enable-review-gate", "disable-review-gate"] |
| 219 | }); |
| 220 | |
| 221 | if (options["enable-review-gate"] && options["disable-review-gate"]) { |
| 222 | throw new Error("Choose either --enable-review-gate or --disable-review-gate."); |
| 223 | } |
| 224 | |
| 225 | const cwd = resolveCommandCwd(options); |
| 226 | const workspaceRoot = resolveCommandWorkspace(options); |
| 227 | const actionsTaken = []; |
| 228 | |
| 229 | if (options["enable-review-gate"]) { |
| 230 | setConfig(workspaceRoot, "stopReviewGate", true); |
| 231 | actionsTaken.push(`Enabled the stop-time review gate for ${workspaceRoot}.`); |
| 232 | } else if (options["disable-review-gate"]) { |
| 233 | setConfig(workspaceRoot, "stopReviewGate", false); |
| 234 | actionsTaken.push(`Disabled the stop-time review gate for ${workspaceRoot}.`); |
| 235 | } |
| 236 | |
| 237 | const finalReport = await buildSetupReport(cwd, actionsTaken); |
| 238 | outputResult(options.json ? finalReport : renderSetupReport(finalReport), options.json); |
| 239 | } |
| 240 | |
| 241 | function buildAdversarialReviewPrompt(context, focusText) { |
| 242 | const template = loadPromptTemplate(ROOT_DIR, "adversarial-review"); |
no test coverage detected