docs(docs): V1-1.4 animals and relations as built, DEV procedure to M3

Contract §8.3 (differences, relation states, caps, lock order across M2 and
M3, concurrency results, migration states, mutations, residuals), helpers
and derived values; SUPABASE.md §3.3 procedure from DEV's current state to
M3 (not run) and §3.5; TEST_STRATEGY, plan note, backend table, CLAUDE.md.
This commit is contained in:
bchanot committed 2026-10-26 01:06:24 +01:00
1 parent d7845b7339
commit bc6a7ddb6f
6 files changed
+183 -46

No files matched your search

+2 -2
View File
@@ -102,8 +102,8 @@ credential, residual paths named in the contract §6.3.
|---|---|---|
| `profiles` | own row; admins via view | own row; roles only through RPC |
| `workspaces`, `workspace_members` (V1-1; cabinets extend them instead of `organizations`) | members, through `caller_workspace_ids()` | none through the API: personal workspace created by trigger; cabinet membership RPCs come with Step 10 |
| `clients`, `client_contacts`, `client_consents` | `can_view_client` | create by the practitioner who starts the relationship; core identity edits restricted (open question Q6) |
| `animals` | `can_view_animal` | practitioner with an active relationship or grant |
| `clients`, `animals`, `animal_client_relations` (V1-1, built: M2 and M3) | members of the workspace, through `caller_workspace_ids()` | none through the API: definer RPCs check the write role of the workspace (`writable_workspace_ids()`); relations only between an animal and a client of one workspace (composite keys), voided instead of deleted (`V1-1_OWNERS_ANIMALS.md` §8.2, §8.3) |
| `client_contacts`, `client_consents` (later steps) | `can_view_client` | create by the practitioner who starts the relationship; core identity edits restricted (open question Q6) |
| `reports` | `can_view_report` | `can_edit_report` for drafts; completion and numbering only via RPC |
| `report_revisions` | same as parent report | insert via RPC/trigger only |
| `anatomical_sheets` | public metadata through a view; full row for creator, grantee, or follower of a public sheet | creator only; publish via RPC |