Workflow (apps/compass) is retired; Arbiter and the compass_* engine packages continue here with their history (git filter-repo from compass-contract-hub origin/main c2e7e8e, dropping apps/compass, its two workflows, .meduza and the two Workflow-only plans). Old->new SHAs: docs/history/compass-contract-hub-sha-map.txt. - workspace root renamed arbiter-workspace (uv.lock relocked); excludes apps/arbiter - .dockerignore/.gitignore/arbiter.yml/hooks no longer name apps/compass - README, CLAUDE.md, AGENTS.md, HANDOFF.md, ADR-005: the new repository and the new git URL form for the unchanged distributions (compass-ingestion etc.) - engine contract/import-boundary tests and docstrings point at this repository Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6.6 KiB
Arbiter + the compass_* engine
Repository. This is
Alpaq92/Arbiter, carved out ofAlpaq92/compass-contract-hubon 2026-11-14 with history preserved (git filter-repo) when Workflow (apps/compass) was retired and the old repository archived. It holds Arbiter (apps/arbiter, the contract-analysis module deployed on the platform at/arbiter) and the engine packages (packages/*, thecompass_*uv workspace). The Python distribution names (compass-ingestion,compass-schemas,compass-analysis, …) are unchanged; only the git URL moved:compass-ingestion @ git+https://github.com/Alpaq92/Arbiter@<sha>#subdirectory=packages/ingestion. Commit SHAs changed in the rewrite;docs/history/compass-contract-hub-sha-map.txtmaps every old SHA (as cited in older docs) to its new one.
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
Arbiter/
├── apps/
│ ├── arbiter/ # Arbiter: the contract-analysis module (FastAPI + vanilla JS, own CLAUDE.md)
│ ├── 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: pypdfium2 (PDFium) + unstructured.io + Tesseract OCR — no GPL/AGPL in
uv.lock(scripts/license_gate.py) - 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.
apps/arbiter declares Apache-2.0 in its own CLAUDE.md, README.md and CREDITS.md. (apps/compass, the retired Workflow app, lived in the archived compass-contract-hub and declared Apache-2.0 in its own CLAUDE.md, README.md and CREDITS.md but has no LICENSE file, which waits for the engine's licence decision; the engine's licence is undecided (above), and the engine pulls in PyMuPDF (AGPL-3.0) today. Replacing the PDF reader is open: the 2026-09-24 choice of pypdfium2 rested on a wrong summary of the engine's own measurement, which rejected pypdfium2 on 2026-09-11 (docs/specs/2026-09-11-czytnik-pdf-porownanie.md, S3 negative: it drops or moves points and paragraphs in 4 of the 12 gold-set PDFs), so the decision is back with Tobiasz.
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.