For agents, on top of README.md, which they read first.

Notes for agents

Test storage code against testD1(), not a hand-written fake. A fake store only checks that the Worker called it; testD1() runs the SQL, so a typo, a missing index column or a violated CHECK fails the test. Each call is a fresh database.

It implements what the Worker uses, not all of D1. prepare().bind() with run(), all(), first(), raw(), plus batch() (one transaction) and exec(). When your code needs another method, add it here rather than faking around it.