ReLiS Domain Parity Mapper
Objective
Translate legacy behavior into explicit, testable domain contracts before implementation.
Primary Sources
Prioritize:
- •
docs/context.md - •
docs/domain-map.md - •
docs/role-permissions.md - •
docs/product-scope.mdThen inspect legacy code paths inrelis_app/controllers,relis_app/models,relis_app/libraries,relis_app/helperswhen available.
Extraction Method
- •Pick one bounded context (for example Screening).
- •Identify entities, states, transitions, side effects.
- •Capture role-based permissions per action.
- •Capture data invariants and forbidden transitions.
- •Capture external dependencies (BibTeX parser, export formats, etc.).
Spec Template
For each feature produce:
- •
Feature - •
User roles - •
Preconditions - •
State machine - •
Commands(write actions) - •
Queries(read actions) - •
Validation rules - •
Audit events - •
Failure modes - •
Parity tests
Required Outputs
Create or update:
- •
docs/parity/<feature>.md - •
docs/parity/open-questions.md - •
docs/parity/parity-gaps.md
Output Quality Bar
- •No vague language like "handle conflicts somehow".
- •Every transition must include actor + condition + resulting state.
- •Every write action must list required authorization check.
- •Every important business action must define at least one audit event.
Conflict Resolution Rules
When legacy behavior is unclear:
- •Mark as
unknown-legacy. - •Propose
mvp-policybehavior. - •Add a parity-risk note.
- •Continue; do not block entire rewrite.
Done Criteria
A feature parity spec is complete when:
- •A backend engineer can implement it without reading legacy PHP.
- •A QA engineer can derive tests directly from the spec.
- •Unknowns are isolated and tracked, not hidden.