Customizable Workflows · PRD v0.3 · Internal Overview

Every funeral home
runs cases differently.

RequiemOS handles that with a module pipeline: a library of reusable workflow building blocks, assembled into tenant-specific templates by Requiemos platform staff.

48
Module definitions in the catalog
5
Module types (human, doc, system, AI, conditional)
3
Tiers — locked, standard, optional
6
Starter templates at MVP

Three layers

A case is not a fixed phase progression. It is an ordered sequence of module instances, each consuming and producing a shared context envelope.

LAYER 01

Module Library

48 reusable workflow building blocks. Platform-managed, not tenant-scoped. Each module has defined inputs, outputs, prerequisites, and a completion rule.

first_call_capture
coc_scan_pickup
service_selection
cremation_auth_gate
remains_return
…43 more
LAYER 02

Workflow Templates

Tenant-scoped ordered sequences of module references. Platform staff clone starter templates and adjust per-tenant during onboarding. Versioned; in-flight cases stay on assigned version.

standard_cremation_v1
standard_burial_v1
green_burial_v1
direct_cremation_v1
cremation_with_memorial_v1
direct_burial_v1
LAYER 03

Case Pipelines

When a case is created, the appropriate template is materialized as a per-case execution. Each module instance gets its own execution record. The context envelope accumulates as modules complete.

Kearney case #2026-0042
→ template: standard_cremation_v1
→ 22 module instances
→ envelope: 47 keys
→ status: active

The context envelope

A JSONB document that flows between modules. Each module reads what it needs, performs its work, writes its outputs. The envelope grows as the case progresses. Modules that don't apply pass it through unchanged.

The envelope carries routing and decision data only — not the system of record. Deceased person details live in the deceased table. Assets live in the assets table. CoC events are immutable in custody_events. The envelope just carries the flags downstream modules need to read.

First Call Capture
first_call_capture

Director answers initial call. Captures identity, time of death, death location.

Writes to envelope
intake.caller_id_verified
intake.time_of_death_recorded
intake.death_location_type
Coroner Hold Check
coroner_hold_check

Reads death location. Determines whether ME jurisdiction applies. Branches accordingly.

Reads / Writes
reads: intake.death_location_type
writes: intake.coroner_hold
Service Selection
service_selection

Arrangement conference. Major envelope-enriching module. Downstream modules read disposition_type.

Writes to envelope
arrangement.disposition_type
arrangement.service_level
arrangement.religious_affiliation
// Envelope state after these three modules complete
{
  "case": { "case_id": "…", "case_number": "2026-0042" },
  "intake": {
    "caller_id_verified": true,
    "time_of_death_recorded": true,
    "death_location_type": "hospital",
    "coroner_hold": false
  },
  "arrangement": {
    "disposition_type": "cremation",
    "service_level": "standard",
    "religious_affiliation": null
  },
  "workflow": {
    "current_module_key": "family_meeting_schedule",
    "completed_modules": ["first_call_capture", "coroner_hold_check", "service_selection"]
  }
}

The module library

48 module definitions across 7 phase hints. Phase is a library organization label only — templates can sequence modules from any phase in any order. Click any module to expand its definition.

Tier Locked — compliance-critical, cannot be removed or skipped Standard — included by default, skippable with reason Optional — added per-tenant during onboarding
Type HHuman task — staff completes and confirms DDocument gate — signed doc required SSystem event — automatic AAI assist — suggests, human confirms CConditional — evaluates and branches

Same engine, wildly different workflows

A template is an ordered sequence of module references scoped to a tenant. Six starter templates ship at MVP. Pick any two below to see how dramatically the pipelines diverge — same module library, completely different cases.

Highlighted rows are modules unique to that template — they don't appear in the other column. Plain rows appear in both templates (though their position may differ). Notice how cremation vs burial vs green burial pull from the same library but produce very different workflows.

One case, end to end

A standard cremation at Kearney. First call Monday morning, cremation Thursday, remains returned Friday. Here is what the pipeline looks like in practice, grouped by phase. Each row is a module instance with its own execution record.

Monday, 06:42 — First call
Hospital calls. David takes the call from home.
Monday, 08:15 — Transfer
Van dispatched. Pickup from hospital morgue. Receiving at funeral home.
Tuesday, 10:00 — Arrangement
Family meeting in person. Service selected. Contract signed via DocuSeal.
Tuesday afternoon — Preparation
Rob receives printed task list. Identification confirmed. Container selected.
Wednesday — Service
Chapel visitation Wednesday evening. No procession (cremation, memorial-style service).
Thursday, 09:00 — Disposition
Crematory. Witnessed by family. Cremated remains returned to funeral home same day.
Friday + ongoing — Aftercare
Urn returned to family. Death certificate filed. 30-day follow-up scheduled.

What the engine guarantees

Locked modules cannot be removed or skipped

Compliance-critical modules — chain-of-custody scans, cremation authorization, asset terminal checks — are immutable in templates. Platform staff cannot remove them. Staff cannot skip them on a case. This is how regulatory compliance is enforced by design.

Chain-of-custody records are append-only

CoC scan modules (pickup, receiving, disposition) write to custody_events as immutable records. Corrections use a supersession pattern — the original record is never modified. The audit trail is permanent.

Disposition is blocked until prerequisites pass

The asset_terminal_check module queries the assets table directly — not the envelope — and blocks case closure if any asset is not in a terminal state. Cremation authorization gate blocks crematory coordination. These are hard gates, not advisories.

Open questions & discovery items

The module catalog is a hypothesis. Discovery sessions with Kearney are needed to validate naming, sequencing, and boundaries before the library is seeded. The data model and engine (Sections 7–8 of the PRD) can proceed in parallel.

Coroner hold branching

When a coroner hold is active, downstream modules need to suppress until released. MVP approach: an envelope flag that suppressing modules check via skip_condition, plus a manual "hold released" module. Dynamic module insertion is Phase 2.

Pre-need conversion

Cases that originate from a pre-existing arrangement should auto-populate the envelope and mark arrangement modules N/A. Requires a pre-need data model that doesn't exist yet. Deferred to Phase 2 unless Kearney has active pre-need cases at pilot.

Repatriation — template or modifier?

Repatriation involves multiple transfers, consular paperwork, and freight coordination. Open question: is it complex enough to warrant a starter template, or is it an optional-module overlay on an existing template? Validation needed from Kearney.

Envelope key namespace governance

As modules accumulate, envelope keys risk collision. Proposal: namespace by phase (intake.*, arrangement.*, compliance.*) and maintain a key registry in a companion schema doc.

Jurisdiction-specific locked modules

Canadian vs. US regulatory differences may require jurisdiction-aware locked modules. MVP: all locked modules are global. Filtering by jurisdiction is Phase 2.

Workflow sequencing at Kearney

Does arrangement typically precede transfer at Kearney, or follow it? Does this vary by death location? How many transfers does a typical case involve? These answers shape the starter template sequencing — top-priority discovery items for Zareef.

case_status enum alignment

The existing case_status enum (intake, arrangement, preparation, disposition, closed) reflects a linear model. With the module pipeline, status becomes a derived display value, updated by system_event modules at key transitions. Mapping needs explicit definition before implementation.

Catalog count drift

PRD summary says 43 modules; the catalog actually lists 48. PRD says ~12 locked; catalog has 19. Worth a reconciliation pass before this gets seeded into the database.