Type-Safety Pass
Tighten the types of a module — eliminate any/implicit-any, add precise annotations, narrow unions, and make illegal states unrepresentable — without changing runtime behavior. Audits FIRST to inventory every loose type, unsafe cast, and missing annotation, then replaces them with precise types, then a reviewer confirms the type-checker is clean under strict settings and behavior is unchanged. Covers killing any, strict null checks, discriminated unions, generics, type narrowing, removing unsafe casts, and compile-clean-under-strict verification.
How it runs
| # | Step | Who runs it | What happens |
|---|---|---|---|
| 1 | Audit the types | Developer | inventory every any, cast, and missing annotation |
| 2 | Fix the types | Developer | replace loose types with precise ones |
| 3 | Verify type safety | Reviewer | confirm strict-clean and behavior unchanged |
| 4 | Evaluate | Reviewer | Grade the deliverable against every acceptance criterion. All pass → finish; any fail → loop back and fix the gap. |
| 5 | Finish | Developer | All acceptance criteria met. Stamp a short summary and report DONE. |
Say something like "tighten the types" or "kill any types" or "add type annotations" or "make this type-safe" or "fix type errors" in chat to start it.