QENEX Law — Legal Knowledge-Base Acquisition & Curation Plan (v0.1)#
Purpose: collect, clean, and keep-current the most valuable legal-practice resources to power QENEX Law's drafting/review — built on properly-licensed material only. Scope: UK-first (England & Wales primary), internal-use corpus first. Status: planning; execution deferred behind Lab + unfinished work. Date: 2026-08-09
0. The one rule that governs everything: licence hygiene#
Every item enters the corpus only with a recorded licence + AI-use right. This is non-negotiable — an internal AI corpus built on copyrighted text you don't have rights to is a legal and reputational liability (ironic for a legal tool). Three buckets:
- Green (ingest freely): primary legislation, official government/regulator guidance under the Open Government Licence, and public-domain material.
- Amber (ingest only under a specific re-use/computational licence): court judgments via The National Archives Find Case Law (bulk/AI use needs their transactional/computational-analysis licence, not the default view licence).
- Red (reference, do NOT ingest into the shared corpus): commercial subscription content (Practical Law, LexisNexis, Westlaw), textbooks, and law-firm know-how. Licensed reading ≠ training/redistribution rights. Use for the human's own research, not the machine corpus.
1. Coverage map — prioritise QENEX's own document needs first#
Since it's internal-first, weight the areas your own paperwork actually uses:
| Practice area | Why (QENEX need) | Priority |
|---|---|---|
| Company law & governance | resolutions, articles, filings, CS01/accounts | P1 |
| Fundraising: SEIS/EIS, ASA/SeedFAST, term sheets | live round; caught the longstop issue | P1 |
| IP: patents, trade marks, IP assignment | patent portfolio, TM watch | P1 |
| Employment & contractor | founder/employment agreements | P2 |
| Data protection / privacy | processing, DPAs | P2 |
| Commercial contracts / NDAs | vendor & partner deals | P2 |
| Tax (R&D, Patent Box) | reliefs already flagged | P3 |
2. Source tiers (UK, current & authoritative)#
Tier 1 — Primary law & official guidance (Green, OGL, free API/bulk):
- legislation.gov.uk — Acts & SIs, full API + bulk XML, revised + point-in-time.
- The National Archives "Find Case Law" — judgments, public API + bulk (Amber: get the computational/AI re-use licence).
- gov.uk regulator guidance — HMRC (incl. VCM manuals for SEIS/EIS), Companies House, IPO (patents/TM), ICO (data protection). OGL.
Tier 2 — Official model documents & standards (Green/Amber, check each licence):
- BVCA / UK Private Capital model investment documents — the standard for early-stage UK rounds; recently updated versions — high value, keep current.
- Companies House model articles & forms; IPO model/guidance; ICO template notices.
Tier 3 — Licensed commercial (Red — subscribe, don't ingest):
- Practical Law, LexisNexis, Westlaw — buy seats for human research; do not pipe into the corpus.
- Legal textbooks — purchase licensed copies; no corpus ingestion without rights.
Tier 4 — Secondary / open datasets (mixed licence):
- Open legal datasets (e.g. openlegaldata "awesome-legal-data"), academic open-access (SSRN, university repositories).
- Law-firm client notes / Lexology — monitor for change awareness only; don't wholesale ingest.
3. Acquisition methods#
- APIs / bulk downloads for Tier 1 (legislation, case law) — automated, repeatable.
- Structured fetch of official model docs (Tier 2) with source URL + version captured.
- Paid subscriptions / purchases for Tier 3 — logged as licences, kept out of the corpus.
- No scraping of copyrighted or ToS-restricted material. Ever.
4. Cleaning & normalisation pipeline#
- Fetch (source URL, retrieval date, licence tag).
- Extract text (OCR for scanned PDFs; keep original + text).
- Segment into atomic units — clauses, sections, judgment paragraphs.
- Tag metadata — jurisdiction, practice area, instrument type, enactment/decision date, source, licence, citation.
- Deduplicate and link versions (supersession chains).
- Extract citations / cross-references (legislation ↔ cases ↔ guidance).
- Trust-score each unit (source authority + freshness) — this drives "draft from trusted templates, not free-form".
- Chunk + embed for retrieval; keep human-readable source alongside every chunk.
5. Freshness — "newest" is a process, not a one-off#
- Monitor: legislation.gov.uk change feeds, HMRC/ICO/IPO manual updates, BVCA model-doc releases, new judgments.
- Scheduled refresh (reuse the existing scheduled-task pattern +
qenex_websearch_*); re-score on update; flag superseded units. - Each practice area carries a "last-verified" date; stale areas surface for review.
6. Provenance & storage (QENEX differentiator)#
- Anchor every ingested source + version through the dual-rail audit pipeline (BOSA RFC-3161 + OpenTimestamps) → provable "this is the text as of this date".
- Store: raw docs on IPFS (pinned); structured units + metadata in Supabase; curated templates/clause library version-controlled in Forgejo (
qenex-law).
7. Tooling map (reuse existing QENEX infra)#
Acquisition → qenex_websearch_research/crawl/extract, qenex_http_call (allowlisted sources). Structuring → qenex_ai_proxy / qenex_multi_inference. Storage → IPFS + Supabase + Forgejo. Provenance → audit anchoring. Scheduling → scheduled tasks.
8. Phase plan#
- P0 (now, zero-cost): capture your own executed docs + the free Tier-1/Tier-2 sources you already rely on (legislation.gov.uk, HMRC VCM, Companies House, BVCA model docs) with licence tags. Start the clause library in Forgejo.
- P1: automate Tier-1 ingestion (legislation + case-law under proper licence) for the P1 practice areas; build the cleaning pipeline + trust scoring.
- P2: freshness monitoring + provenance anchoring; expand to P2 areas.
- P3: evaluate paid subscriptions for human research; revisit any external-product ambitions (with the licensing/UPL groundwork).
9. Immediate next actions#
- Stand up the licence-tagging schema (green/amber/red) before ingesting anything.
- Pull the free P1 sources (legislation.gov.uk, HMRC VCM SEIS/EIS, Companies House, BVCA model docs) and tag them.
- Confirm The National Archives computational/AI re-use licence for case law before any bulk case ingestion.
- Decide the Forgejo repo layout for the clause library vs. the raw corpus.