mustflow 2.115.16 → 2.116.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/lib/run-plan.js +5 -1
- package/dist/core/approval-actions.js +28 -0
- package/dist/core/command-contract-validation.js +0 -41
- package/dist/core/skill-route-resolution.js +34 -3
- package/package.json +1 -1
- package/templates/default/i18n.toml +49 -13
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +25 -1
- package/templates/default/locales/en/.mustflow/skills/adapter-boundary/SKILL.md +9 -8
- package/templates/default/locales/en/.mustflow/skills/agent-execution-control-review/SKILL.md +13 -1
- package/templates/default/locales/en/.mustflow/skills/api-contract-change/SKILL.md +2 -1
- package/templates/default/locales/en/.mustflow/skills/command-pattern/SKILL.md +11 -7
- package/templates/default/locales/en/.mustflow/skills/concurrency-invariant-review/SKILL.md +3 -1
- package/templates/default/locales/en/.mustflow/skills/credit-ledger-integrity-review/SKILL.md +4 -1
- package/templates/default/locales/en/.mustflow/skills/dual-write-consistency/SKILL.md +170 -0
- package/templates/default/locales/en/.mustflow/skills/durable-workflow-orchestration/SKILL.md +167 -0
- package/templates/default/locales/en/.mustflow/skills/execution-ledger-integrity-review/SKILL.md +161 -0
- package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/SKILL.md +5 -3
- package/templates/default/locales/en/.mustflow/skills/llm-token-cost-control-review/SKILL.md +5 -1
- package/templates/default/locales/en/.mustflow/skills/migration-safety-check/SKILL.md +4 -1
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/SKILL.md +332 -0
- package/templates/default/locales/en/.mustflow/skills/policy-decision-integrity-review/SKILL.md +170 -0
- package/templates/default/locales/en/.mustflow/skills/public-json-contract-change/SKILL.md +2 -1
- package/templates/default/locales/en/.mustflow/skills/queue-processing-integrity-review/SKILL.md +6 -2
- package/templates/default/locales/en/.mustflow/skills/routes.toml +108 -0
- package/templates/default/locales/en/.mustflow/skills/state-machine-pattern/SKILL.md +5 -3
- package/templates/default/locales/en/.mustflow/skills/structured-concurrency-supervision-review/SKILL.md +155 -0
- package/templates/default/locales/en/.mustflow/skills/transaction-boundary-integrity-review/SKILL.md +5 -2
- package/templates/default/manifest.toml +47 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
mustflow_doc: skill.command-pattern
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 14
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: command-pattern
|
|
@@ -29,7 +29,7 @@ metadata:
|
|
|
29
29
|
<!-- mustflow-section: purpose -->
|
|
30
30
|
## Purpose
|
|
31
31
|
|
|
32
|
-
Model
|
|
32
|
+
Model one accepted state-changing user or system intent and its local commit as one clear execution unit. This skill does not own the full durable lifecycle after acceptance.
|
|
33
33
|
|
|
34
34
|
A command is not a decorative wrapper around a button handler or function. It is the application-level unit that gathers input validation, authorization, domain object loading, domain rule execution, state changes, transaction boundaries, idempotency, audit evidence, event recording, failure handling, retry decisions, and observability around one intent.
|
|
35
35
|
|
|
@@ -73,6 +73,9 @@ Use commands to make these questions answerable later:
|
|
|
73
73
|
- The only problem is business logic mixed with I/O; use `pure-core-imperative-shell` first and let this skill shape the shell execution unit when state changes need command semantics.
|
|
74
74
|
- The only problem is provider, SDK, database, file, webhook, queue, cache, or framework object leakage; use `adapter-boundary` and `dependency-injection`.
|
|
75
75
|
- The only problem is that several already-owned subsystem steps need one stable caller-facing entry point; use `facade-pattern` unless the operation also needs command payload, context, idempotency, audit, retry, transaction, outbox, or queue semantics.
|
|
76
|
+
- The work spans multiple durable steps, checkpoints, process loss, callbacks, or compensation; use `durable-workflow-orchestration`. The command may accept or start that workflow, but does not redefine its lifecycle.
|
|
77
|
+
- The main contract is truthful run, attempt, checkpoint, or effect evidence across executions; use `execution-ledger-integrity-review`.
|
|
78
|
+
- The main contract derives allow, deny, limit, downgrade, or obligation decisions; use `policy-decision-integrity-review`. The command consumes the decision.
|
|
76
79
|
|
|
77
80
|
<!-- mustflow-section: required-inputs -->
|
|
78
81
|
## Required Inputs
|
|
@@ -88,7 +91,7 @@ Use commands to make these questions answerable later:
|
|
|
88
91
|
- Work-acceptance response policy, such as immediate success, queued status, processing status, or accepted response; job status vocabulary; deduplication key; attempt limit; next-run time; lock expiry; dead-letter handling; and worker ownership.
|
|
89
92
|
- Queue contract details when work crosses a queue: queue name, business urgency, job id, job type, schema version, created time, run-after time, attempt count, idempotency key, request or trace context, safe payload reference, retry categories, timeout, dead-letter target, ordering requirement, and manual replay rule.
|
|
90
93
|
- AI work accounting when relevant: feature key, model key, usage ledger entry, user request id, provider call id, pricing snapshot, cache-hit type, retry grouping, cost limit, and whether failed or unknown calls require reconciliation before retry.
|
|
91
|
-
- AI policy decision when relevant:
|
|
94
|
+
- AI policy decision when relevant: the already-derived allow, deny, limit, downgrade, or obligation result that the command consumes without redefining policy.
|
|
92
95
|
- Cost-bearing work accounting when relevant: value unit, cost unit, workspace or account quota, shared tenant credit pool, free-plan limit, user-action fan-out, usage event, rollup target, and whether retries or duplicate jobs can double-count cost.
|
|
93
96
|
- Idempotency layers for request acceptance, job execution, provider calls, and incoming webhooks, including scope, request hash, duplicate result behavior, and different-payload conflict behavior.
|
|
94
97
|
- Existing local conventions for result types, option types, domain errors, repositories, gateways, unit of work, outbox, audit logs, command buses, and tests.
|
|
@@ -173,9 +176,9 @@ Use commands to make these questions answerable later:
|
|
|
173
176
|
- Schedule follow-up work only after the command decision is persisted.
|
|
174
177
|
- For payment, point, credit, inventory, entitlement, subscription, coupon, and refund commands, prefer append-only ledgers or action records as the evidence source. Treat summary balances or statuses as derived or transactionally updated read state.
|
|
175
178
|
- For ordinary content, account, and workflow commands, persist the core state and outbox or job records before triggering analytics, email, search indexing, AI processing, statistics, cache purge, or feed refresh work.
|
|
176
|
-
- For cost-bearing AI commands, persist
|
|
177
|
-
- For agentic AI commands, persist the policy decision and
|
|
178
|
-
-
|
|
179
|
+
- For cost-bearing AI commands, persist accepted work and reservation consumption before a worker performs model calls. `credit-ledger-integrity-review` owns prepaid or money-equivalent reserve, capture, and release invariants; `llm-token-cost-control-review` owns token estimates and caps.
|
|
180
|
+
- For agentic AI commands, consume and persist the policy decision and accepted-work limits before the first model call. Route policy derivation to `policy-decision-integrity-review` and multi-step resume or compensation to `durable-workflow-orchestration`.
|
|
181
|
+
- A command may consume an existing reservation or quota allocation, but it must not redefine credit-ledger balance invariants. Keep accepted-work reservation persistence here and reserve, capture, and release accounting in `credit-ledger-integrity-review`.
|
|
179
182
|
- When one command creates many internal jobs, record the causation relationship so thumbnails, OCR, AI calls, embeddings, search indexing, notifications, logs, analytics exports, and webhooks can be attributed to the original user action without losing retry or cost detail.
|
|
180
183
|
- For HTTP acceptance of long-running work, persist the command result, job row, or outbox row in the same local transaction, then return the created resource identifier and current status. Do not make the HTTP request wait for the worker's external side effect unless the product contract truly requires immediate completion.
|
|
181
184
|
- For external API work, persist the internal intent before the provider call becomes the only record. Payment, email, map, AI, search, file, and webhook follow-up commands should leave enough local evidence to answer what was attempted, why, for whom, and how to retry or reconcile it later.
|
|
@@ -236,6 +239,7 @@ Use commands to make these questions answerable later:
|
|
|
236
239
|
- Put exhausted or poison jobs into a dead-letter or manual-review state with safe error metadata instead of retrying forever.
|
|
237
240
|
- Treat a queued failure as hidden until metrics, alerts, or operator review make it visible. Track queue depth, job age, retry count, failure rate, dead-letter growth, provider rate-limit pressure, and manual replay results for important queues.
|
|
238
241
|
- Define the smallest operator actions that make the command recoverable at 03:00: resend a specific email, reprocess a specific webhook, retry a specific AI job, rebuild a specific search index, reconcile a specific payment attempt, or temporarily disable one provider-backed feature.
|
|
242
|
+
- When these steps must resume deterministically across process loss, callbacks, checkpoints, or compensation, hand the accepted command to `durable-workflow-orchestration`. When run, attempt, checkpoint, and effect receipts are the source of truth, use `execution-ledger-integrity-review`.
|
|
239
243
|
17. Test command behavior.
|
|
240
244
|
- Cover success, required input absence, invalid input, unauthorized actor, missing resource, state conflict, domain invariant failure, duplicate retry with same payload, duplicate key with different payload, transaction rollback, outbox creation, dependency failure, retryability, non-retryability, and concurrency conflicts.
|
|
241
245
|
- Use fake repositories and gateways for handler unit tests.
|
|
@@ -250,7 +254,7 @@ Use commands to make these questions answerable later:
|
|
|
250
254
|
- The handler has injected dependencies and handles one command.
|
|
251
255
|
- Authorization, idempotency, transaction boundaries, outbox behavior, retry classification, concurrency protection, observability, and audit requirements are explicit where relevant.
|
|
252
256
|
- Request, trace, command, job, cron, webhook, correlation, and causation identifiers are explicit where the command crosses asynchronous or external boundaries.
|
|
253
|
-
- HTTP acceptance
|
|
257
|
+
- HTTP acceptance and the local durable handoff are explicit; full multi-step resume, checkpoint, callback, and compensation semantics are owned by `durable-workflow-orchestration`.
|
|
254
258
|
- Credit, quota, tenant-limit, usage-event, fan-out attribution, and retry-cost behavior are explicit when one command consumes high-cost resources or creates multiple internal jobs.
|
|
255
259
|
- Expected command failures are returned as typed values.
|
|
256
260
|
- External effects do not run inside local database transactions.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
mustflow_doc: skill.concurrency-invariant-review
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 3
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: concurrency-invariant-review
|
|
@@ -50,6 +50,7 @@ The review question is not "is the code correct in this order?" The stronger que
|
|
|
50
50
|
- The task is only memory retention, listener cleanup, timer cleanup, or native resource lifetime; use `memory-lifetime-review` first unless cleanup can race with concurrent work.
|
|
51
51
|
- The task is only backend retries, queues, idempotency, outbox, health, cache, or external-call deadlines; use `backend-reliability-change` first and this skill only for concurrent ownership and invariant timing.
|
|
52
52
|
- The task is only error handling truthfulness; use `failure-integrity-review` first.
|
|
53
|
+
- The main problem is parent-child task trees, join, cancellation propagation, deadlines, shutdown ownership, or orphan prevention rather than a shared-resource invariant; use `structured-concurrency-supervision-review`.
|
|
53
54
|
|
|
54
55
|
<!-- mustflow-section: required-inputs -->
|
|
55
56
|
## Required Inputs
|
|
@@ -139,6 +140,7 @@ The review question is not "is the code correct in this order?" The stronger que
|
|
|
139
140
|
- Shutdown should define stop-accepting, drain, cancel, flush, close, and in-flight side-effect ownership.
|
|
140
141
|
- `closed = true` is not enough if futures, workers, sockets, buffers, queues, or async continuations keep running.
|
|
141
142
|
- Mutexes, semaphores, read-write locks, connection checkouts, rate-limit tokens, and permits must release on every exception path.
|
|
143
|
+
- Route parent-child join, cancellation propagation, deadline inheritance, and orphan prevention to `structured-concurrency-supervision-review`; keep shared-resource ownership and invariant timing here.
|
|
142
144
|
15. Check deadlocks and starvation as wait-for systems.
|
|
143
145
|
- A thread stack dump alone is not enough. Build a wait-for graph that connects threads, locks, condition variables, futures, queues, pool workers, callbacks, and external waits.
|
|
144
146
|
- Separate lock-order deadlock, lost notification, callback reentry, sync-over-async, and thread-pool starvation; a saturated pool can freeze progress without any mutex cycle.
|
package/templates/default/locales/en/.mustflow/skills/credit-ledger-integrity-review/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
mustflow_doc: skill.credit-ledger-integrity-review
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 2
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: credit-ledger-integrity-review
|
|
@@ -47,6 +47,7 @@ Review credit, point, and wallet balance code as an accounting ledger, not a bal
|
|
|
47
47
|
- The task only reviews general business-rule placement without a balance, ledger, wallet, credit, point, or reconciliation surface; use `business-rule-leakage-review`.
|
|
48
48
|
- The task only designs a generic lifecycle state machine with no ledger, amount, idempotency, balance, reservation, expiry, or reconciliation risk; use `state-machine-pattern`.
|
|
49
49
|
- The task only reviews cache correctness for a non-balance value; use `cache-integrity-review`.
|
|
50
|
+
- The task only reviews soft token, step, concurrency, request-count, or rate budgets that are not prepaid or money-equivalent; use the relevant LLM cost, agent execution, concurrency, or rate-limit skill.
|
|
50
51
|
- The task requires production balance corrections, real refunds, data migrations, or direct database repair without explicit user approval and configured command support.
|
|
51
52
|
|
|
52
53
|
<!-- mustflow-section: required-inputs -->
|
|
@@ -98,6 +99,7 @@ Review credit, point, and wallet balance code as an accounting ledger, not a bal
|
|
|
98
99
|
16. Consume expiry lots deliberately. When credits expire, inspect FIFO, LIFO, earliest-expiry-first, or policy-specific lot allocation. Record lot-level consumption so later refund and audit can reconstruct the path.
|
|
99
100
|
17. Race expiry and usage. Expiry batches must use the same ledger, lock, idempotency, and conditional update rules as user requests. Flag direct batch subtraction that bypasses wallet safeguards.
|
|
100
101
|
18. Separate reservation from capture. Model reserved, captured, released, failed, expired, cancelled, and partially refunded states when credits are held before final purchase, fulfillment, or external payment completion.
|
|
102
|
+
- This ledger owns atomic reserve, capture, and release and the balance invariant. Commands and durable workflows may consume those operations but must not redefine balance availability, ownership, or accounting transitions.
|
|
101
103
|
19. Draw allowed state transitions. Prevent arbitrary `status = REFUNDED`, `status = CAPTURED`, or `status = EXPIRED` writes. Each transition should have a guard, cause, effect, and idempotency rule.
|
|
102
104
|
20. Preserve queue ordering or tolerate reordering. If deduction, cancellation, refund, or expiry events use a queue, prove user, wallet, or transaction-level ordering, or make each consumer robust to reordered events.
|
|
103
105
|
21. Treat message redelivery as normal. Producers, queues, schedulers, and webhooks can duplicate events. Consumer-side ledger mutation must be idempotent with durable dedupe records.
|
|
@@ -117,6 +119,7 @@ Review credit, point, and wallet balance code as an accounting ledger, not a bal
|
|
|
117
119
|
- The credit surface has balance, ledger-entry, source identity, atomicity, amount/unit, ownership, expiry/lot, reservation, queue/cache, audit, and reconciliation maps.
|
|
118
120
|
- Any mutable-balance-only path, missing source key, weak idempotency comparison, non-atomic deduction, wrong lock target, float amount, hidden rounding policy, missing DB invariant, duplicate ledger risk, generic refund, expiry race, cache-trusted deduction, stale replica read, unaudited admin adjustment, or missing reconciliation is fixed or reported with evidence.
|
|
119
121
|
- Tests or explicit verification cover the highest-risk concurrency, failure, duplicate, expiry, reservation, refund, cache, and reconciliation paths available in the current scope.
|
|
122
|
+
- Soft operational budgets remain outside this ledger unless they represent prepaid or money-equivalent value.
|
|
120
123
|
|
|
121
124
|
<!-- mustflow-section: verification -->
|
|
122
125
|
## Verification
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
mustflow_doc: skill.dual-write-consistency
|
|
3
|
+
locale: en
|
|
4
|
+
canonical: true
|
|
5
|
+
revision: 1
|
|
6
|
+
lifecycle: mustflow-owned
|
|
7
|
+
authority: procedure
|
|
8
|
+
name: dual-write-consistency
|
|
9
|
+
description: Apply this skill when one logical operation changes durable state and separately publishes, projects, calls, or writes to another independently committed system, including database-plus-broker outbox or inbox flows, CDC, relay workers, event application ledgers, split outcomes, eventual convergence, reconciliation, and crash-point verification.
|
|
10
|
+
metadata:
|
|
11
|
+
mustflow_schema: "1"
|
|
12
|
+
mustflow_kind: procedure
|
|
13
|
+
pack_id: mustflow.core
|
|
14
|
+
skill_id: mustflow.core.dual-write-consistency
|
|
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
|
+
# Dual Write Consistency
|
|
29
|
+
|
|
30
|
+
<!-- mustflow-section: purpose -->
|
|
31
|
+
## Purpose
|
|
32
|
+
|
|
33
|
+
Keep one logical result truthful when it crosses independently committed databases, brokers,
|
|
34
|
+
indexes, files, or providers. Own the delivery and convergence protocol; do not pretend two commits
|
|
35
|
+
are one transaction or that broker delivery alone proves business convergence.
|
|
36
|
+
|
|
37
|
+
<!-- mustflow-section: use-when -->
|
|
38
|
+
## Use When
|
|
39
|
+
|
|
40
|
+
- A durable mutation and an event publish, projection update, webhook, provider mutation, or second
|
|
41
|
+
store write belong to one logical outcome but cannot commit atomically.
|
|
42
|
+
- Code introduces an outbox, inbox, relay, CDC stream, publisher claim, applied-event ledger,
|
|
43
|
+
reconciliation worker, or eventual-convergence claim.
|
|
44
|
+
- The path can crash between local commit, publish acceptance, publish recording, consumer effect,
|
|
45
|
+
consumer commit, and broker acknowledgement.
|
|
46
|
+
|
|
47
|
+
<!-- mustflow-section: do-not-use-when -->
|
|
48
|
+
## Do Not Use When
|
|
49
|
+
|
|
50
|
+
- One database transaction with no independent commit boundary owns the whole invariant; use
|
|
51
|
+
`transaction-boundary-integrity-review`.
|
|
52
|
+
- The main failure is one logical request repeating; use `idempotency-integrity-review`.
|
|
53
|
+
- The main failure is broker acknowledgement, visibility, prefetch, poison-message, or DLQ behavior;
|
|
54
|
+
use `queue-processing-integrity-review`.
|
|
55
|
+
- The path is an old/new schema migration dual-write; use `migration-safety-check`.
|
|
56
|
+
- The path is a multi-step resumable saga with waits or compensation; use
|
|
57
|
+
`durable-workflow-orchestration`.
|
|
58
|
+
- Two writes happen in one local transaction, such as an order row and its audit row. That is not a
|
|
59
|
+
dual write merely because two tables changed.
|
|
60
|
+
|
|
61
|
+
<!-- mustflow-section: required-inputs -->
|
|
62
|
+
## Required Inputs
|
|
63
|
+
|
|
64
|
+
- Consistency-surface ledger: authoritative mutation, derived destinations, and every independent
|
|
65
|
+
commit boundary.
|
|
66
|
+
- Identity ledger: operation, event, causation, correlation, aggregate, ordering, payload hash, and
|
|
67
|
+
schema-version identities.
|
|
68
|
+
- Outbox and inbox ledger: unique keys, states, owner, claim lease, attempts, timestamps, and stale
|
|
69
|
+
claim recovery.
|
|
70
|
+
- Delivery ledger: producer confirmation, consumer transaction, acknowledgement position,
|
|
71
|
+
duplication, ordering, and redelivery contract.
|
|
72
|
+
- Convergence ledger: acceptable lag, drift detector, reconciliation owner, repair direction, and
|
|
73
|
+
operator-visible terminal or unresolved state.
|
|
74
|
+
- Failure-injection ledger: expected durable state after every crash boundary.
|
|
75
|
+
|
|
76
|
+
<!-- mustflow-section: preconditions -->
|
|
77
|
+
## Preconditions
|
|
78
|
+
|
|
79
|
+
- Read the nearest instructions, command contract, source-of-truth model, producer, consumer,
|
|
80
|
+
persistence schema, and retry or replay paths.
|
|
81
|
+
- Name one authoritative fact and every derived fact. If authority is peer-to-peer or bidirectional,
|
|
82
|
+
define conflict resolution before implementation.
|
|
83
|
+
- Treat provider, broker, and database guarantees as unverified until matched to the configured
|
|
84
|
+
code path and current deployment contract.
|
|
85
|
+
|
|
86
|
+
<!-- mustflow-section: allowed-edits -->
|
|
87
|
+
## Allowed Edits
|
|
88
|
+
|
|
89
|
+
- Add or tighten outbox, inbox, applied-event, relay-claim, delivery-state, drift-detection,
|
|
90
|
+
reconciliation, repair-command, and focused crash-injection surfaces.
|
|
91
|
+
- Synchronize event envelopes, schemas, migrations, tests, docs, metrics, and templates that own the
|
|
92
|
+
same convergence contract.
|
|
93
|
+
- Do not hide split outcomes behind a broad transaction wrapper, memory-only flag, best-effort log,
|
|
94
|
+
or broker exactly-once marketing claim.
|
|
95
|
+
|
|
96
|
+
<!-- mustflow-section: procedure -->
|
|
97
|
+
## Procedure
|
|
98
|
+
|
|
99
|
+
1. Draw the logical operation and every independent commit boundary.
|
|
100
|
+
2. Choose the source of truth and label each destination authoritative, derived, cached, indexed,
|
|
101
|
+
externally owned, or observational.
|
|
102
|
+
3. Put the authoritative mutation and outgoing intent record in one local transaction when that
|
|
103
|
+
store supports it. If not, name the unavoidable gap and repair protocol.
|
|
104
|
+
4. Give each logical event a stable ID, causation ID, correlation ID, aggregate or ordering key,
|
|
105
|
+
payload hash, and schema version required by its consumers.
|
|
106
|
+
5. Make relay claims durable and bounded. Record owner, lease or generation, attempt, next eligible
|
|
107
|
+
time, and stale-claim recovery; a process-local lock is not ownership proof.
|
|
108
|
+
6. Treat a crash after publish but before publish-success recording as duplicate-possible. Resume by
|
|
109
|
+
identity and confirmation or reconciliation, not by assuming the publish failed.
|
|
110
|
+
7. Put the consumer inbox or applied-event unique constraint and irreversible business effect in one
|
|
111
|
+
transaction when possible. An application-level `if exists` is not durable uniqueness.
|
|
112
|
+
8. Separate per-aggregate ordering from globally unordered delivery. Reject or defer stale events
|
|
113
|
+
when state depends on sequence; make commutative consumers explicit when order is irrelevant.
|
|
114
|
+
9. Preserve original identity through poison classification, schema rejection, DLQ transfer, and
|
|
115
|
+
replay. A replay creates a new attempt, not a new logical event.
|
|
116
|
+
10. Define reconciliation for missing, duplicate, stale, unknown, and divergent states. State which
|
|
117
|
+
side wins, which repair command runs, who approves destructive repair, and how convergence is
|
|
118
|
+
rechecked.
|
|
119
|
+
- This skill owns delivery, consumer-application, and projection convergence across independent
|
|
120
|
+
commits. Route workflow-step, terminal-state, and compensation-state recovery to
|
|
121
|
+
`durable-workflow-orchestration`.
|
|
122
|
+
11. Distinguish transport settlement, consumer commit, business convergence, and operator closure.
|
|
123
|
+
Do not report one as proof of the next.
|
|
124
|
+
12. Inject crashes after local commit, before and after publish, after consumer effect, after consumer
|
|
125
|
+
commit, and before acknowledgement. Also test duplicate, reordered, poison, stale-lease, and DLQ
|
|
126
|
+
replay paths.
|
|
127
|
+
|
|
128
|
+
<!-- mustflow-section: postconditions -->
|
|
129
|
+
## Postconditions
|
|
130
|
+
|
|
131
|
+
- Every crash point leaves the operation durably pending, duplicate-safe, reconciliable, or
|
|
132
|
+
explicitly unresolved; no state silently disappears.
|
|
133
|
+
- Relay and consumer ownership, event application, and repair are protected by durable identities,
|
|
134
|
+
constraints, leases or generations, and bounded retries.
|
|
135
|
+
- Outbox-only implementations do not claim completion without consumer duplicate control and a
|
|
136
|
+
reconciliation story.
|
|
137
|
+
- Evidence distinguishes local commit, delivery, application, convergence, and closure.
|
|
138
|
+
|
|
139
|
+
<!-- mustflow-section: verification -->
|
|
140
|
+
## Verification
|
|
141
|
+
|
|
142
|
+
- Use configured `changes_status` and `changes_diff_summary` for scope evidence.
|
|
143
|
+
- Use `lint`, `build`, and `test_related` for changed implementation and focused crash paths; use
|
|
144
|
+
`test` or `test_audit` when shared reliability coverage or test claims require it.
|
|
145
|
+
- Use `docs_validate_fast`, `test_release`, and `mustflow_check` when contracts, templates, package
|
|
146
|
+
output, or Mustflow surfaces change.
|
|
147
|
+
- Record unavailable broker, multi-process, chaos, or live-provider evidence instead of inventing
|
|
148
|
+
commands or approving a static claim as runtime proof.
|
|
149
|
+
|
|
150
|
+
<!-- mustflow-section: failure-handling -->
|
|
151
|
+
## Failure Handling
|
|
152
|
+
|
|
153
|
+
- If the source of truth or repair direction is unknown, stop convergence edits and report the
|
|
154
|
+
conflicting authorities.
|
|
155
|
+
- If one split outcome cannot be detected, preserve it as an explicit unknown state and add an
|
|
156
|
+
operator repair boundary before claiming safety.
|
|
157
|
+
- If an implementation relies only on an outbox, broker exactly-once mode, Redis TTL, logs, or an
|
|
158
|
+
application check, report the missing durable consumer or reconciliation proof.
|
|
159
|
+
- If verification fails, preserve the crash point and invariant, then use `failure-triage` before
|
|
160
|
+
broadening the change.
|
|
161
|
+
|
|
162
|
+
<!-- mustflow-section: output-format -->
|
|
163
|
+
## Output Format
|
|
164
|
+
|
|
165
|
+
- Logical operation, source of truth, and independent commit boundaries
|
|
166
|
+
- Event identity, outbox, relay, inbox, ordering, settlement, and convergence decisions
|
|
167
|
+
- Crash, duplicate, stale-owner, poison, replay, and reconciliation evidence
|
|
168
|
+
- Files changed and compatibility impact
|
|
169
|
+
- Command intents run, skipped checks, and reasons
|
|
170
|
+
- Remaining split-brain or convergence risk
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
mustflow_doc: skill.durable-workflow-orchestration
|
|
3
|
+
locale: en
|
|
4
|
+
canonical: true
|
|
5
|
+
revision: 1
|
|
6
|
+
lifecycle: mustflow-owned
|
|
7
|
+
authority: procedure
|
|
8
|
+
name: durable-workflow-orchestration
|
|
9
|
+
description: Apply this skill when one business outcome spans multiple commands, persisted entities, services, callbacks, timers, approvals, retries, or compensations and must resume after process loss or deployment through a versioned durable workflow instance.
|
|
10
|
+
metadata:
|
|
11
|
+
mustflow_schema: "1"
|
|
12
|
+
mustflow_kind: procedure
|
|
13
|
+
pack_id: mustflow.core
|
|
14
|
+
skill_id: mustflow.core.durable-workflow-orchestration
|
|
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
|
+
# Durable Workflow Orchestration
|
|
29
|
+
|
|
30
|
+
<!-- mustflow-section: purpose -->
|
|
31
|
+
## Purpose
|
|
32
|
+
|
|
33
|
+
Own long-running progress across several transaction and resource boundaries. Make workflow state,
|
|
34
|
+
waits, retries, compensation, forward recovery, resume compatibility, and operator intervention
|
|
35
|
+
durable without pretending external effects can be rolled back like one database transaction.
|
|
36
|
+
|
|
37
|
+
<!-- mustflow-section: use-when -->
|
|
38
|
+
## Use When
|
|
39
|
+
|
|
40
|
+
- One business goal crosses two or more commands, persisted entities, services, or providers.
|
|
41
|
+
- The flow waits for callbacks, timers, approvals, retries, leases, or human intervention.
|
|
42
|
+
- A process restart or deployment must resume the exact safe step without repeating completed
|
|
43
|
+
external effects.
|
|
44
|
+
- The design uses a saga, process manager, workflow instance, durable checkpoint, compensation, or
|
|
45
|
+
manual-recovery state.
|
|
46
|
+
|
|
47
|
+
<!-- mustflow-section: do-not-use-when -->
|
|
48
|
+
## Do Not Use When
|
|
49
|
+
|
|
50
|
+
- One accepted intent and local commit boundary is the whole operation; use `command-pattern`.
|
|
51
|
+
- One entity transition table owns the lifecycle; use `state-machine-pattern`.
|
|
52
|
+
- The main failure is a database-and-publish split; use `dual-write-consistency`.
|
|
53
|
+
- The main failure is queue settlement, duplicate logical delivery, or child-task lifetime; use
|
|
54
|
+
`queue-processing-integrity-review`, `idempotency-integrity-review`, or
|
|
55
|
+
`structured-concurrency-supervision-review` respectively.
|
|
56
|
+
- LLM autonomy, tool choice, or approval of model-directed work is the main concern; use
|
|
57
|
+
`agent-execution-control-review` and apply this skill only to the durable workflow underneath it.
|
|
58
|
+
- An order with one local `PENDING -> PAID -> SHIPPED` transition table is not automatically a
|
|
59
|
+
durable workflow. A callback-driven payment and fulfillment process across checkpoints is.
|
|
60
|
+
|
|
61
|
+
<!-- mustflow-section: required-inputs -->
|
|
62
|
+
## Required Inputs
|
|
63
|
+
|
|
64
|
+
- Workflow identity and definition-version ledger.
|
|
65
|
+
- Step ledger: input snapshot, command ID, dependency, deadline, attempt, owner, allowed next events,
|
|
66
|
+
and durable completion evidence.
|
|
67
|
+
- Effect classification ledger: `reversible`, `compensatable`, `forward-recovery-only`, or
|
|
68
|
+
`manual-intervention`.
|
|
69
|
+
- Checkpoint and resume-compatibility ledger for code, state schema, configuration, and policy.
|
|
70
|
+
- Compensation ledger linking each compensating command to its original effect and idempotency key.
|
|
71
|
+
- Timer, lease, cancellation, late-event, terminal-state, and reconciliation ledgers.
|
|
72
|
+
|
|
73
|
+
<!-- mustflow-section: preconditions -->
|
|
74
|
+
## Preconditions
|
|
75
|
+
|
|
76
|
+
- Read the nearest instructions, command contract, participating commands and state machines,
|
|
77
|
+
persistence model, queue or timer path, external effects, operator tools, and current tests.
|
|
78
|
+
- Name the business outcome and every independently owned participant before designing the workflow.
|
|
79
|
+
- Treat a compensation as a new effect with its own failure modes, never as time reversal.
|
|
80
|
+
|
|
81
|
+
<!-- mustflow-section: allowed-edits -->
|
|
82
|
+
## Allowed Edits
|
|
83
|
+
|
|
84
|
+
- Add or tighten workflow instances, step records, checkpoints, timers, leases, compensation
|
|
85
|
+
commands, resume compatibility, cancellation, manual-intervention, reconciliation, tests, metrics,
|
|
86
|
+
docs, and directly synchronized templates.
|
|
87
|
+
- Keep individual command payloads and entity transition rules in their owning command and state
|
|
88
|
+
machine layers.
|
|
89
|
+
- Do not serialize arbitrary runtime objects, closures, clients, credentials, hidden reasoning, or
|
|
90
|
+
raw conversations as workflow state.
|
|
91
|
+
|
|
92
|
+
<!-- mustflow-section: procedure -->
|
|
93
|
+
## Procedure
|
|
94
|
+
|
|
95
|
+
1. State the business outcome and list each participant, transaction boundary, external effect, wait,
|
|
96
|
+
callback, timer, and operator decision.
|
|
97
|
+
2. Check whether one command or one entity state machine is sufficient. Do not introduce a durable
|
|
98
|
+
workflow for a local sequence that cannot survive or need process loss.
|
|
99
|
+
3. Create a stable workflow instance ID and pin the workflow definition, state schema, code,
|
|
100
|
+
configuration, and policy versions required for safe resume.
|
|
101
|
+
4. Record each step's normalized input snapshot, command identity, dependency, deadline, attempt,
|
|
102
|
+
owner, next permitted events, and durable completion evidence.
|
|
103
|
+
5. Persist step completion and the next durable work request atomically where possible. Route any
|
|
104
|
+
independent commit split through `dual-write-consistency`.
|
|
105
|
+
6. Classify every effect as reversible, compensatable, forward-recovery-only, or
|
|
106
|
+
manual-intervention. Do not label email, payment, published data, or external user-visible effects
|
|
107
|
+
rollback-safe without provider-specific proof.
|
|
108
|
+
7. Model compensation as a separate idempotent command tied to the original command, resource,
|
|
109
|
+
amount or scope, workflow instance, and reason. Give compensation its own retry and terminal state.
|
|
110
|
+
Use a distinct operation type and idempotency namespace or key for the compensation; never reuse
|
|
111
|
+
the original effect key without an explicit operation discriminator.
|
|
112
|
+
8. Store semantic workflow state and ledger positions in checkpoints. Rebuild runtime clients and
|
|
113
|
+
transient caches on resume instead of serializing them.
|
|
114
|
+
9. On resume, verify workflow definition, schema, code, configuration, and policy compatibility.
|
|
115
|
+
Migrate, continue under the pinned version, or stop for intervention; never guess through drift.
|
|
116
|
+
10. Fence stale owners and reject late callbacks, timers, or completions from an older workflow
|
|
117
|
+
generation or already-closed step.
|
|
118
|
+
11. Define cancellation separately from compensation. State which pending work stops, which accepted
|
|
119
|
+
external effects continue, which compensations start, and when cancellation becomes terminal.
|
|
120
|
+
12. Preserve partial completion and compensation failure as observable outcomes such as
|
|
121
|
+
`FORWARD_RECOVERY_REQUIRED` or `MANUAL_INTERVENTION`, not generic failure or false rollback.
|
|
122
|
+
13. Test restart before and after every step, duplicate and late completion, version drift, timer
|
|
123
|
+
expiry, stale owner, cancellation, compensation failure, reconciliation, and manual resume.
|
|
124
|
+
- This skill owns workflow-step, terminal-state, and compensation-state recovery. Route
|
|
125
|
+
delivery, consumer-application, and projection convergence across independent commits to
|
|
126
|
+
`dual-write-consistency`.
|
|
127
|
+
|
|
128
|
+
<!-- mustflow-section: postconditions -->
|
|
129
|
+
## Postconditions
|
|
130
|
+
|
|
131
|
+
- Every step has durable identity, owner, state, version, and completion evidence.
|
|
132
|
+
- Resume does not silently replay an already completed external effect.
|
|
133
|
+
- Every reachable branch terminates as succeeded, compensated, forward-recovery-required,
|
|
134
|
+
cancelled with declared residual effects, or manual-intervention.
|
|
135
|
+
- Workflow orchestration does not replace command, state-machine, delivery, ledger, or policy owners.
|
|
136
|
+
|
|
137
|
+
<!-- mustflow-section: verification -->
|
|
138
|
+
## Verification
|
|
139
|
+
|
|
140
|
+
- Use configured `changes_status` and `changes_diff_summary` for scope evidence.
|
|
141
|
+
- Use `lint`, `build`, and `test_related` for implementation and restart fixtures; use `test` or
|
|
142
|
+
`test_audit` when orchestration is shared or test coverage claims are broad.
|
|
143
|
+
- Use `docs_validate_fast`, `test_release`, and `mustflow_check` for public, package, template, or
|
|
144
|
+
Mustflow changes.
|
|
145
|
+
- Report unavailable multi-process, deployment-resume, clock, provider, or operator evidence rather
|
|
146
|
+
than replacing it with raw commands.
|
|
147
|
+
|
|
148
|
+
<!-- mustflow-section: failure-handling -->
|
|
149
|
+
## Failure Handling
|
|
150
|
+
|
|
151
|
+
- If participant ownership or compensation semantics are unknown, stop workflow expansion and list
|
|
152
|
+
the missing business decisions.
|
|
153
|
+
- If resume compatibility is unprovable, preserve the run under manual intervention rather than
|
|
154
|
+
loading it into new code optimistically.
|
|
155
|
+
- If compensation can fail without a terminal recovery path, report the workflow as incomplete.
|
|
156
|
+
- If a configured check fails, preserve the workflow state and failure boundary, then use
|
|
157
|
+
`failure-triage` before broadening the edit.
|
|
158
|
+
|
|
159
|
+
<!-- mustflow-section: output-format -->
|
|
160
|
+
## Output Format
|
|
161
|
+
|
|
162
|
+
- Workflow goal, instance identity, definition version, participants, and boundaries
|
|
163
|
+
- Step, checkpoint, timer, lease, cancellation, and resume decisions
|
|
164
|
+
- Effect classifications, compensation commands, and terminal outcomes
|
|
165
|
+
- Restart, duplicate, late-event, drift, compensation, and manual-recovery evidence
|
|
166
|
+
- Files changed and compatibility impact
|
|
167
|
+
- Command intents run, skipped checks, and remaining durable-workflow risk
|
package/templates/default/locales/en/.mustflow/skills/execution-ledger-integrity-review/SKILL.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
mustflow_doc: skill.execution-ledger-integrity-review
|
|
3
|
+
locale: en
|
|
4
|
+
canonical: true
|
|
5
|
+
revision: 1
|
|
6
|
+
lifecycle: mustflow-owned
|
|
7
|
+
authority: procedure
|
|
8
|
+
name: execution-ledger-integrity-review
|
|
9
|
+
description: Apply this skill when runs, attempts, leases, approvals, checkpoints, tool or provider effects, receipts, terminal outcomes, resume, reconciliation, or replay depend on an append-only execution ledger rather than ordinary logs or session handoff summaries.
|
|
10
|
+
metadata:
|
|
11
|
+
mustflow_schema: "1"
|
|
12
|
+
mustflow_kind: procedure
|
|
13
|
+
pack_id: mustflow.core
|
|
14
|
+
skill_id: mustflow.core.execution-ledger-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
|
+
# Execution Ledger Integrity Review
|
|
29
|
+
|
|
30
|
+
<!-- mustflow-section: purpose -->
|
|
31
|
+
## Purpose
|
|
32
|
+
|
|
33
|
+
Keep execution history truthful enough to explain, resume, reconcile, and safely replay decisions.
|
|
34
|
+
Record observable inputs, actions, approvals, attempts, effects, checkpoints, and outcomes without
|
|
35
|
+
turning hidden reasoning, secrets, raw conversations, or full logs into durable authority.
|
|
36
|
+
|
|
37
|
+
<!-- mustflow-section: use-when -->
|
|
38
|
+
## Use When
|
|
39
|
+
|
|
40
|
+
- A system must later prove which run, attempt, lease owner, checkpoint, approval, effect, or terminal
|
|
41
|
+
outcome happened.
|
|
42
|
+
- Resume or reconciliation depends on an operation ledger, execution ledger, semantic checkpoint,
|
|
43
|
+
effect receipt, result digest, provenance, or replay record.
|
|
44
|
+
- A reliability claim depends on durable execution facts rather than ordinary trace or log lines.
|
|
45
|
+
|
|
46
|
+
<!-- mustflow-section: do-not-use-when -->
|
|
47
|
+
## Do Not Use When
|
|
48
|
+
|
|
49
|
+
- The task is ordinary logging or trace-field quality; use `backend-log-evidence-review` or
|
|
50
|
+
`observability-debuggability-review`.
|
|
51
|
+
- The record is a coding-session handoff; use `restricted-handoff-resume`.
|
|
52
|
+
- The record is a credit, payment, accounting, or business balance ledger; use the corresponding
|
|
53
|
+
ledger-integrity skill.
|
|
54
|
+
- The main concern is duplicate acceptance, workflow step order, compensation, or policy evaluation;
|
|
55
|
+
use `idempotency-integrity-review`, `durable-workflow-orchestration`, or
|
|
56
|
+
`policy-decision-integrity-review` respectively.
|
|
57
|
+
- A request ID in logs is not an execution ledger, and an idempotency key alone does not prove which
|
|
58
|
+
attempt performed an external effect.
|
|
59
|
+
|
|
60
|
+
<!-- mustflow-section: required-inputs -->
|
|
61
|
+
## Required Inputs
|
|
62
|
+
|
|
63
|
+
- Execution identity ledger: run, parent run, logical action, attempt, causation, and correlation.
|
|
64
|
+
- Input and version ledger: safe input digest plus code, configuration, policy, model, provider,
|
|
65
|
+
tool, and schema versions required to interpret the result.
|
|
66
|
+
- Action and effect ledger: selected action, safe argument digest, approval, effect identity, and
|
|
67
|
+
pre-effect intent record.
|
|
68
|
+
- Attempt and outcome ledger: owner or lease, start, result digest, receipt, unknown or partial
|
|
69
|
+
outcome, terminal classification, and supersession.
|
|
70
|
+
- Checkpoint, integrity, retention, privacy, replay, and reconciliation ledgers.
|
|
71
|
+
|
|
72
|
+
<!-- mustflow-section: preconditions -->
|
|
73
|
+
## Preconditions
|
|
74
|
+
|
|
75
|
+
- Read the nearest instructions, command contract, execution path, persistence schema, checkpoint
|
|
76
|
+
and resume code, effect boundaries, privacy policy, replay path, and current tests.
|
|
77
|
+
- Separate audit, resume, reconciliation, and replay requirements. Do not add an event-sourced domain
|
|
78
|
+
model when only execution evidence is needed.
|
|
79
|
+
- Treat stored summaries and traces as derived evidence below current source, policy, and durable
|
|
80
|
+
receipts.
|
|
81
|
+
|
|
82
|
+
<!-- mustflow-section: allowed-edits -->
|
|
83
|
+
## Allowed Edits
|
|
84
|
+
|
|
85
|
+
- Add or tighten execution identities, append-only entries, sequence or hash links, lease generations,
|
|
86
|
+
semantic checkpoints, effect receipts, terminal outcomes, replay inputs, reconciliation, retention,
|
|
87
|
+
redaction, focused tests, docs, and directly synchronized templates.
|
|
88
|
+
- Add public projections or exports only with their owning public-contract procedure.
|
|
89
|
+
- Do not store hidden reasoning, raw prompts, raw conversations, full terminal output, credentials,
|
|
90
|
+
secret-bearing tool payloads, or unbounded provider responses as ledger evidence.
|
|
91
|
+
|
|
92
|
+
<!-- mustflow-section: procedure -->
|
|
93
|
+
## Procedure
|
|
94
|
+
|
|
95
|
+
1. State whether the ledger supports audit, resume, reconciliation, replay, or a bounded combination.
|
|
96
|
+
2. Define stable run, parent, logical action, attempt, causation, correlation, approval, and effect
|
|
97
|
+
identities. Do not collapse a retry attempt into a new logical action.
|
|
98
|
+
3. Record safe input digests and every code, configuration, policy, model, provider, tool, and schema
|
|
99
|
+
version needed to interpret the decision and result.
|
|
100
|
+
4. Keep model, provider, and tool content minimal: safe normalized fields, evidence pointers, and
|
|
101
|
+
digests. Redact or omit raw sensitive payloads before persistence.
|
|
102
|
+
5. Bind approval to the exact actor, resource, action, arguments or digest, policy decision, version,
|
|
103
|
+
expiry, and effect that it permits.
|
|
104
|
+
6. Append an accepted intent before an external effect and append the observed outcome afterward.
|
|
105
|
+
Preserve a gap or unknown outcome if the process dies between them.
|
|
106
|
+
7. Separate logical action state from attempts. Record owner, lease or generation, attempt number,
|
|
107
|
+
deadline, retry reason, supersession, and the terminal attempt that owns the outcome.
|
|
108
|
+
8. Treat timeout or missing response as unknown, not failed, until provider lookup, durable receipt,
|
|
109
|
+
or reconciliation establishes the result.
|
|
110
|
+
9. Store semantic state and the last committed ledger position in a checkpoint. Reconstruct runtime
|
|
111
|
+
objects and verify pending effects on resume.
|
|
112
|
+
10. Enforce append-only ordering with unique identities, monotonic sequence or equivalent causal
|
|
113
|
+
links, durable constraints, and tamper or truncation detection appropriate to the threat model.
|
|
114
|
+
11. Make terminal outcomes monotonic. A late attempt cannot overwrite a succeeded, cancelled,
|
|
115
|
+
superseded, or manual-review result without an explicit corrective entry.
|
|
116
|
+
12. Replay pure decisions against pinned inputs and inject recorded observations for external calls.
|
|
117
|
+
Never make replay re-send email, charge money, mutate providers, or publish events implicitly.
|
|
118
|
+
13. Test missing entries, partial append, duplicate outcome, stale lease, late attempt, version drift,
|
|
119
|
+
unknown provider result, checkpoint gap, tampering, retention expiry, and replay side-effect blocks.
|
|
120
|
+
|
|
121
|
+
<!-- mustflow-section: postconditions -->
|
|
122
|
+
## Postconditions
|
|
123
|
+
|
|
124
|
+
- Every observable effect links to a logical action, attempt, owner, approval when required, and
|
|
125
|
+
result or explicit unknown outcome.
|
|
126
|
+
- Resume cannot skip a ledger gap, stale lease, version mismatch, or unresolved effect silently.
|
|
127
|
+
- Replay does not execute external mutations and reports version drift instead of false equivalence.
|
|
128
|
+
- Retained evidence is bounded and privacy-safe without relying on hidden reasoning or raw logs.
|
|
129
|
+
|
|
130
|
+
<!-- mustflow-section: verification -->
|
|
131
|
+
## Verification
|
|
132
|
+
|
|
133
|
+
- Use configured `changes_status` and `changes_diff_summary` for scope evidence.
|
|
134
|
+
- Use `lint`, `build`, and `test_related` for implementation and ledger failure fixtures; use `test`
|
|
135
|
+
or `test_audit` for shared ledger or coverage claims.
|
|
136
|
+
- Use `docs_validate_fast`, `test_release`, and `mustflow_check` for public exports, package, template,
|
|
137
|
+
or Mustflow changes.
|
|
138
|
+
- Report unavailable database fault injection, provider reconciliation, tamper testing, or retention
|
|
139
|
+
expiry evidence rather than inventing commands.
|
|
140
|
+
|
|
141
|
+
<!-- mustflow-section: failure-handling -->
|
|
142
|
+
## Failure Handling
|
|
143
|
+
|
|
144
|
+
- If run, action, attempt, or effect identity cannot be separated, stop replay or resume claims and
|
|
145
|
+
report the ambiguous identity.
|
|
146
|
+
- If a ledger gap or unknown effect cannot be reconciled, preserve manual-review state; do not mark
|
|
147
|
+
the run failed and retry automatically.
|
|
148
|
+
- If safe evidence requires storing secrets or raw transcripts, redesign the evidence pointer or
|
|
149
|
+
digest before persistence.
|
|
150
|
+
- If verification fails, preserve the ledger invariant and use `failure-triage` before changing
|
|
151
|
+
unrelated runtime code.
|
|
152
|
+
|
|
153
|
+
<!-- mustflow-section: output-format -->
|
|
154
|
+
## Output Format
|
|
155
|
+
|
|
156
|
+
- Audit, resume, reconciliation, and replay purposes reviewed
|
|
157
|
+
- Run, action, attempt, version, approval, effect, checkpoint, and terminal-outcome decisions
|
|
158
|
+
- Append-only, privacy, retention, unknown-outcome, and replay protections
|
|
159
|
+
- Failure-injection and drift evidence
|
|
160
|
+
- Files changed and public-contract impact
|
|
161
|
+
- Command intents run, skipped checks, and remaining ledger-integrity risk
|