Legal-intake (access-to-justice) domain plugin for the OakQuant timber substrate.
Project description
oak-domain-legal-intake
An access-to-justice legal-intake domain for the OakQuant platform — the first domain built on Timber's plugin system.
What it is
oak-domain-legal-intake is a discoverable Timber domain plugin. Installing it adds a
legal-intake capability to an OakQuant deployment; leaving it out is a no-op. It is fully
additive and opt-in — it ships its own models, services, and integration points and
wires them into the platform's shared registries at startup, with no edits to the core
Timber, Grove, or Acorn libraries.
It is also the proving ground for OakQuant's domain-plugin pattern: the first domain built on Timber's plugin system that is not the investments domain, demonstrating that a brand new, unrelated domain can plug in cleanly through a single entry point per layer.
Why legal intake — access to justice
Legal aid and pro-bono organizations triage far more people than they can serve. The quality and consistency of that triage decides who gets help. This domain is the data foundation for doing that triage fairly, accountably, and observably — built so the people running it can see what happens and contest it. Several design choices encode that intent directly into the schema:
- Data minimization — operational fields only; no free-text PII columns.
- Protected attributes are isolated in
IntakeCase.audit_attributes(used only by a fairness audit), kept out of the operational fields used for routing. - Help, not gate — a
Dispositionrecords a routing or referral, never a "denial". - Append-only logs — the event and outcome logs support contestability and audit.
- Meaningful human review —
StaffDecisioncaptures the human's decision and any override, including the reason.
Phase 0 — instrumentation only. This release captures the data foundation with no live recommendation: cases, an append-only event log, staff decisions (with override capture), dispositions, and delayed/partial outcomes. It records; it does not advise.
The plugin shape
This package plugs into all three OakQuant layers through one entry point per layer. Each layer discovers only its own entry-point group and imports only that entry point's module — so the Timber layer never pulls in Grove/FastAPI or Acorn.
| Layer | Entry-point group | Object | Contributes |
|---|---|---|---|
| Timber | timber.domains |
oak_domain_legal_intake:LegalIntakeDomain |
ORM models + intake / outcome / audit services |
| Grove | grove.domains |
oak_domain_legal_intake.grove_plugin:LegalIntakeGroveDomain |
FastAPI router mounted under /legal-intake (/health, /info) |
| Acorn | acorn.domains |
oak_domain_legal_intake.acorn_plugin:LegalIntakeAcornDomain |
agent tool legal_intake_status (read-only) |
What the domain provides (Phase 0)
Models
All models subclass Timber's shared Base (common.models.base.Base), so defining them
adds them to Base.metadata and Timber's table-creation step creates their tables.
| Model | Table | Role |
|---|---|---|
IntakeCase |
legal_intake_cases |
a matter in triage; operational fields only, protected attrs isolated in audit_attributes |
IntakeEvent |
legal_intake_events |
append-only event log (intake / staff action / audit) |
StaffDecision |
legal_intake_staff_decisions |
human review with structured override capture |
Disposition |
legal_intake_dispositions |
terminal routing/referral (help-not-gate: never a denial) |
OutcomeEvent |
legal_intake_outcomes |
ingested downstream outcomes, for later evaluation |
Services
Registered under service_registry.domain("legal_intake"):
intake(IntakeService) —record_intake,record_event,list_queue,get_caseoutcome(OutcomeService) —ingest_outcome,list_outcomesaudit(AuditService) —log,history
How discovery works
The domain advertises itself via the timber.domains entry point. At startup
(initialize_timber, Step 8.5), Timber discovers this package, instantiates
LegalIntakeDomain, and calls its register(ctx) once, before table creation — so the
registered models get their tables created in the following step. register(ctx) takes
every runtime dependency (db handle, registries) from the injected DomainContext rather
than importing core singletons, keeping the dependency direction one-way.
The Grove and Acorn plugins follow the same shape against their own entry-point groups and
contexts (GroveDomainContext / AcornDomainContext), registered when those apps start.
Install
pip install oak-domain-legal-intake
This pulls in timber-common>=0.6.14 (the plugin scaffolding: ServiceRegistry,
DomainPlugin / DomainContext, timber.domains discovery, and the init Step 8.5 hook).
Once installed, discovery is automatic via the entry points — no configuration needed. The
optional dev extra (pip install "oak-domain-legal-intake[dev]") adds pytest and
fastapi for running the test suite, including the Grove plugin standalone.
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oak_domain_legal_intake-0.1.0.tar.gz.
File metadata
- Download URL: oak_domain_legal_intake-0.1.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3c0d915a43ac75b4304c0c196e79220bc3a9e811be5ff94fc3ad4b4e62bb498
|
|
| MD5 |
4524f225a167a0fc5cdb9abe8bcb5081
|
|
| BLAKE2b-256 |
bdde9c93a3301b2e95957fc090b3c90b0a5c55b59d8aa8d29802bbd0bbff9ad9
|
Provenance
The following attestation bundles were made for oak_domain_legal_intake-0.1.0.tar.gz:
Publisher:
release.yml on oakquant-ai/oak-domain-legal-intake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oak_domain_legal_intake-0.1.0.tar.gz -
Subject digest:
c3c0d915a43ac75b4304c0c196e79220bc3a9e811be5ff94fc3ad4b4e62bb498 - Sigstore transparency entry: 1986210174
- Sigstore integration time:
-
Permalink:
oakquant-ai/oak-domain-legal-intake@6ea58fc3b4ed28e5bfa29e4c500a0580b3e5fa98 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/oakquant-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6ea58fc3b4ed28e5bfa29e4c500a0580b3e5fa98 -
Trigger Event:
push
-
Statement type:
File details
Details for the file oak_domain_legal_intake-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oak_domain_legal_intake-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
368fda9a6e125e91db489af04766c44dbda8ca6be69685182239eefc41c18ee2
|
|
| MD5 |
b8e193b816fe2ec2e3e0b4fe86dcc3ba
|
|
| BLAKE2b-256 |
a3143c1365d55b8d20ebf3f18cd115df44824b4571846404649fad8a4bd60d06
|
Provenance
The following attestation bundles were made for oak_domain_legal_intake-0.1.0-py3-none-any.whl:
Publisher:
release.yml on oakquant-ai/oak-domain-legal-intake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oak_domain_legal_intake-0.1.0-py3-none-any.whl -
Subject digest:
368fda9a6e125e91db489af04766c44dbda8ca6be69685182239eefc41c18ee2 - Sigstore transparency entry: 1986210245
- Sigstore integration time:
-
Permalink:
oakquant-ai/oak-domain-legal-intake@6ea58fc3b4ed28e5bfa29e4c500a0580b3e5fa98 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/oakquant-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6ea58fc3b4ed28e5bfa29e4c500a0580b3e5fa98 -
Trigger Event:
push
-
Statement type: