V4 final docs

This commit is contained in:
Jim Lancaster
2026-08-10 12:34:36 -05:00
parent 4b3baf5a3e
commit ccf2c78ff4
7 changed files with 24 additions and 43 deletions
+1 -14
View File
@@ -25,13 +25,6 @@ TIMESTAMPTZ created_at
TIMESTAMPTZ updated_at
}
ROLE_EXCLUSIVITY {
UUID id PK
UUID left_role_id FK
UUID right_role_id FK
TIMESTAMPTZ created_at
}
PERSON {
UUID id PK
TEXT full_name
@@ -120,8 +113,6 @@ DOCUMENT_TYPE ||--o{ DOCUMENT : classifies
DOCUMENT ||--o{ DOCUMENT_PERSON : has_people
PERSON ||--o{ DOCUMENT_PERSON : appears_in
PERSON_ROLE ||--o{ DOCUMENT_PERSON : labels
PERSON_ROLE ||--o{ ROLE_EXCLUSIVITY : left_rule
PERSON_ROLE ||--o{ ROLE_EXCLUSIVITY : right_rule
DOCUMENT ||--o{ JOB : has_jobs
DOCUMENT ||--o{ SOURCE : contains_pages
JOB ||--o{ JOB_SOURCE : executes
@@ -154,8 +145,7 @@ SOURCE ||--o{ JOB_SOURCE : processed_in
- Documents support zero, one, or many people per relationship role.
- Relationship roles are defined by `PERSON_ROLE` rather than hardcoded columns.
- `DOCUMENT_PERSON` must be unique for `(document_id, person_id, role_id)`.
- Configured exclusive role pairs from `ROLE_EXCLUSIVITY` cannot coexist for the same `(document_id, person_id)`.
- Initial exclusivity seed blocks `author` and `recipient` for the same person-document pair.
- Relationship writes must be deterministic and use explicit add/remove link intent.
### Document Type Governance
@@ -169,8 +159,6 @@ SOURCE ||--o{ JOB_SOURCE : processed_in
- `DOCUMENT_TYPE.code` is unique.
- `PERSON_ROLE.code` is unique.
- `DOCUMENT_PERSON(document_id, person_id, role_id)` is unique.
- `ROLE_EXCLUSIVITY(left_role_id, right_role_id)` is unique.
- `ROLE_EXCLUSIVITY` must use canonical ordering to avoid duplicate mirrored pairs.
## Indexing Guidance
@@ -178,7 +166,6 @@ SOURCE ||--o{ JOB_SOURCE : processed_in
- `document_person(document_id)`
- `document_person(person_id)`
- `document_person(role_id)`
- `role_exclusivity(left_role_id, right_role_id)`
- `source(document_id, page_number)`
- `job(document_id, status)`
- `job_source(job_id)`