archondev 2.19.7 → 2.19.9

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.
@@ -7,7 +7,7 @@ import {
7
7
  UsageRecorder,
8
8
  handleInsufficientCreditsRecovery,
9
9
  loadAtom
10
- } from "./chunk-OTODLPY4.js";
10
+ } from "./chunk-JFUG25H7.js";
11
11
  import {
12
12
  transitionAtom
13
13
  } from "./chunk-PCTP3LKJ.js";
@@ -4797,7 +4797,7 @@ function createPrompt() {
4797
4797
  }
4798
4798
  async function execute(atomId, options) {
4799
4799
  if (options.parallel && options.parallel.length > 0) {
4800
- const { parallelExecute } = await import("./parallel-KRBYFJ4O.js");
4800
+ const { parallelExecute } = await import("./parallel-ZBFFEUBW.js");
4801
4801
  const allAtomIds = [atomId, ...options.parallel];
4802
4802
  await parallelExecute(allAtomIds, { skipGates: options.skipGates === true });
4803
4803
  return;
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  listLocalAtoms,
8
8
  loadAtom
9
- } from "./chunk-OTODLPY4.js";
9
+ } from "./chunk-JFUG25H7.js";
10
10
  import {
11
11
  loadConfig
12
12
  } from "./chunk-SVU7MLG6.js";
@@ -899,12 +899,23 @@ async function plan(description, options) {
899
899
  requirements.length = 0;
900
900
  }
901
901
  }
902
- const classification = classifyTaskIntent({
902
+ let classification = classifyTaskIntent({
903
903
  description,
904
904
  requirements,
905
905
  references,
906
906
  deliverableTarget: deliverableTarget ?? void 0
907
907
  });
908
+ if (classification.kind === "mixed" && classification.confidence === "low") {
909
+ const clarifiedKind = await promptForTaskKindClarification(prompt2, description);
910
+ if (clarifiedKind) {
911
+ classification = {
912
+ ...classification,
913
+ kind: clarifiedKind,
914
+ confidence: "high",
915
+ signals: [...classification.signals, `user:${clarifiedKind}`]
916
+ };
917
+ }
918
+ }
908
919
  const isContentOnlyTask = classification.kind === "content";
909
920
  const designApproved = await promptForDesignApproval(prompt2, {
910
921
  description,
@@ -1275,7 +1286,8 @@ ${input.requirements.join("\n")}`.toLowerCase();
1275
1286
  /story|storytelling|storyboard|capsule|lesson|outline|narrative|plot|arc|character|conflict/,
1276
1287
  /illustration|visual|image|diagram|slides?|deck/,
1277
1288
  /write|draft|summarize|summarise|rewrite|edit|revise|polish/,
1278
- /teach|teaching|curriculum|learning objectives?|lesson plan/
1289
+ /teach|teaching|curriculum|learning objectives?|lesson plan/,
1290
+ /pdf|document|booklet|handout|report|formatted nicely|single file|compile .*lessons?|export/
1279
1291
  ];
1280
1292
  const codeCues = [
1281
1293
  /api|endpoint|server|backend|frontend|cli|database|schema|migration/,
@@ -1317,6 +1329,28 @@ ${input.requirements.join("\n")}`.toLowerCase();
1317
1329
  }
1318
1330
  return { kind, confidence, contentScore, codeScore, signals };
1319
1331
  }
1332
+ async function promptForTaskKindClarification(prompt2, description) {
1333
+ console.log(chalk2.yellow("\nThis request can be interpreted in multiple ways."));
1334
+ console.log(chalk2.dim("To keep planning on track, choose the primary outcome:"));
1335
+ console.log(chalk2.dim(" 1) Content deliverable (PDF/docs/slides/report)"));
1336
+ console.log(chalk2.dim(" 2) Code implementation (features/refactors/tests)"));
1337
+ console.log(chalk2.dim(" Enter to auto-pick based on your wording."));
1338
+ const answer = (await prompt2.ask("Primary outcome (1/2): ")).trim().toLowerCase();
1339
+ if (answer === "1" || answer.includes("content") || answer.includes("pdf") || answer.includes("doc")) {
1340
+ return "content";
1341
+ }
1342
+ if (answer === "2" || answer.includes("code") || answer.includes("implement") || answer.includes("feature")) {
1343
+ return "code";
1344
+ }
1345
+ const normalized = description.toLowerCase();
1346
+ if (/(pdf|document|report|slides?|lesson|curriculum|format)/.test(normalized)) {
1347
+ return "content";
1348
+ }
1349
+ if (/(api|endpoint|schema|migration|typescript|javascript|python|refactor|test|lint|build)/.test(normalized)) {
1350
+ return "code";
1351
+ }
1352
+ return null;
1353
+ }
1320
1354
  function shouldFallbackToContentPlan(input) {
1321
1355
  if (input.classification.kind === "content") return true;
1322
1356
  const text = input.description.toLowerCase();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listLocalAtoms
3
- } from "./chunk-OTODLPY4.js";
3
+ } from "./chunk-JFUG25H7.js";
4
4
 
5
5
  // src/cli/list.ts
6
6
  import chalk from "chalk";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  execute
3
- } from "./chunk-X5ZZCJBQ.js";
3
+ } from "./chunk-4E3LJAXF.js";
4
4
  import "./chunk-EBHHIUCB.js";
5
- import "./chunk-OTODLPY4.js";
5
+ import "./chunk-JFUG25H7.js";
6
6
  import "./chunk-PCTP3LKJ.js";
7
7
  import "./chunk-PJRQI5UN.js";
8
8
  import "./chunk-EIEU3IIY.js";
package/dist/index.js CHANGED
@@ -47,13 +47,13 @@ import {
47
47
  parallelRunWaves,
48
48
  parallelSchedule,
49
49
  parallelStatus
50
- } from "./chunk-KDWIKBM2.js";
50
+ } from "./chunk-FP4B73CC.js";
51
51
  import {
52
52
  DependencyParser,
53
53
  EnvironmentConfigLoader,
54
54
  EnvironmentValidator,
55
55
  execute
56
- } from "./chunk-X5ZZCJBQ.js";
56
+ } from "./chunk-4E3LJAXF.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-W6TYXCZA.js";
64
+ } from "./chunk-MBRWJ3SX.js";
65
65
  import {
66
66
  listLocalAtoms,
67
67
  loadAtom,
68
68
  plan
69
- } from "./chunk-OTODLPY4.js";
69
+ } from "./chunk-JFUG25H7.js";
70
70
  import "./chunk-PCTP3LKJ.js";
71
71
  import "./chunk-PJRQI5UN.js";
72
72
  import {
@@ -3192,7 +3192,7 @@ async function handleNewProject(cwd, _state) {
3192
3192
  }
3193
3193
  if (intent.mode === "ad_hoc" && intent.confidence >= 0.7) {
3194
3194
  console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
3195
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3195
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3196
3196
  await plan2(initialResponse, {});
3197
3197
  return;
3198
3198
  }
@@ -3217,7 +3217,7 @@ async function handleNewProject(cwd, _state) {
3217
3217
  }
3218
3218
  if (trimmed === "2") {
3219
3219
  console.log(chalk6.dim("\n> Creating a task for this...\n"));
3220
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3220
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3221
3221
  await plan2(initialResponse, {});
3222
3222
  return;
3223
3223
  }
@@ -3256,7 +3256,7 @@ async function showNewProjectMenu(cwd) {
3256
3256
  case "3": {
3257
3257
  const description = await promptWithCommands("Describe what you want to do", { allowMultiline: true });
3258
3258
  if (description.trim()) {
3259
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3259
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3260
3260
  await plan2(description, {});
3261
3261
  }
3262
3262
  break;
@@ -3315,10 +3315,12 @@ async function runExploreFlow(cwd, followUpInput) {
3315
3315
  }
3316
3316
  console.log();
3317
3317
  console.log(chalk6.green("\u2713 Analysis complete! I'm ready to work on this project.\n"));
3318
- const actionableFollowUp = extractActionableFollowUpFromExplore(followUpInput ?? "");
3319
- if (actionableFollowUp) {
3318
+ const originalFollowUp = (followUpInput ?? "").trim();
3319
+ const actionableFollowUp = extractActionableFollowUpFromExplore(originalFollowUp);
3320
+ if (actionableFollowUp || containsActionIntent(originalFollowUp)) {
3321
+ const request = actionableFollowUp ?? originalFollowUp;
3320
3322
  console.log(chalk6.dim("I finished the project scan. Continuing with your requested task...\n"));
3321
- await handlePostExploreAction(cwd, actionableFollowUp);
3323
+ await handlePostExploreAction(cwd, request);
3322
3324
  await showMainMenu();
3323
3325
  return;
3324
3326
  }
@@ -3336,7 +3338,7 @@ async function runExploreFlow(cwd, followUpInput) {
3336
3338
  case "1": {
3337
3339
  const description = await promptWithCommands("Describe what you want to do", { allowMultiline: true });
3338
3340
  if (description.trim()) {
3339
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3341
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3340
3342
  await plan2(description, {});
3341
3343
  }
3342
3344
  await showMainMenu();
@@ -3611,7 +3613,7 @@ ${state.forbiddenPatterns?.length ? `- **Forbidden patterns:** ${state.forbidden
3611
3613
  if (continueChoice) {
3612
3614
  const description = await promptWithCommands("Describe what you want to build first", { allowMultiline: true });
3613
3615
  if (description.trim()) {
3614
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3616
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3615
3617
  await plan2(description, {});
3616
3618
  }
3617
3619
  }
@@ -3665,7 +3667,7 @@ async function handleAdaptExisting(cwd, state) {
3665
3667
  }
3666
3668
  if (intent.mode === "ad_hoc" && intent.confidence >= 0.7) {
3667
3669
  console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
3668
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3670
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3669
3671
  await plan2(response, {});
3670
3672
  return;
3671
3673
  }
@@ -3703,7 +3705,7 @@ async function showAdaptExistingMenu(cwd, state) {
3703
3705
  case "2": {
3704
3706
  const description = await promptWithCommands("Describe what you want to do", { allowMultiline: true });
3705
3707
  if (description.trim()) {
3706
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3708
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3707
3709
  await plan2(description, {});
3708
3710
  }
3709
3711
  break;
@@ -3894,7 +3896,7 @@ async function handleFreeformJourneyInput(cwd, input) {
3894
3896
  return true;
3895
3897
  }
3896
3898
  console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
3897
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3899
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3898
3900
  await plan2(freeform, {});
3899
3901
  return true;
3900
3902
  }
@@ -3902,12 +3904,20 @@ function extractActionableFollowUpFromExplore(input) {
3902
3904
  const trimmed = input.trim();
3903
3905
  if (!trimmed) return null;
3904
3906
  const normalized = trimmed.toLowerCase();
3905
- const hasExploreSignal = /(analyz|review|explore|scan|inspect|understand|get familiar)/.test(normalized);
3906
- const hasActionSignal = /(how (can|could|do i)|create|build|generate|make|produce|plan|implement|write)/.test(normalized);
3907
+ const hasExploreSignal = /(analy[sz]e|review|explore|scan|inspect|understand|get familiar)/.test(normalized);
3908
+ const hasActionSignal = containsActionIntent(trimmed);
3907
3909
  if (!hasExploreSignal || !hasActionSignal) {
3908
3910
  return null;
3909
3911
  }
3910
- const transitions = [" and then ", " then ", " and "];
3912
+ const intentCue = /\b(i would like to|i want to|i need to|how (can|could|do i)|can you|could you|would you|help me)\b/i;
3913
+ const cueMatch = trimmed.match(intentCue);
3914
+ if (cueMatch?.index !== void 0 && cueMatch.index > 0) {
3915
+ const candidate = trimmed.slice(cueMatch.index).trim();
3916
+ if (candidate.length > 10) {
3917
+ return candidate;
3918
+ }
3919
+ }
3920
+ const transitions = [". ", " and then ", " then ", " and ", " - "];
3911
3921
  for (const token of transitions) {
3912
3922
  const idx = normalized.indexOf(token);
3913
3923
  if (idx !== -1) {
@@ -3919,6 +3929,11 @@ function extractActionableFollowUpFromExplore(input) {
3919
3929
  }
3920
3930
  return trimmed;
3921
3931
  }
3932
+ function containsActionIntent(input) {
3933
+ const normalized = input.trim().toLowerCase();
3934
+ if (!normalized) return false;
3935
+ return /(i would like to|i want to|i need to|how (can|could|do i)|can you|could you|would you|help me|create|build|generate|make|produce|plan|implement|write|fix|convert|compile)/.test(normalized);
3936
+ }
3922
3937
  async function handlePostExploreAction(cwd, request) {
3923
3938
  const intent = detectUserIntent(request);
3924
3939
  if (intent.mode === "app_builder" && intent.confidence >= 0.7) {
@@ -3931,7 +3946,7 @@ async function handlePostExploreAction(cwd, request) {
3931
3946
  } else {
3932
3947
  console.log(chalk6.dim("> Got it! Creating a task for this...\n"));
3933
3948
  }
3934
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3949
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3935
3950
  await plan2(request, {});
3936
3951
  }
3937
3952
  async function showReviewProgress(cwd) {
@@ -3953,18 +3968,18 @@ async function showReviewProgress(cwd) {
3953
3968
  }
3954
3969
  }
3955
3970
  async function planTask() {
3956
- const { plan: plan2 } = await import("./plan-7SCZH7EA.js");
3971
+ const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
3957
3972
  const description = await promptWithCommands("Describe what you want to build", { allowMultiline: true });
3958
3973
  if (description.trim()) {
3959
3974
  await plan2(description, {});
3960
3975
  }
3961
3976
  }
3962
3977
  async function listAtoms() {
3963
- const { list: list2 } = await import("./list-SKRHIZ5T.js");
3978
+ const { list: list2 } = await import("./list-3IMEKFQZ.js");
3964
3979
  await list2({});
3965
3980
  }
3966
3981
  async function executeNext() {
3967
- const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-7SCZH7EA.js");
3982
+ const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-AR6Y4QUD.js");
3968
3983
  const { analyzeProject, getComplexityDescription, getModeDescription } = await import("./orchestration-HIF3KP25.js");
3969
3984
  const { loadExecutionPreferences } = await import("./preferences-4V4C7MVD.js");
3970
3985
  const cwd = process.cwd();
@@ -4035,11 +4050,11 @@ async function executeNext() {
4035
4050
  }
4036
4051
  }
4037
4052
  if (selectedMode === "parallel-cloud") {
4038
- const { parallelExecuteCloud: parallelExecuteCloud2 } = await import("./parallel-KRBYFJ4O.js");
4053
+ const { parallelExecuteCloud: parallelExecuteCloud2 } = await import("./parallel-ZBFFEUBW.js");
4039
4054
  await parallelExecuteCloud2(runIds);
4040
4055
  return;
4041
4056
  }
4042
- const { parallelExecute } = await import("./parallel-KRBYFJ4O.js");
4057
+ const { parallelExecute } = await import("./parallel-ZBFFEUBW.js");
4043
4058
  await parallelExecute(runIds);
4044
4059
  return;
4045
4060
  }
@@ -4047,7 +4062,7 @@ async function executeNext() {
4047
4062
  const atomId = await prompt("Enter atom ID to execute (or press Enter for first pending)");
4048
4063
  const targetId = atomId.trim() || pendingAtoms[0]?.id;
4049
4064
  if (targetId) {
4050
- const { execute: execute2 } = await import("./execute-DBNVIJ3P.js");
4065
+ const { execute: execute2 } = await import("./execute-UWJPIG6C.js");
4051
4066
  await execute2(targetId, {});
4052
4067
  } else {
4053
4068
  console.log(chalk6.yellow("No atom to execute."));
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  list
3
- } from "./chunk-W6TYXCZA.js";
4
- import "./chunk-OTODLPY4.js";
3
+ } from "./chunk-MBRWJ3SX.js";
4
+ import "./chunk-JFUG25H7.js";
5
5
  import "./chunk-PCTP3LKJ.js";
6
6
  import "./chunk-PJRQI5UN.js";
7
7
  import "./chunk-EIEU3IIY.js";
@@ -6,9 +6,9 @@ import {
6
6
  parallelRunWaves,
7
7
  parallelSchedule,
8
8
  parallelStatus
9
- } from "./chunk-KDWIKBM2.js";
9
+ } from "./chunk-FP4B73CC.js";
10
10
  import "./chunk-EBHHIUCB.js";
11
- import "./chunk-OTODLPY4.js";
11
+ import "./chunk-JFUG25H7.js";
12
12
  import "./chunk-PCTP3LKJ.js";
13
13
  import "./chunk-PJRQI5UN.js";
14
14
  import "./chunk-EIEU3IIY.js";
@@ -3,7 +3,7 @@ import {
3
3
  loadAtom,
4
4
  parseAtomDescription,
5
5
  plan
6
- } from "./chunk-OTODLPY4.js";
6
+ } from "./chunk-JFUG25H7.js";
7
7
  import "./chunk-PCTP3LKJ.js";
8
8
  import "./chunk-PJRQI5UN.js";
9
9
  import "./chunk-EIEU3IIY.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archondev",
3
- "version": "2.19.7",
3
+ "version": "2.19.9",
4
4
  "description": "Local-first AI-powered development governance system",
5
5
  "main": "dist/index.js",
6
6
  "bin": {