mustflow 2.116.1 → 2.116.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/package.json +1 -1
  2. package/templates/default/i18n.toml +72 -6
  3. package/templates/default/locales/en/.mustflow/skills/INDEX.md +37 -11
  4. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/SKILL.md +477 -0
  5. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-diagnostics-abi-linker-checklist.md +778 -0
  6. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-generators-properties-checklist.md +501 -0
  7. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-test-strategy-differential-checklist.md +498 -0
  8. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/debug-symbol-symbolication-checklist.md +412 -0
  9. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/ir-design-ssa-pass-pipeline-checklist.md +759 -0
  10. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/miscompile-reduction-ir-checklist.md +434 -0
  11. package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md +55 -36
  12. package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/references/path-containment-handle-checklist.md +251 -0
  13. package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/SKILL.md +133 -32
  14. package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/references/file-upload-parser-ssrf-resource-checklist.md +306 -0
  15. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/SKILL.md +310 -0
  16. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-concurrency-model-checking-smt-checklist.md +457 -0
  17. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-contracts-modeling-checklist.md +434 -0
  18. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-memory-bounds-ci-checklist.md +509 -0
  19. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/SKILL.md +439 -0
  20. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-harness-campaign-checklist.md +379 -0
  21. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-oracle-triage-ci-checklist.md +307 -0
  22. package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/SKILL.md +48 -28
  23. package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/references/operation-ordering-stale-write-checklist.md +259 -0
  24. package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/SKILL.md +329 -0
  25. package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/references/input-boundary-security-checklist.md +319 -0
  26. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/SKILL.md +306 -0
  27. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/input-session-state-checklist.md +298 -0
  28. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/remote-input-transport-interaction-checklist.md +328 -0
  29. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/SKILL.md +353 -0
  30. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-diagnostics-recovery-checklist.md +267 -0
  31. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-execution-closure-performance-checklist.md +428 -0
  32. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-gc-verification-checklist.md +457 -0
  33. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-semantics-runtime-checklist.md +391 -0
  34. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/SKILL.md +294 -0
  35. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/modal-loop-reentrancy-checklist.md +290 -0
  36. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/nested-modal-state-lifetime-checklist.md +297 -0
  37. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/SKILL.md +252 -0
  38. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/dns-network-resolution-checklist.md +394 -0
  39. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/language-symbol-resolution-checklist.md +282 -0
  40. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/module-package-loader-resolution-checklist.md +352 -0
  41. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/SKILL.md +103 -17
  42. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/cst-ast-lowering-checklist.md +260 -0
  43. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/lexer-tokenization-checklist.md +397 -0
  44. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-serialization-compatibility-checklist.md +164 -0
  45. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-traversal-rewrite-checklist.md +209 -0
  46. package/templates/default/locales/en/.mustflow/skills/race-condition-review/SKILL.md +68 -11
  47. package/templates/default/locales/en/.mustflow/skills/race-condition-review/references/race-reproduction-memory-model-checklist.md +268 -0
  48. package/templates/default/locales/en/.mustflow/skills/routes.toml +151 -0
  49. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/SKILL.md +343 -0
  50. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-auth-stream-resume-checklist.md +413 -0
  51. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-handoff-protocol-checklist.md +485 -0
  52. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/SKILL.md +267 -0
  53. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/admission-decision-recovery-checklist.md +308 -0
  54. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/two-phase-transition-checklist.md +229 -0
  55. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/SKILL.md +300 -0
  56. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-affinity-event-loop-checklist.md +277 -0
  57. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-dispatch-lifecycle-checklist.md +292 -0
  58. package/templates/default/manifest.toml +115 -1
@@ -0,0 +1,477 @@
1
+ ---
2
+ mustflow_doc: skill.compiler-engineering-review
3
+ locale: en
4
+ canonical: true
5
+ revision: 6
6
+ lifecycle: mustflow-owned
7
+ authority: procedure
8
+ name: compiler-engineering-review
9
+ description: Apply this skill when compiler semantic analysis, AST/HIR/typed-HIR/MIR/LIR boundaries, IR semantic contracts, semantic/storage/ABI/machine type transitions, ownership capability tokens, borrow or lifetime flow, allocation identity and provenance, scoped or generation-tracked analysis facts, effect or capture models, progressive lowering, mixed-level legality, CFG and SSA construction or destruction, phi and edge semantics, canonical forms, pass ordering, staged verifiers, analysis preservation, optimization transforms, code generation, assembler, object format, symbol tables, archive extraction, section reachability, relocations, static or dynamic symbol resolution, visibility, export or import boundaries, name mangling, ABI, linker, plugin interfaces, dynamic loading, debug symbols, DWARF, PDB, dSYM, unwind metadata, stripping, dead-code elimination, identical-code folding, LTO, crash symbolication, symbol stores, diagnostics, source mapping, recovery, fix-its, compiler test strategy, well-defined program or IR generators, differential or metamorphic testing, transformation-activation coverage, determinism testing, miscompile reproduction, stage localization, reduction, or compiler-correctness claims are created, changed, reviewed, debugged, or reported.
10
+ metadata:
11
+ mustflow_schema: "1"
12
+ mustflow_kind: procedure
13
+ pack_id: mustflow.core
14
+ skill_id: mustflow.core.compiler-engineering-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
+ # Compiler Engineering Review
29
+
30
+ <!-- mustflow-section: purpose -->
31
+ ## Purpose
32
+
33
+ Review compiler behavior through stage-local semantic contracts rather than compile success or
34
+ process survival. Identify the last stage whose output preserves the intended meaning, the first
35
+ stage whose output violates it, and the smallest reproducible universe that keeps that exact
36
+ divergence.
37
+
38
+ Keep source semantics, intermediate representation validity, optimization equivalence, analysis
39
+ preservation, machine-level contracts, diagnostic structure, source mapping, ABI, object metadata,
40
+ link resolution, runtime observations, and unspecified or undefined behavior as separate evidence
41
+ layers.
42
+
43
+ Design compiler tests by semantic distance and oracle cost, not file count or line coverage. Keep
44
+ acceptance, diagnostics, semantic execution, artifact structure, performance, determinism, and
45
+ transformation activation as distinct oracles with explicit owning stages.
46
+
47
+ <!-- mustflow-section: use-when -->
48
+ ## Use When
49
+
50
+ - A compiler, transpiler, optimizer, static analyzer, borrow checker, verifier, assembler, linker,
51
+ disassembler, formatter-adjacent diagnostic layer, or code generator changes.
52
+ - A program compiles but changes observable behavior across optimization levels, pass pipelines,
53
+ compiler versions, targets, CPU features, backend paths, link modes, or runtime environments.
54
+ - IR, MIR, CFG, SSA, dominance, liveness, dataflow, alias, memory, poison, undefined-value,
55
+ register, unwind, relocation, or symbol invariants need review.
56
+ - IR layer boundaries, semantic versus storage types, effect systems, progressive or partial
57
+ lowering, legal mixed states, canonicalization windows, source identity, or replay formats change.
58
+ - Ownership or borrow tokens, object-lifetime state, allocation/view/address identity, pointer
59
+ provenance, alias scope or epoch, capture behavior, fact provenance, or metadata transitions change.
60
+ - Stage-specific verifier ordering, builder validity, negative verifier mutation, independent ABI or
61
+ ownership checks, conservative analysis invalidation, or semantic refinement checking changes.
62
+ - Phi placement or elimination, critical and exceptional edges, sealed blocks, LCSSA, irreducible
63
+ control flow, analysis invalidation, pass prerequisites, cleanup cycles, or pipeline ordering change.
64
+ - Compiler diagnostics, recovery trees, source ranges, macro locations, Unicode display columns,
65
+ fix-its, note relationships, rendering, or parallel determinism need verification.
66
+ - ABI layout, calling convention, exception handling, object metadata, assembler round trip, symbol
67
+ tables, archive extraction, link order, relocation, section collection, static or dynamic binding,
68
+ visibility, export or import policy, mangling, interposition, plugin ABI, or binary compatibility is
69
+ in scope.
70
+ - Runtime, regular, public, debug, unwind, source, and link-provenance symbol assets; separated debug
71
+ files; crash capture; offline symbolication; stripping; section collection; ICF; LTO; or symbol-store
72
+ identity, retention, privacy, and canary behavior is in scope.
73
+ - A compiler fuzz target needs compiler-specific semantic or stage oracles, reduction axes, or
74
+ regression artifact classification.
75
+ - Compiler tests, generated programs, feature-interaction coverage, differential lineages,
76
+ metamorphic relations, property laws, transformation activation, corpus tiers, or PR, periodic,
77
+ canary, and release validation lanes need design or review.
78
+
79
+ <!-- mustflow-section: do-not-use-when -->
80
+ ## Do Not Use When
81
+
82
+ - Only lexing, parsing, CST or AST construction, syntax recovery, incremental parsing, or parser
83
+ resource limits change; use `parser-engineering-review`.
84
+ - Only fuzz harness reset, corpus, mutator, feedback, sanitizer, campaign, or CI lifecycle changes;
85
+ use `fuzz-harness-review`.
86
+ - Only language application code changes under an existing compiler; use the matching language
87
+ code-change skill.
88
+ - Only a build script, package, or command invocation changes without compiler semantic risk; use
89
+ the narrower build, package, shell, or command-contract skill.
90
+ - Only a public error string changes without diagnostic structure or source-location impact; use
91
+ `error-message-integrity-review`.
92
+ - Only ordinary application test organization, runner speed, sharding, retries, or fixture lifecycle
93
+ changes without compiler-stage or semantic-oracle risk; use the matching test skill.
94
+
95
+ <!-- mustflow-section: required-inputs -->
96
+ ## Required Inputs
97
+
98
+ - Compiler and driver identities, source revision, actual subordinate commands, target triple,
99
+ architecture and features, sysroot, headers, runtime libraries, assembler and linker, environment,
100
+ locale, working directory, and build-mode evidence.
101
+ - Source, preprocessed or otherwise closed input, runtime data, command arguments, environment,
102
+ target features, profiles, link inputs, and every other factor required to reproduce the outcome.
103
+ - Pipeline graph from source through semantic analysis, source IR, optimization, lowering, machine
104
+ IR, assembly, object, link, load, and execution, including persisted boundary artifacts.
105
+ - Expected semantics, reference implementation or interpreter, baseline and candidate results,
106
+ exact normalized failure predicate, exit and resource policy, and nondeterminism evidence.
107
+ - Definedness contract: source-language undefined or unspecified behavior, IR poison or undefined
108
+ values, overflow and alias promises, alignment, provenance, memory model, floating-point mode,
109
+ target assumptions, and unsupported validation features.
110
+ - Pass trace, first-divergence boundary, before and after artifacts, verifier evidence, analysis-
111
+ preservation declarations, translation-validation coverage, and unsupported cases.
112
+ - Reduction axes for source, IR or MIR, runtime input, flags, features, pipeline, modules, objects,
113
+ archives, symbols, relocations, environment, schedule, and probability predicate.
114
+ - IR and machine invariants, CFG shapes, incremental versus full analysis results, borrow or dataflow
115
+ facts, analysis invalidation, and canonicalization expectations.
116
+ - IR layer ledger: semantic contract, retained and destroyed information, types, effects, control
117
+ paths, identity and source provenance, verifier, legal mixed states, consumers, lowering boundary,
118
+ serialization stability, and target-data-layout entry point.
119
+ - Fact ledger: semantic, storage, ABI, and machine representation; fact origin, domain, scope,
120
+ allocation identity, lifetime epoch, generation, status, consumer, invalidating mutations,
121
+ preserve/recompute/weaken/drop transition, and runtime guard or reproof boundary.
122
+ - Ownership ledger: capability-token identity, pointer or view aliases, borrow interval, move and
123
+ release transitions, function-boundary ownership ABI, exceptional and suspension paths, and
124
+ concrete lowering or runtime representation.
125
+ - Pass pipeline ledger: pass prerequisites and postconditions, canonical-form ownership, preserved and
126
+ invalidated analyses, fixed-point or iteration budget, code-size and compile-time budget,
127
+ instrumentation position, target boundary, and interaction tests.
128
+ - Diagnostic IDs, severity, primary and related locations, fix-its, recovery nodes, render modes,
129
+ source encodings, macro and include provenance, and determinism expectations.
130
+ - Link and ABI ledger: object format and platform contract, regular and dynamic symbol namespaces,
131
+ binding, type, visibility, version, decorated name, undefined references, archive extraction rule,
132
+ section roots and collection, relocation producer and consumer, dynamic dependencies, binding
133
+ timing, export or import allowlist, interposition policy, language ABI options, and toolchain identity.
134
+ - Final-link evidence: actual driver-expanded input order, selected and discarded definitions, archive
135
+ members, retained and collected sections, resolved relocation targets, direct dynamic dependencies,
136
+ exported ABI surface, link map or selection trace, and loader-visible result.
137
+ - ABI, layout, calling convention, unwind, binary compatibility, target runner, emulator, or remote
138
+ execution evidence, including a versioned boundary contract for plugins or long-lived consumers.
139
+ - Debug-artifact ledger: runtime exports, regular symbols, public names, line tables, full debug data,
140
+ unwind information, source bundle, link provenance, final binary identity, architecture slice,
141
+ load address, separated-debug association, artifact lineage, access policy, and retention window.
142
+ - Crash-symbolication ledger: capture format, precise versus return-address semantics, module identity
143
+ and load range, inline-chain policy, symbolicator version, source mapping, unavailable-data policy,
144
+ immutable store key, and external retrieval canary.
145
+ - Test architecture: semantic-distance and oracle-cost ladder, stage boundary contracts, oracle
146
+ classes, feature-interaction grid, compile-only through cross-target execution lanes, corpus
147
+ ownership, failure budgets, determinism perturbations, and PR, periodic, canary, or release cadence.
148
+ - Differential and property evidence: implementation lineage, shared components, option and tier
149
+ lattice, canonical outcome, runtime input vectors, definedness exclusions, independent authority,
150
+ meaning-preserving transforms with side conditions, relation graph, and exact divergence identity.
151
+ - Generator and coverage evidence: valid and invalid lanes, grammar and semantic environment,
152
+ type and effect constraints, valid pass-transition graph, stage-specific shrinker, transformation
153
+ activation and rejection reasons, property IDs, replay capsule, and corpus classification.
154
+ - Configured command intents for the selected repository.
155
+
156
+ Read [Miscompile Reduction and IR Checklist](references/miscompile-reduction-ir-checklist.md) when a
157
+ wrong-code result, optimization regression, verifier gap, analysis-preservation defect, CFG or SSA
158
+ bug, borrow or dataflow discrepancy, flaky compiler failure, or reduction task is in scope.
159
+
160
+ Read [IR Design, SSA, and Pass Pipeline Checklist](references/ir-design-ssa-pass-pipeline-checklist.md)
161
+ when an IR layer, semantic or storage type, effect model, progressive lowering, mixed-level legality,
162
+ ownership or borrow capability, lifetime or provenance model, scoped analysis fact, metadata
163
+ transition, verifier, canonical form, CFG or SSA construction, phi or edge semantics, analysis
164
+ transaction, pass prerequisite, pass ordering, instrumentation position, or pipeline interaction is
165
+ in scope.
166
+
167
+ Read [Diagnostics, ABI, Codegen, and Linker Checklist](references/compiler-diagnostics-abi-linker-checklist.md)
168
+ when diagnostics, source locations, recovery, fix-its, ABI, object metadata, machine lowering,
169
+ assembly, disassembly, unwind, symbol tables, archives, relocations, visibility, exports or imports,
170
+ static or dynamic linking, plugin boundaries, cross-target behavior, or binary compatibility is in
171
+ scope.
172
+
173
+ Read [Debug Symbols, Stripping, and Symbolication Checklist](references/debug-symbol-symbolication-checklist.md)
174
+ when runtime, regular, public, debug, unwind, or source symbol assets; separated DWARF, PDB, dSYM,
175
+ crash capture, symbol stores, stripping, section collection, ICF, LTO, optimized debug information,
176
+ or symbolication is in scope.
177
+
178
+ Read [Compiler Test Strategy and Differential Checklist](references/compiler-test-strategy-differential-checklist.md)
179
+ when test layering, feature interactions, corpus ownership, compile/link/execute lanes, differential
180
+ lineages, canonical outcomes, determinism perturbation, or PR, periodic, canary, and release cadence
181
+ is in scope.
182
+
183
+ Read [Compiler Generators and Properties Checklist](references/compiler-generators-properties-checklist.md)
184
+ when lexer, parser, type-system, IR, optimizer, or pass-sequence generation; round-trip, property, or
185
+ metamorphic relations; structure-aware shrinking; semantic coverage; or relation graphs are in scope.
186
+
187
+ <!-- mustflow-section: preconditions -->
188
+ ## Preconditions
189
+
190
+ - The task matches the Use When conditions and does not match the exclusions.
191
+ - The expected language and target semantics are named, or the missing specification decision is
192
+ reported before a discrepancy is labeled a compiler defect.
193
+ - The selected repository instructions and command contract have been checked.
194
+
195
+ <!-- mustflow-section: allowed-edits -->
196
+ ## Allowed Edits
197
+
198
+ - Update compiler stages, semantic checks, IR or MIR passes, verifiers, analysis invalidation,
199
+ backend lowering, diagnostics, source mapping, ABI handling, object writers or readers, linker
200
+ logic, regression fixtures, reducer predicates, and directly synchronized docs or templates.
201
+ - Add focused source, IR, MIR, assembly, object, link-graph, diagnostic, cross-version, cross-target,
202
+ differential, metamorphic, translation-validation, and fault fixtures.
203
+ - Add deterministic stage dumps or structured diagnostic outputs when they are bounded, redacted,
204
+ and owned by existing repository test or debug surfaces.
205
+ - Add stage-local properties, semantic generators, feature-interaction fixtures, activation
206
+ counters, canonical outcomes, metamorphic relation metadata, relation-aware reducers, corpus
207
+ ownership metadata, and cadence-specific test selection when directly tied to compiler contracts.
208
+ - Do not preserve a reduced artifact that changed from the original wrong-code predicate into a
209
+ crash, timeout, verifier rejection, compile error, or different undefined program.
210
+ - Do not claim a compiler bug from majority vote, output difference under unspecified semantics,
211
+ unsupported validator behavior, or one final executable result without stage evidence.
212
+
213
+ <!-- mustflow-section: procedure -->
214
+ ## Procedure
215
+
216
+ 1. State the compiler claim and exact oracle, then place it on a semantic-distance and oracle-cost
217
+ ladder. Keep local data-structure, stage regression, pipeline integration, whole-program
218
+ execution, differential, generated, and real-project evidence separate so failure cost and
219
+ localization distance remain visible.
220
+ - Name the observable source-level or ABI contract, normalized baseline result, candidate result,
221
+ and failure fingerprint.
222
+ - Separate compile rejection, verifier rejection, crash, timeout, resource exhaustion,
223
+ nondeterminism, wrong diagnostics, wrong object metadata, wrong code, and link failure.
224
+ 2. Freeze the reproduction universe. Record compiler and tool revisions, actual driver-expanded
225
+ commands, target and features, sysroot and libraries, source closure, link inputs, environment,
226
+ locale, working directory, runtime input, and output normalization. Reproduce from a clean
227
+ directory or equivalent isolated boundary before reducing.
228
+ 3. Split the pipeline into persisted boundaries. Preserve source or closed frontend input,
229
+ unoptimized IR, optimized IR, machine IR, assembly, object, executable, runtime input, and
230
+ observed output where applicable. Give every boundary a structural verifier, semantic relation,
231
+ normalized form, and stage-local regression contract where the implementation exposes them. Swap
232
+ or rerun one stage at a time.
233
+ 4. Prove the input has defined meaning for the disputed observation. Check source-language
234
+ undefined and unspecified behavior, IR poison and undefined values, overflow and alias promises,
235
+ alignment, provenance, data races, floating-point environment, target features, and validator
236
+ limitations. A structural verifier pass is not definedness proof.
237
+ 5. Build an interestingness predicate for the original defect. Separate acceptance, structured
238
+ diagnostics, semantic result, artifact shape, performance, and determinism into distinct oracle
239
+ classes; combine only the classes required by the claim. Require the necessary baseline and
240
+ candidate stages to succeed, the expected reference observation to remain stable, and the exact
241
+ candidate divergence to survive. Reject candidates that merely crash, hang, fail verification,
242
+ fail compilation, or expose another discrepancy.
243
+ 6. Find the first divergence by execution position, not pass-name guesswork. Bisect executed
244
+ transformations or stage boundaries and preserve before and after artifacts plus the actual pass
245
+ trace. A numbered step may be a sub-transform rather than a whole named pass.
246
+ 7. Validate the isolated transformation when a suitable independent semantics checker exists.
247
+ Record supported operations and memory or interprocedural limits. A validator counterexample is
248
+ evidence for the covered model; validator silence or unsupported behavior is not proof.
249
+ 8. Reduce one axis at a time, then alternate axes.
250
+ - Shrink source and compiler-level IR separately.
251
+ - Alternate program reduction with runtime data and argument reduction.
252
+ - Reduce flags as dependency groups, target features, pipeline, modules, translation units,
253
+ objects, archives, sections, symbols, relocations, and environment facts.
254
+ - Remove temporary localization barriers before accepting the final reproducer.
255
+ 9. Treat probabilistic failures as distributions. Fix and record compiler seeds, pass order,
256
+ thread count, object hashes, runtime seeds, and actual schedule decisions. Use a repository-owned
257
+ probability policy; do not invent a threshold that rewards unrelated crashes or timeouts.
258
+ 10. Preserve two useful regression levels when the defect crosses them: a small user-facing source
259
+ reproducer and a small direct-stage IR, MIR, object, or link fixture. Assign artifacts separately
260
+ to specification or conformance, minimized historical regression, generated or fuzz discovery,
261
+ and real-project compatibility corpora. Grow a bounded bug neighborhood around a minimized case
262
+ by varying the proven trigger axes without merging those corpus purposes.
263
+ 11. Generate input at the stage being tested. Keep raw malformed input for parsers and decoders,
264
+ structurally valid IR for optimizers and analyses, valid machine IR for backend passes, and
265
+ controlled invalid examples for verifiers. Separate valid and invalid generators; attach the
266
+ grammar, scope, type, effect, CFG, SSA, target, and definedness facts needed to know which rule
267
+ each input satisfies or intentionally violates. Structure-preserving mutation must not erase the
268
+ raw rejection lane.
269
+ 12. Verify immediately after every transform. Run the owning IR or machine verifier and recompute
270
+ analyses the pass claims to preserve. Record transformation or rewrite identity, triggered and
271
+ declined cases, operand and control shapes, and rejection reason so an executed pass is not
272
+ mistaken for an exercised transform. Distinguish structural validity, semantic definedness,
273
+ analysis consistency, execution equivalence, activation coverage, and mutation-detection evidence.
274
+ 13. Exercise CFG and SSA shapes systematically: critical and duplicate edges, self-loops,
275
+ unreachable cycles, irreducible regions, infinite loops, exceptional edges, edge splitting,
276
+ block merging, tail duplication, phi changes, and unreachable elimination. Check dominance,
277
+ post-dominance, loop membership, memory or liveness state, and phi predecessor agreement.
278
+ 14. Compare incremental analysis updates with independent full recomputation. Preserve the mutation
279
+ that first separates them and report whether the defect is in the updater, invalidation, full
280
+ analysis, or comparison model.
281
+ 15. Check canonicalization idempotence and preservation declarations separately from final output.
282
+ If repeated application is intentionally non-idempotent, document the convergence or bounded
283
+ opportunity contract. A stale preserved analysis can corrupt a later pass even when the current
284
+ pass output looks correct.
285
+ 16. Test poison, undefined, and deferred-choice semantics as propagation paths, not isolated
286
+ operations. Vary control flow, memory address, stored value, vector lane, selected and
287
+ unselected branches, duplication, and the operation that fixes a nondeterministic choice.
288
+ 17. For borrow, ownership, or dataflow checking, compare underlying facts by loan, region, location,
289
+ program point, move, drop, suspension, or lattice state. Use meaning-preserving source or IR
290
+ transforms and independent implementations or full recomputation when available.
291
+ 18. Treat diagnostics as structured outputs. Verify stable diagnostic identity, severity, primary
292
+ and related spans, note graph, arguments, fix-it edits, and recovery provenance before rendered
293
+ text snapshots.
294
+ 19. Keep coordinate systems explicit. Test byte offsets, scalar indices, grapheme and display
295
+ columns, tabs, combining marks, wide characters, line endings, BOM, absent final newline,
296
+ token-end semantics, macro spelling and expansion, includes, generated paths, and remapping.
297
+ 20. Verify recovery by surviving structure and bounded cascades. Mutate one token or rule at a time,
298
+ require progress, retain later valid declarations where the language contract allows it, prevent
299
+ recovery nodes from reaching unsafe semantic or codegen paths, and apply fix-its as edit
300
+ transactions followed by re-analysis and an idempotence check.
301
+ 21. Separate compile, assemble, link, load, and run. Preserve each artifact and classify which stage
302
+ first violates its contract. For cross-target work, distinguish host-side object validation from
303
+ emulator, remote runner, or real-target execution evidence.
304
+ 22. Test ABI across independent producers and consumers. Reverse caller and callee compiler or
305
+ version roles, use hand-authored boundary probes where appropriate, and compare runtime layout,
306
+ compiler layout data, debug metadata, and binary-compatibility evidence without assuming one
307
+ shared implementation is an oracle.
308
+ 23. Inspect object contracts structurally. Check symbols, bindings, visibility, sections, groups,
309
+ relocations, addends, unwind, debug types, thread-local storage, and target metadata. Whole-file
310
+ byte equality and disassembly text alone are weak oracles.
311
+ 24. Localize code generation through machine-stage artifacts. Verify after legalization,
312
+ instruction selection, register allocation, frame and prologue or epilogue construction, and
313
+ final emission where the backend exposes those boundaries.
314
+ 25. Differentially execute defined inputs across independent compiler lineages, optimization and
315
+ pass-option lattices, interpreter, baseline, optimizing, JIT or AOT tiers, compiler revisions,
316
+ backend paths, and target modes only after normalizing legitimate differences. Compare a
317
+ canonical outcome containing terminal class, value or state fingerprint, effects, diagnostics,
318
+ and applicable object or ABI observations across several runtime input vectors. Record shared
319
+ frontend, IR, optimizer, backend, assembler, linker, runtime, or numeric-library ancestry. Use an
320
+ independent interpreter, specification model, translation validator, executable property, or
321
+ reference implementation; do not use majority vote as semantic authority.
322
+ 26. Model linker resolution as a small graph. Permute object and archive order where the contract
323
+ permits, inspect selected definitions and map evidence, test strong, weak, hidden, versioned,
324
+ grouped, and deduplicated symbols, and isolate whole-program optimization from native linking.
325
+ 27. Test code-size and relocation boundaries around the exact threshold. Generate just-inside and
326
+ just-outside cases for branch reach, alignment, thunking, relaxation, code models, section
327
+ collection, and identical-code folding. Preserve the formula and target parameters that define
328
+ the boundary.
329
+ 28. Classify regressions by earliest failing stage and invariant, not only crash stack. Feed minimized
330
+ artifacts back to the matching parser, optimizer, verifier, backend, assembler, object, linker,
331
+ diagnostic, or ABI suite. Perturb hash seed, worker count, schedule, path shape, locale, timezone,
332
+ file order, and cache state when testing determinism. Allocate fast stage checks and minimized
333
+ regressions to change gates, broader feature and option matrices to periodic lanes, and real-
334
+ project shadow compilation and target evidence to canary or release lanes under repository-owned
335
+ budgets.
336
+ 29. Define executable properties and metamorphic relations at each stage. Preserve round-trip,
337
+ alpha-renaming, trivia, independent reorder, dead-code, extraction or inlining, algebraic,
338
+ canonicalization, analysis-recomputation, reproducibility, and refinement laws only under named
339
+ side conditions. Store transform identity, location, preconditions, expected relation, and
340
+ compared observations as a relation graph, and shrink the minimal failing relation path without
341
+ breaking its certificate.
342
+ 30. Apply `fuzz-harness-review` when campaign determinism, coverage feedback, corpus, mutator,
343
+ sanitizer, minimization infrastructure, or CI cadence is also in scope. Keep this skill as owner
344
+ of compiler-specific semantics, stage boundaries, and oracles.
345
+ 31. Define each IR layer as a semantic contract. Name the information and observations it preserves,
346
+ the invariants its verifier enforces, the analyses and transforms it serves, the information its
347
+ lowering destroys, and the source or symbol identity it must retain. Add a layer only when one
348
+ representation cannot satisfy conflicting consumer invariants without mode flags or invalid
349
+ states.
350
+ 32. Review the pass pipeline as a contract graph. Place canonicalization before its consumers,
351
+ preserve high-level meaning until its last consumer, order scalar, loop, target, instrumentation,
352
+ and cleanup stages by their preconditions and information needs, invalidate stale analyses as
353
+ part of each mutation transaction, and bound cleanup or fixed-point cycles by change and cost.
354
+ 33. Track compiler facts as proof-carrying state with explicit lifetimes. Record where a type,
355
+ ownership, alias, provenance, alignment, range, effect, capture, or dataflow fact came from; which
356
+ scope, allocation epoch, and IR generation it covers; whether it is proven, assumed, unknown, or
357
+ contradicted; which transforms preserve, recompute, weaken, or drop it; and which consumers may
358
+ use it for deletion, motion, speculation, or lowering. Default stale or unsupported facts to
359
+ unavailable rather than copying them onto a changed value.
360
+ 34. Treat the final link as selection, reachability, relocation, and loader preparation rather than a
361
+ bag of filenames. Reconstruct the actual ordered inputs after driver expansion; distinguish the
362
+ full object symbol namespace from the loader-visible dynamic namespace; trace why each archive
363
+ member and section was retained or discarded; bind every relocation to its selected definition;
364
+ and compare the final exports and direct dependencies with explicit allowlists. Keep ELF,
365
+ PE/COFF, and Mach-O symbol, archive, import, visibility, interposition, and loader rules as named
366
+ platform contracts instead of pretending one format's vocabulary is portable.
367
+ 35. Treat debug and crash artifacts as an immutable derivative graph of the exact final linked image.
368
+ Separate loader-visible names, regular symbols, public names, line tables, full debug data, unwind,
369
+ source bundles, and link provenance; bind every architecture slice to its platform-native binary
370
+ identity; derive stripped and separated-debug artifacts from the same lineage; preserve precise-PC,
371
+ return-address, load-address, and inline semantics in crash capture; and prove remote retrieval with
372
+ a known-address canary. Track translation-unit DCE, LTO internalization, archive extraction,
373
+ section collection, ICF, and stripping as distinct deletion or aliasing stages.
374
+
375
+ <!-- mustflow-section: postconditions -->
376
+ ## Postconditions
377
+
378
+ - The reproduction universe, definedness boundary, exact defect class, and normalized oracle are
379
+ explicit.
380
+ - The last known-good and first known-bad stage are identified or the missing isolation evidence is
381
+ reported.
382
+ - Reduction preserves the original predicate across source, IR or MIR, input, flags, target,
383
+ pipeline, link, environment, and probability axes that matter.
384
+ - Verifier, analysis, CFG, SSA, borrow, dataflow, diagnostics, source mapping, ABI, object, codegen,
385
+ assembler, linker, and runtime claims are backed only by the evidence layers actually exercised.
386
+ - Regression artifacts are assigned to the earliest owning stage with stable invariants and
387
+ directly synchronized tests, docs, or templates where applicable.
388
+ - Test lanes separate oracle classes, corpus purposes, feature interactions, transformation
389
+ activation, definedness, implementation lineage, determinism, cadence, and evidence cost.
390
+ - Generated and metamorphic cases preserve their semantic environment, side conditions, stable
391
+ property or divergence identity, relation graph, and structure-aware reduction contract.
392
+ - IR layers have explicit semantic, effect, identity, verifier, legality, serialization, lowering,
393
+ canonical-form, and target-entry contracts.
394
+ - CFG and SSA mutations preserve edge-sensitive phi semantics, analysis currency, exceptional
395
+ control flow, and a valid parallel-copy plan where SSA is destroyed.
396
+ - Pass order is justified by producer and consumer contracts, preserved information, analysis
397
+ invalidation, profitability budgets, target constraints, instrumentation, and interaction evidence.
398
+ - Ownership, borrow, lifetime, alias, provenance, effect, capture, layout, and dataflow facts have
399
+ explicit origin, scope, epoch, generation, status, transition, verifier, consumer, and reproof rules.
400
+ - Link evidence explains input order, archive extraction, section reachability, selected definitions,
401
+ relocation targets, loader-visible symbols, direct dependencies, and exported ABI under the named
402
+ object-format and platform contract.
403
+ - Debug evidence identifies each symbol asset, final binary and architecture key, artifact lineage,
404
+ crash-address semantics, source bundle, access and retention policy, optimization limitations, and
405
+ external symbolication canary without substituting a rebuild or filename match.
406
+
407
+ <!-- mustflow-section: verification -->
408
+ ## Verification
409
+
410
+ Use configured oneshot command intents when available:
411
+
412
+ - `changes_status`
413
+ - `changes_diff_summary`
414
+ - `lint`
415
+ - `build`
416
+ - `test_related`
417
+ - `test`
418
+ - `test_audit`
419
+ - `docs_validate_fast`
420
+ - `test_release`
421
+ - `mustflow_check`
422
+
423
+ Prefer narrow configured compiler-stage, reducer-predicate, verifier, diagnostic, ABI, object,
424
+ cross-target, linker, debug-artifact, symbolication, property, generator, determinism, and regression intents when the selected
425
+ repository exposes them. Do not invent raw compiler, emulator, remote-runner, fuzzing, shadow-
426
+ compile, or reducer commands.
427
+
428
+ <!-- mustflow-section: failure-handling -->
429
+ ## Failure Handling
430
+
431
+ - If the source or IR meaning is undefined, unspecified, target-dependent, or disputed, retain the
432
+ artifact as a specification discrepancy until the relevant contract is resolved.
433
+ - If reduction changes the defect class or first failing stage, reject that candidate and restore
434
+ the last predicate-preserving artifact.
435
+ - If translation validation or an independent compiler disagrees outside its supported model, report
436
+ the limitation instead of selecting a winner by vote.
437
+ - If stage artifacts cannot be produced, report the broadest proven boundary and the missing dump or
438
+ configured intent rather than guessing the failing pass.
439
+ - If a cross-target executable cannot run, distinguish host-side IR, object, and link evidence from
440
+ unverified target runtime behavior.
441
+ - If a diagnostic snapshot differs, inspect structured identity, spans, note graph, recovery, and
442
+ normalization before accepting or replacing the snapshot.
443
+ - If a test passes only because its generator rarely reaches the target transform, separate
444
+ generation validity from activation coverage and add a directly observable trigger oracle.
445
+ - If a metamorphic relation lacks proven side conditions or a differential set shares one semantic
446
+ implementation, downgrade the result to a discrepancy signal until independent authority exists.
447
+ - If periodic, canary, real-project, or cross-target execution is unconfigured, report that evidence
448
+ lane separately instead of moving its unbounded work into a change gate.
449
+ - If required compiler, reducer, sanitizer, emulator, remote, or linker execution is unconfigured,
450
+ stop at source review, fixtures, and a manual evidence plan.
451
+
452
+ <!-- mustflow-section: output-format -->
453
+ ## Output Format
454
+
455
+ - Compiler claim, expected semantics, defect class, and exact oracle
456
+ - Reproduction universe and definedness decision
457
+ - Pipeline boundaries, last good stage, first bad stage, and pass trace
458
+ - Source, IR or MIR, input, option, target, link, environment, and probability reduction result
459
+ - Verifier, analysis-preservation, CFG, SSA, borrow, dataflow, and translation-validation evidence
460
+ - IR layer, lowering, effect, identity, canonical-form, phi, edge, and pass-pipeline evidence
461
+ - Ownership-token, borrow-flow, lifetime, provenance, fact-generation, metadata-transition, staged-
462
+ verifier, and semantic-refinement evidence
463
+ - Diagnostic structure, source mapping, recovery, fix-it, and determinism evidence
464
+ - ABI, layout, unwind, object, symbol-table, archive-selection, section-reachability, relocation,
465
+ visibility, export/import, static/dynamic resolution, linker, binary-compatibility, and target evidence
466
+ - Runtime/public/debug/unwind/source symbol assets, binary identity, stripping, DCE, ICF, LTO,
467
+ crash-capture, symbol-store, source-retrieval, and symbolication-canary evidence
468
+ - Regression artifacts and earliest-stage classification
469
+ - Test ladder, oracle classes, feature-interaction grid, corpus ownership, activation coverage,
470
+ determinism perturbations, and change-gate, periodic, canary, or release lane decisions
471
+ - Differential lineage, option and tier lattice, canonical outcome, input-vector, property,
472
+ metamorphic-relation, generator, shrinker, relation-graph, and replay evidence
473
+ - Files changed
474
+ - Configured command intents run
475
+ - Missing or skipped compiler, target, reducer, fuzz, and validation evidence
476
+ - Remaining semantic, stage-isolation, undefinedness, oracle, generator, corpus, determinism,
477
+ diagnostic, ABI, or cross-target risk