mandrel 1.76.0 → 1.77.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/docs/configuration.md +2 -2
- package/.agents/schemas/agentrc.schema.json +1 -1
- package/.agents/schemas/dispatch-manifest.json +1 -1
- package/.agents/schemas/validation-evidence.schema.json +2 -1
- package/.agents/scripts/audit-to-stories.js +43 -1
- package/.agents/scripts/epic-deliver-prepare.js +31 -0
- package/.agents/scripts/evidence-gate.js +48 -12
- package/.agents/scripts/lib/audit-to-stories/build-story-body.js +141 -34
- package/.agents/scripts/lib/cli-args.js +6 -0
- package/.agents/scripts/lib/close-validation/runner.js +25 -8
- package/.agents/scripts/lib/config/temp-paths.js +1 -1
- package/.agents/scripts/lib/config/worktree-isolation.js +18 -3
- package/.agents/scripts/lib/config-resolver.js +4 -1
- package/.agents/scripts/lib/config-settings-schema-delivery.js +1 -1
- package/.agents/scripts/lib/git-branch-lifecycle.js +90 -0
- package/.agents/scripts/lib/orchestration/auto-merge-cwd.js +128 -0
- package/.agents/scripts/lib/orchestration/column-sync.js +88 -9
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-armer.js +20 -2
- package/.agents/scripts/lib/orchestration/project-meta-cache.js +238 -0
- package/.agents/scripts/lib/orchestration/reassert-status-column.js +3 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/auto-merge.js +25 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/close-validation.js +80 -14
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +74 -25
- package/.agents/scripts/lib/orchestration/story-close/phases/locked-pipeline.js +10 -1
- package/.agents/scripts/lib/orchestration/ticket-validator-conflicts.js +48 -1
- package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +148 -4
- package/.agents/scripts/lib/orchestration/ticketing/transition.js +8 -1
- package/.agents/scripts/lib/story-body/story-body.js +76 -7
- package/.agents/scripts/lib/story-init/branch-initializer.js +29 -43
- package/.agents/scripts/lib/story-init/hierarchy-tracer.js +25 -4
- package/.agents/scripts/lib/story-init/task-graph-builder.js +22 -12
- package/.agents/scripts/lib/templates/decomposer-prompts.js +23 -0
- package/.agents/scripts/lib/validation-evidence.js +63 -25
- package/.agents/scripts/lib/worktree/node-modules-strategy.js +239 -31
- package/.agents/scripts/resync-status-column.js +5 -0
- package/.agents/scripts/run-coverage.js +85 -45
- package/.agents/scripts/single-story-init.js +22 -29
- package/.agents/scripts/story-init.js +38 -63
- package/.agents/scripts/story-phase.js +46 -4
- package/.agents/skills/core/epic-plan-decompose-author/SKILL.md +5 -3
- package/.agents/workflows/helpers/acceptance-self-eval.md +27 -0
- package/.agents/workflows/helpers/deliver-epic.md +19 -2
- package/.agents/workflows/helpers/epic-deliver-story.md +50 -14
- package/.agents/workflows/helpers/single-story-deliver.md +12 -0
- package/docs/CHANGELOG.md +33 -0
- package/package.json +1 -1
|
@@ -77,9 +77,22 @@ the parent's permissions but have **no input channel** mid-run.
|
|
|
77
77
|
Run from the **main checkout** (the worktree does not exist yet):
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
-
node .agents/scripts/story-init.js --story <storyId>
|
|
80
|
+
node .agents/scripts/story-init.js --story <storyId> \
|
|
81
|
+
--prd <prdId> --tech-spec <techSpecId>
|
|
81
82
|
```
|
|
82
83
|
|
|
84
|
+
**Thread the Epic linkages (Story #4253).** The parent `/deliver` resolved
|
|
85
|
+
the Epic's `prdId` / `techSpecId` **once** in its Phase 1 prepare and passed
|
|
86
|
+
them into your dispatch prompt. Forward them as `--prd` / `--tech-spec` so
|
|
87
|
+
this `story-init.js` run **skips** the per-Story `getEpic` round-trip — the
|
|
88
|
+
two ids are invariant for the whole delivery run, so re-fetching the
|
|
89
|
+
immutable Epic per Story is pure waste (and secondary-rate-limit pressure
|
|
90
|
+
during wide fan-out). **Omit** whichever flag the prompt reported as `null`;
|
|
91
|
+
`story-init.js` then falls back to its own `getEpic` resolution for the
|
|
92
|
+
missing id (graceful degradation on a missing Epic linkage). When dispatched
|
|
93
|
+
interactively with neither flag, drop both — the legacy single-fetch path is
|
|
94
|
+
unchanged.
|
|
95
|
+
|
|
83
96
|
> **Execution mode (sub-agents must read).** This command typically takes
|
|
84
97
|
> 3–6 minutes when the worktree's per-tree install runs. Invoke it
|
|
85
98
|
> **synchronously** with the Bash tool's maximum timeout
|
|
@@ -139,11 +152,15 @@ the Story-level rollup the parent `/deliver` aggregator reads).
|
|
|
139
152
|
Run a single Story-implementation phase against the inline `acceptance[]`
|
|
140
153
|
/ `verify[]` arrays on the Story body.
|
|
141
154
|
|
|
142
|
-
1. Flip the snapshot to the `implementing` phase
|
|
155
|
+
1. Flip the snapshot to the `implementing` phase. Pass `--epic <epicId>`
|
|
156
|
+
and `--branch story-<storyId>` from the Step 0 envelope so the render
|
|
157
|
+
skips the `readEpicIdFromStory` / `resolveStoryBranch` GitHub reads
|
|
158
|
+
(pass these same flags to **every** `story-phase.js` call below):
|
|
143
159
|
|
|
144
160
|
```bash
|
|
145
161
|
node .agents/scripts/story-phase.js \
|
|
146
|
-
--story <storyId> --
|
|
162
|
+
--story <storyId> --epic <epicId> --branch story-<storyId> \
|
|
163
|
+
--phase implementing
|
|
147
164
|
```
|
|
148
165
|
|
|
149
166
|
2. Read the Story body's inline `acceptance[]` and `verify[]` arrays
|
|
@@ -166,11 +183,14 @@ Run a single Story-implementation phase against the inline `acceptance[]`
|
|
|
166
183
|
evidence** — they are no longer optional advisory pre-flight.
|
|
167
184
|
|
|
168
185
|
5. Once the eval loop returns `proceed`, flip the snapshot to `closing`
|
|
169
|
-
and proceed to Step 3
|
|
186
|
+
and proceed to Step 3 (Step 3 invokes close directly — it no longer
|
|
187
|
+
re-renders the `closing` snapshot, so this is the single `closing`
|
|
188
|
+
render):
|
|
170
189
|
|
|
171
190
|
```bash
|
|
172
191
|
node .agents/scripts/story-phase.js \
|
|
173
|
-
--story <storyId> --
|
|
192
|
+
--story <storyId> --epic <epicId> --branch story-<storyId> \
|
|
193
|
+
--phase closing
|
|
174
194
|
```
|
|
175
195
|
|
|
176
196
|
6. If blocked (including by the eval loop reaching its round cap with
|
|
@@ -180,7 +200,8 @@ Run a single Story-implementation phase against the inline `acceptance[]`
|
|
|
180
200
|
|
|
181
201
|
```bash
|
|
182
202
|
node .agents/scripts/story-phase.js \
|
|
183
|
-
--story <storyId> --
|
|
203
|
+
--story <storyId> --epic <epicId> --branch story-<storyId> \
|
|
204
|
+
--phase blocked
|
|
184
205
|
```
|
|
185
206
|
|
|
186
207
|
### Step 1a — Bounded acceptance self-eval loop (**required, not optional**)
|
|
@@ -195,6 +216,18 @@ The critic reads the Story's inline `acceptance[]` / `verify[]` arrays from the
|
|
|
195
216
|
|
|
196
217
|
Epic-attached specifics for this path:
|
|
197
218
|
|
|
219
|
+
- **Critic evidence-share** (Story #4250). When the critic runs a `verify[]`
|
|
220
|
+
command that is byte-identical to a close gate (`lint` / `typecheck`), it
|
|
221
|
+
records the pass into the Epic-keyed evidence keyspace via `--epic-id
|
|
222
|
+
<epicId>` so `story-close.js` short-circuits the gate at unchanged HEAD.
|
|
223
|
+
Run it in the **Story worktree** (`.worktrees/story-<storyId>`):
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
node .agents/scripts/evidence-gate.js \
|
|
227
|
+
--epic-id <epicId> --scope-id <storyId> --gate lint \
|
|
228
|
+
--worktree .worktrees/story-<storyId> -- npm run lint
|
|
229
|
+
```
|
|
230
|
+
|
|
198
231
|
- **Gate invocation** (pass `--epic <epicId>` so the per-criterion signal lands
|
|
199
232
|
on the Epic-scoped stream):
|
|
200
233
|
|
|
@@ -235,16 +268,18 @@ fine as advisory pre-flight.)
|
|
|
235
268
|
|
|
236
269
|
## Step 3 — Close (`story-close.js`)
|
|
237
270
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
271
|
+
Step 1 item 5 already flipped the snapshot to the `closing` phase, so this
|
|
272
|
+
step does **not** re-render it (the duplicate render was removed). Invoke
|
|
273
|
+
close directly. Pass the parent Epic id via `--epic <epicId>` from the
|
|
274
|
+
Step 0 envelope so close skips re-parsing the Epic hierarchy off the
|
|
275
|
+
Story body (which also closes the malformed-`Epic:`-line failure mode).
|
|
276
|
+
Pass the main-checkout path via `--cwd` so the merge and branch deletion
|
|
277
|
+
run against the main repo (branches checked out in a worktree cannot be
|
|
241
278
|
deleted from themselves):
|
|
242
279
|
|
|
243
280
|
```bash
|
|
244
|
-
node
|
|
245
|
-
--story <storyId> --
|
|
246
|
-
|
|
247
|
-
node <main-repo>/.agents/scripts/story-close.js --story <storyId> --cwd <main-repo>
|
|
281
|
+
node <main-repo>/.agents/scripts/story-close.js \
|
|
282
|
+
--story <storyId> --epic <epicId> --cwd <main-repo>
|
|
248
283
|
```
|
|
249
284
|
|
|
250
285
|
In single-tree mode, `--cwd` defaults to `PROJECT_ROOT`. The script merges
|
|
@@ -261,7 +296,8 @@ After close, upsert a terminal snapshot:
|
|
|
261
296
|
|
|
262
297
|
```bash
|
|
263
298
|
node .agents/scripts/story-phase.js \
|
|
264
|
-
--story <storyId> --
|
|
299
|
+
--story <storyId> --epic <epicId> --branch story-<storyId> \
|
|
300
|
+
--phase done
|
|
265
301
|
```
|
|
266
302
|
|
|
267
303
|
---
|
|
@@ -215,6 +215,18 @@ proceed / redraft / block decision) is the single-homed include
|
|
|
215
215
|
|
|
216
216
|
Standalone specifics for this path:
|
|
217
217
|
|
|
218
|
+
- **Critic evidence-share** (Story #4250). When the critic runs a `verify[]`
|
|
219
|
+
command that is byte-identical to a close gate (`lint` / `typecheck`), it
|
|
220
|
+
records the pass into the standalone evidence keyspace via `--standalone`
|
|
221
|
+
(no parent Epic to key on) so Step 3's close short-circuits the gate at
|
|
222
|
+
unchanged HEAD. Run it in the **Story worktree** (`workCwd` from Step 0):
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
node <main-repo>/.agents/scripts/evidence-gate.js \
|
|
226
|
+
--standalone --scope-id <storyId> --gate lint \
|
|
227
|
+
--worktree <workCwd> -- npm run lint
|
|
228
|
+
```
|
|
229
|
+
|
|
218
230
|
- **Gate invocation** (omit `--epic` — there is no parent Epic):
|
|
219
231
|
|
|
220
232
|
```bash
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.77.0](https://github.com/dsj1984/mandrel/compare/mandrel-v1.76.0...mandrel-v1.77.0) (2026-06-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
* **close-validation:** unify evidence keyspace — critic verify[] sharing + standalone parity (refs [#4250](https://github.com/dsj1984/mandrel/issues/4250)) ([#4266](https://github.com/dsj1984/mandrel/issues/4266)) ([0555f3b](https://github.com/dsj1984/mandrel/commit/0555f3b0aaeabfb09c2ab02ed2bf7f5182a96c28))
|
|
11
|
+
* **decompose-gates:** emit a deterministic soft missing-reason-to-exist finding + document reason_to_exist in the author SKILL (refs [#4273](https://github.com/dsj1984/mandrel/issues/4273)) ([#4280](https://github.com/dsj1984/mandrel/issues/4280)) ([98d3d5b](https://github.com/dsj1984/mandrel/commit/98d3d5b3d4ba8aa1c5485f5728e44bda09a6f3d3))
|
|
12
|
+
* **decompose:** single-source the binding-vs-advisory authoring altitude + New-File Contract into the decomposer prompt (refs [#4272](https://github.com/dsj1984/mandrel/issues/4272)) ([#4279](https://github.com/dsj1984/mandrel/issues/4279)) ([3fc9adb](https://github.com/dsj1984/mandrel/commit/3fc9adb848226e4ef90463e31d5cbabb3f350c7f))
|
|
13
|
+
* **deliver:** add --epic/--branch flags to story-phase.js and drop duplicate closing snapshot (refs [#4256](https://github.com/dsj1984/mandrel/issues/4256)) ([#4261](https://github.com/dsj1984/mandrel/issues/4261)) ([0f75eda](https://github.com/dsj1984/mandrel/commit/0f75eda48568d136803cd714ab0fd04bc341033d))
|
|
14
|
+
* overhaul worktree install: copy-on-write node_modules + correct, PM-aware retry ([#4249](https://github.com/dsj1984/mandrel/issues/4249)) ([#4267](https://github.com/dsj1984/mandrel/issues/4267)) ([ce92a71](https://github.com/dsj1984/mandrel/commit/ce92a71b47a7851a04ce4d48ce6fa16c9ea41988))
|
|
15
|
+
* persist Projects v2 board metadata to a disk cache ([#4252](https://github.com/dsj1984/mandrel/issues/4252)) ([#4263](https://github.com/dsj1984/mandrel/issues/4263)) ([277d9ec](https://github.com/dsj1984/mandrel/commit/277d9ecd8ac05fa291bb873a57966fc67d768205))
|
|
16
|
+
* **story-body:** add optional advisory non_goals negative-scope section (refs [#4275](https://github.com/dsj1984/mandrel/issues/4275)) ([#4281](https://github.com/dsj1984/mandrel/issues/4281)) ([e118482](https://github.com/dsj1984/mandrel/commit/e118482aa5aa6ae2874c1da9d470d8c53b26bdf8))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
* **decompose-gates:** parse string Story bodies in sizing/conflict gates (refs [#4271](https://github.com/dsj1984/mandrel/issues/4271)) ([#4277](https://github.com/dsj1984/mandrel/issues/4277)) ([6c804a4](https://github.com/dsj1984/mandrel/commit/6c804a4b6645f0742ba21ef145a5dc5a351b21bb))
|
|
22
|
+
* rebuild the audit-to-stories Story body to the canonical inline-contract shape and gate it before issue creation ([#4270](https://github.com/dsj1984/mandrel/issues/4270)) ([#4278](https://github.com/dsj1984/mandrel/issues/4278)) ([058ff7b](https://github.com/dsj1984/mandrel/commit/058ff7b13ec799c11ed2ddf134adaf82c289168f))
|
|
23
|
+
* **single-story-close:** release assignee-lease on recoverable-blocked exits (refs [#4257](https://github.com/dsj1984/mandrel/issues/4257)) ([#4268](https://github.com/dsj1984/mandrel/issues/4268)) ([108fa5f](https://github.com/dsj1984/mandrel/commit/108fa5f834121bf53c5cb59005415ea30b6e990f))
|
|
24
|
+
* **story-body:** close section on unrecognized heading to stop content bleed (refs [#4274](https://github.com/dsj1984/mandrel/issues/4274)) ([#4276](https://github.com/dsj1984/mandrel/issues/4276)) ([808d508](https://github.com/dsj1984/mandrel/commit/808d5080fee460f24cae8ef43b2c8c1b442de1f3))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Performance
|
|
28
|
+
|
|
29
|
+
* **coverage:** make run-coverage.js host-aware for --test-concurrency (refs [#4254](https://github.com/dsj1984/mandrel/issues/4254)) ([#4260](https://github.com/dsj1984/mandrel/issues/4260)) ([0078195](https://github.com/dsj1984/mandrel/commit/0078195afeee50fafefdaf4dea3d59b33b172cc6))
|
|
30
|
+
* **deliver:** resolve Epic once and thread --prd/--tech-spec into story-init (refs [#4253](https://github.com/dsj1984/mandrel/issues/4253)) ([#4269](https://github.com/dsj1984/mandrel/issues/4269)) ([8dbc006](https://github.com/dsj1984/mandrel/commit/8dbc006882379ccdfb5dca90d8d8bca11c2dbb0e))
|
|
31
|
+
* **story-init:** short-circuit childless 2-tier sub-issues + Search probe in buildTaskGraph (refs [#4251](https://github.com/dsj1984/mandrel/issues/4251)) ([#4265](https://github.com/dsj1984/mandrel/issues/4265)) ([7c8fcd2](https://github.com/dsj1984/mandrel/commit/7c8fcd21a9c781bd2e4592d7c8e7b4bf8476cd22))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
* **story-init:** single-home the duplicated branch-seed action switch (refs [#4255](https://github.com/dsj1984/mandrel/issues/4255)) ([#4264](https://github.com/dsj1984/mandrel/issues/4264)) ([7a6f2ec](https://github.com/dsj1984/mandrel/commit/7a6f2ec9c2e7ce0b680c620e9bb52541ec37db1b))
|
|
37
|
+
|
|
5
38
|
## [1.76.0](https://github.com/dsj1984/mandrel/compare/mandrel-v1.75.0...mandrel-v1.76.0) (2026-06-20)
|
|
6
39
|
|
|
7
40
|
|
package/package.json
CHANGED