mandrel 2.36.0 → 2.38.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 +16 -16
- package/.agents/agents/plan-critic.md +1 -1
- package/.agents/docs/SDLC.md +40 -40
- package/.agents/docs/configuration.md +41 -16
- package/.agents/docs/execution-reference.md +3 -3
- package/.agents/docs/quality-gates.md +2 -2
- package/.agents/docs/workflows.md +6 -6
- package/.agents/instructions.md +5 -5
- package/.agents/rules/changelog-style.md +3 -3
- package/.agents/rules/ci-remediation.md +1 -1
- package/.agents/rules/git-conventions-reference.md +4 -4
- package/.agents/rules/testing-standards.md +56 -0
- package/.agents/schemas/agentrc.schema.json +9 -9
- package/.agents/schemas/story-deliver-terminal.schema.json +2 -2
- package/.agents/schemas/validation-evidence.schema.json +1 -1
- package/.agents/scripts/acceptance-eval.js +1 -1
- package/.agents/scripts/apply-quality-bootstrap.js +1 -1
- package/.agents/scripts/audit-to-stories.js +2 -2
- package/.agents/scripts/boot-sweep.js +7 -1
- package/.agents/scripts/check-context-budget.js +195 -103
- package/.agents/scripts/check-cyclomatic.js +112 -42
- package/.agents/scripts/check-doc-links.js +32 -4
- package/.agents/scripts/check-generated-validator.js +202 -0
- package/.agents/scripts/check-lifecycle-lint.js +2 -68
- package/.agents/scripts/check-schema-references.js +2 -28
- package/.agents/scripts/check-test-temp-hygiene.js +1 -1
- package/.agents/scripts/check-workflow-cli-lint.js +1 -1
- package/.agents/scripts/deliver-light.js +10 -10
- package/.agents/scripts/deliver-recover.js +1 -1
- package/.agents/scripts/drain-pending-cleanup.js +19 -2
- package/.agents/scripts/evidence-gate.js +1 -1
- package/.agents/scripts/generate-workflows-doc.js +1 -1
- package/.agents/scripts/lib/audit-suite/selector.js +1 -1
- package/.agents/scripts/lib/audit-to-stories/audit-label-taxonomy.js +1 -1
- package/.agents/scripts/lib/audit-to-stories/build-story-body.js +1 -1
- package/.agents/scripts/lib/audit-to-stories/seed-from-findings.js +5 -5
- package/.agents/scripts/lib/audit-to-stories/wire-dependencies.js +1 -1
- package/.agents/scripts/lib/baselines/components.js +32 -2
- package/.agents/scripts/lib/baselines/env-overrides.js +1 -1
- package/.agents/scripts/lib/bdd-runner-detect.js +1 -1
- package/.agents/scripts/lib/bdd-scenario-budget.js +1 -1
- package/.agents/scripts/lib/bdd-scenario-scanner.js +3 -3
- package/.agents/scripts/lib/bdd-step-index.js +1 -1
- package/.agents/scripts/lib/bootstrap/branch-protection.js +2 -2
- package/.agents/scripts/lib/bootstrap/commit-push.js +2 -2
- package/.agents/scripts/lib/bootstrap/install-ledger.js +1 -1
- package/.agents/scripts/lib/bootstrap/issue-forms-template.js +1 -1
- package/.agents/scripts/lib/bootstrap/prompt.js +1 -1
- package/.agents/scripts/lib/bootstrap/quality-bootstrap.js +2 -2
- package/.agents/scripts/lib/checks/core-bare-clean.js +1 -1
- package/.agents/scripts/lib/checks/loop-health.js +1 -1
- package/.agents/scripts/lib/checks/story-init-not-backgrounded.js +1 -1
- package/.agents/scripts/lib/cli-args.js +1 -3
- package/.agents/scripts/lib/close-validation/gates.js +1 -1
- package/.agents/scripts/lib/close-validation/process.js +1 -1
- package/.agents/scripts/lib/command-header.js +1 -1
- package/.agents/scripts/lib/config/delivery-routing.js +1 -1
- package/.agents/scripts/lib/config/explain.js +1 -1
- package/.agents/scripts/lib/config/runners.js +2 -2
- package/.agents/scripts/lib/config/runtime.js +1 -1
- package/.agents/scripts/lib/config/sync-agentrc.js +1 -1
- package/.agents/scripts/lib/config/temp-paths.js +2 -2
- package/.agents/scripts/lib/config-settings-schema-delivery.js +3 -3
- package/.agents/scripts/lib/config-settings-schema-quality.js +6 -6
- package/.agents/scripts/lib/config-settings-schema.js +49 -9
- package/.agents/scripts/lib/coverage-baseline.js +2 -2
- package/.agents/scripts/lib/cpu-pool.js +90 -10
- package/.agents/scripts/lib/crap-utils.js +6 -2
- package/.agents/scripts/lib/cyclomatic-ceiling.js +28 -6
- package/.agents/scripts/lib/cyclomatic-scope.js +144 -0
- package/.agents/scripts/lib/dependency-version.js +86 -0
- package/.agents/scripts/lib/duplicate-search.js +2 -2
- package/.agents/scripts/lib/errors/index.js +1 -1
- package/.agents/scripts/lib/feedback-loop/graduator-core.js +2 -2
- package/.agents/scripts/lib/feedback-loop/prior-feedback-fetcher.js +5 -5
- package/.agents/scripts/lib/feedback-loop/retro-proposals-graduator.js +2 -2
- package/.agents/scripts/lib/findings/classify-finding.js +1 -1
- package/.agents/scripts/lib/findings/promote-finding.js +12 -12
- package/.agents/scripts/lib/findings/route-finding.js +2 -2
- package/.agents/scripts/lib/generated/agentrc-validator.js +16 -0
- package/.agents/scripts/lib/git-branch-lifecycle.js +2 -2
- package/.agents/scripts/lib/install-cmd-parser.js +1 -1
- package/.agents/scripts/lib/knip-entry-sync.js +1 -57
- package/.agents/scripts/lib/label-constants.js +2 -2
- package/.agents/scripts/lib/label-taxonomy.js +1 -1
- package/.agents/scripts/lib/maintainability-utils.js +108 -10
- package/.agents/scripts/lib/observability/source-classifier.js +1 -0
- package/.agents/scripts/lib/onboard/init-tail.js +4 -4
- package/.agents/scripts/lib/onboard/scaffold-docs.js +2 -2
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +1 -1
- package/.agents/scripts/lib/orchestration/code-review.js +4 -4
- package/.agents/scripts/lib/orchestration/complexity-gate.js +5 -5
- package/.agents/scripts/lib/orchestration/deliver-recover.js +3 -3
- package/.agents/scripts/lib/orchestration/docs-digest.js +3 -3
- package/.agents/scripts/lib/orchestration/lease-guard-shared.js +2 -2
- package/.agents/scripts/lib/orchestration/light-backstop.js +1 -1
- package/.agents/scripts/lib/orchestration/light-escalation.js +6 -6
- package/.agents/scripts/lib/orchestration/light-suitability.js +19 -19
- package/.agents/scripts/lib/orchestration/plan-context.js +4 -4
- package/.agents/scripts/lib/orchestration/plan-critic-conditions.js +2 -2
- package/.agents/scripts/lib/orchestration/plan-critics-evaluate.js +2 -2
- package/.agents/scripts/lib/orchestration/plan-metrics.js +1 -1
- package/.agents/scripts/lib/orchestration/plan-persist/persist-helpers.js +1 -1
- package/.agents/scripts/lib/orchestration/plan-persist/plan-context-source.js +3 -3
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +6 -6
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +86 -25
- package/.agents/scripts/lib/orchestration/plan-persist/summary.js +3 -3
- package/.agents/scripts/lib/orchestration/plan-persist/supersede-ops.js +6 -6
- package/.agents/scripts/lib/orchestration/planning/authoring-context.js +7 -7
- package/.agents/scripts/lib/orchestration/planning/decomposer-context.js +1 -1
- package/.agents/scripts/lib/orchestration/planning/memory-pool-advisory.js +3 -3
- package/.agents/scripts/lib/orchestration/pr-watch.js +1 -30
- package/.agents/scripts/lib/orchestration/reassert-status-column.js +2 -2
- package/.agents/scripts/lib/orchestration/remote-verifier.js +2 -2
- package/.agents/scripts/lib/orchestration/resolve-stories.js +4 -4
- package/.agents/scripts/lib/orchestration/review-providers/codex.js +3 -3
- package/.agents/scripts/lib/orchestration/review-providers/findings-renderer.js +1 -1
- package/.agents/scripts/lib/orchestration/review-providers/native.js +9 -2
- package/.agents/scripts/lib/orchestration/review-providers/review-depth.js +2 -2
- package/.agents/scripts/lib/orchestration/review-providers/security-review.js +3 -3
- package/.agents/scripts/lib/orchestration/run-epilogue.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/base-sync.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/conventional-subject.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/normalize-pr-title.js +5 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/options.js +52 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-block.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/wrong-tree-guard.js +3 -3
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-lease-guard.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/format-autofix.js +2 -5
- package/.agents/scripts/lib/orchestration/story-deliver-terminal.js +14 -12
- package/.agents/scripts/lib/orchestration/story-follow-ups.js +1 -1
- package/.agents/scripts/lib/orchestration/ticket-lease.js +34 -9
- package/.agents/scripts/lib/orchestration/ticket-validator.js +1 -1
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +6 -4
- package/.agents/scripts/lib/plan-phase-cleanup.js +1 -1
- package/.agents/scripts/lib/preflight-runner.js +3 -3
- package/.agents/scripts/lib/qa/qa-session.js +1 -1
- package/.agents/scripts/lib/runtime-deps/manifest.js +1 -7
- package/.agents/scripts/lib/runtime-deps/scan-imports.js +3 -58
- package/.agents/scripts/lib/signals/schema.js +1 -1
- package/.agents/scripts/lib/single-story-sweep/sweep-lock.js +284 -25
- package/.agents/scripts/lib/skills/walk-skill-files.js +1 -1
- package/.agents/scripts/lib/source-text/strip-js-comments.js +115 -0
- package/.agents/scripts/lib/story-adjacency.js +2 -2
- package/.agents/scripts/lib/templates/decomposer-prompts.js +1 -1
- package/.agents/scripts/lib/test-isolate/runner.js +3 -3
- package/.agents/scripts/lib/test-runner-contract.js +14 -6
- package/.agents/scripts/lib/test-tiers.js +135 -18
- package/.agents/scripts/lib/ticket-body-sections.js +1 -1
- package/.agents/scripts/lib/transpile.js +16 -3
- package/.agents/scripts/lib/util/concurrent-map.js +1 -1
- package/.agents/scripts/lib/util/parse-id-list.js +1 -1
- package/.agents/scripts/lib/wave-runner/live-probe.js +4 -4
- package/.agents/scripts/lib/wave-runner/ready-set.js +1 -1
- package/.agents/scripts/lib/workflow-closure.js +1 -1
- package/.agents/scripts/lib/worktree/lifecycle/pending-cleanup.js +170 -32
- package/.agents/scripts/lib/worktree/node-modules-strategy.js +2 -5
- package/.agents/scripts/lint-issue-body.js +3 -3
- package/.agents/scripts/plan-context.js +4 -4
- package/.agents/scripts/plan-critics.js +2 -2
- package/.agents/scripts/plan-persist.js +2 -2
- package/.agents/scripts/plan-run-epilogue.js +2 -2
- package/.agents/scripts/pr-watch-with-update.js +305 -137
- package/.agents/scripts/providers/github/board-add.js +1 -1
- package/.agents/scripts/providers/github/errors.js +1 -1
- package/.agents/scripts/providers/github/tickets.js +114 -21
- package/.agents/scripts/quality-preview.js +162 -70
- package/.agents/scripts/resolve-stories.js +3 -3
- package/.agents/scripts/resync-status-column.js +1 -1
- package/.agents/scripts/run-lint.js +1 -1
- package/.agents/scripts/run-test-profile.js +8 -5
- package/.agents/scripts/run-tests.js +79 -14
- package/.agents/scripts/single-story-close.js +2 -4
- package/.agents/scripts/single-story-init.js +10 -6
- package/.agents/scripts/stories-wave-tick.js +8 -8
- package/.agents/skills/core/idea-refinement/SKILL.md +5 -5
- package/.agents/skills/core/scope-triage/SKILL.md +3 -3
- package/.agents/skills/skills.index.json +1 -1
- package/.agents/skills/stack/qa/qa-harness/SKILL.md +1 -1
- package/.agents/workflows/audit-data-model.md +1 -1
- package/.agents/workflows/audit-documentation.md +2 -2
- package/.agents/workflows/audit-to-stories.md +11 -11
- package/.agents/workflows/git-deliver.md +4 -4
- package/.agents/workflows/helpers/_merge-conflict-template.md +1 -1
- package/.agents/workflows/helpers/audit-lens-core.md +1 -1
- package/.agents/workflows/helpers/code-review.md +4 -4
- package/.agents/workflows/helpers/deliver-light.md +26 -26
- package/.agents/workflows/helpers/deliver-reference.md +15 -7
- package/.agents/workflows/helpers/deliver-story-reference.md +9 -4
- package/.agents/workflows/helpers/deliver-story.md +6 -7
- package/.agents/workflows/helpers/diagnose.md +2 -2
- package/.agents/workflows/helpers/parallel-tooling.md +1 -1
- package/.agents/workflows/helpers/plan-reference.md +9 -9
- package/.agents/workflows/helpers/qa-core.md +8 -8
- package/.agents/workflows/helpers/worktree-lifecycle.md +6 -6
- package/.agents/workflows/{deliver.md → mandrel-deliver.md} +15 -19
- package/.agents/workflows/{plan.md → mandrel-plan.md} +9 -9
- package/.agents/workflows/memory-consolidate.md +4 -4
- package/.agents/workflows/prototype.md +3 -3
- package/.agents/workflows/qa-assist.md +12 -12
- package/.agents/workflows/qa-explore.md +6 -6
- package/.agents/workflows/qa-run.md +1 -1
- package/README.md +7 -7
- package/docs/CHANGELOG.md +43 -0
- package/lib/cli/doctor.js +1 -1
- package/lib/cli/init.js +1 -1
- package/lib/cli/migrate.js +100 -94
- package/lib/migrations/helpers/retire-agentrc-key.js +200 -0
- package/lib/migrations/index.js +32 -33
- package/lib/migrations/steps/2.1.0-retire-mi-drop-knobs.js +21 -80
- package/lib/migrations/steps/2.1.0-retire-verify-concurrency-cap.js +15 -87
- package/lib/migrations/steps/2.11.0-retire-max-seed-words.js +13 -71
- package/lib/migrations/steps/2.2.0-retire-epic-ac-tags.js +1 -1
- package/lib/migrations/steps/2.20.0-retire-codebase-snapshot.js +13 -101
- package/lib/migrations/steps/2.32.0-retire-lint-baseline-command.js +13 -100
- package/package.json +7 -3
- package/.agents/scripts/lib/audit-suite/frontmatter-lint.js +0 -32
- package/.agents/scripts/lib/baselines/maintainability-baseline-save.js +0 -37
- package/.agents/scripts/lib/cli/parse-numeric.js +0 -60
- package/.agents/scripts/lib/close-validation/telemetry.js +0 -79
- package/.agents/scripts/lib/orchestration/label-transitions.js +0 -44
- package/.agents/scripts/lib/orchestration/parked-follow-ons.js +0 -147
- package/.agents/scripts/lib/orchestration/phase-runner.js +0 -88
- package/.agents/scripts/lib/orchestration/recut.js +0 -56
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* single-story-close.js — Close a Story against `main` (v2 `/deliver` path).
|
|
4
|
+
* single-story-close.js — Close a Story against `main` (v2 `/mandrel-deliver` path).
|
|
5
5
|
*
|
|
6
|
-
* Thin CLI entry for `/deliver` / `helpers/deliver-story`. Opens a PR from
|
|
6
|
+
* Thin CLI entry for `/mandrel-deliver` / `helpers/deliver-story`. Opens a PR from
|
|
7
7
|
* `story-<id>` to `project.baseBranch`, runs Story-scope review, and arms
|
|
8
8
|
* auto-merge. There is no Epic parent, epic-merge-lock, or wave merge.
|
|
9
9
|
*
|
|
@@ -237,8 +237,6 @@ runAsCli(import.meta.url, main, {
|
|
|
237
237
|
// the point of this flag is that arming stays on the one code path.
|
|
238
238
|
'Land despite a Story-scope code-review CRITICAL blocker you have reviewed and judged wrong. The reason is mandatory (≥12 chars) and is recorded on the Story, on the PR, and as a `review-block-overridden` friction signal; the terminal envelope reports `gates.codeReview: "overridden"`. Use this instead of merging the PR by hand with the GitHub CLI — a hand-merge bypasses the gate with no record at all.',
|
|
239
239
|
],
|
|
240
|
-
['--no-evidence', 'Do not reuse or write gate evidence stamps.'],
|
|
241
|
-
['--dry-run', 'Report the plan; mutate nothing.'],
|
|
242
240
|
],
|
|
243
241
|
notes: [
|
|
244
242
|
'Exit codes:\n 0 landed\n 1 blocked or failed\n 3 pending (resumable — run the envelope’s nextCommand)',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* node:coverage ignore file */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* single-story-init.js — Initialize a Story for v2 `/deliver`.
|
|
5
|
+
* single-story-init.js — Initialize a Story for v2 `/mandrel-deliver`.
|
|
6
6
|
*
|
|
7
7
|
* Seeds `story-<id>` from `project.baseBranch` (default `main`), materialises
|
|
8
8
|
* the per-Story worktree when isolation is enabled, upserts a `story-init`
|
|
@@ -73,6 +73,7 @@ import {
|
|
|
73
73
|
} from './lib/orchestration/ticketing.js';
|
|
74
74
|
import { createProvider } from './lib/provider-factory.js';
|
|
75
75
|
import { buildProtectionCtx } from './lib/single-story-sweep/protection-ctx.js';
|
|
76
|
+
import { resolveSweepLockPath } from './lib/single-story-sweep/sweep-lock.js';
|
|
76
77
|
// `sweepMergedStoryBranches` is imported dynamically below — its transitive
|
|
77
78
|
// graph reaches `picomatch` (via `git-cleanup.js`). Loading it statically
|
|
78
79
|
// would crash module resolution before `assertDepsInstalled()` can emit a
|
|
@@ -121,7 +122,7 @@ export function assertDeliverableStory(story, storyId) {
|
|
|
121
122
|
if (!story.labels.includes(TYPE_LABELS.STORY)) {
|
|
122
123
|
throw new Error(
|
|
123
124
|
`Issue #${storyId} is not a Story (labels: ${story.labels.join(', ')}). ` +
|
|
124
|
-
'v2 /deliver accepts type::story tickets only.',
|
|
125
|
+
'v2 /mandrel-deliver accepts type::story tickets only.',
|
|
125
126
|
);
|
|
126
127
|
}
|
|
127
128
|
if (story.state === 'closed') {
|
|
@@ -131,7 +132,7 @@ export function assertDeliverableStory(story, storyId) {
|
|
|
131
132
|
if (/\b(?:Epic|Parent):\s*#\d+/i.test(body)) {
|
|
132
133
|
throw new Error(
|
|
133
134
|
`Story #${storyId} still declares an Epic/Parent footer. ` +
|
|
134
|
-
'v2 delivery is Story-only — re-plan as a standalone Story before /deliver.',
|
|
135
|
+
'v2 delivery is Story-only — re-plan as a standalone Story before /mandrel-deliver.',
|
|
135
136
|
);
|
|
136
137
|
}
|
|
137
138
|
}
|
|
@@ -188,7 +189,7 @@ export async function assertNotForeignExecuting({
|
|
|
188
189
|
(lease.previousOwner
|
|
189
190
|
? ` (assignee @${lease.previousOwner})`
|
|
190
191
|
: ' with no assignee') +
|
|
191
|
-
'. Another /deliver run may already own it. Confirm that run is dead, ' +
|
|
192
|
+
'. Another /mandrel-deliver run may already own it. Confirm that run is dead, ' +
|
|
192
193
|
'then re-run with --steal to take it.',
|
|
193
194
|
);
|
|
194
195
|
}
|
|
@@ -292,6 +293,9 @@ export function decideStoryBranchSeed({ localHas, remoteHas }) {
|
|
|
292
293
|
* in `sweep.protected` for the operator).
|
|
293
294
|
* - Cross-session lock: a single lockfile under `tempRoot` prevents
|
|
294
295
|
* two concurrent `/single-story-deliver` invocations from racing.
|
|
296
|
+
* Story #5112 made that lockfile shared with `boot-sweep.js` — the
|
|
297
|
+
* other entry point into the same merged-branch reap — by routing
|
|
298
|
+
* both through `resolveSweepLockPath`.
|
|
295
299
|
*
|
|
296
300
|
* Exported for testing.
|
|
297
301
|
*/
|
|
@@ -307,7 +311,7 @@ export async function reapMergedStoryBranches({
|
|
|
307
311
|
injectedSweep ??
|
|
308
312
|
(await import('./lib/single-story-sweep.js')).sweepMergedStoryBranches;
|
|
309
313
|
const tempRoot = config?.project?.paths?.tempRoot ?? 'temp';
|
|
310
|
-
const lockPath =
|
|
314
|
+
const lockPath = resolveSweepLockPath({ cwd, tempRoot });
|
|
311
315
|
const lockTimeoutMs =
|
|
312
316
|
config.delivery?.worktreeIsolation?.sweepLockMs ?? 60_000;
|
|
313
317
|
try {
|
|
@@ -603,7 +607,7 @@ export async function runSingleStoryInit({
|
|
|
603
607
|
);
|
|
604
608
|
progress('INIT', `Initializing standalone Story #${storyId}...`);
|
|
605
609
|
|
|
606
|
-
// Issue #4483 — deterministic remote evidence at the v2 `/deliver` entry
|
|
610
|
+
// Issue #4483 — deterministic remote evidence at the v2 `/mandrel-deliver` entry
|
|
607
611
|
// seam (`single-story-init.js`). The
|
|
608
612
|
// probe is read-only, so it runs under --dry-run too. The CLI records
|
|
609
613
|
// the fact; the workflow owns the `agent::blocked` transition on
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* stories-wave-tick.js — continuous ready-set planner for the standalone
|
|
5
|
-
* `/deliver` story-list path.
|
|
5
|
+
* `/mandrel-deliver` story-list path.
|
|
6
6
|
*
|
|
7
7
|
* Thin **adapter** over the path-agnostic ready-set scheduling core
|
|
8
8
|
* (`lib/wave-runner/ready-set.js#planReadySet`). It emits the set of
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* **Two modes, one kernel.**
|
|
22
22
|
*
|
|
23
23
|
* - **Probe mode** (`--stories <csv> --probe-live [--dispatched <csv>]`) is
|
|
24
|
-
* the canonical `/deliver` beat: the graph, the done set, and the in-flight
|
|
24
|
+
* the canonical `/mandrel-deliver` beat: the graph, the done set, and the in-flight
|
|
25
25
|
* count are resolved from **live state** via `lib/wave-runner/live-probe.js`.
|
|
26
26
|
* The caller supplies ids, so there is no accounting to hand-maintain
|
|
27
27
|
* across beats — the seed-the-first-beat's-`--done` footgun the workflow
|
|
@@ -97,14 +97,14 @@
|
|
|
97
97
|
* `--done` and `ready` is empty.
|
|
98
98
|
*
|
|
99
99
|
* The per-beat concurrency cap is resolved from the same config seam
|
|
100
|
-
* `/deliver` uses — `resolveConfig` + `getRunners` reading
|
|
100
|
+
* `/mandrel-deliver` uses — `resolveConfig` + `getRunners` reading
|
|
101
101
|
* `delivery.deliverRunner.concurrencyCap` (default 3) — so a
|
|
102
102
|
* `.agentrc.local.json` override is honored. A `--concurrency <n>` CLI flag
|
|
103
103
|
* overrides the config-resolved value for that run only, and the envelope's
|
|
104
104
|
* `capPrecedence` names which source won so the override is never silent
|
|
105
105
|
* (Story #4875). This shares one
|
|
106
106
|
* deterministic config source (`delivery.deliverRunner.concurrencyCap`) and
|
|
107
|
-
* one scheduling kernel with every `/deliver` multi-Story invocation.
|
|
107
|
+
* one scheduling kernel with every `/mandrel-deliver` multi-Story invocation.
|
|
108
108
|
*
|
|
109
109
|
* Exit codes: 0 ok · 1 input error · 2 dependency cycle (`cycleError`) ·
|
|
110
110
|
* 3 wedged (`wedged`) — ready is empty, nothing is in flight, and undone
|
|
@@ -170,7 +170,7 @@ and the same file-overlap guard as planReadySet.
|
|
|
170
170
|
|
|
171
171
|
Two modes:
|
|
172
172
|
--probe-live Resolve the graph and derive done / in-flight from LIVE state
|
|
173
|
-
(the canonical /deliver beat). Nothing is hand-maintained
|
|
173
|
+
(the canonical /mandrel-deliver beat). Nothing is hand-maintained
|
|
174
174
|
across beats. Mutually exclusive with --dag/--dag-file/--done/
|
|
175
175
|
--in-flight. Adds "done" and "epilogueDue" to the envelope.
|
|
176
176
|
--dag Legacy flag mode: the caller supplies the graph and the run
|
|
@@ -662,7 +662,7 @@ export function parseConcurrencyOverride(raw) {
|
|
|
662
662
|
/**
|
|
663
663
|
* Resolve the per-beat concurrency cap.
|
|
664
664
|
*
|
|
665
|
-
* Mirrors the `/deliver` multi-Story seam (`helpers/deliver-story.md`): resolve the
|
|
665
|
+
* Mirrors the `/mandrel-deliver` multi-Story seam (`helpers/deliver-story.md`): resolve the
|
|
666
666
|
* project config (which deep-merges `.agentrc.local.json` over `.agentrc.json`)
|
|
667
667
|
* then read `delivery.deliverRunner.concurrencyCap` via `getRunners` (default
|
|
668
668
|
* 3). An explicit `override` (the `--concurrency <n>` CLI flag) wins over
|
|
@@ -855,7 +855,7 @@ export function buildReadySetEnvelope(
|
|
|
855
855
|
return {
|
|
856
856
|
envelope: {
|
|
857
857
|
...base,
|
|
858
|
-
cycleError: `Dependency cycle detected: ${cycle.join(' → ')}. Fix the depends_on declarations before running /deliver.`,
|
|
858
|
+
cycleError: `Dependency cycle detected: ${cycle.join(' → ')}. Fix the depends_on declarations before running /mandrel-deliver.`,
|
|
859
859
|
},
|
|
860
860
|
exitCode: 2,
|
|
861
861
|
};
|
|
@@ -1087,7 +1087,7 @@ export function runStoriesWaveTick({
|
|
|
1087
1087
|
*
|
|
1088
1088
|
* This is the flag-free beat. The caller supplies only the Story ids it was
|
|
1089
1089
|
* asked to deliver; `done` and `inFlight` are probed rather than transcribed,
|
|
1090
|
-
* which is what makes the `/deliver` loop's old seed-the-first-beat footgun
|
|
1090
|
+
* which is what makes the `/mandrel-deliver` loop's old seed-the-first-beat footgun
|
|
1091
1091
|
* structurally impossible instead of merely documented.
|
|
1092
1092
|
*
|
|
1093
1093
|
* The envelope is the flag mode's, plus three probe-only fields the caller can
|
|
@@ -13,7 +13,7 @@ description:
|
|
|
13
13
|
- Phase 1 MUST restate the idea as a "How Might We" statement, ask 3–5 sharpening questions via `AskUserQuestion`, and generate 5–8 variations (never 20+ shallow ones) — each carrying a reason it exists, told as a short story, not a bare bullet. Do not proceed until target user and success criteria are explicit.
|
|
14
14
|
- Phase 2 grill loop poses **one** question at a time, each with a recommended answer + one-line rationale grounded in user input / codebase / first principles; never batch questions and never omit the recommendation.
|
|
15
15
|
- Re-enumerate open branches after every grill answer; stop only when no unresolved decisions remain. Take the off-ramp directly to Phase 3 when the idea is already crisply scoped. A branch consciously deferred rather than resolved records its deferral reason.
|
|
16
|
-
- Phase 3 emits a markdown one-pager with the canonical five planning headings exactly: `## Context`, `## Goal`, `## Non-Goals`, `## Scope`, `## Acceptance Criteria` (plus optional `## Open Questions`). No alternate heading text — the `/plan` clarity gate depends on this verbatim.
|
|
16
|
+
- Phase 3 emits a markdown one-pager with the canonical five planning headings exactly: `## Context`, `## Goal`, `## Non-Goals`, `## Scope`, `## Acceptance Criteria` (plus optional `## Open Questions`). No alternate heading text — the `/mandrel-plan` clarity gate depends on this verbatim.
|
|
17
17
|
- Surface every key assumption inside `## Context` (or `## Scope`); assumptions do not get their own heading. Unresolved decisions MUST NOT carry into the one-pager.
|
|
18
18
|
- The `## Non-Goals` list is mandatory and each entry includes a reason — focus is created by explicit exclusion.
|
|
19
19
|
- Be honest, not supportive: push back on weak ideas with kindness; never function as a yes-machine.
|
|
@@ -22,10 +22,10 @@ description:
|
|
|
22
22
|
|
|
23
23
|
## Activation
|
|
24
24
|
|
|
25
|
-
Called from [`/plan`](../../../workflows/plan.md) during ideation when the
|
|
25
|
+
Called from [`/mandrel-plan`](../../../workflows/mandrel-plan.md) during ideation when the
|
|
26
26
|
operator supplies `--seed "<text>"` (or runs ideation with no seed and the host
|
|
27
27
|
collects one interactively). The skill sharpens freeform intent into the
|
|
28
|
-
canonical planning sections that `/plan` then folds into a Story. There is no
|
|
28
|
+
canonical planning sections that `/mandrel-plan` then folds into a Story. There is no
|
|
29
29
|
separate Epic Clarity Gate path in v2 — N=1 Story authoring with a folded
|
|
30
30
|
`## Spec` is the lean default.
|
|
31
31
|
|
|
@@ -134,9 +134,9 @@ clothes — inside the grill loop, not after the one-pager is written.
|
|
|
134
134
|
#### Phase 3: Sharpen & Ship
|
|
135
135
|
|
|
136
136
|
Produce a markdown one-pager that moves work forward. The five canonical
|
|
137
|
-
headings below match `.agents/templates/epic-from-idea.md` and the `/plan`
|
|
137
|
+
headings below match `.agents/templates/epic-from-idea.md` and the `/mandrel-plan`
|
|
138
138
|
clarity gate; emit them verbatim so the renderer can substitute the body into a
|
|
139
|
-
`/plan` Story seed without translation.
|
|
139
|
+
`/mandrel-plan` Story seed without translation.
|
|
140
140
|
|
|
141
141
|
```markdown
|
|
142
142
|
# [Idea Name]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scope-triage
|
|
3
3
|
description:
|
|
4
|
-
Optional split-advisory for `/plan`. Under v2 there is no epic|story routing
|
|
5
|
-
verdict — `/plan` always authors Stories. Use this skill only when judging
|
|
4
|
+
Optional split-advisory for `/mandrel-plan`. Under v2 there is no epic|story routing
|
|
5
|
+
verdict — `/mandrel-plan` always authors Stories. Use this skill only when judging
|
|
6
6
|
whether a draft should stay one Story or legitimately split (near-zero
|
|
7
7
|
overlap or an architectural seam).
|
|
8
8
|
---
|
|
@@ -11,7 +11,7 @@ description:
|
|
|
11
11
|
|
|
12
12
|
## Policy Capsule
|
|
13
13
|
|
|
14
|
-
- There is **no** `epic | story | borderline` routing verdict in v2. `/plan`
|
|
14
|
+
- There is **no** `epic | story | borderline` routing verdict in v2. `/mandrel-plan`
|
|
15
15
|
is a single path that emits **one Story by default**.
|
|
16
16
|
- This skill is an optional **split advisory**: should the author keep one
|
|
17
17
|
Story, or does the seed clear the default-single split policy?
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"tier": "core",
|
|
98
98
|
"category": "core",
|
|
99
99
|
"path": ".agents/skills/core/scope-triage/SKILL.md",
|
|
100
|
-
"description": "Optional split-advisory for `/plan`. Under v2 there is no epic|story routing verdict — `/plan` always authors Stories. Use this skill only when judging whether a draft should stay one Story or legitimately split (near-zero overlap or an architectural seam).",
|
|
100
|
+
"description": "Optional split-advisory for `/mandrel-plan`. Under v2 there is no epic|story routing verdict — `/mandrel-plan` always authors Stories. Use this skill only when judging whether a draft should stay one Story or legitimately split (near-zero overlap or an architectural seam).",
|
|
101
101
|
"policyCapsuleBullets": 5,
|
|
102
102
|
"allowedTools": null,
|
|
103
103
|
"vendor": null
|
|
@@ -170,7 +170,7 @@ Record each `F#` finding as a `QaLedgerItem` on the shared session ledger under
|
|
|
170
170
|
`temp/qa/`, then route the ledger through the shared classify → route →
|
|
171
171
|
disposition → promote core — both stated once in
|
|
172
172
|
[`qa-core.md`](../../../../workflows/helpers/qa-core.md). The harness **MUST
|
|
173
|
-
NOT** create tickets autonomously: findings are promoted through `/plan` only
|
|
173
|
+
NOT** create tickets autonomously: findings are promoted through `/mandrel-plan` only
|
|
174
174
|
after the operator confirms each disposition at the HITL write gate. That gate
|
|
175
175
|
is the safety boundary against spurious filing.
|
|
176
176
|
|
|
@@ -27,7 +27,7 @@ than empty findings. The applicability probe (`hasPersistenceLayer` in
|
|
|
27
27
|
[`lib/audit-suite/selector.js`](../scripts/lib/audit-suite/selector.js), gated
|
|
28
28
|
by `target: "data-model"` in
|
|
29
29
|
[`schemas/audit-rules.json`](../schemas/audit-rules.json)) makes this decision
|
|
30
|
-
automatically in `/deliver` and plan-run modes; in a manual invocation you MUST
|
|
30
|
+
automatically in `/mandrel-deliver` and plan-run modes; in a manual invocation you MUST
|
|
31
31
|
make the same determination yourself before reading anything else.
|
|
32
32
|
|
|
33
33
|
## Scope
|
|
@@ -188,7 +188,7 @@ auditable.
|
|
|
188
188
|
## Periodic full-scope sweep
|
|
189
189
|
|
|
190
190
|
Context Economy findings accrete slowly — a doc that is lean today grows a
|
|
191
|
-
bloated tail over many deliveries, and no single change-set-scoped `/deliver`
|
|
191
|
+
bloated tail over many deliveries, and no single change-set-scoped `/mandrel-deliver`
|
|
192
192
|
run sees the whole picture. Run this lens **full-scope** on a
|
|
193
193
|
recurring cadence so the drift is caught before it compounds:
|
|
194
194
|
|
|
@@ -202,7 +202,7 @@ recurring cadence so the drift is caught before it compounds:
|
|
|
202
202
|
Route the resulting `audit-documentation-results.md` through
|
|
203
203
|
[`/audit-to-stories`](audit-to-stories.md), which groups the findings,
|
|
204
204
|
deduplicates them against existing Issues by fingerprint, and opens
|
|
205
|
-
remediation Stories (or chains into `/plan --seed`) so the Context-Economy
|
|
205
|
+
remediation Stories (or chains into `/mandrel-plan --seed`) so the Context-Economy
|
|
206
206
|
findings land as actionable, tracked work rather than a report nobody reads.
|
|
207
207
|
|
|
208
208
|
## Constraint (lens-specific carve-out)
|
|
@@ -3,7 +3,7 @@ description:
|
|
|
3
3
|
Convert findings produced by the audit-* workflows into actionable
|
|
4
4
|
GitHub Stories. Reads temp/audits/audit-*-results.md, groups findings
|
|
5
5
|
cross-audit, deduplicates against existing Issues by fingerprint, and
|
|
6
|
-
either chains into /plan --seed-file or opens standalone Stories.
|
|
6
|
+
either chains into /mandrel-plan --seed-file or opens standalone Stories.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# /audit-to-stories [audit-file-or-glob]
|
|
@@ -111,8 +111,8 @@ Ask:
|
|
|
111
111
|
|
|
112
112
|
> How would you like these `<M>` Stories created?
|
|
113
113
|
>
|
|
114
|
-
> - **Single plan via `/plan`** **[Recommended]** — chains into
|
|
115
|
-
> `/plan --seed-file <emitted.md>` so the standard Story authoring
|
|
114
|
+
> - **Single plan via `/mandrel-plan`** **[Recommended]** — chains into
|
|
115
|
+
> `/mandrel-plan --seed-file <emitted.md>` so the standard Story authoring
|
|
116
116
|
> handles the seed. Prefer one Story; split only under the
|
|
117
117
|
> default-single policy.
|
|
118
118
|
> - **Individual standalone Stories** — opens one GitHub Issue per
|
|
@@ -122,7 +122,7 @@ Ask:
|
|
|
122
122
|
|
|
123
123
|
## Phase 5a — Single-plan path
|
|
124
124
|
|
|
125
|
-
Build the `/plan` seed from the filtered plan envelope:
|
|
125
|
+
Build the `/mandrel-plan` seed from the filtered plan envelope:
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
128
|
node .agents/scripts/audit-to-stories.js --emit-plan-seed \
|
|
@@ -132,16 +132,16 @@ node .agents/scripts/audit-to-stories.js --emit-plan-seed \
|
|
|
132
132
|
|
|
133
133
|
The seed renders the canonical one-pager sections — Problem Statement,
|
|
134
134
|
Recommended Direction, Key Assumptions (with links to every source
|
|
135
|
-
report), MVP Scope (the M proposed Stories), Key Files (so `/plan`'s
|
|
135
|
+
report), MVP Scope (the M proposed Stories), Key Files (so `/mandrel-plan`'s
|
|
136
136
|
authoring step has concrete anchors), Not Doing.
|
|
137
137
|
|
|
138
138
|
Chain into the existing planning entrypoint:
|
|
139
139
|
|
|
140
140
|
```text
|
|
141
|
-
/plan --seed-file <path-to-seed>
|
|
141
|
+
/mandrel-plan --seed-file <path-to-seed>
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
(`/plan --seed "$(cat <path>)"` also works for small seeds). `/plan`
|
|
144
|
+
(`/mandrel-plan --seed "$(cat <path>)"` also works for small seeds). `/mandrel-plan`
|
|
145
145
|
then runs its author → persist path, as documented in its workflow.
|
|
146
146
|
|
|
147
147
|
**Dedup provenance is carried mechanically — do not hand-copy it.** The seed's
|
|
@@ -210,9 +210,9 @@ every Story that has a resolvable blocker with a canonical
|
|
|
210
210
|
GitHub `blocked_by` relations. An edge whose target was never opened (deduped,
|
|
211
211
|
ledger-suppressed) drops rather than becoming a `blocked by #undefined`.
|
|
212
212
|
|
|
213
|
-
**Do not skip this.** `/deliver` has no other source for this cohort's order:
|
|
213
|
+
**Do not skip this.** `/mandrel-deliver` has no other source for this cohort's order:
|
|
214
214
|
its footprint guard ignores the shared provenance footers, so an unwired cohort
|
|
215
|
-
is genuinely unordered and `/deliver` will co-dispatch Stories the edges say
|
|
215
|
+
is genuinely unordered and `/mandrel-deliver` will co-dispatch Stories the edges say
|
|
216
216
|
must follow one another.
|
|
217
217
|
|
|
218
218
|
## Phase 6 — Idempotency (folded into Phase 1 scan)
|
|
@@ -288,7 +288,7 @@ summarising the run:
|
|
|
288
288
|
· <L> skipped (re-occurring)"`.
|
|
289
289
|
|
|
290
290
|
When the single-plan path ran, link the Story (or plan-run) the chained
|
|
291
|
-
`/plan` opened. When the Standalone-Stories path ran, list every Issue URL.
|
|
291
|
+
`/mandrel-plan` opened. When the Standalone-Stories path ran, list every Issue URL.
|
|
292
292
|
|
|
293
293
|
## Constraints
|
|
294
294
|
|
|
@@ -345,7 +345,7 @@ scheduler owns the cadence; this workflow owns the routing.
|
|
|
345
345
|
|
|
346
346
|
## See also
|
|
347
347
|
|
|
348
|
-
- [`/plan`](plan.md) — the planning pipeline `/audit-to-stories`
|
|
348
|
+
- [`/mandrel-plan`](mandrel-plan.md) — the planning pipeline `/audit-to-stories`
|
|
349
349
|
chains into for Story creation.
|
|
350
350
|
- [`lib/findings/route-finding.js`](../scripts/lib/findings/route-finding.js) —
|
|
351
351
|
the shared fingerprint/dedup/route helper this workflow and `qa-explore`
|
|
@@ -13,7 +13,7 @@ The **single source of truth** for getting outstanding working-tree changes
|
|
|
13
13
|
out the door when they do not belong to a planned Story (typo fixes, doc
|
|
14
14
|
tweaks, dependency bumps, operator housekeeping, benchmark result commits
|
|
15
15
|
from mandrel-bench's `/benchmark` Step 4). It is the ad-hoc counterpart to
|
|
16
|
-
the heavyweight `/deliver` pipeline: one command that **detects the git
|
|
16
|
+
the heavyweight `/mandrel-deliver` pipeline: one command that **detects the git
|
|
17
17
|
setup** and escalates to the correct terminal step. Flags pin any level
|
|
18
18
|
explicitly; the interactive choice prompt fires **only** when the detected
|
|
19
19
|
state is genuinely ambiguous, so the common path stays non-interactive and
|
|
@@ -133,7 +133,7 @@ directly, honoring these contracts:
|
|
|
133
133
|
Stop at the resolved level and print a one-block summary naming the branch,
|
|
134
134
|
subject, and (pr level) PR URL + auto-merge state.
|
|
135
135
|
|
|
136
|
-
Do **not** poll CI — that is the `/deliver` Phase 7 job and is overkill for
|
|
136
|
+
Do **not** poll CI — that is the `/mandrel-deliver` Phase 7 job and is overkill for
|
|
137
137
|
ad-hoc changes. The local feature branch left behind at the pr level is
|
|
138
138
|
reaped by the next run's Boot sweep — see
|
|
139
139
|
[`.agents/rules/git-conventions.md` § Local checkout hygiene](../rules/git-conventions.md).
|
|
@@ -151,14 +151,14 @@ reaped by the next run's Boot sweep — see
|
|
|
151
151
|
does not rewrite history.
|
|
152
152
|
- **Always** prefer `--auto --squash --delete-branch` at the pr level unless
|
|
153
153
|
the operator opts out, so `main`'s history stays uniform across the
|
|
154
|
-
`/git-deliver` and `/deliver` surfaces.
|
|
154
|
+
`/git-deliver` and `/mandrel-deliver` surfaces.
|
|
155
155
|
|
|
156
156
|
---
|
|
157
157
|
|
|
158
158
|
## ⚠️ Parallel Story Execution
|
|
159
159
|
|
|
160
160
|
Do **not** use this workflow from inside a parallel story-execution context
|
|
161
|
-
(`/deliver #<storyId>`, `/deliver` wave dispatch). `git add -A` sweeps any
|
|
161
|
+
(`/mandrel-deliver #<storyId>`, `/mandrel-deliver` wave dispatch). `git add -A` sweeps any
|
|
162
162
|
untracked files in the working tree, which in a shared working directory may
|
|
163
163
|
belong to another agent. In those contexts stage explicit paths only and
|
|
164
164
|
confirm `git branch --show-current` reports the expected `story-<id>` branch
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Merge Conflict Resolution — Shared Procedure
|
|
2
2
|
|
|
3
3
|
Canonical, workflow-agnostic procedure for resolving merge / rebase conflicts.
|
|
4
|
-
Referenced by `deliver.md` and `helpers/deliver-story.md`.
|
|
4
|
+
Referenced by `mandrel-deliver.md` and `helpers/deliver-story.md`.
|
|
5
5
|
|
|
6
6
|
## Procedure
|
|
7
7
|
|
|
@@ -30,7 +30,7 @@ constraint for that lens only.
|
|
|
30
30
|
Each lens carries its own `{{changedFiles}}` fence — the substitution anchor
|
|
31
31
|
consumed by `.agents/scripts/lib/audit-suite/` — and reads it as follows:
|
|
32
32
|
|
|
33
|
-
- When this lens is invoked from `/deliver` close lenses (or a plan-run audit),
|
|
33
|
+
- When this lens is invoked from `/mandrel-deliver` close lenses (or a plan-run audit),
|
|
34
34
|
the fence is populated with the Story (or plan-run) change-set file list.
|
|
35
35
|
**Restrict analysis to those files** (and their direct dependencies when the
|
|
36
36
|
lens explicitly calls for cross-file reasoning).
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: >-
|
|
3
3
|
Perform a comprehensive code review of a Story change set against main
|
|
4
|
-
before `/deliver` opens or merges the Story PR
|
|
4
|
+
before `/mandrel-deliver` opens or merges the Story PR
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Code Review (helper)
|
|
8
8
|
|
|
9
9
|
> **Helper module.** Not a slash command. Invoked automatically from
|
|
10
|
-
> `/deliver` via `single-story-close.js`. To run a review directly, invoke
|
|
10
|
+
> `/mandrel-deliver` via `single-story-close.js`. To run a review directly, invoke
|
|
11
11
|
> the parent workflow — operators do not call this helper by hand.
|
|
12
12
|
|
|
13
13
|
This helper performs a comprehensive code review of a change set before it
|
|
@@ -36,7 +36,7 @@ child.
|
|
|
36
36
|
|
|
37
37
|
## Argument contract
|
|
38
38
|
|
|
39
|
-
The caller passes the following arguments (`/deliver` passes
|
|
39
|
+
The caller passes the following arguments (`/mandrel-deliver` passes
|
|
40
40
|
`scope: story`):
|
|
41
41
|
|
|
42
42
|
| Argument | Type | Required | Meaning |
|
|
@@ -61,7 +61,7 @@ It is an **input-only** signal: it changes *how thorough* the review is, never
|
|
|
61
61
|
the findings envelope (`{ status, severity, posted, report, halted,
|
|
62
62
|
blockerReason }`) nor the posted `verification-results` structured-comment body. An
|
|
63
63
|
absent or malformed `depth` is treated as `standard`, so a Story that skipped
|
|
64
|
-
`/plan` still gets a passing review with no new failure mode.
|
|
64
|
+
`/mandrel-plan` still gets a passing review with no new failure mode.
|
|
65
65
|
|
|
66
66
|
How each tier changes the review protocol:
|
|
67
67
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description:
|
|
3
|
-
The unplanned prompt path shared by /deliver and /plan Gate #1. Judges a
|
|
3
|
+
The unplanned prompt path shared by /mandrel-deliver and /mandrel-plan Gate #1. Judges a
|
|
4
4
|
prompt's predicted footprint, authors a receipt Story, then lands it through
|
|
5
5
|
the same single-story-init / single-story-close engine — every close gate
|
|
6
6
|
unchanged.
|
|
@@ -9,8 +9,8 @@ description:
|
|
|
9
9
|
# Unplanned delivery (the prompt path)
|
|
10
10
|
|
|
11
11
|
> **A path, not a command.** There is no `/deliver-light` to type. This file is
|
|
12
|
-
> reached two ways — `/deliver "<prompt>"` (an operator describing small work)
|
|
13
|
-
> and `/plan` Gate #1 (a seed the suggestion says fits the light ceilings, once
|
|
12
|
+
> reached two ways — `/mandrel-deliver "<prompt>"` (an operator describing small work)
|
|
13
|
+
> and `/mandrel-plan` Gate #1 (a seed the suggestion says fits the light ceilings, once
|
|
14
14
|
> the operator confirms). Read
|
|
15
15
|
> [`deliver-digest.md`](deliver-digest.md) once first — the engine invariants,
|
|
16
16
|
> gates, and terminal-envelope contract below are its.
|
|
@@ -25,7 +25,7 @@ It never relaxes a close gate, never bypasses the PR to `main`, and never lands
|
|
|
25
25
|
over-scope work silently.
|
|
26
26
|
|
|
27
27
|
Two callers, one gate: whichever door you arrived through, the suitability gate
|
|
28
|
-
below is the decision. A `/plan` Gate #1 suggestion is a *suggestion* — it is
|
|
28
|
+
below is the decision. A `/mandrel-plan` Gate #1 suggestion is a *suggestion* — it is
|
|
29
29
|
read against seed-time signals (`DELIVER_LIGHT_SUGGESTION_CEILINGS`: artifacts,
|
|
30
30
|
risk hits, sensitive-path classes), while the gate here is read against the
|
|
31
31
|
predicted work's *effort and risk* (`STORY_SHAPE_CEILINGS`: change kinds,
|
|
@@ -39,7 +39,7 @@ across three files is trivial work with a high count; a 200-line rewrite of one
|
|
|
39
39
|
module is a single change. The axes are therefore effort and risk: distinct
|
|
40
40
|
change **kinds** (N instances of one mechanical edit is one kind at N sites), a
|
|
41
41
|
coarse **magnitude** bucket, and **uncertainty** — is the shape determined by
|
|
42
|
-
the request, or does it still need the design decisions `/plan` exists to
|
|
42
|
+
the request, or does it still need the design decisions `/mandrel-plan` exists to
|
|
43
43
|
resolve?
|
|
44
44
|
|
|
45
45
|
Because the predicted footprint is a *declaration* — a guess, and a gameable one
|
|
@@ -65,7 +65,7 @@ answer).
|
|
|
65
65
|
**and** a ledgered model verdict with a recorded reason. Both must agree on
|
|
66
66
|
`lite`.
|
|
67
67
|
2. **Over-scope stops — it never hard-fails.** An over-ceiling prompt STOPS and
|
|
68
|
-
asks the operator to escalate to `/plan` or proceed light. **Both answers
|
|
68
|
+
asks the operator to escalate to `/mandrel-plan` or proceed light. **Both answers
|
|
69
69
|
are executable** — `--operator-proceed-light` records the second one
|
|
70
70
|
(§ Recording a proceed-light answer). Under `--yes` it fails closed to an
|
|
71
71
|
**`escalated` terminal envelope** that ends the session (§ Escalation is
|
|
@@ -97,9 +97,9 @@ answer).
|
|
|
97
97
|
- **`proceed-light`** — the receipt Story is authored; read `storyId` and
|
|
98
98
|
`nextCommands`. Continue to step 2.
|
|
99
99
|
- **`ask-operator`** — predicted scope exceeds the light ceilings. STOP and
|
|
100
|
-
ask the operator to escalate to `/plan` or proceed light. Do not proceed
|
|
100
|
+
ask the operator to escalate to `/mandrel-plan` or proceed light. Do not proceed
|
|
101
101
|
on your own. This is a **question, not a terminal** — wait for the answer,
|
|
102
|
-
then act on it: *escalate* leaves for `/plan`, *proceed light* re-runs the
|
|
102
|
+
then act on it: *escalate* leaves for `/mandrel-plan`, *proceed light* re-runs the
|
|
103
103
|
same command with `--operator-proceed-light "<their reason>"`
|
|
104
104
|
(§ Recording a proceed-light answer).
|
|
105
105
|
- **over-scope under `--yes`** — no `action` to branch on: the gate emits an
|
|
@@ -107,14 +107,14 @@ answer).
|
|
|
107
107
|
terminal governs; you are finished.
|
|
108
108
|
|
|
109
109
|
`--amends '#<id>'` is the canonical light case — shape-checked identically; a
|
|
110
|
-
heavy amendment escalates to `/plan` like any other over-scope prompt.
|
|
110
|
+
heavy amendment escalates to `/mandrel-plan` like any other over-scope prompt.
|
|
111
111
|
|
|
112
|
-
**Entered from `/plan` Gate #1?** Fill `--creates` / `--refactors` /
|
|
112
|
+
**Entered from `/mandrel-plan` Gate #1?** Fill `--creates` / `--refactors` /
|
|
113
113
|
`--acceptance` / `--reason` from the plan-context envelope's codebase
|
|
114
114
|
snapshot and `complexitySignals` rather than re-deriving them from the seed
|
|
115
115
|
text — Gate #1 has already done that work, and re-deriving throws away the
|
|
116
116
|
better signal. An `ask-operator` verdict here means the two ceiling sets
|
|
117
|
-
disagreed: **return to [`../plan.md`](../plan.md) step 2 (Author) in the same
|
|
117
|
+
disagreed: **return to [`../mandrel-plan.md`](../mandrel-plan.md) step 2 (Author) in the same
|
|
118
118
|
session**, carrying the interrogation you already paid for. That bounce-back
|
|
119
119
|
is not an escalation and does not need a fresh session (§ Why the two
|
|
120
120
|
directions differ).
|
|
@@ -127,7 +127,7 @@ answer).
|
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
Capture `workCwd`; `remoteVerified: false` → flip `agent::blocked` and stop.
|
|
130
|
-
This is [`/deliver`](../deliver.md)'s worktree/branch/lease/label engine,
|
|
130
|
+
This is [`/mandrel-deliver`](../mandrel-deliver.md)'s worktree/branch/lease/label engine,
|
|
131
131
|
invoked, not reimplemented.
|
|
132
132
|
|
|
133
133
|
3. **Implement + self-eval.** `cd` into `workCwd`, implement the change, run
|
|
@@ -155,13 +155,13 @@ answer).
|
|
|
155
155
|
|
|
156
156
|
Exit `3` (`blocked: true`) means the diff exceeds a light ceiling or touches a
|
|
157
157
|
sensitive-path class. STOP, flip `agent::blocked`, and **recycle the receipt**
|
|
158
|
-
through the envelope's `nextCommand` (`/plan <storyId>`) — tickets mode
|
|
158
|
+
through the envelope's `nextCommand` (`/mandrel-plan <storyId>`) — tickets mode
|
|
159
159
|
rewrites it into properly-planned Stories and closes it as superseded. Do not
|
|
160
160
|
land, and do not leave the receipt open with no successor: it already carries
|
|
161
161
|
the branch, the worktree, and the implementation, all of which are evidence
|
|
162
162
|
the plan should read.
|
|
163
163
|
|
|
164
|
-
5. **Close and land (same engine).** Exactly [`/deliver`](../deliver.md)'s close:
|
|
164
|
+
5. **Close and land (same engine).** Exactly [`/mandrel-deliver`](../mandrel-deliver.md)'s close:
|
|
165
165
|
|
|
166
166
|
```bash
|
|
167
167
|
node .agents/scripts/single-story-close.js --story <storyId> --cwd <main-repo>
|
|
@@ -208,19 +208,19 @@ diff backstop, which re-checks the actual change set against ground truth.
|
|
|
208
208
|
|
|
209
209
|
Over-scope under `--yes` emits a schema-validated `story-deliver-terminal`
|
|
210
210
|
envelope with **`status: "escalated"`**, `storyId: null`, and a `nextCommand`
|
|
211
|
-
naming the `/plan` invocation that owns the work.
|
|
211
|
+
naming the `/mandrel-plan` invocation that owns the work.
|
|
212
212
|
|
|
213
213
|
**That envelope IS this session's terminal output.** Relay it and stop. There is
|
|
214
214
|
no remaining step, no degraded fallback, and no smaller version of the work to
|
|
215
215
|
attempt.
|
|
216
216
|
|
|
217
|
-
**Invoking `/plan` in this same session is forbidden.** Hand the operator the
|
|
218
|
-
`nextCommand`; `/plan` runs in a **fresh** session.
|
|
217
|
+
**Invoking `/mandrel-plan` in this same session is forbidden.** Hand the operator the
|
|
218
|
+
`nextCommand`; `/mandrel-plan` runs in a **fresh** session.
|
|
219
219
|
|
|
220
220
|
This is not style — it is the empirical finding that motivated the envelope.
|
|
221
221
|
A mandrel-bench 2.13.0 light-arm run read the escalation and continued anyway:
|
|
222
|
-
it invoked `/plan` in-session and delivered. The in-session plan authored **one**
|
|
223
|
-
Story against the scenario's 3–5 contract, where a fresh `/plan` session on the
|
|
222
|
+
it invoked `/mandrel-plan` in-session and delivered. The in-session plan authored **one**
|
|
223
|
+
Story against the scenario's 3–5 contract, where a fresh `/mandrel-plan` session on the
|
|
224
224
|
identical seed authored **four**. Planning inside a session already framed as
|
|
225
225
|
small work under-decomposes, so walking past the escalation silently produced
|
|
226
226
|
the very outcome the guard exists to prevent. The gate's decision was right both
|
|
@@ -233,29 +233,29 @@ in a shape the schema pins, so a later run finds nothing to trip over.
|
|
|
233
233
|
|
|
234
234
|
## Why the two directions differ {#why-the-two-directions-differ}
|
|
235
235
|
|
|
236
|
-
Traffic runs both ways between this path and `/plan`, and the two directions
|
|
236
|
+
Traffic runs both ways between this path and `/mandrel-plan`, and the two directions
|
|
237
237
|
have **deliberately different session rules**. It reads like an inconsistency;
|
|
238
238
|
it is not. The rule:
|
|
239
239
|
|
|
240
240
|
> **The direction whose guard is model judgment must break the session. The
|
|
241
241
|
> direction whose guard is mechanical need not.**
|
|
242
242
|
|
|
243
|
-
**Light → `/plan` must be a fresh session.** What is being protected is
|
|
243
|
+
**Light → `/mandrel-plan` must be a fresh session.** What is being protected is
|
|
244
244
|
*authoring judgment*, and the empirical finding above is that a session already
|
|
245
245
|
framed as small work under-decomposes — one Story against a 3–5 contract where
|
|
246
246
|
a fresh session on the identical seed authored four. The frame is the hazard,
|
|
247
247
|
so only a new session removes it.
|
|
248
248
|
|
|
249
|
-
**`/plan` → light may stay in-session.** Gate #1 fires **before** authoring, so
|
|
249
|
+
**`/mandrel-plan` → light may stay in-session.** Gate #1 fires **before** authoring, so
|
|
250
250
|
there is no authoring to corrupt, and the frame at that point is "plan this
|
|
251
251
|
seed" — the neutral one, not the small one. Everything on the receiving side is
|
|
252
252
|
mechanical: `STORY_SHAPE_CEILINGS`, the ledgered verdict, the diff backstop.
|
|
253
253
|
None of them degrade because the context is large, so nothing is gained by
|
|
254
254
|
paying for a fresh session.
|
|
255
255
|
|
|
256
|
-
Do not "fix" this into symmetry in either direction. Making `/plan` → light
|
|
256
|
+
Do not "fix" this into symmetry in either direction. Making `/mandrel-plan` → light
|
|
257
257
|
require a fresh session throws away a paid-for interrogation for no guard.
|
|
258
|
-
Letting light → `/plan` run in-session reintroduces the exact failure the
|
|
258
|
+
Letting light → `/mandrel-plan` run in-session reintroduces the exact failure the
|
|
259
259
|
`escalated` envelope exists to prevent.
|
|
260
260
|
|
|
261
261
|
## Constraints
|
|
@@ -272,9 +272,9 @@ Letting light → `/plan` run in-session reintroduces the exact failure the
|
|
|
272
272
|
|
|
273
273
|
## See also
|
|
274
274
|
|
|
275
|
-
- [`/deliver`](../deliver.md) — the delivery entry point; routes here on a
|
|
275
|
+
- [`/mandrel-deliver`](../mandrel-deliver.md) — the delivery entry point; routes here on a
|
|
276
276
|
free-text prompt.
|
|
277
|
-
- [`/plan`](../plan.md) — routes here from Gate #1 on a confirmed suggestion,
|
|
277
|
+
- [`/mandrel-plan`](../mandrel-plan.md) — routes here from Gate #1 on a confirmed suggestion,
|
|
278
278
|
and owns the work an over-scope prompt escalates to.
|
|
279
279
|
- [`deliver-story.md`](deliver-story.md) — the one Story delivery engine every
|
|
280
280
|
path shares.
|