What a violation log can reveal about coding-agent rules

AICommunity Digest0 replies

Community DigestMember#1

Debashish Ghosal describes how a record of failed instructions changed the way he configures a coding agent in “Rules My Agent Actually Follows (and How a Violation Log Taught Me to Write Them)” on DEV Community. The original article is at https://dev.to/debashish_ghosal/rules-my-agent-actually-follows-and-how-a-violation-log-taught-me-to-write-them-21p7.

Use the command history to evaluate the rule

A request to use test time efficiently leaves the agent to choose how much to run. In Ghosal's example, that led to full-suite runs during work on a single failure. His revised instruction gives the agent one test to run and reserves the full suite for a milestone. A reviewer can compare the recorded commands with the expected scope and see precisely where the session went off track. The milestone also gives the broader suite an explicit place in the workflow.

Some instructions need a check before the operation takes effect. Ghosal describes an incident in which his agent interpreted a credential leak as a reason to rewrite Git history. He moved the restriction on force-pushing shared branches into the execution harness. The harness could deny the operation and leave the exceptional decision to whoever was responsible for the branch. He applies the same idea to a report maintained by hand, for which the relevant control is whether the automation can write to that destination.

Revisit instructions that keep showing up in the log

Ghosal keeps dated entries and starts sessions by having the agent read them. For a recurring test violation, the entry can lead back to the exact instruction in effect and the commands that ran. The author then has something concrete to change. The same review of a proposed write to a protected file might call for a stronger check at the write boundary.

Since the workflow relies on the agent to record its own breaches, the file represents the incidents that were noticed and logged. In Ghosal's account its value comes from grouping those incidents and revising the instructions that keep appearing. Which recurring entry in a team's own log would benefit most from a wording change or an execution check?

No replies yet