docs(chore): step 5 — annotation rendering contract, CLAUDE.md map and conventions, README, DEPLOY SHEET_BUNDLE, PDF format v3, spec §6 migration map, plan/changelog/strategy notes; BDR-038, LRN-043, TODO

This commit is contained in:
bchanot committed 2026-10-10 11:41:55 +02:00
1 parent ce2ec26112
commit 0476276a8f
19 files changed
+276 -112

No files matched your search

+17 -2
View File
@@ -304,7 +304,9 @@ the decision lands; only the naming one is implemented in this document.
## 6. Official equine sheet: import (Step 4b) and curation (Step 4c)
`packages/anatomy` holds a deterministic pipeline (`pnpm import:equine`)
that reads `Horse.svg`, `Horse_head.svg` and `pathologies.json`, then the
that reads the historical files kept under
`supabase/seed/anatomical-sheets/equine/legacy-sources/` (`Horse.svg`,
`Horse_head.svg`, `pathologies.json`, `vertebrae.ts`, never edited), then the
authored curation files, and writes under
`supabase/seed/anatomical-sheets/equine/`:
@@ -312,7 +314,7 @@ authored curation files, and writes under
| ---------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `legacy-import/` | generated baseline | canonical `document.json`, `legacy-id-map.json` (every legacy `data-anno-id`, category slug and view key → new id), `assets.json` + byte-identical SVG copies, `IMPORT-REPORT.md` (French, for the osteopath: volumes, mappings, anomalies). No SQL. |
| `curation/` | authored, committed | `references.json` (the references registry) and `changes.json` (the changeset) |
| `draft/` | generated working revision | curated `document.json`, `assets.json` + `assets/horse.svg`, `CHANGELOG.md`, `REVIEW-REPORT.md`, `review/annotations-<view>.svg` (before/after drawing per view), `equine_draft.sql` |
| `draft/` | generated working revision | curated `document.json`, `assets.json` + `assets/horse.svg`, `sheet-ref.json` (sheet id, null version id, sha256 of the document), `report-migration-map.json` (legacy ids and finding paths → the draft, for Report v2 imports), `CHANGELOG.md`, `REVIEW-REPORT.md`, `review/annotations-<view>.svg` (before/after drawing per view), `review/app-<view>.svg` (the application's own rendering), `equine_draft.sql` |
Changeset (`packages/anatomy/src/curation/schema.ts`): each change has an
id `CHG-nnn`, a level (A demonstrated error, B supported improvement, C
@@ -388,6 +390,19 @@ database that still holds a schema 1 draft (a dev database seeded before Step
data migration that lifts stored documents to the current schema, then
tightens the CHECK (BLK-008). Future schema bumps follow that order.
Report migration map (Step 5): `draft/report-migration-map.json` replays the
applier's rename, move and removal records over every node of the legacy
baseline (792 nodes: 571 identical, 180 renamed or moved, 7 re-homed under
another category when the match is unique, 34 removed = `null`), maps the 27
legacy `data-anno-id` to annotation ids with the legacy names, and the `head`
detail key to the view. `migrateReportV2ToV3` (packages/domain) reads it; a
report keeps what the map cannot place, flagged `unresolved`.
Annotation colour (Step 5, additive, schema_version stays 2): `annotations[].color`
overrides `categories[].color` for the marker drawn by the application
(docs/ANNOTATION-RENDERING.md); the curation changeset CHG-045 carries the
legacy colours.
Seed: `equine_draft.sql` is idempotent and converging. On a fresh database
it inserts the sheet, the cleaned asset row and the draft through
`private.insert_sheet_draft`; when the sheet's only version is a draft