Purged from docs/superpowers by the gitflow finish of step 1 (BDR-065);
that path is purged at every finish, so the records live under
docs/history/superpowers/ instead. References updated.
Seven files, 91 cases, on the real SVGs and catalog: catalog invariants,
SVG <-> catalog mapping table, pathology-editor matcher parity, click chain
through the DOM, full PDF export/import, schema and persistence, i18n and
species. Two golden Report v2 fixtures. No application file changed.
Report: docs/development/CHARACTERIZATION_REPORT.md. 271/271 green.
Eight documents under docs/development/ confronting the approved business
architecture with the audited code: 27-step plan, repository migration map,
domain map, frontend/backend architecture, migration and test strategy,
open questions. Reference document placed at the repository root.
Read-only technical audit before the SaaS redesign: 13 reports,
a logical anatomical-sheet JSON built from real horse data, verbatim
copies of the 52 relevant source files, and a self-contained ZIP.
Standalone HTML page for editing species pathology JSON via SVG-based
zone selection. Supports pre-wired species list and manual SVG+JSON
upload. Features fuzzy zone matching (ported from zoneMatch.ts),
recursive tree editor with full CRUD, auto ID generation, and safe
JSON export preserving all zones and root fields.
Includes SVG sanitization (script/foreignObject/on* stripping),
unsaved changes protection, and French error messages.
Also copies pathologies.json to public/ for HTTP access from the editor.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remote moved to git.bchanot.fr/bchanot/zoosteo.git; brand strings
and production URL updated to match new identity.
- package.json: name → zoosteo
- src/config/env.ts: AppConfig DEFAULTS → "Zoosteo"
- docker/entrypoint.sh: APP_*_NAME fallbacks → "Zoosteo"
- src/i18n/{fr,en}.ts: import error message + PDF title prefix
- src/pdf/attachment.ts: embedded description metadata "state v2"
- index.html: <title> fallback
- scripts/scaffold-species.mjs: console banner
- tests/unit/components.Brand.test.tsx: regex
- README.md, CLAUDE.md, CHANGELOG.md, docs/ADDING-A-SPECIES.md:
brand headings + intro lines
- DEPLOY.md: env defaults table + osteo.example.com → zoosteo.fr
(clone URL, paths, certbot, curl, container name references)
PDF attachment FILENAME 'osteo-report.json' and the startsWith
contract in src/pdf/attachment.ts:35,40 are preserved — changing
them would break PDF import for every PDF already exported by the
app. docs/superpowers/** and .claude/audits/** left unchanged as
historical records.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- schema_version "2.0" everywhere; new Changelog section with
v1.0 → v2.0 entries highlighting the breaking change.
- New Scope (legal périmètre) section listing inclusions / exclusions
and the two flag mechanisms (root scope_disclaimer + leaf boolean).
- Clarified SVG ↔ JSON link via strict label equality (not data-anno-id)
and cranio-caudal zone ordering rule.
- Documented the 3 standardized categories per zone
(*-dysfunctions / *-observations / anamnesis) and the 5 dysfunctions
taxonomy patterns (head SSB / head peripheral / articular /
vertebral hinge / vertebral region).
- Documented structural authoring rules (depth ≤ 4, ≥ 2 children per
intermediate, sibling-scoped ID uniqueness).
- Spelled out the v2.0 requires_vet_referral / description_fr policy
(boolean = source of truth; description_fr survives only on
differential leaves) and the breaking-change notice for any consumer
relying on description_fr.includes('vétérinaire').
- Rewrote the minimal example using v2.0 contract (boolean only,
description_fr only when it adds a differential).
- Noted Zod's silent strip of unknown fields (e.g. species.notes,
per-leaf metadata).
- Added current horse.json stats table (26 zones / 792 nodes /
612 leaves / 41 vet leaves).
12 tasks, TDD per task, file paths + full code shape + verification.
Locale store + dicts + useT separate green commits; PDF + route
migrations land as one atomic green-build commit (formatDate +
exportReportToPdf signature change cross the boundary).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Documents the canonical pathologies.json shape next to the existing
ANATOMY-SVG-CONVENTION and PDF-FORMAT guides. Mirrors the Zod
contract in src/domain/schema/findings.ts:
- Top-level frame (schema_version, scope_disclaimer, species, zones).
- ZoneFindings shape and how name_fr/name_en bridge to SVG labels.
- Recursive FindingNode (leaf vs intermediate, optional description,
vet-referral flag, sources).
- SourceRef enum + URL validation.
- A minimal worked example.
- How leaf selections become persisted Findings, with the labelFr/En
snapshot contract that protects already-exported reports from
retroactive catalog edits.
- Authoring workflow that defers to `pnpm scaffold:species` and Vite
HMR-driven validation.
Co-Authored-By: Claude <noreply@anthropic.com>
Registry
--------
src/domain/species/registry.ts previously hard-coded the species list,
which meant adding a new animal forced an edit in two places. The
registry now uses Vite's `import.meta.glob('./*/index.ts', { eager: true })`
and registers every manifest that default-exports a SpeciesManifest.
Duplicate ids log a warn and the first wins. Existing named imports
keep working — equine/index.ts adds `export default equine` next to the
named export.
The species dropdown is also now sorted alphabetically by labelFr (FR
locale) instead of insertion order, so two species don't shuffle
position based on glob ordering.
Scaffold script
---------------
`pnpm scaffold:species` (scripts/scaffold-species.mjs) is an
interactive Node ESM prompt that asks for the id, FR/EN labels, asset
folder, main SVG filename, detail SVG mappings, and the vertebral
formula, then writes:
src/domain/species/<id>/index.ts (with `export default`)
src/domain/species/<id>/vertebrae.ts
src/domain/species/<id>/pathologies.ts (Zod-parses the JSON)
src/domain/species/<id>/pathologies.json (minimal valid skeleton)
public/species/<assetFolder>/ (directory placeholder)
The script refuses to overwrite existing files, so it's safe to rerun
after typos. SVG assets are not generated — drop them in the public
folder yourself.
Findings JSON updates
---------------------
No runtime hot-reload mechanism is needed in dev: `pathologies.ts`
imports `pathologies.json` and runs `SpeciesFindingsSchema.parse(data)`
at module load, so a JSON edit triggers Vite HMR + an immediate Zod
validation pass. In prod, rebuild and redeploy.
Docs
----
docs/ADDING-A-SPECIES.md rewritten around the new flow: quick start via
the scaffold script first, manual instructions second, and removed the
stale references to the flat `Pathology[]` model and the no-longer-
required registry edit step.
Co-Authored-By: Claude <noreply@anthropic.com>
Three coupled bugs in zone interaction:
1. Clicks inside the head detail popup were ignored — EditorRoute
looked up the clicked id in the main-SVG bones map only, so
detail-only ids (point-mpbykomv et al.) returned undefined.
2. Spine zones did not open VertebraPicker on click; the picker was
only reachable via the per-zone "Vertèbres…" button.
3. The new SVG hint data-anno-special="vertebral-precision" was
present in Horse.svg but unread by the parser/UI.
Parser now reads data-anno-special into Bone.special. EditorRoute
parses the detail SVG on open and falls back to detailBones for id
lookups. When bone.special === 'vertebral-precision', clicking adds
the zone (if absent) and opens VertebraPicker for that zone index;
toggle-off via main click is disabled for these zones (use ✕). The
"Vertèbres…" button in ObservationCard is now shown only on zones
that support it. Convention doc updated.
Co-Authored-By: Claude <noreply@anthropic.com>