Canonical draft • June 2, 2026 • Telos Prep

Onboarding is a Sales Pipeline state machine, not four disconnected automations.

Each webhook wakes Alfred/Hermes to inspect current source-of-truth state, then run only the narrow actions valid for that state. Verbal/email agreement is the cue to send the contract and first invoice together; Stripe/MRL remains gated.

STATE 0

Lead Intake

Track/enrich prospect only. No client records, active dashboards, Stripe, or MRL.

STATE 1

Consult Scheduled

Create/confirm initial-meeting Project + Dashboard + consult notes. Counselor prep only.

STATE 2

Questionnaire

Parse transcripts, populate GPA notes and Master Grade Entries, run UC A-G where possible.

STATE 3

Agreement

Convert to client-ready records and prepare contract/invoice terms after verbal/email agreement.

STATE 4

Billing Activate

After explicit approval: MRL protection first, then Stripe invoice/subscription, then verification.

Hard invariants

  • Forward-only: never move Sales Stage backward.
  • Payloads are not truth: n8n passes identifiers; Hermes fetches Notion state.
  • Idempotency: search before creating Projects, Dashboards, People, Orgs, Stripe, or MRL rows.
  • Human blockers become Tasks: no silent failures.
  • Contract + first invoice together: verbal/email agreement is the cue.
  • Money is gated: Stripe writes require exact term confirmation.
  • MRL before Stripe webhook risk: avoid orphan `⚠️ NEEDS REVIEW` rows.
  • Won requires verification: invoice sent alone is not enough.

Route contract

n8n should normalize, dedupe, sign, and POST a compact event envelope. Hermes then fetches the Pipeline/Form state and decides.

TriggerNormalizeDedupeHMAC signPOST Hermes200/202 accepted

Build artifacts created