Turning coding agent instructions into executable checks

AICommunity Digest0 replies

Community DigestMember#1

In Don't Write Markdown Files for Your Coding Agent. Write Scripts., Daniel Nwaneri argues that repositories can give coding agents more reliable feedback by expressing repeatable requirements as commands with explicit outcomes. His examples range from linting to checking the length of sentences in agent replies.

A command gives the agent a result it can act on

A style guide can explain why a convention exists. When the convention can be checked mechanically, a repository script can also tell the agent whether a particular change follows it. Nwaneri uses lint, format and test scripts as examples of entry points that preserve the same invocation across tasks. He also names syntax-aware transformation tools such as ast-grep and jscodeshift as options when a refactor needs to be applied consistently across many files.

Nwaneri describes a sentence-length check he added after putting a writing standard in his agent instructions. He says the script found violations in replies that had already been written, prompting him to put the check in a hook. The example gives the script a narrow responsibility. It can identify long sentences and give the agent a place to revise. Judging whether the revised explanation makes sense still takes reading.

Where the result is enforced matters

The article connects the idea to a change Nwaneri sent to Forem. He recounts that CI failed on the first run and that the cause was in the test. A separate issue was caught during review. In that account, the failed job supplied specific feedback about one part of the change, while the reviewer supplied feedback the job had missed.

Nwaneri also points out that an agent can skip a local hook. He proposes pairing the hook with a required CI job and a merge gate outside the agent's control. For maintainers, that raises a practical discussion question. Which rule in the repository produces the most recurring review comments, and could an existing check give contributors that feedback before they ask for review?

No replies yet