mustflow 2.112.9 → 2.112.13

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 (45) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/commands/contract-lint.js +3 -13
  3. package/dist/cli/commands/impact.js +2 -12
  4. package/dist/cli/commands/init.js +39 -14
  5. package/dist/cli/commands/onboard.js +3 -13
  6. package/dist/cli/commands/version-sources.js +2 -12
  7. package/dist/cli/i18n/en.js +6 -0
  8. package/dist/cli/i18n/es.js +6 -0
  9. package/dist/cli/i18n/fr.js +6 -0
  10. package/dist/cli/i18n/hi.js +6 -0
  11. package/dist/cli/i18n/ko.js +6 -0
  12. package/dist/cli/i18n/zh.js +6 -0
  13. package/dist/cli/lib/agent-context.js +2 -1
  14. package/dist/cli/lib/dashboard-locale.js +6 -0
  15. package/dist/cli/lib/dashboard-preferences.js +24 -1
  16. package/dist/cli/lib/preferences-options.js +8 -0
  17. package/dist/cli/lib/validation/constants.js +3 -1
  18. package/dist/cli/lib/validation/index.js +10 -1
  19. package/dist/core/preferences.js +79 -0
  20. package/dist/core/repo-version-source.js +9 -18
  21. package/package.json +1 -1
  22. package/templates/default/common/.mustflow/config/preferences.toml +10 -0
  23. package/templates/default/i18n.toml +19 -19
  24. package/templates/default/locales/en/.mustflow/docs/agent-workflow.md +10 -4
  25. package/templates/default/locales/en/.mustflow/skills/INDEX.md +4 -4
  26. package/templates/default/locales/en/.mustflow/skills/async-timing-boundary-review/SKILL.md +19 -5
  27. package/templates/default/locales/en/.mustflow/skills/backend-log-evidence-review/SKILL.md +10 -3
  28. package/templates/default/locales/en/.mustflow/skills/cache-integrity-review/SKILL.md +63 -21
  29. package/templates/default/locales/en/.mustflow/skills/concurrency-invariant-review/SKILL.md +13 -3
  30. package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md +10 -9
  31. package/templates/default/locales/en/.mustflow/skills/dependency-upgrade-review/SKILL.md +8 -3
  32. package/templates/default/locales/en/.mustflow/skills/memory-lifetime-review/SKILL.md +19 -3
  33. package/templates/default/locales/en/.mustflow/skills/observability-debuggability-review/SKILL.md +31 -21
  34. package/templates/default/locales/en/.mustflow/skills/race-condition-review/SKILL.md +38 -25
  35. package/templates/default/locales/en/.mustflow/skills/repro-first-debug/SKILL.md +43 -10
  36. package/templates/default/locales/en/.mustflow/skills/routes.toml +4 -4
  37. package/templates/default/locales/en/.mustflow/skills/security-flow-review/SKILL.md +19 -4
  38. package/templates/default/locales/en/.mustflow/skills/security-privacy-review/SKILL.md +8 -3
  39. package/templates/default/locales/en/AGENTS.md +9 -1
  40. package/templates/default/locales/es/AGENTS.md +2 -0
  41. package/templates/default/locales/fr/AGENTS.md +2 -0
  42. package/templates/default/locales/hi/AGENTS.md +2 -0
  43. package/templates/default/locales/ko/AGENTS.md +3 -1
  44. package/templates/default/locales/zh/AGENTS.md +2 -0
  45. package/templates/default/manifest.toml +1 -1
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.observability-debuggability-review
3
3
  locale: en
4
4
  canonical: true
5
- revision: 2
5
+ revision: 3
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: observability-debuggability-review
@@ -94,79 +94,88 @@ The review question is not "does the code emit telemetry?" It is "when this path
94
94
  - List logs, metrics, traces, spans, events, audit entries, alerts, dashboards, runbooks, and exporter self-metrics touched by the path.
95
95
  - Mark each signal as symptom, cause evidence, correlation evidence, saturation evidence, recovery evidence, or noise.
96
96
  - A success-only log is not enough; failure classification and missing-work evidence matter more.
97
- 3. Check metrics for numerator and denominator.
97
+ 3. Prefer trace-first diagnosis for distributed or cross-boundary failures.
98
+ - Compare normal and failing trace trees before reading only the final error log.
99
+ - Look for the first divergence in span order, missing span, retry branch, cache hit or miss, DB call count, dependency latency, worker shard, feature flag, release id, queue age, or pool wait.
100
+ - Logs should explain branch decisions inside that trace; metrics should show whether the incident is isolated or systemic.
101
+ 4. Align trace, log, and profiler evidence on one time axis when timing or ordering may matter.
102
+ - Trace evidence identifies the affected request, job, message, or operation.
103
+ - Profiler evidence identifies what the process was doing during the same window: CPU, wall wait, lock contention, allocation, GC, or pool wait.
104
+ - Do not treat a slow span as self-explanatory until the same window's process, pool, dependency, and queue evidence have been checked where available.
105
+ 5. Check metrics for numerator and denominator.
98
106
  - Error counters need total attempt counters so an operator can compute rates.
99
107
  - Cache hits need total lookups, fill errors, stale-served counts, origin latency, and eviction or lock-wait evidence when cache correctness matters.
100
108
  - Rate limits need allowed, blocked, shadow-blocked, delayed, retry-after, policy, and key-type evidence rather than only `rate_limited_total`.
101
- 4. Reject average-only latency.
109
+ 6. Reject average-only latency.
102
110
  - Prefer histograms or equivalent distribution evidence for p95, p99, and tail behavior.
103
111
  - Separate success latency from error latency; fast failures should not make the service look healthy.
104
112
  - Label outcome and status class with bounded cardinality where the local metric system supports it.
105
- 5. Protect metric cardinality.
113
+ 7. Protect metric cardinality.
106
114
  - Do not put raw URL paths, query strings, user ids, order ids, emails, message ids, idempotency keys, exception messages, SQL text, or arbitrary provider codes into metric labels.
107
115
  - Use route templates, dependency names, operation names, status classes, bounded reason enums, policy names, and feature flag names.
108
116
  - Keep high-cardinality fields in traces, structured events, audit records, or sampled logs when they are safe and needed for narrowing.
109
- 6. Check trace and log correlation.
117
+ 8. Check trace and log correlation.
110
118
  - Logs should include trace id and span id, or the local equivalent, when distributed tracing exists.
111
119
  - Spans should include dependency name, operation name, route template, outcome, safe error type, retry attempt, timeout or cancellation class, and release or environment attributes when useful.
112
120
  - If a log line cannot be joined to a request, job, message, or batch run, it is weak incident evidence.
113
- 7. Check async and queue context propagation.
121
+ 9. Check async and queue context propagation.
114
122
  - HTTP to worker, queue, stream, pub/sub, webhook, cron, and batch boundaries should propagate or intentionally fork trace context.
115
123
  - Producers should inject safe context into messages when the system needs end-to-end diagnosis; consumers should extract it before doing work.
116
124
  - A new trace at the worker boundary can be correct only when the handoff is intentionally modeled and linked by message, job, or causation id.
117
- 8. Separate attempt from operation.
125
+ 10. Separate attempt from operation.
118
126
  - Retries should expose each dependency attempt and the final logical operation result.
119
127
  - A final success after two failed attempts is a business success and a dependency warning.
120
128
  - Record attempt number, max attempts, retry decision, delay, retry-after use, dependency name, and final exhaustion reason with bounded labels.
121
- 9. Classify timeout, cancellation, and deadline.
129
+ 11. Classify timeout, cancellation, and deadline.
122
130
  - User cancellation, upstream deadline, server timeout, dependency timeout, pool acquire timeout, queue visibility expiry, and shutdown cancellation are different events.
123
131
  - Do not merge all of them into one generic error metric or log reason.
124
132
  - Preserve cancellation semantics without turning intentional caller cancellation into a dependency incident.
125
- 10. Review external dependency spans and metrics.
133
+ 12. Review external dependency spans and metrics.
126
134
  - `GET https://api.vendor.example` is not enough; add a stable dependency name and operation name.
127
135
  - Track attempts, latency distribution, status class, retryable decision, timeout class, circuit-open decisions, and provider request id when safe.
128
136
  - Keep provider host, endpoint, and response details out of metric labels when they are unbounded or sensitive.
129
- 11. Review database and transaction evidence.
137
+ 13. Review database and transaction evidence.
130
138
  - Avoid raw SQL in logs and telemetry where it can contain personal data or secrets.
131
139
  - Prefer query name, table or collection, operation, rows returned, rows affected, duration, timeout class, and safe error category.
132
140
  - Transaction flows should expose begin, commit, rollback, retry, after-commit side effects, external-call-before-commit risk, and compensation or reconciliation evidence when relevant.
133
- 12. Review idempotency and partial-success evidence.
141
+ 14. Review idempotency and partial-success evidence.
134
142
  - Payment, order, entitlement, file, webhook, queue, and batch paths need idempotency key, dedupe key, message id, request id, attempt, side-effect state, and unknown-outcome markers where safe.
135
143
  - Ask where evidence remains when DB write succeeds but event publish fails, provider call succeeds but local state fails, cache write succeeds but origin rollback happens, or compensation fails.
136
144
  - Metrics and logs should distinguish attempt, success, failure, compensation, retry exhausted, and unknown outcome.
137
- 13. Review queue, stream, and batch signals.
145
+ 15. Review queue, stream, and batch signals.
138
146
  - Consumers need queue delay or message age, processing duration, inflight count, ack or commit failures, redelivery count, retry count, DLQ count, poison reason, and oldest message age where supported.
139
147
  - Batch jobs need last success timestamp, last completion timestamp, duration, processed count, failed count, skipped count, and stale-job alert evidence.
140
148
  - Silent pipelines need heartbeat or synthetic item evidence when "no input" can look like success.
141
- 14. Review pools and saturation.
149
+ 16. Review pools and saturation.
142
150
  - CPU can be low while worker, thread, DB connection, HTTP connection, queue, semaphore, or rate-limit pools are saturated.
143
151
  - Track active, max, queued, queue wait, acquire duration, timeout count, rejection count, and per-dependency pool names with bounded labels.
144
152
  - Missing saturation evidence should downgrade performance and reliability claims.
145
- 15. Review feature, config, release, and migration attribution.
153
+ 17. Review feature, config, release, and migration attribution.
146
154
  - Logs, traces, and metrics should carry service version, git sha or release id, deployment environment, region, schema or migration version, config version, and relevant feature flag or experiment variant when local policy allows.
147
155
  - If a 5 percent feature flag cohort can fail separately, the telemetry must let operators split healthy and broken cohorts.
148
- 16. Check alert and runbook usefulness.
156
+ 18. Check alert and runbook usefulness.
149
157
  - Every new critical metric should answer what panel, alert, or runbook sentence it supports.
150
158
  - Pager alerts should indicate user impact or clear operator action, not only "a counter changed."
151
159
  - Logs that page humans should have matching counters or rates so operators can see when the event started and how fast it is happening.
152
- 17. Check telemetry self-observability.
160
+ 19. Check telemetry self-observability.
153
161
  - Exporters, collectors, custom metric collectors, log sinks, trace queues, and sampling pipelines need dropped, failed, queued, scrape error, and export latency evidence when they can blind operators.
154
162
  - If telemetry failure can hide product failure, treat missing self-metrics as an operational risk.
155
- 18. Check signal pipeline loss and read-path visibility.
163
+ 20. Check signal pipeline loss and read-path visibility.
156
164
  - Compare produced, accepted, exported, stored, and query-visible signal counts when the path depends on logs, metrics, traces, or events for diagnosis.
157
165
  - Use canary events or synthetic heartbeats when "no telemetry" could mean no traffic, collector failure, broken parser, dropped queue, retention gap, or dashboard read failure.
158
166
  - Track event timestamp versus observed timestamp, queue oldest age, DLQ oldest age, parser or mapping failures by service and version, and duplicate or sequence-gap evidence.
159
167
  - Separate telemetry write-path health from read-path health. A sink can store data that dashboards cannot query, and dashboards can be healthy while new signals are not arriving.
160
168
  - If collector, sink, dashboard, or production telemetry checks are outside repository commands, report the manual-only boundary.
161
- 19. Check sampling policy.
169
+ 21. Check sampling policy.
162
170
  - Head sampling can drop rare errors and slow traces.
163
171
  - Error, slow, retry-exhausted, high-latency, partial-success, DLQ, and compensation-failure traces often need keep rules, tail sampling, or explicit event evidence.
172
+ - If a rare failure can be sampled out, require fallback event logs for key span boundaries, duration, outcome, reason, tenant or job slice, feature flag, and deployment version.
164
173
  - If sampling is outside the repository, report the manual-only evidence boundary instead of assuming critical traces are retained.
165
- 20. Check privacy before telemetry leaves the process.
174
+ 22. Check privacy before telemetry leaves the process.
166
175
  - Redact or classify tokens, passwords, authorization headers, cookies, raw bodies, emails, phone numbers, payment data, personal identifiers, prompt text, confidential document text, provider payloads, and full SQL before logger, metric, trace, baggage, or exporter entry.
167
176
  - Baggage should be small, safe, low-lifetime, and intentional. Do not use it as a general request metadata bag.
168
177
  - Report sink-side masking as insufficient when sensitive data can already leave the process unredacted.
169
- 21. Require telemetry tests or contract evidence where feasible.
178
+ 23. Require telemetry tests or contract evidence where feasible.
170
179
  - Good tests assert stable event names, bounded label values, denominator counters, trace-context propagation, redaction, sampling flags, feature flag attributes, release attributes, and failure-category mapping.
171
180
  - Source-level guards can prevent raw URL or user id metric labels when runtime telemetry tests are not available.
172
181
  - If dashboards, alerts, production traces, or load evidence are manual-only, complete available checks and report the evidence gap.
@@ -176,6 +185,7 @@ The review question is not "does the code emit telemetry?" It is "when this path
176
185
 
177
186
  - The changed path has an incident question, signal ledger, metric model, trace and log correlation model, telemetry pipeline survival boundary, cardinality boundary, privacy boundary, and evidence level.
178
187
  - Missing denominators, average-only latency, success-only logs, uncorrelated logs, raw URL labels, raw user labels, raw SQL telemetry, lost async trace context, attempt and operation collapse, generic timeout or cancellation buckets, missing dependency names, missing queue age, missing batch last-success timestamp, missing pool saturation, missing release attribution, decorative metrics, unsafe baggage, telemetry self-blindness, and sampling that drops critical failures are fixed or reported.
188
+ - Normal-versus-failing trace comparisons and trace/log/profiler time-axis alignment are used or reported as unavailable when timing, ordering, retry, queue, pool, or dependency behavior is the likely cause.
179
189
  - Observability claims are backed by configured tests, schema or fixture evidence, local telemetry conventions, dashboard or alert files, static review evidence, or labeled as manual-only or missing.
180
190
 
181
191
  <!-- mustflow-section: verification -->
@@ -208,7 +218,7 @@ Prefer the narrowest configured test, build, docs, release, or mustflow intent t
208
218
  ## Output Format
209
219
 
210
220
  - Observability boundary reviewed
211
- - Incident question, signal ledger, metric model, trace and log correlation, cardinality, identity propagation, attempts versus operation, timeout or cancellation classification, external dependency, DB and transaction, idempotency and partial success, queue or batch, cache, pool saturation, rate limit, feature or release attribution, alert or runbook, telemetry self-observability, signal pipeline survival, sampling, privacy, and test evidence findings
221
+ - Incident question, signal ledger, normal-versus-failing trace comparison, trace/log/profiler time-axis alignment, metric model, trace and log correlation, cardinality, identity propagation, attempts versus operation, timeout or cancellation classification, external dependency, DB and transaction, idempotency and partial success, queue or batch, cache, pool saturation, rate limit, feature or release attribution, alert or runbook, telemetry self-observability, signal pipeline survival, sampling, privacy, and test evidence findings
212
222
  - Observability fixes made or recommended
213
223
  - Evidence level: configured-test evidence, telemetry fixture evidence, dashboard or alert file evidence, static review risk, manual-only, missing, or not applicable
214
224
  - Command intents run
@@ -2,11 +2,11 @@
2
2
  mustflow_doc: skill.race-condition-review
3
3
  locale: en
4
4
  canonical: true
5
- revision: 1
5
+ revision: 3
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: race-condition-review
9
- description: Apply this skill when code is created, changed, reviewed, or reported and shared state can be observed across interleaving execution flows, including check-then-act, read-modify-write, stale reads after await or I/O, lock scope and order, tryLock, timeout or retry behavior, cache miss fill, lazy initialization, atomics and memory ordering, database transaction races, uniqueness, distributed locks, idempotency, atomic file creation, event or outbox ordering, queue duplicates, shutdown, cancellation, timers, close/send races, shared collections, object reuse, fake immutability, sleep-based race tests, log ordering, and state-machine transitions.
9
+ description: Apply this skill when code is created, changed, reviewed, or reported and shared state can be observed across interleaving execution flows, including check-then-act, read-modify-write, stale reads after await or I/O, lock scope and order, tryLock, timeout or retry behavior, cache miss fill, lazy initialization, atomics and memory ordering, database transaction races, uniqueness, distributed locks, fencing tokens, idempotency state records, atomic file creation, event or outbox ordering, inbox or dedupe consumers, per-key serialization, queue duplicates, shutdown, cancellation, timers, close/send races, shared collections, object reuse, fake immutability, sleep-based race tests, log ordering, and state-machine transitions.
10
10
  metadata:
11
11
  mustflow_schema: "1"
12
12
  mustflow_kind: procedure
@@ -59,7 +59,9 @@ The review question is not "does this code use threads?" The stronger question i
59
59
  - Interleaving points: `await`, I/O, database calls, callbacks, hooks, plugin calls, event publish, queue insert, lock release, timer scheduling, retry, cancellation, shutdown, close, send, and other function calls after a state read.
60
60
  - Synchronization boundary: lock scope, atomic operation, compare-and-swap, transaction, row lock, unique constraint, conditional update, singleflight, idempotency record, outbox, or file atomic create/rename behavior.
61
61
  - Ordering and duplication rules: event order, queue delivery semantics, duplicate messages, same-user or same-resource concurrency, retry replay, cancellation timing, timer overlap, and shutdown drain behavior.
62
+ - Idempotency and ownership rule: business idempotency key, processing/succeeded/failed record state, duplicate-in-progress behavior, fencing token or generation owner, and whether same-key work is serialized while unrelated keys can run concurrently.
62
63
  - Evidence surface: existing tests, fixtures, schema constraints, command intents, logs, metrics, sequence numbers, request ids, transaction ids, versions, or manual-only concurrency evidence.
64
+ - Incident file when a concurrency failure was observed: test name, seed, worker or thread count, scheduler settings, timeout, input, build hash, OS/runtime version, environment slice, and exact failure time when available.
63
65
 
64
66
  <!-- mustflow-section: preconditions -->
65
67
  ## Preconditions
@@ -82,61 +84,68 @@ The review question is not "does this code use threads?" The stronger question i
82
84
  <!-- mustflow-section: procedure -->
83
85
  ## Procedure
84
86
 
85
- 1. Name the shared fact. State the exact value or invariant another execution flow could change: balance, status, cache entry, uniqueness, queue offset, file existence, socket state, collection membership, timer owner, shutdown flag, or object ownership.
86
- 2. Build a stale-read ledger.
87
+ 1. Preserve the incident file before changing code when a race was observed.
88
+ - Capture the failing test or workflow name, random seed, worker or thread count, scheduler or CPU-affinity setting when relevant, timeout, input, build hash, OS/runtime version, environment variables that affect scheduling, and exact failure time.
89
+ - Do not replace a missing incident file with "ran many times"; repeated passing runs are weaker than one reproducible failing condition.
90
+ 2. Name the shared fact. State the exact value or invariant another execution flow could change: balance, status, cache entry, uniqueness, queue offset, file existence, socket state, collection membership, timer owner, shutdown flag, or object ownership.
91
+ 3. Build a stale-read ledger.
87
92
  - For each shared state read, mark every later `await`, I/O, DB call, callback, event publish, queue insertion, lock release, timer, retry, cancellation, shutdown, close, send, or function call before the action.
88
93
  - Ask whether the read is still true after each interleaving point. If the answer relies on hope, the path is not race-safe.
89
- 3. Catch check-then-act.
94
+ 4. Catch check-then-act.
90
95
  - Treat patterns such as `if exists then create`, `if balance >= amount then withdraw`, `if status == pending then approve`, duplicate email checks, coupon redemption, order number generation, and filesystem `exists` then `open` as unsafe until proven atomic.
91
96
  - Prefer atomic conditional updates, atomic create, insert with unique constraint, compare-and-swap, row locks, or file creation modes that fail when the target already exists.
92
- 4. Catch read-modify-write.
97
+ 5. Catch read-modify-write.
93
98
  - `++`, `+=`, `push`, `append`, `map[key] = value`, collection mutation, get-then-set, and counter updates are shared-state writes, not harmless syntax.
94
99
  - Use atomic operations only when the invariant is one variable. If the invariant spans fields, rows, objects, or messages, use a transaction, lock, state machine, or conditional write that protects the whole fact.
95
- 5. Do not trust a single event loop after `await`.
100
+ 6. Do not trust a single event loop after `await`.
96
101
  - In JavaScript, Python async, UI runtimes, and coroutine systems, a state read before `await` can be stale after the continuation resumes.
97
102
  - Re-read, validate a version, hold the correct synchronization boundary, or move the decision into an atomic operation.
98
- 6. Review lock scope by invariant, not by field.
103
+ 7. Review lock scope by invariant, not by field.
99
104
  - A lock around one setter does not protect a multi-field or multi-row rule if reads and writes outside the lock can observe intermediate state.
100
105
  - Keep callbacks, hooks, events, plugin calls, external I/O, logging, JSON conversion, and long calculations outside locks unless the invariant truly requires them.
101
106
  - Define and follow a global lock order when more than one lock can be acquired.
102
- 7. Treat `tryLock`, timeout, and retry as risk multipliers.
107
+ 8. Treat `tryLock`, timeout, and retry as risk multipliers.
103
108
  - Check what partial state remains when lock acquisition fails, times out, or is retried.
104
109
  - Verify rollback, idempotency, duplicate side-effect prevention, and retry budget. A retry can make a race rarer or louder, not correct.
105
- 8. Review cache miss fill and lazy initialization.
110
+ 9. Review cache miss fill and lazy initialization.
106
111
  - Multiple misses for the same key should not all rebuild, fetch, insert, or publish the same value unless duplication is harmless and bounded.
107
112
  - Use singleflight, promise memoization with failure cleanup, once initialization, durable uniqueness, or explicit cache-authority rules.
108
113
  - Double-checked locking needs a memory-ordering story in runtimes where construction visibility is not automatically safe.
109
- 9. Review atomics and memory ordering.
114
+ 10. Review atomics and memory ordering.
110
115
  - Atomics protect a specific operation on a specific value. They do not automatically make surrounding objects, arrays, maps, or multi-field invariants safe.
111
116
  - Check acquire/release or stronger memory ordering where the language exposes it, and report missing expertise or evidence instead of guessing.
112
- 10. Review database races.
117
+ 11. Review database races.
113
118
  - A database transaction does not erase a race by itself. Check isolation level, row locks, predicate locks, uniqueness, conditional updates, and whether `SELECT` then `UPDATE` can be invalidated before commit.
114
119
  - Prefer `UPDATE ... WHERE status = ...`, insert-or-ignore/upsert with unique constraints, version columns, row locks, or serializable isolation when the invariant requires it.
115
120
  - Application-level duplicate checks are advisory only; unique facts belong in the database or another durable single-writer authority.
116
- 11. Review distributed locks as debt.
117
- - Lock expiry, process pauses, network delay, clock skew, and split ownership can let two workers believe they own the same work.
118
- - Keep data correct if the distributed lock breaks: unique constraints, idempotency keys, fencing tokens, conditional writes, or state transitions should still reject stale owners.
119
- 12. Review event, queue, and outbox ordering.
120
- - Publishing an event before or after a state change can split the world unless a durable outbox or equivalent boundary ties them together.
121
- - Queue consumers should assume duplicates, reordering, delayed delivery, redelivery after timeout, and concurrent work for the same user or resource.
122
- - Use inbox deduplication, per-aggregate ordering, conditional state transitions, or idempotent side effects where needed.
123
- 13. Review filesystem races.
121
+ 12. Review distributed locks as debt.
122
+ - Lock expiry, process pauses, network delay, clock skew, and split ownership can let two workers believe they own the same work.
123
+ - Keep data correct if the distributed lock breaks: unique constraints, idempotency keys, fencing tokens, conditional writes, or state transitions should still reject stale owners.
124
+ 13. Review event, queue, and outbox ordering.
125
+ - Publishing an event before or after a state change can split the world unless a durable outbox or equivalent boundary ties them together.
126
+ - Queue consumers should assume duplicates, reordering, delayed delivery, redelivery after timeout, and concurrent work for the same user or resource.
127
+ - Use inbox deduplication, per-aggregate ordering, per-key serialization, conditional state transitions, or idempotent side effects where needed.
128
+ - Same-key work should expose whether the current record is processing, succeeded, failed, cancelled, or dead. A duplicate arriving while the first attempt is still processing is not the same as replaying a completed result.
129
+ - Business idempotency keys should describe the intended operation, not just the transport request id, when retries or duplicate submissions must return the same logical result.
130
+ 14. Review filesystem races.
124
131
  - `exists` then `open`, temp file name selection, cleanup by path, and replace-in-place can race.
125
132
  - Prefer atomic create, safe temporary file APIs, same-directory temp files, fsync where durability matters, and atomic rename or replace semantics appropriate to the platform.
126
- 14. Review shutdown, cancellation, timers, close, and send.
133
+ 15. Review shutdown, cancellation, timers, close, and send.
127
134
  - Shutdown should define who stops accepting work, who drains, who cancels, and who owns in-flight side effects.
128
135
  - Cancellation must be idempotent and safe when completion happens at the same time.
129
136
  - Timers and schedulers need one current owner; old timers should not update new state.
130
137
  - WebSocket, channel, stream, socket, queue, and emitter paths need a clear rule for close/send races and double close.
131
- 15. Review shared collections and object reuse.
138
+ 16. Review shared collections and object reuse.
132
139
  - Iteration over a collection that another flow can mutate needs a lock, snapshot, immutable copy, version check, or concurrent collection semantics.
133
140
  - Object pooling, buffer reuse, mutable DTO reuse, and reused request contexts are unsafe if async work can still hold references.
134
141
  - Fake immutable objects with mutable internals, getters, shared maps, or cached arrays should be treated as mutable shared state.
135
- 16. Review tests and logs with suspicion.
142
+ 17. Review tests and logs with suspicion.
136
143
  - `sleep`-based race tests are usually probability tests. Prefer deterministic barriers, fake schedulers, controlled promises, version assertions, unique constraints, or repeated stress only as supplementary evidence.
144
+ - Shake the schedule, not only the load: widen context-switch windows with configured deterministic barriers, fake schedulers, controlled yields, delay injection, or repeated stress harnesses only when the repository command contract allows them.
137
145
  - Logging can hide or change a race. Log order is not event order across threads, processes, async tasks, buffers, or machines.
138
- - Use monotonic sequence numbers, request ids, transaction ids, version columns, or state transition logs when ordering is evidence.
139
- 17. Escalate broad status fields into state-machine review.
146
+ - Use happens-before logs at handoff points such as queue push/pop, mutex unlock/lock, atomic release/acquire, promise/future completion, channel send/receive, callback registration/execution, plus monotonic sequence numbers, request ids, transaction ids, version columns, or state transition logs when ordering is evidence.
147
+ - Treat race detectors, thread sanitizers, deterministic record/replay, profilers, kernel tracing, or stress tools as configured or manual diagnostics only; never infer raw commands from the tool names.
148
+ 18. Escalate broad status fields into state-machine review.
140
149
  - If values such as `pending`, `processing`, `done`, `failed`, `cancelled`, `closed`, or `deleted` drive behavior, draw allowed transitions and reject stale concurrent transitions.
141
150
  - Use `state-machine-pattern` when the race fix needs a transition table, event union, transition log, retry reconciliation, or effect ordering.
142
151
 
@@ -144,9 +153,11 @@ The review question is not "does this code use threads?" The stronger question i
144
153
  ## Postconditions
145
154
 
146
155
  - Shared state reads, interleaving points, and stale-read risks are identified or ruled out.
156
+ - Observed concurrency failures preserve the incident file needed to reproduce the same timing envelope when available.
147
157
  - Check-then-act and read-modify-write paths are atomic, guarded, constrained, or explicitly reported as residual risk.
148
158
  - Locks protect whole invariants, have a clear ordering rule, and avoid slow or reentrant work where possible.
149
159
  - Database, cache, queue, event, filesystem, cancellation, shutdown, timer, close/send, collection, and object-reuse races are checked where relevant.
160
+ - Idempotency processing states, duplicate-in-progress behavior, fencing tokens, outbox/inbox handoffs, and per-key serialization are checked where relevant.
150
161
  - Tests or configured verification cover the highest-risk concurrency invariant when feasible.
151
162
 
152
163
  <!-- mustflow-section: verification -->
@@ -178,9 +189,11 @@ Prefer the narrowest configured test, build, docs, release, or mustflow intent t
178
189
  ## Output Format
179
190
 
180
191
  - Shared state and invariant reviewed
192
+ - Incident file captured or reported missing
181
193
  - Interleaving points checked
182
194
  - Check-then-act and read-modify-write findings
183
195
  - Async stale-read, lock scope/order, tryLock/timeout/retry, cache/lazy init, atomic/memory ordering, database transaction, uniqueness, distributed lock, idempotency, filesystem, event/outbox, queue, shutdown, cancellation, timer, close/send, shared collection, object reuse, fake immutable, test, log, and state-machine checks where relevant
196
+ - Idempotency record states, fencing token, inbox or dedupe, per-key serialization, and duplicate-in-progress checks where relevant
184
197
  - Race fixes made or recommended
185
198
  - Tests or verification evidence
186
199
  - Command intents run
@@ -2,11 +2,11 @@
2
2
  mustflow_doc: skill.repro-first-debug
3
3
  locale: en
4
4
  canonical: true
5
- revision: 3
5
+ revision: 5
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: repro-first-debug
9
- description: Apply this skill when fixing a reported bug or confusing failure before the failure has a clear reproduction.
9
+ description: Apply this skill when fixing, investigating, or instrumenting a reported bug, confusing failure, flaky symptom, production-only defect, unreproducible incident, or legacy-code failure before the failure has a clear reproduction.
10
10
  metadata:
11
11
  mustflow_schema: "1"
12
12
  mustflow_kind: procedure
@@ -31,8 +31,9 @@ This skill keeps debugging anchored to symptom evidence, deterministic reproduct
31
31
  ## Use When
32
32
 
33
33
  - A user reports a bug, broken behavior, confusing runtime result, or failed workflow.
34
- - A failure is visible, but the smallest reproduction path is not yet clear.
34
+ - A failure is visible, intermittent, production-only, data-dependent, or reported from another environment, but the smallest reproduction path is not yet clear.
35
35
  - A fix could otherwise be based on speculation, stale assumptions, or a broad unrelated test run.
36
+ - A safe temporary patch is needed to stop harm, but the change must also capture evidence for the next occurrence instead of only hiding the symptom.
36
37
 
37
38
  <!-- mustflow-section: do-not-use-when -->
38
39
  ## Do Not Use When
@@ -49,6 +50,8 @@ This skill keeps debugging anchored to symptom evidence, deterministic reproduct
49
50
  - Any pasted error text, screenshot detail, failing command intent, route, or UI action.
50
51
  - Recently changed files or likely affected files.
51
52
  - Existing tests, command intents, or manual reproduction notes related to the failure.
53
+ - Available diagnostic evidence such as trace id, span id, request id, job id, attempt, feature flag, deployment version, log query, normal-versus-failing trace comparison, profiler window, breakpoint or watchpoint condition, and safe DB/cache/external dependency facts.
54
+ - Runtime state snapshot evidence when available: cache keys, DB row state, queue state, locks, in-flight work, timezone, environment/config values, server instance, feature flags, app version, browser/app version, region, release, and concurrent request count.
52
55
  - Any known flakiness, environment dependency, timing dependency, or unavailable reproduction requirement.
53
56
 
54
57
  <!-- mustflow-section: preconditions -->
@@ -81,13 +84,37 @@ This skill keeps debugging anchored to symptom evidence, deterministic reproduct
81
84
  - specific input, fixture, locale, path, or data shape;
82
85
  - external source, generated output, or stale build artifact.
83
86
  For each hypothesis, write the observation that would confirm or reject it before changing production code.
84
- 6. If the symptom appears flaky, separate the reproducible behavior from the unstable trigger. Do not treat one passing broad rerun as proof that the issue is fixed.
85
- 7. Inspect the source that controls the reproduced behavior and gather the smallest observation needed to choose between hypotheses.
86
- 8. If temporary instrumentation is needed, give every probe a unique marker, keep it local to the suspect boundary, and remove it before final verification.
87
- 9. Apply the smallest fix that addresses the reproduced cause.
88
- 10. Re-run the original reproduction path after the fix. If that path is unavailable or too broad, run the closest configured intent and report the limitation.
89
- 11. Add or keep a regression guard only when it is tied to the reproduced symptom or a directly observed boundary condition.
90
- 12. Report the symptom, reproduction, hypotheses considered, observations, fix, original reproduction rerun, checks, and remaining risk.
87
+ 6. Reject symptom-cover patches before editing.
88
+ - A null check, timeout increase, expected-value tweak, broad retry, catch-and-ignore, or local-line-only patch is not acceptable until the broken invariant and first divergence are named.
89
+ - Before applying a patch, state which invariant failed, where the invariant first became false, and what no-patch observation proves that claim.
90
+ - List counterexamples that could still fail after the obvious patch, especially concurrency, cache, time zone, retry/idempotency, schema/wire compatibility, security, and performance cases.
91
+ 7. Build a diagnostic evidence packet when logs, traces, profiling, or breakpoints are involved.
92
+ - Prefer normal-versus-failing trace comparison before reading only the final error log.
93
+ - Tie evidence together with stable identifiers such as trace id, span id, request id, tenant id, job id, attempt, feature flag, and deployment version.
94
+ - If timing or ordering may matter, prefer profiler, trace duration, lock wait, allocation, queue age, or dependency latency evidence before stopping the process with a broad breakpoint.
95
+ - Use conditional instrumentation or breakpoints scoped to the failing id when configured or manually approved; do not leave those probes in committed code.
96
+ 8. If the symptom appears flaky, separate the reproducible behavior from the unstable trigger. Do not treat one passing broad rerun as proof that the issue is fixed.
97
+ 9. For unreproducible failures, switch from "make it fail locally" to "make the next failure leave evidence."
98
+ - Capture a state snapshot, not just the input payload: relevant memory/cache state, DB rows, locks, queue messages, time zone, deployment version, feature flags, environment/config values, server instance, dependency versions, and concurrency shape when safe and available.
99
+ - Prefer pre-failure ring buffers, bounded internal event trails, impossible-state assertions, invariant checks, DB constraints, background auditors, or sanity checkers that fire where the bad state is first created.
100
+ - Temporary mitigation should also add forensic evidence such as caller, retry header, idempotency key, first and second handling time, state before and after, or safe resource identifiers.
101
+ 10. Narrow production-only and legacy symptoms by evidence elimination.
102
+ - Split last-known-good and first-failed windows across code, config, data, migration, infra, dependency, external-provider, and traffic-pattern changes.
103
+ - Split mixed symptoms by error code, user cohort, browser, app version, region, server instance, time window, release, feature flag, and data shape before assuming one root cause.
104
+ - Search stable constants, error strings, DB column names, event names, queue topics, config keys, and external endpoint fragments before trusting function names.
105
+ - Start from exits and writers: DB writes, serialized responses, emitted events, emails, balance changes, files, queues, cron jobs, admin tools, and external side effects. Treat DB triggers, queues, cron, imports, and admin panels as code.
106
+ - Use blame, linked commits, PRs, and same-commit file changes for historical context, not for assigning fault.
107
+ 11. Stress hidden conditions deliberately when the repository has a configured or approved way to do so.
108
+ - Suspect time, randomness, and concurrency first for "sometimes" failures.
109
+ - Prefer fixed seeds, fake clocks, forced interleavings, latency injection, duplicate or reordered messages, worker kills, cache clears, slight time shifts, and concurrent requests over waiting for chance.
110
+ - Minimize production data into a safe fixture by removing unrelated rows or events until the trigger disappears, then restore the last removed condition.
111
+ 12. Inspect the source that controls the reproduced behavior and gather the smallest observation needed to choose between hypotheses.
112
+ 13. If temporary instrumentation is needed, give every probe a unique marker, keep it local to the suspect boundary, and remove it before final verification unless the user explicitly wants durable diagnostics.
113
+ 14. Apply the smallest fix that addresses the reproduced or instrumented cause. Keep behavior-preserving cleanup, characterization tests, bug fixes, and long-term refactors separate when the codebase is legacy or high-risk.
114
+ 15. Re-run the original reproduction path after the fix. If that path is unavailable or too broad, run the closest configured intent and report the limitation.
115
+ 16. For unreproducible fixes, define the "fixed" metric before claiming success: failure rate, invariant violation count, duplicate handling count, retry exhaustion count, DLQ growth, timeout rate, latency tail, or another symptom-specific measure.
116
+ 17. Add or keep a regression guard only when it is tied to the reproduced symptom, the instrumented invariant, or a directly observed boundary condition.
117
+ 18. Report the symptom, reproduction, hypotheses considered, observations, evidence packet, fix, original reproduction rerun, checks, and remaining risk.
91
118
 
92
119
  <!-- mustflow-section: postconditions -->
93
120
  ## Postconditions
@@ -95,6 +122,10 @@ This skill keeps debugging anchored to symptom evidence, deterministic reproduct
95
122
  - The final report distinguishes reproduced evidence from assumptions.
96
123
  - Any added test or reproduction note is tied to the reported failure, not to general coverage growth.
97
124
  - Cause hypotheses are confirmed, rejected, or left explicitly unresolved instead of being implied by a passing broad check.
125
+ - Symptom-cover patches are rejected unless they repair the named invariant and survive relevant counterexamples.
126
+ - Trace, log, profiler, breakpoint, DB, cache, and dependency evidence is correlated by stable identifiers when that evidence exists.
127
+ - Unreproducible defects are handled with next-failure evidence capture, state snapshots, bounded event trails, impossible-state monitors, and pre-declared fix metrics rather than a speculative local patch.
128
+ - Legacy-code investigations start from symptom exits, writers, stable strings, data flow, history, and code-outside-code surfaces before broad call-graph reading or cleanup.
98
129
  - Temporary instrumentation and debug output are removed before final verification unless intentionally retained.
99
130
  - Missing command intents, unavailable tools, or unsafe reproduction requirements are reported instead of hidden.
100
131
 
@@ -125,6 +156,8 @@ Prefer the original failing intent when it is narrower than the defaults above.
125
156
  - Symptom and expected behavior
126
157
  - Reproduction path or reproduction gap
127
158
  - Hypotheses considered and observations
159
+ - Diagnostic evidence packet and counterexamples considered
160
+ - State snapshot, next-failure capture, last-good or first-failed window, symptom split, and legacy narrowing evidence where relevant
128
161
  - Probable cause, confidence, and evidence
129
162
  - Fix applied
130
163
  - Original reproduction rerun result
@@ -790,7 +790,7 @@ applies_to_reasons = ["unknown_change", "code_change", "behavior_change", "test_
790
790
  category = "data_external"
791
791
  route_type = "primary"
792
792
  priority = 75
793
- applies_to_reasons = ["code_change", "docs_change", "security_change", "package_metadata_change", "release_risk"]
793
+ applies_to_reasons = ["code_change", "docs_change", "security_change", "package_metadata_change", "release_risk", "unknown_change"]
794
794
 
795
795
  [routes."dependency-reality-check"]
796
796
  category = "data_external"
@@ -814,7 +814,7 @@ applies_to_reasons = ["code_change", "public_api_change", "test_change", "docs_c
814
814
  category = "data_external"
815
815
  route_type = "adjunct"
816
816
  priority = 65
817
- applies_to_reasons = ["code_change", "security_change", "migration_change"]
817
+ applies_to_reasons = ["code_change", "security_change", "migration_change", "package_metadata_change", "release_risk"]
818
818
 
819
819
  [routes."adapter-boundary"]
820
820
  category = "data_external"
@@ -886,7 +886,7 @@ applies_to_reasons = ["test_change"]
886
886
  category = "security_privacy"
887
887
  route_type = "primary"
888
888
  priority = 30
889
- applies_to_reasons = ["security_change", "privacy_change"]
889
+ applies_to_reasons = ["security_change", "privacy_change", "package_metadata_change", "release_risk", "unknown_change"]
890
890
 
891
891
  [routes."secret-exposure-response"]
892
892
  category = "security_privacy"
@@ -934,7 +934,7 @@ applies_to_reasons = ["unknown_change", "code_change", "behavior_change", "publi
934
934
  category = "security_privacy"
935
935
  route_type = "adjunct"
936
936
  priority = 76
937
- applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "security_change", "privacy_change", "data_change", "test_change", "package_metadata_change", "release_risk"]
937
+ applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "security_change", "privacy_change", "data_change", "test_change", "docs_change", "package_metadata_change", "release_risk", "unknown_change"]
938
938
 
939
939
  [routes."security-regression-tests"]
940
940
  category = "security_privacy"
@@ -2,11 +2,11 @@
2
2
  mustflow_doc: skill.security-flow-review
3
3
  locale: en
4
4
  canonical: true
5
- revision: 1
5
+ revision: 2
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: security-flow-review
9
- description: Apply this skill when code is created, changed, reviewed, or reported and security review needs source-to-sink tracing across authorization, object ownership, tenant scoping, IDOR or BOLA risk, mass assignment, admin-only surfaces, cache keys, exports, injection-like inputs, ORM raw paths, SSRF, file upload and extraction, path traversal, XSS, CSRF, OAuth, reset tokens, JWTs, cookies, cryptography, logs, fail-open error handling, async jobs, race conditions, or supply-chain and CI/CD paths.
9
+ description: Apply this skill when code is created, changed, reviewed, or reported and security review needs source-to-sink tracing across authorization, object ownership, tenant scoping, IDOR or BOLA risk, mass assignment, admin-only surfaces, cache keys, exports, injection-like inputs, ORM raw paths, SSRF, file upload and extraction, path traversal, development server file serving, privileged test or browser UI APIs, XSS, CSRF, OAuth, reset tokens, JWTs, cookies, cryptography, logs, fail-open error handling, async jobs, race conditions, or supply-chain and CI/CD paths.
10
10
  metadata:
11
11
  mustflow_schema: "1"
12
12
  mustflow_kind: procedure
@@ -42,7 +42,8 @@ changes, and where can data or authority leak?"
42
42
 
43
43
  - Code review, implementation, or report work touches routes, handlers, services, repositories,
44
44
  resolvers, jobs, workers, admin tools, exports, imports, caches, files, external fetchers,
45
- OAuth callbacks, tokens, cookies, logs, CI workflows, package metadata, or dependency execution.
45
+ OAuth callbacks, tokens, cookies, logs, CI workflows, package metadata, development servers,
46
+ test UI servers, browser-mode tooling, preview servers, or dependency execution.
46
47
  - A feature accepts an identifier, URL, filename, path, HTML, Markdown, sort key, filter, field list,
47
48
  status, role, price, entitlement, tenant id, organization id, user id, or client-provided state.
48
49
  - The suspected issue may be BOLA, IDOR, missing authorization, tenant leak, mass assignment,
@@ -76,7 +77,8 @@ changes, and where can data or authority leak?"
76
77
  - Read and write surfaces: list, detail, count, export, download, search, stats, update, delete,
77
78
  approve, invite, upload, webhook, callback, job, and admin paths.
78
79
  - Framework or platform escape hatches: raw query APIs, shell wrappers, HTML escape bypasses, file
79
- APIs, URL fetchers, parser options, cache behavior, token libraries, and CI/package lifecycle hooks.
80
+ APIs, URL fetchers, parser options, cache behavior, token libraries, development-server host and
81
+ filesystem policies, privileged test UI APIs, and CI/package lifecycle hooks.
80
82
  - Existing tests, denial cases, scanner findings, security docs, command intent entries, and any
81
83
  missing context that blocks a confident conclusion.
82
84
 
@@ -172,6 +174,11 @@ changes, and where can data or authority leak?"
172
174
  - Locale files, templates, themes, attachments, logs, static proxies, backup restore, plugin
173
175
  loaders, model loaders, and generated state all need real-path containment after symlinks and
174
176
  normalization.
177
+ - For framework file-serving and dev-server APIs, trace URL path, query string, raw path,
178
+ decoded path, normalized path, denied path, and final opened file as separate values. Windows
179
+ alternate data streams, device namespace prefixes, 8.3 short names, mixed separators, and
180
+ trailing dot or space aliases can make a lexical allow/deny check protect a different name
181
+ than the operating system opens.
175
182
  16. Trace browser-code execution contexts.
176
183
  - XSS can enter through Markdown, rich text, translations, email templates, chart labels, admin
177
184
  dashboards, CSV exports, hydration data, JSON-in-script blocks, and framework escape hatches.
@@ -213,6 +220,11 @@ changes, and where can data or authority leak?"
213
220
  - Dependency manifests, lockfiles, postinstall scripts, codegen, Docker base images, GitHub
214
221
  Actions permissions, workflow triggers, artifact upload, CI secrets, package publish identity,
215
222
  Terraform modules, Helm charts, and deployment scripts can execute or leak authority.
223
+ - Treat exposed dev servers and test UIs as execution surfaces when they can rerun tests, write
224
+ snapshots or source files, save attachments, read arbitrary files, or execute browser-mode
225
+ commands. Binding such a server to `0.0.0.0`, a LAN host, a tunnel, a container-published
226
+ port, or a remote workspace turns local convenience APIs into remote authority unless explicit
227
+ read-only, no-write, and no-exec gates are enforced.
216
228
  25. Convert the finding into the smallest defensive action.
217
229
  - Fix the owner closest to the sink when the boundary is clear.
218
230
  - If evidence is incomplete, report the exact unverified source, sink, actor, resource, tenant,
@@ -229,6 +241,8 @@ changes, and where can data or authority leak?"
229
241
  wording.
230
242
  - Security-sensitive caches, workers, queues, logs, tokens, files, browser renderers, and CI/CD paths
231
243
  are either checked or explicitly reported as outside the current evidence.
244
+ - Development-server and test-UI file read, write, rerun, attachment, snapshot, and execute surfaces
245
+ are checked when the dependency, config, or scanner finding points at them.
232
246
  - Any concrete security bug fix has denial-case or invariant evidence, or the missing test surface is
233
247
  reported.
234
248
 
@@ -272,6 +286,7 @@ Prefer the narrowest configured test intent that proves the reviewed defensive b
272
286
  - Authorization and ownership notes
273
287
  - Input, file, network, browser, token, cookie, crypto, log, fail-open, async, race, cache, and
274
288
  supply-chain findings when relevant
289
+ - Development-server and test-UI exposure findings when relevant
275
290
  - Fixes made or recommendation
276
291
  - Tests, denial cases, or invariant evidence
277
292
  - Command intents run
@@ -2,11 +2,11 @@
2
2
  mustflow_doc: skill.security-privacy-review
3
3
  locale: en
4
4
  canonical: true
5
- revision: 23
5
+ revision: 24
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: security-privacy-review
9
- description: Apply this skill when code, configuration, docs, templates, logs, telemetry, traces, baggage, behavior analytics, core events, credentials, data flows, data residency policy, region or processing-location claims, AI-generated code, AI prompts outputs usage cost records budgets policies or cache keys, authentication, authorization, server-side permission checks, admin operations, audit logs, file uploads or downloads, signed URLs, API responses, cache policy, cache-as-authority decisions, claim or policy data, comparison or affiliate data, user-generated content, webhooks, job queues, search logs, analytics SaaS exports, external API call records, network calls, dependencies, runtime security patch policy, third-party terms or data-use promises, cryptography, secure transport, agent configuration, or release surfaces affect secrets, personal data, retention, access control, vendor disclosure, or external disclosure.
9
+ description: Apply this skill when code, configuration, docs, templates, logs, telemetry, traces, baggage, behavior analytics, core events, credentials, data flows, data residency policy, region or processing-location claims, AI-generated code, AI prompts outputs usage cost records budgets policies or cache keys, authentication, authorization, server-side permission checks, admin operations, audit logs, file uploads or downloads, signed URLs, API responses, cache policy, cache-as-authority decisions, claim or policy data, comparison or affiliate data, user-generated content, webhooks, job queues, search logs, analytics SaaS exports, external API call records, network calls, dependencies, runtime security patch policy, vulnerability scanner advisories, development servers, test UI servers, third-party terms or data-use promises, cryptography, secure transport, agent configuration, or release surfaces affect secrets, personal data, retention, access control, vendor disclosure, or external disclosure.
10
10
  metadata:
11
11
  mustflow_schema: "1"
12
12
  mustflow_kind: procedure
@@ -40,6 +40,7 @@ Catch security, privacy, and disclosure risks introduced by ordinary code, docum
40
40
  - A tool, platform, model provider, analytics service, observability vendor, authentication provider, file store, or automation service has data retention, data training, commercial-use, export, API-limit, account-suspension, or unilateral terms-change implications for user data or service continuity.
41
41
  - A cloud, database, file store, logging backend, analytics tool, support tool, payment system, or AI provider choice affects where customer content, personal data, backups, logs, prompts, usage metadata, billing metadata, or support-access data is stored or processed.
42
42
  - A runtime, framework, dependency, or platform choice affects supported-version policy, end-of-life exposure, security patch timing, scanner coverage, deployment smoke tests, or rollback expectations.
43
+ - A development server, preview server, browser-mode test server, or local tool UI can serve files, expose an API, execute tests, write project files, or bind beyond localhost.
43
44
  - A change touches administrator operations such as publishing, slug or redirect changes, canonical or robots changes, SEO updates, filter definition updates, advertisement policy, cache purge, search reindexing, ranking refresh, role changes, or audit-log snapshots.
44
45
  - A change touches legal, policy, privacy, finance, health, comparison, ranking, price, eligibility, affiliate, or high-risk factual claims that need source, reviewer, jurisdiction, effective-date, or human-approval boundaries.
45
46
  - A change touches identity, consent, editorial, catalog, community, analytics, billing, messaging, or audit data ownership boundaries, including account deletion, anonymization, export, or retention behavior.
@@ -93,6 +94,7 @@ Catch security, privacy, and disclosure risks introduced by ordinary code, docum
93
94
  - Data residency and processing-location policy, including home region, storage region, backup region, log region, analytics region, AI processing region, support-tool region, payment or tax data region, disaster-recovery replica region, deletion expectations, and whether provider system data is outside customer-content residency guarantees.
94
95
  - Data classification policy when available, including sensitive personal data, ordinary personal data, product usage data, public content, AI prompts or outputs, and which classes may enter logs, analytics, support tools, AI providers, or cross-region backups.
95
96
  - Runtime and dependency patch policy, including supported or LTS version requirement, end-of-life ban, lockfile expectation, vulnerability scan source, patch response target, smoke-test surface, canary or rollback route, and whether experimental runtime choices are kept off survival paths.
97
+ - Development-tool exposure policy, including host binding, allowed network interfaces, file-serving roots, deny lists, privileged API flags, write or execute capabilities, token handling, and whether the tool is local-only or safe for shared networks.
96
98
  - Webhook and external-call record policy, including signature verification, processed-event deduplication, safe request hashes, redacted provider responses, unknown-result reconciliation, dead-letter retention, and whether raw payloads are needed or should be replaced by bounded metadata.
97
99
  - Public intake default policy, including whether verifiers, authenticators, authorizers, deduplication stores, idempotency stores, and normalizers are required by registration, explicit opt-in, or silently replaced by permissive defaults.
98
100
  - Attacker-controlled key and header limits for idempotency keys, webhook event ids, provider names, action names, replay ids, dedupe keys, request ids, and any in-memory map or queue keyed by public request data.
@@ -198,10 +200,12 @@ Catch security, privacy, and disclosure risks introduced by ordinary code, docum
198
200
  35. For pinned action references, distinguish tag objects from the commit that implements the tag. Verify pinned SHAs against the action repository so scanner tooling does not report an imposter or non-member commit.
199
201
  36. For dependency scanner alerts, separate production dependency manifests from fixtures, examples, generated test repositories, and intentionally vulnerable samples. Narrow the scan scope before treating fixture-only alerts as product vulnerabilities.
200
202
  - For lockfile CVEs, inspect the manifest and lockfile together. Identify the direct parent that keeps the vulnerable transitive package in the graph, update the narrowest direct dependency or override needed to reach the fixed range, and confirm the vulnerable package version no longer appears in the resolved graph before claiming the alert is fixed.
203
+ - For advisories involving development tools such as Vite, Vitest UI, browser-mode test servers, Storybook, docs preview, asset servers, or framework dev servers, do not dismiss the issue merely because the package is a devDependency. Check whether scripts, docs, Docker, Codespaces, CI previews, tunnels, or config bind the server to a non-localhost host, widen file-serving roots, disable deny lists, or expose privileged read, write, rerun, snapshot, attachment, or execute APIs.
201
204
  37. For deployment settings, check debug mode, sample admin accounts, default credentials, public admin panels, open metrics endpoints, public storage, root container users, HTTPS enforcement, and exposed GraphQL or development consoles.
202
205
  38. For runtime and framework security updates, check that supported versions are documented, end-of-life versions are rejected, dependency locks exist where appropriate, security patches can be tested and deployed quickly, and rollback or redeploy can happen without manual dashboard memory. Do not treat a fashionable or high-performance runtime as safe unless the patch path is operationally credible.
206
+ - Treat advisory exploit preconditions as review inputs, not excuses. If the exploit requires Windows, NTFS alternate data streams, 8.3 short names, non-localhost binding, exposed QUIC or SSH clients, oversized public keys, malformed protocol frames, or misbehaving peers, search for those conditions before marking the alert irrelevant.
203
207
  39. For transport security, check HTTPS/TLS requirements, certificate validation, insecure HTTP downgrade paths, disabled verification flags, and whether sensitive traffic can bypass the secure channel.
204
- 40. For cryptography, reject custom cryptography and tutorial-grade shortcuts. Check password hashing uses a password-hashing primitive such as bcrypt, scrypt, or Argon2id where supported by the project; random tokens use secure randomness; keys are separated from encrypted data; and weak hashes such as MD5, SHA-1, or bare SHA-256 are not used for password storage.
208
+ 40. For cryptography and security protocols, reject custom cryptography and tutorial-grade shortcuts. Check password hashing uses a password-hashing primitive such as bcrypt, scrypt, or Argon2id where supported by the project; random tokens use secure randomness; keys are separated from encrypted data; weak hashes such as MD5, SHA-1, or bare SHA-256 are not used for password storage; protocol parsers bound attacker-controlled key sizes, packet sizes, frame ordering, unsolicited responses, and panic or assertion paths.
205
209
  41. For policy engines, architecture linters, compliance validators, and generated governance gates, identify the canonical policy source and the canonical object identity before trusting a pass result.
206
210
  - Do not let repository-controlled advisory fields, nested duplicates, labels, components, owners, stages, tiers, or exemption fields override a trusted catalog, server-derived identity, or central registration.
207
211
  - When two fields can describe the same security decision, such as top-level and nested owner values, validate their consistency or choose the canonical source explicitly instead of reading the first convenient path.
@@ -276,6 +280,7 @@ Use a narrower configured test, build, or documentation intent when it better pr
276
280
  - Data residency, data classification, AI processing location, runtime patch, and hard-limit policy checked when relevant
277
281
  - Claim, comparison, affiliate, user-generated content, data-ownership, deletion, anonymization, export, and retention boundaries checked when relevant
278
282
  - Authorization, session, token, input, file, network, business-logic, dependency, cryptography, transport, deployment, scanner, and agent-tool boundaries checked
283
+ - Development-server, test-UI, scanner-advisory, Windows filesystem, protocol parser, and dependency patchability boundaries checked when relevant
279
284
  - Permission exception and emergency-access boundaries checked when relevant
280
285
  - Redaction, omission, or wording changes made
281
286
  - Related security-regression test need
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: agents.root
3
3
  locale: en
4
4
  canonical: true
5
- revision: 20
5
+ revision: 21
6
6
  lifecycle: user-editable
7
7
  authority: binding
8
8
  ---
@@ -57,6 +57,11 @@ mustflow-managed details are under `.mustflow/`.
57
57
  and command specification.
58
58
  - Preferences in `.mustflow/config/preferences.toml` have lower priority than direct user
59
59
  instructions and existing project style.
60
+ - If this repository is a child repository without its own `.mustflow/config/preferences.toml`,
61
+ inherit the nearest parent mustflow root's preferences as defaults. This includes `[git]`,
62
+ `[git.commit_message]`, `[release.versioning]`, verification, testing, language, reporting, and
63
+ other preference sections. Child-local preferences override parent preferences field by field.
64
+ Never inherit `.mustflow/config/commands.toml`; command authority remains repository-local.
60
65
  - When code, templates, schemas, CLI behavior, package metadata, user-visible docs, installation
61
66
  output, or tests change, check `[release.versioning]` in `.mustflow/config/preferences.toml`
62
67
  before the final report. Version files may be changed only according to those preferences:
@@ -115,6 +120,9 @@ mustflow-managed details are under `.mustflow/`.
115
120
  Follow the stricter rule.
116
121
  - When navigating to a nested repository, reread that repository's `AGENTS.md` and
117
122
  `.mustflow/config/*.toml` before editing.
123
+ - If the nested repository has no local preferences file, apply the nearest parent mustflow
124
+ preferences as inherited defaults while still following the nested repository's `AGENTS.md` and
125
+ command contract.
118
126
  - In repository farms, prefer each child repository's own command contract for repository-owned
119
127
  commands. If the parent root intentionally orchestrates children, split parent-owned commands
120
128
  into repo-named fragments under `.mustflow/config/commands/`; use