codex-workflow-v2 2.0.0-alpha.4 → 2.0.0-alpha.6.1

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 (77) hide show
  1. package/README.md +114 -10
  2. package/dist/src/alpha6/adoption.d.ts +55 -0
  3. package/dist/src/alpha6/adoption.js +920 -0
  4. package/dist/src/alpha6/adoption.js.map +1 -0
  5. package/dist/src/alpha6/handoff.d.ts +39 -0
  6. package/dist/src/alpha6/handoff.js +975 -0
  7. package/dist/src/alpha6/handoff.js.map +1 -0
  8. package/dist/src/alpha6/journal.d.ts +30 -0
  9. package/dist/src/alpha6/journal.js +369 -0
  10. package/dist/src/alpha6/journal.js.map +1 -0
  11. package/dist/src/alpha6/milestone.d.ts +49 -0
  12. package/dist/src/alpha6/milestone.js +1049 -0
  13. package/dist/src/alpha6/milestone.js.map +1 -0
  14. package/dist/src/alpha6/plan-risk.d.ts +32 -0
  15. package/dist/src/alpha6/plan-risk.js +847 -0
  16. package/dist/src/alpha6/plan-risk.js.map +1 -0
  17. package/dist/src/alpha6/remediation.d.ts +20 -0
  18. package/dist/src/alpha6/remediation.js +748 -0
  19. package/dist/src/alpha6/remediation.js.map +1 -0
  20. package/dist/src/alpha6/review.d.ts +46 -0
  21. package/dist/src/alpha6/review.js +785 -0
  22. package/dist/src/alpha6/review.js.map +1 -0
  23. package/dist/src/alpha6/store-sidecars.d.ts +35 -0
  24. package/dist/src/alpha6/store-sidecars.js +281 -0
  25. package/dist/src/alpha6/store-sidecars.js.map +1 -0
  26. package/dist/src/cli.js +95 -19
  27. package/dist/src/cli.js.map +1 -1
  28. package/dist/src/contracts.d.ts +259 -0
  29. package/dist/src/git.js +2 -1
  30. package/dist/src/git.js.map +1 -1
  31. package/dist/src/index.d.ts +2 -0
  32. package/dist/src/reviewer.d.ts +6 -1
  33. package/dist/src/reviewer.js +145 -32
  34. package/dist/src/reviewer.js.map +1 -1
  35. package/dist/src/state/lock.d.ts +1 -0
  36. package/dist/src/state/lock.js +7 -1
  37. package/dist/src/state/lock.js.map +1 -1
  38. package/dist/src/state/store.d.ts +39 -1
  39. package/dist/src/state/store.js +127 -1
  40. package/dist/src/state/store.js.map +1 -1
  41. package/dist/src/version.d.ts +1 -1
  42. package/dist/src/version.js +1 -1
  43. package/dist/src/version.js.map +1 -1
  44. package/dist/src/workflow.d.ts +123 -9
  45. package/dist/src/workflow.js +1497 -76
  46. package/dist/src/workflow.js.map +1 -1
  47. package/docs/autonomy-guardrails.md +143 -0
  48. package/docs/decisions.md +27 -0
  49. package/docs/delegated-approval.md +30 -5
  50. package/docs/development-flow.md +40 -1
  51. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +155 -136
  52. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +236 -223
  53. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +225 -206
  54. package/docs/project-memory.md +7 -0
  55. package/docs/release.md +7 -0
  56. package/docs/updating-existing-project.md +75 -5
  57. package/docs/validation-report.md +56 -34
  58. package/package.json +2 -2
  59. package/plugins/codex-workflow-gateway/references/protocol.md +155 -6
  60. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +23 -1
  61. package/references/git-policy.md +5 -2
  62. package/references/state-machine.md +36 -0
  63. package/references/validation-and-review.md +28 -1
  64. package/roles/delivery-coordinator.md +11 -0
  65. package/roles/independent-reviewer.md +3 -0
  66. package/roles/technical-planner.md +7 -0
  67. package/roles/worker.md +4 -0
  68. package/schemas/adoption-posture-event.schema.json +129 -0
  69. package/schemas/corrective-decision-event.schema.json +55 -0
  70. package/schemas/corrective-plan-audit.schema.json +20 -0
  71. package/schemas/milestone-scope-change-event.schema.json +68 -0
  72. package/schemas/milestone-transaction-journal.schema.json +95 -0
  73. package/schemas/plan-risk-audit-event.schema.json +90 -0
  74. package/schemas/remediation-event.schema.json +53 -0
  75. package/schemas/reviewer-attestation-event.schema.json +49 -0
  76. package/schemas/step-review-event.schema.json +74 -0
  77. package/schemas/task-handoff-event.schema.json +116 -0
@@ -0,0 +1,143 @@
1
+ # Autonomous Development Guardrails
2
+
3
+ These rules keep delegated execution autonomous without turning approval into a rubber stamp.
4
+ Alpha.6 adds no persistent canonical state fields and keeps `stateSchemaVersion: 2`.
5
+
6
+ ## Plan Risk Audit
7
+
8
+ Before execution authorization, every alpha.6 Task needs a current Plan Risk Audit sidecar
9
+ bound to the current Brief, Plan, and approved Knowledge Map. This is mandatory even when all
10
+ Steps are unguarded and the decision is `approved`.
11
+
12
+ The payload must classify every current Step exactly once and declare:
13
+
14
+ - `planner` and a distinct `auditor`
15
+ - `decision`: `approved`, `approved-with-rationale`, `split-required`, or `stop-escalate`
16
+ - per-Step guarded categories, concrete `failureModes`, and `reviewRequired`
17
+ - `requiredEvidence` entries that exactly match executable checks in that Step
18
+ - `splitRationale` when migration is intentionally coupled to recovery or runtime composition
19
+
20
+ The workflow rejects omitted Steps, extra Steps, duplicate classifications, stale bindings,
21
+ and self-contradictory classifications. `split-required` and `stop-escalate` block execution
22
+ authorization. The sidecar, not informal Plan prose, is
23
+ the source of truth for which Steps require strict review.
24
+
25
+ Guarded categories cover:
26
+
27
+ - forward database or state migrations;
28
+ - concurrent ownership, queues, cursors, compare-and-swap, or locking;
29
+ - restart, replay, recovery, or crash windows;
30
+ - external provider lifecycle, hidden retries, defaults, timeouts, or error mapping;
31
+ - runtime composition boundaries, security boundaries, auth/secrets, and irreversible execution.
32
+
33
+ The original Plan must contain the corresponding failure evidence. A migration needs a
34
+ populated forward-upgrade scenario, not only a clean bootstrap. Concurrent state needs
35
+ deterministic race tests. Recovery needs restart and crash-window evidence. Provider work
36
+ needs failure injection and verification of provider defaults. When persistence migration,
37
+ recovery orchestration, and executable composition form independently verifiable failure
38
+ boundaries, they are separate Tasks rather than one oversized Task.
39
+
40
+ For adopted legacy Tasks, the bootstrap audit covers only the remaining non-`completed` and
41
+ non-`skipped` Steps recorded at the adoption boundary.
42
+
43
+ ## Strict Step Review
44
+
45
+ If the current Plan Risk Audit marks a Step for strict review, `task step-complete` still
46
+ creates the workflow-owned commit, but the Step stays non-terminal and `next` routes to
47
+ `task step-review`. Canonical completion is recorded only after the strict review and the
48
+ reviewer attestation both bind to that exact completion commit.
49
+
50
+ Invalid or stale review sidecars fail closed. The workflow blocks downstream acceptance and
51
+ normal continuation when review evidence is malformed, unverified, or commit-mismatched.
52
+
53
+ ## Repeated failed review and remediation breaker
54
+
55
+ The first failed independent review returns the Task to `needs_fix` and requires a changed or
56
+ new remediation Step. After two distinct failed-review attempts, `next` returns
57
+ `task plan-set with independent corrective audit`. Another Plan requires a JSON audit:
58
+
59
+ ```json
60
+ {
61
+ "auditor": "corrective-auditor",
62
+ "summary": "The corrective Step covers the latest findings without changing the Brief.",
63
+ "decision": "continue-fix",
64
+ "reviewedFindingIds": ["REV-001", "REV-002"]
65
+ }
66
+ ```
67
+
68
+ Apply it with `task plan-set --corrective-audit-file <file>` only for the `continue-fix`
69
+ path. The Auditor must differ from the failed-review author and cover every latest finding.
70
+ `replan-required`, `split-required`, and `stop-escalate` are stop decisions: Core does not
71
+ start another implementation loop.
72
+
73
+ For alpha.6 guarded Steps, remediation attempts are also tracked in
74
+ `remediation-events.jsonl`. Two ordinary remediation attempts are allowed. A third ordinary
75
+ retry is blocked until `task corrective-decision` records a current corrective decision in
76
+ `corrective-decisions.jsonl`. `continue-fix` allows bounded continuation; the other decisions
77
+ stop or redirect ordinary execution. If that third, corrective remediation review also fails,
78
+ Core enters a hard stop: a fourth run and another `continue-fix`/`replan-required` decision are
79
+ rejected. Only `split-required` or `stop-escalate` may be recorded.
80
+
81
+ ## Content-only context refresh
82
+
83
+ When `next.contextRefresh` offers an exact option, a project-scoped delegate may run one
84
+ composite transition:
85
+
86
+ ```text
87
+ task context-refresh
88
+ = project-memory reconcile
89
+ + delegated project-memory approve
90
+ + task knowledge-rebind
91
+ + delegated task execution authorize
92
+ ```
93
+
94
+ The command requires the exact Task and Knowledge Map revisions, delegate actor, and grant.
95
+ Core validates both grant transitions before the first write. It is allowed only when an
96
+ already approved source set has content-hash drift and its category, scope, authority, gaps,
97
+ and conflicts are unchanged. New or removed sources and any classification/authority change
98
+ stop on the ordinary visible Knowledge Map flow.
99
+
100
+ ## Chat ownership
101
+
102
+ One Milestone coordinator chat owns Discovery, Task order, exact delegated approvals, merge
103
+ observation, Milestone validation, and final acceptance. Every required Task runs in a
104
+ dedicated user-visible Task chat. A Task chat may use internal Worker and Reviewer contexts,
105
+ but only its delegate coordinator uses the grant. This prevents one long Milestone context
106
+ from accumulating every implementation and review loop.
107
+
108
+ ## Update boundary
109
+
110
+ Before changing the exact npm version, run `update preflight`. A compatible update is safe
111
+ only when the repository is clean, no Step is `in_progress`, and no writer lease is active.
112
+ An expired lease is also a blocker until the ordinary explicit stale-lock repair is completed.
113
+ The command is read-only and reports every blocker. It does not install a package or migrate
114
+ state. When `stateSchemaVersion` remains `2`, the external project state is reused unchanged.
115
+ Existing schema 2 projects then use `state adoption-prepare` and `state adoption-apply`; they
116
+ do not use `state migrate` for alpha.6 adoption.
117
+
118
+ ## Milestone closure
119
+
120
+ After every current `required` Task is `merged`, run `milestone validate` on the clean base
121
+ HEAD. `next` exposes a completion policy and the state-bound final gate. The coordinator must
122
+ compare Result, evidence, Plan hash, and validated HEAD. A delegate may accept only through an
123
+ exact `milestone.final_accept` option, must remain the recorded actor, and must pass the
124
+ current `MSA-*` code. Without that option the ordinary later-message human gate applies.
125
+
126
+ ## Human-only Milestone scope change and C1 handoff
127
+
128
+ Milestone scope change beyond the initial empty planning posture is explicit and human-only:
129
+ use `milestone scope-change-prepare` and `milestone scope-change-apply`. The change is
130
+ journaled across `state.json`, `plan.json`, and `scope-change-events.jsonl`, and delegated
131
+ approval never authorizes it.
132
+
133
+ `C1` handoff uses `task handoff-prepare`, `task claim --claim-token ...`, and terminal
134
+ `task handback-create`. Preparation returns a one-time token and prompt bound to a stable
135
+ `handoffId`, revision, Brief/Plan/Knowledge hashes, Milestone and Task display numbers,
136
+ expected next action, delegate/grant, creation time, and expiry. Only the claim-token hash is
137
+ stored; `task handoff-show` cannot recover it. Claim fails closed on expiry, actor, token,
138
+ revision, context, grant, or writer-owner mismatch. While pending, `next` blocks normal
139
+ execution behind claim; while claimed, only the
140
+ claimant may mutate with the bound writer token. Milestone-linked Tasks require this claimed
141
+ posture before start. Terminal handback preserves status, merge/result/evidence/review and
142
+ Knowledge bindings, limitations, and recommended next action. This is machine-bound actor and
143
+ lease evidence only; it is not proof of a separate thread.
package/docs/decisions.md CHANGED
@@ -57,3 +57,30 @@ This document closes the requirement gaps identified during the V2 design review
57
57
  both actors and the policy hash; revocation blocks future uses. This is an additive schema
58
58
  2 entity and optional authorization metadata, so existing schema 2 projects require no
59
59
  migration. It is local policy evidence, not a cryptographic identity signature.
60
+ 11. **Core-owned Step commit.** `task run` dispatches a Worker that leaves changes
61
+ uncommitted. For an active Step, `next` returns the exact `task step-complete` transition
62
+ and Step ID. That transition validates history and allowed paths, runs checks, creates
63
+ the atomic commit, and records evidence. A manual Worker commit is unrecorded history and
64
+ fails closed without changing persisted Task state. This changes navigation and
65
+ diagnostics only; state schema 2 and protocol 1 remain unchanged.
66
+ 12. **Autonomous correction guardrail.** The initial Plan must make migration,
67
+ concurrency, restart/replay, crash-window, and provider risks visible. After two failed
68
+ independent reviews, another corrective Plan requires a distinct Auditor covering every
69
+ latest finding. The audit is append-only artifact evidence; no Task state field or schema
70
+ change is required.
71
+ 13. **Content-only context refresh.** A delegate may compose reconcile, approval, knowledge
72
+ rebind, and execution reauthorization only when the approved source classification is
73
+ identical and only content hashes changed. Core validates both delegated transitions
74
+ before writing. Source-set, category, scope, authority, gap, or conflict changes stay on
75
+ the ordinary visible approval path. State schema 2 and protocol 1 remain unchanged.
76
+ 14. **Autonomous chat and closure boundary.** A Milestone coordinator owns orchestration and
77
+ final acceptance while each required Task uses a dedicated user-visible Task chat.
78
+ `next` exposes the Milestone completion contract, and delegated acceptance retains the
79
+ delegate actor and exact state-bound MSA code.
80
+ 15. **Safe update preflight.** Dependency updates begin with a read-only preflight requiring
81
+ a clean checkout, no running Step, and no active writer lease. It does not install,
82
+ migrate, or mutate project state.
83
+ 16. **Claimed-C1 rescue is one guarded transition.** The alpha.6.1 backport may bypass only
84
+ the stale Knowledge binding that blocks one exact pending strict review. It requires the
85
+ original claimant actor and writer token, preserves the lease, rechecks clean completion
86
+ HEAD and C1 bindings, and never composes stale-lock repair with review.
@@ -52,6 +52,13 @@ delegation.transition
52
52
  acceptance still requires the current `MSA-*` code, preserving the revision/hash/HEAD binding;
53
53
  the pre-issued grant replaces only the later human-message requirement.
54
54
 
55
+ Alpha.6 does not widen this allow-list. Delegated approval does not authorize:
56
+
57
+ - `state adoption-apply`
58
+ - `milestone scope-change-prepare`
59
+ - `milestone scope-change-apply`
60
+ - any replacement human gate for Milestone membership repair or scope decisions
61
+
55
62
  ## Starting a delegate chat
56
63
 
57
64
  A grant does not start an agent and is not attached to a Codex chat automatically. Open a new
@@ -74,6 +81,10 @@ scope changes are not approval transitions: the delegate stops and asks the user
74
81
  Independent Reviewer roles may implement or review work, but the coordinating delegate alone
75
82
  uses the grant and passes `--delegation-grant` to the Core transition.
76
83
 
84
+ This matters more in alpha.6 because Milestone scope changes are explicitly journaled,
85
+ human-only lifecycle actions. A delegate may continue ordinary Milestone execution only inside
86
+ the already approved scope.
87
+
77
88
  ### Milestone delegate prompt
78
89
 
79
90
  Use project scope when the Milestone does not exist yet. An existing Milestone and its linked
@@ -99,8 +110,9 @@ project, status active, delegate, scope, transitions и expiresAt. Не созд
99
110
  вернул exact delegatedApprovalOptions для этого DGR-ID и transition; actor
100
111
  всегда agent:deputy, никогда user.
101
112
 
102
- Required Tasks выполняй последовательно. Для каждой Task можешь создать
103
- отдельный Codex-чат, передав ему Task delegate prompt, тот же actor и DGR-ID;
113
+ Required Tasks выполняй последовательно. Для каждой Task обязательно создай
114
+ отдельный пользовательский Codex-чат, передав ему Task delegate prompt, тот же actor и DGR-ID.
115
+ Milestone-чат не реализует Steps и не накапливает fix-loop всех Tasks;
104
116
  не запускай два writer на одном checkout. Worker и Reviewer не используют
105
117
  grant: approval-команды выполняет только delegate-координатор после их evidence.
106
118
 
@@ -135,19 +147,32 @@ Authorization выполняй только когда текущий next со
135
147
  delegatedApprovalOptions для DGR-ID и task.execution_authorize; используй
136
148
  actor agent:deputy и --delegation-grant, не записывай actor user.
137
149
 
138
- Далее следуй штатному lifecycle: один Step - один writer lease - один commit,
139
- checks и evidence. Worker не использует grant. При изменении Knowledge Map
150
+ Далее следуй штатному lifecycle: один Step - один writer lease. Worker меняет
151
+ только разрешённые файлы и оставляет их uncommitted; затем координатор вызывает
152
+ exact `task step-complete` из `next`, а core выполняет checks, создаёт commit и
153
+ записывает evidence. Worker не использует grant. При изменении Knowledge Map
140
154
  выполни reconcile; approve разрешён только при exact project_memory.approve
141
155
  option этого project-scoped grant. Затем knowledge-rebind и новая authorization.
156
+ Если next содержит exact `contextRefresh` для того же grant, можешь вместо четырёх
157
+ команд выполнить `task context-refresh`; при любом изменении source set,
158
+ category/authority, gaps или conflicts используй обычный видимый процесс.
142
159
 
143
160
  После submit запусти отдельный Independent Reviewer; Reviewer не использует
144
- grant и не исправляет код. Выполни допустимый fix-loop. Final acceptance делай
161
+ grant и не исправляет код. После второго failed review не запускай очередной
162
+ патч: получи отдельный corrective Plan audit, охватывающий все последние findings,
163
+ и передай его через `--corrective-audit-file`. Продолжай только при
164
+ `decision=continue-fix`; остальные решения верни пользователю/координатору.
165
+ Final acceptance делай
145
166
  только при exact task.final_accept option для DGR-ID, затем штатный merge.
146
167
  Если option отсутствует, grant истёк, scope не совпал или требуется смысловое
147
168
  решение пользователя - остановись. В конце покажи Task status, commits, checks,
148
169
  review и delegated authorization event.
149
170
  ```
150
171
 
172
+ Milestone coordinator waits for the dedicated Task chat to return its terminal Task status
173
+ and merge evidence before starting the next required Task. Internal subagents inside one
174
+ oversized Milestone chat are not a substitute for this user-visible Task boundary.
175
+
151
176
  After autonomous work, inspect the recorded events and revoke a broad grant when it is no
152
177
  longer needed. Revocation does not erase completed approvals.
153
178
 
@@ -21,10 +21,25 @@ Materialization requires an observable outcome, scope, acceptance criteria, and
21
21
  blocking unknowns. No Task identifier or branch exists before this gate. Task authorization
22
22
  is hash-bound to Brief and Plan. Later Plan changes supersede it.
23
23
 
24
+ In alpha.6, execution authorization also requires a current Plan Risk Audit bound to the same
25
+ Brief, Plan, Knowledge Map, and exact Step set. For existing schema 2 projects upgraded into
26
+ alpha.6, execution additionally requires adoption posture first; remaining legacy scope then
27
+ uses a bootstrap audit over the preserved non-`completed`, non-`skipped` Steps only.
28
+ The audit names a Plan author and independent auditor, binds each guarded failure mode to
29
+ exact executable evidence, and blocks authorization on `split-required` or `stop-escalate`.
30
+
24
31
  Local execution creates `codex/task-<id>-<slug>` from a clean base only after authorization.
25
32
  An externally owned checkout must already use a dedicated non-base branch. The core never
26
33
  creates or removes external worktrees. Each Step declares allowed writes, dependencies, and
27
- checks; unexpected paths or failed checks block its atomic commit.
34
+ checks. `task run` dispatches exactly one Step and returns a writer lease. The Worker changes
35
+ only allowed files and leaves them uncommitted. Repository-level `next` then returns the exact
36
+ `task step-complete` transition for the active Step. That core transition runs checks, stages
37
+ the allowed changes, creates the atomic Step commit, and records evidence. Unexpected paths,
38
+ failed checks, or any manual/unrecorded Worker commit block completion.
39
+
40
+ If the current Plan Risk Audit marks the Step for strict review, the atomic commit is still
41
+ created by core, but the Step remains non-terminal and `next` routes to `task step-review`
42
+ until commit-bound strict review and reviewer attestation pass.
28
43
 
29
44
  After a Step changes approved project knowledge, the Delivery Coordinator reconciles and
30
45
  reapproves the Project Knowledge Map, then runs `task knowledge-rebind` between Steps. The
@@ -35,12 +50,27 @@ active Worker Step, a no-op binding, an invalid knowledge target, or a modified
35
50
  artifact. After the user authorizes the rebound Plan, execution resumes in the existing
36
51
  workspace; if all Steps are complete, the next action is submission.
37
52
 
53
+ When `next.contextRefresh` exposes an eligible project-scoped grant and content-only mode,
54
+ `task context-refresh` may compose reconcile, delegated map approval, rebind, and delegated
55
+ execution reauthorization. Core validates both approval transitions before writing and
56
+ rejects any source-set, category, scope, authority, gap, or conflict change.
57
+
38
58
  Submission requires a clean, auditable Task history and records evidence for the exact
39
59
  Task head. `task review-launch` starts a separate read-only reviewer. A passing fresh review
40
60
  permits Result creation. Human final acceptance binds Brief, Plan, Result, evidence, and
41
61
  the accepted head. Base advancement forces synchronization, checks, review, and acceptance
42
62
  to be repeated before merge.
43
63
 
64
+ The Technical Planner performs a risk review before authorization. Migration work includes a
65
+ populated forward-upgrade check; concurrent state includes deterministic races; restart,
66
+ replay, and crash claims include restart/crash-window evidence; provider work includes
67
+ failure injection and hidden-default verification. After two failed independent reviews,
68
+ another Plan requires a distinct corrective Auditor and `--corrective-audit-file`. Only a
69
+ `continue-fix` audit may continue; replan, split, and stop decisions return to coordination.
70
+ For guarded alpha.6 remediation, a third ordinary retry is blocked until a current
71
+ `task corrective-decision` exists for the same Step and Plan binding. If that corrective
72
+ attempt fails review, the third failure is a hard stop and no fourth run is permitted.
73
+
44
74
  Execution authorization and final acceptance use the human path by default. If the user has
45
75
  previously issued an active delegation grant for the exact transition and scope, the named
46
76
  delegate may perform that transition with `--delegation-grant`. The event keeps the delegate
@@ -63,6 +93,11 @@ and prevents new linked Tasks from starting. A Task that has started cannot be r
63
93
  it can be retained as waived/cancelled with history and reason. Tasks already in progress
64
94
  may finish while an amendment awaits authorization.
65
95
 
96
+ After the initial empty planning posture, alpha.6 does not use ordinary `milestone plan-set`
97
+ for scope changes. It uses human-only `milestone scope-change-prepare` and
98
+ `milestone scope-change-apply`, with journaled recovery across `state.json`, `plan.json`, and
99
+ `scope-change-events.jsonl`.
100
+
66
101
  A Milestone has no integration branch. Validation requires all required Tasks to be
67
102
  `merged`, checks the current clean base branch, and writes evidence plus Result. Final
68
103
  acceptance binds those artifacts to the unchanged base HEAD. Cancellation records a reason
@@ -87,6 +122,10 @@ With an eligible `milestone.final_accept` grant, `next` additionally returns
87
122
  turn because the earlier grant-issuance turn is the controlling user decision. Without such
88
123
  an option, the ordinary later-message human gate remains mandatory.
89
124
 
125
+ The Milestone coordinator keeps implementation out of its long-lived context: every required
126
+ Task runs in a dedicated user-visible Task chat. The Milestone chat owns ordering, exact
127
+ delegated transitions, merge observation, cross-Task validation, and final acceptance.
128
+
90
129
  ## Responsibility boundaries
91
130
 
92
131
  | Participant | Responsible for | Cannot decide |