guidelines: four lessons from auditing a production agent fleet - #26
Closed
pallaoro wants to merge 1 commit into
Closed
guidelines: four lessons from auditing a production agent fleet#26pallaoro wants to merge 1 commit into
pallaoro wants to merge 1 commit into
Conversation
…§6, §7) All four come from one debugging session on a live multi-agent system, where a customer-visible failure turned out to be three separate instances of the same shape: a correct rule that existed, was read, and wasn't followed. §4 — A test that has never failed is not a regression test. Writing the test after the fix is normal when the bug came from production, but a green test only proves the implementation does what it does. Revert the fix, watch it fail with the expected signature, restore. Anchor the assertion on the real failure so the next reader knows why the guard exists. §6 — The DRY test applies to rules, not just skills. An instruction duplicated across a prompt, a config and a skill is three copies that drift, and the agent can't tell which is current. In the session behind this, one banned construct was specified in three places that disagreed. When a rule is being violated, count the copies before writing a clearer one. §6 — A rule that isn't enforced isn't a rule. If an instruction is written down, read in the very session that broke it, and still ignored, more prose won't help. Either something else contradicts it, or it needs a mechanical guard rather than a sentence. §6 — Examples outrank rules; audit them against each other. The observed cause of the above: a document banned a construct in a rule near the bottom while demonstrating it 44 times in the examples above. The examples won. Hard rules go before examples, and every example gets checked against the rule it illustrates. §7 — A working copy is a cache, not the source. Refresh before reasoning about repo state. A local clone goes stale silently, faster when platform tooling commits on your behalf, and reporting a stale snapshot as current produces a confident answer about a file nobody has. Regenerated the six fanned-out rule files; `npm run check-sync` passes.
Member
Author
|
Closing: this was a misread on my part. The ask was to update the installed plugin, not to propose guideline changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four additions to the guidelines, all from a single debugging session on a live multi-agent system. Worth stating the common shape up front, because it's what makes them worth adding: a customer-visible failure turned out to be three separate instances of the same problem — a correct rule that existed, was read in the same session, and wasn't followed. None of them was a missing rule.
§4 — A test that has never failed is not a regression test
Writing the test after the fix is the normal order when the bug came from production, but a green test proves only that the implementation does what it does. Revert the fix, watch it fail with the signature you expect, restore.
In the session behind this, doing exactly that turned 7 passing tests into 5 failures — the headline one reproducing the incident's signature verbatim. Without that step I'd have shipped tests that asserted my own implementation.
§6 — The DRY test applies to rules, not just skills
An instruction duplicated across a prompt, a config file and a skill is three copies that drift, and the agent reading all three can't tell which is current. One banned construct in that system was specified in three places that disagreed with each other, including one that endorsed the opposite. When a rule is being violated, the first move is to count the copies — not to write a clearer one.
§6 — A rule that isn't enforced isn't a rule
If an instruction is written down, read in the very session that broke it, and still ignored, more prose won't change that. Either something else the agent reads contradicts it, or it needs a mechanical guard instead of a sentence.
§6 — Examples outrank rules; audit them against each other
The observed cause of the above. A skill banned a construct in a rule near the bottom of an 18KB file while demonstrating it 44 times in the examples above — including inside the "good examples" it told the agent to emulate. The examples won, because they're concrete. Hard rules go before examples, and every example gets checked against the rule it illustrates.
§7 — A working copy is a cache, not the source
Refresh before reasoning about repo state. A local clone goes stale silently, and faster when platform tooling commits on your behalf. I read a three-days-stale clone during that session and reported its contents as current — a confident, well-grounded answer about a file nobody had anymore.
Mechanics:
CLAUDE.mdis the source; rannpm run buildto regenerate the six fanned-out rule files.npm run check-sync(what CI runs) passes, and all four additions verified present in each of the six copies.Scope note: these are sub-rules inside existing principles, not new principles, so the README's "Seven Principles" table and detail sections stay accurate and are untouched. Say the word if you'd rather the detail sections mention the new material too.