@nathapp/nax 0.43.1 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/nax.ts +22 -0
- package/dist/nax.js +320 -88
- package/package.json +1 -1
- package/src/agents/acp/adapter.ts +98 -5
- package/src/agents/claude-decompose.ts +6 -21
- package/src/agents/types-extended.ts +1 -1
- package/src/cli/plan.ts +4 -11
- package/src/cli/status-features.ts +19 -0
- package/src/config/test-strategy.ts +70 -0
- package/src/execution/lifecycle/acceptance-loop.ts +2 -0
- package/src/execution/lifecycle/run-setup.ts +4 -0
- package/src/execution/parallel-coordinator.ts +3 -1
- package/src/execution/parallel-executor.ts +3 -0
- package/src/execution/runner-execution.ts +16 -2
- package/src/execution/runner.ts +4 -0
- package/src/execution/story-context.ts +6 -0
- package/src/prd/schema.ts +4 -14
- package/src/precheck/index.ts +155 -44
- package/src/verification/rectification-loop.ts +18 -5
package/bin/nax.ts
CHANGED
|
@@ -278,6 +278,7 @@ program
|
|
|
278
278
|
.option("--plan", "Run plan phase first before execution", false)
|
|
279
279
|
.option("--from <spec-path>", "Path to spec file (required when --plan is used)")
|
|
280
280
|
.option("--one-shot", "Skip interactive planning Q&A, use single LLM call (ACP only)", false)
|
|
281
|
+
.option("--force", "Force overwrite existing prd.json when using --plan", false)
|
|
281
282
|
.option("--headless", "Force headless mode (disable TUI, use pipe mode)", false)
|
|
282
283
|
.option("--verbose", "Enable verbose logging (debug level)", false)
|
|
283
284
|
.option("--quiet", "Quiet mode (warnings and errors only)", false)
|
|
@@ -343,6 +344,27 @@ program
|
|
|
343
344
|
|
|
344
345
|
// Run plan phase if --plan flag is set (AC-4: runs plan then execute)
|
|
345
346
|
if (options.plan && options.from) {
|
|
347
|
+
// Guard: block overwrite of existing prd.json unless --force
|
|
348
|
+
if (existsSync(prdPath) && !options.force) {
|
|
349
|
+
console.error(chalk.red(`Error: prd.json already exists for feature "${options.feature}".`));
|
|
350
|
+
console.error(chalk.dim(" Use --force to overwrite, or run without --plan to use the existing PRD."));
|
|
351
|
+
process.exit(1);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// Run environment precheck before plan — catch blockers early (before expensive LLM calls)
|
|
355
|
+
if (!options.skipPrecheck) {
|
|
356
|
+
const { runEnvironmentPrecheck } = await import("../src/precheck");
|
|
357
|
+
console.log(chalk.dim("\n [Pre-plan environment check]"));
|
|
358
|
+
const envResult = await runEnvironmentPrecheck(config, workdir);
|
|
359
|
+
if (!envResult.passed) {
|
|
360
|
+
console.error(chalk.red("\n❌ Environment precheck failed — cannot proceed with planning."));
|
|
361
|
+
for (const b of envResult.blockers) {
|
|
362
|
+
console.error(chalk.red(` ${b.name}: ${b.message}`));
|
|
363
|
+
}
|
|
364
|
+
process.exit(1);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
346
368
|
try {
|
|
347
369
|
// Initialize plan logger before calling planCommand — writes to features/<feature>/plan-<ts>.jsonl
|
|
348
370
|
mkdirSync(featureDir, { recursive: true });
|