inkphp GitHub 中文

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

DesignEffect
URL = file pathno route table to search
params() / allow() / require_login() at the topwhat a page accepts and who may use it is visible at a glance
nothing implicitno hidden middleware or guard files to misjudge
no shared fragments between pageschanging one page never breaks another
plain parameterized SQLno ORM dialect to learn
bin/ink checkthe agent finds its own mistakes: missing CSRF, unprotected admin pages, wrong declarations