generated from john/python-template
V4.3 revision to Document Types
This commit is contained in:
@@ -27,7 +27,7 @@ Deliver constrained, installation-local application settings while preserving th
|
||||
|
||||
### 1. Define Service Contracts
|
||||
|
||||
- Define Document Type maintenance commands for create, relabel, sort, activate, deactivate, and delete-if-unreferenced.
|
||||
- Define Document Type maintenance commands for create, relabel, activate, deactivate, and delete-if-unreferenced.
|
||||
- Define Person Role maintenance commands for create, relabel, activate, deactivate, and delete-if-unreferenced.
|
||||
- Define a Prompt Store interface for constrained list, read, write, backup-status, and explicit recovery behavior.
|
||||
- Map validation, conflict, not-found, dependency, and filesystem failures to existing `AppError` categories.
|
||||
@@ -36,13 +36,13 @@ Deliver constrained, installation-local application settings while preserving th
|
||||
|
||||
- Reuse existing Document and People service ownership.
|
||||
- Add explicit write methods rather than passing UI-mutated ORM objects directly where practical.
|
||||
- Normalize and validate new stable codes.
|
||||
- Reject duplicate codes deterministically.
|
||||
- Normalize Document Type labels and reject case-insensitive duplicates deterministically.
|
||||
- Keep Person Role stable-code validation and duplicate rejection.
|
||||
- Permit deletion only after a service-owned reference check proves the entry is unreferenced.
|
||||
- Reject deletion of referenced entries deterministically without partial mutation.
|
||||
- Permit label changes whether or not an entry is referenced.
|
||||
- Preserve inactive entries for historical reads.
|
||||
- Maintain existing Document Type sort order.
|
||||
- Order Document Types alphabetically by normalized label.
|
||||
- Order Person Roles deterministically by label and then code without adding a schema field.
|
||||
- Add service tests for create, relabel, activation, deactivation, duplicates, immutable codes, ordering, allowed deletion, and blocked referenced deletion.
|
||||
|
||||
@@ -65,7 +65,7 @@ Deliver constrained, installation-local application settings while preserving th
|
||||
- Add separate pages or panels for Document Types, Person Roles, and Prompts.
|
||||
- Keep pages responsible for orchestration and notifications only.
|
||||
- Use service callbacks for all mutations.
|
||||
- Explain stable codes, inactive historical entries, and future-only prompt effects in the UI.
|
||||
- Explain inactive historical entries and future-only prompt effects in the UI.
|
||||
- Present deletion only for unreferenced registry entries and preserve clear conflict feedback if references appear before submission.
|
||||
- Present prompt backup availability and recovery as an explicit operator action.
|
||||
- Do not render raw environment values or secrets.
|
||||
@@ -102,7 +102,7 @@ Deliver constrained, installation-local application settings while preserving th
|
||||
|
||||
- All V4.3 acceptance criteria are testable and satisfied.
|
||||
- Settings mutations cross explicit service or adapter boundaries.
|
||||
- Registry codes cannot be accidentally changed.
|
||||
- Document Types use UUID-only identity and unique labels; Person Role codes cannot be accidentally changed.
|
||||
- Referenced registry entries can be relabeled or deactivated but cannot be deleted.
|
||||
- Unreferenced registry entries can be deleted without cascade behavior.
|
||||
- Prompt writes cannot escape the configured directory or rewrite historical provenance.
|
||||
|
||||
@@ -18,12 +18,12 @@ This document defines the frozen boundary for the constrained-settings revision
|
||||
### 2. Document Type Maintenance
|
||||
|
||||
- List active and inactive Document Types.
|
||||
- Add new types with a stable unique code and user-facing label.
|
||||
- Edit mutable labels and sort order.
|
||||
- Add new types with a unique user-facing label.
|
||||
- Edit labels and active state.
|
||||
- Activate or deactivate types without invalidating historical Documents.
|
||||
- Do not allow changing a stable code after creation.
|
||||
- Allow deletion only when no Document references the type.
|
||||
- Allow label changes regardless of whether the type is referenced.
|
||||
- Display types alphabetically by label.
|
||||
|
||||
### 3. Person Role Maintenance
|
||||
|
||||
@@ -74,9 +74,10 @@ This document defines the frozen boundary for the constrained-settings revision
|
||||
|
||||
## Locked Design Decisions
|
||||
|
||||
### A. Registry Codes Are Immutable
|
||||
### A. Registry Identity and Lifecycle
|
||||
|
||||
- Document Type and Person Role codes are stable identifiers.
|
||||
- Document Types use UUID identity and case-insensitively unique labels; no separate code is exposed or stored.
|
||||
- Person Role codes remain stable identifiers.
|
||||
- Labels and active state remain mutable.
|
||||
- Historical references remain valid when a registry entry is inactive.
|
||||
- Labels may be updated for referenced and unreferenced entries.
|
||||
@@ -104,7 +105,7 @@ This document defines the frozen boundary for the constrained-settings revision
|
||||
|
||||
- Person Roles are ordered by label and then stable code.
|
||||
- V4.3 does not add a `sort_order` field to Person Roles.
|
||||
- Document Type sort-order maintenance remains in scope because `DocumentType.sort_order` is already part of the V4 schema.
|
||||
- Document Types use alphabetical label ordering and have no persisted sort order.
|
||||
|
||||
### F. Settings Are Installation-Local
|
||||
|
||||
@@ -122,11 +123,11 @@ This document defines the frozen boundary for the constrained-settings revision
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
1. Document Type and Person Role maintenance preserves stable codes and historical references.
|
||||
1. Document Type UUID identity and Person Role stable codes preserve historical references.
|
||||
2. Inactive registry entries remain visible on historical records but are excluded from default create selectors.
|
||||
3. Labels can be changed for referenced or unreferenced registry entries.
|
||||
4. An unreferenced Document Type or Person Role can be deleted, while deletion of a referenced entry fails without partial mutation.
|
||||
5. Document Type sort order is maintainable; Person Roles use deterministic label/code ordering without a schema addition.
|
||||
5. Document Types use alphabetical label ordering; Person Roles use deterministic label/code ordering.
|
||||
6. Prompt edits are restricted to existing Markdown files directly beneath the configured prompt directory.
|
||||
7. Prompt saves use atomic replacement, retain exactly one previous-version backup, and support explicit recovery.
|
||||
8. A prompt edit affects future Jobs only and leaves stored Job provenance unchanged.
|
||||
|
||||
Reference in New Issue
Block a user