mustflow 2.116.1 → 2.116.2

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 (58) hide show
  1. package/package.json +1 -1
  2. package/templates/default/i18n.toml +72 -6
  3. package/templates/default/locales/en/.mustflow/skills/INDEX.md +37 -11
  4. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/SKILL.md +477 -0
  5. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-diagnostics-abi-linker-checklist.md +778 -0
  6. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-generators-properties-checklist.md +501 -0
  7. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-test-strategy-differential-checklist.md +498 -0
  8. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/debug-symbol-symbolication-checklist.md +412 -0
  9. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/ir-design-ssa-pass-pipeline-checklist.md +759 -0
  10. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/miscompile-reduction-ir-checklist.md +434 -0
  11. package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md +55 -36
  12. package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/references/path-containment-handle-checklist.md +251 -0
  13. package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/SKILL.md +133 -32
  14. package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/references/file-upload-parser-ssrf-resource-checklist.md +306 -0
  15. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/SKILL.md +310 -0
  16. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-concurrency-model-checking-smt-checklist.md +457 -0
  17. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-contracts-modeling-checklist.md +434 -0
  18. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-memory-bounds-ci-checklist.md +509 -0
  19. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/SKILL.md +439 -0
  20. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-harness-campaign-checklist.md +379 -0
  21. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-oracle-triage-ci-checklist.md +307 -0
  22. package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/SKILL.md +48 -28
  23. package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/references/operation-ordering-stale-write-checklist.md +259 -0
  24. package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/SKILL.md +329 -0
  25. package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/references/input-boundary-security-checklist.md +319 -0
  26. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/SKILL.md +306 -0
  27. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/input-session-state-checklist.md +298 -0
  28. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/remote-input-transport-interaction-checklist.md +328 -0
  29. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/SKILL.md +353 -0
  30. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-diagnostics-recovery-checklist.md +267 -0
  31. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-execution-closure-performance-checklist.md +428 -0
  32. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-gc-verification-checklist.md +457 -0
  33. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-semantics-runtime-checklist.md +391 -0
  34. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/SKILL.md +294 -0
  35. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/modal-loop-reentrancy-checklist.md +290 -0
  36. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/nested-modal-state-lifetime-checklist.md +297 -0
  37. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/SKILL.md +252 -0
  38. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/dns-network-resolution-checklist.md +394 -0
  39. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/language-symbol-resolution-checklist.md +282 -0
  40. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/module-package-loader-resolution-checklist.md +352 -0
  41. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/SKILL.md +103 -17
  42. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/cst-ast-lowering-checklist.md +260 -0
  43. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/lexer-tokenization-checklist.md +397 -0
  44. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-serialization-compatibility-checklist.md +164 -0
  45. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-traversal-rewrite-checklist.md +209 -0
  46. package/templates/default/locales/en/.mustflow/skills/race-condition-review/SKILL.md +68 -11
  47. package/templates/default/locales/en/.mustflow/skills/race-condition-review/references/race-reproduction-memory-model-checklist.md +268 -0
  48. package/templates/default/locales/en/.mustflow/skills/routes.toml +151 -0
  49. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/SKILL.md +343 -0
  50. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-auth-stream-resume-checklist.md +413 -0
  51. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-handoff-protocol-checklist.md +485 -0
  52. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/SKILL.md +267 -0
  53. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/admission-decision-recovery-checklist.md +308 -0
  54. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/two-phase-transition-checklist.md +229 -0
  55. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/SKILL.md +300 -0
  56. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-affinity-event-loop-checklist.md +277 -0
  57. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-dispatch-lifecycle-checklist.md +292 -0
  58. package/templates/default/manifest.toml +115 -1
@@ -0,0 +1,343 @@
1
+ ---
2
+ mustflow_doc: skill.session-handoff-integrity-review
3
+ locale: en
4
+ canonical: true
5
+ revision: 2
6
+ lifecycle: mustflow-owned
7
+ authority: procedure
8
+ name: session-handoff-integrity-review
9
+ description: Apply this skill when a live user, service, device, game, remote-control, streaming, or AI-agent session moves between processes, nodes, runtimes, regions, edges, or agents and correctness depends on one current owner, monotonic epochs, snapshot-plus-delta or multi-store cursor continuity, in-flight command and effect recovery, target acceptance, fencing, authorization freshness, target-bound resume credentials, bidirectional application acknowledgments, draining, reconnection, reconciliation, or split-brain fault evidence.
10
+ metadata:
11
+ mustflow_schema: "1"
12
+ mustflow_kind: procedure
13
+ pack_id: mustflow.core
14
+ skill_id: mustflow.core.session-handoff-integrity-review
15
+ command_intents:
16
+ - changes_status
17
+ - changes_diff_summary
18
+ - lint
19
+ - build
20
+ - test_related
21
+ - test
22
+ - test_audit
23
+ - docs_validate_fast
24
+ - test_release
25
+ - mustflow_check
26
+ ---
27
+
28
+ # Session Handoff Integrity Review
29
+
30
+ <!-- mustflow-section: purpose -->
31
+ ## Purpose
32
+
33
+ Review session handoff as an authority cutover with state and effect continuity, not as a blob-copy
34
+ operation. Preserve exactly one valid writer, keep accepted commands recoverable, make stale owners
35
+ harmless at the final effect boundary, and force every handoff to reach a durable terminal state.
36
+
37
+ Treat session data, derived caches, deletion records, expiry, coordination ownership, in-flight
38
+ commands, external effects, runtime-only capabilities, authorization grants, connection cursors,
39
+ model-visible context, artifacts, approvals, and policy state as distinct transfer classes. A target
40
+ process being alive, a snapshot upload completing, or a transport write succeeding does not prove
41
+ that the target can safely own, resume, or acknowledge the session.
42
+
43
+ <!-- mustflow-section: use-when -->
44
+ ## Use When
45
+
46
+ - A live session moves between workers, servers, regions, devices, runtimes, agent processes, or
47
+ model agents while requests can still arrive.
48
+ - Code implements or reviews prepare, quiesce, snapshot, catch-up, import, accept, owner commit,
49
+ drain, redirect, abort, quarantine, resume, or forward recovery.
50
+ - Correctness depends on one session writer, monotonic owner epochs, stale-writer rejection,
51
+ snapshot and event-log continuity, command replay, response continuity, or split-brain safety.
52
+ - Session state includes caches, leases, locks, queue offsets, unacknowledged messages, streaming
53
+ output, tool calls, external effects, files, artifacts, approvals, secrets, or scoped authority.
54
+ - Authentication grants, handoff or resume tickets, refresh capability, delegation chains, current
55
+ policy, revocation, sender binding, or target-specific credentials cross the owner boundary.
56
+ - WebSocket, server-sent event, RPC stream, media stream, gateway-backed connection, reconnect, or
57
+ make-before-break behavior depends on bidirectional sequence and application-acknowledgment state.
58
+ - An AI-agent handoff transfers goals, explicit constraints, decisions, evidence, conversation
59
+ cursors, tool ledgers, artifact references, guardrails, pending approvals, or model-visible context.
60
+ - Timeout, response loss, process death, pause, lease expiry, network partition, stale routing,
61
+ schema mismatch, duplicate delivery, or partial state transfer can make ownership or effects
62
+ ambiguous.
63
+
64
+ <!-- mustflow-section: do-not-use-when -->
65
+ ## Do Not Use When
66
+
67
+ - A local Codex or Hermes transcript is referenced read-only for evidence; use
68
+ `cross-agent-session-reference`.
69
+ - An incomplete coding task needs a bounded restart summary; use `restricted-handoff-resume`.
70
+ - Agent A hands a design or private plan to Agent B for later implementation without transferring a
71
+ live runtime session; use `design-implementation-handoff`.
72
+ - A non-session authority changes through prepare and commit; use
73
+ `two-phase-transition-integrity-review` as the primary skill.
74
+ - Only duplicate request handling is in scope; use `idempotency-integrity-review`.
75
+ - Only database-to-broker publication convergence is in scope; use `dual-write-consistency`.
76
+
77
+ <!-- mustflow-section: required-inputs -->
78
+ ## Required Inputs
79
+
80
+ - Session identity and current owner record, including owner instance identity, epoch or generation,
81
+ state version, protocol version, lease identity and authority, and authoritative storage.
82
+ - Handoff identity ledger: session, logical handoff, attempt, phase, command, effect, artifact,
83
+ approval, output stream, and correlation identities plus their retention rules.
84
+ - Protocol state machine, legal transitions, rollback boundary, commit linearization point, terminal
85
+ states, and which actor may perform each transition.
86
+ - State inventory split into durable source state, immutable artifacts, derived caches, tombstones,
87
+ absolute expiry, timers and retry position, coordination leases or locks, queued and in-flight
88
+ commands, external effects, runtime-only objects, model-visible context, credentials, approvals,
89
+ and policy state.
90
+ - Snapshot revision or per-store cursor vector, delta or event-log range, cursor inclusivity,
91
+ manifest and content hashes, schema and writer versions, required features, queue offsets,
92
+ tombstone retention, command ledger, and canonical validation evidence.
93
+ - Admission and quiesce rules for new commands, ordering domain, source drain behavior, stale-route
94
+ behavior, redirect or forwarding contract, connection generation, client-to-server and
95
+ server-to-client sequence and application acknowledgments, replay window, resume-too-old path,
96
+ and response or media-stream boundary.
97
+ - Target capability, current grant and policy evaluation, subject and actor delegation, permission,
98
+ dependency, resource, schema, artifact, tool, credential exchange, connection, and deadline checks
99
+ plus explicit acceptance or rejection evidence.
100
+ - Commit predicate, owner compare-and-swap, new epoch issuance, outbox or inbox records, and every
101
+ storage, queue, file, tool, or external-effect sink that must reject stale epochs.
102
+ - Timeout and absolute-deadline model, retry owner, retry and recovery budgets, outcome-certainty
103
+ classes, status lookup, rollback, compensation, forward recovery, quarantine, and reconciler.
104
+ - Structured transition events, append-only owner audit, trace and span-link model, invariant
105
+ metrics, privacy controls, deterministic failpoints, history checker, and operating objectives.
106
+ - Configured command intents for the selected repository.
107
+
108
+ Read [Session Handoff Protocol Checklist](references/session-handoff-protocol-checklist.md) when the
109
+ handoff crosses a process boundary, carries live commands or AI-agent state, or makes safety,
110
+ continuity, rollback, retry, timeout, observability, or fault-tolerance claims.
111
+
112
+ Read [Session Authorization and Stream Resume Checklist](references/session-auth-stream-resume-checklist.md)
113
+ when state spans multiple stores, expiry or deletion must survive transfer, authorization or token
114
+ state crosses the boundary, or a live connection, bidirectional stream, replay window, application
115
+ acknowledgment, compression context, or media timeline must resume.
116
+
117
+ <!-- mustflow-section: preconditions -->
118
+ ## Preconditions
119
+
120
+ - The task matches the Use When conditions and does not match the exclusions.
121
+ - The authoritative owner record and the final sinks able to reject stale epochs are identified, or
122
+ their absence is reported as the primary split-brain risk.
123
+ - Current repository instructions and the selected repository command contract have been checked.
124
+
125
+ <!-- mustflow-section: allowed-edits -->
126
+ ## Allowed Edits
127
+
128
+ - Update session and handoff records, owner compare-and-swap logic, fencing checks, snapshot and
129
+ delta transfer, manifests, inboxes, command and tool ledgers, target acceptance, redirectors,
130
+ reconcilers, recovery workers, audit events, diagnostics, tests, and directly synchronized docs
131
+ or templates.
132
+ - Add explicit context-envelope, artifact-reference, approval-state, secret-reference, permission,
133
+ and policy-version contracts for AI-agent sessions.
134
+ - Add deterministic failpoints, virtual time, fake coordination services, network fault fixtures,
135
+ history properties, and invariant assertions within the repository's established test surfaces.
136
+ - Do not serialize live locks, database connections, tool clients, tracing handles, raw secrets, or
137
+ other runtime objects as transferable session state.
138
+ - Do not implement dual writers as a handoff shortcut or restore the old owner after the authority
139
+ commit. Recover forward under the committed epoch.
140
+
141
+ <!-- mustflow-section: procedure -->
142
+ ## Procedure
143
+
144
+ 1. State the safety and continuity invariants before choosing mechanics.
145
+ - At most one epoch may produce accepted effects for a session.
146
+ - Owner epoch and state version never move backward.
147
+ - A command acknowledged as successful remains represented by a durable terminal effect.
148
+ - One command identity produces at most one accepted external effect.
149
+ - Every handoff eventually reaches a named terminal or quarantined state.
150
+ 2. Separate control plane from data plane.
151
+ - Keep owner, epoch, state version, protocol state, commit decision, and target acceptance in the
152
+ strongly coordinated authority record.
153
+ - Keep large immutable history, files, model outputs, and artifact chunks behind versioned
154
+ manifests. Do not make eventual-consistency storage the owner authority.
155
+ 3. Keep identities distinct. Do not collapse session, owner instance, handoff, attempt, phase,
156
+ command, effect, output stream, connection generation, authorization grant, policy, lease,
157
+ artifact, approval, and epoch into one correlation ID. Preserve the same logical handoff identity
158
+ across safe retries while giving each execution attempt and process boot its own identity.
159
+ 4. Persist a recoverable state machine before starting transfer. Model preparation, quiescence,
160
+ import, catch-up, target acceptance, owner commit, drain, abort, quarantine, and terminal cleanup
161
+ as durable transitions with typed transition authority.
162
+ 5. Classify every state item before transfer.
163
+ - Copy durable source facts and immutable artifacts with versions and hashes.
164
+ - Rebuild derived caches under the committed state version.
165
+ - Reacquire leases and locks under the new epoch; never deserialize old coordination ownership.
166
+ - Reconcile in-flight commands and external effects through durable ledgers.
167
+ - Reconstruct runtime-only clients and credentials from scoped references.
168
+ - Preserve absolute expiry, tombstones, timer intent, retry position, rate-limit state, random
169
+ seed, pending callbacks, and subscriptions when they affect future behavior; do not reset them
170
+ silently as a side effect of import.
171
+ 6. Pair every snapshot with a source revision and an ordered catch-up range. When state spans stores
172
+ without one global revision, bind a per-store cursor vector and activation predicate. Define
173
+ `applied_through`, `next_expected`, or equivalent inclusive semantics explicitly. The target must
174
+ prove which snapshot it imported, which deltas and deletions it applied, and the final version
175
+ vector it validated. A revisionless state dump or near-simultaneous multi-store read is not a
176
+ handoff boundary.
177
+ 7. Define live-input behavior before quiescence. Keep one writer, durably admit new commands with
178
+ stable logical-session-scoped command IDs, establish a cutoff, drain or record pre-cutoff work,
179
+ and make post-cutoff ownership explicit. Name the ordering domain and serialize replay within it;
180
+ parallelize only across keys proven independent. Do not hide conflicting dual writes or reordered
181
+ replay behind later merge logic.
182
+ 8. Make target readiness session-specific. Start the target in shadow or import mode without
183
+ authority to execute user commands or external effects. Validate state hash, schema, event and
184
+ command positions, tombstones and expiry, current grant and policy, subject and actor delegation,
185
+ tools, resources, artifacts, connection resume state, and remaining deadline, then persist
186
+ explicit acceptance or a typed rejection.
187
+ 9. Commit ownership once with an atomic conditional decision. Bind the expected source owner,
188
+ source epoch, source state version, accepted target, target protocol version, and handoff identity.
189
+ Issue the next monotonic epoch in the same authority decision.
190
+ 10. Enforce fencing at final sinks. Storage engines, queues, file writers, tool executors, gateways,
191
+ routers, and external-effect adapters must reject lower or mismatched epochs. Cache owner maps
192
+ with their revision and refresh them after stale-owner rejection. Revoking a lease, relying on
193
+ connection affinity, or notifying the source is not sufficient when a paused process can resume.
194
+ 11. Treat timeout and lost response as observer `UNKNOWN`, not protocol failure. Query durable
195
+ handoff status, owner, epoch, state version, acceptance, and effect receipts before retrying,
196
+ aborting, compensating, or declaring success.
197
+ 12. Give retry policy one owner. Propagate one absolute deadline, reserve time for status lookup and
198
+ recovery, classify outcomes as safe-to-retry, query-required, compensation-required, or
199
+ terminal, use jitter and a bounded retry budget, and prevent retry multiplication across layers.
200
+ 13. Separate rollback, compensation, and forward recovery.
201
+ - Before owner commit, release reversible preparation and reactivate only the still-authoritative
202
+ source under the same valid epoch.
203
+ - After owner commit, do not resurrect the source. Resume, repair, compensate, or hand off again
204
+ from the committed target epoch.
205
+ 14. Couple the authority decision to durable publication. When other systems learn through events,
206
+ record the owner change and outbox event atomically, deduplicate consumption through an inbox or
207
+ processing ledger, and keep publication progress separate from authority truth.
208
+ 15. Preserve command, effect, and acknowledgment continuity. Record received, started,
209
+ effect-committed, response-durable, sent, and application-acknowledged stages where relevant.
210
+ Send success only after the durable point able to replay the same result. On takeover, query
211
+ ambiguous external effects and replay only durable output beyond the peer's application ACK.
212
+ Queue, socket, transport, or ping success does not prove application completion.
213
+ 16. Version caches and immutable artifacts. Select caches through the authoritative state version,
214
+ preserve versioned tombstones longer than the maximum stale-replica and handoff window, carry
215
+ authoritative absolute expiry instead of resetting TTL, verify manifest and chunk hashes, reject
216
+ unsupported schema or required features before commit, and let old namespaces expire only after
217
+ they are no longer referenced.
218
+ 17. Drain the source without letting it execute. Keep a bounded redirect or forwarding window for
219
+ stale routes, publish the last accepted client sequence, last emitted server sequence, target,
220
+ epoch, and resume deadline where the protocol permits, preserve the original command identity,
221
+ and observe traffic that continues after the grace window.
222
+ 18. For AI-agent sessions, separate runtime context from model-visible context.
223
+ - Transfer goals, explicit constraints, accepted decisions, rejected options, evidence links,
224
+ cursors, pending work, and policy state through a typed envelope.
225
+ - Recreate database, tool, tracing, and credential objects locally from references.
226
+ - Keep original events authoritative and summaries derived with source event references.
227
+ 19. Preserve tool, artifact, output, and approval boundaries.
228
+ - Record tool call identity, idempotency key, status including `UNKNOWN`, external resource or
229
+ effect receipt, and retry policy.
230
+ - Reference artifacts by immutable identity, hash, media type, schema version, and source events.
231
+ - Transfer pending approval identity, requested action, approver scope, expiry, and policy
232
+ version without converting a wait state into approval.
233
+ - Stop streaming at a durable output boundary; do not splice two owners into one unversioned
234
+ response stream.
235
+ 20. Transfer capability, not secrets. Negotiate target tools, schemas, permissions, and resource
236
+ limits before acceptance. Use a one-purpose, one-time handoff or resume ticket bound to session,
237
+ handoff, target, epoch, nonce, and short expiry; exchange credential references for target-bound,
238
+ least-privilege, preferably sender-bound authority. Preserve original authentication time and
239
+ strength, separate user subject from service actors, re-evaluate current grants and policy before
240
+ activation, and propagate revocation to every owner and gateway. Do not copy bearer or refresh
241
+ credentials into prompts, logs, traces, queues, URLs, or handoff records.
242
+ 21. Give orphan recovery one durable owner. A reconciler must fence itself, inspect authoritative
243
+ state and effect receipts, choose resume, pre-commit abort, forward recovery, or quarantine, and
244
+ avoid blind force decisions when evidence is incomplete.
245
+ 22. Make transitions and invariants observable. Emit structured state-transition events, preserve
246
+ an append-only owner and epoch audit, link asynchronous attempts causally, retain exceptional
247
+ traces without propagating sensitive baggage, and measure split-brain attempts, stale rejects,
248
+ hash mismatches, nonterminal age, duplicate effects, and manual recovery.
249
+ 23. Test the history, not only the final row. Place deterministic failpoints before and after every
250
+ durable write and authority decision. Combine response loss, asymmetric partitions, process
251
+ pause and restart, lease expiry, stale cache reads, event reordering, schema mismatch, and clock
252
+ anomalies. Preserve the seed and actual fault schedule, then check the full command and owner
253
+ history against the named invariants.
254
+ 24. Model real-time resume above the transport.
255
+ - Keep a stable edge or gateway connection when true connection continuity is required; switch
256
+ only the backend logical stream. Otherwise promise reconnect and application resume, not socket
257
+ migration.
258
+ - Track independent client-to-server and server-to-client sequence and application-ACK spaces,
259
+ connection generation, subscription and channel cursors, replay retention, and an explicit
260
+ resume-too-old response that triggers full state synchronization.
261
+ - For make-before-break, allow overlapping connections but one write epoch. Activate the new
262
+ path only after catch-up and a switch barrier is acknowledged.
263
+ 25. Cut over only at complete application boundaries. Do not transfer a partial logical message,
264
+ compression dictionary, batch, RPC item, or media dependency chain as if it were independent
265
+ state. Reinitialize or negotiate compression context, and move audio or video at a decodable
266
+ segment or keyframe boundary with an explicit discontinuity when continuity cannot be preserved.
267
+ 26. Treat replayable early connection data as hostile to side effects. Keep owner activation,
268
+ ticket consumption, payments, writes, and other irreversible commands out of replayable early
269
+ data unless the complete path enforces a stable idempotency and anti-replay contract.
270
+
271
+ <!-- mustflow-section: postconditions -->
272
+ ## Postconditions
273
+
274
+ - Owner authority, epoch, commit point, target acceptance, stale-writer rejection, and terminal
275
+ recovery states are explicit and backed by named durable evidence.
276
+ - Snapshot, multi-store cursor, delta, tombstone, expiry, command, effect, application ACK,
277
+ artifact, cache, lock, runtime-context, model-context, authorization, approval, credential, and
278
+ secret-transfer policies are separated.
279
+ - Timeout, retry, rollback, compensation, forward recovery, drain, and quarantine actions are
280
+ selected from durable authority and outcome evidence rather than caller observation alone.
281
+ - AI-agent summaries remain derived context, pending approvals remain pending, tool outcomes remain
282
+ queryable, and target capability is proven before ownership commit.
283
+ - Authorization is recalculated for the target, stale grants and epochs are rejected, revocation
284
+ reaches old owners, and real-time resume uses explicit bidirectional cursors and replay bounds.
285
+ - Safety and liveness claims are tied to structured events, append-only owner history, invariant
286
+ metrics, deterministic fault schedules, and configured verification evidence.
287
+
288
+ <!-- mustflow-section: verification -->
289
+ ## Verification
290
+
291
+ Use configured oneshot command intents when available:
292
+
293
+ - `changes_status`
294
+ - `changes_diff_summary`
295
+ - `lint`
296
+ - `build`
297
+ - `test_related`
298
+ - `test`
299
+ - `test_audit`
300
+ - `docs_validate_fast`
301
+ - `test_release`
302
+ - `mustflow_check`
303
+
304
+ Prefer deterministic protocol, crash-point, response-loss, stale-epoch, command-replay, target-
305
+ acceptance, context-envelope, approval-resume, and history-property tests exposed by the selected
306
+ repository command contract.
307
+
308
+ <!-- mustflow-section: failure-handling -->
309
+ ## Failure Handling
310
+
311
+ - If no authoritative owner record or sink-level fence exists, report split-brain safety as
312
+ unproven instead of approving a lease-only design.
313
+ - If snapshot revision, delta boundary, command ledger, or effect receipts are missing, stop before
314
+ owner commit or route the session to quarantine.
315
+ - If target capability, schema, permissions, artifacts, or remaining deadline cannot be proven,
316
+ reject target acceptance while the source remains authoritative.
317
+ - If commit outcome is unknown, query authority and receipts before retry, rollback, compensation,
318
+ or manual force.
319
+ - If original events, approval state, or tool outcomes are unavailable, label transferred summaries
320
+ as incomplete and block irreversible continuation that depends on the missing evidence.
321
+ - If current grant, target audience, sender binding, revocation, application ACK, replay window, or
322
+ stream boundary cannot be proven, reject activation or require full reauthentication or state
323
+ synchronization instead of silently resuming.
324
+ - If deterministic fault or history evidence is unavailable, report the exact untested cutover and
325
+ recovery branches rather than using repeated happy-path runs as proof.
326
+
327
+ <!-- mustflow-section: output-format -->
328
+ ## Output Format
329
+
330
+ - Session and handoff boundary
331
+ - Owner authority, epoch, state version, commit point, and target acceptance
332
+ - State, tombstone, expiry, cache, lock, command, effect, artifact, runtime-context, and model-context inventory
333
+ - Snapshot, cursor vector, delta, manifest, schema, quiesce, drain, and stale-route behavior
334
+ - Timeout, retry, rollback, compensation, forward-recovery, reconciler, and quarantine decisions
335
+ - AI envelope, tool ledger, authorization grant, delegation, credential exchange, approval,
336
+ permission, revocation, and secret handling
337
+ - Connection generation, bidirectional sequence and application ACK, replay, resume ticket,
338
+ make-before-break, message or media boundary, and resume-too-old behavior
339
+ - Structured transition, audit, trace, metric, failpoint, fault schedule, and history evidence
340
+ - Files changed
341
+ - Command intents run
342
+ - Skipped checks and reasons
343
+ - Remaining split-brain, state-loss, duplicate-effect, context, privacy, or liveness risk