AI assistants
AI assistants learned Dotpress 1 more than Dotpress 2: without the documentation, they tend to write code for the old API. This site gives them the documentation of Dotpress 2 in Markdown, a format they read better than web pages, following the llms.txt convention.
The files
The files follow the documentation: they are rebuilt with the site, for the current version.
Give the documentation to an assistant
- In a conversation, give the URL of the index along with your request: "Read https://dotpress.dev/llms.txt, then add a route that…". The assistant must be able to read web pages.
- In your editor, if it can index a documentation site, add
https://dotpress.dev/llms.txtorhttps://dotpress.dev/llms-full.txtto its sources. - In your project, write the rule in the instructions file that your assistant reads at the root of the repository (
AGENTS.md,CLAUDE.md, or the file of your tool):
AGENTS.md
What to check in generated code
- The version. Imports come from
@dotpress/coreand an adapter, never fromdotpress. During the beta,@dotpress/authis installed with thebetatag: without it, npm installs the plugin of Dotpress 1 (see Installation). - Errors are returned. A handler returns
notFoundError(); it does not throw it (see Returned errors). - No generics. Types come from the schemas and the path:
defineRoute<…>()is a sign of an invented API (see End-to-end typing). - The tests. An app is tested in memory, with
@dotpress/testing(see Testing): ask the assistant for the tests of what it writes, and run them.