Khurram Badar / Archive / Papers / TASHRI' SYNC (تشريع) — Legislative Knowledge Graph Build Spec

TASHRI' SYNC (تشريع) — Legislative Knowledge Graph Build Spec

briefing · 2026-07-22 · 1755 words · Khurram Badar

0. VERIFIED SOURCE INTELLIGENCE (do not re-derive; confirmed by manual inspection Endpoints Per-law metadata available on detail page Known parsing landmines (all confirmed real).

ai · legal · technology · uae

TASHRI' SYNC (تشريع) — Legislative Knowledge Graph Build Spec

**Project:** Mizan / Shari knowledge bank enrichment from uaelegislation.gov.ae
**Status:** Ready to build. All endpoints below verified live on 23 Jul 2026.
**Prime directive:** Every claim the platform makes must survive a litigator's scrutiny. Every stored article carries an official source URL and an as-of date. Arabic is the authoritative text (the site's own disclaimer: "In case of conflict, the Arabic text will prevail").

---

0. VERIFIED SOURCE INTELLIGENCE (do not re-derive; confirmed by manual inspection)

Endpoints

Per-law metadata available on detail page

Known parsing landmines (all confirmed real)

---

PHASE 0 — RECON (do this first, ~30 min)

**0.1 Probe the JSON endpoint.** The detail page's article index lazy-loads → there is almost certainly an internal AJAX endpoint returning clean, pre-segmented article text (likely both languages). Open a legislation page in Chrome DevTools → Network → click "Load more" → capture the request. **If found, it replaces PDF parsing entirely for body text** and eliminates the AR corruption problem. Report findings before proceeding.

**0.2 Read `/en/legal/terms-and-conditions`.** Confirm no crawl prohibition. Regardless: throttle ≥2s between requests, honest User-Agent (`Mizan-LegalBank/1.0 (contact: khurramb@gmail.com)`), retry with backoff, never parallel-hammer.

**0.3 URGENT — Civil Transactions Law check.** A new Federal Decree Law promulgating the Civil Transactions Law was issued Jan 2026 (announced on the site's homepage). Our 32 seeded key articles cite the Civil Code (Fed. Law 5/1985). Locate the new law's ID, pull it, and produce a supersession report: which seeded articles are affected, renumbered, or repealed. **This blocks go-live demo safety.** Deliver as a table: `seeded_article | old_ref | status | new_ref | action`.

---

PHASE 1 — INGESTION PIPELINE (batch, idempotent, resumable)

Stage 1 — Manifest crawl

Stage 2 — Per-law fetch

Stage 3 — Text extraction & segmentation

Stage 4 — Arabic repair (only if no JSON endpoint)

Stage 5 — Storage (Supabase)

---

PHASE 2 — KNOWLEDGE LAYERS

Layer A — Bilingual alignment (the moat, mechanically)

Layer B — Dictionary enrichment (official grade)

Layer C — Citation graph

Layer D — Time machine (point-in-time law)

Layer E — Watchtower (weekly cron; wire into existing GitHub Actions "Mizan Ops Cron")

---

PHASE 3 — RUNTIME QUERY PATH (why it stays fast)

---

MODEL & COST POLICY

SCOPE PHASING

QA GATES (all must pass before any data reaches Mizan chat)

DEFENSIBLE MARKETING CLAIM (locked wording once Phase 1 core completes)

EXECUTION ORDER FOR CLAUDE CODE

← THE SOVEREIGN CUSTODY MASTERCLASSUAE National Cloud Security Policy — Reference for the certification client Platform Governance →
Two years of working thought, indexed.
Ask me to present it in your conference room — WhatsApp +971 55 623 9111
Book Session →