How to Write Auth Specs That Stop AI Coding Agents From Guessing Permissions
A common PRD mistake is describing authentication in a single line, leaving an AI coding agent to fill gaps with insecure defaults like one all-powerful admin role and non-expiring sessions. The article argues that every skipped decision about roles, sessions, and permissions becomes a guess the agent makes in production. It recommends a permission matrix that explicitly defines what each role can and cannot do, including the "No" cells. It also stresses explicit session rules, such as sign-in methods, expiry behavior, multi-device handling, and how work is preserved when a session expires. Checkable acceptance criteria, written as given-when-then statements, are presented as a way to verify that these rules are actually enforced.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in