Version: 1.0.0Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Last Updated: 2026-05-08
Spec: RH-02 Programs & Phases
Constitution Reference: Section 1.2 (Core Independence), Section 1.3 (Integration Patterns)
Overview
RH-02 owns recovery-program definitions, phase lifecycle progression, milestone gating, and phase-specific privilege rules. It publishes progression/milestone/completion events and consumes platform capabilities for notifications and forms.Integration Points
Platform Foundation (PF) Dependencies
Required PF Features:- PF-08 (Forms Integration): intake/assessment/exit form linkage at program level
- PF-10 (Notifications): phase progression and milestone notification delivery
Consumer Core Dependencies (Downstream)
Internal RH dependencies:- RH-01: episode lifecycle records required for enrollment/progression
- RH-03: significant events can trigger regression decisions
- RH-04: attendance/curfew outcomes influence progression readiness
- RH-05: discharge planning consumes program/phase completion outcomes
- FA: consumes
program_completedevent for downstream billing/financial workflows
RBAC Dependencies (PF-02)
RH-02 role expectations:rh_program_manager: define programs/phases/privileges/milestonesrh_house_manager: approve progression/regression decisionsrh_housing_tech: record milestone completion events
Event Contracts
Event: phase_progressed
Publisher: RH (RH-02)Subscribers: PF-10
Status: 📝 Planned Purpose: Notify on phase lifecycle transitions for resident communication and operational awareness.
Event: milestone_completed
Publisher: RH (RH-02)Subscribers: PF-10
Status: 📝 Planned Purpose: Trigger celebration/reminder notifications and progression workflow updates.
Event: program_completed
Publisher: RH (RH-02)Subscribers: FA, PF-10
Status: 📝 Planned Purpose: Notify finance and operations when program lifecycle is complete.
Security Considerations
Multi-Tenancy
- All RH-02 entities are organization-scoped with RLS-enabled access.
- Cross-tenant reads/writes are blocked by policy and tested in RLS suites.
PHI/PII and Auditability
- Event payloads use identifiers and lifecycle metadata only (no unnecessary PHI fields).
- Progression/regression/milestone actions must retain actor and timestamp in auditable records.
Role-Gated Operations
- Progression/regression requires elevated RH manager roles.
- Milestone completion requires role-appropriate write permissions.
Testing Requirements
- Event payload structure validation for all three RH-02 events
- Trigger condition verification (progression, milestone completion, program completion)
-
organization_idinclusion and tenant isolation checks - Subscriber compatibility checks for PF-10 and FA
- RLS policy tests for RH-02 tables and role-sensitive actions