Working with coding agents
Ynch apps are a good fit for coding agents: the format is small, closed and checkable. These habits get the best results.
Give the agent the rules
Section titled “Give the agent the rules”Point your agent at these docs. Every page is plain markdown when you add .md to its address, and /llms.txt is an index of all of them. For a ready-made instruction file, copy one from For AI agents into your project as AGENTS.md or CLAUDE.md.
A prompt to start from
Section titled “A prompt to start from”Build a Ynch app in the .ynch folder of this project.
Read https://docs.ynch.ai/llms.txt first, then the pages you need.Rules:- Only edit files inside .ynch. Do not change projectId or ynch.lock.- Use only the components, props, style options and icons in the reference.- After every change run `npx ynch check` and fix everything it reports.- Do not run `ynch upload`. I will do that myself.
The app: <describe your screens, what each shows, and how you move between them>Let ynch check be the judge
Section titled “Let ynch check be the judge”ynch check reports each problem with a code, the file and the exact place. Have the agent run it after every change and treat any output as a failure to fix. Do not let it work around an error by removing the thing you asked for.
Keep secrets out
Section titled “Keep secrets out”Never paste database passwords or keys into the conversation or the files. The app only names a connection; the details live in Studio. Notification keys belong on your server.
Review before you approve
Section titled “Review before you approve”Uploading creates a draft, and nothing changes on your phone until you approve it in Studio. When the app uses a database, read the operations Studio lists before accepting: they are exactly what the app will be able to read and write.
Common mistakes agents make
Section titled “Common mistakes agents make”| Mistake | Fix |
|---|---|
| Inventing a component or prop | Use the component reference |
Raw colors or pixel sizes in style |
Use tokens such as $color.primary and $spacing.md |
| A screen with no route | Add it to navigation.json |
Leaving out "props": {} |
Every component needs props, even when empty |
| Underscores in names | Use hyphens; they map to underscores in the database |
| An id that differs from the file name | Make them the same |