Arbiter repository: carved out of compass-contract-hub, Workflow left behind

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>
This commit is contained in:
2026-11-14 13:39:55 +01:00
co-authored by Claude Opus 5.5
parent 3f6b736501
commit 085bfc9afe
24 changed files with 1341 additions and 90 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: compass-pr-reviewer
description: Use when reviewing a PR in compass-contract-hub before merge to main — wrapper over [[pr-reviewer-orchestrator]] enforcing Compass's 3-layer self-check (compass-architecture 12-pkt + compass-ai-native-mandates 8-pkt + compass-clause-taxonomy 13-pkt conditionally if PR touches clause logic). Block merge on any FAIL without explicit `# admin-operation-justified:` marker per CLAUDE.md Security invariants. Mandatory per CLAUDE.md `AI-native discipline` ("compass-pr-reviewer subagent block merge gdy fail bez justification"). Triggers include "review this PR", "is this branch ready to merge", "run pre-merge checks". SKIP for generic code review (use `/code-review`), RLS-specific audit on migrations (use [[compass-rls-auditor]] FIRST, then this), changes purely in docs/ or .claude/ without code impact.
description: Use when reviewing a PR in Arbiter before merge to main — wrapper over [[pr-reviewer-orchestrator]] enforcing Compass's 3-layer self-check (compass-architecture 12-pkt + compass-ai-native-mandates 8-pkt + compass-clause-taxonomy 13-pkt conditionally if PR touches clause logic). Block merge on any FAIL without explicit `# admin-operation-justified:` marker per CLAUDE.md Security invariants. Mandatory per CLAUDE.md `AI-native discipline` ("compass-pr-reviewer subagent block merge gdy fail bez justification"). Triggers include "review this PR", "is this branch ready to merge", "run pre-merge checks". SKIP for generic code review (use `/code-review`), RLS-specific audit on migrations (use [[compass-rls-auditor]] FIRST, then this), changes purely in docs/ or .claude/ without code impact.
tools:
- Read
- Grep
@@ -3,7 +3,7 @@ name: compass-ai-native-mandates
description: Use when reviewujesz lub piszesz dowolny kod produkcyjny w Compass dotykający LLM/agents/streaming/eval/cost/cache/async/observability — enforcement 8 mandatów z ADR-001 (M1 Agent-first interactions / M2 Schema-first LLM I/O / M3 Streaming-first UI / M4 Eval-driven prompts / M5 Cost-aware multi-model routing / M6 Cache-aware / M7 Async-first task queue / M8 Observable LLM ops). Każdy mandat z good/bad/anti-pattern examples + edge case kiedy można relax z required justification. Checklist którego `compass-pr-reviewer` subagent używa przed merge. "Kiedy mandat NIE applies": batch scripts internal, dev tools, one-off migrations. Mandatory self-check 8 punktów (1 per mandat) z konkretnymi pytaniami przed merge. Synergizuje z [[compass-architecture]] (12-punkt self-check dla architectural change uzupełnia ten), [[compass-clause-taxonomy]] (M2+M4 directly relevant dla extraction prompts), legal-tech (AI legal disclaimer wymóg dla M2/M8 outputs), rag-pipeline-builder (eval framework dla M4). SKIP dla internal dev scripts gdzie mandates explicite NIE applies (CSV imports, migrations, debug utilities — patrz fundament 9), pure frontend zmian bez LLM contact, infra ops (Caddy/Hetzner — use cloud-deploy).
---
Base directory for this skill: `compass-contract-hub/.claude/skills/compass-ai-native-mandates/`
Base directory for this skill: `Arbiter/.claude/skills/compass-ai-native-mandates/`
# Compass — AI-native mandates enforcement skill
+1 -1
View File
@@ -3,7 +3,7 @@ name: compass-architecture
description: Use when projektujesz, modyfikujesz lub debugujesz system Compass — monorepo structure (apps/web|api|workers|mcp-server + packages/agents|prompts|schemas|ingestion|llm-gateway|retrieval|evals|jurisdictions|core), data model (Tenant/User/Company/Contract/Clause/ClauseLibraryEntry/Jurisdiction/Evaluation z RLS day 1), multi-tenant invariants (tenant_id w JWT, RLS policy każdej tabeli, audit log każdej operacji), API conventions (RESTful + SSE streaming, Pydantic input/output, error shape), deployment topology (Supabase Auth/DB/Storage + Hetzner CCX23 Python API + Celery + Qdrant + Langfuse + Redis), komunikacja frontend↔backend (Supabase JWT verification w FastAPI, SSE via /api/stream/{task_id}, Edge Functions jako bridge). Moduł analizy umów (`compass_analysis`, ADR-005) to silnik osobnej aplikacji za granicą procesu — self-check sprawdza w nim kontrakt procesu zamiast RLS i endpointów. 7 fundamentów (monorepo + uv workspace, data model + RLS, multi-tenant invariants, API conventions, deployment topology, communication patterns, package boundaries). Mandatory self-check 12 punktów przed architectural change. Synergizuje z [[compass-ai-native-mandates]] (każda zmiana musi przejść 8 mandatów z ADR-001), [[compass-clause-taxonomy]] (Pydantic+zod sync), legal-tech (clause taxonomy domain), rag-pipeline-builder (retrieval implementation), cloud-deploy (Hetzner ops), mcp-server-builder (apps/mcp-server). SKIP dla zmian czysto frontend bez wpływu na backend/data model (use frontend-web-ui), dla one-off scripts internal (mandates nie applies — patrz [[compass-ai-native-mandates]] "kiedy NIE applies").
---
Base directory for this skill: `compass-contract-hub/.claude/skills/compass-architecture/`
Base directory for this skill: `Arbiter/.claude/skills/compass-architecture/`
# Compass — architecture skill
@@ -3,7 +3,7 @@ name: compass-clause-taxonomy
description: Use when projektujesz, modyfikujesz lub debugujesz extraction/review/storage dla 14-clause taxonomy w Compass (liability, ip, termination, dataPrivacy, payment, delivery, confidentiality, renewal, maintenance, scopeOfWork, sla, security, mileage, other) — Pydantic schema per clause type (fields + validators + confidence + source_location), zod mirror w `src/components/contract-form/schema.ts` (sync rule Python↔TS), per-jurisdiction variants w `packages/jurisdictions/{country}/{clause}.py` (PL/DE/FR/US z local rules), extraction prompt templates w `packages/prompts/clauses/{clause}_extraction_v{N}.py` (versioned, eval-gated), confidence jako surowa liczba 0..1 z dopiskiem „deklarowana przez model” (bez progów, etykiet słownych, kolorów i ukrywania; próg tylko z pomiarem na goldzie dla konkretnego modelu i odcisku promptu), red flag patterns (delegated do legal-tech skill który ma pełną tabelę), workflow dodawania nowej clause type (Pydantic + zod mirror + prompt + golden 20+ + eval + migration + UI field). 7 fundamentów (14-clause baseline matchuje legal-tech, Pydantic schema template, zod mirror sync, per-jurisdiction package, prompt versioning, confidence bez progów, add-clause workflow). Mandatory self-check 13 punktów przed dodaniem/zmianą clause type. Synergizuje z legal-tech (full red flag library + GDPR/AI Act + multi-jurisdiction baseline), [[compass-ai-native-mandates]] (M2 schema-first + M4 eval-driven), [[compass-architecture]] (RLS na clauses table, tenant_id propagation). SKIP dla generic legal questions (use legal-tech), drafting umowy from scratch (legal-tech "kiedy NIE"), zmian w UI bez schema change (use frontend-web-ui).
---
Base directory for this skill: `compass-contract-hub/.claude/skills/compass-clause-taxonomy/`
Base directory for this skill: `Arbiter/.claude/skills/compass-clause-taxonomy/`
# Compass — clause taxonomy skill
+1 -1
View File
@@ -3,7 +3,7 @@ name: compass-legal-review
description: Use when robisz internal-use contract review w Claude Code reusing Compass packages jako importowaną Python library (NIE production runtime) — workflow Tobiasza dla 1-5 kontraktów/tydzień własnej review bez deploymentu apps/api ani zewnętrznego API LLM. Side-channel z ADR-002 (Opcja A subset). Claude (model) jest LLM — Ty mentalnie aplikujesz SYSTEM_PROMPT z compass_prompts + few-shots jako structured guardrail, konstruujesz LiabilityClause(**output) z Pydantic validators (auto-disclaimer + unlimited→Needs Attention downgrade), runujesz post_extraction_check z compass_jurisdictions.pl.liability (KC art. 473 § 2 + 484 § 2), zapisujesz JSON + Markdown report + audit log. Identical schemas, different runtime — provider-agnostic gateway w apps/api dla produkcji, ta sama library w Claude Code dla solo founder phase. 6 fundamentów (decyzja side-channel vs apps/api, library imports + venv, mentalny LLM dispatch + Pydantic guardrail, jurisdiction post-check, output format JSON+MD+audit, hard guardrails AI legal disclaimer). Mandatory self-check 12 punktów. Synergizuje z [[compass-architecture]] (package boundaries — Ty reusujesz packages, nie modyfikujesz), [[compass-clause-taxonomy]] (14-clause taxonomy + Pydantic+zod sync — used as-is, NIE dodajesz typów tutaj), [[compass-ai-native-mandates]] (M2 schema-first + M8 observable applies nawet w internal — ślad JSON+MD jako observability surrogate), legal-tech (red flag library + GDPR/AI Act + jurisdiction rules), pisanie-pl (każdy PL fragment markdown report przez 10-pkt self-check). SKIP dla non-PL kontraktów dopóki Sprint 4 nie dorzuci EN/DE jurisdiction modules (use legal-tech baseline tymczasowo), kontraktów >50 stron (chunking required — czekaj na retrieval pipeline Sprint 4+), real-time customer-facing flows (use apps/api production runtime), modyfikacji schemas/prompts/jurisdictions (to NIE jest skill do edytowania packages — use compass-clause-taxonomy + compass-architecture).
---
Base directory for this skill: `compass-contract-hub/.claude/skills/compass-legal-review/`
Base directory for this skill: `Arbiter/.claude/skills/compass-legal-review/`
# Compass — legal review (Claude Code internal-use)
+5 -11
View File
@@ -1,16 +1,10 @@
# The engine has no Dockerfile of its own. The only build that reads this directory is Compass's,
# which takes the repository root as the named build context `engine`
# (apps/compass/docker-compose.yml) and copies the engine members by name
# (apps/compass/backend/Dockerfile). BuildKit applies this file to a named context too (checked
# with buildx 0.32 on a scratch directory), so what a build may send stops here: virtualenvs,
# node_modules, env files with secrets, and Compass itself. Compass's own context is
# apps/compass/backend, which this file does not govern.
#
# The last matching line wins, so apps/compass/ comes after the .env.example exception, or that
# exception would bring apps/compass/.env.example back in.
# The engine has no Dockerfile of its own, and no build in this repository reads the repository
# root as a context: Arbiter's image is built from apps/arbiter/backend (+ the named context
# `frontend`), which this file does not govern, and the engine is not in that image (ENGINE_PYTHON
# points at a separate virtualenv). The file stays as a guard for any future build that takes the
# root as a context: virtualenvs, node_modules and env files with secrets stop here.
**/.venv
**/node_modules
**/.env
**/.env.*
!**/.env.example
apps/compass/
+3 -2
View File
@@ -1,5 +1,6 @@
# Arbiter lives in apps/arbiter of this repository (the Compass split plan, M1). GitHub reads
# workflows only from the repository root, so this file sits here, as compass.yml does.
# Arbiter lives in apps/arbiter of this repository (the Compass split plan, M1; the repository was
# carved out of compass-contract-hub on 2026-11-14, when Workflow was retired). GitHub reads
# workflows only from the repository root, so this file sits here.
name: arbiter
on:
push:
+5 -5
View File
@@ -53,8 +53,8 @@ service-account.json
service_account.json
secrets.yml
secrets.yaml
# Env files at any depth. apps/compass keeps its own .gitignore, but it is then the
# only thing between its .env / .env.migrate and a commit from the repo root.
# Env files at any depth. apps/arbiter keeps its own .gitignore, but this is the line between
# its .env / .env.migrate and a commit from the repo root.
**/.env
**/.env.*
!**/*.example
@@ -90,9 +90,9 @@ Thumbs.db
ehthumbs.db
Desktop.ini
# --- Compass-specific ---
# Compass keeps uploaded contracts under data/ (backend/app/config.py DATA_DIR).
apps/compass/**/data/
# --- Arbiter-specific ---
# Arbiter keeps uploaded contracts under data/ (backend/app/config.py DATA_DIR).
apps/arbiter/**/data/
# Per-tenant cost reports cached locally before Langfuse upload
.cost-reports/
# Local agent traces (Langfuse fallback when service unavailable)
+2 -2
View File
@@ -1,6 +1,6 @@
# AGENTS.md — compass-contract-hub
# AGENTS.md — Arbiter (+ the compass_* engine)
> **Zakres tego pliku: silnik i `apps/web`. W `apps/compass/**` obowiązuje `apps/compass/CLAUDE.md`**, a subagenci i reguły opisane niżej (RLS, modele chmurowe, trasowanie przez `packages/llm-gateway`) tam nie obowiązują. `apps/web` to stary prototyp z Lovable, nie aplikacja Compass; aplikacja Compass leży od 2026-09-24 w `apps/compass` (ADR-003 Compassu: `apps/compass/docs/architecture/ADR-003-jedno-repo.md`).
> **Zakres tego pliku: silnik i `apps/web`. W `apps/arbiter/**` obowiązuje `apps/arbiter/CLAUDE.md`**, a subagenci i reguły opisane niżej (RLS, modele chmurowe, trasowanie przez `packages/llm-gateway`) tam nie obowiązują. `apps/web` to stary prototyp z Lovable. Aplikacja Compass (Workflow, `apps/compass`) została wycofana 2026-11-14 i została w zarchiwizowanym `compass-contract-hub`.
Multi-agent topology dla Compass. Definiuje 8 specialized subagentów (+ 1 placeholder dla Sprint 5) used przez Claude Code w tym repo. **Każdy subagent ma single clear responsibility**, properly scoped tools (least-privilege), and explicit routing rules.
+13 -3
View File
@@ -1,8 +1,18 @@
# CLAUDE.md — compass-contract-hub
# CLAUDE.md — Arbiter (+ the compass_* engine)
Project memory for Claude Code working in this repository. **Read first w każdej sesji.** Komplementuje `~/.claude/CLAUDE.md` (user-level global instructions).
> **Zakres tego pliku: silnik i `apps/web`. W `apps/compass/**` obowiązuje `apps/compass/CLAUDE.md`**, a reguły stąd (stos, RLS, modele chmurowe, subagenci z `AGENTS.md`) tam nie obowiązują, poza sekcjami „License posture” i „Bridgestone IP risk”, które wiążą całe repo. Sesja otwarta w `apps/compass` wczytuje też ten plik, bo Claude Code czyta `CLAUDE.md` wszystkich katalogów nadrzędnych. `apps/web` to stary prototyp z Lovable, nie aplikacja Compass; aplikacja Compass leży od 2026-09-24 w `apps/compass` (ADR-003 Compassu: `apps/compass/docs/architecture/ADR-003-jedno-repo.md`). Oba projekty numerują ADR osobno, więc w odwołaniach zawsze z nazwą projektu: „ADR-003 silnika”, „ADR-003 Compassu”.
> **Repository.** This is `Alpaq92/Arbiter`, carved out of `Alpaq92/compass-contract-hub` on
> 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/*`, the
> `compass_*` 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.txt` maps every old
> SHA (as cited in older docs) to its new one.
> **Zakres tego pliku: silnik i `apps/web`. W `apps/arbiter/**` obowiązuje `apps/arbiter/CLAUDE.md`**, a reguły stąd (stos, RLS, modele chmurowe, subagenci z `AGENTS.md`) tam nie obowiązują, poza sekcjami „License posture” i „Bridgestone IP risk”, które wiążą całe repo. Sesja otwarta w `apps/arbiter` wczytuje też ten plik, bo Claude Code czyta `CLAUDE.md` wszystkich katalogów nadrzędnych. `apps/web` to stary prototyp z Lovable. Aplikacja Compass (Workflow, `apps/compass`) została wycofana 2026-11-14 i została w zarchiwizowanym `compass-contract-hub`; odwołania „ADR-00x Compassu” wskazują tamto repo. Silnik i Arbiter numerują ADR osobno, więc w odwołaniach zawsze z nazwą projektu: „ADR-003 silnika”.
## Project identity
@@ -20,7 +30,7 @@ Project memory for Claude Code working in this repository. **Read first w każde
## Stack final (zatwierdzony 2026-05-17)
Ten stos opisuje aplikację web z `apps/web` i warstwy `apps/api`, `apps/workers`, `apps/mcp-server`; moduł analizy umów (`packages/analysis`) i aplikacja Compass z rodziny AI Kancelaria są poza nim (ADR-005 silnika, `docs/architecture/ADR-005-modul-analizy-osobna-aplikacja.md`). Aplikacja Compass nie ma już osobnego repo: od 2026-09-24 leży w `apps/compass`, z własnym stosem i własnym `CLAUDE.md`, i woła silnik jako osobny proces, nigdy go nie importuje (ADR-003 Compassu).
Ten stos opisuje aplikację web z `apps/web` i warstwy `apps/api`, `apps/workers`, `apps/mcp-server`; moduł analizy umów (`packages/analysis`) i aplikacja Compass z rodziny AI Kancelaria są poza nim (ADR-005 silnika, `docs/architecture/ADR-005-modul-analizy-osobna-aplikacja.md`). Jedyny konsument silnika w tym repo to Arbiter (`apps/arbiter`, własny stos i własny `CLAUDE.md`): woła silnik jako osobny proces, nigdy go nie importuje (`test_engine_import_boundary.py`). Lexicon używa `compass_ingestion` jako biblioteki, przypiętej po commicie z tego repo.
**Frontend (apps/web/):**
- Vite + React 18 + TypeScript + shadcn/ui + Tailwind
+11 -14
View File
@@ -1,21 +1,18 @@
# HANDOFF — Compass, moduł analizy umów
## Compass: stan w apps/compass/HANDOFF.md
## Repo: Arbiter (od 2026-11-14)
Od 24.09.2026 silnik i aplikacja Compass są w jednym repo: aplikacja leży w `apps/compass`
(`git subtree add` bez squasha, commit importu `8f1707b` na gałęzi `compass/import`, jeszcze
niewypchniętej). Stan aplikacji, jej kolejne kroki i pułapki są w `apps/compass/HANDOFF.md`; ten
plik opisuje silnik. Co z tego musi wiedzieć sesja silnika:
Workflow (`apps/compass`) wycofany; Arbiter i pakiety silnika wydzielone z `compass-contract-hub`
(zarchiwizowane) do `Alpaq92/Arbiter` z zachowaną historią (`git filter-repo`). SHA się zmieniły:
stare → nowe w `docs/history/compass-contract-hub-sha-map.txt`. Co z tego musi wiedzieć sesja silnika:
- Klon roboczy od 24.09: `C:\Users\badur\projects\compass-contract-hub` (poza OneDrive). Klon na
OneDrive przestaje być używany, ale zostaje.
- Aplikacja woła silnik jako osobny proces i nie importuje `compass_*`. Zmiana w `packages/` może ją
zepsuć bez zmiany w `apps/compass`: test kontraktu
(`apps/compass/backend/tests/test_engine_contract.py`) pomija się bez `COMPASS_ENGINE_PYTHON`.
Dlatego CI aplikacji to dwa workflowy w `.github/workflows`: `compass.yml` (zmiany w
`apps/compass`) i `compass-kontrakt.yml` (test kontraktu przy każdej zmianie w `packages/**`).
Oba potrzebują sekretu `DREDD_CORE_TOKEN`, którego w repo jeszcze nie ma, więc do tego czasu
każdy PR silnika dotykający `packages/**` będzie czerwony.
- Arbiter woła silnik jako osobny proces i nie importuje `compass_*`. Zmiana w `packages/` może go
zepsuć bez zmiany w `apps/arbiter`: test kontraktu
(`apps/arbiter/backend/tests/test_engine_contract.py`) pomija się bez `COMPASS_ENGINE_PYTHON`.
Dlatego CI to `arbiter.yml` (zmiany w `apps/arbiter`) i `arbiter-kontrakt.yml` (test kontraktu
przy każdej zmianie w `packages/**`). Oba potrzebują sekretu `DREDD_CORE_TOKEN` w nowym repo.
- Lexicon instaluje `compass-schemas` + `compass-ingestion` z tego repo po commicie
(`git+https://github.com/Alpaq92/Arbiter@<sha>#subdirectory=packages/...`).
- Scalanie wyłącznie commitem scalającym: squash i rebase merge są wyłączone w całym repo
(decyzja 24.09, ustawienie sprawdzone przez API), bo dokumenty aplikacji cytują SHA jej
historii. Na repo chodzi naraz jedna pętla Meduzy.
+15 -3
View File
@@ -1,4 +1,15 @@
# Compass — open-core legal-tech contract management
# Arbiter + the compass_* engine
> **Repository.** This is `Alpaq92/Arbiter`, carved out of `Alpaq92/compass-contract-hub` on
> 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/*`, the
> `compass_*` 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.txt` maps 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).
@@ -16,8 +27,9 @@ Multi-tenant legal-tech contract management for SME legal teams, boutique law fi
## Monorepo layout
```
compass-contract-hub/
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)
@@ -112,7 +124,7 @@ PR review gated by `compass-pr-reviewer` subagent (see `AGENTS.md`).
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/compass` (the Compass app, in this repo since 2026-09-24) declares 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.
`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
+1 -1
View File
@@ -1,6 +1,6 @@
"""The engine call, as data.
The analysis engine (`compass_analysis` from `compass-contract-hub`) runs as a **separate
The analysis engine (`compass_analysis` from `packages/analysis` of this repository) runs as a **separate
process** — never imported, see ADR-001. The whole boundary lives here: what the process is
allowed to see (the argument vector and the environment), how it is watched while it runs, and
what is believed of what it leaves behind. No database and no settings object — every value comes
+1 -1
View File
@@ -1,6 +1,6 @@
"""The workstation: hand a run to the program on the lawyer's laptop, hear it breathe, take its verdict.
Ported from Compass (`apps/compass/backend/app/services/worker.py`) in M1c. Deployment mode
Ported from Compass (`apps/compass/backend/app/services/worker.py` of compass-contract-hub, archived) in M1c. Deployment mode
S-laptop of spec section 3. The application stands on a server the laptop can reach and the laptop
stands behind a router the server cannot, so the traffic only ever goes one way: the laptop asks
for work (`claim`), says it is still alive every half minute (`beat`) and comes back with what the
@@ -11,7 +11,7 @@ So this tier runs the installed engine and asserts only the four promises the ap
(design section 11). It is opt-in, because the loop's gate must stay green on a machine with no
engine installed:
COMPASS_ENGINE_PYTHON=C:\\...\\compass-contract-hub\\.venv\\Scripts\\python.exe pytest -q
COMPASS_ENGINE_PYTHON=C:\\...\\Arbiter\\.venv\\Scripts\\python.exe pytest -q
The variable is deliberately *not* the app's `ENGINE_PYTHON` setting: a developer with a working
`.env` should not silently start paying for a subprocess on every `pytest` run. Opting in is a
@@ -118,6 +118,7 @@ def test_the_requirements_scan_goes_red_on_every_way_to_name_the_engine(tmp_path
"compass_analysis==0.1.0",
"Compass.Ingestion>=0.1",
"-e git+https://github.com/tobayah/compass-contract-hub.git#egg=compass-analysis",
"compass-analysis @ git+https://github.com/Alpaq92/Arbiter@4945bc9#subdirectory=packages/analysis",
"compass-analysis # the engine",
)
files = []
+1 -1
View File
@@ -693,7 +693,7 @@ function confirmDeleteSubject(id) {
});
}
/* ════ M1c: the analysis pipeline's screens, ported from Compass (apps/compass/frontend/app.js) ════ */
/* ════ M1c: the analysis pipeline's screens, ported from Compass (apps/compass/frontend/app.js of the archived compass-contract-hub) ════ */
/* „27 minut temu” — how long ago, in the platform's own words, so the plural rule is not ours to
get wrong. Rounded to the minute and never below one: this answers „is that machine still
there”, and seconds ticking on a screen are noise on that question. */
@@ -38,7 +38,7 @@ ADR-001 wymaga uzasadnienia każdego odstępstwa (`ADR-001-ai-native.md:22`). Dl
Tymczasem zapadły decyzje, które mówią, czym moduł jest:
- 2026-09-11 Tobiasz zatwierdził spec aplikacji Compass z rodziny AI Kancelaria
(`apps/compass/docs/specs/2026-09-10-compass-app-design.md`, do 2026-09-24 w osobnym repo, dalej
(`compass-contract-hub` (zarchiwizowane): `apps/compass/docs/specs/2026-09-10-compass-app-design.md`, do 2026-09-24 w osobnym repo, dalej
„spec aplikacji”). Moduł jest w nim silnikiem aplikacji, a ten ADR to warunek W4 (`:276`).
- Cykl napraw (`docs/specs/2026-09-11-cykl-napraw-przed-integracja.md`, dalej „spec cyklu”) usunął
blokery przed integracją i zapisał kontrakt modułu z aplikacją:
@@ -54,7 +54,7 @@ wyjątkami z warunkiem powrotu.**
- Aplikacja Compass z rodziny AI Kancelaria ma osobne, prywatne repo (D1, spec aplikacji `:29`).
**Dopisek 2026-09-24:** D1 zastąpione przez ADR-003 Compassu
(`apps/compass/docs/architecture/ADR-003-jedno-repo.md`): aplikacja leży w tym repo jako
(`compass-contract-hub` (zarchiwizowane): `apps/compass/docs/architecture/ADR-003-jedno-repo.md`): aplikacja leży w tym repo jako
`apps/compass`, a granica procesu z następnego punktu (D6) zostaje bez zmian.
- Uruchamia moduł jako osobny proces `python -m compass_analysis` i nie importuje żadnego
`compass_*` (D6, `:45`). Jedyna granica: argumenty CLI, kod wyjścia, JSON `AnalysisReport` i plik
@@ -217,5 +217,11 @@ izoluje awarię silnika. Argument licencyjny D6 dotyczy czytnika PDF, a to osobn
- `docs/specs/2026-09-11-sciezka-klasyfikacji.md` — kontrakt modułu z aplikacją (§3, §4, §9, §11-§13)
- `docs/specs/2026-09-11-cykl-napraw-przed-integracja.md` §2 — T1, T4, S10, S12, S14, S16
- `docs/audits/2026-09-10_zgodnosc-modulu-analizy/00-synteza.md` — Z-15, Z-19, Z-25, Z-26, Z-29, Z-30, Z-31
- `apps/compass/docs/specs/2026-09-10-compass-app-design.md` - D1 (zastąpione przez ADR-003 Compassu), D6-D8, §3, W4
- `compass-contract-hub` (zarchiwizowane): `apps/compass/docs/specs/2026-09-10-compass-app-design.md` - D1 (zastąpione przez ADR-003 Compassu), D6-D8, §3, W4
- `.claude/skills/compass-architecture/SKILL.md` — sekcja „Moduł analizy umów (ADR-005)”
## Uwaga 2026-11-14
Workflow (`apps/compass`) wycofany, repo `compass-contract-hub` zarchiwizowane; silnik żyje dalej w
`Alpaq92/Arbiter`, a jego jedynym konsumentem-procesem jest Arbiter (`apps/arbiter`). Ścieżki
`apps/compass/...` powyżej odnoszą się do zarchiwizowanego repo. Granica procesu (D6) bez zmian.
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,11 +1,11 @@
{
"name": "compass-contract-hub",
"name": "arbiter-workspace",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "compass-contract-hub",
"name": "arbiter-workspace",
"version": "0.1.0",
"workspaces": [
"apps/web"
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "compass-contract-hub",
"name": "arbiter-workspace",
"private": true,
"version": "0.1.0",
"description": "Compass — open-core legal-tech contract management (monorepo root). PRIVATE.",
+6 -6
View File
@@ -1,7 +1,7 @@
[project]
name = "compass-contract-hub"
name = "arbiter-workspace"
version = "0.1.0"
description = "Compass — open-core legal-tech contract management (monorepo root)"
description = "Arbiter (contract analysis module) + the compass_* engine packages (uv workspace root)"
readme = "README.md"
requires-python = ">=3.12"
authors = [
@@ -26,9 +26,9 @@ members = [
"packages/jurisdictions",
"packages/analysis",
]
# apps/compass is an application with its own venv and requirements (a private
# apps/arbiter is an application with its own venv and requirements (a private
# dependency included), not a workspace member: adding it would pull that into uv.lock.
exclude = ["apps/compass"]
exclude = ["apps/arbiter"]
[dependency-groups]
dev = [
@@ -112,8 +112,8 @@ markers = [
"rls: cross-tenant isolation tests",
]
asyncio_mode = "auto"
# apps/* carry no tests of their own here; apps/compass runs its suite from
# apps/compass/backend with its own venv, and collecting it from here ends in import errors.
# apps/* carry no tests of their own here; apps/arbiter runs its suite from
# apps/arbiter/backend with its own venv, and collecting it from here ends in import errors.
testpaths = ["packages", "tests"]
# Every package carries its own tests/__init__.py, so the default "prepend" mode
# tries to import them all as one top-level `tests` package and the second one
+1 -1
View File
@@ -73,7 +73,7 @@ def staged_files() -> list[Path]:
except (subprocess.CalledProcessError, FileNotFoundError):
return []
# --name-only prints paths from the repo root, not from the cwd. A session started in
# apps/compass would look for apps/compass/apps/compass/... and skip the content scan.
# apps/arbiter would look for apps/arbiter/apps/arbiter/... and skip the content scan.
return [Path(top) / line.strip() for line in out.splitlines() if line.strip()]
Generated
+28 -28
View File
@@ -26,10 +26,10 @@ resolution-markers = [
[manifest]
members = [
"arbiter-workspace",
"compass-agents",
"compass-analysis",
"compass-api",
"compass-contract-hub",
"compass-core",
"compass-evals",
"compass-ingestion",
@@ -237,6 +237,33 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128", size = 9566, upload-time = "2020-05-11T07:59:49.499Z" },
]
[[package]]
name = "arbiter-workspace"
version = "0.1.0"
source = { virtual = "." }
[package.dev-dependencies]
dev = [
{ name = "mypy" },
{ name = "pytest" },
{ name = "pytest-asyncio" },
{ name = "pytest-cov" },
{ name = "reportlab" },
{ name = "ruff" },
]
[package.metadata]
[package.metadata.requires-dev]
dev = [
{ name = "mypy", specifier = ">=1.11" },
{ name = "pytest", specifier = ">=8.0" },
{ name = "pytest-asyncio", specifier = ">=0.23" },
{ name = "pytest-cov", specifier = ">=5.0" },
{ name = "reportlab", specifier = ">=4.2" },
{ name = "ruff", specifier = ">=0.6" },
]
[[package]]
name = "ast-serialize"
version = "0.4.0"
@@ -749,33 +776,6 @@ requires-dist = [
{ name = "uvicorn", extras = ["standard"], specifier = ">=0.30" },
]
[[package]]
name = "compass-contract-hub"
version = "0.1.0"
source = { virtual = "." }
[package.dev-dependencies]
dev = [
{ name = "mypy" },
{ name = "pytest" },
{ name = "pytest-asyncio" },
{ name = "pytest-cov" },
{ name = "reportlab" },
{ name = "ruff" },
]
[package.metadata]
[package.metadata.requires-dev]
dev = [
{ name = "mypy", specifier = ">=1.11" },
{ name = "pytest", specifier = ">=8.0" },
{ name = "pytest-asyncio", specifier = ">=0.23" },
{ name = "pytest-cov", specifier = ">=5.0" },
{ name = "reportlab", specifier = ">=4.2" },
{ name = "ruff", specifier = ">=0.6" },
]
[[package]]
name = "compass-core"
version = "0.1.0"