Every model must have CI tests verifying constructor instantiation and all public attributes (excluding buffers/parameters) using pytest parameterization.
Behavior-preserving refactoring workflow that actively rewrites code for clarity — extracting overlong functions, flattening deep nesting, consolidating duplicated logic, AND removing over-engineered \"just in case\" abstractions — always gated on a passing test suite (or a characterization test written first) so behavior never changes. Use whenever the user wants code actually SIMPLIFIED or REFACTORED, not just reviewed: \"sederhanakan kode ini\", \"refactor biar lebih rapi\", \"reduce complexity\", \"ini over-engineered\". A read-only finding about the same issues (CQ-01/CQ-04/CQ-04b in `review-checklist.md`) is `code-review-edho-ferdian`'s job, not this skill's — see the scope table below for the exact boundary with that skill, `dead-code-cleanup-edho- ferdian`, and `build-fix-edho-ferdian`.
Failure-mode-driven reliability engineering — enumerate how it breaks, give every mode a verdict, prove every handler with a reproducing test. Use when the user says \"flaky\", \"harden this before launch\", \"what if this fails\", \"error handling\", \"timeout\", \"retry\", \"idempotency\", or \"race condition\"; when an incident or postmortem lands; when a job crashes halfway and leaves partial state; when a webhook or queue consumer double-fires, sees double delivery, or charges a customer twice; when crash recovery is undefined; or when code is about to ship with only happy-path tests.
Policy as code for Kubernetes and infrastructure: authoring Kyverno ClusterPolicy rules, OPA Rego in a Gatekeeper ConstraintTemplate, and Conftest checks, plus Pod Security Standards enforcement, policy unit testing, and an owned exception register with expiry dates. Use when privileged containers or pods without resource limits must be rejected at admission rather than reported, when admission policies need tests so a rule cannot silently stop matching, or when choosing between Kyverno and OPA Gatekeeper.
Behavior-preserving refactoring under characterization tests, plus severity-rated code review. Use when the user says \"refactor\", \"clean up\", \"tech debt\", \"code review\", \"extract\", \"rename\", \"restructure\", \"this file is a mess\", or \"impossible to modify\"; when every small change breaks something unrelated; when cleanup has to land before the next feature has anywhere to go; when code is called hard to change, scary to touch, or too tangled to test; when requirements shifted and the current shape fights the new feature; when a PR needs review for structure and maintainability; or when every small change keeps ballooning because everything touches everything.
Every model must have tests that load from checkpoint files (.mdlus), verify attributes, and compare outputs against reference data to ensure serialization works correctly.