@delete101020/aidlc 4.0.9 → 4.0.10
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/bundle.js +211 -34
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -19837,6 +19837,17 @@ var require_WorkspaceSchema = __commonJS({
|
|
|
19837
19837
|
name: zod_1.z.string().optional(),
|
|
19838
19838
|
/** Step is part of the pipeline but skipped at run time when false. Defaults to true. */
|
|
19839
19839
|
enabled: zod_1.z.boolean().default(true),
|
|
19840
|
+
/**
|
|
19841
|
+
* A step the run may fail and carry on past. Its rejection never marks the
|
|
19842
|
+
* epic failed, never parks the run cursor, and never keeps the run from
|
|
19843
|
+
* completing; the autopilot loop steps over it to whatever else is open.
|
|
19844
|
+
*
|
|
19845
|
+
* For the side branch whose findings are welcome but not required — a
|
|
19846
|
+
* second reviewer's lens, an optional QC pass. Without the flag the only
|
|
19847
|
+
* thing making such a step skippable is that nothing happens to
|
|
19848
|
+
* `depends_on` it, which the runner cannot tell from an oversight.
|
|
19849
|
+
*/
|
|
19850
|
+
optional: zod_1.z.boolean().default(false),
|
|
19840
19851
|
/** Artifact paths the step is expected to produce. Checked after work. */
|
|
19841
19852
|
produces: zod_1.z.array(zod_1.z.string().min(1)).default([]),
|
|
19842
19853
|
/**
|
|
@@ -19969,6 +19980,7 @@ var require_WorkspaceSchema = __commonJS({
|
|
|
19969
19980
|
return {
|
|
19970
19981
|
agent: step,
|
|
19971
19982
|
enabled: true,
|
|
19983
|
+
optional: false,
|
|
19972
19984
|
produces: [],
|
|
19973
19985
|
produces_contains: [],
|
|
19974
19986
|
requires: [],
|
|
@@ -19994,6 +20006,7 @@ var require_WorkspaceSchema = __commonJS({
|
|
|
19994
20006
|
name: typeof obj.name === "string" ? obj.name : void 0,
|
|
19995
20007
|
skills,
|
|
19996
20008
|
enabled: typeof obj.enabled === "boolean" ? obj.enabled : true,
|
|
20009
|
+
optional: obj.optional === true,
|
|
19997
20010
|
produces,
|
|
19998
20011
|
produces_contains,
|
|
19999
20012
|
requires,
|
|
@@ -20752,6 +20765,83 @@ var require_RunState = __commonJS({
|
|
|
20752
20765
|
}
|
|
20753
20766
|
});
|
|
20754
20767
|
|
|
20768
|
+
// ../core/dist/runs/runProgress.js
|
|
20769
|
+
var require_runProgress = __commonJS({
|
|
20770
|
+
"../core/dist/runs/runProgress.js"(exports2) {
|
|
20771
|
+
"use strict";
|
|
20772
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20773
|
+
exports2.isActiveStatus = isActiveStatus;
|
|
20774
|
+
exports2.isStepOptional = isStepOptional;
|
|
20775
|
+
exports2.deriveRunProgress = deriveRunProgress;
|
|
20776
|
+
exports2.isRunComplete = isRunComplete;
|
|
20777
|
+
var WorkspaceSchema_1 = require_WorkspaceSchema();
|
|
20778
|
+
var ACTIVE = /* @__PURE__ */ new Set([
|
|
20779
|
+
"awaiting_work",
|
|
20780
|
+
"awaiting_auto_review",
|
|
20781
|
+
"awaiting_review"
|
|
20782
|
+
]);
|
|
20783
|
+
function isActiveStatus(status) {
|
|
20784
|
+
return ACTIVE.has(status);
|
|
20785
|
+
}
|
|
20786
|
+
function isStepOptional(pipeline, idx) {
|
|
20787
|
+
const cfg = pipeline?.steps?.[idx];
|
|
20788
|
+
return cfg === void 0 ? false : (0, WorkspaceSchema_1.normalizeStep)(cfg).optional;
|
|
20789
|
+
}
|
|
20790
|
+
function usesDag(pipeline) {
|
|
20791
|
+
return pipeline.steps.some((s) => (0, WorkspaceSchema_1.normalizeStep)(s).depends_on.length > 0);
|
|
20792
|
+
}
|
|
20793
|
+
function deriveRunProgress(state, pipeline) {
|
|
20794
|
+
const dag = pipeline ? usesDag(pipeline) : false;
|
|
20795
|
+
const approvedDagIds = /* @__PURE__ */ new Set();
|
|
20796
|
+
if (pipeline && dag) {
|
|
20797
|
+
state.steps.forEach((s, i) => {
|
|
20798
|
+
if (s.status !== "approved") {
|
|
20799
|
+
return;
|
|
20800
|
+
}
|
|
20801
|
+
const norm = (0, WorkspaceSchema_1.normalizeStep)(pipeline.steps[i] ?? { agent: s.agent });
|
|
20802
|
+
approvedDagIds.add(norm.name ?? norm.agent);
|
|
20803
|
+
});
|
|
20804
|
+
}
|
|
20805
|
+
const actionable = [];
|
|
20806
|
+
const rejected = [];
|
|
20807
|
+
const blocking = [];
|
|
20808
|
+
state.steps.forEach((s, i) => {
|
|
20809
|
+
if (isActiveStatus(s.status)) {
|
|
20810
|
+
actionable.push(i);
|
|
20811
|
+
return;
|
|
20812
|
+
}
|
|
20813
|
+
if (s.status === "rejected") {
|
|
20814
|
+
rejected.push(i);
|
|
20815
|
+
if (!isStepOptional(pipeline, i)) {
|
|
20816
|
+
blocking.push(i);
|
|
20817
|
+
}
|
|
20818
|
+
return;
|
|
20819
|
+
}
|
|
20820
|
+
if (s.status === "pending" && pipeline && dag) {
|
|
20821
|
+
const deps = (0, WorkspaceSchema_1.normalizeStep)(pipeline.steps[i] ?? { agent: s.agent }).depends_on;
|
|
20822
|
+
if (deps.length > 0 && deps.every((d) => approvedDagIds.has(d))) {
|
|
20823
|
+
actionable.push(i);
|
|
20824
|
+
}
|
|
20825
|
+
}
|
|
20826
|
+
});
|
|
20827
|
+
const stuck = blocking.length > 0 && actionable.length === 0;
|
|
20828
|
+
const status = state.status === "completed" ? "done" : stuck ? "failed" : "in_progress";
|
|
20829
|
+
return { actionable, rejected, blocking, stuck, status };
|
|
20830
|
+
}
|
|
20831
|
+
function isRunComplete(state, pipeline) {
|
|
20832
|
+
return state.steps.every((s, i) => {
|
|
20833
|
+
if (s.status === "approved") {
|
|
20834
|
+
return true;
|
|
20835
|
+
}
|
|
20836
|
+
if (!isStepOptional(pipeline, i)) {
|
|
20837
|
+
return false;
|
|
20838
|
+
}
|
|
20839
|
+
return s.status === "rejected" || s.status === "pending";
|
|
20840
|
+
});
|
|
20841
|
+
}
|
|
20842
|
+
}
|
|
20843
|
+
});
|
|
20844
|
+
|
|
20755
20845
|
// ../core/dist/runs/reconcileRun.js
|
|
20756
20846
|
var require_reconcileRun = __commonJS({
|
|
20757
20847
|
"../core/dist/runs/reconcileRun.js"(exports2) {
|
|
@@ -20920,6 +21010,7 @@ var require_PipelineRunner = __commonJS({
|
|
|
20920
21010
|
var path17 = __importStar(require("path"));
|
|
20921
21011
|
var WorkspaceSchema_1 = require_WorkspaceSchema();
|
|
20922
21012
|
var RunState_1 = require_RunState();
|
|
21013
|
+
var runProgress_1 = require_runProgress();
|
|
20923
21014
|
var reconcileRun_1 = require_reconcileRun();
|
|
20924
21015
|
var PipelineRunError3 = class extends Error {
|
|
20925
21016
|
missing;
|
|
@@ -21099,6 +21190,7 @@ var require_PipelineRunner = __commonJS({
|
|
|
21099
21190
|
sentBackToIdx: idx
|
|
21100
21191
|
});
|
|
21101
21192
|
next.status = "running";
|
|
21193
|
+
settleOptionalRejection(next, idx, pipeline);
|
|
21102
21194
|
return next;
|
|
21103
21195
|
}
|
|
21104
21196
|
if (norm.human_review) {
|
|
@@ -21239,6 +21331,9 @@ var require_PipelineRunner = __commonJS({
|
|
|
21239
21331
|
})
|
|
21240
21332
|
};
|
|
21241
21333
|
next.status = "running";
|
|
21334
|
+
if (pipeline) {
|
|
21335
|
+
settleOptionalRejection(next, idx, pipeline);
|
|
21336
|
+
}
|
|
21242
21337
|
return next;
|
|
21243
21338
|
}
|
|
21244
21339
|
function rerunStep3(args) {
|
|
@@ -21357,7 +21452,7 @@ var require_PipelineRunner = __commonJS({
|
|
|
21357
21452
|
}
|
|
21358
21453
|
const dagId = (i) => normalized[i].name ?? normalized[i].agent;
|
|
21359
21454
|
const approvedDagIds = new Set(next.steps.filter((s) => s.status === "approved").map((s) => dagId(s.stepIdx)));
|
|
21360
|
-
|
|
21455
|
+
const opened = [];
|
|
21361
21456
|
for (let i = 0; i < normalized.length; i++) {
|
|
21362
21457
|
const sStep = next.steps[i];
|
|
21363
21458
|
if (sStep.status !== "pending") {
|
|
@@ -21376,25 +21471,47 @@ var require_PipelineRunner = __commonJS({
|
|
|
21376
21471
|
status: "awaiting_work",
|
|
21377
21472
|
startedAt: finishedAt
|
|
21378
21473
|
};
|
|
21379
|
-
|
|
21380
|
-
if (next.currentStepIdx === idx) {
|
|
21381
|
-
next.currentStepIdx = i;
|
|
21382
|
-
}
|
|
21474
|
+
opened.push(i);
|
|
21383
21475
|
}
|
|
21384
|
-
|
|
21385
|
-
if (allApproved) {
|
|
21476
|
+
if ((0, runProgress_1.isRunComplete)(next, pipeline)) {
|
|
21386
21477
|
next.status = "completed";
|
|
21387
21478
|
return next;
|
|
21388
21479
|
}
|
|
21389
|
-
|
|
21390
|
-
const stillActive = next.steps.findIndex((s) => s.status === "awaiting_work" || s.status === "awaiting_auto_review" || s.status === "awaiting_review");
|
|
21391
|
-
if (stillActive >= 0) {
|
|
21392
|
-
next.currentStepIdx = stillActive;
|
|
21393
|
-
}
|
|
21394
|
-
}
|
|
21480
|
+
refocusCursor(next, opened);
|
|
21395
21481
|
next.status = "running";
|
|
21396
21482
|
return next;
|
|
21397
21483
|
}
|
|
21484
|
+
function refocusCursor(next, opened) {
|
|
21485
|
+
const cur = next.steps[next.currentStepIdx];
|
|
21486
|
+
if (cur && cur.status !== "approved" && cur.status !== "rejected") {
|
|
21487
|
+
return;
|
|
21488
|
+
}
|
|
21489
|
+
const target = opened.length > 0 ? Math.min(...opened) : next.steps.findIndex((s) => (0, runProgress_1.isActiveStatus)(s.status));
|
|
21490
|
+
if (target >= 0) {
|
|
21491
|
+
next.currentStepIdx = target;
|
|
21492
|
+
}
|
|
21493
|
+
}
|
|
21494
|
+
function settleOptionalRejection(next, idx, pipeline) {
|
|
21495
|
+
if (!(0, runProgress_1.isStepOptional)(pipeline, idx)) {
|
|
21496
|
+
return;
|
|
21497
|
+
}
|
|
21498
|
+
const normalized = pipeline.steps.map(WorkspaceSchema_1.normalizeStep);
|
|
21499
|
+
const usesDag = normalized.some((s) => s.depends_on.length > 0);
|
|
21500
|
+
if (!usesDag) {
|
|
21501
|
+
const follower = next.steps[idx + 1];
|
|
21502
|
+
if (follower && follower.status === "pending") {
|
|
21503
|
+
next.steps[idx + 1] = {
|
|
21504
|
+
...follower,
|
|
21505
|
+
status: "awaiting_work",
|
|
21506
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
21507
|
+
};
|
|
21508
|
+
}
|
|
21509
|
+
}
|
|
21510
|
+
refocusCursor(next, []);
|
|
21511
|
+
if ((0, runProgress_1.isRunComplete)(next, pipeline)) {
|
|
21512
|
+
next.status = "completed";
|
|
21513
|
+
}
|
|
21514
|
+
}
|
|
21398
21515
|
function clone(value) {
|
|
21399
21516
|
return JSON.parse(JSON.stringify(value));
|
|
21400
21517
|
}
|
|
@@ -25085,6 +25202,7 @@ var require_EpicScaffold = __commonJS({
|
|
|
25085
25202
|
var fs14 = __importStar(require("fs"));
|
|
25086
25203
|
var path17 = __importStar(require("path"));
|
|
25087
25204
|
var PipelineRunner_1 = require_PipelineRunner();
|
|
25205
|
+
var runProgress_1 = require_runProgress();
|
|
25088
25206
|
var RunStateStore_1 = require_RunStateStore();
|
|
25089
25207
|
var EpicPipelineStore_1 = require_EpicPipelineStore();
|
|
25090
25208
|
var epicTags_1 = require_epicTags();
|
|
@@ -25132,7 +25250,9 @@ var require_EpicScaffold = __commonJS({
|
|
|
25132
25250
|
} catch {
|
|
25133
25251
|
return;
|
|
25134
25252
|
}
|
|
25135
|
-
const
|
|
25253
|
+
const pipelines = Array.isArray(doc?.pipelines) ? doc.pipelines : [];
|
|
25254
|
+
const pipeline = pipelines.find((p) => p.id === runState.pipelineId);
|
|
25255
|
+
const epicStatus = (0, runProgress_1.deriveRunProgress)(runState, pipeline).status;
|
|
25136
25256
|
const stepStates = runState.steps.map((s) => ({
|
|
25137
25257
|
agent: s.agent,
|
|
25138
25258
|
// The step's identity, mirrored alongside its agent so state.json says
|
|
@@ -29441,6 +29561,7 @@ var require_execEngine = __commonJS({
|
|
|
29441
29561
|
var AutoReviewer_1 = require_AutoReviewer();
|
|
29442
29562
|
var EpicArtifactCommit_1 = require_EpicArtifactCommit();
|
|
29443
29563
|
var EpicScaffold_1 = require_EpicScaffold();
|
|
29564
|
+
var runProgress_1 = require_runProgress();
|
|
29444
29565
|
var budget_1 = require_budget();
|
|
29445
29566
|
var pricing_1 = require_pricing();
|
|
29446
29567
|
var models_1 = require_models();
|
|
@@ -29505,9 +29626,34 @@ var require_execEngine = __commonJS({
|
|
|
29505
29626
|
return { kind: "awaiting_review" };
|
|
29506
29627
|
}
|
|
29507
29628
|
if (step.status === "rejected") {
|
|
29629
|
+
const skippable = (0, runProgress_1.isStepOptional)(initialPipeline, state.currentStepIdx) || initialPipeline.on_failure === "continue";
|
|
29630
|
+
const openElsewhere = state.steps.findIndex((s, i) => i !== state.currentStepIdx && (0, runProgress_1.isActiveStatus)(s.status));
|
|
29631
|
+
if (skippable && openElsewhere >= 0) {
|
|
29632
|
+
hooks.onStepSkipped?.({
|
|
29633
|
+
stepIdx: state.currentStepIdx,
|
|
29634
|
+
agent: step.agent,
|
|
29635
|
+
reason: step.rejectReason ?? step.autoReviewVerdict?.reason ?? "rejected",
|
|
29636
|
+
nextStepIdx: openElsewhere,
|
|
29637
|
+
runId
|
|
29638
|
+
});
|
|
29639
|
+
RunStateStore_1.RunStateStore.save(root, { ...state, currentStepIdx: openElsewhere });
|
|
29640
|
+
continue;
|
|
29641
|
+
}
|
|
29508
29642
|
hooks.onRejected?.({ agent: step.agent, runId });
|
|
29509
29643
|
return { kind: "rejected" };
|
|
29510
29644
|
}
|
|
29645
|
+
if (step.status === "approved") {
|
|
29646
|
+
const openElsewhere = state.steps.findIndex((s) => (0, runProgress_1.isActiveStatus)(s.status));
|
|
29647
|
+
if (openElsewhere >= 0) {
|
|
29648
|
+
RunStateStore_1.RunStateStore.save(root, { ...state, currentStepIdx: openElsewhere });
|
|
29649
|
+
continue;
|
|
29650
|
+
}
|
|
29651
|
+
const parked = state.steps.find((s) => s.status === "rejected");
|
|
29652
|
+
if (parked) {
|
|
29653
|
+
hooks.onRejected?.({ agent: parked.agent, runId });
|
|
29654
|
+
return { kind: "rejected" };
|
|
29655
|
+
}
|
|
29656
|
+
}
|
|
29511
29657
|
if (step.status !== "awaiting_work") {
|
|
29512
29658
|
hooks.onRunFailed?.(`Unexpected step status "${step.status}" \u2014 cannot exec.`);
|
|
29513
29659
|
return { kind: "error" };
|
|
@@ -31352,6 +31498,7 @@ var require_commandModel = __commonJS({
|
|
|
31352
31498
|
var strictMode_1 = require_strictMode();
|
|
31353
31499
|
var commandBodyFreshness_1 = require_commandBodyFreshness();
|
|
31354
31500
|
var WorkspaceSchema_1 = require_WorkspaceSchema();
|
|
31501
|
+
var runProgress_1 = require_runProgress();
|
|
31355
31502
|
exports2.CANONICAL_PHASES = [
|
|
31356
31503
|
{ id: "plan", name: "Plan", description: "Scaffold the epic and write the PRD.", artifact: "PRD.md" },
|
|
31357
31504
|
{ id: "prototype", name: "Prototype", description: "Propose the UI visually with multiple design options.", artifact: "PROTOTYPE.md" },
|
|
@@ -31418,14 +31565,14 @@ var require_commandModel = __commonJS({
|
|
|
31418
31565
|
};
|
|
31419
31566
|
const statusByDagId = /* @__PURE__ */ new Map();
|
|
31420
31567
|
state.steps.forEach((s, idx) => statusByDagId.set(dagId(idx), s.status));
|
|
31421
|
-
|
|
31422
|
-
|
|
31423
|
-
|
|
31424
|
-
|
|
31425
|
-
|
|
31426
|
-
|
|
31427
|
-
|
|
31428
|
-
}
|
|
31568
|
+
const open = state.steps.findIndex((s) => s.status === "awaiting_work");
|
|
31569
|
+
if (open >= 0) {
|
|
31570
|
+
return { index: open, phaseId: dagId(open), reason: "awaiting_work" };
|
|
31571
|
+
}
|
|
31572
|
+
const optional = (i) => (0, runProgress_1.isStepOptional)(pipeline, i);
|
|
31573
|
+
const blocked = state.steps.findIndex((s, i) => s.status === "rejected" && !optional(i));
|
|
31574
|
+
if (blocked >= 0) {
|
|
31575
|
+
return { index: blocked, phaseId: dagId(blocked), reason: "rejected" };
|
|
31429
31576
|
}
|
|
31430
31577
|
for (let i = 0; i < state.steps.length; i++) {
|
|
31431
31578
|
if (state.steps[i].status !== "pending") {
|
|
@@ -31438,6 +31585,10 @@ var require_commandModel = __commonJS({
|
|
|
31438
31585
|
return { index: i, phaseId: dagId(i), reason: "unblocked" };
|
|
31439
31586
|
}
|
|
31440
31587
|
}
|
|
31588
|
+
const skipped = state.steps.findIndex((s, i) => s.status === "rejected" && optional(i));
|
|
31589
|
+
if (skipped >= 0) {
|
|
31590
|
+
return { index: skipped, phaseId: dagId(skipped), reason: "rejected" };
|
|
31591
|
+
}
|
|
31441
31592
|
return null;
|
|
31442
31593
|
}
|
|
31443
31594
|
function unprovisionedPhases(config, canonical = exports2.CANONICAL_PHASE_IDS) {
|
|
@@ -31477,10 +31628,12 @@ The first token is the **epic id**; an optional second token is the **phase**.
|
|
|
31477
31628
|
- **If a phase was given**, use it. Validate it is a step in the epic's
|
|
31478
31629
|
pipeline (see step 3). If it isn't, tell the user which phases the pipeline
|
|
31479
31630
|
*does* have and stop.
|
|
31480
|
-
- **If no phase was given**, pick the **next eligible phase
|
|
31481
|
-
|
|
31482
|
-
\`
|
|
31483
|
-
|
|
31631
|
+
- **If no phase was given**, pick the **next eligible phase**, checking each
|
|
31632
|
+
rule against every step before moving to the next rule: any step that is
|
|
31633
|
+
\`awaiting_work\`, else any \`rejected\` step *not* marked \`optional: true\`,
|
|
31634
|
+
else the first \`pending\` step whose every \`depends_on\` is \`approved\`, else
|
|
31635
|
+
a \`rejected\` \`optional\` step. If none is actionable (all approved or
|
|
31636
|
+
paused for review), say so and stop.
|
|
31484
31637
|
|
|
31485
31638
|
## 3. Resolve composition from the pipeline (never from the command name)
|
|
31486
31639
|
|
|
@@ -32069,9 +32222,9 @@ var require_dist = __commonJS({
|
|
|
32069
32222
|
exports2.parseFollowUps = exports2.FollowUpsParseError = exports2.FollowUpManifestSchema = exports2.FollowUpItemSchema = exports2.SIGNAL_FILE = exports2.FOLLOW_UP_ARTIFACT = exports2.readEpicSignal = exports2.existingEpicIds = exports2.followUpIdFor = exports2.followUpEpicId = exports2.renderIntentMarkdown = exports2.openFollowUpEpic = exports2.openIncidentEpic = exports2.SignalParseError = exports2.isSignal = exports2.parseSignal = exports2.SignalSchema = exports2.EpicStepEditError = exports2.resolveStepRef = exports2.describeGateEffect = exports2.commitEpicStepEdit = exports2.planSetEpicStepGates = exports2.planRemoveEpicStep = exports2.planAddEpicStep = exports2.EpicScaffoldError = exports2.epicsRoot = exports2.mapStepStatusToEpic = exports2.mirrorRunStateToEpic = exports2.scaffoldEpic = exports2.resolveArtifactCommitConfig = exports2.commitApprovedArtifacts = exports2.PipelineAdaptError = exports2.applyAdaptation = exports2.parseAdaptationVerdict = exports2.buildAdaptationPrompt = exports2.buildPhaseCatalog = exports2.slugEpicId = exports2.parseClassificationVerdict = exports2.buildClassificationPrompt = exports2.heuristicClassify = exports2.PipelineAssembleError = exports2.recipePipelineId = exports2.assemblePipeline = exports2.collectWorkspaceRefIssues = exports2.stepDagId = exports2.stepAgentId = exports2.normalizeStep = exports2.WorkspaceValidationError = exports2.validateWorkspace = exports2.WorkspaceSchema = void 0;
|
|
32070
32223
|
exports2.composeAgentPrompt = exports2.PROJECT_INSTRUCTION_FILES = exports2.findProjectInstructions = exports2.stripPersonaMetadata = exports2.PersonaLoader = exports2.SkillNotFoundError = exports2.SkillLoader = exports2.EnvVarMissingError = exports2.EnvResolver = exports2.epicPipelineReport = exports2.planEpicPipelineExtraction = exports2.epicOwningPipeline = exports2.unstageEpicPipeline = exports2.stageEpicPipeline = exports2.writeEpicPipelines = exports2.splitEpicPipelines = exports2.mergeEpicPipelines = exports2.epicPipelinePath = exports2.EPIC_PIPELINE_FILENAME = exports2.WORKSPACE_DIR = exports2.WORKSPACE_FILENAME = exports2.WorkspaceParseError = exports2.WorkspaceNotFoundError = exports2.WorkspaceLoader = exports2.renderPlanMarkdown = exports2.generatePlan = exports2.collectContext = exports2.followUpHookFailures = exports2.pendingFollowUpDone = exports2.applyFollowUpHookRun = exports2.trackFollowUpChildren = exports2.writeFollowUpHookLedger = exports2.readFollowUpHookLedger = exports2.followUpHookLedgerPath = exports2.runFollowUpHook = exports2.fillFollowUpHookCommand = exports2.resolveFollowUpHooks = exports2.epicPipelineId = exports2.FOLLOW_UP_HOOK_TIMEOUT_MS = exports2.FOLLOW_UP_HOOKS_LEDGER = exports2.stepProducesFollowUps = exports2.collectFollowUpHookIssues = exports2.FOLLOW_UP_HOOK_PLACEHOLDERS = exports2.FOLLOW_UP_HOOK_KEYS = exports2.FOLLOW_UP_INTENT = exports2.FOLLOW_UPS_FILE = exports2.openManifestFollowUp = exports2.followUpChildId = exports2.followUpsOf = exports2.readEpicFollowUps = void 0;
|
|
32071
32224
|
exports2.buildClaudeSpawnEnv = exports2.hasClaudeLogin = exports2.isInsideClaudeCodeSession = exports2.createJsonSink = exports2.createLineSink = exports2.isCodexMcpConfigured = exports2.codexConfigPath = exports2.readProjectMcpServer = exports2.mcpRegistrarFor = exports2.codexMcpRegistrar = exports2.claudeMcpRegistrar = exports2.CodexRunner = exports2.DefaultRunner = exports2.RunnerRegistry = exports2.targetPath = exports2.scopePaths = exports2.discoverAssets = exports2.commandBodyIsStale = exports2.readEpicTags = exports2.normalizeTags = exports2.normalizeTag = exports2.epicMatchesTags = exports2.applyTagEdit = exports2.MAX_TAG_LENGTH = exports2.EPIC_TAGS_KEY = exports2.strictModeSection = exports2.resolveEpicStrictMode = exports2.epicStrictMode = exports2.commandBodyPredatesStrictMode = exports2.STRICT_MODE_KEY = exports2.STRICT_MODE_HEADING = exports2.writeUserEpicIdPrefix = exports2.userConfigPath = exports2.readUserConfig = exports2.readGitUserName = exports2.ensureUserConfigIgnored = exports2.USER_CONFIG_RELPATH = exports2.USER_CONFIG_IGNORE_LINE = exports2.suggestEpicId = exports2.resolveEpicIdPrefixChain = exports2.resolveEpicIdPrefix = exports2.epicIdDateStamp = exports2.deriveEpicIdPrefix = exports2.EPIC_ID_PREFIX_PATTERN = exports2.EPIC_ID_PREFIX_KEY = exports2.resolveArtifactLanguage = exports2.commandBodyPredatesArtifactLanguage = exports2.artifactLanguageSection = exports2.ARTIFACT_LANGUAGE_HEADING = exports2.stripPersonaDirectives = void 0;
|
|
32072
|
-
exports2.
|
|
32073
|
-
exports2.
|
|
32074
|
-
exports2.AIDLC_CORE_VERSION = exports2.AIDLC_CLI_GUIDE_TEXT = exports2.AIDLC_KNOWLEDGE = exports2.clearResolveCommandCache = exports2.resolveCommand = exports2.remapClaudePath = exports2.claudeConfigEnv = exports2.claudeJsonPath = exports2.isDefaultClaudeConfigDir = exports2.claudeConfigDir = exports2.resolveClaudeConfigDir = exports2.defaultClaudeConfigDir = exports2.getClaudeConfigDirOverride = exports2.setClaudeConfigDir = exports2.resolveDeclaredPath = exports2.expandHome = exports2.ProfileLoadError = exports2.UnknownStandardError = exports2.builtinProfiles = exports2.loadActiveProfile = exports2.loadProfile = exports2.listProfileManifests = exports2.resolveStandard = exports2.workspaceStandard = exports2.isBuiltinProfileId = exports2.ProfileSchema = exports2.TRACE_RULES = void 0;
|
|
32225
|
+
exports2.getBuiltinWorkflow = exports2.workflowSlug = exports2.builtinTemplatesRoot = exports2.pipelineCommandId = exports2.PHASES = exports2.BUILTIN_WORKFLOWS = exports2.withBackfilledStepNames = exports2.describeDrift = exports2.reconcileRunSteps = exports2.RUN_STATE_SCHEMA_VERSION = exports2.migrateRunState = exports2.stepIdentity = exports2.resolvePath = exports2.AutoReviewerError = exports2.runAutoReview = exports2.renderRunReport = exports2.verifyRun = exports2.runExecLoop = exports2.estimateCostUsd = exports2.providerAliases = exports2.ratesFromConfig = exports2.mergeRates = exports2.BUILTIN_RATES = exports2.checkBudget = exports2.isActiveStatus = exports2.isStepOptional = exports2.isRunComplete = exports2.deriveRunProgress = exports2.PipelineRunError = exports2.retryAutoReview = exports2.submitAutoReviewVerdict = exports2.requestStepUpdate = exports2.rerunStep = exports2.rejectStep = exports2.approveStep = exports2.markStepDone = exports2.canStartStep = exports2.startRun = exports2.activateBackendFromWorkspace = exports2.activateRunStateBackend = exports2.resolveRunStateBackend = exports2.GitRunStateStore = exports2.RUN_ID_PATTERN = exports2.FileRunStateStore = exports2.RunStateStore = exports2.harnessCapabilities = exports2.NO_HARNESS_CAPABILITIES = exports2.RunnerValidationError = exports2.validateRunnerExport = exports2.CustomRunnerLoader = void 0;
|
|
32226
|
+
exports2.isEpicMemoryHookEnabled = exports2.installAnnotationTools = exports2.relativeEpicRoot = exports2.provisionDeclaredWorkflows = exports2.provisionWorkflowFiles = exports2.writeWorkflowArtifactTemplates = exports2.writeWorkflowCommands = exports2.provisionShortcutDocs = exports2.writeTwoLayerCommands = exports2.shortcutCommandDoc = exports2.backboneCommandDoc = exports2.unprovisionedPhases = exports2.nextEligiblePhase = exports2.resolveComposition = exports2.shortcutCommandId = exports2.getCanonicalPhase = exports2.isCanonicalPhase = exports2.BACKBONE_COMMAND_ID = exports2.CANONICAL_PHASE_IDS = exports2.CANONICAL_PHASES = exports2.renderTemplate = exports2.DEFAULT_GLOBAL_WORKFLOW_IDS = exports2.detectGlobalBuiltinSource = exports2.uninstallWorkflowGlobalsByIds = exports2.isWorkflowGloballyInstalled = exports2.installWorkflowGlobalsByIds = exports2.installGlobalDefaults = exports2.resolveProviderModel = exports2.isClaudeTierAlias = exports2.CLAUDE_TIER_ALIASES = exports2.FAST_MODEL = exports2.CODING_MODEL = exports2.PLANNING_MODEL = exports2.isBuiltinPreset = exports2.BUILTIN_PRESET_IDS = exports2.writeBuiltinAutoReviewValidators = exports2.resolvePrimaryStack = exports2.getSdlcArtifactTemplates = exports2.getBuiltinArtifactTemplates = exports2.phaseArtifactFileName = exports2.sdlcClaudeCommand = exports2.builtinClaudeCommand = exports2.loadAllBuiltinPresets = exports2.loadBuiltinPreset = exports2.planRecipeMigration = exports2.getBuiltinRecipeSummaries = exports2.getAllBuiltinPipelineSummaries = exports2.getSdlcBuiltinPipelineSummary = exports2.getBuiltinPipelineSummary = exports2.getBuiltinWorkflowByPipelineId = void 0;
|
|
32227
|
+
exports2.AIDLC_CORE_VERSION = exports2.AIDLC_CLI_GUIDE_TEXT = exports2.AIDLC_KNOWLEDGE = exports2.clearResolveCommandCache = exports2.resolveCommand = exports2.remapClaudePath = exports2.claudeConfigEnv = exports2.claudeJsonPath = exports2.isDefaultClaudeConfigDir = exports2.claudeConfigDir = exports2.resolveClaudeConfigDir = exports2.defaultClaudeConfigDir = exports2.getClaudeConfigDirOverride = exports2.setClaudeConfigDir = exports2.resolveDeclaredPath = exports2.expandHome = exports2.ProfileLoadError = exports2.UnknownStandardError = exports2.builtinProfiles = exports2.loadActiveProfile = exports2.loadProfile = exports2.listProfileManifests = exports2.resolveStandard = exports2.workspaceStandard = exports2.isBuiltinProfileId = exports2.ProfileSchema = exports2.TRACE_RULES = exports2.PROFILES_DIR = exports2.DEFAULT_PROFILE_ID = exports2.BUILTIN_PROFILE_IDS = exports2.setEpicMemoryHook = void 0;
|
|
32075
32228
|
var WorkspaceSchema_1 = require_WorkspaceSchema();
|
|
32076
32229
|
Object.defineProperty(exports2, "WorkspaceSchema", { enumerable: true, get: function() {
|
|
32077
32230
|
return WorkspaceSchema_1.WorkspaceSchema;
|
|
@@ -32628,6 +32781,19 @@ var require_dist = __commonJS({
|
|
|
32628
32781
|
Object.defineProperty(exports2, "PipelineRunError", { enumerable: true, get: function() {
|
|
32629
32782
|
return PipelineRunner_1.PipelineRunError;
|
|
32630
32783
|
} });
|
|
32784
|
+
var runProgress_1 = require_runProgress();
|
|
32785
|
+
Object.defineProperty(exports2, "deriveRunProgress", { enumerable: true, get: function() {
|
|
32786
|
+
return runProgress_1.deriveRunProgress;
|
|
32787
|
+
} });
|
|
32788
|
+
Object.defineProperty(exports2, "isRunComplete", { enumerable: true, get: function() {
|
|
32789
|
+
return runProgress_1.isRunComplete;
|
|
32790
|
+
} });
|
|
32791
|
+
Object.defineProperty(exports2, "isStepOptional", { enumerable: true, get: function() {
|
|
32792
|
+
return runProgress_1.isStepOptional;
|
|
32793
|
+
} });
|
|
32794
|
+
Object.defineProperty(exports2, "isActiveStatus", { enumerable: true, get: function() {
|
|
32795
|
+
return runProgress_1.isActiveStatus;
|
|
32796
|
+
} });
|
|
32631
32797
|
var budget_1 = require_budget();
|
|
32632
32798
|
Object.defineProperty(exports2, "checkBudget", { enumerable: true, get: function() {
|
|
32633
32799
|
return budget_1.checkBudget;
|
|
@@ -41630,7 +41796,7 @@ var require_package = __commonJS({
|
|
|
41630
41796
|
"package.json"(exports2, module2) {
|
|
41631
41797
|
module2.exports = {
|
|
41632
41798
|
name: "@delete101020/aidlc",
|
|
41633
|
-
version: "4.0.
|
|
41799
|
+
version: "4.0.10",
|
|
41634
41800
|
description: "AIDLC Native CLI, a fork of AIDLC \u2014 drive Claude through the six-stage AI-Native SDLC Playbook: Plan \u2192 Design \u2192 Build \u2192 Test \u2192 Deploy \u2192 Maintain, with artifact gates, requirements traceability, an incident loop back to Plan, and Spec Kit support.",
|
|
41635
41801
|
license: "MIT",
|
|
41636
41802
|
repository: {
|
|
@@ -46447,9 +46613,10 @@ function registerRun(program3) {
|
|
|
46447
46613
|
cmd.command("reject <runId>").description("Reject the current awaiting_review step").requiredOption("--reason <text>", "Why the step was rejected").action((runId, opts, actionCmd) => {
|
|
46448
46614
|
const root = resolveWorkspaceRoot(actionCmd);
|
|
46449
46615
|
const state = requireRun(root, runId);
|
|
46616
|
+
const pipeline = requirePipelineForRun(root, state);
|
|
46450
46617
|
let next;
|
|
46451
46618
|
try {
|
|
46452
|
-
next = (0, import_core13.rejectStep)({ state, reason: opts.reason });
|
|
46619
|
+
next = (0, import_core13.rejectStep)({ state, reason: opts.reason, pipeline });
|
|
46453
46620
|
} catch (err) {
|
|
46454
46621
|
console.error(import_chalk10.default.red(err instanceof Error ? err.message : String(err)));
|
|
46455
46622
|
process.exit(1);
|
|
@@ -46460,18 +46627,23 @@ function registerRun(program3) {
|
|
|
46460
46627
|
console.log(import_chalk10.default.dim(` Reason: ${opts.reason}`));
|
|
46461
46628
|
console.log(import_chalk10.default.dim(` Rerun: aidlc run rerun ${runId} [--feedback "..."]`));
|
|
46462
46629
|
});
|
|
46463
|
-
cmd.command("rerun <runId>").description("Retry
|
|
46630
|
+
cmd.command("rerun <runId>").description("Retry a rejected step (bumps revision, resets to awaiting_work)").option("--feedback <text>", "Notes for the next attempt (stored on the step)").option("--step <idx>", "0-based step index (default: the run's current step)").action((runId, opts, actionCmd) => {
|
|
46464
46631
|
const root = resolveWorkspaceRoot(actionCmd);
|
|
46465
46632
|
const state = requireRun(root, runId);
|
|
46633
|
+
const stepIdx = opts.step === void 0 ? void 0 : Number(opts.step);
|
|
46634
|
+
if (stepIdx !== void 0 && !Number.isInteger(stepIdx)) {
|
|
46635
|
+
console.error(import_chalk10.default.red(`--step must be an integer, got "${opts.step}"`));
|
|
46636
|
+
process.exit(1);
|
|
46637
|
+
}
|
|
46466
46638
|
let next;
|
|
46467
46639
|
try {
|
|
46468
|
-
next = (0, import_core13.rerunStep)({ state, feedback: opts.feedback });
|
|
46640
|
+
next = (0, import_core13.rerunStep)({ state, feedback: opts.feedback, stepIdx });
|
|
46469
46641
|
} catch (err) {
|
|
46470
46642
|
console.error(import_chalk10.default.red(err instanceof Error ? err.message : String(err)));
|
|
46471
46643
|
process.exit(1);
|
|
46472
46644
|
}
|
|
46473
46645
|
saveRunState(root, next, state);
|
|
46474
|
-
const step = next.steps[next.currentStepIdx];
|
|
46646
|
+
const step = next.steps[stepIdx ?? next.currentStepIdx];
|
|
46475
46647
|
console.log(import_chalk10.default.yellow("\u21BA") + ` Rerunning "${step.agent}" (rev ${step.revision})`);
|
|
46476
46648
|
if (opts.feedback) {
|
|
46477
46649
|
console.log(import_chalk10.default.dim(` Feedback: ${opts.feedback}`));
|
|
@@ -46729,6 +46901,11 @@ ${reason}`)),
|
|
|
46729
46901
|
\u2718 Step "${e.agent}" was rejected.`));
|
|
46730
46902
|
info(import_chalk10.default.dim(` Rerun: aidlc run rerun ${e.runId} [--feedback "..."]`));
|
|
46731
46903
|
},
|
|
46904
|
+
onStepSkipped: (e) => {
|
|
46905
|
+
info(import_chalk10.default.yellow(`
|
|
46906
|
+
\u2933 Step "${e.agent}" was rejected \u2014 carrying on.`) + import_chalk10.default.dim(` ${e.reason}`));
|
|
46907
|
+
info(import_chalk10.default.dim(` Want it back? aidlc run rerun ${e.runId} --step ${e.stepIdx}`));
|
|
46908
|
+
},
|
|
46732
46909
|
onAutoReviewStart: (e) => info(import_chalk10.default.bold(`
|
|
46733
46910
|
\u{1F50D} Auto-review: "${e.agent}"`)),
|
|
46734
46911
|
onAutoReviewResult: (e) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delete101020/aidlc",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.10",
|
|
4
4
|
"description": "AIDLC Native CLI, a fork of AIDLC — drive Claude through the six-stage AI-Native SDLC Playbook: Plan → Design → Build → Test → Deploy → Maintain, with artifact gates, requirements traceability, an incident loop back to Plan, and Spec Kit support.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|