The Next Generation of Bill Drafting
December 23, 2023


Drafting tools for bills have evolved from basic green-screen text editors with early markup in the 1980s to XML-based editors in the early 2000s. Now, the third generation of tools leverages modern technologies and standards to go beyond basic publishing by enhancing information processing, building upon previous achievements.
Modern Source of Record
Laws are arguably the most important documents any country, state, or providence has – they establish the framework for the rule of law. As the foundation for a civil society, laws are long lived. Few documents last longer. However, laws are also dynamic documents, changing constantly. At the same time, the integrity of the documents that comprise the law is an absolute requirement.
Documents of such importance are typically printed on a long-lived archival grade media and securely stored at a remote location. As a result, these documents are out of reach. A digital equivalent of this information is necessary – in a form that ensures the integrity of the data and yet provides the facilities for modern information processing.
Such a system is known as a source of record and refers to a reliable and authoritative system that is considered the primary reference for certain information or transactions within an organization. A system or record contains more than just the text of the documents; it contains all the information relating to that text including the document structure, interrelationships, versions, historical notations, and metadata relating to the lifecycle of the information.
A system of record is an information database. While securing the information, it must provide the facilities to update and query the information. For federal law in the USA, the format for this information is USLM and the query language is XQuery. For law in the EU, the format is Akoma Ntoso. Both information formats are closely related and interoperable. Every provision must be addressable, every relationship explorable, and all related metadata discoverable.
Scalability is an important consideration. While the U.S. Code (as an example) is a smallish collection of very large documents, there is also a need to store a vast number of much smaller documents such as amendments along with everything in-between.
Why We Draft in XML
XML has become the preferred medium for legislation and law for many reasons. As laws are long lived documents where the representation is enacted as law, it is crucial that a long lasting and transparent representation be chosen. In the case of the US federal government, this representation is USLM – a semantic model designed to meet the needs of legislative information and the process that creates it. Unlike proprietary tool-centric models, USLM requires that tools adapt to it and the process rituals behind it rather than that the documents and process adapt to the tools.
In the era of paper, fonts and print media were chosen to ensure the accuracy and longevity of the text. While these requirements have lessened in the digital era, those concerns still exist in a different form. A digital copy is always a faithful reproduction of original data, but only when that copy is a one-for-one copy. Translation always creates the possibility for error. Different types of translation have different error rates which must be mitigated. Translating from one well-defined semantic representation to another has a minimum of error risk. However, translating from a non-semantic to a semantic model requires the application of heuristics, which can cause errors. The way to mitigate errors is by using precious time to proofread or verify the result.
We believe that the best way to ensure the integrity and accuracy of legislation is to draft legislation in the same format that it will be stored and processed downstream. While word processors are ubiquitous, hijacking the application used for office correspondence to do double duty as a structured document editor introduces unnecessary complexities and errors which hinder the processability of the information through the legislative process.
Modern Collaboration
A collaborative drafting tool is quite different from the legislative drafting tools employed today. It must be a distributed solution that can be used by drafters having a wide range of skills. While first generation drafting tools were used exclusively by keyboard operators skilled in the use of the application, this has gradually given way to use by attorneys whose primary skill is in understanding the law and how to draft legislation to affect it. Now, this third generation of tool moves the focus of drafting towards drafters less skilled in the intricacies of the law and how to correctly amend it.
A collaborative drafting tool must empower this new category of drafter to produce a quality of work that minimizes the rework that is necessary by the legislative. This drafting tool must provide the drafter and the stakeholders they are working with accurate insight into the law, better visualization of the changes to be made, and ways to communicate, categorize, and annotate change. In short, a collaborative tool must support the collaborative process rather than just drafting of the result.
This tool should provide the ease-of-use of a word processor without compromising the ability to accurately process the information downstream. Access to the law in a standard form is a must. The use of cut and paste or drag and drop should minimize the need to reenter text. Metadata should store the data’s provenance.
The need to collaborate does not end with bill introduction – the tool needs to support the entire process. Proposing amendments against a version of the bill, preferably in a way that conveys the intent clearly and then expedites later engrossing should be a capability of the system.
Research Tools
AI capabilities provide many new opportunities for innovation. However, it is our belief that the task of writing law should be left in the hands of people qualified to do that. It should be the role of AI to empower and improve the job of the person tasked with writing legislation. To this end, AI tools can be used to gain better visualization and insights into the existing law and prior legislation, successful or not, by integrating sources to provide the historical context of change and potential impact.
External Interoperability
Given the wide variety of stakeholders participating in the legislative process, it’s unlikely that they can all have access to the drafting system. For this reason, there needs to be a way to export information in a variety of ways including XML+CSS, HTML, DOCX, and PDF. There also needs to be a way to ingest external data despite the limitations that come with non-semantic formats. This is accomplished via a rules-based engine that teases out the semantic structure from the text.
Modern Amending Styles
A drafting solution must support the process of drafting legislation rather than just the writing of the final document. There are many steps towards the final draft, and then many more if amendments are to be proposed. The process of mapping policy changes is complex and can become quite cumbersome as the stakeholders debate and discuss the changes. Supporting this messy process, while ensuring that the result is information that is useful downstream is the goal.
There are two prevailing approaches to amending, each with their own benefits and drawbacks. It should be the goal of the drafting tool to harness the best of both of these approaches.
Traditional Amending – aka Cut and Bite Amending
Traditional amending, also known as cut and bite amending, is the most common approach to amending. It involves making amending instructions that cut out portions of the original text and replace them with new language or provisions. This approach is almost universally used when creating bill amendments, sometimes referred to as page-and-line amendments that propose amendments to pending legislation. In many jurisdictions around the world this approach is also used to propose changes to the law itself, except that the references are to provisions rather than page and line number.
Traditional amending is used because it limits the scope of the changes, provides a good mechanism for enumerating and identifying individual changes, and can limit conflicts with other legislation. When the rules governing legislative process have a weak germaneness or single subject rule, this approach can also discourage unwelcome amendments by other parties.
However, traditional amending has some drawbacks. While it is suitable as the result of the drafting process, it can be very difficult to manage during the process of defining the set of changes to propose, resulting in documents that must be redrafted from scratch as decisions are changed.
Amending in Full
Another approach to amending, found at the State level in the US, is known as amending in full. Instead of making piecemeal changes to specific parts of the text, amending in full involves substituting the entire content of a provision, usually a section, with new content. Changes are often indicated using a strike and insert notation.
Amending in full has many benefits. When used with change markings, the context for the change becomes clearer. During the early stages of drafting, the amending in full approach is easier to manage compared to traditional amending. Also, these amendments can be easier to execute as the affected provision is simply replaced with the new text after the changes have been accepted.
However, there are drawbacks. Amending in full works best when the body of law has been written for this approach, and the sections are sized for the task. Having to restate large and complex sections when making a minor change is cumbersome while narrowing the scope of the amendment to a lower level removes the context which is so beneficial. Also, to ward off unwelcome amendments, a strong single subject rule is needed.
Amendment Generation with Change Sets
A bill drafting system should take the best of both these approaches and meld them together to provide a holistic solution. Whether the amendments are expressed as cut and bite amendments or as amendments in full, it has the same result. It is the means of expressing those changes that differ.
When cut and bite amendments are required, it is possible to generate those amendments from the changes recorded in an amendment in full document. This is known as amendment generation, whereby an amendment document is drawn from information found in another document.
Our solution goes beyond the basic capability by integrating with the change set technology that allows changes to be organized, categorized, and related. This means, for example, that consequential changes can be tied back to specific primary changes being made.
Comparative Print and Duality
While amendment generation provides a way to go from amending in full to cut and bite amendments, we also possess the technology, known as comparative print, to go the other way – from cut and bite to amendments in full, revealing the hidden context for the changes. Not only is this method useful to members wishing to better understand the amendments being proposed, but it also has other uses as well. By essentially pre-executing amendments, it becomes possible to update statute compilations in a somewhat automated manner.
With the technology to go between different amending representations, it has become possible to offer a document duality whereby both representations can be used to draft legislation. The choice of which to use can be made based on the need with the other representation just a click away.
Modern Technologies
Our approach involves leveraging an XML database storage system for efficient querying, using a web-based technology stack, implementing distributed technologies for enhanced scalability, employing Docker or Kubernetes for efficient containerization, adopting a microservices architecture to promote modularity and flexibility, and prioritizing the use of non-proprietary technologies.
With a task of this magnitude, it is important to implement it in stages that lead to the implementation of a central vision. Otherwise, the risks and unforeseen discoveries can quickly overwhelm the project, threatening its viability. While most of the underpinnings necessary to build out this vision are already built, there is much work to be done. Our approach is to divide the project into smaller undertakings which are implemented according to an Agile methodology.