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.
- package/dist/index.js +76 -10
- 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
|
|
3788
|
-
|
|
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
|
|
3792
|
-
|
|
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
|
|
3796
|
-
|
|
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 "
|
|
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
|
|
3959
|
-
if (
|
|
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 =
|
|
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;
|