--- name: code-comments description: Use while implementing or reviewing edge cases, failure paths, or unexpected behavior to document the non-obvious constraints in code. Also use when asked to add or improve code comments. --- # Code comments When implementing edge cases, failure paths, or unexpected behavior, always document why that code was written. - Use the codebase's terms in plain English. - Skip comments when a clear name or small code change makes the behavior obvious. - Do not restate conditions, narrate the PR or conversation, or describe behavior that has not been verified.