How to prompt AI coding agents
Direct the agent like a junior engineer: architecture first, scoped tasks, review every diff.
Plain English
Don't ask 'build me the app'. Ask: 'here is the schema, the existing files, the convention, the constraint. Add one feature. Show me the plan first.' Approve the plan. Then ask for the implementation. Then read the diff line by line.
Treat the agent like a contractor: blueprints first, walkthroughs after each phase, sign off before the next.
Bad: 'make the calendar work'. Good: 'Add a month calendar view at /events/:id/calendar. Read tasks via existing useQuery. One file per component. Show plan first.'
Bad: 'add Telegram support'. Good: 'Add a Telegram channel reader. Schema already has agentify_conversations with channel enum. Add a new edge function that receives webhook, parses, writes a message row. Plan first.'
Go deeper
Architecture → small task → review.
Common mistakes
- Letting the agent invent architecture.
- Accepting code you can't read.
- Letting the agent silence errors instead of fixing them.
AI-agent trap
Summary
Always provide: relevant files, existing conventions, the data shape, what to NOT touch. Ask for a plan before code. Reject 'any' and '@ts-ignore'. Demand small commits.