LSPR's Blog Symposium on “Rules as Code”

Rules as code, the rule of law, and the problem of complex legislation


Lisa Burton Crawford*


This article examines the relationship between rules as code, legislative complexity, and the rule of law. While acknowledging scholarly concerns that machine-readable legislation may compromise important legal values like practical reasoning and discretionary judgment, the author argues that rules as code offers a pragmatic solution to pressing challenges posed by the increasing complexity of modern legislation. The article contends that legislation has already become so complex and prescriptive that few can engage with it in the idealized way traditional legal scholars envision. Through analysis of automated government systems and their role in communicating legal information to the public, the author suggests that rules as code could help ensure these systems generate more accurate information about legal rights and obligations—thereby supporting the rule of law principle that legislation should be reasonably knowable to citizens. The article also explores how rules as code could assist legislators in better understanding and crafting complex legislation. While defending rules as code as a practical response to current realities, the article ultimately raises deeper questions about whether the volume and complexity of modern legislation is itself problematic for constitutional governance.

  The idea of writing legislation in ‘machine readable’ form challenges an ideal that I think many public lawyers attach to legislation. Legislation is supposed to be the careful product of democratically elected representatives, crafted to reflect their reasoned view of what the law should be and why. It has always been written by human beings, to be read and implemented by human beings, and so we assume that law-makers should bring to bear all the power and nuance of human language in order to create a law well-calibrated to its chosen end. Leading scholars have explored the various values this might serve. Waldron, for example, argues that legislation that calls upon its subjects to exercise their powers of practical agency when interpreting and applying it for themselves is not only more likely to sensibly achieve its relevant goal (noting the inability of legislatures to perfectly prescribe rules in advance) but properly respect the moral agency of that subject, inculcating good skills of practical reason (see especially chapters 1 and 3). Hildebrandt and Diver, in their work on rules as code, argue that legislation driven by the capabilities of natural language rather than code necessarily allows for adaptivity and discretion at the point of application, ensuring the law does not over or underreach; for Diver, this guards against a dangerous kind of legalism in which people apply the law as automatons rather than questioning what it asks of them at every turn.

This is powerful and important scholarship.  And yet, I have written elsewhere in defence of rules as code — albeit cautiously. My view is that rules as code is a plausible solution to a pressing rule of law problem: that is, the complexity of legislation. That is in large part, because I think some existing criticisms of the rules as code movement from a rule of law perspective are misplaced. The following draws upon my previously published work on legislative complexity, the rule of law and rules as code, as well as an article co-authored with Janina Boughey and forthcoming in Public Law about the use of automated systems to generate information about the law.My starting point is a fairly pessimistic one. The ship has sailed: legislation is now so voluminous and complex that few if any engage with it in the careful and critical way that scholars like Waldron, Hildebrandt and Diver assume. That kind of engagement has been made impossible for various reasons. One is that every day, people are confronted by numerous overlapping statutes, the existence of which may be unknown to them and their  meaning too difficult for them to reasonably ascertain. Another is that, because of the complexity of the primary material, people tend to learn about legislation through interfaces and proxies. Administrators at the coal-face rely on internally generated policies and decision-making guides. The public comes to learn (if at all) about legislation through automated systems, about which I will say more in a moment. Yet another is that legislation is already far more prescriptive than many theorists assume, leaving less room for discretion than they suppose. Indeed, leading rule of law scholars (like Matthew Waddington, and Andrew Mowbray, Philip Chung and Graham Greenleaf) suggest that in some jurisdictions a lot of legislation already looks rather like code. It is the crushing technical detail – the complicated ‘if, then’ structures – that make it so hard to navigate and detail, not the use of open-ended standards. This clarifies what is at stake if we were to embrace rules as code, and strive to design more legislation in a way that is machine readable. My answer is, less than is commonly assumed.

I said above that people rely on automated systems to learn about legislation and understand how it affects their legal position. It is also notorious that governments around the world are increasingly using or at least experimenting with automated systems to actually execute the law. One of the main asserted benefits of rules as code is that it can help make these systems more accurate, because the primary material is more conducive to coding. To that, we could add that it reduces the possibility that coders will gloss legislation, because it does not include all the details they need or otherwise requires interpretive choices to be made in order to build an automated system that generates useful results — which I assume is a problem, given these coders lack constitutional authority and accountability. Some might think we allow the tail to wag the dog, by striving to make legislation more code-like to facilitate the use of these automated systems; that the automated systems themselves are something to be feared. In response, I make one relatively small but important point, about the value of automated systems to generate information about legislation.

It has long been said that legislation ought to be knowable: accessible, comprehensible, and so forth. This is often described as an essential element of the rule of law. But this orthodox position is ‘dogged by a puzzle’: that in many legal systems, the law has become so voluminous and complex that few know its content. Rather than admit that the rule of law has been compromised, some scholars take legislative complexity as a provocation to rethink what the rule of law requires—and conclude that, for various reasons, the rule of law can prevail even if legislation is not reasonably knowable to the people. Vincent Chiao, for example, has argued that the rule of law can still prevail even if people cannot reasonably obtain ex ante knowledge of what the law requires of them, provided they can still contest its application to them ex post. Decades earlier, Edward Rubin argued that people only need to know primary rules of conduct, and therefore need not know the content of most contemporary statutes, which tend to create executive agencies and then empower them, rather than create rules that the public must obey. While he wrote before the proliferation of automated systems, Rubin also argued that even if people need to know the law, this does not require knowable legislative texts: that there are other, better ways that people can obtain the knowledge that they need to plan their lives within the law.

Once again, these are powerful arguments. But I think there are compelling reasons why legislation should be reasonably knowable, which stand even once we consider the form and function that legislation now plays in contemporary administrative states. Moreover, the problems that unknowable legislation poses cannot easily be solved by other means. I set my reasons out at length elsewhere,but in outline they are as follows. Knowledge of a broad range of statutes is required in order to enable people to plan their lives in a way that befits the nature of the legal system in which they live, even if those statutes do not create rules of conduct backed up by sanction. Legislation that is not reasonably knowable is likely to generate the same sense of alienation and lack of trust in the law and lawmakers that animated rule of law theorists like Lon Fuller, even though they tended to only write about “rules”. And it simply may not achieve its purpose, in the same way that an unknowable rule may not work: how, for instance, is a person to take advantage of a social security benefit meticulously prescribed in legislation, if they cannot reasonably know that the benefit exists, whether they are eligible, and what steps they need to take in order to obtain it? Contestation after the fact would not help; it simply does not serve the same purposes that ex ante knowledge does. And encouraging people to rely upon other’s advice about the law — particularly the advice of the executive branch — is inconsistent with a fundamental public law principle in many common law legal systems (and now, following the overruling of Chevron deference, Rubin’s US): that the meaning of legislation, independently interpreted by the court, is legally binding.

This leads me to my final point, and what I think is the best defence of legislative complexity against the patent rule of law problem it seems to pose, and returns me to the central issue of rules as code. That is, that there are other, better ways of assisting people to understand how legislation may affect their legal position, besides striving to draft legislative texts in a way that is comprehensible to the general public.

It is sometimes suggested that lawyers can provide that assistance, but I think that is implausible. Legal advice is notoriously expensive, and more so when the law is complex; encounters with the law are so numerous and often individually ”low stakes” that few rational people would seek legal advice each and every time they happen. The observable reality is that people tend to learn about legislation from the executive branch — just as Rubin argued that they ought to. They rely on the information and advice that the people implementing the legislation have to offer. But rather than providing that information in an ‘information sheet’, the executive now tends provide automated systems that the public can use to obtain individualised information, based on a serious of inputs about their particular situation. For example, there is a system in Australia that generates information about which social security payments a user is entitled to, and a system in the UK that generates information about whether a person is permitted to import certain goods from the EU. A survey by Janina Boughey and I, forthcoming in Public Law, revealed tens of such systems in place in Australia and the United Kingdom, generating advice about everything from tax to social security to business licensing schemes.

We argue that that the information generated by these automated systems is likely to be treated by the public as “the law”. That can work to the public’s detriment given that in many common law legal systems, information of this kind carries little if any legal weight: it is the legislation as independently interpreted by the courts that will determine their legal position. Clear disclaimers could solve this problem (and most systems we looked at already included one), but pose new ones, because information which is plainly presented as unreliable is not very helpful. An automated system that generates information about the law, but manages to successfully communicate that the information cannot be relied upon or encourages the user to obtain expert legal advice, does not effectively meet the public need for knowledge about the law. This would raise questions about whether it is worthwhile expending public resources to build and maintain these systems, and potentially return us to square one: the problem, of how to meet the rule of law need of making legislation reasonably knowable to the people.

Governments could, alternatively, take steps to ensure that people can rely upon the information generated by automated systems—for example, by stipulating that the executive is bound by that information in certain situations. That approach is already taken in some contexts, like the tax ruling systems in place in Australia and the UK (an excellent overview of which can be found in Stephen Daly’s book, Tax Authority Advice and the Public). But it is not clear whether it could be applied at scale to all automated information systems, noting that it is also unclear how many people use these systems and whether there are any records kept of the information that they generate. The larger question is whether it is at all desirable to take the kind of approach seen in the tax ruling systems mainstream. That would be a significant departure from constitutional orthodoxy: that the executive is subordinate to legislation made by Parliament, as interpreted by the courts.

The best solution to this issue, therefore, may be simply to strive for accuracy. And this is where a rules as code approach to designing legislation could be of greatest assistance. If the underlying legislation is “code-like”, lacking features that are difficult to translate into machine-readable form without making significant interpretive choices, then it is more likely that the code will in turn generate accurate results, and that the public can safely rely upon the information so created. This will not solve all problems. Another would be the risk of
“user error”, which is inherent in a system which places the onus on the individual to generate their own advice. But at least, the risk of legislative meaning being lost or distorted in translation would be reduced (on this point, see further my contribution with Lyria Bennett Moses and Janina Boughey to this collection).

I have spoken so far about the public, as one of the most important users of legislation, and the way that rules as code may help to solve the rule of law problem of making legislation reasonably knowable to the people. But in closing I want to also highlight another group of people, the capacities of which are significantly strained by the complexity of contemporary legislation. That is, legislatures themselves. Recall at the outset, our ideal of a world in which legislators make carefully reasoned choices about how and why to change the law; that the legislation they enact accurately enshrines those choices. We seem to have strayed very far from that ideal, because it is doubtful that legislators can or do read or understand all the complex legislation that they enact. In examining this issue, the work of rules as code scholars like Matthew Waddington is invaluable: it shows, in a careful and nuanced way, how a modest rules as code approach could help law-makers and law-drafters to understand the proposals before them, and craft texts that accurately achieve their intended goals without under reach or overreach or entirely unexpected consequences. But this work, like mine, is what I would call a “real-world” defence of rules as code: given the reality that governments want to pursue such complex policy objectives through legislation, let us carefully consider the way that rules as code could help. But should governments be legislating in his way at all? If this volume and complexity of legislation leaves constitutional actors quite incapable of performing their basic functions without the assistance of automated systems, should the scale of legislation itself be scaled back or its style radically altered? These are, I think, the biggest questions that the rise of rules as code raises.


* Lisa Burton Crawford is Professor of Public and Constitutional Law at the University of Sydney. She has expertise in constitutional law, administrative law and statutory interpretation, and much of her work focuses on the intersection between these areas of doctrine, along with legal theory. Her current research focuses on the complexity of legislation in contemporary legal systems and its implications for public law institutions and values.