Add docs/handoffs/2026-05-18-sprint5-handoff.md — full Sprint 5 scope post Sprint 4 push (origin/main 79d2048): DE jurisdiction module (BGB § 309, GeschGehG, BDSG) as moat #3 expansion, JWT custom claims trigger + storage bucket RLS migrations closing 4 of 5 audit follow-up notes, audit_log + task_events writers with DBPoolHolder injection pattern, pilot live eval for Bielik baseline. Stretch: Termination clause, integration tests, dataset 4 to 20.
Add .claude/agents/compass-pr-reviewer.md — thin Compass-specific wrapper over generic pr-reviewer-orchestrator. Supplies project config (compass-architecture 12-pkt, compass-ai-native-mandates 8-pkt, compass-clause-taxonomy 13-pkt conditional) + scope filters + exception marker. Enforces CLAUDE.md AI-native discipline mandatory pre-merge self-check.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Compass — open-core legal-tech contract management
Status: PRIVATE. Build phase. No public mentions, no monetization, no LinkedIn references.
See: CLAUDE.md (project memory + license posture), docs/architecture/ADR-001-ai-native.md (AI-native architecture mandates), AGENTS.md (multi-agent topology).
What
Multi-tenant legal-tech contract management for SME legal teams, boutique law firms, in-house counsel in multi-jurisdiction operations. Differentiated by:
- AI-native architecture (LLM/agents/embeddings in core data flow, not bolted on)
- Multi-tenant Postgres RLS day 1
- Multi-jurisdiction (~30 countries) clause variants
- On-prem self-host (Hetzner) — vs hosted-only competitors
- EU regulatory focus (GDPR/RODO/Schrems II/AI Act)
Monorepo layout
compass-contract-hub/
├── apps/
│ ├── web/ # Vite + React 18 + TS + shadcn (frontend)
│ ├── api/ # FastAPI + PydanticAI agents (Python)
│ ├── workers/ # Celery tasks (Python)
│ └── mcp-server/ # MCP server (Python)
├── packages/ # shared Python packages (uv workspace)
│ ├── core/ # auth, tenant context, audit, events
│ ├── schemas/ # Pydantic models (entities + LLM I/O)
│ ├── prompts/ # versioned prompts
│ ├── agents/ # PydanticAI agent definitions
│ ├── llm-gateway/ # LiteLLM + router + cache + Langfuse
│ ├── retrieval/ # Qdrant + chunking + hybrid search
│ ├── ingestion/ # PDF/DOCX/OCR pipeline
│ ├── evals/ # golden datasets + promptfoo runners
│ └── jurisdictions/ # pl/, de/, fr/, ... per-country rules
├── supabase/ # migrations + Edge Functions
├── scripts/hooks/ # Claude Code hooks (PreToolUse/PostToolUse)
├── docs/
│ ├── architecture/ # ADRs
│ └── handoffs/ # session handoff docs
├── .claude/
│ ├── skills/ # project-specific skills (compass-*)
│ ├── agents/ # subagent definitions
│ └── settings.json
├── CLAUDE.md
├── AGENTS.md
├── pyproject.toml # uv workspace root
└── package.json # npm workspace root
Stack
- Frontend: Vite + React 18 + TypeScript + shadcn/ui + Tailwind + Supabase JS
- Backend: Python 3.12 + FastAPI + PydanticAI + LangGraph (selective) + LiteLLM
- DB: Supabase Postgres + RLS day 1 (migration to self-hosted Hetzner pre enterprise launch)
- Vector: Qdrant + Voyage AI
voyage-multilingual-2 - Doc processing: unstructured.io + PyMuPDF + Marker + Tesseract OCR
- Observability: Langfuse self-hosted
- Eval: promptfoo + custom golden datasets, CI regression
- Task queue: Celery + Redis
- Hosting: Hetzner CCX23 Falkenstein DE
Setup (local dev)
Requirements:
- Node.js 20+ (
nvm install 20) - Python 3.12+
uv(pip install uv)- Docker + docker compose
- Supabase CLI (
brew install supabase/tap/supabase/scoop install supabase)
# Frontend
cd apps/web
npm install
npm run dev # http://localhost:8080
# Backend (separate terminal)
uv sync # installs all packages in workspace
cd apps/api
uv run uvicorn main:app --reload --port 8000
# Workers (separate terminal)
cd apps/workers
uv run celery -A celery_app worker --loglevel=info
# Local services (Redis, Qdrant, Langfuse)
docker compose -f docker-compose.dev.yml up -d
Env vars: copy .env.example → .env.local and populate. Never commit .env*.
Working in this repo
Read CLAUDE.md first. Defines:
- Project identity + 5 moats
- Stack final + skill priority order (legal-tech → compass-* → framework → communication)
- 8 AI-native mandates (ADR-001) — non-negotiable for every PR with LLM ops
- Security invariants (RLS day 1,
tenant_ideverywhere, audit log, AI legal disclaimer) - Cost discipline (per-tenant tracking, model routing rules)
- License posture (PRIVATE — no public commits, no LinkedIn mentions)
Per-PR self-check required in description:
compass-ai-native-mandates8-point checklist (every LLM/agent change)compass-architecture12-point checklist (architectural changes)compass-clause-taxonomy13-point checklist (prompt/schema changes)
PR review gated by compass-pr-reviewer subagent (see AGENTS.md).
License
Deferred. Decision pending IP lawyer review (Apache 2.0 vs AGPL-3.0 + Commercial Exception). Until then: no public distribution, no published forks, no derivative works outside this private repo.
Owner
Tobiasz Badura — solo founder (private build phase). Contact via personal channels only; do not use Bridgestone work email or systems for anything related to this project.