docs(docs): V1-1 contract approved, technical design for review

Owner ratified the V1-1 business decisions. The contract now records them
as approved, adds the nomenclature, the proposed SQL schema, RLS, RPCs,
technical limits, journeys and test plan, and lists the choices left for
the owner. OPEN_QUESTIONS, plan, DOMAIN_MAP, README and CLAUDE.md follow.
This commit is contained in:
bchanot committed 2026-10-25 19:15:35 +01:00
1 parent 5502617193
commit a6346105f1
7 files changed
+1061 -381

No files matched your search

+2 -1
View File
@@ -49,7 +49,8 @@ MVP species: equine only. Open-source MIT.
Product roadmap (owner, 2026-10-25): P0 docs, then V1-1 clients and animals, V1-2 sheets from Supabase,
V1-3 cloud bilans, V1-4 stored PDF and sharing, V1-5 mobile and accessibility pass
(`docs/development/IMPLEMENTATION_PLAN.md` §0; V1-1 contract `docs/development/V1-1_OWNERS_ANIMALS.md`:
owner orientations proposed, awaiting ratification; nothing built).
business decisions ratified 2026-10-25, BDR-073; SQL/RLS/RPC design awaiting owner validation on
`feature/v1-1-clients-animals`; nothing built).
---
+6 -6
View File
@@ -39,12 +39,12 @@ Q2):
Planned, not implemented (roadmap in
`docs/development/IMPLEMENTATION_PLAN.md` §0): V1-1 clients and animals (its
contract awaits the owner's ratification), V1-2 sheets served from Supabase,
V1-3 bilans stored in the cloud with history, V1-4 stored PDFs and authorised
sharing, V1-5 mobile and accessibility pass; then professional verification,
cabinets, entitlements, agenda, public site and the rest of the plan. Nothing
on `develop` authorises a release: the release readiness track (TODO RR-1 to
RR-10) comes first.
business decisions ratified, technical design awaiting validation), V1-2
sheets served from Supabase, V1-3 bilans stored in the cloud with history,
V1-4 stored PDFs and authorised sharing, V1-5 mobile and accessibility pass;
then professional verification, cabinets, entitlements, agenda, public site and
the rest of the plan. Nothing on `develop` authorises a release: the release
readiness track (TODO RR-1 to RR-10) comes first.
---
+2 -1
View File
@@ -11,7 +11,8 @@ the code of 2026-10-08: the TypeScript modules they name have since moved into
`crates/core` or been deleted (Steps 5 to 8, R2 to R5); `CLAUDE.md` holds the
current map. Clients and Animals (§4, §5) are being reframed by the V1-1
contract (`V1-1_OWNERS_ANIMALS.md`): workspaces, no global client record,
client-animal links with roles; owner orientations awaiting ratification.
client-animal links with roles; business decisions ratified by the owner on
2026-10-25 (BDR-073); where this map differs, the contract governs V1-1.
Conventions used below:
+16 -7
View File
@@ -314,6 +314,13 @@ Definition of Done: architecture Sprint 2 minus seats billing.
Risks: context leakage into later queries (every report/client query must take the context explicitly; enforce by a service-layer signature, not a global).
```
Step 10 note (2026-10-25): with C4 ratified (BDR-073), cabinets are built as
workspaces of kind `cabinet` on the `workspaces` / `workspace_members` tables
that V1-1 creates, not as separate `organizations` / `organization_members`
tables; cabinet roles extend `workspace_member_role` and plug into the V1-1
workspace helpers (`V1-1_OWNERS_ANIMALS.md` §3, §4, §9.1). The rest of the
step (member management, context switcher, seats) is unchanged.
```text
Step 11
Name: Entitlement engine skeleton (no Stripe)
@@ -342,13 +349,15 @@ Definition of Done: architecture Sprint 3; rule 1 (animal ≠ sheet) visible in
Risks: the global-client design (C4) if confirmed as plain shared rows; GDPR consent texts not final (version column from day one).
```
Step 12 note (2026-10-25): roadmap item V1-1 proposes a reduced Step 12 under
the owner's orientation C4 (records attached to a workspace, one personal
workspace per practitioner, cabinets later, no global client record shared
between practitioners), without consents, grants, sharing, files or candidate
matching: `V1-1_OWNERS_ANIMALS.md`. The text above stands until the owner
ratifies the contract's orientations (§9.1) and answers its sub-choices
(§9.2).
Step 12 note (2026-10-25): roadmap item V1-1 is a reduced Step 12 under C4,
ratified by the owner on 2026-10-25 (BDR-073): records attached to a
workspace, one personal workspace per practitioner, cabinets later, no global
client record shared between practitioners, no consents, grants, sharing,
files or candidate matching. Contract and technical design:
`V1-1_OWNERS_ANIMALS.md` (business decisions approved; the SQL, RLS and RPC
design awaits the owner's validation before the first migration). Where the
text above differs (global clients, consents, grants, photo, files, deceased
flow), the contract governs V1-1.
```text
Step 13 (∥ Steps 9–12)
+5 -5
View File
@@ -6,7 +6,7 @@ ambiguities or technically risky points found when confronting
questions for the developer that change architecture or development order.
Items that are merely interesting are left out.
## Status (revised 2026-10-25, P0)
## Status (revised 2026-10-25, P0 and V1-1 ratification)
The analysis below is the 2026-10-08 text, kept as written; this table says
what has been settled since and by which record (BDR = `.claude/memory/decisions.md`,
@@ -19,9 +19,9 @@ Step 5).
| C1 vertebral formula | settled | ordered `vertebral_config.regions`, free codes (BDR-031) |
| C2 report-only points | open | `localAnnotations` reserved empty in Report v3 (BDR-038); promotion semantics undecided (Q6a); defining it later is a report version bump |
| C3 worker on day one | settled | Rust worker built at Step 8 / R1 (BDR-044, BDR-048) |
| C4 global client record | owner orientation, awaiting ratification | records belong to a workspace (one personal workspace per practitioner in V1-1, cabinets later); no global directory shared between practitioners (owner, 2026-10-25); contract `V1-1_OWNERS_ANIMALS.md` §3, D2 |
| C5 animal update rights | owner orientation, awaiting ratification | writes reserved to workspace members with a write right, in V1-1 the practitioner in their personal workspace; no retroactive silent change of a finished bilan (owner, 2026-10-25); V1-1 contract §5.1, §5.3 |
| C6 unverified accounts | owner orientation, awaiting ratification | email confirmation ≠ professional verification; private use for confirmed-email accounts, verification (Step 9) required for public features presenting a verified professional; statuses are not platform roles (BDR-026) (owner, 2026-10-25); V1-1 contract §5.2. Replaces the 2026-10-08 assumption below (no clients or reports before verification) once ratified |
| C4 global client record | settled (owner ratification 2026-10-25, BDR-073) | records belong to a workspace (`workspaces`, `workspace_members`; one personal workspace per practitioner in V1-1, cabinet workspaces later without destructive transfer); no global directory shared between practitioners, no data visible between them; contract `V1-1_OWNERS_ANIMALS.md` §4, D2 |
| C5 animal update rights | settled (owner ratification 2026-10-25, BDR-073) | writes reserved to workspace members with a write right, in V1-1 the practitioner in their personal workspace; no retroactive silent change of a finished bilan; V1-1 contract §6.1, §6.4 |
| C6 unverified accounts | settled (owner ratification 2026-10-25, BDR-073) | email confirmed, professional status verified and platform role are three distinct notions; a confirmed email gives private use of the workspace; verification (Step 9) required later for public features presenting a verified professional; no verified status by default; statuses are not platform roles (BDR-026); V1-1 contract §6.2. Replaces the 2026-10-08 assumption below (no clients or reports before verification) |
| C7 « Observation » vocabulary | settled | finding category kind `observation` renamed `consultation_reason` (BDR-033 point 5); *Observation* stays the report block |
| C8 drafts per sheet | settled | one draft per sheet, partial unique index (BDR-032) |
| C9 detail view asset | settled | nullable `svg_asset_id`, crop by `view_box`; the equine head is a crop of one cleaned drawing (BDR-031, BDR-036, BDR-037) |
@@ -35,7 +35,7 @@ Step 5).
| Q3 non-mammal layouts | settled | free region codes (BDR-031) |
| Q4 external use of the pathology editor | moot | the tool was deleted at Step 5 (BDR-038); content changes go through `curation/changes.json` until the Step 17 editor (owner confirmed 2026-10-25) |
| Q5 one or two equine assets | settled | one cleaned drawing, head as crop (BDR-036, BDR-037) |
| Q6 manual points, shared client records | open (a); (b) reframed by C4 | (a) as C2; (b) no shared record if C4 is confirmed, so the edit-rights question moves inside a data space (V1-1 contract §5) |
| Q6 manual points, shared client records | open (a); (b) settled by C4 | (a) as C2; (b) no shared record (C4 ratified), so edit rights live inside a workspace (V1-1 contract §6) |
| Q7 phone and email providers | open | Step 7 shipped email only; needed before production SMTP and phone verification |
| Q8 public site framework | settled | Astro (D-R8, validated with BDR-045), Rust exception recorded |
| Q9 catalog anomalies | settled, against the 2026-10-08 recommendation | no medical correction at import, anomalies reported, degraded slugs normalised (BDR-034); later corrections through curation changes (BDR-036, BDR-037) |
+2 -2
View File
@@ -9,8 +9,8 @@ Docker sandbox; 11 pgTAP files under the flat `supabase/tests/`. The locations
`apps/app/tests/components`, `apps/app/tests/integration`, `apps/app/e2e`,
`supabase/tests/{db,rls}` and `supabase/seed/test/` in §1 and §3 are planned,
not created; the real-stack e2e lives in `packages/supabase/tests/e2e`. No
real-browser suite exists yet (TODO RR-8; V1-1 contract §8.4 proposes the
first one). No CI has ever run (BDR-047): "CI" in the tables means the
real-browser suite exists yet (TODO RR-8; V1-1 contract §12.5 proposes the
first one, decision D14). No CI has ever run (BDR-047): "CI" in the tables means the
prepared workflow.
## 1. Layers
File diff suppressed because it is too large. Load diff