Fork genesis: Python sovereignty backend grafted onto upstream TS codebase

jrklaus8 starts not by modifying willchen96/mike but by committing an entirely new Python tree alongside it. The result is a dual-stack repo where Canadian features live in a separate FastAPI service that shares a repo with the unmodified upstream Bun/Express backend.

infrastructurecompliance

The first commit (60a3c9c) drops a fresh Python backend/ tree: api/main.py (FastAPI 0.1.0), compliance/lso_audit.py, reasoning/prompts.py, retrieval/canlii_client.py, retrieval/citation_validator.py, a Dockerfile, docker-compose, and requirements.txt. None of this exists in upstream. The very next commit (d87b9848) merges the full willchen96 TypeScript codebase underneath it, resolving only a README conflict.

So the architecture from day one is two stacks in one repo. The Python side handles Canadian concerns: CanLII retrieval, LSO audit logging, McGill Guide citations. The TypeScript side is upstream, essentially untouched. They share no code and aren't wired together.

The lso_audit.py LSOAuditor class is illustrative of the approach: it scrubs SINs, emails, and phone numbers from text via regex before any LLM call, then writes a JSONL audit trail with a hashed lawyer_id, prompt/output lengths, and "verification_required": true. Lightweight, but shows real intent around confidentiality. The api/main.py query endpoint at this stage is a complete stub returning "R v Jordan, 2016 SCC 27" as a hardcoded citation with a 0.95 confidence score.

The key architectural fact: most "feature" commits in this fork land in the Python tree and are essentially standalone from the real app. They carry minimal upstream-merge risk but also minimal integration with upstream's actual chat, document, and auth flows.

So what Worth understanding before pulling anything from this fork: what looks like a Canadian adaptation is largely a parallel Python service sharing a repo with the original TS app. The two stacks duplicate auth, retrieval, and prompt concerns without connecting. Nothing here is directly importable into an upstream-based product without also adopting the Python backend.

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 jrklaus8/mike-Canada, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
60a3c9ca Initial commit for MikeOSS Canada fork MikeOSS Bot 2026-05-22 ↗ GitHub
d87b9848 Resolve README conflict and merge original codebase MikeOSS Bot 2026-05-22 ↗ GitHub

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

⬇ Download capture-thread-538.md