Scenario modularization proof.
A redacted or synthetic refactor plan for Make/n8n scenarios that have grown into brittle all-in-one builds. It separates safe module boundaries from risky side effects, then assigns idempotency keys, error paths, and reviewer actions.
Refactor Ledger CSV
Error Paths CSV
Scenario Inventory CSV
Module Boundaries CSV
Idempotency Plan CSV
Naming Runbook CSV
Runbook
Source Script
Reference Patterns
Ask If This Fits
Input
Four mock Make/n8n scenario families and six proposed sub-scenario boundaries.
Output
A refactor ledger with extract, dry-run, review-gate, and keep-inline decisions.
Guardrail
Five reusable boundaries move forward; one stays inline because reuse is not proven yet.
| Boundary | Scenario | Decision | First Action | Idempotency Key | Reviewer Action |
|---|---|---|---|---|---|
| BND-01 webhook-ingress-normalizer | lead-webhook-router | extract_first | Extract before changing downstream writes. | tenant_id:request_id | Approve extraction after three sample payload tests. |
| BND-02 lead-eligibility-gate | lead-webhook-router | extract_with_review_gate | Extract behind a reviewable blocked-row ledger. | tenant_id:request_id:eligibility | Review blocked reasons before enabling live writes. |
| BND-03 enrichment-cache-lookup | enrichment-batch-cleanup | extract_first | Extract before changing downstream writes. | source_record_id:profile_version | Approve cache TTL and stale profile behavior. |
| BND-04 vendor-enrichment-worker | enrichment-batch-cleanup | dry_run_before_live | Run as a dry-run module until usage and ledger counts match. | source_record_id:vendor:run_date | Dry-run first and compare usage counts before live update. |
| BND-05 invoice-preflight-ledger | invoice-intake-approval | extract_with_review_gate | Extract behind a reviewable blocked-row ledger. | vendor_id:invoice_number:amount | Approve exception categories and replay rule. |
| BND-06 exec-report-builder | daily-exec-report | document_inline | Keep inline for now; add naming and runbook standard only. | report_window:channel | Leave inline and document naming only. |