Explain the task
Describe the user need, current behavior, intended result, constraints, and what must not change.
Use AI to investigate, implement, and test changes. Keep scope, review, and release decisions with the engineering team.
Coding agents can trace behavior, edit files, and run tests. They can also spread a mistaken assumption across a feature.
Let the agent investigate and implement. Keep architecture, security, deployment authority, and the decision to ship with the team.
Specify the expected behavior and how it will be checked.
Describe the user need, current behavior, intended result, constraints, and what must not change.
Give it room to trace the relevant code, data flow, tests, and conventions before it proposes a change.
Keep the first change small enough to understand, review, test, and reverse without guesswork.
Name the test cases, build checks, screenshots, performance limits, or observable behavior that will count as done.
Check product intent, architecture, correctness, security, failure behavior, and maintainability. Passing tests are necessary, not sufficient.
Run the application, exercise representative cases, and inspect the result where users and operators will encounter it.
Describe the required behavior, constraints, and checks without prescribing every line of code.
Outcome What should the user be able to do? Current behavior What happens now, including the failing or expensive path? Constraints What architecture, interfaces, data, security rules, and scope limits matter? Acceptance Which examples, tests, builds, screenshots, and manual checks prove the result? Delivery Inspect first. Explain the approach. Make the smallest complete change. Run the checks. Report risks and anything left unresolved.
Persistent instructions should contain the things an agent cannot safely infer from reading the code.
OpenAI recommends lean, nonrepetitive coding-agent prompts with explicit test expectations and acceptance criteria. Anthropic similarly recommends concise project instructions, specific context, and verification criteria. OpenAI model guidance Claude Code best practices
Check the requirement, design, behavior, security, and release path.
Does the change solve the right user problem and preserve the behavior that matters?
Does it fit existing boundaries, ownership, data flow, and dependencies without creating hidden coupling?
Do representative, edge, failure, concurrency, and recovery cases behave as intended?
Are inputs, permissions, secrets, dependencies, logs, and destructive operations handled deliberately?
Can the team deploy, observe, debug, roll back, and maintain it after the coding session ends?
Watch for these problems during implementation and review.
The agent solves a plausible problem instead of the actual one. Add the user, scenario, constraints, and acceptance criteria.
A large diff becomes hard to reason about and easy to approve casually. Split work by behavior or system boundary.
Long, repeated rule files dilute the important constraints. Keep persistent guidance short, specific, and maintained.
New tests may confirm the implementation rather than the requirement. Start with representative behavior and failure cases.
The agent that wrote the code is biased toward its own approach. Use a fresh review pass for consequential changes.
Agents can run commands and alter files quickly. Limit credentials, protect production, and keep destructive actions explicit.
Use this as a final control, not as a substitute for understanding the diff.
A separate AI review can find issues the implementation pass missed, especially when it starts with fresh context and explicit review priorities. Automated review should complement deterministic tools and human review. GitHub’s own guidance notes that generated code and AI review can still miss defects, produce false positives, or introduce insecure suggestions.