| name | ts-to-python-port |
| description | Use this skill when migrating a TypeScript subsystem to Python while preserving external behavior, control flow, and edge cases. |
This is a behavior-preserving port, not a rewrite.
Process:
- identify subsystem boundaries
- map TS inputs, outputs, state, side effects, and async semantics
- identify hidden dependencies
- define Python module layout
- port incrementally
- preserve error semantics where externally observable
- add parity tests
- document known drift
Rules:
- preserve observable behavior over stylistic purity
- preserve edge cases unless explicitly removed and documented
- preserve async/cancellation semantics where they affect turn behavior
- preserve serialization and persistence formats unless a migration path is implemented
Preferred outputs:
- Python modules with clear adapters
- boundary models
- tests comparing TS traces vs Python traces