mandrel 2.70.0 → 2.72.0
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/.agents/README.md +8 -9
- package/.agents/agents/acceptance-critic.md +1 -0
- package/.agents/agents/auditor.md +1 -0
- package/.agents/agents/plan-critic.md +1 -0
- package/.agents/agents/story-worker.md +63 -64
- package/.agents/docs/agentrc-reference.json +2 -1
- package/.agents/docs/configuration.md +7 -8
- package/.agents/rules/git-conventions-reference.md +2 -2
- package/.agents/schemas/agentrc.schema.json +19 -2
- package/.agents/schemas/story-deliver-terminal.schema.json +10 -1
- package/.agents/scripts/acceptance-eval.js +194 -15
- package/.agents/scripts/deliver-run.js +92 -43
- package/.agents/scripts/lib/audit-suite/index.js +1 -1
- package/.agents/scripts/lib/audit-suite/story-checklist.js +65 -0
- package/.agents/scripts/lib/audit-to-stories/audit-label-taxonomy.js +2 -2
- package/.agents/scripts/lib/bootstrap/issue-forms-template.js +1 -1
- package/.agents/scripts/lib/cli-args.js +22 -0
- package/.agents/scripts/lib/close-validation/gates.js +17 -3
- package/.agents/scripts/lib/config/agent-models.js +117 -0
- package/.agents/scripts/lib/config-settings-schema-delivery.js +13 -1
- package/.agents/scripts/lib/config-settings-schema-quality.js +1 -1
- package/.agents/scripts/lib/generated/agentrc-validator.js +1 -1
- package/.agents/scripts/lib/git/sync-from-base.js +89 -17
- package/.agents/scripts/lib/label-taxonomy.js +13 -3
- package/.agents/scripts/lib/notifications/notifier.js +11 -15
- package/.agents/scripts/lib/observability/close-telemetry.js +19 -3
- package/.agents/scripts/lib/observability/source-classifier.js +1 -0
- package/.agents/scripts/lib/orchestration/cancelled-run-discount.js +129 -0
- package/.agents/scripts/lib/orchestration/code-review.js +2 -2
- package/.agents/scripts/lib/orchestration/deliver-recover.js +166 -34
- package/.agents/scripts/lib/orchestration/file-assumptions.js +45 -11
- package/.agents/scripts/lib/orchestration/plan-context.js +17 -10
- package/.agents/scripts/lib/orchestration/plan-persist/changes-repair.js +130 -24
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +19 -16
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +1 -0
- package/.agents/scripts/lib/orchestration/plan-persist/summary.js +4 -3
- package/.agents/scripts/lib/orchestration/pr-watch.js +14 -3
- package/.agents/scripts/lib/orchestration/resolve-stories.js +10 -2
- package/.agents/scripts/lib/orchestration/review-providers/native.js +5 -165
- package/.agents/scripts/lib/orchestration/single-story-close/failed-terminal.js +14 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/auto-merge.js +45 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/base-sync.js +162 -58
- package/.agents/scripts/lib/orchestration/single-story-close/phases/confirm-merge.js +58 -6
- package/.agents/scripts/lib/orchestration/single-story-close/phases/merge-wait-recovery.js +296 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/options.js +20 -4
- package/.agents/scripts/lib/orchestration/single-story-close/phases/post-land.js +52 -6
- package/.agents/scripts/lib/orchestration/single-story-close/phases/pull-request.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/story-branch-catch-up.js +50 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/worktree-reap.js +64 -52
- package/.agents/scripts/lib/orchestration/single-story-close/phases/worktree-restore.js +133 -0
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +187 -74
- package/.agents/scripts/lib/orchestration/story-deliver-terminal.js +46 -6
- package/.agents/scripts/lib/orchestration/story-handoff.js +849 -0
- package/.agents/scripts/lib/orchestration/story-init-result.js +83 -0
- package/.agents/scripts/lib/orchestration/task-body-validator.js +35 -5
- package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +1 -1
- package/.agents/scripts/lib/orchestration/ticket-validator.js +20 -2
- package/.agents/scripts/lib/single-story/confirm-merge.js +44 -7
- package/.agents/scripts/lib/story-body/story-body.js +40 -5
- package/.agents/scripts/lib/templates/decomposer-prompts.js +33 -36
- package/.agents/scripts/pr-watch-with-update.js +5 -0
- package/.agents/scripts/single-story-close.js +8 -0
- package/.agents/scripts/single-story-confirm-merge.js +34 -3
- package/.agents/scripts/single-story-init.js +17 -32
- package/.agents/scripts/story-handoff.js +112 -0
- package/.agents/scripts/sync-claude-agents.js +58 -27
- package/.agents/workflows/helpers/acceptance-self-eval.md +24 -18
- package/.agents/workflows/helpers/code-review.md +3 -3
- package/.agents/workflows/helpers/deliver-digest.md +79 -80
- package/.agents/workflows/helpers/deliver-light.md +9 -7
- package/.agents/workflows/helpers/deliver-reference.md +38 -22
- package/.agents/workflows/helpers/deliver-story-reference.md +39 -18
- package/.agents/workflows/helpers/deliver-story.md +30 -23
- package/.agents/workflows/helpers/plan-reference.md +24 -9
- package/.agents/workflows/helpers/worktree-lifecycle.md +5 -5
- package/docs/CHANGELOG.md +31 -0
- package/lib/cli/registry.js +7 -0
- package/package.json +4 -3
- package/.agents/scripts/lib/orchestration/review-providers/scoped-lint.js +0 -272
|
@@ -326,6 +326,34 @@ export function emitTerminalEnvelope(
|
|
|
326
326
|
);
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
+
/**
|
|
330
|
+
* The PR facts every wait ending carries. `autoMergeReason` rides along only
|
|
331
|
+
* when the caller knows it — it is the evidence a later re-arm reads.
|
|
332
|
+
*/
|
|
333
|
+
function prBaseFor({ prNumber, prUrl, autoMergeEnabled, autoMergeReason }) {
|
|
334
|
+
const base = {
|
|
335
|
+
number: prNumber,
|
|
336
|
+
url: prUrl ?? null,
|
|
337
|
+
autoMergeEnabled: Boolean(autoMergeEnabled),
|
|
338
|
+
};
|
|
339
|
+
return autoMergeReason === undefined ? base : { ...base, autoMergeReason };
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* A DIRTY PR the wait could not sync: labels untouched, and re-running close
|
|
344
|
+
* (which re-syncs in the worktree) is the remedy.
|
|
345
|
+
*/
|
|
346
|
+
function failedFromWaitOutcome(waitOutcome, prBase, common) {
|
|
347
|
+
return buildTerminalEnvelope({
|
|
348
|
+
...common,
|
|
349
|
+
status: 'failed',
|
|
350
|
+
phase: waitOutcome.phase ?? 'base-sync',
|
|
351
|
+
pr: { ...prBase, state: waitOutcome.prProbe?.state ?? 'OPEN' },
|
|
352
|
+
failure: { reason: waitOutcome.reason },
|
|
353
|
+
nextCommand: NEXT_COMMANDS.close(common.storyId),
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
|
|
329
357
|
/**
|
|
330
358
|
* Map a `runConfirmMergePhase` outcome onto the terminal envelope; the other
|
|
331
359
|
* fields pass through.
|
|
@@ -337,14 +365,16 @@ export function terminalFromWaitOutcome({
|
|
|
337
365
|
prNumber,
|
|
338
366
|
prUrl,
|
|
339
367
|
autoMergeEnabled,
|
|
368
|
+
autoMergeReason,
|
|
340
369
|
...common
|
|
341
370
|
}) {
|
|
342
371
|
const { storyId } = common;
|
|
343
|
-
const prBase = {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
autoMergeEnabled
|
|
347
|
-
|
|
372
|
+
const prBase = prBaseFor({
|
|
373
|
+
prNumber,
|
|
374
|
+
prUrl,
|
|
375
|
+
autoMergeEnabled,
|
|
376
|
+
autoMergeReason,
|
|
377
|
+
});
|
|
348
378
|
|
|
349
379
|
if (waitOutcome.terminal === 'landed') {
|
|
350
380
|
return buildTerminalEnvelope({
|
|
@@ -377,7 +407,17 @@ export function terminalFromWaitOutcome({
|
|
|
377
407
|
});
|
|
378
408
|
}
|
|
379
409
|
|
|
380
|
-
|
|
410
|
+
if (waitOutcome.terminal === 'failed') {
|
|
411
|
+
return failedFromWaitOutcome(waitOutcome, prBase, common);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
return blockedFromWaitOutcome(waitOutcome, prBase, common);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/** Mirrors the classifier's remediation, never a second opinion. */
|
|
418
|
+
function blockedFromWaitOutcome(waitOutcome, prBase, common) {
|
|
419
|
+
const { storyId } = common;
|
|
420
|
+
const prNumber = prBase.number;
|
|
381
421
|
const nextCommand =
|
|
382
422
|
waitOutcome.blockClass === 'checks-failed'
|
|
383
423
|
? NEXT_COMMANDS.watchCi(storyId, prNumber)
|