Comment by 4l3x4f1sh3r

3 days ago

Preparation: Let it explore small parts of the code and ask it to write .md documentation. It will pick it up and read it later. Create an AGENTS.md file and put in your coding principles. Let it always update its documentation. Do that until the whole repo is in good shape.

Then for execution: Use plan mode. Let it always write a plan first, check it, correct it and only then allow it to implement it.

Try to break big tasks down in small substeps. As small as possible. Let it implement changes iteratively. Let it do a lot of local git commits. Both Codex and Claude Code use this as documentation as well.

Basically, treat it like a junior developer working under you.

Make sure appropriate tests are written for every code change.

It can be partly finished by /init command in OpenCode, or /init-deep with oh-my-openagent plugin used in OpenCode. /init-deep will create AGENTS.md in every sub folders so that can provide more details in project.