I'll map the codebase against your Phase 9 focus areas—starting with the RegistrationCase aggregate and the enums/policies you listed.
[tool: update_current_step — Tool use: update_current_step]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegistrationCase.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RejectionReason.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/SuspensionReason.cs]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 16 results in 1 directory]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/IDEA.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/IDEA.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/Person.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegistrationCaseChecklist.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegisterTargetResolver.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/NationalRegisterSearchScorer.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Documents/DocumentType.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/EuCitizenPolicy.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/NonEuWorkerPolicy.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/StudentPolicy.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/ResidencePolicyEvaluator.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RegistrationResidenceEvaluator.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/CivilStatusRecord.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/CivilStatus.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Address/HousingSituation.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/GetCaseReviewChecklist/CaseReviewChecklistMapper.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/LinkExistingPerson/LinkExistingPersonHandler.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/GetRegistrationCase/GetRegistrationCaseHandler.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/ResidenceValidationContext.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/ResidenceCategory.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RecordCivilStatus/RecordCivilStatusHandler.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RejectCase/RejectCaseHandler.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/SuspendCase/SuspendCaseHandler.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/DeclareAddress/DeclareAddressHandler.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/NationalRegister/NationalRegisterSearchScorerTests.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/ROADMAP.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/DOMAIN.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Pages/RegistrationCaseDetail.razor]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/IdentityDetails.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/Registration/RegistrationCaseDecisionTests.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/IResidencePolicy.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/SearchNationalRegister/SearchNationalRegisterHandler]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/NationalRegisterRepository.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/AttachDocument/AttachDocumentHandler.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RecordIdentity/RecordIdentityHandler.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegisterTarget.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/RejectCaseDialog.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/SuspendCaseDialog.razor]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/ImmigrationDecisionDetails.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/SetResidenceCategory/SetResidenceCategoryHandler.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RecordImmigrationDecision/RecordImmigrationDecisionH]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/Immigration/ResidencePolicyTests.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/AddressStep.razor]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RemoveDocument/RemoveDocumentHandler.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 11 results in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/ResidencePermitType.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/ApproveCase/ApproveCaseHandler.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/NationalRegisterPerson.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/GetRegistrationCase/RegistrationCaseDetailDto.cs]
[tool: update_current_step — Tool use: update_current_step]
Phase 9 Exception Scenarios — Codebase Exploration
Scope note: docs/ROADMAP.md defines Phase 9 as “Exception scenarios” (IDEA “Major Exceptions”). IDEA.md labels Phase 9 as “Birth Information” — birth facts are planned but not implemented. This report follows the ROADMAP definition you asked for.
1. RegistrationCase aggregate — checklist, civil status, birth info, person fields
Key files
Path Role /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegistrationCase.csAggregate root /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegistrationCaseChecklist.csOwned checklist /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/Person.csLinked person /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/IdentityDetails.csIntake identity VO /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/GetCaseReviewChecklist/CaseReviewChecklistMapper.csReview questions
Implemented
RegistrationCase holds: status, visit reason, officer lock, PersonId, ResidenceCategory, ImmigrationDecision, DeclaredAddress, HousingSituation, decision fields (RejectionReason, SuspensionReason, SelectedRegisterTarget), and owned RegistrationCaseChecklist .
Checklist flags (5):
IdentityEstablished, LegalResidenceEstablished, AddressDeclared, AddressConfirmed, RegisterDeterminable
Approval gate (IsReadyForApproval) requires all five + positive police verification.
Person (via RecordIdentity / LinkExistingPerson): GivenName, FamilyName, BirthDate, Nationality, optional BIS/NR numbers, optional CivilStatusRecord.
Civil status lives on Person, not on the case — recorded via Person.RecordCivilStatus().
Stubbed / missing (Phase 9 / IDEA birth info)
No BirthPlace, parents, original nationality, birth registration number on Person or case
docs/DOMAIN.md mentions FullName, BirthPlace, PreviousName VOs — not in code
Checklist has no birth-certificate, civil-status, duplicate-investigation, or document-completeness flags
No automatic link between missing documents and checklist/suspension
Key methods
csharp Copy code
// RegistrationCase.cs
RecordIdentity(), LinkExistingPerson(), RefreshRegisterDeterminability()
ApplyResidencePolicyResult(), DeclareAddress(), RecordHousingSituation()
Reject(), Suspend(), ResumeFromSuspension(), Approve(), IsReadyForApproval
2. RejectionReason / SuspensionReason — enums and usage
Key files
Path /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RejectionReason.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/SuspensionReason.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RejectCase/RejectCaseHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/SuspendCase/SuspendCaseHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/ResumeCase/ResumeCaseHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/RejectCaseDialog.razor/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/SuspendCaseDialog.razor
Enum values
RejectionReason: InsufficientIdentityEvidence, NoLegalResidenceBasis, AddressNotGenuine, DuplicateIdentity, IllegalStay, Other
SuspensionReason: MissingDocuments, AwaitingFederalDecision, MarriageRecognitionPending, InvestigationRequired, Other
Implemented
Domain transitions on RegistrationCase.Reject() / Suspend() / ResumeFromSuspension()
HTTP endpoints + handlers with audit trail (CaseAuditRecorder)
UI dialogs expose all enum values for manual officer selection
Tests: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/Registration/RegistrationCaseDecisionTests.cs
Stubbed
No domain rules auto-select a reason (e.g. duplicate → InvestigationRequired, illegal stay → IllegalStay)
Enum values exist as labels only; nothing in the aggregate references them during intake
GetReviewDashboardHandler shows suspension reason as display text only
3. Immigration policies
Key files
Path /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/EuCitizenPolicy.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/NonEuWorkerPolicy.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/StudentPolicy.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/ResidencePolicyEvaluator.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/Policies/ResidenceValidationContext.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Immigration/ResidenceCategory.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RegistrationResidenceEvaluator.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/DependencyInjection.cs (policy registration)
Implemented
Policy Logic EuCitizenPolicyAlways valid (educational stub) NonEuWorkerPolicyRequires A/B card, not expired StudentPolicyRequires Annex 15 or B card, not expired
ResidencePolicyEvaluator.Evaluate() picks policy by ResidenceCategory, builds ResidenceValidationContext, sets LegalResidenceEstablished via ApplyResidencePolicyResult().
Re-evaluation triggered from: SetResidenceCategory, RecordResidencePermit, RecordImmigrationDecision, RemoveDocument, CorrectIdentity.
Stubbed / gaps
ResidenceValidationContext.AttachedDocumentTypes is passed but policies ignore documents (except test asserting EU doesn't need permit doc)
ImmigrationDecision is stored on case but never read by policies
No Refugee, Diplomat, TemporaryProtection categories
ResidencePermitType.CCard, EuRegistrationCertificate exist but no dedicated policy
AttachDocumentHandler does not re-evaluate policy after upload — document-driven exceptions can't fire automatically
4. National register duplicate detection
Key files
Path /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/NationalRegisterSearchScorer.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/NationalRegisterRepository.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/SearchNationalRegister/SearchNationalRegisterHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/LinkExistingPerson/LinkExistingPersonHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/GetRegistrationCase/GetRegistrationCaseHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Pages/RegistrationCaseDetail.razor
Implemented
NationalRegisterSearchScorer.ScoreMatches() — scoring tiers (100 exact, 80 DOB+name, 50 name, 40 partial); MinimumReportableScore = 40.
GetRegistrationCaseHandler.FindPossibleDuplicatesAsync() — auto-searches when person exists and is not linked; surfaces matches with score ≥ 80.
LinkExistingPerson — RegistrationCase.LinkExistingPerson() + handler conflict checks (IsRegisterRecordLinkedAsync, IsNationalRegisterNumberAssignedAsync) → NationalRegisterConflictException (HTTP 409).
UI — warning alert + “Review matches” in RegistrationCaseDetail.razor.
Tests — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/NationalRegister/NationalRegisterSearchScorerTests.cs, integration tests in NationalRegisterTests.cs.
Stubbed
No case flag like DuplicateUnderInvestigation or checklist item
No auto-Suspend(InvestigationRequired) or block on Approve when duplicates unresolved
RejectionReason.DuplicateIdentity is manual only
Scorer doesn't use NR/BIS numbers as search criteria (name + DOB only)
5. Civil status / marriage handling
Key files
Path /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/CivilStatus.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/CivilStatusRecord.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RecordCivilStatus/RecordCivilStatusHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/CivilStatusStep.razor
Implemented
Full intake: status enum, spouse names, marriage date/place when Married or RegisteredPartnership
CivilStatusRecord.RequiresMarriageDetails() validation
Persisted via EF owned entity (PersonConfiguration.cs)
Stubbed (marriage exception)
SuspensionReason.MarriageRecognitionPending exists but no workflow:
No “marriage recognition status” field
No rule forcing Single when foreign marriage unrecognised (docs/DOMAIN.md intent)
No link between civil status and suspend/resume
Civil status not part of approval checklist
6. Document types and birth certificate requirements
Key files
Path /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Documents/DocumentType.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Documents/AdministrativeDocument.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/AttachDocument/AttachDocumentHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/DocumentUpload.razor
Implemented
DocumentType: Passport, NationalIdCard, BirthCertificate, ResidencePermit, RentalContract, Other — upload/store/list on case.
Stubbed
No birth certificate requirement logic anywhere
No IdentityPolicy / DocumentRequirementEvaluator
Missing birth cert does not auto-Suspend(MissingDocuments) (officers do that manually; test uses it as notes string only)
AttachDocument doesn't refresh residence or identity checklist
No document subtypes (translation, legalisation pending)
7. Address / housing situation (homeless?)
Key files
Path /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Address/HousingSituation.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/DeclareAddress/DeclareAddressHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/RecordHousingSituation/RecordHousingSituationHandler.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/AddressStep.razor
Implemented
DeclareAddress() enforces 1030 Schaerbeek domicile (EnsureSchaerbeekDomicile)
HousingSituation: Owner, Tenant, Lodging, StudentHousing, Shelter
Housing requires address first; UI supports all options including Shelter
Stubbed (homeless exception)
No reference address concept (docs/GLOSSARY.md mentions it)
Shelter is a label only — no alternate address flow, no waiver of street/number requirement
Police verification still expects a declared Schaerbeek address
No special register target for homeless persons
8. RegisterTargetResolver
Key files
Path /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegisterTargetResolver.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegisterTarget.cs/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Domain.Tests/Registration/RegisterTargetResolverTests.cs
Implemented
csharp Copy code
Suggest(category, nationality):
EuCitizen + Belgian → PopulationRegister
EuCitizen + non-Belgian → ForeignersRegister
NonEuWorker / Student → ForeignersRegister
null category → null
IsAllowed() → suggested must equal chosen target
Used in: RefreshRegisterDeterminability(), Approve(), GetRegistrationCaseHandler, GetCaseReviewChecklistHandler.
Stubbed
RegisterTarget.WaitingRegister and SpecialRegister defined but never suggested or allowed
No refugee/temporary-protection → waiting register path
No diplomat → special register path
Nationality check is simple string "Belgian" match only
Phase 9 slice map — implemented vs extension points
From /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/ROADMAP.md (lines 427–444):
ROADMAP slice Current state Concrete extension points Missing birth certificate → suspend (High)Enum + manual suspend only Add BirthInformation on Person or case; DocumentRequirementPolicy; checklist flag BirthEvidenceEstablished; auto-suggest Suspend(MissingDocuments) in handler or RegistrationCase.EnsureDocumentsComplete(); wire AttachDocument → re-check Marriage not recognised (Medium)MarriageRecognitionPending enum; civil status intake doneAdd MarriageRecognitionStatus on CivilStatusRecord; rule: unrecognised foreign marriage → record as Single + auto-suspend; UI branch in CivilStatusStep.razor Duplicate identity investigation (High)Scorer + UI warning + link flow Add DuplicateInvestigationOpen on case/checklist; block Approve while open; auto-suggest Suspend(InvestigationRequired) on exact match without link; optional Reject(DuplicateIdentity) workflow Illegal stay → reject + refer (Medium)RejectionReason.IllegalStay enumNew IllegalStayPolicy or extend residence evaluator; tie failed permit + no decision → NoLegalResidenceBasis/IllegalStay; UI refer-out panel Refugee / temporary protection (Medium)AwaitingFederalDecision suspend reasonAdd ResidenceCategory.Refugee; policy using ImmigrationDecision; RegisterTargetResolver → WaitingRegister; federal-decision suspend auto-path Diplomat separate rules (Low)Nothing Add category + SpecialRegister in resolver; exempt police verification? (domain decision) Homeless reference address (Low)HousingSituation.Shelter onlyAdd ReferenceAddress VO; relax EnsureSchaerbeekDomicile or parallel address type; Shelter-specific police flow (High)
Cross-cutting extension patterns
New checklist flags in RegistrationCaseChecklist + CaseReviewChecklistMapper.BuildQuestions() + IsReadyForApproval
Policy/evaluator classes alongside IResidencePolicy (e.g. IIdentityDocumentPolicy, IDuplicateDetectionPolicy)
Hook RegistrationResidenceEvaluator pattern for document attach: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/AttachDocument/AttachDocumentHandler.cs
Domain methods on RegistrationCase for exception state transitions (keep handlers thin)
Tests mirror existing: RegistrationCaseDecisionTests, ResidencePolicyTests, NationalRegisterSearchScorerTests
Quick “what’s real vs placeholder” summary
Area Real implementation Placeholder / manual only Checklist 5 intake/review flags Birth, marriage, duplicate, document completeness Person fields Name, DOB, nationality, NR/BIS, civil status Birth place, parents, previous names Reject/Suspend Full state machine + UI Auto-triggering from domain rules Immigration policies 3 categories, permit validity Documents, immigration decision, refugee/diplomat NR duplicates Scoring, search, link, UI warning Investigation workflow, approval blocks Birth certificate Upload type exists Requirement enforcement Homeless Shelter housing enumReference address, special procedure Register targets Population / Foreigners Waiting / Special registers
The strongest foundation for Phase 9 is the decision state machine (Reject/Suspend/Resume) and NR duplicate detection — Phase 9 work is mainly adding domain rules that drive those transitions rather than new CRUD slices.