Chapter 6. Best Practices for Working with an AI Agent
1.1 Why Clear Instructions Matter An AI Agent "reasons" — but it also "guesses" When an instruction is vague, an AI Agent fills in the gaps itself and proceeds with the task. A person would ask "ho...

Source: DEV Community
1.1 Why Clear Instructions Matter An AI Agent "reasons" — but it also "guesses" When an instruction is vague, an AI Agent fills in the gaps itself and proceeds with the task. A person would ask "how should I handle this?" — but an AI Agent decides on the most plausible interpretation and executes it. This is both its strength and its risk. [Vague instruction] > Build a login feature [AI Agent's interpretation — the user has no idea] • Framework? → assumes React + Express • Authentication? → assumes JWT • DB? → assumes SQLite • Password encryption? → assumes bcrypt • Social login? → assumes none → Result: works, but built on a tech stack you didn't intend [Clear instruction] > Build a login API using NestJS + Passport.js. > - Auth: JWT-based, with refresh token > - DB: PostgreSQL + Prisma > - Password: argon2 hashing > - Social login excluded from this stage → Result: built exactly as intended "Make it good" is not an instruction Telling an AI Agent to "do it well," "d