feat(anatomy): curation pipeline — changeset schema, applier with before/after records, cleaned single asset, draft seed, changelog + review report generators; seed layout legacy-import/curation/draft
This commit is contained in:
1 parent
3dbbfdf1df
commit
6870d87910
58 files changed
+18167
-267
No files matched your search
@@ -204,16 +204,20 @@ faunosteo/
|
||||
├─ packages/domain/ ← @faunosteo/domain (pure, no DOM, zod only)
|
||||
│ ├─ src/anatomical-sheet/{schema,validate,create}.ts ← canonical sheet document + integrity rules
|
||||
│ └─ tests/{fixtures/horse-slice.ts,*.test.ts}
|
||||
├─ packages/anatomy/ ← @faunosteo/anatomy: one-off legacy importer (SVG + catalog → canonical document)
|
||||
├─ packages/anatomy/ ← @faunosteo/anatomy: legacy importer (SVG + catalog → canonical document) + curation
|
||||
│ ├─ src/legacy/{svg,catalog,regions,ids,report,importer}.ts, src/cli/import-equine.ts
|
||||
│ └─ tests/ ← counts preserved, special cases, determinism, golden artifacts
|
||||
│ ├─ src/curation/{schema,targets,ops,apply,assets,stats,changelog,review-report,seed,pipeline}.ts ← changeset → draft
|
||||
│ └─ tests/ ← counts preserved, special cases, determinism, curation ops, golden artifacts
|
||||
├─ packages/supabase/ ← @faunosteo/supabase
|
||||
│ ├─ src/{index,client,database.types,anatomical-sheets}.ts ← typed client, generated types, publish gate
|
||||
│ └─ tests/{client,anatomical-sheets}.test.ts, tests/db/ ← PGlite harness, shim, pgTAP runner, schema↔types test
|
||||
├─ supabase/
|
||||
│ ├─ config.toml, seed.sql ← CLI config (public schema only), local dev accounts
|
||||
│ ├─ migrations/*.sql ← forward-only; foundation, profiles, platform_roles, anatomical_sheets, storage
|
||||
│ ├─ seed/anatomical-sheets/equine/v1/ ← GENERATED by `pnpm import:equine`: document, id map, report, SVG copies, seed SQL
|
||||
│ ├─ seed/anatomical-sheets/equine/
|
||||
│ │ ├─ legacy-import/ ← GENERATED baseline: document, id map, IMPORT-REPORT, SVG copies (no SQL)
|
||||
│ │ ├─ curation/{changes,references}.json ← AUTHORED changeset + references registry (never generated)
|
||||
│ │ └─ draft/ ← GENERATED working revision: document, cleaned horse.svg, CHANGELOG, REVIEW-REPORT, equine_draft.sql
|
||||
│ └─ tests/*.sql ← pgTAP: allowed + denied paths per policy
|
||||
├─ packages/README.md ← shared packages index
|
||||
├─ .gitea/workflows/ci.yml ← CI: install, typecheck, test, lint, build, docker
|
||||
@@ -347,8 +351,9 @@ Database (Supabase)
|
||||
`publish_sheet_version`. Integrity rule codes are shared by `validateSheetDocument` (TS) and
|
||||
`private.sheet_document_issues` (SQL); add a rule on both sides and in the spec table.
|
||||
- Document schema change → bump `SHEET_DOCUMENT_SCHEMA_VERSION`, extend the SQL CHECK on `document_schema_version`.
|
||||
- Official equine sheet = generated seed (`pnpm import:equine`, never edit the output by hand; the golden test fails on drift).
|
||||
It is a DRAFT until a platform admin publishes it after business review of `IMPORT-REPORT.md`.
|
||||
- Official equine sheet = generated seed `draft/` (`pnpm import:equine`, never edit `legacy-import/` or `draft/` by hand;
|
||||
the golden test fails on drift). Every content change goes through `curation/changes.json` (traced in CHANGELOG.md).
|
||||
It is a DRAFT until a platform admin publishes it after business review of `REVIEW-REPORT.md`.
|
||||
- Sheet SVG bytes live in Storage bucket `anatomical-sheet-assets` as `<sha256>.svg`; uploads are an operator task
|
||||
(`pnpm assets:upload <seed dir>` with the service key in env), never from the browser.
|
||||
|
||||
|
||||
Reference in new issue
Block a user