generated from john/python-template
4.8 KiB
4.8 KiB
Person Acceptance Criteria
Purpose: Define implementation-ready acceptance criteria for Person Create, Read, Update, and Delete workflows.
Companion documents:
- docs/ui/entities/person/user-journey.md
- docs/ui/entities/person/schema-mapping.md
Scope
This checklist covers:
- Create flow
- Read flow
- Update flow
- Delete flow
This checklist does not cover:
- advanced metadata_ editing UX
- structured-name schema migration implementation
- bulk merge or dedup workflow design
Create Acceptance Criteria
CR-1 Person creation entry
- Given a Person page
- When the user selects Create new person
- Then the user can open a Person create form
CR-2 Required field validation
- full_name is required
- Save is blocked when full_name is empty
- Inline feedback is shown for required-field errors
CR-3 Optional field handling
- Optional fields may be blank without blocking create
- Date raw and exact fields can coexist
- Exact date remains canonical when both exact and raw are provided
- Portrait uploads persist under uploads/portraits/person and store a relative portrait_path
CR-4 Successful create outcome
- Given valid input
- When the user saves
- Then the Person record is created
- Then success feedback is shown
- Then the user is routed to Person detail page
CR-5 Create failure outcome
- Given backend failure during create
- Then clear error feedback is shown
- Then entered values are retained where possible
- Then no false success feedback is shown
Read Acceptance Criteria
RD-1 Person detail retrieval
- Given a valid Person id
- When the user opens the Person detail page
- Then the system displays Person metadata for that record only
RD-2 Metadata visibility
- The page shows full_name and available optional person fields
- created_at and updated_at are shown as system-managed, read-only values
- portrait_path is rendered when available, including an image preview when possible
- relative portrait_path values resolve through /uploads for image rendering
RD-3 Linked documents section
- Given no linked DocumentPerson rows
- Then the page shows a no linked documents yet empty state
- Given linked documents exist
- Then the page shows linked document entries
RD-4 Read failure state
- Given a nonexistent Person id
- Then the UI shows a clear not found state without crashing
Update Acceptance Criteria
UP-1 Edit entry
- Given a loaded Person detail page
- When the user selects Edit person
- Then editable controls are shown for allowed fields only
UP-2 Editable fields
- Editable: full_name, display_name, maiden_name, birth/death fields, places, biography, portrait_path
- Not editable: id, created_at, updated_at
- metadata_ remains hidden in first release
UP-3 Required validation
- full_name remains required
- Save is blocked with inline feedback when full_name is empty
UP-4 Successful save
- Given valid input
- When the user saves
- Then changes persist
- Then success feedback is shown
- Then the user remains on Person detail with refreshed values
UP-5 Save failure
- Given backend failure during save
- Then clear error feedback is shown
- Then the user-entered values remain available for retry where possible
- Then no false success feedback is shown
Delete Acceptance Criteria
DL-1 Delete entry and confirmation
- Given a Person detail page
- When the user selects Delete person
- Then a confirmation dialog appears with permanent-action wording
DL-2 Relationship guardrails
- Delete is allowed only when relationship policy allows it
- If linked DocumentPerson rows must be removed first, delete is blocked
DL-3 Blocked delete behavior
- When blocked
- Then the UI explains why deletion is blocked
- Then the UI identifies linked-document dependency presence
- Then the UI provides navigation to cleanup paths
DL-4 Successful delete
- Given no blocking dependencies
- When the user confirms delete
- Then the Person record is removed
- Then success feedback is shown
- Then the user returns to the Person list page
DL-5 Delete failure
- Given backend failure during delete
- Then clear error feedback is shown
- Then the user remains on Person detail with retry path
Cross-Criteria Quality Gates
QG-1 Separation of intent and implementation
- UX intent remains in user-journey.md
- Current versus target implementation mapping remains in schema-mapping.md
QG-2 Traceability
- Each accepted behavior maps to at least one future UI action or service call path
- No acceptance criterion contradicts the deferred-item policy
QG-3 First-release constraints
- metadata_ remains hidden in first release
- structured name field split remains deferred
- recipient and multi-person role management stays in later revisions