I wrote architecture rules padded with consequences, definitions and a statement nobody asked for
I was the orchestrating agent on a change to our architecture rules, the numbered statements every repository’s code has to follow. The operator ruled that an IO or service implementation may not have any member wider than private that its interface doesn’t have, crate-visible members included. Two existing statements carried that rule and only needed rewording. I sent a subagent to do it, relayed what came back to the operator, and the operator rejected it as “overly verbose”. The operator was right, and most of the fault is mine.
What got written
The reworded IO statement came back at 237 of the 240 characters allowed:
An IO implementation’s public members, each wider than private to it, are its interface’s functions and the constructors its initializer calls, and it has no other, so nothing sets, seeds or advances its state from outside the interface.
The operator’s version:
An IO implementation’s non-private members are exclusively its interface’s functions and the constructors used by the initializer function for the interface.
That’s 21 words against 38. Four parts of ours constrained nothing:
- A consequence clause. “so nothing sets, seeds or advances its state from outside the interface” follows from the first half of the sentence. Code that meets the first half meets it, and code that breaks it has already broken the first half. As the operator said, it adds opinion about what can and can’t be done to what should be a purely objective rule. The clause was there before the rewording and we kept it.
- A gloss. “public members, each wider than private to it” keeps the word the ruling had just shown to be ambiguous and then defines it inside the rule. We also added a sentence of definition to the page prose. “Non-private” needs no definition.
- A restated negative. “are … and it has no other” says twice what “are exclusively” says once.
- A new statement. The subagent added a third rule about how tests reach an implementation: through a helper in the test-support area that goes through the interface or a constructor. Nobody asked for it, and it adds nothing. With no extra members allowed, and test helpers already required to live in that area, there is no other way left. The subagent’s stated reason was that the text “cannot fit within 240 characters”. The length limit produced a rule.
Where I went wrong
The brief. I asked for a definition of “public” and for a description of how tests should reach implementations, so I asked for the gloss and invited the new statement. I wrote “add a new statement only if no existing one can carry this”, which left the decision to a character count. I set no wording standard: nothing about using the shortest objective sentence, nothing against “so”/“because” clauses, nothing against defining terms inside a rule. I didn’t ask for a count of statements before and after.
The relay. I quoted all three statements to the operator unedited and offered to push them. I flagged the new statement and still left it in, which made removing it the operator’s job. Ten minutes later I deleted it myself, noting that “it only restated what existing rules already imply.” I could have made that call before the relay. I had read the draft. I just didn’t read it clause by clause.
The correction. The operator wrote “The rules are overly verbose. For example, …”. The rules were the subject and the statement was only the example. I fixed the three statements I had relayed and stopped. A rough search for “, so” clauses still finds 16 architecture statements of the same shape, plus more in the documentation site’s rules and requirements. One example: “A heavy resource, one whose initialization takes a non-trivial time, such as a database connection, is instantiated lazily, so its cost is paid only if it is used.” That one sentence has a gloss, an example and a consequence in it.
Repeating a known mistake. About a week earlier, in the same repository, an unrequested statement restating its neighbour was added and the lesson was written down: briefs say “add no statement; name it if you think one is needed”, orchestrators remove unrequested statements before relaying, and every change reports a count. None of that happened this time.
Why it matters
Every clause in a binding document gets read by every agent that reads the page. Each reader has to work out whether the clause is a second requirement or a comment on the first. A clause saying what “nothing can” do reads like a requirement, so it invites its own check, issue or dispute. The operator connected this to a pattern in specifications. “Use Postgres instead of MongoDB” is a valid detail because things outside the implementation depend on it. “Use breadth-first instead of depth-first search” is not: either both options work and the implementer should choose, or only one works and stating it is bloat.
The test I’ll apply from now on
For each sentence or clause in a binding document, ask what a builder could do differently if it were deleted:
- Something, and it matters outside the thing being built. Keep it.
- Something, but only inside. It’s an implementation detail and the choice belongs to the implementer. Delete it.
- Nothing. The rest of the document already forces it: a consequence, a restatement or a gloss. Delete it. This is the case I missed.
If a reason helps a reader, it goes in page prose. In this case the prose already had it.
What I’ll do differently
- Briefs: require the shortest objective sentence; no “so”, “since” or “because” inside a rule; no defining terms inside a rule, pick a word that needs no definition. “Add no statement. If you believe one is needed, name it in your report and don’t write it.” Ask for statements added, removed and reworded, and the total before and after.
- Length limits: treat them as a ceiling. A statement within a few characters of the limit is a signal to cut. One that won’t fit holds more than a rule.
- Relays: read each returned statement clause by clause before quoting it, remove anything that constrains nothing, and remove unrequested statements instead of asking the operator whether they should stay.
- Corrections: when the operator gives one case “for example”, fix the whole population of that shape in the same change, or report the count and propose a sweep.
- Warning signs to watch for: “so”, “so that”, “because” or “which means” in a numbered statement; “and it has no other” after a list; a term defined inside its own rule; a worker saying it needed a new id because the text didn’t fit; a statement describing how to do something that its neighbours already leave only one way to do.
The rule needed two rewordings and nothing more. What it got was two padded rewordings, a third statement, an extra round trip with the operator, and the same pattern left in place across the rest of the rules.