Legalese 2.0

Software is eating law.

View project on GitHub
"These are really smart people,” said one lawyer who works with startups. “They believe in world-domination of the engineering class; everything can be reduced to an algorithm, and legal documents are not going to be spared."
TechCrunch, January 10 2015


Legalese's v1 early beta has supported over $1.4M in deal volume. We are now working on a more user-friendly v2.

Being an opensource project, Legalese welcomes contributions from developers, domain experts, and entrepreneurial engineers. Lurk on the announcements list or say hi on the discussion list.

The Vision

These articles survey the LegalTech space and point to the long-term vision of Legalese:

For Investors and Partners

adapted from correspondence with an unnamed Silicon Valley VC, 2016-05-11 is a LegalTech startup founded by a team of computer scientists and lawyers who are making it possible to develop legal applications the way programmers develop software. Our first product is a SaaS app that makes it easy for an entrepreneur to configure and engross all the paperwork required for an angel or seed round – not just term sheets but shareholders agreements, corporate resolutions and amendments, rights notices, and other prerequisites like ESOPs and vesting, all compiled automatically from high-level, structured expressions.

How is Legalese different from existing approaches like Clerky, Ironclad, Docracy, Commonform, and CommonAccord? Such initiatives tend to run aground on the shoals of English: their "logic" is templates, stitched together the way PHP stitches together HTML. Taking a cue from commercial successes like ContractExpress which use deeper formalisms (Prolog), Legalese is developing a domain-specific language from first principles. The DSL does for the deontic modal calculus what functional languages do for the lambda calculus. This solid foundation in CS theory enables the mapping of mature software concepts to the legal domain: compilation, dependency management, static analysis, and unit & integration testing.

Formal semantics makes it possible to automate the production of bilingual contracts (think Quebec, Indonesia, China, EU, etc), using natural language generation tools that operate in the opposite direction to the current trend of natural language processing (Judicata, Lex Machina). Legalese will also automate the drafting of paperwork in the growing "self-help" segment currently served by LegalZoom. Eventually Legalese may help states rewrite existing legislation and regulation in a formal grammar; such formalisms would make it much easier for companies like FiscalNote to achieve their goals.

What is Legalese's vision? Law today is where software was in the assembly era: getting ready to make the jump from macros to compiled languages. Tomorrow's lawyers will look a lot like today's programmers: drawing on opensource libraries, they will configure code for clients that compiles to readable contracts – maybe English, maybe Ethereum/Hyperledger. From that future, we will look back on today's lawyers, drafting agreements in Microsoft Word and checking references mandraulically, as white-collar successors to John Henry.

A "smart contracts" world needs Legalese more than ever: Because few lawyers have the coding skills to draft their own smart contracts, computer programmers would play a larger role, creating new liability questions for faulty algorithms and even ethical issues regarding the practice of law by non-lawyers. Conceivably, smart contracts could reduce some legal cost around contract execution and dispute resolution by making execution automatic. However, legal cost could shift from execution to the drafting phase. As Houman Shadab, a professor at New York Law School, has pointed out, “By requiring parties to strictly commit, at the outset, to decisions of a smart contract, the need for transactional attorneys and others to structure smart contractual relationships may increase. Parties would most likely want to specify a more detailed range of contingencies and outcomes ahead of time before committing themselves to abide by the decisions of a software-driven contract.” – Getting Smart: Contracts on the Blockchain, Institute of International Finance, 2016

Why now? Thirty years of academic research in deontic modal logic, contract formalization, static analysis, and language design are coming to fruition in papers like Tom Hvitved's PhD thesis (2013). Contracts are multiparadigmatic: they can be object-oriented, event-driven (reactive), functional, aspect-oriented, declarative, and imperative, all in the same document. Academic contract formalizations are just now beginning to satisfy the necessary properties for reduction to software practice.

Our first application of the above ideas can be found in a web app for founders to get their seed financings done.

Help, my startup needs legal agreements!

Most first-time visitors want simple templates in Word format that they can edit and show a lawyer friend.

Are you in the right place? Maybe not – if all you need is an NDA or an employment agreement, try one of these instead. Legalese is overkill for basic contracts, which are the corporate equivalent of a gist.

When should you use Legalese? When you're raising funds. Anything to do with investment or shares is more like a kernel patch. If you mess up, you might be breaking the law or you might just make other people very rich yet walk away with nothing.

The normal response to this level of FUD is to go talk to a lawyer. But startups aren't normal. They don't want to spend any money on lawyers. Is there a better way?

Opensource hackers are used to downloading, for free, entire stacks of abstractions which (with all due respect to lawyers), dwarf the complexity of any given contract or even any lawsuit. In the unlikely case that what you want doesn't exist, you can create it yourself and send a pull request! In the open paradigm, the answer to complexity is computation; the answer to repeating demand is scalable supply; and the default social dynamic is cooperation.

But the world of legal is still stuck in the 1980s. In the proprietary paradigm, the answer to complexity is human expertise, the answer to repeating demand is billable hours, and the default social dynamic is competition and conflict.

Legalese brings the open paradigm to law. Software is eating law – first we model corporations in software, then we put contract clauses in Github, and pretty soon the drafting of transactions starts to look a lot like writing code. Or, rather, downloading free code and configuring for your local situation. Just as programmers write an application once for a million end-users to play with, legal hackers will write a contract once for a million businesses to execute.

A handful of startups are in the game, focusing on investment workflows. Legalese is the opensource member of that family, created by hackers, for hackers, to help founders and investors configure and compile the "loadable modules" for startups: ESOPs, vesting schedules, convertible notes, and equity angel rounds are just another problem in algorithms and data structures.

Investment deals involve up to a dozen overlapping agreements. If you omit any one component, the entire patch may be void, or you might be in breach of a prior contract. For example, most companies define pro rata rights: any new investmenta greement requires sign-off from existing shareholders. If you issue new shares without consulting existing shareholders, you might be breaking the law. For fundraising deals, filling in random Word templates without thinking about the bigger picture is like whacking at a binary executable with a hex editor.

That's why we made Legalese. It produces complete, consistent, coordinated sets of documents that confidently move your company's state vector from A to B. We've gathered free early-stage fundraising agreements published by YC and 500 Startups, marked them up, and turned them into Legalese templates. You only have to fill in your details once, and we'll generate all the agreements that you need to get your seed, safe, or Series AA round going.

There are more startups outside the U.S. than inside, so we've also added an i18n layer to internationalize the agreements for jurisdictions like Singapore and India. All the templates are open-source, so if you don't find what you're looking for, send a pull request!

Of course, Legalese is not a substitute for qualified legal advice. You should read every word of every agreement you sign, and that includes the PDFs that Legalese produces. You should also show those PDFs to a lawyer for review. If you get substantive edits from your lawyer about the legal elements we produce, please submit a pull request so those changes can benefit future users. If your lawyer gives you business or commercial advice, you might want to consult our comparison of standard docs to find an alternative document that makes her happier.


These tutorials create PDFs that you can actually sign. On behalf of a company, you will create agreements of increasing complexity for execution by third-party signatories.

  1. the EULA
  2. Hello, World!
  3. Send for Signature!
  4. A Real Nondisclosure Agreement
  5. What Docsets Are Available?
  6. Generating Multiple Documents – from Incorporation to Seed Investment
  7. Developing Your Own Templates

Prior Art and Alternative Resources

Legalese comes with a bit of a learning curve. Before you dive in, check out the competition – a wave of entrepreneurs are busy trying to disrupt law, and Legalese has enormous respect for their work. If we didn't like the prior art, we wouldn't be eating it.

Law Online

Early Stage Investment Templates for Startups

Legalese is importing all of these agreements. After you configure your deal in a spreadsheet once, Legalese will compile all the agreements you need, automatically translated for your jurisdiction.

Workflow Solutions for Startups

Template Libraries for Startups

Generic Template Libraries and Legal Marketplaces

Education for Startups

Cap Tables

Other Tools for Startups and Investors

Document Generators by Law Firms

Document Generators and More by Non-Law Firms

Document Assembly for Law Firms and In-House Counsel

Open Clause Libraries

Other Legal Startups

About the #LegalTech startup scene generally

Legal Research

Github Repository

  • Ironsides open legal operating system for start-up companies
  • Common Form on Orrick's templates
  • Seriesnext a community revision of the Series Seed financing documents

Academic Research and Development

Smart Contract Implementations and Papers

Electronic Signatures and Contract Management

Contract Lifecycle Management:

Unauthorized Practice of Law

Wait, aren't a lot of these startups breaking the law? Well, maybe the law is broken.

Other Links and Lists

Wait, then how is Legalese different or better than all these resources?

Most of the resources above are document-oriented. Each template, for instance, gets you a single agreement for a set of parties to execute. Typically, you fill in the blanks in a Word doc, or in a web app wizard. The result is flattened onto the page. This is fine for simple agreements, like an NDA.

But some deals involve multiple documents, all of which have to agree with one another. Think about an investment deal which needs a Term Sheet, a Subscription Agreement, a Shareholders Agreement, and a Deed of Ratification and Accession, not to mention all the corp-sec Directors' and Members' Resolutions needed to validate each corporate act. The same names and terms appear in multiple documents. (A deal begins to look like something you can – and should – configure and compile using m4 and make!)

So, the world needs workflow-oriented solutions.

Clerky is workflow-oriented. It has the notion of Document Sets. But Clerky doesn't support a lot of workflows. They support incorporation but not investment. (At time of writing, 20150504) And the templates are closed, so you can't add your own.

Valcu is worth a look too.

Docracy is more open. Their vision is to be Github for legal documents. Their web editing UI is pretty nifty, and you can fork any document. But they're document-, not workflow-oriented. And you have to be a lawyer to add a new document.

Legalese is both workflow-oriented and open. Each workflow in Legalese produces one or more agreements for the parties to execute. Instead of editing the document directly, you describe the particulars of the parties and the terms of the deal in a separate spreadsheet. Legalese compiles your workflow's docset by combining the spreadsheet with the templates. To rebuild your docs, just hit make.

For Unix hackers, this is pseudocode for what happens behind the scenes of the Web UI:

% make model seedround send
loading negotiated term sheet from Google Sheets...
loading cap table from Google Sheets...
loading party particulars from Google Sheets...
downloading latest legal rule engine for relevant jurisdiction...
fetching missing information via regulatory APIs...
fetching latest version of agreement templates from Github...
computing amendments required for constitutional documents...
parsing articles-of-association.pdf
computing corporate actions and resolutions required...
parsing history of corporate actions... 16 PDFs found...
analysis complete. constructing company model... done.
computing dependency graph for seed round financing... staging... producing PDFs...
stage 1 PDF: Term Sheet for Seed Round
stage 1 PDF: New Articles of Association describing Vesting/ESOP and Series AA shares
stage 1 PDF: Directors' Resolutions Announcing Fundraising and Alterations to Articles
stage 1 PDF: Members' Resolutions Approving Alterations to Articles of Association
stage 1 PDF: Volunteer Agreements -- IP Assignment, Confidentiality, Noncompete
stage 1 PDF: Shareholder Agreements -- Drags/Tags, Preemptive & Information Rights
stage 1 PDF: Description of Vesting Scheme and ESOP
stage 1 PDF: Directors' Resolutions Announcing Vesting Scheme and ESOP
stage 1 PDF: Members' Resolutions Approving Vesting Scheme and ESOP
stage 1 PDF: Directors' Resolutions Announcing Issue of New Shares for Vesting/ESOP
stage 1 PDF: Members' Resolutions Approving Issue of New Shares for Vesting/ESOP
stage 1 PDF: Directors Notify Shareholders of Pro Rata Rights for Vesting/ESOP
stage 1 PDF: Shareholders Waive Pro Rata Rights for Vesting/ESOP
stage 1 PDF: Directors' Resolutions to Issue and Allot New Vesting/ESOP Shares
stage 1 PDF: Instruction to Corporate Secretary to File Vesting/ESOP Shares
stage 2 PDF: Checklist Bundle for Conditions Precedent
stage 2 PDF: Cap Table, before Series AA
stage 2 PDF: Cap Table, after Series AA
stage 2 PDF: Investment Agreement for Seed Round Series AA
stage 2 PDF: Deed of Ratification and Accession for Seed Round Series AA
stage 3 PDF: Directors' Resolutions to Issue and Allot New Series AA Shares
stage 3 PDF: Instruction to Corporate Secretary to File Series AA Shares
stage 3 PDF: Series AA Share Certificates
sending Stage 1 PDFs for signature via Adobe EchoSign...
seed round Stage 1 paperwork sent. Please check your email.
will poll Stage 1 paperwork status once an hour.
will send Stage 2 PDFs when all Stage 1 PDFs are received.
will send Stage 3 PDFs when all Stage 2 PDFs are received and funds arrive.

Legalese takes openness to a new level: the templates sit in public Github repositories (right now, the templates are in XML, which admittedly might scare off some people.) And the configuration spreadsheets live in Google Spreadsheets. So you can import and export your data as you see fit.

Legalese has global ambitions. Most of the above services focus on one, at most two jurisdictions. Legalese serves people who live outside the U.S. too.

Legalese is Web 2.0 the way YouTube, Wikipedia, and Github are Web 2.0. Convincing or paying lawyers to upload their precious precedents doesn't scale. We're betting on user-generated content. Maybe only one in a hundred users will upload their lawyer-drafted documents into Legalese; with enough users, that should be enough. Maybe we'll even have Kickstarter for desired contracts!

Programmers should already be nodding their heads, but let's walk through an example that shows how it all comes together.

Suppose a startup is raising a small angel round. The investors put money in. In return they get a piece of paper which they hope will be worth a lot of money one day. But what exactly is that piece of paper? Is it a convertible note? A plain old stock certificate for ordinary shares? A warrant? A KISS? A SAFE? A Series Seed? There are dozens of ways to skin this cat. When Brad Feld posted about Proliferation of Standardized Seed Financing Documents it was 2010. Since then, many new sets of docs have come up: 500 Startups released their KISS, and Y Combinator published a sequel to their Series AA in the form of a SAFE. This is called the XKCD/927 problem.

Y Combinator's SAFE comes in four flavours. 500 Startups's KISS comes in two versions, debt and equity. They're slightly different to a standard convertible note, which is again different to a basic common-stock investment. You can see where this is going: if you don't keep your eye on the prize, the paradox of choice could strangle your deal even before it gets out of the starting gate.

A conversation between first-time founders and tyro investors often has the feel of two teenagers trying to make it past second base: the earnestness greatly exceeds the understanding of the mechanics.

"Hey, I love what your startup is doing. I want to put some money in," says the Newbie Angel. "Send me the paperwork."

"Awesome!" reply the euphoric founders. "We'll get right on it."

Somebody on Quora recommends the Wilson Sonsini Term Sheet generator. Six pages into the 43-page wizard, the founders realize they didn't ask the investor – let's call her "Investor A" – a few important questions, like: how much money do you want to put in?

So they go back to the angel. "Hey, er, how much money do you want to put in?"

"How about fifty thousand? For a third of the company?"

"Wait, that seems like a lot. That means the pre-money valuation is only $100,000."

"Okay, make it a fifth of the company."

"A fifth sounds good, but we've decided we want to raise at least $100,000 to keep us going for a few months."

"Okay, I'll put in $50,000 toward your $100,000 raise, and if you get the full amount, then the $100,000 will be a fifth of the company."

"Great! We'll send you the paperwork! Common stock, right?"

"Sure, whatever."

The founders give up on the WSGR term sheet generator, and download a Subscription Agreement for Common Stock, or Ordinary Shares, off the Internet. And they go hunting for other people to make up the other $50,000.

One investor – investor "B" – says, "Sure, I'll put in $25k. And this is going to be equity, right?"

"Yeah, we negotiated a valuation of $400,000 with our lead investor."

"Sounds good. Send me your cap table and the paperwork you want me to sign. If it helps, here's a link to the Equity KISS. We used that for my last deal and I thought it was pretty good."

Another investor – investor "C" – says, "You're only $25k short? Fine, I'll take it. Are you doing a SAFE or a convertible note?"

Nonplussed, the founders look at each other before saying, "Yes, we think so."

Laughing inside, Investor C says, "Okay, look, I think you're still too early for a priced round. To be fair to both sides, let's go with the usual convertible note, with a 20% discount on the next round or a $400,000 cap."

The founders aren't really sure what that means, but two alternatives sounds fairer than just one. Thinking "we really need that $25k to unlock the $100k round", the founders say, "sure! Sounds great!"

They go back to Investor A, saying "we found other investors. One wants to use an Equity SAFE and the other wants a 20% discount."

Investor A says, "OK, well, send me the paperwork and I'll take a look at it. And by the way, I'll want you to take care of your vesting and ESOP at some point."

What have the founders gotten themselves into? In three short conversations they have spanned ordinary shares, warrants, and convertible debt. They now need to understand discounts, caps, and conversion. Mark Suster will be the first to point out that the founders are walking into a minefield – and they haven't even gotten into the option pool shuffle or founder vesting.

The founders consult their mentor, who says, "maybe you should take a week off work and educate yourselves by reading Brad Feld's blog/book, Wilmerding's Term Sheets & Valuations and Deal Terms, and Wasserman's Founder's Dilemmas."

The founders say, "we just launched and we're growing 25% week-on-week. We can't afford a week to go learn this stuff. There are so many templates out there. Can't we just choose something that works for all three investors?"

This is where Legalese comes in.

Because the terms of a given deal reside in the spreadsheet, Legalese is aware of the semantics of your deal. Because Legalese already contains all the standard templates, you can switch from one to the next just by changing one config option. If you take a snapshot of your latest negotiation and put it into Legalese, the system will automatically pick the template that fits best. If the negotiation evolves, Legalese takes changes in stride: by changing a single cell, you can switch from a Debt KISS to a Cap-and-Discount SAFE. Two more clicks recompile the documents and send them out to investors for review.

Legalese keeps your deal configuration in Google Spreadsheets, not in a one-off wizard, so you can fiddle with it until it works.

So ... why Legalese?

Gosh. That's a lot of prior art. Law firms serving startups. Startups eating law firms. Is there really a reason to launch yet another effort?

Well, yes. Two reasons, actually.

First: almost all the prior art is aimed at the US market. Americans enjoy the second-largest economy in the world. One language, one currency, one legal jurisdiction (assuming Delaware). But if you don't live in the US, you're on the outside looking in. There are startups in Singapore and entrepreneurs in Europe who need tools like these. But American myopia means they'll need to fend for themselves. Hence Legalese.

Second: being hackers, we take a righteously opensource attitude to software development. We're not against startups. Indeed, our first agreements are aimed at serving startups. Indeed, we will soon launch Legalese as a service startup, following in the footsteps of Github. We'll monetize on premium features: a Template Editor, a PDF generator, a Template Store. But the core codebase is opensource, and any hacker who wants to create their own agreements, or submit pull requests over existing agreements, is welcome to do so.

Contributor Licence Agreements

Contributor Licence Agreements are critical to the legal integrity of any opensource project. Most importantly, they describe the copyright and patent licences contributors create and assign to the managers of the project. They come in two main flavours: firstly for the individual contributor, and secondly for the corporate contributor to ensure that copyright and patent claims in employment agreements do not get in the way of contributions to the project.

Existing Contributor Licence Agreements

As you can see, most of them are pretty similar. The corporate version for most of these agreements adds an additional clause where the company represents that certain employees are authorised to submit contributions to the project.

Helpful tools to create Contributor Licence Agreements

Infographic: Computational Legal