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.
Lead Intake
Track/enrich prospect only. No client records, active dashboards, Stripe, or MRL.
Consult Scheduled
Create/confirm initial-meeting Project + Dashboard + consult notes. Counselor prep only.
Questionnaire
Parse transcripts, populate GPA notes and Master Grade Entries, run UC A-G where possible.
Agreement
Convert to client-ready records and prepare contract/invoice terms after verbal/email agreement.
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.
Build artifacts created
knowledge/onboarding-state-machine.md— canonical spec.knowledge/README.md— indexed under Onboarding.skills/stage1-initial-meeting-prep/SKILL.md— references state map.skills/stage3-contract-prep/SKILL.md— corrected agreement/contract/invoice semantics.skills/stage4-billing-activate/SKILL.md— corrected trigger and MRL-before-Stripe sequence.