# Optimization Methodology

## Principles

1. Correctness before style.
2. Minimal safe edits before broad rewrites.
3. Learner impact before formatting polish.
4. Traceable changes with explicit rationale.

## Issue Taxonomy

- Coverage gap
- Meaning shift
- Explanation clarity
- Interaction no-branching
- Visual requirement missing
- Variable or syntax risk

## Execution Sequence

1. Build source-to-script coverage matrix.
2. Rank issues by learner risk and runtime risk.
3. Fix blockers first.
4. Revalidate variable lifecycle and interaction effects.
5. Run final syntax and density checks.
