Step 6: Validate
Objective
Check the graph for orphans and schema compliance.
Prerequisites
- Do not use plan mode. Execute directly.
- Graph with enriched components from Step 5.
Process
Do not explore the codebase. Run validation commands and handle output.
1. Check Orphans
bash
riviere builder check-consistencyFor JSON output:
bash
riviere builder check-consistency --jsonReview ALL orphan components. Orphans are warnings, not errors - but they often indicate missing links.
Common causes:
- Orphan Events: DomainOp not publishing, or EventHandler not subscribing
- Orphan EventHandlers: Event not being published, or event name mismatch
- Orphan DomainOps: UseCase not calling the operation
- Orphan UseCases: API not invoking the use case
Pay special attention to orphan UseCases and DomainOps - these are not entry points or exit points so it's unusual for them to be orphans.
For each orphan:
- Analyze: why is it orphaned? Is this correct (e.g., external consumer) or a missing link?
- If missing link detected: update scanning rules in
.riviere/config/component-definitions.md - Rescan: re-run step 3 (extract) and step 4 (link)
- Repeat until satisfied
A high orphan count (>20%) usually indicates systematic linking failure in step 4.
2. Validate Schema
bash
riviere builder validateFull JSON Schema validation. Fix any errors before proceeding.
Completion
Present final stats:
- Total components by type
- Total links (sync vs async)
- Domains covered
Graph extraction complete.