Agreement generator
Pick an approved template, let the matter fill the form, let the rules block what is wrong, and generate a draft that nobody may release without a partner.
1 Template studio - the library a firm may draw from
| Template | Version | Owner | Approved | Golden tests | Status | |
|---|---|---|---|---|---|---|
| Engagement letter and costs estimate Firm-wide | v4.2 | S. Ariffin (partner) | 12 Aug 2026 | 8 / 8 | live | history · tests · use |
| Tenancy agreement - residential Conveyancing | v6.0 | S. Ariffin (partner) | 02 Sep 2026 | 10 / 10 | live | history · tests · use |
| Tenancy agreement - commercial Conveyancing | v3.4 | L. Tan (partner) | 02 Sep 2026 | 7 / 7 | live | history · tests · use |
| Sale and purchase agreement - subsale (acts for purchaser) Conveyancing | v9.1 | S. Ariffin (partner) | 28 Aug 2026 | 12 / 12 | live | history · tests · use |
| Sale and purchase agreement - subsale (acts for vendor) Conveyancing | v7.3 | S. Ariffin (partner) | 28 Aug 2026 | 11 / 11 | live | history · tests · use |
| Sale and purchase agreement - developer (HDA, Schedule G/H) Conveyancing | v2.0 | L. Tan (partner) | 05 Sep 2026 | 6 / 6 | live (HIMS e-SPA route) | history · tests · use |
| Deed of assignment (master title) Conveyancing | v5.2 | L. Tan (partner) | 19 Aug 2026 | 5 / 5 | live | history · tests · use |
| Discharge of charge Conveyancing | v2.6 | L. Tan (partner) | 19 Aug 2026 | 4 / 4 | live | history · tests · use |
| Will (testator with minor children) Family and estate | v1.4 | N. Devi (partner) | - | 0 / 4 | draft - not approved | history · tests · use |
| Letter of demand Litigation | v0.9 | - | - | 0 / 3 | parked for phase 4 | history · tests · use |
Only templates with status live can be generated. A template without an owner, without a passing test set, or without partner approval cannot be promoted - the system simply does not offer it.
2 Generate an agreement - the form a clerk sees
Sale and purchase agreement (subsale, acting for purchaser) v9.1
Matter CV-2026-0142. Fields marked auto from matter were filled by the system; only the rest is typed.
| Field | Source | Value | Type |
|---|---|---|---|
| Purchaser name | auto from matter | Nurul Ain binti Hassan | text |
| Purchaser identification | auto from matter | 900101-14-6078 | ic |
| Vendor name | auto from matter | Tan Wei Ming | text |
| Property title | auto from matter | Geran 45678, Lot 1234, Mukim Kajang | text |
| Purchase price | typed | RM650,000.00 | money |
| Deposit paid on signing | rule (10%) | RM65,000.00 | money |
| Completion date | rule (SPA + 3 months) | 11 Dec 2026 | date |
| Financier | auto from matter | CIMB Bank Berhad | text |
| Late payment interest | clause library default | 8% per annum | pct |
| Chattels and inventory list | typed (optional) | Air-conditioners (3 units), kitchen cabinet | text |
Live check - change a value and press generate
Conditional blocks drawn from the clause library
| Block | State | Why |
|---|---|---|
| Strata management (Act 757) notices and by-laws | Included | Property is a stratified parcel |
| Restriction in interest - state authority consent | Not included | Freehold, no restriction |
| Bumiputera lot release | Not included | Not a Bumiputera lot |
| Existing tenancy - purchaser takes subject to tenancy | Not included | Vacant possession |
| Redemption of existing charge by vendor's financier | Included | Charge in favour of Maybank Islamic |
| Loan rejection - refund of deposit | Included | Purchaser financing 80% |
| Furniture, fittings and chattels | Included | Inventory list attached |
| Late delivery charges (developer only) | Not applicable | Not an HDA transaction |
Post-generation scan (runs on every output)
- ✓No leftover placeholders - scanned for {{ }}, {% %}, XXX, TBC
- ✓Parties named consistently in all 23 references
- ✓Price RM650,000.00 matches the payment schedule and the words
- ✓Inventory list referenced and attached
- !Page range 38 pages - inside the expected band for a subsale SPA
Output package
3 Validation engine - the 40 rules that make this a legal tool
Hard blocks (the document cannot be generated)
- ✗Price in figures does not match the price in words
- ✗Completion date is not the SPA date plus three months
- ✗Identification number fails format or check digit
- ✗Strata property on a landed template, or the reverse
- ✗Restriction in interest present but no state consent clause
- ✗Existing charge with no redemption clause
- ✗Instrument of transfer or charge routed to e-signature
- ✗Developer SPA outside the HIMS e-SPA route
Warnings (a partner must acknowledge, with a reason)
- !Late payment interest outside the firm's 8-10% band
- !No chattels and inventory list although the offer letter promised fittings
- !No loan rejection clause although the purchaser is financing
- !Taxes and assessment apportionment missing or ambiguous
- !Extension period exists but the extension interest rate is blank
- !Discount on scale fees exceeds the firm's policy
Every acknowledgement is recorded: who accepted it, when, and why. Silence is never consent.
4 Comparing the other side's mark-up
| Option | Cost | Keeps formatting | Exports tracked changes | Note |
|---|---|---|---|---|
| Text diff in the browser difflib or diff-match-patch | Free | No | No | Screen review only |
| LibreOffice unoserver / unocompare LibreOffice UNO | Free (self-hosted) | Partial | Yes | Fallback if native track changes misbehave |
| Native track changes - python-redlines (Docxodus engine) Python | Free (open source) | High | Yes - real w:ins / w:del | Chosen for phase 1 |
| Draftable Hosted or self-hosted API | USD129-261 per user per year | Very high | Yes | Later phase if needed |
| Aspose.Words .NET / Python / Java SDK | USD1,000-3,000+ per developer per year; OEM/SaaS from USD10,000+ | Very high | Yes | Avoid unless justified |
5 Artificial intelligence - what it may and may not do
May
- ✓Suggest a clause from the firm's own approved library
- ✓Summarise the other side's mark-up into a one-page list
- ✓Explain a clause to the client in plain language
May not
- ✗Write a clause that is not in the approved library, unattended
- ✗Send anything to a client, the other side or the land office
- ✗Be used to train a model on client documents
Controls
- ✓Per-firm off switch - some bank panels forbid external AI
- ✓Every use logged: who, when, model, output, decision
- ✓Bar Council Circular 242/2025 and the 2025 update built into the policy text
6 What the firm gets on day one
How the ten minutes are spent now
Open the matter, press generate agreement, glance at the validation panel, fix the two typed fields, read the assembled outline block by block, send for partner review. The clerk no longer copies last month's file and hunts for names to change - which is exactly where the errors used to live.