archondev 2.19.3 → 2.19.4
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 -0
- package/dist/{bug-IJCK43FK.js → bug-NZHQ6QZF.js} +1 -1
- package/dist/{chunk-4NP2AVJD.js → chunk-3UOMLERV.js} +1 -1
- package/dist/{chunk-M6GNIN64.js → chunk-6XLWTTGJ.js} +2 -1
- package/dist/{chunk-6G4S6B5M.js → chunk-C4HVI2NJ.js} +1 -1
- package/dist/{chunk-F7U5AURY.js → chunk-HQBF3VTN.js} +12 -2
- package/dist/{chunk-4VIBRFVY.js → chunk-IKMCIWK3.js} +80 -2
- package/dist/{chunk-DCIIYVJW.js → chunk-XKYRHJA5.js} +36 -2
- package/dist/{chunk-KG35EHZY.js → chunk-YGDLWQBK.js} +58 -13
- package/dist/{code-review-ODLXGXNZ.js → code-review-GJVBZPZA.js} +1 -1
- package/dist/{execute-ST5ES4XI.js → execute-JAHXFYXL.js} +2 -2
- package/dist/index.js +30 -30
- package/dist/{list-GVC7CI5U.js → list-Q4HLHQJI.js} +2 -2
- package/dist/{parallel-5Z2X2FDD.js → parallel-QLKYSZZ3.js} +2 -2
- package/dist/{plan-XPUDPLT2.js → plan-7M27X3OD.js} +1 -1
- package/dist/{review-F6DHAGDF.js → review-BXESOS5R.js} +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,6 +118,7 @@ pnpm exec tsx scripts/init-governance-db.ts
|
|
|
118
118
|
|
|
119
119
|
**Notes:**
|
|
120
120
|
- Credits tier shows your balance and per‑model usage on startup; use `archon credits` for full details and history.
|
|
121
|
+
- Content-only requests (stories, outlines, lessons, visuals) use lightweight planning to avoid blocking.
|
|
121
122
|
- BYOK shows per‑model usage and cost by today/week/month/year in `archon preferences` → “View usage details.”
|
|
122
123
|
- You can paste multi‑line requests into interactive prompts; Archon captures them as a single response.
|
|
123
124
|
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
analyzeProject,
|
|
5
5
|
featuresToTasks,
|
|
6
6
|
readArchitectureContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YGDLWQBK.js";
|
|
8
8
|
|
|
9
9
|
// src/cli/review.ts
|
|
10
10
|
import chalk from "chalk";
|
|
@@ -593,6 +593,7 @@ async function reviewRun(options) {
|
|
|
593
593
|
spinner.stop();
|
|
594
594
|
console.log(chalk.green(`Starting AI Review`));
|
|
595
595
|
console.log(chalk.dim(`Pending tasks: ${stats.pending}`));
|
|
596
|
+
console.log(chalk.dim("Workflow: Stage 1 spec compliance \u2192 Stage 2 code quality"));
|
|
596
597
|
if (limit) {
|
|
597
598
|
console.log(chalk.dim(`Limit: ${limit}`));
|
|
598
599
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
UsageRecorder,
|
|
8
8
|
loadAtom
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IKMCIWK3.js";
|
|
10
10
|
import {
|
|
11
11
|
transitionAtom
|
|
12
12
|
} from "./chunk-PCTP3LKJ.js";
|
|
@@ -4793,7 +4793,7 @@ function createPrompt() {
|
|
|
4793
4793
|
}
|
|
4794
4794
|
async function execute(atomId, options) {
|
|
4795
4795
|
if (options.parallel && options.parallel.length > 0) {
|
|
4796
|
-
const { parallelExecute } = await import("./parallel-
|
|
4796
|
+
const { parallelExecute } = await import("./parallel-QLKYSZZ3.js");
|
|
4797
4797
|
const allAtomIds = [atomId, ...options.parallel];
|
|
4798
4798
|
await parallelExecute(allAtomIds, { skipGates: options.skipGates === true });
|
|
4799
4799
|
return;
|
|
@@ -4894,6 +4894,16 @@ Repository: ${repoUrl}`));
|
|
|
4894
4894
|
console.log(chalk2.dim(`Run "archon plan" to create a plan first.`));
|
|
4895
4895
|
process.exit(1);
|
|
4896
4896
|
}
|
|
4897
|
+
const atomContext = atom.context;
|
|
4898
|
+
const designApproved = atomContext?.["designApproved"] === true;
|
|
4899
|
+
if (!designApproved) {
|
|
4900
|
+
console.log(chalk2.yellow("\n[!] This atom does not record explicit design approval metadata."));
|
|
4901
|
+
const proceed = await prompt.ask("Proceed with execution anyway? (y/N): ");
|
|
4902
|
+
if (proceed.trim().toLowerCase() !== "y") {
|
|
4903
|
+
console.log(chalk2.dim("Execution cancelled. Re-run planning and approve design first."));
|
|
4904
|
+
return;
|
|
4905
|
+
}
|
|
4906
|
+
}
|
|
4897
4907
|
const archPath = join4(cwd, "ARCHITECTURE.md");
|
|
4898
4908
|
if (!existsSync9(archPath)) {
|
|
4899
4909
|
console.error(chalk2.red("ARCHITECTURE.md not found."));
|
|
@@ -858,6 +858,17 @@ async function plan(description, options) {
|
|
|
858
858
|
deliverableTarget: deliverableTarget ?? void 0
|
|
859
859
|
});
|
|
860
860
|
const isContentOnlyTask = classification.kind === "content";
|
|
861
|
+
const designApproved = await promptForDesignApproval(prompt, {
|
|
862
|
+
description,
|
|
863
|
+
requirements,
|
|
864
|
+
references,
|
|
865
|
+
deliverableTarget: deliverableTarget ?? void 0,
|
|
866
|
+
classification
|
|
867
|
+
});
|
|
868
|
+
if (!designApproved) {
|
|
869
|
+
console.log(chalk.yellow("\nDesign not approved. Planning cancelled."));
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
861
872
|
console.log(chalk.dim("Creating atom from description..."));
|
|
862
873
|
const atomInput = parseAtomDescription(description, options, requirements);
|
|
863
874
|
const atom = createAtom(atomInput, {
|
|
@@ -865,7 +876,9 @@ async function plan(description, options) {
|
|
|
865
876
|
fileSummaries,
|
|
866
877
|
missingFiles,
|
|
867
878
|
requirements,
|
|
868
|
-
deliverableTarget
|
|
879
|
+
deliverableTarget,
|
|
880
|
+
designApproved,
|
|
881
|
+
designApprovalTimestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
869
882
|
});
|
|
870
883
|
const validation = validateAtom(atom);
|
|
871
884
|
if (!validation.valid) {
|
|
@@ -1008,8 +1021,10 @@ Next steps:`));
|
|
|
1008
1021
|
}
|
|
1009
1022
|
}
|
|
1010
1023
|
if (planResult.finalPlan) {
|
|
1024
|
+
const enrichedPlan = enforcePlanStructure(planResult.finalPlan, requirements);
|
|
1025
|
+
planResult.finalPlan = enrichedPlan;
|
|
1011
1026
|
console.log(chalk.green("\n\u2705 Plan approved!"));
|
|
1012
|
-
displayPlan(
|
|
1027
|
+
displayPlan(enrichedPlan);
|
|
1013
1028
|
} else {
|
|
1014
1029
|
console.log(chalk.yellow("\nNo approved plan available."));
|
|
1015
1030
|
}
|
|
@@ -1115,6 +1130,69 @@ function extractNumberedSteps(description) {
|
|
|
1115
1130
|
}
|
|
1116
1131
|
return steps;
|
|
1117
1132
|
}
|
|
1133
|
+
async function promptForDesignApproval(prompt, input) {
|
|
1134
|
+
console.log(chalk.blue("\nDesign Approval Gate"));
|
|
1135
|
+
console.log(chalk.dim("\u2500".repeat(40)));
|
|
1136
|
+
console.log(chalk.dim(`Task type: ${input.classification.kind} (${input.classification.confidence} confidence)`));
|
|
1137
|
+
console.log(chalk.dim(`Title: ${deriveTitle(input.description)}`));
|
|
1138
|
+
if (input.requirements.length > 0) {
|
|
1139
|
+
console.log(chalk.dim("\nRequirements summary:"));
|
|
1140
|
+
for (const req of input.requirements.slice(0, 6)) {
|
|
1141
|
+
console.log(chalk.dim(` - ${req}`));
|
|
1142
|
+
}
|
|
1143
|
+
if (input.requirements.length > 6) {
|
|
1144
|
+
console.log(chalk.dim(` - ... and ${input.requirements.length - 6} more`));
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
if (input.references.length > 0) {
|
|
1148
|
+
console.log(chalk.dim("\nReferenced inputs:"));
|
|
1149
|
+
for (const ref of input.references.slice(0, 8)) {
|
|
1150
|
+
console.log(chalk.dim(` - ${ref}`));
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
if (input.deliverableTarget) {
|
|
1154
|
+
console.log(chalk.dim(`
|
|
1155
|
+
Deliverable target: ${input.deliverableTarget}`));
|
|
1156
|
+
}
|
|
1157
|
+
console.log(chalk.dim("\nI will generate a step-by-step implementation plan from this design."));
|
|
1158
|
+
const approval = await prompt.ask("Approve design and proceed to planning? (Y/n): ");
|
|
1159
|
+
return approval.trim().toLowerCase() !== "n";
|
|
1160
|
+
}
|
|
1161
|
+
function enforcePlanStructure(plan2, requirements) {
|
|
1162
|
+
const normalizedSteps = plan2.steps.map((step, index) => {
|
|
1163
|
+
const trimmed = step.trim();
|
|
1164
|
+
if (/^step\s+\d+/i.test(trimmed)) {
|
|
1165
|
+
return trimmed;
|
|
1166
|
+
}
|
|
1167
|
+
return `Step ${index + 1}: ${trimmed}`;
|
|
1168
|
+
});
|
|
1169
|
+
const hasVerificationStep = normalizedSteps.some(
|
|
1170
|
+
(step) => /(verify|test|lint|build|validate|check)/i.test(step)
|
|
1171
|
+
);
|
|
1172
|
+
const hasAcceptanceStep = normalizedSteps.some(
|
|
1173
|
+
(step) => /(acceptance criteria|acceptance check|confirm criteria)/i.test(step)
|
|
1174
|
+
);
|
|
1175
|
+
if (!hasVerificationStep) {
|
|
1176
|
+
normalizedSteps.push("Step " + (normalizedSteps.length + 1) + ": Run verification commands (build/test/lint as applicable).");
|
|
1177
|
+
}
|
|
1178
|
+
if (!hasAcceptanceStep) {
|
|
1179
|
+
normalizedSteps.push(
|
|
1180
|
+
"Step " + (normalizedSteps.length + 1) + ": Confirm all acceptance criteria are satisfied before execution completion."
|
|
1181
|
+
);
|
|
1182
|
+
}
|
|
1183
|
+
const normalizedRisks = [...plan2.risks];
|
|
1184
|
+
if (!normalizedRisks.some((risk) => /scope/i.test(risk))) {
|
|
1185
|
+
normalizedRisks.push("Scope drift risk: avoid adding unrequested behavior.");
|
|
1186
|
+
}
|
|
1187
|
+
if (requirements.length > 0 && !normalizedRisks.some((risk) => /acceptance/i.test(risk))) {
|
|
1188
|
+
normalizedRisks.push("Acceptance mismatch risk: validate changes directly against requested criteria.");
|
|
1189
|
+
}
|
|
1190
|
+
return {
|
|
1191
|
+
...plan2,
|
|
1192
|
+
steps: normalizedSteps,
|
|
1193
|
+
risks: normalizedRisks
|
|
1194
|
+
};
|
|
1195
|
+
}
|
|
1118
1196
|
function classifyTaskIntent(input) {
|
|
1119
1197
|
const text = `${input.description}
|
|
1120
1198
|
${input.requirements.join("\n")}`.toLowerCase();
|
|
@@ -452,6 +452,24 @@ async function bugReport(title, options) {
|
|
|
452
452
|
}
|
|
453
453
|
const expectedBehavior = await prompt.ask(chalk.cyan("Expected behavior: "));
|
|
454
454
|
const actualBehavior = await prompt.ask(chalk.cyan("Actual behavior: "));
|
|
455
|
+
const observedEvidence = await prompt.ask(
|
|
456
|
+
chalk.cyan("Observed evidence (logs/errors/metrics): ")
|
|
457
|
+
);
|
|
458
|
+
const reproducedInput = await prompt.ask(
|
|
459
|
+
chalk.cyan("Can you reproduce this consistently? (y/N): ")
|
|
460
|
+
);
|
|
461
|
+
const reproducedConsistently = reproducedInput.trim().toLowerCase() === "y";
|
|
462
|
+
const rootCauseHypothesis = await prompt.ask(
|
|
463
|
+
chalk.cyan("Root cause hypothesis (where/why failing): ")
|
|
464
|
+
);
|
|
465
|
+
if (!reproducedConsistently) {
|
|
466
|
+
console.log(chalk.yellow("\n[!] Root-cause-first workflow recommends reproducible steps before fixing."));
|
|
467
|
+
const continueChoice = await prompt.ask("Continue creating bug anyway? (y/N): ");
|
|
468
|
+
if (continueChoice.trim().toLowerCase() !== "y") {
|
|
469
|
+
console.log(chalk.dim("Bug report cancelled."));
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
455
473
|
let severity = null;
|
|
456
474
|
while (!severity) {
|
|
457
475
|
const severityInput = await prompt.ask(chalk.cyan("Severity (LOW/MEDIUM/HIGH/CRITICAL): "));
|
|
@@ -514,6 +532,7 @@ async function bugReport(title, options) {
|
|
|
514
532
|
console.log(chalk.blue("\n\u{1F4E6} Creating fix atom..."));
|
|
515
533
|
const acceptanceCriteria = [
|
|
516
534
|
`Bug ${bug.id} is fixed`,
|
|
535
|
+
"Root cause evidence and hypothesis are documented before implementation",
|
|
517
536
|
"Regression test added to prevent recurrence",
|
|
518
537
|
"Typecheck passes",
|
|
519
538
|
"All tests pass"
|
|
@@ -523,7 +542,17 @@ async function bugReport(title, options) {
|
|
|
523
542
|
}
|
|
524
543
|
const atom = createAtom({
|
|
525
544
|
title: `Fix ${bug.id}: ${bug.title}`,
|
|
526
|
-
description: buildAtomDescription(
|
|
545
|
+
description: buildAtomDescription(
|
|
546
|
+
bug.id,
|
|
547
|
+
bug.description,
|
|
548
|
+
bug.actualBehavior,
|
|
549
|
+
rcaResult,
|
|
550
|
+
{
|
|
551
|
+
observedEvidence,
|
|
552
|
+
rootCauseHypothesis,
|
|
553
|
+
reproducedConsistently
|
|
554
|
+
}
|
|
555
|
+
),
|
|
527
556
|
goals: [`Fix bug ${bug.id}`],
|
|
528
557
|
acceptanceCriteria,
|
|
529
558
|
ownershipPaths: rcaResult?.affectedFiles ?? triageResult.relatedFiles,
|
|
@@ -561,7 +590,7 @@ function formatSeverity(severity) {
|
|
|
561
590
|
return chalk.green(severity);
|
|
562
591
|
}
|
|
563
592
|
}
|
|
564
|
-
function buildAtomDescription(bugId, description, actualBehavior, rcaResult) {
|
|
593
|
+
function buildAtomDescription(bugId, description, actualBehavior, rcaResult, investigation) {
|
|
565
594
|
const parts = [
|
|
566
595
|
`Fix for ${bugId}`,
|
|
567
596
|
"",
|
|
@@ -575,6 +604,11 @@ function buildAtomDescription(bugId, description, actualBehavior, rcaResult) {
|
|
|
575
604
|
parts.push("");
|
|
576
605
|
parts.push(`**Suggested Fix:** ${rcaResult.suggestedFix}`);
|
|
577
606
|
}
|
|
607
|
+
parts.push("");
|
|
608
|
+
parts.push("**Root-Cause Investigation (Required Before Code Changes):**");
|
|
609
|
+
parts.push(`- Reproduced consistently: ${investigation.reproducedConsistently ? "yes" : "no"}`);
|
|
610
|
+
parts.push(`- Observed evidence: ${investigation.observedEvidence || "not provided"}`);
|
|
611
|
+
parts.push(`- Root cause hypothesis: ${investigation.rootCauseHypothesis || "not provided"}`);
|
|
578
612
|
return parts.join("\n");
|
|
579
613
|
}
|
|
580
614
|
async function generateRCA(bugId, title, description, actualBehavior, affectedComponents) {
|
|
@@ -523,6 +523,9 @@ var ReviewerAgent = class {
|
|
|
523
523
|
* Review a task by analyzing its associated files
|
|
524
524
|
*/
|
|
525
525
|
async reviewTask(task, context) {
|
|
526
|
+
return this.reviewTaskByStage(task, context, "quality");
|
|
527
|
+
}
|
|
528
|
+
async reviewTaskByStage(task, context, stage) {
|
|
526
529
|
const fileContents = await this.loadFilesForReview(task, context);
|
|
527
530
|
if (fileContents.length === 0) {
|
|
528
531
|
return {
|
|
@@ -538,7 +541,7 @@ var ReviewerAgent = class {
|
|
|
538
541
|
usage: { inputTokens: 0, outputTokens: 0, totalTokens: 0, baseCost: 0, markedUpCost: 0 }
|
|
539
542
|
};
|
|
540
543
|
}
|
|
541
|
-
const userMessage = this.buildPrompt(task, fileContents, context);
|
|
544
|
+
const userMessage = this.buildPrompt(task, fileContents, context, stage);
|
|
542
545
|
const response = await this.client.chat(SYSTEM_PROMPT, userMessage, {
|
|
543
546
|
temperature: 0.3,
|
|
544
547
|
maxTokens: 4096
|
|
@@ -569,7 +572,7 @@ var ReviewerAgent = class {
|
|
|
569
572
|
/**
|
|
570
573
|
* Build the review prompt
|
|
571
574
|
*/
|
|
572
|
-
buildPrompt(task, files, context) {
|
|
575
|
+
buildPrompt(task, files, context, stage) {
|
|
573
576
|
const parts = [];
|
|
574
577
|
parts.push("# Review Task");
|
|
575
578
|
parts.push(`**Feature:** ${task.featureName}`);
|
|
@@ -625,8 +628,16 @@ var ReviewerAgent = class {
|
|
|
625
628
|
}
|
|
626
629
|
parts.push("# Instructions");
|
|
627
630
|
parts.push("");
|
|
628
|
-
|
|
629
|
-
|
|
631
|
+
if (stage === "spec") {
|
|
632
|
+
parts.push("Stage 1: SPEC COMPLIANCE REVIEW.");
|
|
633
|
+
parts.push("Focus strictly on whether implementation matches requested behavior and acceptance criteria.");
|
|
634
|
+
parts.push("Flag missing requirements, incorrect behavior, and unrequested scope additions.");
|
|
635
|
+
parts.push("Do not focus on style/performance unless it breaks requirements.");
|
|
636
|
+
} else {
|
|
637
|
+
parts.push("Stage 2: CODE QUALITY REVIEW (only after spec compliance).");
|
|
638
|
+
parts.push("Focus on correctness, security, maintainability, architecture boundaries, and test quality.");
|
|
639
|
+
parts.push("Do not re-open already-passed spec scope unless there is clear mismatch.");
|
|
640
|
+
}
|
|
630
641
|
parts.push("Output your review as valid JSON.");
|
|
631
642
|
return parts.join("\n");
|
|
632
643
|
}
|
|
@@ -801,14 +812,39 @@ var ReviewService = class {
|
|
|
801
812
|
architectureContent: this.architectureContent ?? void 0,
|
|
802
813
|
maxFilesToRead: this.config.maxFilesPerTask ?? 10
|
|
803
814
|
};
|
|
804
|
-
const
|
|
815
|
+
const specResult = await this.agent.reviewTaskByStage(task, context, "spec");
|
|
816
|
+
if (!specResult.passesReview) {
|
|
817
|
+
const specUpdate = {
|
|
818
|
+
status: "needs_fix",
|
|
819
|
+
passesReview: false,
|
|
820
|
+
issuesFound: specResult.issues,
|
|
821
|
+
fixPriority: specResult.fixPriority,
|
|
822
|
+
fixPlan: specResult.fixPlan ?? "Resolve spec compliance issues before quality review.",
|
|
823
|
+
architectureImpact: specResult.architectureImpact ?? void 0,
|
|
824
|
+
reviewedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
825
|
+
reviewedBy: "ai-reviewer-spec"
|
|
826
|
+
};
|
|
827
|
+
this.db.updateTask(task.id, specUpdate);
|
|
828
|
+
if (this.config.onTaskComplete) {
|
|
829
|
+
const updatedTask = this.db.getTask(task.id);
|
|
830
|
+
if (updatedTask) {
|
|
831
|
+
this.config.onTaskComplete(updatedTask, specResult);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
return specResult;
|
|
835
|
+
}
|
|
836
|
+
const qualityResult = await this.agent.reviewTaskByStage(task, context, "quality");
|
|
837
|
+
const mergedResult = {
|
|
838
|
+
...qualityResult,
|
|
839
|
+
usage: mergeUsage(specResult.usage, qualityResult.usage)
|
|
840
|
+
};
|
|
805
841
|
const update = {
|
|
806
|
-
status:
|
|
807
|
-
passesReview:
|
|
808
|
-
issuesFound:
|
|
809
|
-
fixPriority:
|
|
810
|
-
fixPlan:
|
|
811
|
-
architectureImpact:
|
|
842
|
+
status: mergedResult.passesReview ? "completed" : "needs_fix",
|
|
843
|
+
passesReview: mergedResult.passesReview,
|
|
844
|
+
issuesFound: mergedResult.issues,
|
|
845
|
+
fixPriority: mergedResult.fixPriority,
|
|
846
|
+
fixPlan: mergedResult.fixPlan ?? void 0,
|
|
847
|
+
architectureImpact: mergedResult.architectureImpact ?? void 0,
|
|
812
848
|
reviewedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
813
849
|
reviewedBy: "ai-reviewer"
|
|
814
850
|
};
|
|
@@ -816,12 +852,21 @@ var ReviewService = class {
|
|
|
816
852
|
if (this.config.onTaskComplete) {
|
|
817
853
|
const updatedTask = this.db.getTask(task.id);
|
|
818
854
|
if (updatedTask) {
|
|
819
|
-
this.config.onTaskComplete(updatedTask,
|
|
855
|
+
this.config.onTaskComplete(updatedTask, mergedResult);
|
|
820
856
|
}
|
|
821
857
|
}
|
|
822
|
-
return
|
|
858
|
+
return mergedResult;
|
|
823
859
|
}
|
|
824
860
|
};
|
|
861
|
+
function mergeUsage(a, b) {
|
|
862
|
+
return {
|
|
863
|
+
inputTokens: a.inputTokens + b.inputTokens,
|
|
864
|
+
outputTokens: a.outputTokens + b.outputTokens,
|
|
865
|
+
totalTokens: a.totalTokens + b.totalTokens,
|
|
866
|
+
baseCost: a.baseCost + b.baseCost,
|
|
867
|
+
markedUpCost: a.markedUpCost + b.markedUpCost
|
|
868
|
+
};
|
|
869
|
+
}
|
|
825
870
|
|
|
826
871
|
export {
|
|
827
872
|
ReviewDatabase,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
execute
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HQBF3VTN.js";
|
|
4
4
|
import "./chunk-EBHHIUCB.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-IKMCIWK3.js";
|
|
6
6
|
import "./chunk-PCTP3LKJ.js";
|
|
7
7
|
import "./chunk-PJRQI5UN.js";
|
|
8
8
|
import "./chunk-EIEU3IIY.js";
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-O3B6BE5D.js";
|
|
8
8
|
import {
|
|
9
9
|
bugReport
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XKYRHJA5.js";
|
|
11
11
|
import {
|
|
12
12
|
reviewAnalyze,
|
|
13
13
|
reviewExport,
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
reviewShow,
|
|
20
20
|
reviewStatus,
|
|
21
21
|
reviewUpdate
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-6XLWTTGJ.js";
|
|
23
|
+
import "./chunk-YGDLWQBK.js";
|
|
24
24
|
import {
|
|
25
25
|
resetPreferences,
|
|
26
26
|
setExecutionPreference,
|
|
@@ -47,13 +47,13 @@ import {
|
|
|
47
47
|
parallelRunWaves,
|
|
48
48
|
parallelSchedule,
|
|
49
49
|
parallelStatus
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-3UOMLERV.js";
|
|
51
51
|
import {
|
|
52
52
|
DependencyParser,
|
|
53
53
|
EnvironmentConfigLoader,
|
|
54
54
|
EnvironmentValidator,
|
|
55
55
|
execute
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-HQBF3VTN.js";
|
|
57
57
|
import {
|
|
58
58
|
cloudCancel,
|
|
59
59
|
cloudLogs,
|
|
@@ -61,12 +61,12 @@ import {
|
|
|
61
61
|
} from "./chunk-EBHHIUCB.js";
|
|
62
62
|
import {
|
|
63
63
|
list
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-C4HVI2NJ.js";
|
|
65
65
|
import {
|
|
66
66
|
listLocalAtoms,
|
|
67
67
|
loadAtom,
|
|
68
68
|
plan
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-IKMCIWK3.js";
|
|
70
70
|
import "./chunk-PCTP3LKJ.js";
|
|
71
71
|
import "./chunk-PJRQI5UN.js";
|
|
72
72
|
import {
|
|
@@ -3185,7 +3185,7 @@ async function handleNewProject(cwd, _state) {
|
|
|
3185
3185
|
}
|
|
3186
3186
|
if (intent.mode === "ad_hoc" && intent.confidence >= 0.7) {
|
|
3187
3187
|
console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
|
|
3188
|
-
const { plan: plan2 } = await import("./plan-
|
|
3188
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3189
3189
|
await plan2(initialResponse, {});
|
|
3190
3190
|
return;
|
|
3191
3191
|
}
|
|
@@ -3209,7 +3209,7 @@ async function handleNewProject(cwd, _state) {
|
|
|
3209
3209
|
break;
|
|
3210
3210
|
case "2":
|
|
3211
3211
|
console.log(chalk6.dim("\n> Creating a task for this...\n"));
|
|
3212
|
-
const { plan: plan2 } = await import("./plan-
|
|
3212
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3213
3213
|
await plan2(initialResponse, {});
|
|
3214
3214
|
break;
|
|
3215
3215
|
case "3":
|
|
@@ -3239,7 +3239,7 @@ async function showNewProjectMenu(cwd) {
|
|
|
3239
3239
|
case "3": {
|
|
3240
3240
|
const description = await promptWithCommands("Describe what you want to do", { allowMultiline: true });
|
|
3241
3241
|
if (description.trim()) {
|
|
3242
|
-
const { plan: plan2 } = await import("./plan-
|
|
3242
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3243
3243
|
await plan2(description, {});
|
|
3244
3244
|
}
|
|
3245
3245
|
break;
|
|
@@ -3305,7 +3305,7 @@ async function runExploreFlow(cwd) {
|
|
|
3305
3305
|
case "1": {
|
|
3306
3306
|
const description = await promptWithCommands("Describe what you want to do", { allowMultiline: true });
|
|
3307
3307
|
if (description.trim()) {
|
|
3308
|
-
const { plan: plan2 } = await import("./plan-
|
|
3308
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3309
3309
|
await plan2(description, {});
|
|
3310
3310
|
}
|
|
3311
3311
|
break;
|
|
@@ -3567,7 +3567,7 @@ ${state.forbiddenPatterns?.length ? `- **Forbidden patterns:** ${state.forbidden
|
|
|
3567
3567
|
if (continueChoice) {
|
|
3568
3568
|
const description = await promptWithCommands("Describe what you want to build first", { allowMultiline: true });
|
|
3569
3569
|
if (description.trim()) {
|
|
3570
|
-
const { plan: plan2 } = await import("./plan-
|
|
3570
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3571
3571
|
await plan2(description, {});
|
|
3572
3572
|
}
|
|
3573
3573
|
}
|
|
@@ -3621,7 +3621,7 @@ async function handleAdaptExisting(cwd, state) {
|
|
|
3621
3621
|
}
|
|
3622
3622
|
if (intent.mode === "ad_hoc" && intent.confidence >= 0.7) {
|
|
3623
3623
|
console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
|
|
3624
|
-
const { plan: plan2 } = await import("./plan-
|
|
3624
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3625
3625
|
await plan2(response, {});
|
|
3626
3626
|
return;
|
|
3627
3627
|
}
|
|
@@ -3652,7 +3652,7 @@ async function showAdaptExistingMenu(cwd, state) {
|
|
|
3652
3652
|
case "2": {
|
|
3653
3653
|
const description = await promptWithCommands("Describe what you want to do", { allowMultiline: true });
|
|
3654
3654
|
if (description.trim()) {
|
|
3655
|
-
const { plan: plan2 } = await import("./plan-
|
|
3655
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3656
3656
|
await plan2(description, {});
|
|
3657
3657
|
}
|
|
3658
3658
|
break;
|
|
@@ -3704,7 +3704,7 @@ async function analyzeAndAdapt(cwd) {
|
|
|
3704
3704
|
async function codeReviewFirst(cwd) {
|
|
3705
3705
|
console.log(chalk6.blue("\n-- Code Review Mode --\n"));
|
|
3706
3706
|
console.log(chalk6.dim("I'll analyze your code for issues without making any changes.\n"));
|
|
3707
|
-
const { reviewInit: reviewInit2, reviewAnalyze: reviewAnalyze2, reviewRun: reviewRun2 } = await import("./review-
|
|
3707
|
+
const { reviewInit: reviewInit2, reviewAnalyze: reviewAnalyze2, reviewRun: reviewRun2 } = await import("./review-BXESOS5R.js");
|
|
3708
3708
|
const reviewDbPath = join6(cwd, "docs", "code-review", "review-tasks.db");
|
|
3709
3709
|
if (!existsSync6(reviewDbPath)) {
|
|
3710
3710
|
await reviewInit2();
|
|
@@ -3818,7 +3818,7 @@ async function showMainMenu() {
|
|
|
3818
3818
|
return;
|
|
3819
3819
|
}
|
|
3820
3820
|
console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
|
|
3821
|
-
const { plan: plan2 } = await import("./plan-
|
|
3821
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3822
3822
|
await plan2(freeform, {});
|
|
3823
3823
|
} else {
|
|
3824
3824
|
console.log(chalk6.yellow("Invalid choice. Please try again."));
|
|
@@ -3827,7 +3827,7 @@ async function showMainMenu() {
|
|
|
3827
3827
|
}
|
|
3828
3828
|
async function showReviewProgress(cwd) {
|
|
3829
3829
|
try {
|
|
3830
|
-
const { ReviewDatabase } = await import("./code-review-
|
|
3830
|
+
const { ReviewDatabase } = await import("./code-review-GJVBZPZA.js");
|
|
3831
3831
|
const db = new ReviewDatabase(cwd);
|
|
3832
3832
|
db.open();
|
|
3833
3833
|
const stats = db.getStats();
|
|
@@ -3844,18 +3844,18 @@ async function showReviewProgress(cwd) {
|
|
|
3844
3844
|
}
|
|
3845
3845
|
}
|
|
3846
3846
|
async function planTask() {
|
|
3847
|
-
const { plan: plan2 } = await import("./plan-
|
|
3847
|
+
const { plan: plan2 } = await import("./plan-7M27X3OD.js");
|
|
3848
3848
|
const description = await promptWithCommands("Describe what you want to build", { allowMultiline: true });
|
|
3849
3849
|
if (description.trim()) {
|
|
3850
3850
|
await plan2(description, {});
|
|
3851
3851
|
}
|
|
3852
3852
|
}
|
|
3853
3853
|
async function listAtoms() {
|
|
3854
|
-
const { list: list2 } = await import("./list-
|
|
3854
|
+
const { list: list2 } = await import("./list-Q4HLHQJI.js");
|
|
3855
3855
|
await list2({});
|
|
3856
3856
|
}
|
|
3857
3857
|
async function executeNext() {
|
|
3858
|
-
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-
|
|
3858
|
+
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-7M27X3OD.js");
|
|
3859
3859
|
const { analyzeProject, getComplexityDescription, getModeDescription } = await import("./orchestration-HIF3KP25.js");
|
|
3860
3860
|
const { loadExecutionPreferences } = await import("./preferences-SFXRVXT3.js");
|
|
3861
3861
|
const cwd = process.cwd();
|
|
@@ -3926,11 +3926,11 @@ async function executeNext() {
|
|
|
3926
3926
|
}
|
|
3927
3927
|
}
|
|
3928
3928
|
if (selectedMode === "parallel-cloud") {
|
|
3929
|
-
const { parallelExecuteCloud: parallelExecuteCloud2 } = await import("./parallel-
|
|
3929
|
+
const { parallelExecuteCloud: parallelExecuteCloud2 } = await import("./parallel-QLKYSZZ3.js");
|
|
3930
3930
|
await parallelExecuteCloud2(runIds);
|
|
3931
3931
|
return;
|
|
3932
3932
|
}
|
|
3933
|
-
const { parallelExecute } = await import("./parallel-
|
|
3933
|
+
const { parallelExecute } = await import("./parallel-QLKYSZZ3.js");
|
|
3934
3934
|
await parallelExecute(runIds);
|
|
3935
3935
|
return;
|
|
3936
3936
|
}
|
|
@@ -3938,14 +3938,14 @@ async function executeNext() {
|
|
|
3938
3938
|
const atomId = await prompt("Enter atom ID to execute (or press Enter for first pending)");
|
|
3939
3939
|
const targetId = atomId.trim() || pendingAtoms[0]?.id;
|
|
3940
3940
|
if (targetId) {
|
|
3941
|
-
const { execute: execute2 } = await import("./execute-
|
|
3941
|
+
const { execute: execute2 } = await import("./execute-JAHXFYXL.js");
|
|
3942
3942
|
await execute2(targetId, {});
|
|
3943
3943
|
} else {
|
|
3944
3944
|
console.log(chalk6.yellow("No atom to execute."));
|
|
3945
3945
|
}
|
|
3946
3946
|
}
|
|
3947
3947
|
async function reportBug() {
|
|
3948
|
-
const { bugReport: bugReport2 } = await import("./bug-
|
|
3948
|
+
const { bugReport: bugReport2 } = await import("./bug-NZHQ6QZF.js");
|
|
3949
3949
|
const title = await prompt("Bug title");
|
|
3950
3950
|
if (title.trim()) {
|
|
3951
3951
|
await bugReport2(title, {});
|
|
@@ -3965,7 +3965,7 @@ async function reviewCode() {
|
|
|
3965
3965
|
const reviewDbPath = join6(cwd, "docs", "code-review", "review-tasks.db");
|
|
3966
3966
|
if (!existsSync6(reviewDbPath)) {
|
|
3967
3967
|
console.log(chalk6.dim("Code review not initialized. Starting setup...\n"));
|
|
3968
|
-
const { reviewInit: reviewInit2 } = await import("./review-
|
|
3968
|
+
const { reviewInit: reviewInit2 } = await import("./review-BXESOS5R.js");
|
|
3969
3969
|
await reviewInit2();
|
|
3970
3970
|
console.log();
|
|
3971
3971
|
}
|
|
@@ -3980,27 +3980,27 @@ async function reviewCode() {
|
|
|
3980
3980
|
const choice = await prompt("Enter choice");
|
|
3981
3981
|
switch (choice.toLowerCase()) {
|
|
3982
3982
|
case "1": {
|
|
3983
|
-
const { reviewAnalyze: reviewAnalyze2 } = await import("./review-
|
|
3983
|
+
const { reviewAnalyze: reviewAnalyze2 } = await import("./review-BXESOS5R.js");
|
|
3984
3984
|
await reviewAnalyze2();
|
|
3985
3985
|
break;
|
|
3986
3986
|
}
|
|
3987
3987
|
case "2": {
|
|
3988
|
-
const { reviewStatus: reviewStatus2 } = await import("./review-
|
|
3988
|
+
const { reviewStatus: reviewStatus2 } = await import("./review-BXESOS5R.js");
|
|
3989
3989
|
await reviewStatus2();
|
|
3990
3990
|
break;
|
|
3991
3991
|
}
|
|
3992
3992
|
case "3": {
|
|
3993
|
-
const { reviewNext: reviewNext2 } = await import("./review-
|
|
3993
|
+
const { reviewNext: reviewNext2 } = await import("./review-BXESOS5R.js");
|
|
3994
3994
|
await reviewNext2();
|
|
3995
3995
|
break;
|
|
3996
3996
|
}
|
|
3997
3997
|
case "4": {
|
|
3998
|
-
const { reviewList: reviewList2 } = await import("./review-
|
|
3998
|
+
const { reviewList: reviewList2 } = await import("./review-BXESOS5R.js");
|
|
3999
3999
|
await reviewList2({});
|
|
4000
4000
|
break;
|
|
4001
4001
|
}
|
|
4002
4002
|
case "5": {
|
|
4003
|
-
const { reviewRun: reviewRun2 } = await import("./review-
|
|
4003
|
+
const { reviewRun: reviewRun2 } = await import("./review-BXESOS5R.js");
|
|
4004
4004
|
await reviewRun2({ all: true });
|
|
4005
4005
|
break;
|
|
4006
4006
|
}
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
parallelRunWaves,
|
|
7
7
|
parallelSchedule,
|
|
8
8
|
parallelStatus
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3UOMLERV.js";
|
|
10
10
|
import "./chunk-EBHHIUCB.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-IKMCIWK3.js";
|
|
12
12
|
import "./chunk-PCTP3LKJ.js";
|
|
13
13
|
import "./chunk-PJRQI5UN.js";
|
|
14
14
|
import "./chunk-EIEU3IIY.js";
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
reviewShow,
|
|
10
10
|
reviewStatus,
|
|
11
11
|
reviewUpdate
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-6XLWTTGJ.js";
|
|
13
|
+
import "./chunk-YGDLWQBK.js";
|
|
14
14
|
import "./chunk-EIEU3IIY.js";
|
|
15
15
|
import "./chunk-UFR2LX6G.js";
|
|
16
16
|
import "./chunk-4VNS5WPM.js";
|