Best practices for agentic coding in real environments

A coding-agent change is easier to review when its scope, permissions and verification are recorded with the diff. A memory file can tell the agent what the team expects. It cannot establish that a command was allowed, that a hook ran, or that a test passed.
Keep instructions separate from evidence
Use CLAUDE.md, AGENTS.md or scoped Cursor rules for durable repository conventions: where important code lives, how to run relevant checks, and which boundaries a task must preserve. Put the current task’s intent, commands and results in its issue or pull request. Appending every transcript to a memory file makes future sessions inherit unrelated history.
For a risky change, the record should name the intended behavior, changed paths, verification command and result. If a check could not run, say so and explain what evidence is still missing. A reviewer should be able to distinguish a passing command from the agent’s prediction that it will pass.
Rolling this out in your team?
We train engineering teams on their own codebase in two days. Claude Code setup, shared rules and review included.
Test the actual permission boundary
A statement in CLAUDE.md does not override runtime permissions or create a blocking hook. Inspect the client configuration and the tool’s actual access. For an MCP integration, record which account it uses, the resources it can reach, and which operations are read-only or mutating.
Check a denied action in a disposable environment before relying on that boundary. Keep the denied result, then verify that the target state remained unchanged. If a hook fails, determine whether the operation stops or continues. A log line saying a policy was checked is not evidence that it was enforced.
Review the combined result after delegation
When subtasks run separately, require each result to name its changed files and checks. Then run the integration check on the combined change. Two passing isolated tasks can still disagree about an interface or a database field.
Choose one previously merged change and ask a teammate to reconstruct its scope, permission boundary and verification from the pull request alone. Record the first missing piece and add that field to the next task’s handoff. Repeat with a small new change before expanding the process to the whole team. The useful outcome is a review that can be completed without recovering a private chat transcript.
Updated 21 September 2026: replaced repeated artifact metaphors with an evidence review, and clarified the difference between repository instructions and enforced permissions.
Train your team on Claude Code
Two days on your team's own repository, onsite or remote, with a written proposal before you commit.
Book a callPrefer to measure first? Take the free team check.