When asked to write a plan, examine the existing plan file for any existing material (it may contain an outline or notes from the user, or a previous revision of the plan). Use the existing material as the foundation for your proposal.
Describe the specific code changes required concisely, with minimal surrounding prose. Design the code changes so that they can be implemented incrementally. Do not break up the changes too much: there should generally be two or three phases of work that logically go together, and can be stacked on each other.
Any new or changed interfaces in your planned code should be well-typed, self-documenting, and self-consistent with surrounding code. If there are existing naming conventions, follow them. If you're creating a new file that contains a single method, the filename should match the method name (following our kebab-case convention in ts/tsx and snake_case in py). Method, parameter, and field names should be terse-but-descriptive, idiomatic to the language, and consistent wi