mandrel 2.37.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 +16 -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/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/check-doc-links.js +32 -4
- 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 +1 -1
- 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/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 +1 -1
- package/.agents/scripts/lib/bootstrap/commit-push.js +2 -2
- package/.agents/scripts/lib/bootstrap/issue-forms-template.js +1 -1
- package/.agents/scripts/lib/checks/core-bare-clean.js +1 -1
- package/.agents/scripts/lib/checks/story-init-not-backgrounded.js +1 -1
- package/.agents/scripts/lib/cli-args.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/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 +3 -3
- package/.agents/scripts/lib/duplicate-search.js +1 -1
- package/.agents/scripts/lib/feedback-loop/prior-feedback-fetcher.js +4 -4
- package/.agents/scripts/lib/feedback-loop/retro-proposals-graduator.js +1 -1
- 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 +1 -1
- package/.agents/scripts/lib/git-branch-lifecycle.js +2 -2
- package/.agents/scripts/lib/label-constants.js +2 -2
- package/.agents/scripts/lib/label-taxonomy.js +1 -1
- 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 +16 -16
- 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/remote-verifier.js +2 -2
- package/.agents/scripts/lib/orchestration/resolve-stories.js +4 -4
- 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/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-deliver-terminal.js +14 -12
- package/.agents/scripts/lib/orchestration/ticket-validator.js +1 -1
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +3 -3
- package/.agents/scripts/lib/plan-phase-cleanup.js +1 -1
- package/.agents/scripts/lib/signals/schema.js +1 -1
- package/.agents/scripts/lib/story-adjacency.js +2 -2
- package/.agents/scripts/lib/templates/decomposer-prompts.js +1 -1
- package/.agents/scripts/lib/ticket-body-sections.js +1 -1
- 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 +2 -2
- 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/providers/github/board-add.js +1 -1
- package/.agents/scripts/providers/github/errors.js +1 -1
- package/.agents/scripts/providers/github/tickets.js +6 -6
- 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/single-story-close.js +2 -2
- package/.agents/scripts/single-story-init.js +5 -5
- 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 +11 -0
- package/lib/cli/doctor.js +1 -1
- package/lib/cli/init.js +1 -1
- package/lib/migrations/steps/2.2.0-retire-epic-ac-tags.js +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
description:
|
|
3
|
-
On-demand reference appendix for /deliver — the sequencing edge cases,
|
|
3
|
+
On-demand reference appendix for /mandrel-deliver — the sequencing edge cases,
|
|
4
4
|
role-scoped dispatch mechanics, lite-route inline execution, checklist
|
|
5
5
|
threading, and the per-run epilogue. Read it when the matching lever is in
|
|
6
6
|
play; the lean spine in deliver.md links here.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# /deliver — reference appendix (on-demand)
|
|
9
|
+
# /mandrel-deliver — reference appendix (on-demand)
|
|
10
10
|
|
|
11
|
-
Reference-only detail split out of [`deliver.md`](../deliver.md) so the
|
|
11
|
+
Reference-only detail split out of [`mandrel-deliver.md`](../mandrel-deliver.md) so the
|
|
12
12
|
always-resident spine stays lean. Nothing here is a new MUST —
|
|
13
13
|
it is the mechanics an operator consults when the matching lever is engaged.
|
|
14
14
|
|
|
15
15
|
## Ranges (`4922 - 4926`) {#ranges}
|
|
16
16
|
|
|
17
17
|
A contiguous span is how an operator reads a plan run, so the dash range is a
|
|
18
|
-
first-class id shape rather than prose to interpret — `/deliver 4922 - 4926`
|
|
18
|
+
first-class id shape rather than prose to interpret — `/mandrel-deliver 4922 - 4926`
|
|
19
19
|
means exactly the five ids in it.
|
|
20
20
|
|
|
21
21
|
**Pass the span through; never expand it by hand.** Every id-list flag on the
|
|
@@ -49,6 +49,14 @@ issue state rather than against anything you hand it. That is why there is no
|
|
|
49
49
|
batch label to pass and why a blocker that landed in an unrelated run is simply
|
|
50
50
|
seen as done.
|
|
51
51
|
|
|
52
|
+
**The non-zero exit codes.** **2** — `cycleError`: the graph is
|
|
53
|
+
self-referential; fix `depends_on`, do not retry. **3** — `wedged`: nothing
|
|
54
|
+
dispatchable and nothing in flight, with the undone Stories and their unmet
|
|
55
|
+
blockers named; land a blocker or add it to `--ids`. **4** — `blocked`: a Story
|
|
56
|
+
carries `agent::blocked` with `blockedReason`, the protocol's HITL pause
|
|
57
|
+
([`instructions.md` § 1.J](../../instructions.md)). Blocked outranks a wedge,
|
|
58
|
+
but not a cycle.
|
|
59
|
+
|
|
52
60
|
**Resuming an exit-4 `blocked`.** Read the friction comment with
|
|
53
61
|
`gh issue view <id> --comments`, and resume only once the operator has
|
|
54
62
|
unblocked it:
|
|
@@ -184,7 +192,7 @@ exposes agent dispatch, spawn each ready Story as its own
|
|
|
184
192
|
`CLAUDE.md` @-closure) carrying the load-bearing delivery MUSTs standalone. The
|
|
185
193
|
sub-agent executes [`deliver-story.md`](deliver-story.md) Steps 0–2.5
|
|
186
194
|
(init → implement → acceptance self-eval → **push**) and stops there; **you**
|
|
187
|
-
own Step 3, serialized — see `/deliver` § Closing what the workers hand back.
|
|
195
|
+
own Step 3, serialized — see `/mandrel-deliver` § Closing what the workers hand back.
|
|
188
196
|
Thread into its prompt: `storyId`; `docsDigestPath` (the per-run docs digest, null when
|
|
189
197
|
`project.docsContextFiles` is unset); `checklistPath` (the footprint-matched
|
|
190
198
|
write-time audit checklist, produced at dispatch, below); and the
|
|
@@ -225,7 +233,7 @@ terminal envelope are identical either way — only the isolation differs.
|
|
|
225
233
|
|
|
226
234
|
## Intent phrases (what replaced the flag table)
|
|
227
235
|
|
|
228
|
-
`/deliver` has no operator-facing flags. The scripts still take every flag they
|
|
236
|
+
`/mandrel-deliver` has no operator-facing flags. The scripts still take every flag they
|
|
229
237
|
always did — the workflow fills them in from what the operator said, the same
|
|
230
238
|
derive-then-announce contract `/git-deliver` uses for its terminal level.
|
|
231
239
|
|
|
@@ -252,7 +260,7 @@ Two rules keep this honest:
|
|
|
252
260
|
operator expresses; it is a runner asserting *nobody is at the keyboard*, and
|
|
253
261
|
it changes fail-closed behavior (it is what turns the unplanned path's
|
|
254
262
|
over-scope stop into an `escalated` terminal envelope, and what auto-proceeds
|
|
255
|
-
`/plan`'s gates). Cron, `/loop`, and headless dispatch set it. An attended run
|
|
263
|
+
`/mandrel-plan`'s gates). Cron, `/loop`, and headless dispatch set it. An attended run
|
|
256
264
|
never does, however the operator phrases their impatience.
|
|
257
265
|
|
|
258
266
|
## Operator-merge implies no-wait
|
|
@@ -33,7 +33,7 @@ Epic-scoped dispatch manifest to serialise two operators driving the same
|
|
|
33
33
|
Story, so this lease is the only guard against a concurrent
|
|
34
34
|
`single-story-init` clobbering an in-flight run.
|
|
35
35
|
|
|
36
|
-
**Fail-closed.** Unlike `/deliver`, the standalone path
|
|
36
|
+
**Fail-closed.** Unlike `/mandrel-deliver`, the standalone path
|
|
37
37
|
has **no Epic-scoped lifecycle ledger** to read a per-owner
|
|
38
38
|
`story.heartbeat` from, so there is no live-heartbeat source to decide
|
|
39
39
|
whether a foreign claim is stale. Rather than silently reclaim every
|
|
@@ -131,7 +131,7 @@ The v2 engine's trait table:
|
|
|
131
131
|
| Ceremony | Per-Story, routed off the derived change level via `ceremony-routing.js` |
|
|
132
132
|
|
|
133
133
|
**Ceremony-lite Stories still land through this engine unchanged.** A
|
|
134
|
-
lite-routed Story collapses only the _advisory_ plan/deliver
|
|
134
|
+
lite-routed Story collapses only the _advisory_ plan/mandrel-deliver
|
|
135
135
|
ceremony — the fresh-critic / Tech-Spec authoring a one-artifact scope does
|
|
136
136
|
not earn. It does **not** get a cheaper landing: the close-validation gates
|
|
137
137
|
(lint / test / format / coverage / CRAP / maintainability), the PR to `main`,
|
|
@@ -231,7 +231,7 @@ demand. See [`.agents/instructions.md` § 3](../../instructions.md).
|
|
|
231
231
|
write and self-check as you author. When absent, lens-aware coverage still
|
|
232
232
|
runs maker-blind at Story-scope review inside the close subprocess. The
|
|
233
233
|
dispatch step produces `checklistPath` from the Story's predicted footprint
|
|
234
|
-
before it spawns the worker — see [`/deliver`](../deliver.md).
|
|
234
|
+
before it spawns the worker — see [`/mandrel-deliver`](../mandrel-deliver.md).
|
|
235
235
|
|
|
236
236
|
**Pre-eval full-suite discipline (spine step 1.3).** Repo-invariant guards —
|
|
237
237
|
drift-guard and schema tests living outside the Story's scoped greps — are
|
|
@@ -542,7 +542,7 @@ The `single-story-close.js` script, in order:
|
|
|
542
542
|
`gh pr merge <prNumber> --auto --squash --delete-branch`. Once CI's
|
|
543
543
|
required checks turn green, GitHub squash-merges the PR and deletes
|
|
544
544
|
the source branch — the operator does not need to babysit the merge
|
|
545
|
-
button. Mirrors the `/deliver` finalize path. Failure is
|
|
545
|
+
button. Mirrors the `/mandrel-deliver` finalize path. Failure is
|
|
546
546
|
non-fatal: the operator retains the manual merge surface in the
|
|
547
547
|
GitHub UI. Pass `--no-auto-merge` to opt out when the PR needs a
|
|
548
548
|
pre-merge eyeball.
|
|
@@ -909,6 +909,11 @@ up").
|
|
|
909
909
|
|
|
910
910
|
## Idempotence and the standing constraints
|
|
911
911
|
|
|
912
|
+
**Why a no-envelope hand-off must never be re-dispatched.** Only Step 3 mints a
|
|
913
|
+
terminal envelope, so a sub-agent returning without one is the normal shape. The
|
|
914
|
+
branch already exists, and re-running Step 0 underneath live work is how one
|
|
915
|
+
Story ends up with two closes — resume per the spine's § Recovery instead.
|
|
916
|
+
|
|
912
917
|
Every script in the chain no-ops safely on re-run: `single-story-init.js`
|
|
913
918
|
re-prints `workCwd` for an already-initialized Story; `single-story-close.js`
|
|
914
919
|
and `single-story-confirm-merge.js` short-circuit on a closed or `agent::done`
|
|
@@ -9,7 +9,7 @@ mandatoryReads: [deliver-digest.md]
|
|
|
9
9
|
|
|
10
10
|
> **Lean spine.** Happy path + gate list; edge-case, recovery and reference
|
|
11
11
|
> detail lives in [`deliver-story-reference.md`](deliver-story-reference.md)
|
|
12
|
-
> ("reference" below). Invoked by [`/deliver`](../deliver.md).
|
|
12
|
+
> ("reference" below). Invoked by [`/mandrel-deliver`](../mandrel-deliver.md).
|
|
13
13
|
> **Read [`deliver-digest.md`](deliver-digest.md) once, first** — the one
|
|
14
14
|
> bundled read every delivery needs. Steps cite it as "digest § N".
|
|
15
15
|
|
|
@@ -34,14 +34,13 @@ that dispatched the work**, never to a spawned worker.
|
|
|
34
34
|
- **Inline dispatch** (a one-Story run — digest § 1): one session is both
|
|
35
35
|
roles and walks Steps 0→7, no hand-off.
|
|
36
36
|
- **Sub-agent dispatch**: the `story-worker` stops at Step 2.5 with the branch
|
|
37
|
-
pushed and returns a hand-off; the dispatching `/deliver` session runs Step 3
|
|
37
|
+
pushed and returns a hand-off; the dispatching `/mandrel-deliver` session runs Step 3
|
|
38
38
|
**in its own turn** and **serializes the tail — one close at a time across
|
|
39
39
|
the run**, even though implementation ran in parallel (reference § Step 3).
|
|
40
40
|
|
|
41
|
-
**A worker returning no terminal envelope is expected, not a failure
|
|
42
|
-
Step 3 mints one
|
|
43
|
-
|
|
44
|
-
live work is how one Story gets two closes. Resume per § Recovery instead.
|
|
41
|
+
**A worker returning no terminal envelope is expected, not a failure** — only
|
|
42
|
+
Step 3 mints one. Never re-dispatch the Story on it; resume per § Recovery
|
|
43
|
+
(reference § Idempotence and the standing constraints).
|
|
45
44
|
|
|
46
45
|
## Step 0 — Initialize (`single-story-init.js`)
|
|
47
46
|
|
|
@@ -162,5 +161,5 @@ not process. Drive `agent::*` through
|
|
|
162
161
|
|
|
163
162
|
## See also
|
|
164
163
|
|
|
165
|
-
[`deliver-digest.md`](deliver-digest.md), [`/deliver`](../deliver.md),
|
|
164
|
+
[`deliver-digest.md`](deliver-digest.md), [`/mandrel-deliver`](../mandrel-deliver.md),
|
|
166
165
|
[`deliver-story-reference.md`](deliver-story-reference.md).
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
|
|
10
10
|
> **Helper, not a slash command.** Files under `workflows/helpers/` are not
|
|
11
11
|
> projected into the mandrel plugin command tree. The same `lib/checks/` registry runs
|
|
12
|
-
> automatically as preflight inside `/deliver`, `single-story-close`, and
|
|
12
|
+
> automatically as preflight inside `/mandrel-deliver`, `single-story-close`, and
|
|
13
13
|
> `npm test` — this viewer exists only for ad-hoc inspection. Invoke the
|
|
14
14
|
> backing script directly: `node .agents/scripts/diagnose.js [args]`.
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ description: >-
|
|
|
18
18
|
`diagnose.js` runs the checks registry assembled under
|
|
19
19
|
`.agents/scripts/lib/checks/` in read-only mode and surfaces every
|
|
20
20
|
finding declared on the requested scope. It is the operator-facing read
|
|
21
|
-
of the same registry that preflight guards (`/deliver`,
|
|
21
|
+
of the same registry that preflight guards (`/mandrel-deliver`,
|
|
22
22
|
`single-story-close`), the retro hook, and `npm test` consult — but with
|
|
23
23
|
`autoFix: false` always, no remote GitHub writes, and no commits.
|
|
24
24
|
|
|
@@ -58,7 +58,7 @@ the same shape as Rule 1 but at the sub-agent layer.
|
|
|
58
58
|
|
|
59
59
|
- **Tool primitives:** `Agent` (one call per independent unit, all in one
|
|
60
60
|
turn).
|
|
61
|
-
- **When:** wave-level Story fan-out from `/deliver`, per-dimension
|
|
61
|
+
- **When:** wave-level Story fan-out from `/mandrel-deliver`, per-dimension
|
|
62
62
|
audit dispatch, any "for each X in Xs run /Y X" loop where the Xs do not
|
|
63
63
|
share write paths.
|
|
64
64
|
- **Anti-pattern:** serial `Agent` calls (`Agent` → wait → `Agent` → wait)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# /plan — on-demand reference appendix
|
|
1
|
+
# /mandrel-plan — on-demand reference appendix
|
|
2
2
|
|
|
3
|
-
> **Applies when:** you are executing [`/plan`](../plan.md) and hit one of the
|
|
3
|
+
> **Applies when:** you are executing [`/mandrel-plan`](../mandrel-plan.md) and hit one of the
|
|
4
4
|
> situations below — input-mode derivation, the Gate #1 light handoff,
|
|
5
5
|
> shape-derived complexity routing, tickets-mode supersede authoring, critic
|
|
6
6
|
> dispatch detail, a failed persist, or source-id resolution. The spine stays
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## Deriving the input mode
|
|
10
10
|
|
|
11
|
-
`/plan` has no operator-facing flags; the CLIs below still take every flag they
|
|
11
|
+
`/mandrel-plan` has no operator-facing flags; the CLIs below still take every flag they
|
|
12
12
|
always did. Read the invocation, **announce what you derived**, then fill in
|
|
13
13
|
the flag — the same derive-then-announce contract `/git-deliver` uses for its
|
|
14
14
|
terminal level.
|
|
@@ -94,7 +94,7 @@ not re-deriving which assumptions were really the agent's to make.
|
|
|
94
94
|
|
|
95
95
|
## Gate #1 → the light path (in-session handoff)
|
|
96
96
|
|
|
97
|
-
On a confirmed `deliverLightSuggestion`, `/plan` routes into
|
|
97
|
+
On a confirmed `deliverLightSuggestion`, `/mandrel-plan` routes into
|
|
98
98
|
[`deliver-light.md`](deliver-light.md) **without ending the session**. Two
|
|
99
99
|
things make that safe, and both are worth understanding before changing it:
|
|
100
100
|
|
|
@@ -110,7 +110,7 @@ things make that safe, and both are worth understanding before changing it:
|
|
|
110
110
|
span). Two different checks on purpose, so a confirm is not a bypass.
|
|
111
111
|
|
|
112
112
|
**When the light gate answers `ask-operator`**, the two ceiling sets disagreed.
|
|
113
|
-
Resume `/plan` at step 2 (Author) **in this same session** — the interrogation
|
|
113
|
+
Resume `/mandrel-plan` at step 2 (Author) **in this same session** — the interrogation
|
|
114
114
|
is still valid and re-paying for it buys nothing. This bounce-back is not an
|
|
115
115
|
escalation.
|
|
116
116
|
|
|
@@ -138,7 +138,7 @@ in `audit-rules.json`. There is no configuration key to set: a project with no
|
|
|
138
138
|
rendered frontend resolves falsey and the offer never fires.
|
|
139
139
|
|
|
140
140
|
When it does fire, **name [`/prototype`](../prototype.md) and stop there.**
|
|
141
|
-
`/plan` must never invoke it — operator invocation is the entire design, because
|
|
141
|
+
`/mandrel-plan` must never invoke it — operator invocation is the entire design, because
|
|
142
142
|
the value is a human looking at a layout before its UI acceptance criteria are
|
|
143
143
|
frozen.
|
|
144
144
|
|
|
@@ -182,7 +182,7 @@ decision:
|
|
|
182
182
|
|
|
183
183
|
**The label is a hint; deliver re-derives.** Persist labels a
|
|
184
184
|
lite cohort's Stories with **`route::lite`** as a *human-visible hint only* —
|
|
185
|
-
`/deliver` computes the route from each fetched Story body via the same shape
|
|
185
|
+
`/mandrel-deliver` computes the route from each fetched Story body via the same shape
|
|
186
186
|
function at dispatch, so neither a lost label nor an unread marker can
|
|
187
187
|
misroute delivery: a lite-shaped Story derives `lite` even with the label
|
|
188
188
|
absent, and a sensitive-footprint Story routes `full` and keeps its fresh
|
|
@@ -421,7 +421,7 @@ The order is: create unlabelled → upsert `story-plan-state` on
|
|
|
421
421
|
every Story → upsert `plan-summary` on the primary → flip every Story to
|
|
422
422
|
`agent::ready`.
|
|
423
423
|
|
|
424
|
-
This is what lets `/deliver` trust the label: a Story carrying
|
|
424
|
+
This is what lets `/mandrel-deliver` trust the label: a Story carrying
|
|
425
425
|
`agent::ready` always has its persist receipt on the ticket, so nothing can
|
|
426
426
|
pick it up mid-write and read a half-persisted plan.
|
|
427
427
|
|
|
@@ -436,7 +436,7 @@ So if a transient GitHub failure strands the run at Story `k` of `N`:
|
|
|
436
436
|
|
|
437
437
|
| | Behaviour |
|
|
438
438
|
| --- | --- |
|
|
439
|
-
| The `1..k-1` Stories | Live, but **not** `agent::ready` — invisible to `/deliver`, not half-delivered. |
|
|
439
|
+
| The `1..k-1` Stories | Live, but **not** `agent::ready` — invisible to `/mandrel-deliver`, not half-delivered. |
|
|
440
440
|
| Re-running persist | Adopts them by fingerprint, creates only the missing ones, then flips the whole cohort ready. |
|
|
441
441
|
| Editing `stories.json` first | Changing a slug or title changes the fingerprint — the old issue is orphaned rather than adopted. Close it by hand. |
|
|
442
442
|
|
|
@@ -115,7 +115,7 @@ is no per-workflow finding schema.
|
|
|
115
115
|
Route the ledger through the shared classify/route/dedup/promote core. The
|
|
116
116
|
outcome is that **every ledger item carries a class, a route decision, and an
|
|
117
117
|
operator-confirmed disposition**, with each `file` item promoted via
|
|
118
|
-
`promote-finding.js` into `/plan` — verified by the cluster's fingerprint
|
|
118
|
+
`promote-finding.js` into `/mandrel-plan` — verified by the cluster's fingerprint
|
|
119
119
|
footer landing in each seed body. For each untriaged item:
|
|
120
120
|
|
|
121
121
|
1. **Classify** via
|
|
@@ -140,7 +140,7 @@ footer landing in each seed body. For each untriaged item:
|
|
|
140
140
|
against it.
|
|
141
141
|
3. **Decide the disposition** with the operator (`file` / `defer` / `dismiss`)
|
|
142
142
|
and record it back onto the ledger item.
|
|
143
|
-
4. **Promote the `file`-dispositioned findings through `/plan`** via
|
|
143
|
+
4. **Promote the `file`-dispositioned findings through `/mandrel-plan`** via
|
|
144
144
|
[`promote-finding.js`](../../scripts/lib/findings/promote-finding.js) — the
|
|
145
145
|
same cluster/size/route/file path `audit-to-stories` consumes. Never
|
|
146
146
|
hand-roll the clustering, sizing, or promotion in prose:
|
|
@@ -149,8 +149,8 @@ footer landing in each seed body. For each untriaged item:
|
|
|
149
149
|
import { promoteFindings } from '../scripts/lib/findings/promote-finding.js';
|
|
150
150
|
const { promotions } = await promoteFindings(ledgerItems, {
|
|
151
151
|
searchIssues, // GitHub provider, open + closed
|
|
152
|
-
createStory, // tight cluster (≤2 surfaces): seed → /plan --seed-file
|
|
153
|
-
createPlanSeed, // broad cluster (>2 surfaces): same /plan --seed-file path (may N>1)
|
|
152
|
+
createStory, // tight cluster (≤2 surfaces): seed → /mandrel-plan --seed-file
|
|
153
|
+
createPlanSeed, // broad cluster (>2 surfaces): same /mandrel-plan --seed-file path (may N>1)
|
|
154
154
|
});
|
|
155
155
|
```
|
|
156
156
|
|
|
@@ -159,16 +159,16 @@ footer landing in each seed body. For each untriaged item:
|
|
|
159
159
|
`createPlanSeed` — neither opens an Epic; both render a **redacted** plan
|
|
160
160
|
seed (redaction already ran at capture), **stamp the cluster's
|
|
161
161
|
`fingerprintFooter(sha)` verbatim into the seed body**, and chain
|
|
162
|
-
`/plan --seed-file <seed>`. Prefer one Story; split only under the
|
|
162
|
+
`/mandrel-plan --seed-file <seed>`. Prefer one Story; split only under the
|
|
163
163
|
default-single policy. A `file` disposition **never** opens a raw GitHub
|
|
164
|
-
Issue; only `defer` and `dismiss` skip the `/plan` handoff.
|
|
164
|
+
Issue; only `defer` and `dismiss` skip the `/mandrel-plan` handoff.
|
|
165
165
|
|
|
166
166
|
## The HITL write gate
|
|
167
167
|
|
|
168
168
|
Capture stays read-only precisely so every state change lands in Triage,
|
|
169
|
-
deliberately and confirmed. Any ticket-filing, seed write, `/plan` invocation,
|
|
169
|
+
deliberately and confirmed. Any ticket-filing, seed write, `/mandrel-plan` invocation,
|
|
170
170
|
or label mutation is a **write** — present the artifact, confirm each one with
|
|
171
171
|
the operator, and wait before it happens. The agent never files tickets,
|
|
172
172
|
promotes findings, or mutates a label autonomously. The plan→deliver hard stop
|
|
173
|
-
is preserved: each `/plan` chain pauses at its own HITL gates and never
|
|
173
|
+
is preserved: each `/mandrel-plan` chain pauses at its own HITL gates and never
|
|
174
174
|
auto-delivers.
|
|
@@ -14,7 +14,7 @@ into the wrong commit. Each Story runs in its own `git worktree` at
|
|
|
14
14
|
isolated per-Story. The main checkout stays quiet.
|
|
15
15
|
|
|
16
16
|
This document is the operator and reviewer reference. See
|
|
17
|
-
[`/deliver`](../deliver.md) and [`helpers/deliver-story`](deliver-story.md)
|
|
17
|
+
[`/mandrel-deliver`](../mandrel-deliver.md) and [`helpers/deliver-story`](deliver-story.md)
|
|
18
18
|
for the broader execution flow.
|
|
19
19
|
|
|
20
20
|
## Configuration
|
|
@@ -50,7 +50,7 @@ root, and shell-metacharacter injection in `root`.
|
|
|
50
50
|
| **Sweep** | Operator-driven (`WorktreeManager.sweepStaleLocks`) | Stale `*.lock` files under `.git/` (older than 5 min) are removed before GC. |
|
|
51
51
|
| **GC** | Operator-driven (`WorktreeManager.gc`) | Orphan `.worktrees/story-*` whose Stories are closed are reaped if clean. |
|
|
52
52
|
| **Force-drain** | Operator-driven (`drain-pending-cleanup.js`) | Retries `.worktrees/.pending-cleanup.json` (`git worktree remove` then `fs.rm`); Windows-only escalation enumerates user-mode handle holders and `taskkill`s them before re-trying. |
|
|
53
|
-
| **Ensure** | `single-story-init.js` (entry for `/deliver`) | `git worktree add .worktrees/story-<id>/` on the `story-<id>` branch. |
|
|
53
|
+
| **Ensure** | `single-story-init.js` (entry for `/mandrel-deliver`) | `git worktree add .worktrees/story-<id>/` on the `story-<id>` branch. |
|
|
54
54
|
| **Run** | During Story execution | Agent runs inside the worktree; HEAD/reflog activity is isolated. |
|
|
55
55
|
| **Reap** | After successful Story merge (in `single-story-close`) | `git worktree remove` — refuses to delete dirty trees or unmerged branches. |
|
|
56
56
|
|
|
@@ -85,13 +85,13 @@ epic-runner. The lifecycle surfaces that do run automatically are:
|
|
|
85
85
|
|
|
86
86
|
| Entry point | Script / caller | What it cleans |
|
|
87
87
|
| --------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
88
|
-
| Story init (`/deliver <storyId>`) | `single-story-init.js` boot sweep (`sweepMergedStoryBranches`) | Merged/closed `story-*` branches (local + origin) from prior runs; it then creates only its own worktree. |
|
|
89
|
-
| Story close (`/deliver` close) | `single-story-close.js` worktree-reap phase (`WorktreeManager.reap`) | The per-Story worktree; on a Windows EBUSY-class lock the entry is deferred into `.worktrees/.pending-cleanup.json`. |
|
|
88
|
+
| Story init (`/mandrel-deliver <storyId>`) | `single-story-init.js` boot sweep (`sweepMergedStoryBranches`) | Merged/closed `story-*` branches (local + origin) from prior runs; it then creates only its own worktree. |
|
|
89
|
+
| Story close (`/mandrel-deliver` close) | `single-story-close.js` worktree-reap phase (`WorktreeManager.reap`) | The per-Story worktree; on a Windows EBUSY-class lock the entry is deferred into `.worktrees/.pending-cleanup.json`. |
|
|
90
90
|
| Drain pending-cleanup (operator) | `drain-pending-cleanup.js` (run directly — see below) | The pending-cleanup ledger, with optional Windows handle-holder escalation. This is the only path that drains the ledger. |
|
|
91
91
|
|
|
92
92
|
Operator takeaway: if worktrees or stale locks accumulate, run
|
|
93
93
|
`node .agents/scripts/drain-pending-cleanup.js` — nothing in the
|
|
94
|
-
`/plan` → `/deliver` loop force-sweeps or GCs on your behalf.
|
|
94
|
+
`/mandrel-plan` → `/mandrel-deliver` loop force-sweeps or GCs on your behalf.
|
|
95
95
|
|
|
96
96
|
## Draining the pending-cleanup ledger
|
|
97
97
|
|
|
@@ -297,6 +297,6 @@ Human reviewers should **keep using the main checkout** — not a worktree:
|
|
|
297
297
|
`git worktree remove --force <path>`. Confirm there is no uncommitted work
|
|
298
298
|
first.
|
|
299
299
|
- **Disable temporarily**: flip `enabled: false` in `.agentrc.json`. The next
|
|
300
|
-
`/deliver` skips worktree creation entirely.
|
|
300
|
+
`/mandrel-deliver` skips worktree creation entirely.
|
|
301
301
|
- **Inspect live worktrees**: `git worktree list --porcelain` on the main
|
|
302
302
|
checkout. Each block shows `worktree <path>` / `branch refs/heads/story-<id>`.
|