mandrel 1.60.0 → 1.62.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.
Files changed (49) hide show
  1. package/.agents/README.md +74 -32
  2. package/.agents/docs/SDLC.md +18 -12
  3. package/.agents/docs/configuration.md +61 -4
  4. package/.agents/docs/quality-gates.md +796 -0
  5. package/.agents/docs/workflows.md +3 -4
  6. package/.agents/runtime-deps.json +2 -2
  7. package/.agents/scripts/README.md +1 -1
  8. package/.agents/scripts/agents-bootstrap-github.js +23 -119
  9. package/.agents/scripts/lib/bootstrap/ci-workflow-template.js +46 -0
  10. package/.agents/scripts/lib/bootstrap/gh-preflight.js +7 -9
  11. package/.agents/scripts/lib/bootstrap/manifest.js +21 -1
  12. package/.agents/scripts/lib/bootstrap/merge-methods.js +31 -16
  13. package/.agents/scripts/lib/bootstrap/project-bootstrap.js +32 -11
  14. package/.agents/scripts/lib/config/sync-agentrc.js +1 -1
  15. package/.agents/scripts/lib/detect-package-manager.js +72 -0
  16. package/.agents/scripts/lib/errors/index.js +4 -4
  17. package/.agents/scripts/lib/label-taxonomy.js +2 -2
  18. package/.agents/scripts/lib/onboard/detect-stack.js +10 -10
  19. package/.agents/scripts/lib/onboard/init-tail.js +218 -0
  20. package/.agents/scripts/lib/onboard/scaffold-docs.js +18 -3
  21. package/.agents/scripts/lib/runtime-deps/preflight.js +6 -6
  22. package/.agents/scripts/lib/worktree/node-modules-strategy.js +5 -2
  23. package/.agents/workflows/agents-update.md +14 -29
  24. package/.agents/workflows/deliver.md +87 -26
  25. package/.agents/workflows/helpers/agents-sync-config.md +3 -2
  26. package/.agents/workflows/helpers/deliver-epic.md +12 -5
  27. package/.agents/workflows/helpers/deliver-stories.md +13 -7
  28. package/.agents/workflows/plan.md +48 -4
  29. package/README.md +18 -30
  30. package/bin/mandrel.js +235 -16
  31. package/docs/CHANGELOG.md +36 -0
  32. package/lib/cli/doctor.js +45 -3
  33. package/lib/cli/init.js +66 -7
  34. package/lib/cli/registry.js +42 -146
  35. package/lib/cli/sync.js +122 -23
  36. package/lib/cli/uninstall.js +42 -7
  37. package/lib/cli/update.js +257 -198
  38. package/lib/cli/version-helpers.js +59 -0
  39. package/package.json +6 -6
  40. package/.agents/workflows/onboard.md +0 -208
  41. package/lib/cli/__tests__/migrate.test.js +0 -268
  42. package/lib/cli/__tests__/sync-local-zone.test.js +0 -247
  43. package/lib/cli/__tests__/sync.test.js +0 -372
  44. package/lib/cli/__tests__/update-changelog-surface.test.js +0 -357
  45. package/lib/cli/__tests__/update-major.test.js +0 -217
  46. package/lib/cli/__tests__/update-reexec.test.js +0 -513
  47. package/lib/cli/__tests__/update.test.js +0 -696
  48. package/lib/cli/__tests__/version-check.test.js +0 -398
  49. package/lib/migrations/__tests__/index.test.js +0 -216
@@ -1,17 +1,19 @@
1
1
  ---
2
2
  description:
3
3
  Unified delivery entry point. Inspects the ticket type(s) and
4
- Epic-reference state of the supplied IDs, then routes to the Epic wave
5
- loop or the standalone multi-Story fan-out preserving every flag and
6
- the parallel-delivery contract of the retired commands.
4
+ Epic-reference state of the supplied IDs, composes a sequential segment
5
+ plan over any mix of Epics and standalone Stories, then delegates each
6
+ segment to the Epic wave loop or the standalone multi-Story fan-out —
7
+ preserving every flag and the parallel-delivery contract of the retired
8
+ commands.
7
9
  ---
8
10
 
9
- # /deliver [Epic ID] | [Story IDs...]
11
+ # /deliver [Epic IDs...] | [Story IDs...]
10
12
 
11
13
  ## Role
12
14
 
13
- Router. `/deliver` owns input classification and path selection only — all
14
- phase content lives in the two path helpers:
15
+ Router. `/deliver` owns input classification, segment-plan composition, and
16
+ path selection only — all phase content lives in the two path helpers:
15
17
 
16
18
  - [`helpers/deliver-epic.md`](helpers/deliver-epic.md) — the full Epic
17
19
  delivery loop (preflight, wave loop fanning out
@@ -30,20 +32,67 @@ reference) before routing:
30
32
 
31
33
  | Input | Route |
32
34
  | --- | --- |
33
- | Exactly one `type::epic` ID | **Epic path** — run [`helpers/deliver-epic.md`](helpers/deliver-epic.md) Phases 1–9 unchanged. |
34
- | One or more `type::story` IDs, none carrying an `Epic: #N` reference | **Standalone path** — run [`helpers/deliver-stories.md`](helpers/deliver-stories.md) Phases 0–3. |
35
- | Any Story carrying an `Epic: #N` reference | **Error**, naming the fix: `Story #<id> belongs to Epic #<n> run /deliver <n>`. |
36
- | Mixed Epic + Story IDs, or more than one Epic | **Error**: separate invocations one `/deliver <epicId>` per Epic, one `/deliver <id> [<id>...]` for the standalone set. |
37
-
38
- ## Flags (forwarded per path)
35
+ | Exactly one `type::epic` ID | **Epic path** — run [`helpers/deliver-epic.md`](helpers/deliver-epic.md) Phases 1–9 unchanged (single-segment plan; no confirmation prompt). |
36
+ | One or more `type::story` IDs, none carrying an `Epic: #N` reference | **Standalone path** — run [`helpers/deliver-stories.md`](helpers/deliver-stories.md) Phases 0–3 (single-segment plan; no confirmation prompt). |
37
+ | Any combination of ≥1 `type::epic` IDs and ≥0 standalone `type::story` IDs | **Segment plan** compose and execute the sequential segment plan below. |
38
+ | Any Story carrying an `Epic: #N` reference (alone or mixed into an otherwise-valid set) | **Error**, naming every affected ID and the fix: `Story #<id> belongs to Epic #<n> run /deliver <n>`. |
39
+
40
+ Per-ID classification is unchanged: fetch the `type::*` label and probe the
41
+ body for an `Epic: #N` reference before routing. Never guess a route.
42
+
43
+ ## Segment plan (mixed / multi-Epic input)
44
+
45
+ When the supplied IDs span more than one Epic, or mix Epics with standalone
46
+ Stories, the router composes a **segment plan** and executes the segments
47
+ **strictly sequentially**:
48
+
49
+ 1. **Standalone segment first** (when any standalone Story IDs are
50
+ present): the full standalone-Story set forms **one** segment,
51
+ delivered via [`helpers/deliver-stories.md`](helpers/deliver-stories.md)
52
+ Phases 0–3 unchanged. It runs first because it is fast, each Story
53
+ merges to `main` independently, and each subsequent Epic segment's
54
+ Phase 7.0 base-sync then integrates those merges naturally instead of
55
+ the Epic PR opening behind base.
56
+ 2. **Epic segments in input order**: each `type::epic` ID forms its own
57
+ segment, delivered via
58
+ [`helpers/deliver-epic.md`](helpers/deliver-epic.md) Phases 1–9
59
+ unchanged.
60
+
61
+ Sequential execution is a deliberate design decision: the Epic path assumes
62
+ a single main checkout (prepare's checkout guard, Phase 7.0
63
+ `git checkout epic/<id>`), holds a per-Epic lease, serializes same-machine
64
+ sessions via `epic-merge-lock.js`, and constrains dispatch to one wave at a
65
+ time. Segments are never interleaved or parallelized; running them one at a
66
+ time keeps both helpers' machinery untouched.
67
+
68
+ **Confirmation gate.** When the composed plan has more than one segment,
69
+ present it to the operator before dispatching — the segments, the IDs in
70
+ each, and the execution order — and wait for confirmation. `--yes`
71
+ suppresses this prompt. Single-segment plans route directly with today's
72
+ behavior (no new prompt; the standalone path's own Phase 1 confirmation
73
+ still applies as before).
74
+
75
+ **Failure policy.** A segment that ends non-complete (blocked, failed, or
76
+ halted at a gate) **stops the run** — no subsequent segment dispatches.
77
+ Report the terminal state: which segments completed, which segment halted
78
+ (and why), and which segments never started. Name the resume command:
79
+ re-running `/deliver` with the same IDs — both path helpers short-circuit
80
+ already-done work (the Epic path resumes idempotently from its checkpoint;
81
+ merged standalone Stories no-op).
82
+
83
+ ## Flags (scoped per segment)
39
84
 
40
85
  | Path | Flags |
41
86
  | --- | --- |
42
87
  | Epic | `--skip-epic-audit`, `--skip-code-review`, `--skip-retro`, `--full-retro`, `--steal`, `--as <handle>` |
43
88
  | Story | `--dep <from>:<to>`, `--yes`, `--concurrency <n>` |
44
89
 
45
- A flag passed to the wrong path is reported once as a no-op warning and
46
- ignored never an error.
90
+ In a segment plan, Epic-path flags apply to **every** Epic segment;
91
+ Story-path flags apply to the standalone segment. `--yes` additionally
92
+ suppresses the router's segment-plan confirmation gate above. A flag with
93
+ no applicable segment in the plan is reported once as a no-op warning and
94
+ ignored — never an error (the existing convention, restated for segment
95
+ plans).
47
96
 
48
97
  **Multi-Story parallel contract (preserved verbatim).**
49
98
 
@@ -55,31 +104,43 @@ behaves exactly as the retired multi-Story command did: the same
55
104
  `stories-wave-tick.js` wave plan, the same operator confirmation gate
56
105
  (suppressed by `--yes`), and the same parallel fan-out — one Agent call per
57
106
  Story per wave, capped by the resolved `concurrencyCap` — to
58
- [`helpers/single-story-deliver`](helpers/single-story-deliver.md).
107
+ [`helpers/single-story-deliver`](helpers/single-story-deliver.md). The
108
+ parallelism lives **inside** the standalone segment; segments themselves
109
+ remain strictly sequential.
59
110
 
60
111
  ## Procedure
61
112
 
62
113
  1. **Parse args.** At least one positive-integer ID is required.
63
114
  2. **Classify.** Fetch each ticket's labels + body and apply the input
64
- matrix above. Refuse ambiguous input with the matrix's error messages
65
- never guess a route.
66
- 3. **Delegate.** Read the selected path helper **in full** and execute it
67
- from its entry phase, forwarding the absorbed flags. The helper's phase
68
- numbering, watchdogs, gates, and scripts are unchanged — this router
69
- adds no phase content.
115
+ matrix above. Any Epic-attached Story ID is a hard error naming the
116
+ affected IDs and the fix — never guess a route.
117
+ 3. **Compose the segment plan.** Standalone-Story set (when present) as
118
+ one segment, then one segment per Epic ID in input order. For a
119
+ multi-segment plan, present it and wait for operator confirmation
120
+ (`--yes` suppresses).
121
+ 4. **Execute segments sequentially.** For each segment in order, read the
122
+ selected path helper **in full** and execute it from its entry phase,
123
+ forwarding the segment's scoped flags. The helper's phase numbering,
124
+ watchdogs, gates, and scripts are unchanged — this router adds no phase
125
+ content. Stop on the first non-complete segment per the failure policy.
126
+ 5. **Report.** On completion (or halt), summarize per-segment outcomes and,
127
+ when halted, the resume command.
70
128
 
71
129
  ## Constraints
72
130
 
73
- - `/deliver` requires a planned ticket: an Epic at `agent::ready` (the
74
- Epic helper's preflight enforces this) or well-formed standalone Stories.
75
- Planning happens in [`/plan`](plan.md); the plan-review gate between the
76
- two commands is a hard boundary.
131
+ - `/deliver` requires planned tickets: Epics at `agent::ready` (the
132
+ Epic helper's preflight enforces this, per segment) or well-formed
133
+ standalone Stories. Planning happens in [`/plan`](plan.md); the
134
+ plan-review gate between the two commands is a hard boundary.
77
135
  - The router performs no git or label mutations itself; the path helpers
78
136
  own every script invocation.
137
+ - Segments execute strictly sequentially — never interleave a standalone
138
+ Story fan-out with an Epic wave loop, and never run two Epic segments
139
+ concurrently.
79
140
 
80
141
  ## See also
81
142
 
82
143
  - [`/plan`](plan.md) — the unified planning entry point.
83
144
  - [`helpers/deliver-epic.md`](helpers/deliver-epic.md) /
84
145
  [`helpers/deliver-stories.md`](helpers/deliver-stories.md) — the path
85
- helpers.
146
+ helpers, delegated to per segment.
@@ -68,8 +68,9 @@ node .agents/scripts/sync-agentrc.js
68
68
  The script:
69
69
 
70
70
  1. Reads `.agentrc.json` from the working directory (`--cwd <path>` to
71
- override). When the file is missing, prints a pointer to
72
- `/agents-bootstrap-project` and exits 1.
71
+ override). When the file is missing, prints an error asking the
72
+ operator to run `mandrel init` (new project) or
73
+ `node .agents/scripts/bootstrap.js` (existing project) and exits 1.
73
74
  2. Validates the parsed config against the framework AJV schema
74
75
  (`getAgentrcValidator()`). On any failure, prints a single-line error
75
76
  list and exits 1 — the operator must fix the typo / missing required
@@ -14,9 +14,14 @@ description: >-
14
14
 
15
15
  ## Overview
16
16
 
17
- `/deliver` is the **single SDL execution command** in the 5.40 surface.
18
- It opens a PR against `main` and auto-merges when every signal certifies a
19
- clean run; otherwise it falls back to the operator-merges-button path.
17
+ This helper is the **Epic delivery path** behind `/deliver` — the router
18
+ delegates to it once per Epic ID, either as the sole route (single-Epic
19
+ input) or as one **Epic segment** of the sequential segment plan `/deliver`
20
+ composes over mixed Epic / standalone-Story input (Epic segments run in
21
+ input order, after the standalone segment; see
22
+ [`deliver.md`](../deliver.md)). Each invocation opens a PR against `main`
23
+ and auto-merges when every signal certifies a clean run; otherwise it falls
24
+ back to the operator-merges-button path.
20
25
 
21
26
  ```text
22
27
  /deliver <epicId>
@@ -32,8 +37,10 @@ clean run; otherwise it falls back to the operator-merges-button path.
32
37
  → Phase 9 — cleanup (BranchCleaner + Cleaner lifecycle listeners on epic.cleanup.start / epic.merge.armed; fire via lifecycle-emit → epic.merge.armed)
33
38
  ```
34
39
 
35
- The argument is always an Epic ID (`type::epic`). Story IDs go to
36
- [`/deliver`](deliver-stories.md) (standalone) or the
40
+ The argument is always a single Epic ID (`type::epic`) multi-Epic or
41
+ mixed input is segmented by the `/deliver` router before this helper runs.
42
+ Story IDs go to
43
+ [`helpers/deliver-stories`](deliver-stories.md) (standalone) or the
37
44
  [`helpers/epic-deliver-story`](epic-deliver-story.md) helper
38
45
  (Epic-attached, invoked by this workflow's fan-out); Tasks are not directly
39
46
  executable.
@@ -11,10 +11,14 @@ description: >-
11
11
 
12
12
  ## Overview
13
13
 
14
- `/deliver` is the **operator-facing multi-Story delivery command**. It
15
- takes one or more Story IDs, builds a dependency-aware wave plan, optionally
16
- confirms it with the operator, and fans out one Agent call per Story per wave
17
- parallel within each wave, serialised across waves.
14
+ This helper is the **standalone multi-Story delivery path** behind
15
+ `/deliver`. The router delegates to it whenever the supplied IDs include
16
+ standalone Stories either as the sole route (Story-only input) or as the
17
+ **standalone segment** of a mixed segment plan (run first, before any Epic
18
+ segments; see [`deliver.md`](../deliver.md)). It takes one or more Story
19
+ IDs, builds a dependency-aware wave plan, optionally confirms it with the
20
+ operator, and fans out one Agent call per Story per wave — parallel within
21
+ each wave, serialised across waves.
18
22
 
19
23
  ```text
20
24
  /deliver 101 102 103
@@ -33,11 +37,13 @@ confirms it with the operator, and fans out one Agent call per Story per wave
33
37
  | 1+ standalone Stories (no `Epic: #N` in body) | `/deliver <id> [<id>...]` |
34
38
  | Exactly one standalone Story (lighter path) | `/single-story-deliver <id>` |
35
39
  | Epic-attached Stories (have `Epic: #N`) | `/deliver <epicId>` |
40
+ | Mixed Epics + standalone Stories | `/deliver <ids...>` — the router composes a sequential segment plan; this helper delivers the standalone segment first |
36
41
 
37
- `/deliver` **refuses** Stories that carry an `Epic: #N` reference in
42
+ This helper **refuses** Stories that carry an `Epic: #N` reference in
38
43
  their body. Those Stories belong to an Epic's dispatch manifest and must flow
39
- through `/deliver`. Use `/single-story-deliver` for a single Epic-free
40
- Story when you want the leaner one-story path without wave machinery.
44
+ through `/deliver <epicId>`. Use `/single-story-deliver` for a single
45
+ Epic-free Story when you want the leaner one-story path without wave
46
+ machinery.
41
47
 
42
48
  > **Concurrency cap.** The cap is resolved **deterministically in code** by
43
49
  > `stories-wave-tick.js` (Phase 1a) — the same `resolveConfig` + `getRunners`
@@ -58,19 +58,61 @@ commands (story-sized Epic ↘ Story; epic-sized Story draft ↗ Epic) is now
58
58
  an **internal branch switch** inside this router: same skills, same
59
59
  helpers, no command hop and no operator re-entry.
60
60
 
61
+ ## First-run preflight
62
+
63
+ Before routing to a path helper, run a **first-run preflight** to catch
64
+ common day-0 issues that would silently degrade every downstream task.
65
+
66
+ ### When the preflight fires
67
+
68
+ The preflight runs when **any** of these is true:
69
+
70
+ 1. One or more `project.docsContextFiles` entries are absent under the
71
+ configured `docsRoot`.
72
+ 2. One or more present `docsContextFiles` still carry the
73
+ `<!-- MANDREL:STUB -->` marker (i.e. they are un-edited scaffolded stubs).
74
+ 3. The last `mandrel doctor` verdict cached in `temp/doctor-result.json`
75
+ records `"verdict": "unready"`. An **absent** cache file is no signal —
76
+ doctor may simply never have run; only an explicit recorded unready
77
+ verdict fires this signal.
78
+
79
+ ### Preflight procedure
80
+
81
+ 1. **Detect the condition.** Check the three signals above. When none is
82
+ true, skip the preflight entirely — no operator interaction, no delay.
83
+ 2. **Offer to flesh out docs.** Summarize the found condition to the
84
+ operator (e.g. "3 docsContextFiles are missing" or "architecture.md
85
+ still carries the stub marker") and ask:
86
+ > *Do you want to flesh out these docs from the codebase before planning?
87
+ > [y/N]*
88
+ 3. **On acceptance.** Walk through each affected file, read relevant
89
+ codebase artifacts (source files, README, existing docs), and write real
90
+ content to replace the stub. Then re-run `mandrel doctor` to confirm
91
+ readiness. If doctor passes, proceed to routing.
92
+ 4. **On decline.** Log one line:
93
+ > *[plan] Proceeding with degraded doc context — planning quality may be
94
+ > reduced.*
95
+ Then continue to the normal routing procedure below.
96
+
97
+ The preflight is **never a hard stop** — declining continues planning with a
98
+ noted degradation. It only fires when there is a genuine signal (missing or
99
+ stubbed docs, or an unready doctor verdict).
100
+
61
101
  ## Procedure
62
102
 
63
103
  1. **Parse args.** Exactly one of `<epicId>`, `--idea`, `--from-notes`, or
64
104
  `--body` must be present; anything else is a usage error naming the four
65
105
  forms. A `--body` invocation routes to the story path (no triage).
66
- 2. **Triage (idea path only).** Run the
106
+ 2. **First-run preflight.** Run the preflight above. Skip when all signals
107
+ are clear (healthy project).
108
+ 3. **Triage (idea path only).** Run the
67
109
  [`core/scope-triage`](../skills/core/scope-triage/SKILL.md) skill on the
68
110
  seed. Record the verdict in chat (one line).
69
- 3. **Delegate.** Read the selected path helper **in full** and execute it
111
+ 4. **Delegate.** Read the selected path helper **in full** and execute it
70
112
  from its entry phase, forwarding the absorbed flags. The helper's phase
71
113
  numbering, HITL gates, and scripts are unchanged — this router adds no
72
114
  phase content.
73
- 4. **Internal returns.** When a path helper would historically have handed
115
+ 5. **Internal returns.** When a path helper would historically have handed
74
116
  off to the other planning command, switch helpers in-place and continue;
75
117
  surface the switch to the operator as a one-line note.
76
118
 
@@ -84,6 +126,8 @@ helpers, no command hop and no operator re-entry.
84
126
 
85
127
  ## See also
86
128
 
87
- - [`/deliver`](deliver.md) — the unified delivery entry point.
129
+ - [`/deliver`](deliver.md) — the unified delivery entry point. Accepts a
130
+ single Epic, one or more standalone Stories, or any mix of ≥1 Epics and
131
+ standalone Stories — mixed sets compose a sequential segment plan.
88
132
  - [`helpers/plan-epic.md`](helpers/plan-epic.md) /
89
133
  [`helpers/plan-story.md`](helpers/plan-story.md) — the path helpers.
package/README.md CHANGED
@@ -25,37 +25,31 @@ provisions both as part of a cold start (`git init` → `gh repo create --push`
25
25
  provisioning, grant the scope with `gh auth refresh -s project` (re-auth
26
26
  in the browser when prompted) before running `bootstrap.js`.
27
27
 
28
- See the [Compatibility matrix](docs/upgrade-major.md#compatibility-matrix)
29
- section of `docs/upgrade-major.md` for the supported OS / Node /
30
- package-manager combinations.
31
-
32
28
  ## Quickstart
33
29
 
34
- The canonical cold-start path is one command, then two slash
35
- commands inside Claude Code:
30
+ The canonical cold-start path is one command, then one slash command:
36
31
 
37
32
  ```bash
38
- npx mandrel init # install mandrel → sync → prompt → bootstrap
33
+ npx mandrel init # install mandrel → sync → prompt → bootstrap → onboarding tail → /plan handoff
39
34
  ```
40
35
 
41
36
  ```text
42
37
  # then, inside Claude Code (commands load from .claude/commands/):
43
- /onboard # guided first run: stack detect → docs → doctor → /plan
44
38
  /plan # ideation -> PRD/Tech Spec -> Epic with child Stories
45
39
  ```
46
40
 
47
41
  `npx mandrel init` installs `mandrel` (when `./.agents/` is absent),
48
42
  materializes it via `mandrel sync`, then asks whether to **configure now**
49
- (option 1 → runs `node .agents/scripts/bootstrap.js`, forwarding any flags you
50
- pass) or stop at **just the files** (option 2 → re-run `mandrel init` any time
51
- to configure). Pass `--assume-yes` for a non-interactive run that proceeds
52
- straight to configure (and forwards the flag to bootstrap). When `./.agents/`
53
- is already present (you ran `npm install mandrel` first), `init` skips the
54
- install/sync and goes straight to the prompt. `/onboard` then walks you from a
55
- clean checkout to a planned Epic (stack detection, docs scaffolding, a
56
- `mandrel doctor` readiness gate, and a started `/plan`). Once you have a
57
- planned Epic, deliver it with `/deliver <id>` (wave loop → validation →
58
- review → retro → open PR).
43
+ (option 1 → runs `bootstrap.js`, then the onboarding tail: stack detection,
44
+ docs scaffolding offer, `mandrel doctor` readiness gate, and a `/plan`
45
+ handoff) or stop at **just the files** (option 2 → re-run `mandrel init`
46
+ any time to configure). Pass `--assume-yes` for a non-interactive run that
47
+ proceeds straight to configure (and forwards the flag to bootstrap). When
48
+ `./.agents/` is already present (you ran `npm install mandrel` first), `init`
49
+ skips the install/sync and goes straight to the prompt. Once `mandrel init`
50
+ completes, you land at the `/plan` handoff — run `/plan --idea "<seed>"` to
51
+ start planning your first Epic, then deliver it with `/deliver <id>` (wave
52
+ loop → validation → review → retro → open PR).
59
53
 
60
54
  ### Manual equivalent
61
55
 
@@ -108,29 +102,23 @@ npx mandrel update
108
102
 
109
103
  1. **Resolve** the newest published version (a `npm view mandrel
110
104
  version` registry probe) and the currently installed version.
111
- 2. **Major gate** — if the newest version crosses a major boundary
112
- (e.g. `1.x 2.0`), the command declines, prints a pointer to
113
- [`docs/upgrade-major.md`](docs/upgrade-major.md), and exits non-zero
114
- without touching anything. Re-run with `--major` to apply it.
115
- 3. **No-op short-circuit** — already on the newest version ⇒ nothing to do.
116
- 4. **Install** the target version with the project's package manager —
105
+ 2. **No-op short-circuit** — already on the newest version nothing to do.
106
+ 3. **Install** the target version with the project's package manager
117
107
  auto-detected from the lockfile (`pnpm-lock.yaml` ⇒ pnpm, `yarn.lock` ⇒
118
108
  yarn, otherwise npm) so the bump lands in your real lockfile. The
119
109
  dependency bump is left **staged** on disk — `mandrel update` performs no
120
110
  `git add` / `git commit`, so you review and commit the lockfile change
121
111
  yourself.
122
- 5. **Sync** — re-materialize `./.agents/` from the freshly installed payload.
123
- 6. **Migrate** — apply version-keyed migration steps for the crossed range.
124
- 7. **Doctor** — run the check registry to verify the resulting install.
125
- 8. **Surface** the target changelog section.
112
+ 4. **Sync** — re-materialize `./.agents/` from the freshly installed payload.
113
+ 5. **Migrate** — apply version-keyed migration steps for the crossed range.
114
+ 6. **Doctor** — run the check registry to verify the resulting install.
115
+ 7. **Surface** the target changelog section.
126
116
 
127
117
  ### Flags
128
118
 
129
119
  - `--dry-run` — print the resolved target version and the ordered step
130
120
  plan, then exit. No dependency is bumped, no file is written, no seam
131
121
  runs.
132
- - `--major` — apply a major-version crossing that the gate would otherwise
133
- refuse. Review [`docs/upgrade-major.md`](docs/upgrade-major.md) first.
134
122
  - `--install-cmd "<cmd>"` — override the auto-detected install command. The
135
123
  package manager is normally detected from your lockfile
136
124
  (`pnpm-lock.yaml` ⇒ `pnpm add -D …`, `yarn.lock` ⇒ `yarn add -D …`,