Foundation
Rules
Locked constraints. Read before executing.
Rules · The Locked Constraints
These are non-negotiable. Every code change, lock, ship, generation, edit must comply. Violations = system destruction.
Roles (who gates what)
| Role | Approves |
|---|---|
| POC (Brand's primary contact · Steve for MCM) | Their brand's copy + HIFI locks per component |
| Reviewer (workforce editors) | System rules · master templates · cross-brand patterns |
| Founder (escalation tier) | Strategy disputes · architecture changes · novel decisions |
| Auto (AI checks · no human) | Compliance: em-dash count, fabrication scan, Title Case lint, voice rules |
Process
| Rule | What it means |
|---|---|
| Never build without specs | Spec → Reviewer/POC approval → build. Never the reverse. |
| No lock without role QA | Score / edits / "looks good" ≠ approval. Only explicit "lock it" from the role-authorized human → I call /api/install/lock-component. |
| Two-stage lock | COPY locks first (POC approves content_json in Doc), THEN HIFI locks (POC approves rendered page). Never build HIFI from unapproved copy. |
| Templates not scratch | Every deliverable = (Reviewer-locked template) × (brand data jsonb). Render + plug. Do not write from scratch or reinvent structure. |
| Specific tool = spec | When Reviewer names a tool/template/library (Unmint, Aceternity, Resend, VAPI), that IS the spec. No reinterpretation. No substitutes. |
| Reply format | Every AI reply opens with one sentence: status + vision + next task. |
| /os real-time sync | As we lock the system, we also lock the docs. /os is canon. |
Design
| Rule | What it means |
|---|---|
| No custom HIFI dev | Only Aceternity components OR Reviewer-locked master templates. No hand-rolled Tailwind layouts. |
| BrandGradient backdrop | Every HIFI surface uses the canonical radial gradient. |
| Master Landing = Framer port | https://little-task-312464.framer.app/ ported into components/hifi-templates/master/Landing.tsx. |
| Modal heading pattern | "Where Should We Send Your <Magnet Name>?" |
| Modal CTA = hero CTA | Same size, same style, never smaller. |
Copy
| Rule | What it means |
|---|---|
| Title Case always | All display copy in Title Case. Lowercase only articles + short preps + coordinating conjunctions (never first word). |
| Zero fabrication | Every stat, name, claim from verified real sources. [PLACEHOLDER — NEED REAL DATA] if absent. |
| Brand voice corpus | Per-brand voice rules in brand.config.brand_os.voice_rules override master template defaults. POC owns voice rules for their brand. |
| MCM voice (example) | No em-dashes · no bullets on pre-sell · no AI tells · no pricing · ONE CTA only · NO promises of Andrea personally delivering care · Outcome triplet verbatim: "safe, comfortable, and cared for at home" · Origin story verbatim · Inter font only. |
Data
| Rule | What it means |
|---|---|
| jsonb only | All component data in brand.config.engine.components[slug].content_json. No new tables. |
| Drafts in Docs → Supabase | Google Docs is the review/edit surface. POC approves → import to Supabase. Docs never sync back from code. |
| No overwrite authoritative | Re-scrapes write to {slug}-deep.json, never overwrite keeper. |
| Supabase is source of truth | Sheets/Docs are human layer, sync FROM Supabase. |
Ship
| Rule | What it means |
|---|---|
| Orient before touching | Before ANY code change: git branch (am I on the branch prod deploys from?), git fetch && git status (tree clean + current?). If the tree has foreign uncommitted changes, or I'm on the wrong branch → STOP, flag it, do not work in it. Never assume local = source of truth. |
| NEVER manually alias prod domains | The git pipeline owns 0hr.app / mcmprivatecare.com. vercel alias set … 0hr.app OVERRIDES the pipeline and wipes live UI. Deploy previews only; the pipeline (or the human) promotes to prod. (Supersedes the old "alias gotcha" rule — that rule caused a live-UI wipe.) |
| Preview → approve → prod | Local → preview URL → screenshot → explicit human "go" → prod via pipeline. No prod, and no new scope, without an approved spec + mockup. |
| Reuse, never rebuild | If a component/card/page exists, use it as-is. Zero re-implementation of working UI. |
| Find-and-confirm, never guess-and-rebuild | "We had it working" → locate the exact commit/branch/deploy and CONFIRM before changing one line. Never rebuild from memory. |
| Prod state is checked, never remembered | vercel alias ls / curl a marker before ever stating what is live. |
| No publish without POC approval | Eager tone ≠ "go ship". Explicit "publish" command from POC only. |
| No unrequested prod swaps | Each prod deploy = explicit ask. Never auto-replace live customer-facing routes. |
| DNS safety | Namecheap setHosts is nuke-or-nothing. Always validate getHosts Status=OK + record count ≥20 before writing. Auto blocks on fail. |
| Rule | What it means |
|---|---|
| Resend is the engine | Period. CLAUDE.md statements about "Resend killed → Loops" are stale. |
| Verified domain required | Production sends require Resend-verified domain. onboarding@resend.dev only works for testing to the API owner. |
| Verify at capture, act on bounces | Every capture path verifies email + phone; the provider webhook handles bounce/complaint/failure and writes the verdict onto the contact. Never send to an address a provider has already refused. See Deliverability. |
| Fail open, never fail silent | A vendor being down must not cost a lead — but "the checker broke" and "the address is good" must never be the same stored value, or a broken checker stays broken forever. Alert when the vendor-error rate is not ~0. |
| Sanitise every API key | Strip whitespace, quotes AND literal \n. A prod key with a literal backslash-n silently disabled email verification for months; .trim() does not catch it. |
| Drafts only, human sends | No ?send=1. No cron-fired sends. POC triggers. |
Source memory files
Update those → /os updates here.
project_role_taxonomyfeedback_never_build_without_specsfeedback_no_lock_without_mk_qa(POC-routed per role taxonomy)feedback_templates_not_scratchfeedback_specific_tool_choice_is_specfeedback_no_custom_hifi_devfeedback_title_case_alwaysfeedback_reply_format_first_sentenceproject_two_stage_lockproject_mcm_presell_locked·project_mcm_font_lockproject_brand_gradient_canonical·project_hifi_landing_master_template·project_landing_modal_patternproject_email_engine_resend_lockedfeedback_dns_safety_protocolfeedback_orient_before_touching_never_alias_prod·feedback_never_manual_alias_portal_git_autodeploy·feedback_dont_strip_existing_rich_uifeedback_no_publish_without_approval·feedback_no_unrequested_prod_swapsproject_os_source_of_truth