@delete101020/aidlc 4.0.11 → 4.0.12
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 +109 -4
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -21018,6 +21018,8 @@ var require_PipelineRunner = __commonJS({
|
|
|
21018
21018
|
exports2.startRun = startRun2;
|
|
21019
21019
|
exports2.canStartStep = canStartStep;
|
|
21020
21020
|
exports2.markStepDone = markStepDone3;
|
|
21021
|
+
exports2.canUndoStepDone = canUndoStepDone;
|
|
21022
|
+
exports2.undoStepDone = undoStepDone;
|
|
21021
21023
|
exports2.submitAutoReviewVerdict = submitAutoReviewVerdict2;
|
|
21022
21024
|
exports2.retryAutoReview = retryAutoReview;
|
|
21023
21025
|
exports2.approveStep = approveStep3;
|
|
@@ -21170,6 +21172,101 @@ var require_PipelineRunner = __commonJS({
|
|
|
21170
21172
|
}
|
|
21171
21173
|
return advance(next, idx, pipeline);
|
|
21172
21174
|
}
|
|
21175
|
+
var UNDOABLE_STATUSES = ["awaiting_auto_review", "awaiting_review", "approved"];
|
|
21176
|
+
function followersOf(pipeline, idx) {
|
|
21177
|
+
const normalized = pipeline.steps.map(WorkspaceSchema_1.normalizeStep);
|
|
21178
|
+
const usesDag = normalized.some((s) => s.depends_on.length > 0);
|
|
21179
|
+
if (!usesDag) {
|
|
21180
|
+
return idx + 1 < normalized.length ? [idx + 1] : [];
|
|
21181
|
+
}
|
|
21182
|
+
const dagId = normalized[idx] ? normalized[idx].name ?? normalized[idx].agent : void 0;
|
|
21183
|
+
if (dagId === void 0) {
|
|
21184
|
+
return [];
|
|
21185
|
+
}
|
|
21186
|
+
const out2 = [];
|
|
21187
|
+
normalized.forEach((s, i) => {
|
|
21188
|
+
if (s.depends_on.includes(dagId)) {
|
|
21189
|
+
out2.push(i);
|
|
21190
|
+
}
|
|
21191
|
+
});
|
|
21192
|
+
return out2;
|
|
21193
|
+
}
|
|
21194
|
+
function canUndoStepDone(args) {
|
|
21195
|
+
const { state, pipeline } = args;
|
|
21196
|
+
const idx = args.stepIdx ?? state.currentStepIdx;
|
|
21197
|
+
const step = state.steps[idx];
|
|
21198
|
+
if (!step) {
|
|
21199
|
+
return { ok: false, reason: `No step at index ${idx}` };
|
|
21200
|
+
}
|
|
21201
|
+
if (!(0, reconcileRun_1.reconcileRunSteps)(state, pipeline).aligned) {
|
|
21202
|
+
return {
|
|
21203
|
+
ok: false,
|
|
21204
|
+
reason: `Run "${state.runId}" no longer matches pipeline "${pipeline.id}" \u2014 reconcile it before undoing anything.`
|
|
21205
|
+
};
|
|
21206
|
+
}
|
|
21207
|
+
if (!UNDOABLE_STATUSES.includes(step.status)) {
|
|
21208
|
+
return {
|
|
21209
|
+
ok: false,
|
|
21210
|
+
reason: `Step "${(0, RunState_1.stepIdentity)(step)}" is "${step.status}" \u2014 there is no "mark done" to undo.`
|
|
21211
|
+
};
|
|
21212
|
+
}
|
|
21213
|
+
if (step.status === "approved") {
|
|
21214
|
+
for (const i of followersOf(pipeline, idx)) {
|
|
21215
|
+
const follower = state.steps[i];
|
|
21216
|
+
if (!follower || follower.status === "pending") {
|
|
21217
|
+
continue;
|
|
21218
|
+
}
|
|
21219
|
+
const untouched = follower.status === "awaiting_work" && follower.artifactsProduced.length === 0;
|
|
21220
|
+
if (!untouched) {
|
|
21221
|
+
return {
|
|
21222
|
+
ok: false,
|
|
21223
|
+
reason: `Step ${i + 1} ("${(0, RunState_1.stepIdentity)(follower)}") has already moved on (${follower.status}) \u2014 undo would silently discard it. Use "Request update" instead.`
|
|
21224
|
+
};
|
|
21225
|
+
}
|
|
21226
|
+
}
|
|
21227
|
+
}
|
|
21228
|
+
return { ok: true };
|
|
21229
|
+
}
|
|
21230
|
+
function undoStepDone(args) {
|
|
21231
|
+
const { pipeline } = args;
|
|
21232
|
+
const state = alignedOrThrow(args.state, pipeline);
|
|
21233
|
+
const idx = args.stepIdx ?? state.currentStepIdx;
|
|
21234
|
+
const gate = canUndoStepDone({ state, pipeline, stepIdx: idx });
|
|
21235
|
+
if (!gate.ok) {
|
|
21236
|
+
throw new PipelineRunError3(gate.reason);
|
|
21237
|
+
}
|
|
21238
|
+
const step = state.steps[idx];
|
|
21239
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
21240
|
+
const next = clone(state);
|
|
21241
|
+
if (step.status === "approved") {
|
|
21242
|
+
for (const i of followersOf(pipeline, idx)) {
|
|
21243
|
+
const follower = next.steps[i];
|
|
21244
|
+
if (!follower || follower.status !== "awaiting_work") {
|
|
21245
|
+
continue;
|
|
21246
|
+
}
|
|
21247
|
+
next.steps[i] = { ...follower, status: "pending", startedAt: void 0 };
|
|
21248
|
+
}
|
|
21249
|
+
}
|
|
21250
|
+
next.steps[idx] = {
|
|
21251
|
+
...next.steps[idx],
|
|
21252
|
+
status: "awaiting_work",
|
|
21253
|
+
finishedAt: void 0,
|
|
21254
|
+
artifactsProduced: [],
|
|
21255
|
+
autoReviewVerdict: void 0,
|
|
21256
|
+
// `startedAt` stays: this is the same attempt at the same step, and the
|
|
21257
|
+
// panel dates the artifact against it to tell "written for this step" from
|
|
21258
|
+
// "inherited from an earlier one".
|
|
21259
|
+
history: pushHistory(step.history, {
|
|
21260
|
+
kind: "undo",
|
|
21261
|
+
at: now,
|
|
21262
|
+
revision: step.revision,
|
|
21263
|
+
from: step.status
|
|
21264
|
+
})
|
|
21265
|
+
};
|
|
21266
|
+
next.currentStepIdx = idx;
|
|
21267
|
+
next.status = "running";
|
|
21268
|
+
return next;
|
|
21269
|
+
}
|
|
21173
21270
|
function submitAutoReviewVerdict2(args) {
|
|
21174
21271
|
const { pipeline, verdict } = args;
|
|
21175
21272
|
const state = alignedOrThrow(args.state, pipeline);
|
|
@@ -30782,6 +30879,8 @@ var require_runReport = __commonJS({
|
|
|
30782
30879
|
return ` - \u{1F916} auto-review ${h.decision} (rev ${h.revision}): ${h.reason}`;
|
|
30783
30880
|
case "approve":
|
|
30784
30881
|
return ` - \u2714 approved (rev ${h.revision})`;
|
|
30882
|
+
case "undo":
|
|
30883
|
+
return ` - \u21B6 mark-done undone (rev ${h.revision}, was ${h.from})`;
|
|
30785
30884
|
default:
|
|
30786
30885
|
return " - (unknown event)";
|
|
30787
30886
|
}
|
|
@@ -32951,9 +33050,9 @@ var require_dist = __commonJS({
|
|
|
32951
33050
|
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.EpicWorkflowSwitchError = exports2.canSwitchEpicWorkflow = exports2.epicWorkflowLock = exports2.applyEpicWorkflowSwitch = exports2.stageEpicWorkflowSwitch = exports2.planEpicWorkflowSwitch = exports2.EpicDescriptionError = exports2.setEpicDescription = exports2.lockedEpicDirError = 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;
|
|
32952
33051
|
exports2.epicPipelinePath = exports2.EPIC_PIPELINE_FILENAME = exports2.unusedAfterStepRemoval = exports2.skillReferences = exports2.agentReferences = exports2.renameSkillRefs = exports2.renameAgentRefs = exports2.dropRecipesForPipeline = exports2.dropRecipeStep = exports2.recipesDrawingFrom = 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 = exports2.parseFollowUps = exports2.FollowUpsParseError = exports2.FollowUpManifestSchema = exports2.FollowUpItemSchema = exports2.SIGNAL_FILE = exports2.FOLLOW_UP_ARTIFACT = exports2.readEpicSignal = exports2.existingEpicIds = exports2.followUpIdFor = void 0;
|
|
32953
33052
|
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 = 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 = void 0;
|
|
32954
|
-
exports2.
|
|
32955
|
-
exports2.
|
|
32956
|
-
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 = 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 = void 0;
|
|
33053
|
+
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.undoStepDone = exports2.canUndoStepDone = 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 = 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 = void 0;
|
|
33054
|
+
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 = 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 = void 0;
|
|
33055
|
+
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 = 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 = void 0;
|
|
32957
33056
|
var WorkspaceSchema_1 = require_WorkspaceSchema();
|
|
32958
33057
|
Object.defineProperty(exports2, "WorkspaceSchema", { enumerable: true, get: function() {
|
|
32959
33058
|
return WorkspaceSchema_1.WorkspaceSchema;
|
|
@@ -33544,6 +33643,12 @@ var require_dist = __commonJS({
|
|
|
33544
33643
|
Object.defineProperty(exports2, "markStepDone", { enumerable: true, get: function() {
|
|
33545
33644
|
return PipelineRunner_1.markStepDone;
|
|
33546
33645
|
} });
|
|
33646
|
+
Object.defineProperty(exports2, "canUndoStepDone", { enumerable: true, get: function() {
|
|
33647
|
+
return PipelineRunner_1.canUndoStepDone;
|
|
33648
|
+
} });
|
|
33649
|
+
Object.defineProperty(exports2, "undoStepDone", { enumerable: true, get: function() {
|
|
33650
|
+
return PipelineRunner_1.undoStepDone;
|
|
33651
|
+
} });
|
|
33547
33652
|
Object.defineProperty(exports2, "approveStep", { enumerable: true, get: function() {
|
|
33548
33653
|
return PipelineRunner_1.approveStep;
|
|
33549
33654
|
} });
|
|
@@ -42580,7 +42685,7 @@ var require_package = __commonJS({
|
|
|
42580
42685
|
"package.json"(exports2, module2) {
|
|
42581
42686
|
module2.exports = {
|
|
42582
42687
|
name: "@delete101020/aidlc",
|
|
42583
|
-
version: "4.0.
|
|
42688
|
+
version: "4.0.12",
|
|
42584
42689
|
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.",
|
|
42585
42690
|
license: "MIT",
|
|
42586
42691
|
repository: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delete101020/aidlc",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12",
|
|
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": {
|