Codex Mekara Refactor Plan for Behavior-Preserving Commits
Plan a Mekara refactor with a current architecture, target shape, invariants and independently mergeable phases.
中文Install in Codex
Open Mekara in Codex with the target code and test suite. Follow the repository's design document standard.
- Review `.agents/skills/plan-refactor/SKILL.md` and its requirements at the pinned GitHub commit.
- Create `.agents/skills/plan-refactor/` in your project and save the reviewed file as `.agents/skills/plan-refactor/SKILL.md`.
- Start Codex from that project's root, then type `$plan-refactor` and select the matching skill.
Example task
Draft a two-phase plan to split the report renderer.
{"module":"report renderer","pain":"formatting mixed with output","invariant":"same output bytes","steps":2}What to check
First extract and test the formatting logic. Then migrate call sites and remove the replaced implementation. Require `same output bytes` after each step and present a plan for review.
Original SKILL.md on GitHub · Updated
Frequently asked question
Can phase one keep a temporary wrapper?
Remove replaced code in the same commit. Adjust phase boundaries so replacement and cleanup can land together.