Client Intake And Onboarding
Client Intake & Onboarding Runbook
1. Purpose & Lifecycle Overview
This runbook defines the operational workflow for onboarding a new client business into SiteSwarm.
Client onboarding follows three sequential phases:
- Phase 1 — Discovery Conversation: Unstructured or semi-structured conversation with the business owner to understand their business model, customer base, physical locations, pain points, and existing digital assets.
- Phase 2 — Post-Discovery KYC & Scope Synthesis: Translating raw discovery notes into the structured post-call intake checklist (
CLIENT_INTAKE_CHECKLIST.md) to capture Know-Your-Customer (KYC) records, the full scope of work (locations, number of web properties/sites, and business-specific operational workflows), and open escalation questions. - Phase 3 — Workspace Initialization & Vibe Definition: Creating or promoting the client workspace(s) using client-prefixed naming (
apps/<client-prefix>-<site-slug>/so clients with multiple locations or sister sites coexist cleanly), connecting capabilities in the client manifest (CAPABILITY_MANAGEMENT.md,CLIENT_INQUIRY_INTAKE_ONBOARDING.md), and authoring or ratifying the client’sVIBE.mdvoice and aesthetic direction contract.- Supported Phase 3 Entry Points:
- Greenfield Scaffolding: Standard entry point for direct inbound clients onboarded without a prior prototype.
- Prototype-to-Client Promotion: Fast-track entry point for signed prospects who already have an active pre-awareness edge prototype (
apps/proto-<slug>/). Rather than re-scaffolding from scratch, Phase 3 executes the in-place promotion procedure (preserving Git commit pedigree viagit mv, synchronizing monorepo package manifests, provisioning dedicated Cloudflare D1/R2 infrastructure, ingesting remote CDN assets, and wiring custom domain ingress perCLOUDFLARE_FOR_PLATFORMS_AND_DOMAIN_INGRESS.md).
- Supported Phase 3 Entry Points:
2. Resolving Ambiguities: Builder Liberties vs. Client Escalation
Discovery conversations rarely answer every implementation detail upfront. To maintain delivery velocity without making unauthorized business or legal commitments, intake staff and agents resolve ambiguities using strict domain separation:
| Domain Category | Resolution Path | Operational Policy |
|---|---|---|
| Creative & Aesthetic Layout | Builder Liberties | Layout composition, typography pairings matching the client’s vibe, spacing rhythms, and responsive breakpoints are executed with high-taste defaults and logged for review. |
| Micro-Copy & UX Polish | Builder Liberties | Section headlines, call-to-action phrasing, and toggleable preview variations (?variant=...) are prototyped directly. |
| Commercial & Pricing Models | Client Escalation Gate | Never assumed. Service rates, fee tiers, discounts, or deposit terms require explicit client verification. |
| Legal & Regulatory Compliance | Client Escalation Gate | Never assumed. Disclaimers, warranties, privacy policies, trade licenses, and certifications require explicit client sign-off. |
| Domain, DNS & Identity Routing | Client Escalation Gate | Never assumed. Production DNS cutover (CLOUDFLARE_FOR_PLATFORMS_AND_DOMAIN_INGRESS.md), live inquiry forwarding email addresses, and SMS alert phone numbers require explicit verification. |
3. Phase 3 Detail: Prototype-to-Client Promotion Lifecycle
When onboarding a signed client whose engagement originated as an interactive pre-awareness edge prototype (under Epic #575 and the prototype promotion procedure codified in #578 / candidate runbook PROTOTYPE_TO_CLIENT_PROMOTION.md), Phase 3 executes an auditable in-place promotion workflow rather than a blank scaffold:
flowchart LR Proto["apps/proto-<slug>\n(Pre-Awareness Prototype)"] --> GitMv["In-Place Rename\n(git mv apps/proto-<slug> apps/<client-prefix>-<site-slug>)"] GitMv --> Sync["Workspace Sync\n(package.json, swarm.config.ts, wrangler.jsonc)"] Sync --> Infra["Dedicated Cloudflare Infra\n(Dedicated D1 SQLite & Dedicated R2 Bucket)"] Infra --> AssetMigrate["Asset Ingestion\n(Audit CDN Hotlinks -> Ingest to R2)"] AssetMigrate --> Ingress["Platforms Ingress\n(Dual Route Binding: Custom + CNAME Target)"] Ingress --> ProductionTenant["Production Tenant\n(apps/<client-prefix>-<site-slug>)"]3.1 Promotion Execution Checklist
- Lineage Pre-Flight & Working Tree Audit:
- Confirm commercial contract execution and onboarding deposit receipt.
- Cross-reference
CLIENT_INTAKE_CHECKLIST.md§2.1 (Prototype Lineage) and §5.3 (Ratified Builder Liberties). - Ensure the source prototype directory (
apps/proto-<slug>/) has 0 uncommitted changes.
- In-Place Directory Rename (
git mv):- Run
git mv apps/proto-<slug> apps/<client-prefix>-<site-slug>. - Never duplicate or copy-paste directories (
cp -ris forbidden) to preserve 100% of commit history, blame, and author attribution.
- Run
- Workspace Manifest & Configuration Synchronization:
- Update
apps/<client-prefix>-<site-slug>/package.jsonpackage name to@siteswarm/app-<client-prefix>-<site-slug>. - Run
pnpm installto update the monorepo workspace dependency graph. - Register root scripts (
dev:<client-prefix>-<site-slug>,build:<client-prefix>-<site-slug>) in rootpackage.json. - Author or update
swarm.config.tsusing@siteswarm/governanceto register tenant metadata, brand tokens, and capabilities. - Update
wrangler.jsoncwith the new Worker isolate name,APP_ID, and environment blocks (staging,production). Ensuresession: falseis configured in Astro to prevent orphaned preview KV namespaces.
- Update
- Dedicated Cloudflare Tenant Infrastructure:
- Provision dedicated Cloudflare D1 SQLite database(s) (
wrangler d1 create <client-prefix>-<site-slug>-prod-d1and-staging-d1). - If the prototype was escalated to Phase 3 with local SQLite schemas, execute remote schema and seed migrations (
schema.sql/seed.sql). - Provision dedicated Cloudflare R2 media bucket(s) (
wrangler r2 bucket create <client-prefix>-<site-slug>-media-prodand-staging). - Register the D1 and R2 bindings in
wrangler.jsonc(or Worker B CMS for split architectures).
- Provision dedicated Cloudflare D1 SQLite database(s) (
- Remote Asset Migration & R2 Ingestion:
- Audit external media hotlinks in
src/(e.g. Unsplash, external prospect sites). - Ingest all remote assets into the client’s dedicated R2 bucket using Wrangler.
- Refactor image references to tenant-hosted paths and verify 0 unmanaged external CDN hotlinks remain in production markup.
- Audit external media hotlinks in
- Cloudflare for Platforms Domain Ingress:
- Create the client’s dedicated CNAME target (
<client-prefix>-<site-slug>-ingress.<platform-domain>) pointing tofallback.<platform-domain>on the platform zone. - Register the custom hostname (
www.<client-domain>.com) with DCVTXTpre-validation for zero-downtime SSL issuance. - Configure Dual Worker Route Bindings in
wrangler.jsonc(www.<client-domain>.com/*and<client-prefix>-<site-slug>-ingress.<platform-domain>/*) perCLOUDFLARE_FOR_PLATFORMS_AND_DOMAIN_INGRESS.mdto guarantee resilience across Grey Cloud and Orange Cloud (O2O) DNS modes. - Guide client through updating their
wwwCNAME and root@forwarding without modifying authoritative nameservers or touchingMXemail records.
- Create the client’s dedicated CNAME target (
- Zero-Lockout Data Portability Verification:
- Promoted tenants must maintain 100% data portability guaranteed by
CLIENT_OFFBOARDING.mdand Issue #207. - Verify that the client’s dedicated D1 database can be atomically exported (
wrangler d1 export <client-db> --remote --output=<client>-export.sqlorpnpm swarm export-client <client-slug>). - Verify that all media assets in R2 can be cleanly extracted into a portable archive bundle in under 5 minutes.
- Promoted tenants must maintain 100% data portability guaranteed by