Legal Engineering
Defined
A framework & working toolkitSearch the guide
Explore the chapters

The bundled toolkit

The toolkit is the curated Singapore instance of the architecture. A single command assembles it into a project folder for an AI host such as Claude Code or Codex: every skill is a snapshot pinned to an exact version, with an integrity record so that later changes can be detected.

The skills

SkillLayerWhat it doesWhat it never decides
Toolkit guideConnects all threeExplains which layer does what, lists the installed skills and contracts, resolves each workflow step to a capability, and releases signed-off workflowsAnything a person or another skill decides
Process modelling and runner3Models a lawyer's process, states each step's need, and runs released workflows with recorded state and human gatesLegal criteria the owner has not supplied
Scrum delivery and dashboard2Turns a signed-off design into a backlog, acceptance criteria and Sprints, and reports progressA matter outcome
Singapore legal research1Researches and cite-checks Singapore law from primary sources, with a private evidence ledgerWhether research may be relied upon
Singapore deadlines1Computes procedural, limitation and notice dates from an explicitly chosen rule, with a full derivation traceWhich rule applies
Source-span extraction1Extracts fields from documents, binding every value to its exact source textWhat a clause means in law
Singapore clause drafting1Drafts a clause and drafting note from supplied research only, and captures approved clauses as precedentsWhether the clause is approved
PDPA assessment1Assesses an activity against each obligation of the Personal Data Protection Act, from provision text retrieved for that assessmentWhether to proceed or notify anyone

A released workflow adds one more skill: a launcher named after the workflow, through which a lawyer starts a matter.

Contracts: what each capability must prove

Each Layer 1 capability implements a contract: the inputs it needs, the output it returns, and the consistency rules a reviewer relies on. Any skill that meets a contract can serve the same workflow step.

ContractRefuses, for example
ResearchClaiming completed research without a passing evidence check and a supporting authority
Cite-checkReporting every citation as supported while one is unverifiable
DraftingA drafting note citing an authority, pinpoint or statute that is not in the supplied research
ReviewA gap without a recommendation, or a checklist item left unaddressed
ExtractionA value marked as found without the source text it came from
ComputationA date from an unverified rule or holiday year without saying so
CaptureRetaining a clause as a precedent without the approver and their approval

These rules test whether a record is honest and complete. They do not test whether the legal analysis is right; that remains the reviewing lawyer's judgement.

Components and installation

Each skill lives in its own repository and is pinned by exact commit in the toolkit's lock file. Repositories marked private are available on request while they are reviewed.

RepositoryProvidesAccess
legal-engineering-definedThis guide, the installer, the contracts, bindings and toolkit guide skillPrivate
legal-processmodelling-meta-skillProcess modelling and the workflow runner (Layer 3)Private
scrum-skillScrum delivery and dashboard (Layer 2)Public
sg-legalresearch-skillSingapore legal research and cite-checkPublic
sg-deadlineSingapore deadlinesPublic
legal-extraction-skillSource-span extractionPublic
sg-drafting-skillSingapore clause drafting and precedent capturePrivate
sg-pdpa-skillPDPA assessmentPrivate

With Python 3.11 or later, Git, and access to the private repositories:

git clone https://github.com/kevanwee/legal-engineering-defined.git
cd legal-engineering-defined
python -m pip install -e .
legal-eng init --workspace ../my-legal-workspace
legal-eng doctor --workspace ../my-legal-workspace

The workspace folder is opened in Claude Code or Codex. Its CLAUDE.md and AGENTS.md direct each session to start from the toolkit guide skill. The operator describes a process requiring improvement or requests a released workflow by name. init also prepares skill packages for ChatGPT and the Claude app, installed through each product's skills interface.

Beyond the bundled skills

Layer 1 is open. Other skill collections can serve as domain capabilities where they fit a need, for example the open-source skills published by LegalQuants and the legal plugin in Anthropic's knowledge-work plugins, both under the Apache 2.0 licence. A capability from outside the toolkit can be wrapped for a workflow step, with the record noting that its version is not pinned by the toolkit.

Adding a capability to the toolkit itself means implementing a contract, publishing the skill, and pinning a binding to its exact version. A new version of any skill means new versions of the workflows that use it; released workflows never change underneath the matters running on them.

Where each part stands

ComponentStatus
Installation and integrity checksTested; a fresh assembly from the published sources passes its checks
Research and cite-check methodIn use on synthetic and saved sources; live statutory access depends on the host's browser and publisher terms
DeadlinesEngine tested; every bundled rule and holiday year is still marked unverified until checked against primary sources
ExtractionTested; its checks are mechanical and make no legal claims
DraftingChecks tested with synthetic fixtures; not yet evaluated on a real clause by a reviewing lawyer
PDPA assessmentChecks tested with synthetic fixtures; the obligation map has not yet been reviewed by a data protection lawyer
Release and launcherTested, including refusal of unsigned, pending or altered releases
A complete live matterNot yet run

The reference chapter explains the terms used here and the boundary of the current implementation.

Continue with Building the practice. The next part explains the methods behind the journey in depth, starting with how LegalTech, Legal Operations and Legal Engineering differ.