Set up
Install the binary. It is one file for Linux and macOS.
$ curl -fsSL adam.sobaniec.com/todoer/install.sh | bash
todoer uses your git email to know who you are. Make sure that git has it:
$ git config user.email
[email protected]
In each project, write the agent skill once and commit it. Claude Code, Codex and Cursor read it, so your agent knows the workflow below. Run it outside a git repository to write the skill in your home folder, for all projects.
$ cd ~/code/my-project
$ todoer skill --init
wrote .agents/skills/todoer/SKILL.md (Codex, Cursor)
wrote .claude/skills/todoer/SKILL.md (Claude Code, Cursor)
The workflow
In this example, you work on main in ~/code/my-project. The same steps work on any branch.
1
Add todos
you
Add a todo with a name and the text. The text can also come on stdin.
$ todoer add fix-the-login-crash "Steps to reproduce: sign in with an expired token."
.todoer/todos/fix-the-login-crash.md
$ todoer add add-rate-limiting "Do this after fix-the-login-crash."
$ todoer show add-rate-limiting
add-rate-limiting
file: .todoer/todos/add-rate-limiting.md
pr: none
Do this after fix-the-login-crash.
No commit. Commit the todos yourself.
2
Implement in a worktree
agent
youImplement fix-the-login-crash in a worktree.
The agent makes a new branch from your branch in a git worktree, or uses the worktree of its tool. Your checkout does not change. The agent implements the todos and runs the checks of the project. Then it runs todoer done in the worktree and commits the work with the removed todo file.
$ git worktree add -b fix-login ../my-project-fix-login main
# the agent writes the code
$ todoer done fix-the-login-crash
done: fix-the-login-crash
$ git add -A && git commit -m "Fix the login crash"
You can give one todo or a list of todos in one request. One pull request can do many todos. A new todo that the agent adds in the worktree also goes into the pull request.
3
Submit into your branch
agent
youSubmit a pull request into main.
The agent runs one command in your checkout, on main. --branch names the branch of the work.
$ cd ~/code/my-project
$ todoer pr submit --branch fix-login -n fix-the-login-crash -m "Use the retry constant."
submitted fix-the-login-crash: 1 commit, 3 files, from fix-login into main
todos: fix-the-login-crash
the pull request is not committed - to share it, run: git add -A .todoer/prs/fix-the-login-crash && git commit -m "todoer: submit fix-the-login-crash" -- .todoer/prs/fix-the-login-crash
No commit. The pull request is in the working tree of main. Commit it with the command that todoer printed. It does not need the branch of the agent: you can remove that worktree and branch.
- The patch has every commit since
--branch started from your branch: the commits after the merge base. The patch also holds the changes in .todoer/, except the folder of the pull request itself.
- todoer squashes these commits into one commit in
pr.patch. The author is you. The message is todoer: merge fix-the-login-crash.
- The submit stops when the worktree of
--branch has changes that are not committed.
-n gives the name. It is necessary: todoer does not make a name.
- The todos of the pull request are the todos that the patch removes. The submit prints them.
- The submit goes into the branch that is checked out. See a pull request into another branch.
4
Review
you + agent
youExplain the pull request fix-the-login-crash.
Review in your checkout, where the pull request is. Talk with an agent about the change. Tell it which comments to add.
youOn line 2 of src/auth.rs, ask for a test of the retry path.
$ todoer pr ls
fix-the-login-crash no comments fix-login [email protected]
$ todoer pr show fix-the-login-crash --summary
$ todoer pr show fix-the-login-crash src/auth.rs
$ todoer pr comment fix-the-login-crash src/auth.rs:2 "Add a test for the retry path."
added the comment c1 on src/auth.rs:2 in fix-the-login-crash
A comment can target a line (src/auth.rs:2), lines (src/auth.rs:1-3), a removed line (src/auth.rs:old:2), a file, a folder (src/) or the whole pull request (no target). You can also read the review alone with todoer pr show <pr>. It prints the summary and the diff of all the files, with the comments.
pr comment writes review.md and does not commit it. When the review is done, commit it, or ask the agent to:
$ git add .todoer/prs/fix-the-login-crash/review.md
$ git commit -m "Review fix-the-login-crash" -- .todoer/prs/fix-the-login-crash/review.md
There is no approve and no request for changes. If the pull request is good,
merge it. If it needs changes, commit the review and give it to an agent.
5
Update
agent
youDo the review of fix-the-login-crash and update the pull request.
This can be a new agent. It reads the review in your checkout. Then it makes a new worktree and a new branch from main with its own tool, and applies the pull request with pr apply. The branch of the first work is not necessary. It does the comments and commits. Then it updates the pull request from your checkout:
$ todoer pr show fix-the-login-crash
$ git worktree add -b fix-login-2 ../my-project-fix-login-2 main
$ cd ../my-project-fix-login-2
$ todoer pr apply fix-the-login-crash
applied fix-the-login-crash to the working tree of fix-login-2 - not committed
done: fix-the-login-crash
# the agent does the comments and commits
$ cd ~/code/my-project
$ todoer pr submit --branch fix-login-2 -n fix-the-login-crash --update -m "Use the retry constant. Add a test."
updated fix-the-login-crash: 2 commits squashed to 1, 3 files, from fix-login-2 into main
todos: fix-the-login-crash
removed the review (1 comment) - git history keeps it
the pull request is not committed - to share it, run: git add -A .todoer/prs/fix-the-login-crash && git commit -m "todoer: update fix-the-login-crash" -- .todoer/prs/fix-the-login-crash
No commit. The patch is new and the review is empty. Commit the update, then review again from step 4, or merge.
- Without
--update, a submit does not change an open pull request. It stops and names -n <pr> --update.
--update writes the whole pull request again, as for a new one. -m replaces the description. Without -m, the update copies the old description and says so.
-n <pr> --update finds the pull request by its name, so the branch of the update can have any name.
- The pull request and the review must be committed on
main, so that the new worktree has them.
- When
main moved after the base of the pull request, pr apply can write conflict markers. The agent resolves them, runs git add and commits.
- The new
base is the commit where the new branch starts. Thus the update moves the pull request forward on main.
6
Merge
you
On your branch, merge the pull request with pr apply --merge. A merge is the approval, and it closes the pull request.
$ todoer pr apply fix-the-login-crash --merge
merged fix-the-login-crash into main
done: fix-the-login-crash
the merge is staged and not committed - to commit it, run: git commit -m "todoer: merge fix-the-login-crash"
$ git commit -m "todoer: merge fix-the-login-crash"
You commit: todoer: merge fix-the-login-crash, one commit with the changes of the pull request. It also removes the pull request folder and its todos. git history keeps them.
- The merge applies the patch with
git apply --3way, and stages the changes. The commits of the work stay only on the branch of the agent.
- The merge removes the todos of the pull request by name. Thus an edit of the todo on your branch does not stop the merge.
- The merge stops while the review has a comment.
- When the patch does not apply, nothing changes. Ask an agent to update the pull request, as in step 5:
pr apply on a new branch from your branch, resolve the conflicts, commit and submit with --update.
- Stage nothing else before a merge: the commit takes all the staged changes.
- Without
--merge, pr apply is for follow-up work: it puts the changes in the working tree and the pull request stays open. See Run or continue a pull request.
- To drop a pull request, run
todoer pr close <pr>. The todos stay.
Other cases
A pull request into another branch
A pull request always goes into the branch that is checked out. To submit the work of fix-login into feature-x, check out feature-x first:
$ git switch feature-x
$ todoer pr submit --branch fix-login -n fix-the-login-crash
submitted fix-the-login-crash: 1 commit, 3 files, from fix-login into feature-x
Make sure that the work starts from feature-x. The patch has every commit of fix-login after the merge base with the current branch.
Run or continue a pull request of another person
You see a pull request on main. To run its code, or to change it, make a new branch from main and apply the patch. Without --merge, apply does not commit, and the pull request stays open:
$ git switch -c try-login-fix
$ todoer pr apply fix-the-login-crash
applied fix-the-login-crash to the working tree of try-login-fix - not committed
to update the pull request, commit your changes, then run in the checkout of the branch that the pull request goes into: todoer pr submit --branch try-login-fix -n fix-the-login-crash --update -m "<what you changed>"
To update the pull request, commit your changes. Then check out main and run the command that apply printed. -n finds the pull request, so the name of your branch is not important.
When main moved after the base of the pull request and a change conflicts, apply writes conflict markers and names the files. Resolve the conflicts, run git add on the files and commit. The update replaces the pull request, and its new base is the commit where your branch starts.
A feature branch with its own todos
A feature branch can hold its own todos. Agents work on branches of the feature branch, and their pull requests go into it. Then submit the feature branch into main:
$ git switch main
$ todoer pr submit --branch feature-x -n feature-x
submitted feature-x: 6 commits squashed to 1, 14 files, from feature-x into main
todos: fix-the-login-crash
The patch carries every change of the feature branch in .todoer/: the todos that its merges removed, the todos that it added, and its open pull requests. After the merge, main has the same todos as feature-x. Merge or close the pull requests of feature-x first, unless they must move to main.
Finish a todo without a pull request
$ todoer done fix-the-login-crash
done removes the file. It does not commit. To drop a todo, use done too.
See which areas a pull request changes
Name the areas of the code in .todoer/areas, one per line. The patterns use the gitignore rules. The last pattern that matches a path wins.
$ cat .todoer/areas
security: /src/api/auth
tests: /tests
e2e-tests: /tests/e2e
unit-tests: *.test.js
$ todoer pr show add-rate-limiting --summary
...
areas
security 2 files +48 -6
e2e-tests 1 file +31 -0
unit-tests 1 file +22 -0
(no area) 1 file +4 -1
The summary shows each area that the pull request changes, with the number of files and lines. A pattern with no /, such as *.test.js, matches the file name in each folder. To review only some areas, give their names with -a. To hide some areas, give their names with -x:
$ todoer pr show add-rate-limiting -a security,e2e-tests
$ todoer pr show add-rate-limiting -x e2e-tests,unit-tests
pr show --summary takes -a and -x too.
All your projects
Outside a git repository, todoer ls lists the todos of each project in the current folder and in its subfolders, for example in ~/code. Above the todos of a project, it shows the path of the project and the branch that is checked out there. todoer does not look into a linked worktree.
$ cd ~/code && todoer ls
todoer main
fix-login
work/api feat/rate-limit
add-rate-limit pr: rate-limit
Only ls reads many projects. To use another command, go to the folder of the project.