archondev 2.19.31 → 2.19.33

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.
Files changed (2) hide show
  1. package/dist/index.js +76 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3784,16 +3784,75 @@ Showing latest planned atom (${latest.externalId})...
3784
3784
  await show2(latest.externalId);
3785
3785
  }
3786
3786
  function isPlanApprovalDirective(input) {
3787
- const normalized = input.trim().toLowerCase();
3788
- return normalized === "approve" || normalized === "approve plan" || normalized === "approved" || normalized === "yes" || normalized === "yes, proceed" || normalized === "proceed";
3787
+ const normalized = normalizeDirectiveInput(input);
3788
+ if (!normalized) return false;
3789
+ const directApprovals = /* @__PURE__ */ new Set([
3790
+ "approve",
3791
+ "approve plan",
3792
+ "approved",
3793
+ "yes",
3794
+ "yes proceed",
3795
+ "y",
3796
+ "ok",
3797
+ "okay",
3798
+ "proceed",
3799
+ "go ahead",
3800
+ "continue",
3801
+ "do it",
3802
+ "sounds good",
3803
+ "looks good"
3804
+ ]);
3805
+ if (directApprovals.has(normalized)) return true;
3806
+ if (normalized.startsWith("yes ")) return true;
3807
+ if (/\b(approve|approved)\b/.test(normalized)) return true;
3808
+ const hasProceedSignal = /\b(go ahead|proceed|continue|do it|move forward|keep going)\b/.test(normalized);
3809
+ const hasPlanReference = /\b(plan|proposal|that|this|capsule|capsules)\b/.test(normalized);
3810
+ return hasProceedSignal && hasPlanReference;
3789
3811
  }
3790
3812
  function isExecutionDirective(input) {
3791
- const normalized = input.trim().toLowerCase();
3792
- return normalized === "execute" || normalized === "execute atom" || normalized === "run atom" || normalized === "run it now" || normalized === "implement now" || normalized === "start execution" || normalized === "go ahead and execute";
3813
+ const normalized = normalizeDirectiveInput(input);
3814
+ if (!normalized) return false;
3815
+ const directExecution = /* @__PURE__ */ new Set([
3816
+ "execute",
3817
+ "execute atom",
3818
+ "run atom",
3819
+ "run it now",
3820
+ "implement now",
3821
+ "start execution",
3822
+ "go ahead and execute",
3823
+ "execute now",
3824
+ "run now",
3825
+ "start now"
3826
+ ]);
3827
+ if (directExecution.has(normalized)) return true;
3828
+ const hasExplicitRunVerb = /\b(execute|run)\b/.test(normalized);
3829
+ const hasExecutionTarget = /\b(atom|task|plan|it|now)\b/.test(normalized);
3830
+ if (hasExplicitRunVerb && hasExecutionTarget) {
3831
+ return true;
3832
+ }
3833
+ return /\b(start execution|implement now)\b/.test(normalized);
3793
3834
  }
3794
3835
  function isCreateAtomDirective(input) {
3795
- const normalized = input.trim().toLowerCase();
3796
- return normalized === "create atom" || normalized === "save this" || normalized === "make atom" || normalized === "save as atom" || normalized === "turn this into a task" || normalized === "create task";
3836
+ const normalized = normalizeDirectiveInput(input);
3837
+ if (!normalized) return false;
3838
+ const directCreate = /* @__PURE__ */ new Set([
3839
+ "create",
3840
+ "create atom",
3841
+ "save this",
3842
+ "make atom",
3843
+ "save as atom",
3844
+ "turn this into a task",
3845
+ "create task",
3846
+ "save it",
3847
+ "go ahead",
3848
+ "proceed",
3849
+ "yes"
3850
+ ]);
3851
+ if (directCreate.has(normalized)) return true;
3852
+ return /\b(create|save|make|turn)\b/.test(normalized) && /\b(atom|task|plan|this|it)\b/.test(normalized);
3853
+ }
3854
+ function normalizeDirectiveInput(input) {
3855
+ return input.trim().toLowerCase().replace(/[^\w\s]/g, " ").replace(/\s+/g, " ").trim();
3797
3856
  }
3798
3857
  function shouldDoAnalysisBeforeAtom(input) {
3799
3858
  const normalized = input.toLowerCase();
@@ -3863,7 +3922,7 @@ async function provideAnalysisFirstPlan(cwd, request) {
3863
3922
  }
3864
3923
  pendingAnalysisToAtomRequest = request;
3865
3924
  console.log();
3866
- console.log(chalk5.dim('Reply "save this" (or "create atom") if you want me to implement this in governed mode.'));
3925
+ console.log(chalk5.dim('Reply with "yes", "go ahead", or "create atom" when you want me to implement this in governed mode.'));
3867
3926
  }
3868
3927
  function collectMarkdownFiles(cwd) {
3869
3928
  const results = [];
@@ -3955,12 +4014,19 @@ function buildSampleCapsuleDraft(cwd, files, capsuleCount) {
3955
4014
  async function continueWithCurrentTask(cwd) {
3956
4015
  const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-RHDFDSZE.js");
3957
4016
  const atoms = await listLocalAtoms2();
3958
- const pending = atoms.filter((a) => a.status === "READY" || a.status === "IN_PROGRESS").sort((a, b) => a.externalId.localeCompare(b.externalId));
3959
- if (pending.length === 0) {
4017
+ const readyAtoms = atoms.filter((a) => a.status === "READY").sort((a, b) => a.externalId.localeCompare(b.externalId));
4018
+ if (readyAtoms.length === 0) {
4019
+ const inProgressAtoms = atoms.filter((a) => a.status === "IN_PROGRESS").sort((a, b) => a.externalId.localeCompare(b.externalId));
4020
+ if (inProgressAtoms.length > 0) {
4021
+ const current = inProgressAtoms[0];
4022
+ console.log(chalk5.yellow(`No READY atoms found. Current in-progress atom: ${current?.externalId}.`));
4023
+ console.log(chalk5.dim("Use `archon show <atom-id>` to inspect status, or plan a new task."));
4024
+ return;
4025
+ }
3960
4026
  console.log(chalk5.yellow("No pending atoms found. Tell me what to plan next."));
3961
4027
  return;
3962
4028
  }
3963
- const nextAtom = pending[0];
4029
+ const nextAtom = readyAtoms[0];
3964
4030
  if (!nextAtom) {
3965
4031
  console.log(chalk5.yellow("No pending atoms found. Tell me what to plan next."));
3966
4032
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archondev",
3
- "version": "2.19.31",
3
+ "version": "2.19.33",
4
4
  "description": "Local-first AI-powered development governance system",
5
5
  "main": "dist/index.js",
6
6
  "bin": {