Lesson 8.1Lesson 8.1 · Building & Governing the Rules
Translating Law to Logic
Turning a clause of prose regulation into executable logic is not a clerical transcription - it is an act of interpretation, full of choices and quiet losses, and getting it wrong means the checker runs confidently against the wrong rule
A regulation is a paragraph of prose. Executable logic is a precise rule with no room for doubt. Getting from one to the other is not typing - it is deciding what the law means.
It is tempting to picture encoding a regulation as a clerical job: read the clause, type the equivalent rule, done. If that were true, rules-as-code would be almost risk-free - a faithful copy of the law in a form a computer can run. But sit with a single real clause and the illusion collapses. 'Habitable rooms shall be adequately ventilated.' 'The travel distance to an exit shall not be unreasonably long.' Even a clause that looks quantitative - 'corridors shall be of adequate width for the occupant load served' - hides a table lookup, a definition of occupant load, an edge case for mixed uses, and a word, 'adequate', that a human decides. To turn any of these into logic a machine can run, someone must decide exactly what it means, which numbers apply, which exceptions survive, and what to do when the clause is silent.
That someone is making interpretive choices - and every choice can be right, wrong, or genuinely contested. This is the uncomfortable heart of rules-as-code: encoding is interpretation, not transcription. The encoded rule is a reading of the law, authored by a person with their own assumptions, and it can diverge from what the regulation actually requires, from what the authority would decide, and from what another competent encoder would have written. When that encoded rule is then run automatically against thousands of designs, the interpretation is silently applied at scale - fast, consistent and, if it is wrong, confidently and consistently wrong. This lesson is about taking that seriously: seeing the choices and losses inside a clause, asking who has the authority to decide them, and holding on to the rule that the authoritative regulation is always the actual law, never its encoded shadow.
Prose clause -> (choices: adequate? exceptions? scope? silence?) -> encoded logic. The encoding is a READING, authored and dated. Wrong reading = confidently checking the wrong rule. The law is authoritative.
Encoding is interpretation, not transcription
Start by killing the comfortable metaphor. Encoding a regulation is not like photocopying it into a new format; it is like translating a poem into another language - the meaning has to be re-expressed, and something is always chosen and something is always at risk of being lost. A clause of building regulation is written in natural language, for humans, to be read with professional judgement and in context. Executable logic is the opposite: precise, literal, context-free, and unforgiving of ambiguity. Bridging that gap forces a series of decisions that the prose never made explicit.
Consider a clause as ordinary as 'every habitable room shall have a window of adequate area for light and ventilation'. To run it, an encoder must answer questions the sentence leaves open. What counts as a habitable room here - is a large kitchen included? What is 'adequate' - ten percent of floor area, a daylight-factor threshold, or something else? Does area mean glazed area or opening area? What about a room lit by a shaft or a skylight? Does a borrowed-light arrangement qualify? Each answer is a choice. Write it one way and a design passes; write it another and the same design fails. The prose tolerated this ambiguity because a human reader resolves it with judgement; the code cannot, so the encoder resolves it in advance, once, for everyone the rule will ever touch.
This is why 'translating law to logic' deserves the word translation. A good translator is faithful but must still decide; a careless one distorts. The encoder is choosing a single interpretation from a space of defensible readings and freezing it into a rule that will be applied mechanically and at scale. That is powerful when the choice is sound and the clause is genuinely quantitative. It is dangerous when the clause is judgement-laden and the choice is presented as if it were the law itself. The competent stance is to treat every encoded rule as an interpretation that carries an author, an assumption and a date - and to keep asking whether that reading still matches the actual regulation, which remains the only authoritative source.
The choices and the losses inside a clause
If encoding is interpretation, it helps to name exactly where the choices and losses hide, because they are not random - they cluster in predictable places. Learn to spot them and you can tell a safe encoding from a risky one.
The first is judgement-laden language. Words like 'adequate', 'suitable', 'reasonable', 'sufficient' and 'appropriate' are doing real work in the law: they let a human weigh context. To encode them you must replace the judgement with a fixed proxy - usually a number - and that proxy is a choice, not the rule. The second is defined terms and scope: which rooms count as habitable, which buildings as assembly occupancy, which routes as means of egress. Get the scope wrong and the rule checks the wrong elements. The third is exceptions and provisos - the 'except where', 'unless', 'subject to' clauses that qualify the main rule. These are easy to drop when simplifying a clause into clean logic, and dropping them makes the encoded rule stricter or looser than the law. The fourth is thresholds and tables: the exact number, and the exact conditions under which each number applies, often scattered across tables, footnotes and cross-references that must be assembled correctly. The fifth is silence and conflict: what the clause does not say, and how it reconciles with another clause that points the other way - which the encoder must decide even though the law left it to interpretation.
Each of these is a place where meaning can leak out between the prose and the logic. Sometimes the loss is harmless simplification; sometimes it changes the outcome. A dropped proviso can fail a compliant design; a mis-set threshold can pass a non-compliant one; a mis-scoped term can check corridors that were never meant to be corridors. And crucially, the leak is invisible at run time - the checker reports a confident pass or fail with no hint that the underlying reading was contestable. This is why reading the encoded rule back against the source clause, proviso by proviso, is not pedantry but the core quality discipline of the field. The authoritative rule is the clause as written; the encoding is only as trustworthy as its fidelity to it.
Who decides the interpretation - and on whose authority
If every encoded rule embeds an interpretive choice, the sharp question is: who gets to make it, and does their choice carry any authority? This is a governance problem, not a technical one, and rules-as-code often gets it backwards - the choice is made quietly by whoever happens to write the code, and then applied to everyone as if it were settled law.
Think about who could be doing the encoding. It might be a software vendor's engineer with no legal standing, working from a reading of a code they did not write. It might be a domain consultant hired by that vendor. It might be the regulator itself, encoding its own rules - the strongest case, because then the interpretation carries the authority of the body that made the rule. It might be an open community of practitioners. These are very different in legitimacy. When the regulator publishes an authoritative encoding alongside the prose, the interpretation has standing and can be relied on more safely. When a private vendor encodes a public rule in a black box, the interpretation has no legal authority at all - it is one company's opinion, applied at scale, and a design that 'passes' has satisfied that opinion, not the law.
This matters because interpretation is exactly the work the law assigns to accountable humans: the professional of record who must certify the design, and the approving authority who must decide compliance. An encoded rule cannot inherit their authority just by being run on a computer. So the honest position is layered. Where a rule is clean and quantitative and the encoding is faithful, the interpretation is low-stakes and the tool is a genuine help. Where the encoding embeds a contestable reading of a judgement-laden or conflicting clause, that reading must be visible, attributable and open to challenge - and it never displaces the authority's own interpretation. In India, where byelaws are adapted locally and interpreted by the sanctioning authority, this is acute: an encoded reading of a setback or use-classification rule is a convenience for the designer, but the local body's interpretation of its own byelaw governs. Ask, always: whose reading is this, what is it based on, and who actually has the authority to decide? Defer the binding interpretation to the professional, the authority and the law.
A wrong or contested encoding is a real hazard
It would be easy to treat all this as philosophy. It is not - a wrong or contested encoding is a concrete way for automated compliance to cause harm, and the mechanism is worth stating plainly. An encoded rule is applied mechanically, at scale, and with an air of authority. If the reading behind it is wrong, every design it touches is checked against the wrong rule, and the error is delivered as a confident pass or fail that discourages a second look. Automation bias does the rest: a green tick is trusted, a red flag is fixed to, and few users go back to the source clause to check whether the encoded reading was even correct.
The failure modes are two-sided and both are bad. A too-strict encoding - a dropped exception, a proxy number set high, a scope drawn too wide - fails designs that actually comply, wasting effort, forcing needless changes, and quietly teaching designers to distrust and route around the tool. A too-lenient encoding - a missing condition, a threshold set low, an exception invented - passes designs that do not comply, which is worse, because it manufactures false confidence about safety-relevant matters like egress, fire separation or accessibility, and the miss may surface only when something goes wrong in the real building. A contested encoding is different again: it may be neither clearly right nor clearly wrong, but it resolves a genuine ambiguity one way and then hides that it made a choice - so a design's fate turns on an unexamined reading no one agreed to.
The defences are not exotic, but they must be deliberate. Keep the encoded rule traceable to the exact source clause, so any result can be checked back against the law. Make interpretive choices explicit and reviewable rather than buried in code. Prefer to flag genuinely judgement-laden clauses for human decision instead of forcing a false number. Version and date every rule so you know which reading was applied. And treat every automated result as provisional evidence, not a verdict - the design actually complies only when the accountable professional and the approving authority say so, measured against the real regulation. The encoded rule is a fast, fallible reading; the law is the rule. Never let the shadow stand in for the thing.
Encoding = interpretation
What an encoded rule really is
Turning prose into logic forces choices about ambiguous terms, exceptions, thresholds and silences. The encoded rule is an authored reading, not a neutral copy. Modules 2.4, 3.1, 9.2.
The law is authoritative
Encoded rule versus real regulation
The binding rule is always the actual code, byelaw or law - NBC India, local byelaws/DCR, IS standards - never its encoded version, which may embed a wrong or contested reading. Modules 3.4, 8.2.
Whose interpretation
Authority behind the encoding
Only the regulator's own encoding carries legal standing; a vendor's reading is one opinion applied at scale. The professional of record and the authority hold the binding interpretation. Modules 8.3, 8.4.
Traceability discipline
Guarding against wrong encodings
Keep every encoded rule traceable to its source clause, make interpretive choices explicit and reviewable, and flag judgement-laden clauses for humans rather than forcing a false number. Modules 5.4, 9.3.
Workshop - encode one real clause three ways and expose the choices
The fastest way to feel that encoding is interpretation is to encode the same clause more than once and watch it disagree with itself. In this workshop you take a single real building rule and write it as logic in a few defensible ways, then surface exactly which choices drove the differences.
Just one real clause and a notebook - no software. This workshop is about seeing the choices and losses by hand; the authoritative interpretation of any rule remains with the qualified professional, the approving authority and the actual regulation.
Goal: see the interpretive choices hidden inside one clause Inputs: one real, slightly ambiguous building rule + a notebook Time: ~45 minutes
- 1Pick one real clause that is not purely numeric - something with a word like 'adequate' or an exception, e.g. a light-and-ventilation, corridor-width, or habitable-room rule from a byelaw or the NBC.
- 2List the open questions: write down every thing the clause does NOT pin down - undefined terms, the meaning of any judgement word, missing conditions, exceptions, what happens when it is silent.
- 3Write three encodings: express the rule as plain-language machine logic three defensible ways (e.g. a strict proxy, a generous proxy, and a 'flag for human review' version), noting the model data each needs.
- 4Test them on a case: invent one borderline design and run all three encodings by hand - record where they agree and where they reach different pass/fail results.
- 5Reflect as reasoning: for each disagreement name the exact choice that caused it, say who should have the authority to make that choice, and note how you would keep the encoding traceable to the source clause - flagged as reasoning, not a compliance determination.
You’ll walk away with
A one-page study: one clause, its open questions, three plain-language encodings, a borderline case run through each, and a reflection naming the interpretive choices, who should decide them, and how the law stays authoritative. Framed as reasoning - binding interpretation stays with the professional, the authority and the code.
Three altitudes on the same idea
Read the band that fits you — or all three.
When you rely on an automated check, you are relying on someone else's reading of the code - so treat every encoded rule as an interpretation with an author, and keep the source clause within reach. The practical discipline is to know, for the rules that matter to your project, what the tool actually encoded: which threshold, which exceptions, which scope. A clean quantitative check (a setback distance, a ramp slope, a required count) is usually a faithful reading you can lean on for early feedback and self-checking. A check on anything with a judgement word in it - 'adequate', 'suitable' - is a proxy the encoder chose, and you should read its result as a prompt to think, not a verdict. When a result surprises you, go back to the actual clause rather than trusting or dismissing the tick. You remain the professional of record: the encoded rule does not carry your certification, and the authoritative interpretation of any byelaw or code provision rests with you and the approving authority, against the law as written.
Interior rules are full of exactly the words that make encoding hard - an 'accessible' route, 'adequate' clear space, 'suitable' signage - so know where a checker gave you a real number and where it quietly chose one. For clean interior quantities (a door clear width, a corridor width, a turning-circle diameter, an exit count) the encoding is usually a faithful reading and a genuine early-warning help. But much of what an accessibility or fire clause is really asking - is this route usable, is this space truly adequate for the occupancy - has been compressed into a proxy the encoder picked, and a 'pass' means the design met that proxy, not that it met the intent. Read encoded results as prompts to apply your own judgement about real usability and safety, and when a result matters, check it against the actual accessibility standard or byelaw. Coordinate binding fire, egress and accessibility interpretation with the qualified professionals, the authority and the governing code - the encoded rule is a convenience, not the standard.
This lesson is the conceptual crux of the whole field: encoding a regulation is an act of interpretation, and understanding that separates someone who is genuinely compliance-literate from someone dazzled by the demo. Learn to look inside a clause and see the choices - the judgement words that must become proxies, the exceptions that can be dropped, the thresholds and tables that must be assembled, the silences that must be resolved. Learn that two competent people can encode the same clause differently and both be defensible, which is why 'the computer checked it' is never the end of the argument. And learn the governance question that follows: whoever encodes a public rule is making an interpretation, and only the regulator's own encoding carries real authority - a vendor's reading is one opinion applied at scale. Carry the discipline that the authoritative rule is always the actual law, never its encoded version, and that the human professional and the authority hold the interpretation. It is a rigorous idea that rewards careful thinking.
“Encoding a regulation as code is basically transcription - you read the clause and write the equivalent rule, so the encoded version is just a faithful, neutral copy of the law in a machine-readable form. There is nothing to interpret; the rule is the rule.”
Do it yourself
No software needed - reason it through.
- 1Explain why encoding a regulation is interpretation rather than transcription, with one concrete example.
- 2Name four places inside a clause where interpretive choices or losses tend to hide.
- 3Why can a 'contested' encoding be neither clearly right nor wrong yet still be a hazard?
- 4Who could be doing the encoding, and whose encoding actually carries authority - and why?
- 5Give one too-strict and one too-lenient encoding failure, and say why the too-lenient one is usually worse.
The one line to carry out
Peer-reviewed journals & authoritative standards
- 01Statutory interpretation — Wikipedia - Statutory interpretation, 2026.
- 02Rules as code — Wikipedia - Rules as code, 2026.
- 03Formal specification — Wikipedia - Formal specification, 2026.
- 04Computational law — Wikipedia - Computational law, 2026.
- 05Decision table — Wikipedia - Decision table, 2026.
An encoded rule is a reading of the law at a moment in time - but the law does not stand still. Codes and byelaws are amended constantly and vary across thousands of local bodies, so even a perfect encoding goes stale. Next: keeping rules current.
The author
Amogh N P
Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.
More about Amogh →