Version: 1.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-03-07
Status: π Planned
Spec Reference: GR-16-accreditation-tracer-readiness.md
Constitution Reference: Section 1.3 (Integration Patterns)
Overview
GR-16 integrates intra-core (GR) and with Platform Foundation (PF) layers. It does not integrate directly with any other non-PF core. All cross-core data is accessed via PF platform layers.Integration Summary
| Integration | Pattern | Direction | Status |
|---|---|---|---|
| GR-08 (Accreditation Mgmt) | Data / FK β tables in same core | GR-16 reads GR-08 tables | π Planned |
| PF-11 (Documents) | Platform Layer | GR-16 β PF-11 (document bundle export) | π Planned |
| PF-12 (Reporting) | Platform Layer | GR-16 β PF-12 (readiness score report) | π Planned |
| PF-27 (Platform AI) | Platform Layer | GR-16 β PF-27 (surveyor question simulator) | π Planned |
| PF-10 (Notifications) | Platform Layer | GR-16 β PF-10 (CAP deadline alerts) | π Planned |
| GR-03 (Compliance Tracking) | Data β same core; query only | GR-16 reads compliance records for gap evidence | π Planned |
| GR-01 (Policy Management) | Data β same core; query only | GR-16 reads policy currency for readiness score | π Planned |
| GR-09 (Incident Reporting) | Data β same core; query only | GR-16 reads incident rates for readiness score | π Planned |
| GR-07 (Quality Improvement) | Data β same core; query only | GR-16 reads QI project data for readiness score | π Planned |
Platform Layer Usage
PF-11 (Documents) β Tracer Pack Export
Layer:@/platform/documentsPurpose: Creates a document bundle for tracer pack export.
API:
organization_id.
PF-27 (Platform AI) β Surveyor Question Simulator
Layer:@/platform/aiPurpose: Generates 3β5 likely surveyor questions for a given accreditation standard.
API:
PF-12 (Reporting) β Readiness Score Report
Layer:@/platform/reportsPurpose: Generates board-level readiness score report with trend data.
API:
PF-10 (Notifications) β CAP Deadline Alerts
Layer:@/platform/notificationsPurpose: Sends deadline notifications to
responsible_party_id and org admins.Trigger: Edge function
gr-cap-deadline-alerts (daily cron).
Notification payload (CAP due):
Edge Function Contract
gr-cap-deadline-alerts
Function: /supabase/functions/gr-cap-deadline-alerts/index.tsSchedule: Daily at 08:00 UTC (
0 8 * * *)Invocation: Cron (server-to-server);
verify_jwt: falseAuth: Service role key; no JWT verification (cron invocation only) Processing logic:
- Load
gr_module_settings.cap_alert_lead_daysper org - Query
gr_accreditation_caps WHERE status <> 'verified_closed' AND target_closure_date <= now() + (cap_alert_lead_days || ' days')::INTERVAL - For each CAP: send
gr.cap.deadline_approachingnotification via PF-10 - For overdue CAPs (target_closure_date < today): send
gr.cap.overduenotification - Log results; retry failed notifications up to 3 times
getCorsHeaders(req.headers.get('origin')) from _shared/cors.tsLogger:
createLogger('gr-cap-deadline-alerts') from _shared/logger.ts
Intra-Core Data Dependencies (GR-08 Tables)
GR-16 reads from GR-08 tables via direct DB queries (same core, not cross-core):| Table | Usage | Access Pattern |
|---|---|---|
gr_accreditations | FK target for tracer packs, CAPs, mock surveys | Read via Supabase query with organization_id filter |
gr_accreditation_standards | FK target for CAPs; source for gap analysis | Read query |
gr_accreditation_evidence | Source for tracer pack assembly and gap computation | Read query (evidence count, dates, quality rating) |
Contract Validation Checklist
- Integration doc exists at canonical path
- All integration points from spec covered
- PF-11 document bundle creation API documented with tenant isolation note
- PF-27 AI prompt interface documented with PHI guardrail
- PF-10 notification payloads defined
- Edge function documented with
verify_jwt, CORS, logger - Integration matrix updated in
CROSS_CORE_INTEGRATIONS.md - Event types added to
KnownEventNameinsrc/platform/events/types.ts(if events published β N/A; GR-16 does not publish events)
Cross-Core Integration Matrix Entry
Add todocs/architecture/integrations/CROSS_CORE_INTEGRATIONS.md: