The problem
A registered building surveying and code-consulting practice of around twenty staff needs fast, defensible answers across the Building Act, the Building Regulations, the National Construction Code, dozens of regulator practice notes and a steady stream of reforms. Nobody in the state publishes a consolidated checklist for Class 2 to 9 permits or occupancy permits, and the regulator's own site blocks automated download, so the material is scattered and partly inaccessible.
What we built
A searchable legal corpus where every clause carries its source URL and a citation string, linked to the firm's five services through the obligations, required documents, forms, inspection stages, referral bodies and standards that apply to each.
- The corpus457 PDFs plus the NCC 2025 and 2022 open XML, about one gigabyte, loaded as 463 documents and 45,624 clause-level sections: the Act and Regulations in authorised versions, all 29 Schedule 4 forms, 38 ABCB handbooks and 262 regulator documents recovered from Internet Archive captures, each tagged current or superseded.
- Service mapping86 obligations with 586 verified section links, 114 required documents, 37 forms, 18 inspection stages, 11 referral bodies and 243 standards.
- Start-here layerA reform clock of 30 dated provisions, tick-and-print "before you sign" checklists per service, a 39-row referral matrix, 9 enforcement cases mapped to sign-off points and 109 state NCC variations shown side by side with the national clauses.
- SearchPostgreSQL full-text and trigram search, so a half-remembered phrase or a regulation number both find the clause. No black box: it is structured, cited search rather than AI question answering, which is what a surveyor needs to rely on in writing.
- Bluebeam markup ingester (prototype)Reads Revu annotations including custom columns and replies, diffs revisions, links markups to clauses and produces an RFI schedule.
Stack and cost
Python with FastAPI and a server-rendered interface, PostgreSQL 18 on Render in Singapore, a Render web service behind a login, and a separate public marketing site served as a Cloudflare Worker that deploys automatically from GitHub. Total running cost is about US$25 a month. The internal tool went live within the first week, and a research pack on the market and competitors was delivered alongside it.
Outcome
Surveyors can find the clause, see where it came from and print the checklist that applies to the job, from one place. The structure (obligations, documents, forms, stages, referrals) means the tool answers "what do I need for this service?" as well as "what does regulation 116 say?". The same approach applies to any regulated profession that lives in legislation, codes and guidance notes: planning, environmental compliance, workplace safety, financial services.