immune-brain 5.1.1 → 5.2.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 (53) hide show
  1. package/README.md +13 -6
  2. package/README.zh-CN.md +12 -5
  3. package/package.json +1 -1
  4. package/plugins/immune-brain/.claude-plugin/plugin.json +1 -1
  5. package/plugins/immune-brain/.pi-extension/imm-canary-enroll.ts +14 -2
  6. package/plugins/immune-brain/.pi-extension/imm-canary-work.ts +93 -0
  7. package/plugins/immune-brain/.pi-extension/imm-unattended-batch.ts +81 -13
  8. package/plugins/immune-brain/agents/immune-brain-reviewer.md +20 -0
  9. package/plugins/immune-brain/dist/BASELINE.md +1 -1
  10. package/plugins/immune-brain/dist/claude/mcp-server.mjs +8573 -7449
  11. package/plugins/immune-brain/dist/docs/reference/planning-quality-gate.md +1 -1
  12. package/plugins/immune-brain/dist/imm-brainstorm.md +6 -6
  13. package/plugins/immune-brain/dist/imm-doc-prune.md +2 -1
  14. package/plugins/immune-brain/dist/imm-planner.md +63 -37
  15. package/plugins/immune-brain/dist/imm-run.md +137 -12
  16. package/plugins/immune-brain/dist/imm-test-prune.md +233 -0
  17. package/plugins/immune-brain/dist/registry.yaml +9 -0
  18. package/plugins/immune-brain/dist/role-prompts/code-review.md +20 -0
  19. package/plugins/immune-brain/dist/role-prompts/executor.md +15 -0
  20. package/plugins/immune-brain/hooks/hooks.json +31 -1
  21. package/plugins/immune-brain/runtime/assurance/active_task_notice.ts +42 -0
  22. package/plugins/immune-brain/runtime/assurance/alias_file.ts +24 -0
  23. package/plugins/immune-brain/runtime/assurance/coordinator.ts +9 -0
  24. package/plugins/immune-brain/runtime/assurance/delivery_workspace.ts +4 -1
  25. package/plugins/immune-brain/runtime/assurance/phase_entry.ts +143 -0
  26. package/plugins/immune-brain/runtime/claude/interaction.ts +10 -1
  27. package/plugins/immune-brain/runtime/claude/kernel_ports.ts +32 -6
  28. package/plugins/immune-brain/runtime/claude/lane_guard.ts +210 -0
  29. package/plugins/immune-brain/runtime/claude/mcp_server.ts +85 -7
  30. package/plugins/immune-brain/runtime/claude/review_host.ts +6 -6
  31. package/plugins/immune-brain/runtime/commands/kernel.ts +54 -1
  32. package/plugins/immune-brain/runtime/github_issue_tracker.ts +235 -7
  33. package/plugins/immune-brain/runtime/kernel/runtime_contracts.json +7 -0
  34. package/plugins/immune-brain/runtime/kernel/runtime_contracts.ts +75 -0
  35. package/plugins/immune-brain/runtime/plugin_version.ts +1 -1
  36. package/plugins/immune-brain/runtime/prompts/code-review.md +20 -0
  37. package/plugins/immune-brain/runtime/prompts/executor.md +15 -0
  38. package/plugins/immune-brain/runtime/unattended/batch_delegation.ts +160 -0
  39. package/plugins/immune-brain/runtime/unattended/batch_final_verification.ts +72 -0
  40. package/plugins/immune-brain/runtime/unattended/batch_lanes.ts +396 -23
  41. package/plugins/immune-brain/runtime/unattended/batch_leak_restore.ts +131 -0
  42. package/plugins/immune-brain/runtime/unattended/batch_preflight.ts +25 -4
  43. package/plugins/immune-brain/runtime/unattended/batch_reasons.ts +3 -2
  44. package/plugins/immune-brain/runtime/unattended/batch_runner.ts +42 -0
  45. package/plugins/immune-brain/runtime/unattended/batch_schedule.ts +40 -0
  46. package/plugins/immune-brain/runtime/unattended/batch_state.ts +155 -0
  47. package/plugins/immune-brain/runtime/unattended/lane_workspace.ts +58 -0
  48. package/plugins/immune-brain/skills/BASELINE.md +1 -1
  49. package/plugins/immune-brain/skills/imm-brainstorm/SKILL.md +3 -2
  50. package/plugins/immune-brain/skills/imm-planner/SKILL.md +8 -6
  51. package/plugins/immune-brain/skills/imm-run/SKILL.md +2 -1
  52. package/plugins/immune-brain/skills/imm-test-prune/SKILL.md +28 -0
  53. package/plugins/immune-brain/skills/registry.yaml +9 -0
@@ -25,7 +25,7 @@ Apply the gate when the task touches one or more of these surfaces:
25
25
  - **TaskIntent decomposition**: use Technical Design boundaries as one retain/split criterion with outcome, Verification, dependency, risk, rollback, compatibility, and authority. Split a successor TaskIntent only when a service, state-machine owner, migration, independently promotable layer, or sequence dependency needs independent verification, rollback, authorization, or settlement. A TaskIntent should normally change one primary trust-boundary invariant, but traversing several boundaries or updating both sides of one authority chain does not itself require a split. Split independently verifiable, reversible, authorizable, migratable, or settleable trust invariants. Keep multiple trust-boundary changes together only for one atomic security outcome whose split would create an unsafe or unusable intermediate state, and record that rationale in the Spec. Treat this as Planner judgment rather than a schema field or Enrollment counting rule. Do not split merely because the design names several layers, files, or services, and do not revive prose Plan authority. For a multi-TaskIntent Initiative only, require each Slice to state what is observable and verifiable when that Slice alone has landed, and no acceptance may require another unfinished Slice's work to pass; a Slice with no such statement is a horizontal layer slice and is re-cut. Record the exception for a wide mechanical refactor whose blast radius prevents any green vertical slice, with the rationale and a final integrate-and-verify Slice that the batches block.
26
26
  - **Mermaid intent**: use Mermaid only when it clarifies structure, sequence, data flow, or state transitions; it is not a universal gate or a second source of truth. Medium/High risk Specs record `**Diagram decision**: required|not_required` and a non-empty `**Diagram reason**:`. A `required` decision must include Mermaid; `not_required` explains why prose is sufficient. Low-risk Specs omit the empty ceremony and record neither field.
27
27
  - **Design Conformance**: before final closure, require Spec-to-implementation evidence. A local implementation mismatch routes to `rework`; a structural or intended design change routes to `replan` through Planner. QA cannot silently approve a design change.
28
- - **Brainstorm traceability**: ensure every `BR-*` item listed in `Brainstorm manifest` is mapped in `Brainstorm Trace`. Every Spec decision and every acceptance names exactly one source — an upstream `BR-*` ID, repository evidence, or a delegated technical choice — with or without an upstream manifest, and a user-owned decision that names no source is a defect the Planner removes or returns for clarification.
28
+ - **Brainstorm traceability**: ensure every `BR-*` item listed in `Brainstorm manifest` is mapped in `Brainstorm Trace`. Every Spec decision and every acceptance names exactly one source — an upstream `BR-*` ID, repository evidence, or a delegated technical choice — with or without an upstream manifest, and a user-owned decision that names no source is a defect the Planner removes or returns for clarification. A Spec for work with a user-observable change has a `User scenarios` section; each scenario keeps its upstream `BR-SCN-<n>` ID, or on direct entry is confirmed in clarification and recorded as Spec-local `SCN-<n>`, is tagged `automated` with at least one acceptance ID or `manual` with the reason it cannot be automated, and the mapping is one-way. In a multi-TaskIntent Initiative a scenario belongs to exactly one Slice, the one that first makes it observable. `BR-SCN-*` items fall under the existing handoff completeness check, a scenario with no source is a defect, and `no user-visible change` requires a recorded reason.
29
29
  - **roadmap information preservation**: for large or multi-phase work, distinguish the Roadmap from the current executable slice, preserve deferred phase goals, open questions, promotion criteria, and candidate next Plans.
30
30
  - **executable-slice discipline**: the Plan promises only the current executable slice — one coherent set of Steps sharing acceptance, review, rollback, and authority boundaries. Future-phase logic, speculative architecture, and unvalidated assumptions belong in the Roadmap or as explicitly Deferred items, never as active Steps. Do not enforce a fixed Step count: multiple Steps inside one shared boundary are fine, and a single Step that smuggles in unvalidated future architecture is still over-planning.
31
31
  - **Plan boundary cohesion**: treat Plan granularity separately from Step and Roadmap Phase granularity. Confirm the current Plan contains one coherent executable slice and explain why its outcome, authority, risk, verification, review, and rollback boundaries belong together. Promote an independent boundary into a sequential Plan instead of hiding it inside a large Step. One Phase may therefore span multiple Plans.
@@ -95,8 +95,8 @@ reflected without change. If the summary introduces or changes a
95
95
  decision, ask for explicit confirmation of only that decision delta
96
96
  and block Planner handoff until it is answered. Agent judgment alone never
97
97
  confirms a proposed direction or scope. Persist only final decisions: map them
98
- to `BR-REQ-*`, `BR-DEC-*`, `BR-OUT-*`, `BR-DEFER-*`, and resolved `BR-Q-*`
99
- manifest entries; do not copy the question transcript into repository artifacts.
98
+ to `BR-REQ-*`, `BR-DEC-*`, `BR-OUT-*`, `BR-DEFER-*`, resolved `BR-Q-*`,
99
+ and `BR-SCN-*` manifest entries; do not copy the question transcript into repository artifacts.
100
100
 
101
101
  ## Explicit exhaustive interrogation
102
102
 
@@ -119,7 +119,7 @@ empty, or report remaining blocked/open nodes if the user stops early.
119
119
  - **Dependency-Aware Rounds**: Ask every independent question on the complete currently unblocked frontier together. Ask fewer questions only because dependencies keep downstream branches blocked, never because of an arbitrary question budget.
120
120
  - **Read-only by default**: Inspect context and summarize the problem. do not implement inside this skill.
121
121
  - **Handoff**: Write concise design notes under `docs/brainstorms/` only if explicitly requested.
122
- - **Handoff Manifest**: When framing is stable, user-confirmed, and routes to planner, include a compact `Brainstorm manifest` with stable IDs for every planner-relevant item: `BR-REQ-*` for confirmed requirements, `BR-DEC-*` for confirmed decisions, `BR-OUT-*` for non-goals, `BR-DEFER-*` for explicitly deferred items, and `BR-Q-*` for open questions. The manifest is the closed-world handoff; the planner must account for every ID instead of relying on prose memory.
122
+ - **Handoff Manifest**: When framing is stable, user-confirmed, and routes to planner, include a compact `Brainstorm manifest` with stable IDs for every planner-relevant item: `BR-REQ-*` for confirmed requirements, `BR-DEC-*` for confirmed decisions, `BR-OUT-*` for non-goals, `BR-DEFER-*` for explicitly deferred items, `BR-Q-*` for open questions, and `BR-SCN-*` for a confirmed user scenario. A `BR-SCN-*` item has exactly `Actor`, `Given`, `When`, `Then`, written in English. `Then` states a result the actor observes directly — command output, a file, an Issue or UI state — and never an internal state or a test file name. Record a scenario only for framing that changes user-observable behavior: framing without a user-observable change gets no invented scenario. The manifest is the closed-world handoff; the planner must account for every ID instead of relying on prose memory.
123
123
  - **Default Next Route**: Route to `imm-planner` when the material frontier is empty, no required fact blocks the handoff, and every material user decision is settled by a direct requirement, explicit answer, or adopted recommendation. An unchanged final summary is a correction window, not another gate. If Brainstorm introduces a new decision, ask for that delta and do not name `imm-planner` as the current next skill.
124
124
  - **Subagents**: Only when optional research is needed, read Research Dispatch and its shared dispatch reference. Default to inline evidence gathering; do not load dispatch instructions merely because Brainstorm was invoked.
125
125
  - **Rejected Decision Evidence**: Use on-demand rejected-decision evidence instead of a global preflight. When a live branch resembles a rejected decision, resolve its recorded reason and optional `reconsider_if` conditions through code/docs inspection before asking the user. Treat each `reconsider_if` list item as an independently sufficient trigger (OR semantics): if available evidence satisfies none, keep the rejection as a current constraint or non-goal without re-litigation; if evidence satisfies one, reopen the decision and cite the condition plus changed evidence; if a condition cannot be resolved, ask only for that concrete missing fact. When `reconsider_if` is absent, preserve the backwards-compatible "what has changed?" fallback after inspection. When `rejection_reason` is absent, inspect an explicit rejection-reason section in the body; if no reason exists, report the metadata gap without inventing a reason or reconsideration condition.
@@ -138,7 +138,7 @@ Runtime helpers: `imm_core.buildBrainstormEnsembleRequest`, `imm_core.buildBrain
138
138
 
139
139
  A Brainstorm ensemble is optional advisory-only framing input, not a vote and not a child-owned decision. The default roles are clarify scope, divergent options, minimal solution, and risk review.
140
140
 
141
- All Brainstorm ensemble children are advisory-only with `tool_policy: no tools`; they do not edit code, write Specs, write Plans, mutate workflow state, or close QA. The parent `imm-brainstorm` owns final framing synthesis, Brainstorm manifest IDs, and decision-delta confirmation. Final Spec and Plan authority stays with `imm-planner`. Routine Managed enrollment uses the current Host's native confirmation bound to the TaskIntent revision, content hash, and preparation digest as the single authority gate; Enrollment validates descriptor structure without executing acceptance descriptors, deterministic QA executes them after implementation, and the routine task proceeds without a second human stop. A later authority-gate failure stays fail-closed in the current Host and reports exactly one same-Host recovery action; Brainstorm must never recommend another Host, worktree, or unmanaged implementation as a fallback.
141
+ All Brainstorm ensemble children are advisory-only with `tool_policy: no tools`; they do not edit code, write Specs, write Plans, mutate workflow state, or close QA. The parent `imm-brainstorm` owns final framing synthesis, Brainstorm manifest IDs, and decision-delta confirmation. Final Spec and Plan authority stays with `imm-planner`. Neither Brainstorm nor the Planner invokes Enrollment: the user launches `imm-planner` after framing and `imm-run` after planning, and a confirmation of a framing or a plan starts neither. Routine Managed enrollment is the first step of an explicit `imm-run` entry and uses the current Host's native confirmation bound to the TaskIntent revision, content hash, and preparation digest as the single authority gate; Enrollment validates descriptor structure without executing acceptance descriptors, and deterministic QA executes them after implementation. A later authority-gate failure stays fail-closed in the current Host and reports exactly one same-Host recovery action; Brainstorm must never recommend another Host, worktree, or unmanaged implementation as a fallback.
142
142
 
143
143
  Pi's adapter may consume `brainstorm_ensemble` dispatch JSON to prepare advisory Pi subagent envelopes, but envelope construction is not child execution and does not transfer framing authority. Pi launches one foreground Agent at a time, consumes its direct result, and re-evaluates the remaining dispatch budget before launching another candidate. Runtime does not call any agent, poll or recover background work, mutate state, or own final Spec/Plan authority. Pi subagent children remain no-tools advisory candidates; the parent `imm-brainstorm` collects outputs before synthesis.
144
144
 
@@ -150,7 +150,7 @@ Agreement becomes framing evidence. Disagreement becomes decision criteria or an
150
150
 
151
151
  **Dispatch behavior:** Use Pi native `Explore` subagents (`subagent_type: "Explore"`). Each prompt must state a bounded read-only scope and returns a structured summary (affected files, conventions found, risks). The parent brainstorm agent merges summaries before producing the output artifact. Research subagents do not write files, specs, plans, or `.imm/` state.
152
152
 
153
- **Manifest mapping:** Repo-local runtimes use `imm_core.brainstorm_research` to keep research probes host-bound and manifest-oriented. Every child summary that affects planning must map to a Brainstorm manifest ID: `BR-REQ-*`, `BR-DEC-*`, `BR-OUT-*`, `BR-DEFER-*`, or `BR-Q-*`. Any unmapped or unresolved research question becomes a `BR-Q-*`; open `BR-Q-*` items block planner handoff.
153
+ **Manifest mapping:** Repo-local runtimes use `imm_core.brainstorm_research` to keep research probes host-bound and manifest-oriented. Every child summary that affects planning must map to a Brainstorm manifest ID: `BR-REQ-*`, `BR-DEC-*`, `BR-OUT-*`, `BR-DEFER-*`, `BR-Q-*`, or `BR-SCN-*`. Any unmapped or unresolved research question becomes a `BR-Q-*`; open `BR-Q-*` items block planner handoff.
154
154
 
155
155
  **Failure handling:** If research dispatch is unavailable or fails, continue with solo inline investigation. Record the fallback reason per the shared protocol.
156
156
 
@@ -171,5 +171,5 @@ Default user-facing shape: `Conclusion -> Scope -> Next Action`. For the normal
171
171
  ## Next Action
172
172
 
173
173
  - Gate: The material frontier is empty; no required fact blocks the handoff; every material user decision is settled by a direct requirement, explicit answer, or adopted recommendation; and the result-only summary introduces no unconfirmed decision delta. **If any required clarification remains unanswered, you MUST NOT proceed to planning or suggest the next skill.** **If a decision delta is still unconfirmed, you MUST NOT proceed to planning, must not name a next skill, and should ask the user to confirm only that delta.**
174
- - If gates pass: suggest `imm-planner` with a one-line reason.
174
+ - If gates pass: suggest `imm-planner` with a one-line reason and stop. The user launches it; Brainstorm never enters `imm-planner` or `imm-run` on its own and never invokes Enrollment.
175
175
  - If gates are not met: state which questions or decision deltas remain open; do not name a next skill and wait for the user's answer.
@@ -117,7 +117,8 @@ no persistent report, and no automatic commit.
117
117
 
118
118
  This Skill may modify or delete approved documentation, explicit translation
119
119
  or generated mirrors, documentation sync manifests, and tests whose only
120
- behavior is asserting document existence or obsolete wording. It must stop
120
+ behavior is asserting document existence or obsolete wording; test structure and
121
+ behavioral coverage belong to `imm-test-prune`. It must stop
121
122
  when completion requires runtime behavior, business-test semantics, package
122
123
  exports, public API, credentials, network writes, Git history rewriting, or
123
124
  any Managed authority mutation.
@@ -12,21 +12,18 @@ This skill adheres to the **[BASELINE.md](BASELINE.md)**.
12
12
  `imm-planner` is entered explicitly by the user for a clear repository mutation.
13
13
  Ordinary host input does not invoke this Skill through natural-language routing.
14
14
  An active Assurance projection remains authoritative and is resumed only through
15
- an explicit `imm-run` entry; explicit Planner entry owns planning and the later
16
- native Enrollment gate.
17
-
18
- Plan-only output remains non-authoritative. Planner creates or validates a
19
- candidate Spec/TaskIntent. Planner may request the native Enrollment gate;
20
- only that gate grants execution authority. Explicit Plan-only requests stop after returning the
21
- planning artifacts. A later literal-user request to start Enrollment is a
22
- non-authoritative execution trigger: invoke the native Enrollment gate directly,
23
- without asking for chat pre-confirmation. For a clear mutation request that
24
- already includes execution, invoke that gate as soon as the candidate is
25
- validated and Git-tracked. Literal-user confirmation in the current Host's
26
- native gate remains the authority boundary. A gate failure preserves candidate
27
- artifacts and reports its reason plus exactly one same-Host recovery action; it
28
- must never recommend another Host, worktree, Direct Path, unmanaged
29
- implementation, or automatic retry. Fast-Track may compress the same phases but
15
+ an explicit `imm-run` entry; explicit Planner entry owns planning only.
16
+
17
+ Planner output remains non-authoritative. Planner creates or validates a
18
+ candidate Spec/TaskIntent and never invokes the native Enrollment gate;
19
+ only that gate grants execution authority, and it opens only as the first step
20
+ of a literal-user `imm-run` entry. Every Planner request stops after returning
21
+ the validated planning artifacts, including a request that also asks for
22
+ execution: report the candidate and name a literal-user `imm-run` entry as the
23
+ only next step. A design confirmation, a generic continuation, or a request to
24
+ start Enrollment received inside the Planner is not an `imm-run` entry and
25
+ opens no gate. Literal-user confirmation in the current Host's
26
+ native gate remains the authority boundary. Fast-Track may compress the same phases but
30
27
  cannot bypass that boundary, QA, Review, authorization, or completion.
31
28
 
32
29
  ## Clarification supplement
@@ -119,13 +116,12 @@ Enrollment.
119
116
 
120
117
  Host identity is implicit and never a planning input. The production boundary
121
118
  that turns a Git-tracked TaskIntent draft into managed execution authority is
122
- the current Host's native Enrollment gate. Invoke that Host integration
123
- directly when the route is ready; do not ask for chat pre-confirmation. The
124
- single literal-user decision is bound to the TaskIntent revision, content hash,
125
- and preparation digest. Enrollment validates the intent, Git ownership, scope,
126
- workspace claim, and final authority preconditions without executing acceptance
127
- descriptors. A routine task proceeds from that single confirmation through
128
- enrollment, execution and QA without a second human stop.
119
+ the current Host's native Enrollment gate. `imm-run` invokes that Host
120
+ integration as the first step of a literal-user entry; the Planner never does.
121
+ The single literal-user decision is bound to the TaskIntent revision, content
122
+ hash, and preparation digest. Enrollment validates the intent, Git ownership,
123
+ scope, workspace claim, and final authority preconditions without executing
124
+ acceptance descriptors.
129
125
 
130
126
  **Automatic policy activation**
131
127
 
@@ -237,14 +233,21 @@ confirm a name, slug, Child, or dependency that had not yet been shown.
237
233
 
238
234
  Once decomposition is complete, present one review table containing the Parent
239
235
  result and every Child's stable Slice ID, result, scope boundary, risk, blockers,
240
- and proposed execution order. Ask one focused question: whether the coverage,
236
+ each Slice's scenario IDs or its exemption with the reason, and proposed execution order. Ask one focused question: whether the coverage,
241
237
  granularity, and dependencies are correct. Recommend the complete current
242
238
  frontier so the user can approve it in one response. Before that approval,
243
239
  perform zero GitHub mutations. A partial or progressively disclosed issue set is
244
240
  not eligible for publication.
245
241
 
246
242
  After approval, author, stage, and validate every TaskIntent in the decomposition
247
- with `valid: true` and `enrollment_ready: true`. Resolve `../bin/imm-tracker` from this packaged contract; do not assume a bare command is on `PATH`. Submit the entire approved set once through
243
+ with `valid: true` and `enrollment_ready: true`. Before handoff, compare the
244
+ scopes by machine: run `imm-kernel intent overlap <path> <path>... --json` over
245
+ every TaskIntent of the Initiative, with one `--blocked-by <task-id>=<task-id>,...`
246
+ per dependency, and report its `overlaps` (each shared entry pair) and
247
+ `parallel_groups`. Parallel recommendations follow that output, which uses the
248
+ same projection as the Batch Plan. Never write "disjoint" or "verified" for
249
+ scopes by hand; when the output shows an overlap the Slices run serially unless
250
+ a revised `scope_hint` removes it. Resolve `../bin/imm-tracker` from this packaged contract; do not assume a bare command is on `PATH`. Submit the entire approved set once through
248
251
  `imm-tracker publish-initiative --stdin --json`. Its input contains the confirmed
249
252
  Initiative slug and goal, Parent projection, and every Child's `slice_id`,
250
253
  canonical TaskIntent path, bounded public `acceptance` summaries, and public
@@ -263,7 +266,27 @@ published Child; future checklist-only Slices are not allowed in the batch.
263
266
  Each Child must provide public `acceptance` entries with `id` and a 1-500
264
267
  character `summary`. Their IDs must match every canonical TaskIntent acceptance
265
268
  ID exactly once. Canonical assertion prose is authority evidence and must never
266
- be copied into public GitHub projection. Each Child projection requires
269
+ be copied into public GitHub projection. Each Child may also provide an optional
270
+ `scenarios` array. Omitting it, or giving an empty array, renders no
271
+ `## User scenarios` section for that Child and contributes nothing to the Parent;
272
+ when no Task supplies scenarios the Parent and every Child body are unchanged.
273
+ A scenario is public projection of one user-observable result: `id`
274
+ (`BR-SCN-<n>` or `SCN-<n>`), `actor`, `given`, `when`, `then`, and `mode`.
275
+ `automated` maps to one or more of that Task's canonical acceptance IDs and
276
+ renders as a plain bullet; `manual` requires `manual_reason`, may name no
277
+ acceptance ID, and renders as an unchecked task-list item that also shows the
278
+ reason. The Parent derives one plain bullet per scenario (its ID, owning Slice
279
+ ID, mode, When, and Then) and never a checkbox. Scenarios never widen TaskIntent
280
+ scope or authority. The tracker rejects the whole batch before any remote write
281
+ when a scenario lacks a field, has an id matching neither form, repeats an id
282
+ within the Initiative, is automated with no acceptance ID, names an acceptance ID
283
+ its TaskIntent lacks, or is manual without `manual_reason`. Every scenario list
284
+ item starts at the beginning of its line, so no metadata comment precedes the
285
+ marker. Each Child's ownership marker block also carries one
286
+ `<!-- immune-brain:scenarios=<percent-encoded JSON> -->` per Task holding all of
287
+ its scenarios verbatim; an amendment reads historical scenarios only from that
288
+ marker, never parses the visible section, and treats a Child without it as
289
+ having no scenarios. Each Child projection requires
267
290
  `title` (1-60 characters), the short Slice display title, and may contain
268
291
  `result`, `current_behavior`,
269
292
  `desired_behavior`, `key_interfaces`, `verification`, `blocked_by` Task IDs,
@@ -300,11 +323,9 @@ prompt digests never belong in this external handoff. If
300
323
  Local mode performs zero GitHub operations.
301
324
 
302
325
  The batch result includes an execution recommendation: the first unblocked Task,
303
- a stable dependency order, and parallel groups. For a plan-only request, report
304
- that recommendation and stop. For a request that includes execution, invoke the
305
- native Enrollment gate for the recommended first TaskIntent after successful
306
- publication; do not ask for another chat confirmation. GitHub selection never
307
- bypasses Enrollment.
326
+ a stable dependency order, and parallel groups. Report that recommendation and
327
+ stop; the user enrolls the recommended first TaskIntent through a literal-user
328
+ `imm-run` entry. GitHub selection never bypasses Enrollment.
308
329
 
309
330
  Tracker output is observation, never authority. Before the Planner returns, its
310
331
  GitHub carrier outcome must be exactly one of: `tracker_associated` after the
@@ -485,9 +506,15 @@ when breaking, `approve_breaking_intent_revision` with the complete next intent.
485
506
  The native gate is the single user decision for a breaking revision; candidate
486
507
  preparation does not apply the revision or authorize expanded execution.
487
508
 
509
+ A revision is warranted only when the goal, the `scope_hint`, or a user-visible
510
+ commitment changes. A finding whose defect lies inside the current goal and scope
511
+ is ordinary rework for the Loop, not a revision request: decline to prepare one
512
+ that only appends a single input case to an acceptance assertion. Acceptance
513
+ states principles; enumeration of cases belongs in tests.
514
+
488
515
  ## Planning Rules
489
516
 
490
- - **Entry Contract**: Use when Spec/TaskIntent planning is needed. An already enrolled owner remains on its current Kernel authority and resumes only through explicit `imm-run`; a validated candidate still needs native Enrollment.
517
+ - **Entry Contract**: Use when Spec/TaskIntent planning is needed. An already enrolled owner remains on its current Kernel authority and resumes only through explicit `imm-run`; a validated candidate still needs native Enrollment, which only an explicit `imm-run` entry opens.
491
518
  - **Output Language Gate**: Before writing or revising any Spec or Plan, read the project output language policy from `AGENTS.md`, `IMMUNE.md`, or Immune-Brain plugin config. Default Spec and Plan prose to English unless the current user request, project instructions, or host/user preference contains an explicit document-language instruction. A reply-language instruction does not change document language. Keep schema fields, CLI commands, file paths, code identifiers, enum values, JSON keys, and canonical terms such as `Step`, `Plan`, `Spec`, `Verification`, `Discovery cache`, and `Devil's Advocate Audit` literal.
492
519
  - **Clarification Supplement**: If an upstream `imm-brainstorm` manifest exists, verify that every `BR-Q-*` item is resolved and every confirmed framing decision is represented; must not repeat, reopen, or rewrite confirmed decisions. Ask only a focused omission, repository-conflict, or invalidated-assumption delta tied to concrete evidence. Resolve a local delta here; return to `imm-brainstorm` when it reopens multiple product branches or changes the overall goal or Scope. Finalization requires no unresolved supplement and no unconfirmed decision introduced by Planner.
493
520
  - **Planning Bootstrap**: When no upstream `imm-brainstorm` manifest exists, preserve Direct Planner entry by resolving repository facts and deriving ordinary technical choices. An already-clear request takes the zero-question fast path to a non-blocking correction summary. Discovery of an unresolved user-owned goal, user, scope, behavior, compatibility preference, risk acceptance, or success criterion returns to `imm-brainstorm`; Planner does not convert product uncertainty into a silent assumption or duplicate Brainstorm's interview.
@@ -515,7 +542,7 @@ preparation does not apply the revision or authorize expanded execution.
515
542
  follows Enrolled Intent Revision.
516
543
  - **Review Mapping**: In-scope rework stays with the enrolled TaskIntent and explicit `imm-run` entry. Cross-scope findings become a Planner decision delta with concrete missing paths and verification evidence; do not create a successor prose Plan.
517
544
  - **Decision Provenance**: Every Spec decision and every acceptance names exactly one source: an upstream `BR-*` ID, repository evidence with a concrete path, or a delegated technical choice as defined by Clarification supplement. The rule applies with or without an upstream Brainstorm manifest, and the source does not have to be a `BR-DEC` item: Direct Planner entry and delegated technical choices stay legitimate sources. A user-owned decision — goal, user, scope, observable behavior, compatibility preference, risk acceptance, or success criterion — that names no source is a defect the Planner removes or returns for clarification under the existing Clarification supplement routes. Simple TaskIntent-only work satisfies the rule when each acceptance traces to the request text and adds no table.
518
- - **Brainstorm Manifest Mapping**: Record every upstream `BR-*` item in a Spec `Brainstorm Trace` when the work is complex, otherwise on the TaskIntent, mapped to acceptance, a captured decision, or an explicit reason for deferral or exclusion. Resolve every `BR-Q-*` item before handoff. Do not silently narrow confirmed framing.
545
+ - **Brainstorm Manifest Mapping**: Record every upstream `BR-*` item in a Spec `Brainstorm Trace` when the work is complex, otherwise on the TaskIntent, mapped to acceptance, a captured decision, or an explicit reason for deferral or exclusion. Resolve every `BR-Q-*` item before handoff. Do not silently narrow confirmed framing. A Spec for work with a user-observable change has a `User scenarios` section. Each scenario keeps its upstream `BR-SCN-<n>` ID; on direct entry each scenario is confirmed in clarification and recorded as Spec-local `SCN-<n>` sourced to that confirmation, and a scenario with no source is a defect the Planner removes or returns for clarification. Each scenario is tagged `automated` with at least one acceptance ID, or `manual` with the reason it cannot be automated; a `manual` scenario may name no acceptance, and the mapping is one-way — an acceptance need not serve a scenario. In a multi-TaskIntent Initiative a scenario belongs to exactly one Slice, the one that first makes it observable, and an `automated` scenario maps only to that Slice's acceptance. `BR-SCN-*` items fall under the existing handoff completeness check like every other `BR-*` item. When the work has no user-observable change, record `no user-visible change` with a one-line reason — in the Spec for complex work, on the TaskIntent goal for simple work — write no scenario section, and `no user-visible change` requires a recorded reason.
519
546
  - **Handoff Completeness Check**: Before reporting a candidate as handoff-ready, confirm every upstream item and required phase is mapped exactly once, that required phases are delivered rather than excused by a reason, and that no confirmed outcome was conserved as a smaller deliverable. Reject a narrowed deliverable as a completeness failure; ask again only for a new material delta, never to reconfirm an unchanged clear request or an already-confirmed decision.
520
547
  - **Session Lifecycle Ownership**: The user chooses the current or a new session. Tokens, compactions, tool counts, elapsed time, and review rounds never trigger automatic session creation or termination. Recovery uses TaskRecord and the fresh Kernel projection.
521
548
  - **Subagents**: Only when optional research is needed, read Research Dispatch and its shared dispatch reference. Default to inline evidence gathering. Plan conditional reviewers such as `security-reviewer` only if their trigger surfaces are explicit; do not manufacture them.
@@ -568,7 +595,7 @@ optional advisory dispatch fails, continue inline and record the reason.
568
595
 
569
596
  - **Allowed**: Write a TaskIntent. Add a Spec only for complex work. Activate an absent routing policy under Kernel TaskIntent Routing. Initiative planning carriers and necessary domain vocabulary.
570
597
  - **Blocked**: Implementation edits, direct Kernel-store writes, enrolled intent overwrites, and QA/Review decisions.
571
- - **Workflow guard**: Execution continues through native Enrollment and explicit `imm-run`. Planner owns design and decomposition, not execution authority.
598
+ - **Workflow guard**: Execution starts only from a literal-user `imm-run` entry, whose first step is native Enrollment. Planner owns design and decomposition, never Enrollment or execution authority.
572
599
 
573
600
  ## Output artifact
574
601
 
@@ -616,11 +643,10 @@ a State Ledger. Keep historical Plan validation strictly read-only.
616
643
  - Validate every candidate through `imm-kernel intent validate <path> --json` after authoring and staging. Require `valid: true` and `enrollment_ready: true` before Enrollment. When `git_base_initialization_required: true`, report that the existing native Enrollment confirmation includes an empty root commit; leave initialization to the Host. An invalid `git_base` blocks Enrollment and requires Git repair.
617
644
  - For complex work, verify Spec design metadata, document language, reference closure, concrete descriptor paths, and complete Brainstorm traceability before handoff. Simple TaskIntent-only work verifies those properties on the Intent.
618
645
  - Enrollment validates descriptor structure only. Deterministic QA owns descriptor execution after implementation; planning does not run the acceptance suite.
619
- - Managed execution handoff is Git-tracked TaskIntent author/validate plus current-Host native Enrollment. Do not sync a v3 State Ledger or invoke a missing dispatcher.
646
+ - Managed execution handoff is Git-tracked TaskIntent author/validate; current-Host native Enrollment follows in `imm-run`. Do not sync a v3 State Ledger or invoke a missing dispatcher.
620
647
 
621
648
  ## Next Action
622
649
 
623
- - Gate: Reference closure and clarification are complete; every upstream `BR-*` item is represented; no unresolved user decision remains; Planner-introduced decision deltas are confirmed; the candidate is Git-tracked and validates with `valid: true` and `enrollment_ready: true`; each acceptance has concrete focused verification. Plan-only requests stop here.
624
- - If gates pass: for Kernel-managed work, invoke the current Host's native Enrollment Tool directly without chat pre-confirmation. Its single literal-user gate binds the TaskIntent revision, content hash, and preparation digest, validates Enrollment preconditions without executing acceptance descriptors, and enrolls the task to continue through `imm-run`.
625
- - If the native gate fails: preserve candidate artifacts and report the stable reason plus exactly one same-Host recovery action. Do not suggest another Host, worktree, Direct Path, unmanaged implementation, or automatic retry.
650
+ - Gate: Reference closure and clarification are complete; every upstream `BR-*` item is represented; no unresolved user decision remains; Planner-introduced decision deltas are confirmed; the candidate is Git-tracked and validates with `valid: true` and `enrollment_ready: true`; each acceptance has concrete focused verification. Plan-only requests stop here, and so does every other Planner request.
651
+ - If gates pass: report the validated candidate (and, for an Initiative, the recommended first Task) and name a literal-user `imm-run` entry as the only next step. Do not invoke the current Host's native Enrollment Tool: Enrollment is the first step of `imm-run`, and a confirmation of the plan is not that entry.
626
652
  - If gates are not met: state which validation failures, unresolved verification paths, or material decision deltas remain; do not name a next skill.
@@ -10,11 +10,27 @@ This skill adheres to the **[BASELINE.md](BASELINE.md)**.
10
10
  ## Kernel Canary Routing and Authority
11
11
 
12
12
  Only explicit `imm-run` entry starts or resumes this loop. Ordinary host input
13
- stays host-native; it never resumes a Managed owner implicitly. Read the current
13
+ stays host-native; it never resumes a Managed owner implicitly. While a
14
+ non-terminal TaskRecord holds the workspace, both Hosts add a read-only notice
15
+ to ordinary input (Pi `before_agent_start`, Claude Code `UserPromptSubmit`)
16
+ naming the task, its next obligation and its scope: before committing or
17
+ modifying files inside that scope, read `status` and tell the user the task is
18
+ active and what it waits for. The notice resumes nothing. Read the current
14
19
  Host's `status` projection first and verify the exact active backend claim,
15
20
  TaskIntent, and TaskRecord. Invalid or contradictory projections fail closed. A
16
21
  candidate TaskIntent is not Enrollment authority.
17
22
 
23
+ Enrollment is the first step of an explicit `imm-run` entry and belongs to no
24
+ other Skill. When the entry finds no active claim, resolve the validated
25
+ candidate the user named (or the Planner's recommended first Task when the entry
26
+ names none and exactly one candidate fits), then invoke the current Host's
27
+ native Enrollment gate once, without chat pre-confirmation, and continue from
28
+ the returned projection. Planner and Brainstorm never open that gate; a
29
+ confirmation given to either is not this entry. A gate failure preserves the
30
+ candidate and reports its stable reason plus exactly one same-Host recovery
31
+ action; never recommend another Host, worktree, Direct Path, unmanaged
32
+ implementation, or automatic retry.
33
+
18
34
  Before the first Enrollment of a candidate TaskIntent, confirm the Planner
19
35
  returned `tracker_associated` — but only when the candidate belongs to an
20
36
  identified GitHub-carried Initiative. Standalone TaskIntents and Local
@@ -55,9 +71,9 @@ Before a child dispatch, read the [Subagent Dispatch Protocol](docs/reference/su
55
71
  Never load an internal role as a public Skill or spawn another loop process;
56
72
  the only exception is a Lane's Executor Host under
57
73
  [Lane Executor Supervision](#lane-executor-supervision).
58
- The standalone `imm-pr-fix`, `imm-doc-prune`, and `imm-doc-slim` are host-native
59
- maintenance entries, never dispatched as the Loop role. Internal `test-fixer`
60
- and `pr-fix` repairs remain bounded by the enrolled TaskIntent.
74
+ The standalone `imm-pr-fix`, `imm-doc-prune`, `imm-doc-slim`, and `imm-test-prune`
75
+ are host-native maintenance entries, never dispatched as the Loop role. Internal
76
+ `test-fixer` and `pr-fix` repairs remain bounded by the enrolled TaskIntent.
61
77
 
62
78
  ## Execution Loop
63
79
 
@@ -100,6 +116,12 @@ Continue while the current projection has a valid action:
100
116
  accepted contract and answer with `refute_finding` bound to fresh QA evidence
101
117
  for that acceptance. Escalating a local heuristic a third time instead of
102
118
  choosing one of those two responses is the loop this step exists to break.
119
+ A finding whose defect lies inside the TaskIntent goal and `scope_hint` is
120
+ ordinary rework even when no acceptance names its exact case: fix the code,
121
+ add the test that pins the case, and dispose the finding. It is never a
122
+ reason to revise the Intent. Acceptance text states principles; enumeration
123
+ of specific inputs belongs in tests, so never append a single input case to
124
+ an acceptance assertion in order to close a finding.
103
125
  6. An unresolved decision pauses only dependent execution. On `awaiting_user`,
104
126
  invoke `request_authorization` directly before ending the turn; use the
105
127
  Decisions and Recovery route for its native-gate handling. End the turn if
@@ -197,7 +219,46 @@ Only children whose scopes are provably disjoint run together; a child whose sco
197
219
  overlaps an in-flight Lane waits until that Lane is integrated. Settled children
198
220
  integrate serially, and a parked child ends only itself and its dependents while a
199
221
  disjoint sibling keeps moving. A lost Lane parks as `batch_lane_lost`, and
200
- `qa_failure_limit` counts each child separately. A resume with a different
222
+ `qa_failure_limit` counts each child separately. A completed settlement inside a
223
+ Lane changes Kernel state only and writes nothing to the tracker: the coordinator
224
+ closes the child's Issue after it integrates that child's commit, exactly once,
225
+ and reports the attempt in `tracker_observations`. A parked or lost child is
226
+ never integrated, so its Issue stays open; an explicit stop inside a Lane still
227
+ projects `not planned` at once.
228
+
229
+ The lane batch confirmation offers one opt-in choice, off by default: delegate
230
+ to the coordinator the approval of each Lane child's breaking Intent revisions
231
+ that stay inside that child's TaskIntent as authorized for the batch (ADR 0018).
232
+ The answer is recorded on the batch record as `revision_delegation`; a batch
233
+ confirmed without it behaves exactly as before, and the grant ends with that
234
+ batch — a terminal, retired or later batch never uses it. When an integrated
235
+ child's TaskIntent equals the last revision applied under that grant, the runner
236
+ reseals `plan_digest` and records both digests in `reseals`, so later children
237
+ continue without retiring the batch. Any other Intent change still fails closed
238
+ as `plan_changed` and takes the ADR 0016 retirement path.
239
+
240
+ Before a new lane batch provisions any Lane, the runner compares the Kernel
241
+ contract identifiers (TaskRecord, tombstone, projection, store schema) of the
242
+ coordinator's runtime with those of the runtime a Lane Executor loads — never the
243
+ plugin version number — and refuses with `batch_runtime_contract_mismatch`,
244
+ naming both sources, when they differ; a match adds no confirmation. A Lane whose
245
+ state exists but whose contract the coordinator refuses to read parks as
246
+ `batch_lane_contract_mismatch` with the original parse error, distinct from a
247
+ missing Lane's `batch_lane_lost`.
248
+
249
+ Inside a Lane, the Pi extension and the Claude Code `PreToolUse` hook refuse an
250
+ `edit`/`write` (Claude: `Edit`, `Write`, `MultiEdit`, `NotebookEdit`) whose
251
+ resolved target lies outside the Lane, naming the Lane path. A shell command is
252
+ not intercepted; this is no bash sandbox. When a lane batch is re-entered with a
253
+ dirty coordinator checkout, each dirty path is restored to HEAD only if every one
254
+ of them is an unstaged modification or untracked file that a Lane of this batch
255
+ changed (its bytes differ from that Lane's base) and whose bytes equal the Lane's,
256
+ in its worktree or a Lane-branch commit. The read-only preflight only attributes;
257
+ the runner restores after the batch is authorized. The bytes are
258
+ backed up first under `.imm/state/batches/restores/`, and the backup is recorded
259
+ in the batch record and report as `restores`. If any change has another origin,
260
+ or is staged or deleted, no file is touched and the refusal names it; never
261
+ stage such changes to get past the refusal. A resume with a different
201
262
  `max_parallel` is refused with `batch_parallel_mismatch`. A Lane holds no batch
202
263
  state and its Host session never re-enters the batch.
203
264
 
@@ -220,6 +281,7 @@ source directly rather than assuming the Host injected it into context:
220
281
  | `Lane Executor Host: <host>` | `claude-code` or `pi` | Every Lane's Executor Host is that Host. When the `lane-steward` did not report it available in a Lane, that Lane has no Executor Host; the Parent does not fall back to the other one. | The Parent's own Host type, else the other allowlisted Host |
221
282
  | `Lane Executor model: <model>` | a model identifier of the configured Executor Host | Passed to the Executor Host as `--model <model>` | The Executor Host's own default |
222
283
  | `Lane Executor effort: <level>` | a level the configured Executor Host accepts | Passed as `--effort <level>` to `claude-code` and as `--thinking <level>` to `pi` | The Executor Host's own default |
284
+ | `Batch final verification: <command>; <command>` | plain commands without shell syntax or quoting, at most 8 | Passed as `final_verification` when a new lane batch starts and shown in its native confirmation; the runner runs them on the batch branch once every child is integrated and writes each command's exit status and timing into the completion report as `final_verification`. A failing command reports the batch as not passed; integrated commits are never rolled back | The commands the repository instruction file names for its full test suite and type check, else none and the completion report says nothing was run |
223
285
 
224
286
  A model identifier and an effort level mean something only to one Host, so
225
287
  `Lane Executor model` and `Lane Executor effort` apply only together with
@@ -231,6 +293,11 @@ a resume the recorded `max_parallel` stands and the directive is not passed
231
293
  again. The directives configure how the Parent starts sessions; the runner reads
232
294
  none of them, and they grant no permission or trust option.
233
295
 
296
+ A repository that names its full test and type-check commands in prose (for
297
+ example "uses `bun test`; type checking is `bun run typecheck`") supplies them as
298
+ the final verification without a directive; the Parent never invents a command
299
+ the repository does not name.
300
+
234
301
  #### Lane Executor Supervision
235
302
 
236
303
  The Parent launches and supervises every Lane's Executor Host; no other role
@@ -300,7 +367,8 @@ a live tab:
300
367
  `herdr agent start <name> --kind <kind> --pane <pane_id> -- <host arguments>`.
301
368
  Host arguments are only those that load the Parent's plugin and those that
302
369
  [Lane Preferences](#lane-preferences) resolved for model and effort.
303
- 4. Submit the entry and nothing else, and confirm the turn began:
370
+ 4. Submit the entry and nothing else (later text follows only the instruction
371
+ rule below), and confirm the turn began:
304
372
  `herdr agent prompt <pane_id> "<imm-run entry> <task_id>" --wait --until working --until blocked --timeout 30000`.
305
373
  The entry is the Executor Host's own `imm-run` invocation as that Host names
306
374
  it: a Claude Code Host that loaded the plugin from a directory names it
@@ -312,13 +380,52 @@ a live tab:
312
380
 
313
381
  `agent_not_ready` from step 3, or a `blocked` state at any time, means the tab
314
382
  shows a dialog only the user may answer: workspace trust, sign-in, a permission
315
- request or a question. The Parent sends that tab no keys and no prompt. It
316
- tells the user which tab and `task_id` is waiting, leaves the tab open, and
317
- continues the other Lanes; once the user has answered, step 3's tab is resumed
383
+ request, a question, or a native confirmation such as an Intent revision gate.
384
+ The Parent sends that tab no keys and no prompt, and never answers such a dialog
385
+ for the user. As soon as the wait returns `blocked` it tells the user which tab
386
+ and `task_id` is waiting and what the dialog asks, without waiting to be asked,
387
+ leaves the tab open, and continues the other Lanes; once the user has answered, step 3's tab is resumed
318
388
  from step 4 if the entry was never submitted, otherwise from step 5. `idle` or
319
389
  `done` is a session end for the rules below, although the tab stays open: the
320
390
  Parent calls `start_unattended_batch`, and a relaunch submits the entry again in
321
- the same tab instead of creating another. A failed or timed-out `herdr` command
391
+ the same tab instead of creating another. When that report shows the child
392
+ neither settled nor waiting on a user decision, the Parent tells the user which
393
+ tab and `task_id` went idle and what the Kernel projection still requires.
394
+
395
+ The Parent may send one text instruction to a Lane session, and only while it is
396
+ `idle` and its child is still running in the Lane: a correction to the
397
+ Executor's approach, never an answer to a dialog. It first calls
398
+ `start_unattended_batch` with `lane_instruction` (`task_id`, `text`, `kind`
399
+ `instruction` or `correction`, and the `session_state` it just observed with
400
+ `herdr agent get`). The runner records the text in the batch record and report
401
+ as `interventions` and answers `lane_instruction.accepted`; only when accepted
402
+ does the Parent submit it with `herdr agent prompt <pane_id> "<text>" --wait
403
+ --until working --until blocked --timeout 30000` and re-arm step 5. A `blocked`
404
+ or `working` session is refused and receives nothing. Every instruction the
405
+ coordinator sent is therefore in the report, so Executor-initiated behavior and
406
+ coordinator intervention can be told apart afterwards. This never applies to a
407
+ Review agent: a dispatched reviewer is still never continued or re-prompted.
408
+
409
+ When a Lane child exhausts its rework budget (the per-child `qa_failure_limit`)
410
+ it does not park for the user at once: the report carries a
411
+ `{ role: "coordinator", action: "correct" }` handoff and the runner makes no
412
+ further attempt for that child. The Parent reads the findings of every round
413
+ from that Lane's Kernel state, decides whether they point at one root cause, and
414
+ writes one design-level correction — the invariant to hold and the shared seam to
415
+ fix — never a patch of its own. It starts a new Executor session in the Lane
416
+ (the old context is not reused; the new session resumes from the Kernel
417
+ projection and the Lane workspace alone) and sends the correction as
418
+ `lane_instruction` kind `correction`; the runner counts it. At most two
419
+ corrections are spent per child: the third exhaustion parks the child as
420
+ `batch_correction_limit_reached`, its dependents are skipped, siblings that do not
421
+ depend on it keep executing and integrating, and the batch reports it at the end.
422
+ Single tasks outside a batch keep their existing budget behavior, and Review
423
+ independence is unchanged. A Review rework budget that the Kernel turns into a
424
+ `replan_required` decision still needs the user's own native decision.
425
+
426
+ Every live Lane session keeps exactly one `herdr agent wait` armed, so `blocked`
427
+ and idle-without-settlement wake the Parent on their own; a Parent that has
428
+ nothing else to do still ends its turn with those waits armed. A failed or timed-out `herdr` command
322
429
  proves nothing about delivery; inspect the session's state before repeating it.
323
430
 
324
431
  The Parent only creates: it closes no tab, including the tabs it created, and
@@ -393,9 +500,23 @@ is recorded as a separate follow-up rather than resolved here.
393
500
  no new provider or data effect.
394
501
  - Text instructions are contracts, not a hard bash sandbox. They guide and are
395
502
  reviewed; the Kernel authority gates remain the real boundary.
503
+ - In a Lane whose batch confirmation delegated in-envelope revisions
504
+ (ADR 0018), the Executor does not open the gate for a revision that only
505
+ changes acceptance or narrows `scope_hint`: it stops and returns the complete
506
+ next intent to the Parent, which submits it as `lane_revision` on
507
+ `start_unattended_batch`. The runner applies it as a delegated approval
508
+ (actor `batch-coordinator`, confirmation `delegated-batch:<batch_id>@<time>`)
509
+ or refuses it with `batch_delegation_refused` and a `fallback`; on refusal the
510
+ Executor uses its own native gate below. Widening scope, changing risk, goal
511
+ or the bound Spec is never delegated, and nobody answers a dialog in a tab.
396
512
  - Invoke `approve_breaking_intent_revision` with the complete next intent
397
513
  directly; the native Host gate is the single user decision. Do not overwrite
398
- enrolled intent sidecars or ask for chat pre-confirmation.
514
+ enrolled intent sidecars or ask for chat pre-confirmation. A breaking revision
515
+ is used only when the goal, the `scope_hint`, or a user-visible commitment
516
+ changes. A defect inside the existing goal and scope is rework under the
517
+ Execution Loop, not a revision, and the acceptance length limit is never
518
+ worked around by shortening words: when an assertion grows toward it, the
519
+ assertion is enumerating cases that belong in tests.
399
520
  - On `awaiting_user`, invoke `request_authorization` directly for a concrete
400
521
  unresolved decision or rework authorization, not risk tier alone.
401
522
  - When the user explicitly asks to stop an active task, invoke the Kernel stop
@@ -505,7 +626,11 @@ Every line reports authority evidence, not prose inference: name the exact
505
626
  task/run identity and the observed lifecycle, artifact, obligation, and claim
506
627
  facts that decided the exit. If a summary claimed more than the projection
507
628
  proves — for example a later Slice as enrolled or the task as completed — report
508
- the projection instead and correct the prose.
629
+ the projection instead and correct the prose. When the bound Spec lists `manual`
630
+ scenarios owned by the settled Task's Slice, add one line naming those scenario
631
+ IDs as pending manual walkthrough; the line is informational and changes no
632
+ stop reason, obligation, or completion fact, and is absent when that Slice owns
633
+ no manual scenario.
509
634
 
510
635
  ## Failure Output
511
636