Home / Ops / More in this area
Updated Jun 29, 2026 · Affirmology_NDAFlow_BuildBrief_v1.md
For: a Claude Code session on the Mac (repo access, the keys in affirmology-studio/.env, Cloudflare token, can deploy the Worker).
How to use: paste this whole file as the kickoff.
Automate the demo-access pipeline end to end: a warm contact opens their personal link, signs the full NDA through SignWell, and the moment they finish, a record is written to the Airtable CRM and demo access is granted, with funnel events tracked along the way. No manual steps per person. This replaces the in-page clickwrap gate that is currently in affirmology-site/index.html.
demo.affirmology.ai/?id=<token>. The page maps the token to a person and passes name/email into SignWell as prefill./api/track and update the same People row.All paths are LOCAL files under the project root on the Mac: /Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/. Open them by that local path. (If the folder also syncs to Google Drive, ignore the Drive copy and use the local path.)
/Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/affirmology-site/ (the page is index.html; the current gate is the #nda-gate block + its IIFE near the bottom)./Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/Affirmology_NDA_Signable_v5.pdf (Affirmology LLC as Party A, Jeff's signature pre-applied, recipient signs Signature + Date; SignWell auto-captures name/email/IP/time).demo.affirmology.ai/api/*: affirmology-demo-site/worker/ (add the new routes here). The demo runs cloud-side; the Worker is the public API surface.affirmology-studio/.env: AIRTABLE_API_KEY, CLOUDFLARE_API_TOKEN, RESEND_API_KEY. Add SIGNWELL_API_KEY (Jeff will provide).appSuTUcOQbpkxLUR ("Affirmology Launch CRM").tblOOWgEjVfX21NT3. Relevant field IDs:fldd9ZIKCqWAGf9Z2, Email fldCnQ39xZKoQY6NA, WhatsApp / Phone fldbQ0xChwNVeTcC6fldqvIA716ngjkmwz (single select: "NDA signed", "Took demo", etc.)fldZM3ctrBuo27qvq (checkbox), NDA signed at fldLzc2FDO1QBumgp (date)fldSJzzk0soCzetDa, Door taken fld7JjfB0jGozDhcW, Demo listened fldewnjdXIXECJAVC, Vision video watched fldRUbtQh9f8flLTH, Report read fldiuSQJNUH13eIlvfld3pWfOANeRAs2e0, Beta committed at fldBRRKmaQvOTwAvn, Hub link fldMo3NIxM2ngqz06, Last seen fldXbvDzxyYuzhMIstblvMUdNEZ6s5YHHR (Person link fld6yfUonM8bfnckj) for logged touchpoints..env must have access to base appSuTUcOQbpkxLUR. The token currently lists zero bases. Jeff: open the token at airtable.com/create/tokens, add the base "Affirmology Launch CRM", save. (The base was created via the Airtable MCP, which is why the older token cannot see it yet.) Confirm GET https://api.airtable.com/v0/meta/bases returns the base before relying on REST writes.https://www.signwell.com/api/v1/, auth header X-Api-Key: <SIGNWELL_API_KEY>.POST /api/nda-webhook : receive SignWell events; on completed, upsert People (match by email), set NDA signed + signed-at + name + phone + Stage "NDA signed"; then grant access (token or Cloudflare Access allowlist add). Return 200 fast; do the Airtable write server-side with AIRTABLE_API_KEY.POST /api/track : body {token|email, event, at}; map to the People row and set the matching funnel field + Last seen. Events: link_clicked, door_experience, door_vision, demo_listened, vision_watched, report_read, beta_committed.GET /api/nda-status?token= : lets the page check whether this person has already signed, so returning visitors skip straight in (never re-gated, per the never-gatekeep rule for the personal page).The engine emails a notification per render and the Listening Room/library has every entry. Add a periodic job (or reuse the render-complete signal) that matches the render's email to People and sets Demo listened + Stage "Took demo". This closes the loop between "signed" and "actually experienced it".
/api/track event updates the right field on the right person; signing twice does not duplicate the row.appSuTUcOQbpkxLUR (section 4 prerequisite).SIGNWELL_API_KEY to .env; build the /api/nda-webhook and /api/track Worker routes with server-side Airtable upserts.index.html gate to the SignWell "sign to enter" flow with token prefill and the access grant./api/nda-webhook; test a real signature end to end.Keep it lean and idempotent. The signing-to-access-to-CRM loop is the must-have; the reconciliation and the status-check are fast-follows.