ai-spec-dev 0.59.0 → 0.60.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/README.md +1 -1
- package/cli/pipeline/single-repo.ts +20 -19
- package/dist/cli/index.js +24 -23
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +24 -23
- package/dist/cli/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -694,7 +694,7 @@ var require_package = __commonJS({
|
|
|
694
694
|
"package.json"(exports, module) {
|
|
695
695
|
module.exports = {
|
|
696
696
|
name: "ai-spec-dev",
|
|
697
|
-
version: "0.
|
|
697
|
+
version: "0.59.0",
|
|
698
698
|
description: "AI-driven Development Orchestrator SDK & CLI",
|
|
699
699
|
main: "dist/index.js",
|
|
700
700
|
types: "dist/index.d.ts",
|
|
@@ -13506,7 +13506,7 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13506
13506
|
setActiveLogger(runLogger);
|
|
13507
13507
|
const promptHash = computePromptHash();
|
|
13508
13508
|
runLogger.setPromptHash(promptHash);
|
|
13509
|
-
console.log(chalk28.
|
|
13509
|
+
console.log(chalk28.bold("[1/10] Loading project context..."));
|
|
13510
13510
|
runLogger.stageStart("context_load");
|
|
13511
13511
|
const loader = new ContextLoader(currentDir);
|
|
13512
13512
|
const context = await loader.loadProjectContext();
|
|
@@ -13554,8 +13554,8 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13554
13554
|
approach: choice.selectedApproach?.slice(0, 80)
|
|
13555
13555
|
});
|
|
13556
13556
|
}
|
|
13557
|
-
console.log(chalk28.
|
|
13558
|
-
[2/
|
|
13557
|
+
console.log(chalk28.bold(`
|
|
13558
|
+
[2/10] Generating spec with ${specProviderName}/${specModelName}...`));
|
|
13559
13559
|
let specProvider = vcrReplayProvider ?? createProvider(specProviderName, specApiKey, specModelName);
|
|
13560
13560
|
if (!vcrReplayProvider && opts.vcrRecord) {
|
|
13561
13561
|
specVcrRecorder = new VcrRecordingProvider(specProvider);
|
|
@@ -13591,10 +13591,10 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13591
13591
|
}
|
|
13592
13592
|
let finalSpec;
|
|
13593
13593
|
if (opts.fast) {
|
|
13594
|
-
console.log(chalk28.gray("\n[3/
|
|
13594
|
+
console.log(chalk28.gray("\n[3/10] Skipping refinement (--fast)."));
|
|
13595
13595
|
finalSpec = initialSpec;
|
|
13596
13596
|
} else {
|
|
13597
|
-
console.log(chalk28.
|
|
13597
|
+
console.log(chalk28.bold("\n[3/10] Interactive spec refinement..."));
|
|
13598
13598
|
runLogger.stageStart("spec_refine");
|
|
13599
13599
|
const refiner = new SpecRefiner(specProvider);
|
|
13600
13600
|
finalSpec = await refiner.refineLoop(initialSpec);
|
|
@@ -13605,7 +13605,7 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13605
13605
|
const shouldRunAssessment = !opts.skipAssessment && (!opts.auto || minScore > 0);
|
|
13606
13606
|
if (shouldRunAssessment) {
|
|
13607
13607
|
if (!opts.auto) {
|
|
13608
|
-
console.log(chalk28.
|
|
13608
|
+
console.log(chalk28.bold("\n[3.4/10] Spec quality assessment..."));
|
|
13609
13609
|
}
|
|
13610
13610
|
runLogger.stageStart("spec_assess");
|
|
13611
13611
|
const assessSpinner = startStage("spec_assess", "Evaluating spec quality...");
|
|
@@ -13639,7 +13639,7 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13639
13639
|
}
|
|
13640
13640
|
}
|
|
13641
13641
|
if (!opts.auto) {
|
|
13642
|
-
console.log(chalk28.
|
|
13642
|
+
console.log(chalk28.bold("\n[Gate] Approval Gate \u2014 review before code generation"));
|
|
13643
13643
|
const specLines = finalSpec.split("\n").length;
|
|
13644
13644
|
const specWords = finalSpec.split(/\s+/).length;
|
|
13645
13645
|
const taskCountHint = initialTasks.length > 0 ? ` Tasks generated : ${initialTasks.length}` : "";
|
|
@@ -13693,13 +13693,13 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13693
13693
|
}
|
|
13694
13694
|
console.log(chalk28.green(" \u2714 Approved \u2014 continuing to code generation."));
|
|
13695
13695
|
} else {
|
|
13696
|
-
console.log(chalk28.gray("[
|
|
13696
|
+
console.log(chalk28.gray("[Gate] Approval Gate: skipped (--auto)."));
|
|
13697
13697
|
}
|
|
13698
13698
|
let extractedDsl = null;
|
|
13699
13699
|
if (opts.skipDsl) {
|
|
13700
13700
|
console.log(chalk28.gray("\n[DSL] Skipped (--skip-dsl)."));
|
|
13701
13701
|
} else {
|
|
13702
|
-
console.log(chalk28.
|
|
13702
|
+
console.log(chalk28.bold("\n[DSL] Extracting structured DSL from spec..."));
|
|
13703
13703
|
console.log(chalk28.gray(` Provider: ${specProviderName}/${specModelName}`));
|
|
13704
13704
|
runLogger.stageStart("dsl_extract");
|
|
13705
13705
|
const dslSpinner = startStage("dsl_extract", "Extracting DSL from spec...");
|
|
@@ -13791,20 +13791,20 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13791
13791
|
const skipWorktree = opts.worktree ? false : opts.skipWorktree || isFrontendProject2;
|
|
13792
13792
|
let workingDir = currentDir;
|
|
13793
13793
|
if (!skipWorktree) {
|
|
13794
|
-
console.log(chalk28.
|
|
13794
|
+
console.log(chalk28.bold("\n[Git] Setting up git worktree..."));
|
|
13795
13795
|
const worktreeManager = new GitWorktreeManager(currentDir);
|
|
13796
13796
|
const worktreePath = await worktreeManager.createWorktree(idea);
|
|
13797
13797
|
if (worktreePath) workingDir = worktreePath;
|
|
13798
13798
|
} else {
|
|
13799
13799
|
const reason = opts.worktree ? "" : isFrontendProject2 ? " (frontend project \u2014 use --worktree to override)" : " (--skip-worktree)";
|
|
13800
|
-
console.log(chalk28.gray(`[
|
|
13800
|
+
console.log(chalk28.gray(`[Git] Skipping worktree${reason}.`));
|
|
13801
13801
|
}
|
|
13802
13802
|
const specsDir = path30.join(workingDir, "specs");
|
|
13803
13803
|
await fs31.ensureDir(specsDir);
|
|
13804
13804
|
const { filePath: specFile, version: specVersion } = await nextVersionPath(specsDir, featureSlug);
|
|
13805
13805
|
await fs31.writeFile(specFile, finalSpec, "utf-8");
|
|
13806
13806
|
console.log(chalk28.green(`
|
|
13807
|
-
|
|
13807
|
+
\u2714 Spec saved: ${specFile}`) + chalk28.gray(` (v${specVersion})`));
|
|
13808
13808
|
let savedDslFile = null;
|
|
13809
13809
|
if (extractedDsl) {
|
|
13810
13810
|
const dslExtractor = new DslExtractor(specProvider);
|
|
@@ -13848,8 +13848,8 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13848
13848
|
console.log(chalk28.yellow(" \u26A0 No tasks generated \u2014 code generation will use fallback file planning."));
|
|
13849
13849
|
}
|
|
13850
13850
|
}
|
|
13851
|
-
console.log(chalk28.
|
|
13852
|
-
[6/
|
|
13851
|
+
console.log(chalk28.bold(`
|
|
13852
|
+
[6/10] Code generation (mode: ${codegenMode})...`));
|
|
13853
13853
|
const rawCodegenProvider = codegenProviderName === specProviderName && codegenApiKey === specApiKey ? specProvider : createProvider(codegenProviderName, codegenApiKey, codegenModelName);
|
|
13854
13854
|
let codegenProvider;
|
|
13855
13855
|
if (!vcrReplayProvider && opts.vcrRecord && !(rawCodegenProvider instanceof VcrRecordingProvider)) {
|
|
@@ -13925,14 +13925,14 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13925
13925
|
}
|
|
13926
13926
|
}
|
|
13927
13927
|
if (opts.tdd) {
|
|
13928
|
-
console.log(chalk28.gray("\n[7/
|
|
13928
|
+
console.log(chalk28.gray("\n[7/10] TDD mode \u2014 test files already written pre-implementation."));
|
|
13929
13929
|
} else if (opts.skipTests) {
|
|
13930
|
-
console.log(chalk28.gray("\n[7/
|
|
13930
|
+
console.log(chalk28.gray("\n[7/10] Skipping test generation (--skip-tests)."));
|
|
13931
13931
|
} else if (!extractedDsl) {
|
|
13932
|
-
console.log(chalk28.gray("\n[7/
|
|
13932
|
+
console.log(chalk28.gray("\n[7/10] Skipping test generation (no DSL available)."));
|
|
13933
13933
|
} else {
|
|
13934
|
-
console.log(chalk28.
|
|
13935
|
-
[7/
|
|
13934
|
+
console.log(chalk28.bold(`
|
|
13935
|
+
[7/10] Test skeleton generation...`));
|
|
13936
13936
|
runLogger.stageStart("test_gen");
|
|
13937
13937
|
const testGen = new TestGenerator(codegenProvider);
|
|
13938
13938
|
generatedTestFiles = await testGen.generate(extractedDsl, workingDir);
|
|
@@ -13940,11 +13940,11 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13940
13940
|
}
|
|
13941
13941
|
let compilePassed = false;
|
|
13942
13942
|
if (opts.skipErrorFeedback) {
|
|
13943
|
-
console.log(chalk28.gray("[8/
|
|
13943
|
+
console.log(chalk28.gray("[8/10] Skipping error feedback (--skip-error-feedback)."));
|
|
13944
13944
|
compilePassed = true;
|
|
13945
13945
|
} else {
|
|
13946
13946
|
if (opts.tdd) {
|
|
13947
|
-
console.log(chalk28.cyan("[8/
|
|
13947
|
+
console.log(chalk28.cyan("[8/10] TDD mode \u2014 error feedback loop driving implementation to pass tests..."));
|
|
13948
13948
|
}
|
|
13949
13949
|
runLogger.stageStart("error_feedback");
|
|
13950
13950
|
const defaultCycles = opts.tdd ? 3 : 2;
|
|
@@ -13958,7 +13958,7 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
13958
13958
|
let reviewResult = "";
|
|
13959
13959
|
let accumulatePromise;
|
|
13960
13960
|
if (!opts.skipReview) {
|
|
13961
|
-
console.log(chalk28.
|
|
13961
|
+
console.log(chalk28.bold("\n[9/10] Automated code review (3-pass: architecture + implementation + impact/complexity)..."));
|
|
13962
13962
|
runLogger.stageStart("review");
|
|
13963
13963
|
const reviewSpinner = startStage("review", "Running 3-pass code review...");
|
|
13964
13964
|
const reviewer = new CodeReviewer(specProvider, workingDir);
|
|
@@ -14044,6 +14044,7 @@ async function runSingleRepoPipeline(idea, opts, currentDir, config2) {
|
|
|
14044
14044
|
}
|
|
14045
14045
|
}
|
|
14046
14046
|
}
|
|
14047
|
+
console.log(chalk28.bold("\n[10/10] Harness Self-Evaluation..."));
|
|
14047
14048
|
runLogger.stageStart("self_eval");
|
|
14048
14049
|
const selfEvalResult = runSelfEval({
|
|
14049
14050
|
dsl: extractedDsl,
|