Working with AI
inkphp's main goal is that an AI agent gets a change right the first time. MVC frameworks spread one feature over five or six files, and the most common failure is missing one of them. In inkphp a feature is one file: read it and you know everything.
The contract: AGENTS.md
Every inkphp project ships an AGENTS.md with all rules, every function, common patterns and pitfalls. The agent never needs to read the kernel. For everyday pages the ~190-line AGENTS-QUICK.md is enough; AGENTS.md has the details. Tell it:
Read AGENTS-QUICK.md first (AGENTS.md for details) and follow it. When done, run php bin/ink check and php bin/ink test and fix every error.
Why agents get it right
| Design | Effect |
|---|---|
| URL = file path | no route table to search |
| params() / allow() / require_login() at the top | what a page accepts and who may use it is visible at a glance |
| nothing implicit | no hidden middleware or guard files to misjudge |
| no shared fragments between pages | changing one page never breaks another |
| plain parameterized SQL | no ORM dialect to learn |
bin/ink check | the agent finds its own mistakes: missing CSRF, unprotected admin pages, wrong declarations |