QENEX Law
Legal-source taxonomy, licence tagging, corpus gate

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:

1. Coverage map — prioritise QENEX's own document needs first#

Since it's internal-first, weight the areas your own paperwork actually uses:

Practice areaWhy (QENEX need)Priority
Company law & governanceresolutions, articles, filings, CS01/accountsP1
Fundraising: SEIS/EIS, ASA/SeedFAST, term sheetslive round; caught the longstop issueP1
IP: patents, trade marks, IP assignmentpatent portfolio, TM watchP1
Employment & contractorfounder/employment agreementsP2
Data protection / privacyprocessing, DPAsP2
Commercial contracts / NDAsvendor & partner dealsP2
Tax (R&D, Patent Box)reliefs already flaggedP3

2. Source tiers (UK, current & authoritative)#

Tier 1 — Primary law & official guidance (Green, OGL, free API/bulk):

Tier 2 — Official model documents & standards (Green/Amber, check each licence):

Tier 3 — Licensed commercial (Red — subscribe, don't ingest):

Tier 4 — Secondary / open datasets (mixed licence):

3. Acquisition methods#

4. Cleaning & normalisation pipeline#

  1. Fetch (source URL, retrieval date, licence tag).
  2. Extract text (OCR for scanned PDFs; keep original + text).
  3. Segment into atomic units — clauses, sections, judgment paragraphs.
  4. Tag metadata — jurisdiction, practice area, instrument type, enactment/decision date, source, licence, citation.
  5. Deduplicate and link versions (supersession chains).
  6. Extract citations / cross-references (legislation ↔ cases ↔ guidance).
  7. Trust-score each unit (source authority + freshness) — this drives "draft from trusted templates, not free-form".
  8. Chunk + embed for retrieval; keep human-readable source alongside every chunk.

5. Freshness — "newest" is a process, not a one-off#

6. Provenance & storage (QENEX differentiator)#

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#

9. Immediate next actions#

  1. Stand up the licence-tagging schema (green/amber/red) before ingesting anything.
  2. Pull the free P1 sources (legislation.gov.uk, HMRC VCM SEIS/EIS, Companies House, BVCA model docs) and tag them.
  3. Confirm The National Archives computational/AI re-use licence for case law before any bulk case ingestion.
  4. Decide the Forgejo repo layout for the clause library vs. the raw corpus.