chattydogmagazine turns Mike into a UK litigation workbench

This fork swaps Mike's default assumptions for England and Wales practice, from legal research through to everyday case workflows.

workflowintegration

The centre of gravity is now UK practice. The assistant is guided by OSCOLA citation and Civil Procedure Rules conventions, while legal research points to the National Archives' Find Case Law service, the public archive for court judgments.

It also adds practical templates for common litigation and employment work, including:

  • Litigation workflows for structuring case work.
  • Employment workflows for handling workplace matters.
  • Find Case Law research tools for finding and reading UK judgments.

The fork also makes NVIDIA's AI service the default route and lets individual users supply their own access key. That is a consequential choice, not a cosmetic localisation: it changes the default research behaviour and AI provider for every deployment.

So what UK firms and legal-product teams may find a useful starting point here, but should review the new provider and case-law connections before adopting it wholesale.

View this fork on GitHub →

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

Commits in this thread

1 commit from chattydogmagazine/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
c39a9175 feat(uk): UK legal adaptation - NVIDIA provider, FCL API, UK workflows, auth hardening CD 2026-08-05 ↗ GitHub
commit body
UK SYSTEM PROMPT
- Rewrote assistant persona for England & Wales (SRA, OSCOLA, CPR)
- Added UK_RESEARCH_SYSTEM_PROMPT and buildSystemPromptWithUKResearch() for
  National Archives Find Case Law tools instead of CourtListener

UK WORKFLOWS (9 templates)
- 7 Litigation: LBA, Response to LBA, Witness Statement, Without Prejudice
  Settlement, N1 Claim Form, Chronology Builder, Disclosure List
- 2 Employment: Grievance Letter, Settlement Agreement Checklist
- Merged into ALL_SYSTEM_WORKFLOWS alongside existing US workflows

NATIONAL ARCHIVES FIND CASE LAW API
- findCaseLaw.ts: searchFCL(), readFCLCase(), verifyFCLCitation()
- findCaseLawTools.ts: 3 tool schemas + FindCaseLawToolEvent discriminated union
- streaming.ts: FINDCASELAW_TOOLS wired in when includeResearchTools=true
  (default changed from true→false; UK research replaces CourtListener)
- contextBuilders.ts: buildSystemPromptWithUKResearch() called when enabled

NVIDIA PROVIDER
- nvidia.ts: full Chat Completions SSE streaming with multi-turn tool-call loop
- Models: meta/llama-3.3-70b-instruct (main), meta/llama-3.1-8b-instruct (title)
- Provider routing via model.includes("/") heuristic
- NVIDIA_API_KEY env var wired through userApiKeys

AUTH HARDENING
- auth.ts: fresh createServerSupabase() for DB ops - fixes JWT contamination
  when auth.getUser() is called on the same client (→ "JWT issued at future")
- userLookup.ts: INSERT → UPSERT with onConflict="user_id" - eliminates race
  condition on concurrent profile sync
- index.ts: global Express error handler + unhandledRejection guard (Node.js 25)

INFRA
- Frontend port 3002, backend port 4000 (avoids Protect & Serve conflicts)
- Supabase cloud project ueutbrecfctltyletmsv as DB
- all_migrations_combined.sql: 42 migration files merged for Supabase SQL Editor

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-998.md from inside the repo you want the changes in.

⬇ Download capture-thread-998.md