InkRoundtrip demo: green ticks on the correct steps and a red circle on the wrong line

I revise for exams by writing proofs and derivations by hand on an iPad. What I wanted was a tutor looking over my shoulder: circle the line where it goes wrong, tick the steps that are right, leave a short hint beside the mistake.

My coding agent can already read images. The missing piece was letting it answer on the page instead of in a chat window. So I built a small bridge and open-sourced it: InkRoundtrip.

How it works

  • You write on the iPad, either in a web board in Safari or in a native PencilKit app.
  • Each page is saved to a tiny Python server on your Mac (standard library only, protected by a pairing code).
  • Your agent (I use Claude Code; Codex works the same way) reads the page as a PNG and runs annotate.py to draw circles, arrows, ticks and short notes at pixel coordinates.
  • A few seconds later the marks appear on the iPad, on their own layer. They never touch your ink.
  • Every batch of marks remembers which version of the page it was for. Edit the page and the app labels the marks as old.

Why same-page feedback

Pasting a screenshot into a chat and reading a long answer back breaks the flow: you have to map the answer back onto your own working. A red circle on the exact line does that for you. It also keeps you doing the work: the agent marks, you fix.

Try it

git clone https://github.com/PDGGK/InkRoundtrip.git cd InkRoundtrip python3 server.py --lan 

Open the printed link in Safari on your iPad, or on your Mac with ?mouse=1 to draw with the trackpad. Copy skills/inkroundtrip into your agent's skills folder and ask it to check your page.

It's an early developer preview: Mac only, one writer per page, plain HTTP on your local network. The interface is in English and Chinese.

Repo: https://github.com/PDGGK/InkRoundtrip

Feedback, issues and ideas are very welcome, especially on making setup easier.