Inspiration

Every time a law changes, someone at a firm has to remember every document that cites it and manually recheck them all — and usually nobody does, until it's too late. We wanted to automate that catch, without letting AI be the final word on legal text.

What it does

HuatHuat watches a firm's real document library and tracks a real Singapore statute live from its official source. When the law changes, it walks the dependency graph — direct citers and transitive ones — and flags every document that might now be affected, with an AI-drafted note a human reviews before anything is accepted.

How we built it

Python/FastAPI backend with a real SSO scraper and difflib for exact statute diffing, an LLM (via OpenRouter) only for classification and drafting suggestions, and a React/TypeScript/Vite frontend for reviewing and accepting/rejecting flags.

Challenges we ran into

Keeping the AI from hallucinating in a field where exact wording is everything. What changed in the law is computed mechanically, never summarized by an LLM, and before any AI-suggested edit touches a real document we verify the quoted sentence actually exists word-for-word — otherwise nothing gets written. We even caught a real misclassification bug mid-hackathon and fixed it. Law's nuance isn't something any model fully captures; we focused on making sure ours knows when it's unsure instead of guessing.

Accomplishments that we're proud of

110 passing tests, a 106-document real-world accuracy benchmark, and a hard verbatim-match gate that keeps AI from ever silently corrupting a real file.

What we learned

Where to draw the line on what AI is allowed to decide on its own — and that testing with real, messy documents is the only way to find out where you were wrong.

What's next for HuatHuat

Track more statutes and sections (a config change, not a rewrite), ship a real hosted version, and add the access control a real law firm would need before it touches actual client documents.

Built With

Share this project:

Updates

Submission history