GIVENALITY teaches Mike Tanzanian law

Two commits graft a Tanzanian-law retrieval service onto Mike, so chat and document review answer against actual local statutes - with citations.

contract-reviewcompliance

GIVENALITY wired in Leksa, a separate service that holds a searchable corpus of Tanzanian law, and pointed Mike at it. Now every project chat turn and every tabular document review pulls the relevant statutes and hands them to the model before it answers, so extractions get checked against real legal text instead of the model's general training. The plumbing is careful: if the retrieval service is down or slow, chat just carries on without it.

The scope is unmistakably Tanzanian. The analyst persona now flags clauses as compliant or non-compliant against named statutes - employment, limitation, civil procedure, banking - and ships four ready-made review templates for Employment Contracts, share purchase agreements, loan agreements and court pleadings. Worth knowing: the Tanzania framing is baked into the prompts even when the corpus isn't connected, and the templates would need swapping for any other jurisdiction.

So what Anyone running Mike for a specific national legal market should look here first - it's the clearest template yet for grounding it in one jurisdiction's law.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from GIVENALITY/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
0c2eb990 Integrate Leksa RAG for Tanzanian legal context in project chat GIVENALITY 2026-05-14 ↗ GitHub
commit body
Adds fetchLegalContext() to projectChat.ts - on each project chat turn,
queries the Leksa /rag/retrieve endpoint (hybrid pgvector + FTS search
over Tanzanian statutes and case law) and injects the top-k results into
the system prompt. Degrades silently if LEKSA_RAG_URL is unset or the
service is unreachable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d5b14f75 Add Leksa RAG legal context injection into tabular review extraction GIVENALITY 2026-05-14 ↗ GitHub
commit body
- Extract fetchLegalContext into shared lib/leksaRag.ts (used by both
  projectChat and tabular routes)
- Inject Tanzanian legal context into queryTabularAllColumns and
  queryTabularCell so the LLM can flag clauses as compliant/non-compliant
  against actual Tanzanian law (not just extract text)
- Extend inline citation requirement to all column formats (was only
  yes_no/date/tag; now text and bulleted_list also require citations)
- Add seedWorkflows.ts script: seeds 4 system tabular review workflows
  for Employment, SPA, Loan Agreement, and Court Pleading review

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-432.md from inside the repo you want the changes in.

⬇ Download capture-thread-432.md