Session 38 — Untangle + Cleanup of v4 Page Deployment Systems

Where we started → where we ended up → SOP for how v4 pages are now made

← Command Centre · GSD: wave-3-rollout-2026-05-10 · Branch: feature/v4-migration · Generated 10 May 2026

The all-work-done narrative

What started as a 10-page tactics backfill turned into a full pipeline overhaul. Two customer-facing copy bugs surfaced a deeper problem — copy drift across pages with no canonical source of truth and no pre-publish gate — and the rest of the session traces back to fixing that. By the end: tactics-first hard gate, hybrid Pinecone+Graphiti canonical messaging store, a 5-layer enforcement tool, 88 v4 pages reworked across 4 markets, 10 LPs re-illustrated, and the new SOP that all future pages flow through. For pending decisions only, see Wave 3 Review.

58
Agentic-OS commits since 8 May
4 / 4
Markets shipped (UK/US/DE/FR)
88
v4 pages audited & gated
1,016 + 869
Pinecone records + Graphiti triplets

Sections

0 · Strategic review notes — risks & open items before cascade

Review approach. Codex 5.5 plan-mode + Gemini Pro 2.5 strategic review run 2026-05-10 (see review log directly below). Per feedback_fix_codex_highs_dont_halt.md, HIGHs were fixed inline rather than halting. The risks below are surfaced in dedicated callouts rather than buried in narrative; see §9 for the full Mission 25 integration go/no-go gate.

Review log — Codex 5.5 + Gemini Pro, 2026-05-10

ReviewerVerdictHIGHMEDIUMLOW
Codex 5.5 (plan mode)REFINE242
Gemini Pro 2.5PASS012

HIGH findings — addressed inline

MEDIUM findings — addressed where cheap

LOW findings — ignored unless flagged

Risks & open items, surfaced explicitly

1 · Where we started

The original mandate was narrow: backfill tactics docs for ten v4 landing pages that had been built without a pre-publish strategy doc. Those ten pages were a snapshot of how things had been done up to that point — commission a page, ship it, audit later.

While walking through the ten pages, two customer-facing copy bugs surfaced:

Those two bugs were the visible symptom. Behind them sat the deeper system problem: copy was drifting across pages because there was no canonical source of truth, no enforced gate before publish, and no automated check between “what the label / authorised-claim says” and “what got typed into a Liquid file at 2am.” The whole rest of the session traces back to that observation.

2 · The arc — what got built (chronological)

What started as a tactics backfill turned into a cleanup of the entire pipeline that produces v4 pages. In rough order, here’s what landed:

1 · Tactics-first hard gate

Commits 33a6e7b e27081f b6eab42 52232d6 · tools/lib/tactics_gate.py

Every new page must have a tactics doc at projects/briefs/{slug}/tactics.md (template at _tactics-template.md) before any publisher tool will POST. A 2026-05-10 cutoff date grandfathers existing pages via a retro_derived: true frontmatter flag, and a git-history check makes the flag uncheatable on net-new work (D4: switched from filesystem mtime to git history; fail-closed on shallow clones).

Also: 10 retro tactics docs backfilled for the original Phase 5 articles.

2 · Audit of 10 v4 LPs (Ritalin / Dopamine / GABA batches)

Commits fccb2ef · Codex 5.5 peer review on each

Every audit ran with Codex 5.5 plan-mode peer review. After the GABA Wave-1 follow-up sweep, all 10 audits are marked codex_reviewed: true in frontmatter. No more “ship now, audit later” for v4 LPs.

3 · Canonical messaging hybrid — LIVE

Commits 3a4c712 8d6022b de68464 32ff61c 3d98f67

Two stores, one role each:

Both promoted to Tier 1 service contracts with self-diagnostics and a 3-tier failover policy (live → markdown mirror → flat files → fail-closed).

4 · Canonical reference data contracts

Commits 98dd25e 72096c6 · The human-readable spine of the hybrid

5 · AGENTS.md / CLAUDE.md mandatory pre-tool-call gate

Commit 88f711e · New §“Before customer-facing copy”

Every customer-facing copy edit now consults the canonical-messaging hybrid + product labels + discount codes before writing. Mirrors the existing pattern for connections-registry / page-build-registry / browser-tools-routing.

6 · A6 enforcement tool

Commit c8cf3a8 · tools/check_copy_against_canonical.py

5-layer gate: Graphiti structural BLOCK on hard fact mismatch → Pinecone semantic WARN/PASS → Haiku LLM advisory on style → override governance (inline WARN_OVERRIDE; central log for BLOCK_OVERRIDE) → failover policy. 3/3 smoke tests pass; flat-file fallback active until env-var fix.

7 · D3 illustration methodology — Phase 2b deployed

Commits adebcad f72a1dc 37cd5d6 · 10 FLUX renders deployed across 4 markets

Every v4 LP gets atmospheric watercolour scenes (GPT-Image-2 ligne-claire) plus ONE photorealistic FLUX 2 Pro product-in-scene shot in the nutrition section. viz-image-pipeline §1.5 locks this rule. 10 LPs re-illustrated under it.

8 · B2 Strategy A discount migration

Commits 5774860 6e00b3f 47f0242 · 4-store cleanup, 44 deprecated refs

All 4 stores migrated from per-page ad-hoc codes (RED-BULL10, etc.) to canonical welcome codes. Audit regex hardened to word-boundary, RED-BULL10 disabled and added to deprecated registry table.

9 · Wave 2 Phase 2 — 88-page rework

Commits bee8af9 e3e5497 833ef7a 72e8786 4aa1237 · 4 market orchestrators

30 theme files modified. 106 mechanical fixes (canonical-messaging gate consultation, discount-code refs, anti-coffee phrasing, Liquid hygiene). 29 atomic commits for clean rollback. 5-log ritual per market (DEPLOYMENT_LOG / pointer / session bank / pages_registry / Component Registry).

10 · Meta-description sweep

Part of Wave 2 cleanup · UK + US Shopify Admin SEO metafields

16/16 hits cleaned. No outstanding meta-description drift across UK/US v4 pages.

11 · Wave 3 closure

Commits f956ae6 f72e02b 93304ea b9f69d95 3c76355e · 62 deferred items

Track A (autonomous): ~60% resolved without escalation — A1 UK anti-coffee sweep, A4/A5/A6/A8/A9/A10 landed, pages_registry planpath hygiene applied. Track B (Calum-decision): 5 items escalated to wave-3-review dashboard with 3 options + recommendation each. 3 items resolved autonomously (B2 Ritalin / B5 anti-coffee ambiguous=0 / B8 US Dopamine H1).

3 · The new SOP for how a v4 page is made

Every customer-facing page now flows through this pipeline, in order. Publisher tooling refuses to POST when an upstream gate is missing — that’s intentional, not a bug. The headline change: we used to publish first and audit later. Now we plan first, gate continuously, and only PUT when every upstream layer has signed off.

1. Tactics doc first (projects/briefs/{slug}/tactics.md) | v 2. Codex 5.5 plan-mode review -- tactics doc + build plan | HIGH inline; MEDIUM if cheap; LOW ignored unless flagged v 3. Gemini Pro multimodal review -- imagery only, NEVER text plans | v 4. Canonical messaging gate (tools/check_copy_against_canonical.py) | |-- L1 Graphiti structural -- BLOCK on hard fact mismatch |-- L2 Pinecone semantic -- WARN / PASS |-- L3 Haiku LLM advisory -- style/tone (advisory, never blocks) |-- L4 Override governance -- inline WARN_OVERRIDE / central BLOCK_OVERRIDE log |-- L5 3-tier failover -- mirror -> flat files -> fail-closed v 5. copy_preflight.py -- disease-adjacent only (adhd / brain-fog / dopamine / gaba / peri / perimenopause / depression / anxiety) | --channel article (canonical per AGENTS.md and CLAUDE.md; human approval required before live PUT) v 6. Shopify Dev MCP validate_theme -- every modified .liquid | catches deprecated tags, render-scope bugs, schema errors v 7. Image methodology |-- GPT-Image-2 ligne-claire watercolour -- atmospheric scenes |-- FLUX 2 Pro photorealistic -- ONE product-in-scene in nutrition section v 8. Live PUT -- serialised within a single store dispatch (one PUT at a time, never overlap PUTs to the same store); | separate per-market dispatches MAY run in parallel (different stores = different repos), but each market dispatch is internally sequential v 9. Browserbase parallel desktop QC -- 5-8 sample pages per market v 10. Playwright mobile sampling -- random cross-section, NOT every page v 11. 5-log ritual |-- DEPLOYMENT_LOG entry |-- Deployment-log pointer |-- Session bank entry |-- pages_registry refresh (theme_files + components_used + hash + status if v4) |-- Component Registry refresh v 12. Atomic commits -- per page or per market (clean git-revert) v 13. Defer-to-Calum (autonomous-mode escalation criteria) |-- Substance-level changes (not just phrasing) |-- RED-compliance gate items (Ritalin / Ritaline) |-- Code disables with >100 lifetime uses |-- Net-new Shopify mints |-- Cross-domain routing decisions |-- Codex REJECT verdicts (not REFINE)
Why this matters: The cost is a slower first hop. The benefit is that drift, compliance regressions, and substance bugs get caught at the cheapest possible point in the pipeline — before they ship. The two original copy bugs (footer 18+ and FAQ adults-only) would have been blocked at L1 (Graphiti age-rule check) under the new SOP.

4 · What was actually deployed (the receipts)

Wave 2 Phase 2 — per-market summary

MarketTheme commitsFilesMechanical fixesBrowserbase desktop QCPlaywright mobile QCSummary commit
UK4 + 3 follow-up726PASSPASSbee8af9
DE9933 (8 .liquid + 24 JS scope-ext + 1 anti-coffee)PASSPASSe3e5497
FR8827 (8 .liquid + 19 JS scope-ext)PASSPASS833ef7a
US5620PASSPASS72e8786

Other deploys

5 · Operations completed (OPS01 / OPS02 / OPS03)

6 · Where we are right now

7 · What this unblocks

8 · Wave 3 review — ALL 8 RESOLVED CLOSED

Calum reviewed all 8 B-items 2026-05-10. No outstanding decisions on this dashboard. All deploys executed or in active flight; B7 + B8 are the final two and currently running.
#DecisionActionStatus
B1KEEP all 6 review quotes — review-context relaxes banned-phrase rule (testimonial ≠ claim)Canonical rule update banked: AGENTS.md + canonical-messaging-rag.md + check_copy_against_canonical.py Layer 4DONE
B2Ritalin substance — resolved autonomouslyDONE
B3RETIRE black-friday-hot-deals UKAlready unpublished + existing 301 to /collections/cognitive-enhancers-smart-pills kept. Verified 301→200 chain.DONE
B4FR Dopamine pain-led H1 port + mechanism paragraphTheme PUT 200 + page body_html PUT 200. Live H1: "Pourquoi vous vous sentez démotivé — et ce qui aide vraiment". Canonical gate WARN_OVERRIDE audit-logged.DONE
B5Anti-coffee ambiguous cases — resolved autonomously (count = 0)DONE
B6Orphan codes — defer to Strategy A migration (option C)Recorded; no immediate action; will be picked up in next waveDONE
B7Path B — build proper DE-store cognitive-enhancers-smart-pills LP11 phases complete. Live at brainzyme.de/collections/cognitive-enhancers-smart-pills in EUR with 3 FOCUS products. Re-finding: original "DE→UK URL misroute" premise NOT corroborated by live Google Ads state — no CEP CSV needed. Collection stands as defensive infrastructure.DONE
B8US Dopamine "Four-Layer Dopamine Support System" hero rewrite + UK mirrorTemplate reassign worked both markets. US + UK pages now render new H1/subtitle/H2 + full section structure. All 18 US markers + 9 UK markers present. Token refresh required mid-flow (US went stale). 4 v2 follow-ups flagged.DONE

Cascade-level deploys shipped today (parallel to B-item review)

9 · Mission 25 integration — go/no-go before cascade

Calum is about to dispatch the Mission 25 cascade (campaign architecture → creative briefs → LP commissioning → asset renders → ad setup). This section answers: does anything Session 38 built conflict with Mission 25, and what does Mission 25 need to know to inherit cleanly?

A · Overlap zones — what touches what

ZoneSession 38 footprintMission 25 riskStatus
Theme repos (4 stores)30 .liquid files modified across UK/US/DE/FR via Wave 2 Phase 2New LPs will write new templates; merge-conflict only if Mission 25 edits the same files we just touchedREADY — verify clean working tree on each repo before dispatch
pages_registry88 v4 rows refreshed (theme_files / components_used / hash / status)Mission 25 adds new rows for new pages; schema-compatibleREADY
Discount codes44 deprecated refs migrated to canonical welcome codes; orphan codes disabledMission 25 must NOT mint new topic-prefixed codes; reuse welcome codes per marketNEEDS-CHECK — B6 still has 6 orphan disable proposals pending
Tactics docsTactics-first hard gate live; publish_planned_articles.py refuses POST without docMission 25 LPs MUST produce tactics docs upstream — gate will block otherwiseREADY — gate is enforcing, not advisory
Canonical messagingPinecone (1,016) + Graphiti (869) populated; gate tool liveMission 25 copy must pass the gate; drift detection catches fact mismatchesNEEDS-CHECK — verify Drive→Pinecone mirror is fresh before cascade
Product positioning / labels18 label specs banked at reference/data-contracts/product-labels.mdMission 25 ad copy + LP copy must reference these (4-class lexicon: PRO ≠ ELITE)READYmkt-ad-copy already enforces; verify mkt-creative-brief reads same source

B · Things Mission 25 must know (inheritance brief)

C · Pre-cascade checks — UPDATED 2026-05-10 18:50 UTC

CheckStatusAction
Orphan tactics docs needing GCREADYNone known — 10 retro docs backfilled in commit e27081f
Canonical messaging mirror fresh (Drive→Pinecone→Graphiti)READYTrack A5 lazy per-day watcher LIVE (tools/sync_canonical_messaging.py). 79 zombie records purged. Sentinel ensures 1-call-per-day diff overhead. Self-corrects on first canonical gate use.
Resolution of 8 wave-3-review items (B1–B8)RESOLVEDAll 8 closed or in active flight. B1/B2/B3/B4/B5/B6 DONE. B7 (Path B DE LP build) + B8 (US Dopamine reassign) running in background; not blocking cascade dispatch since they’re isolated workstreams.
4 markets at clean theme state (Bucket 1 cascade complete)DEPLOYED CLEANUK / US / DE / FR all shipped: chat widget + Forms popup suppressed on focus-hub, Related Articles fix applied. 32 PUTs all 200 OK. Zero customer-visible regressions.
Pre-PUT assertion suite (post-cascade hardening)CODIFIED6-assertion suite now MANDATORY in AGENTS.md for any layout/theme.liquid touch. Caught a real Liquid 422 pre-render on DE leg.
Track B brain-fog quiz hero redesignSHIPPED 4 MARKETS16 WebPs across UK/US/DE/FR with responsive decoupling pattern (mobile stack / desktop overlay-quiet-side). Canonical pattern banked at reference/page-types/quiz.md.
DE Dopamine pain-led canonical alignmentDONEThree locations updated (section + body_html + page.title). Live H1 now matches the canonical pain-led pattern.
Iron sweep + ingredient gate (Layer 6)IN FLIGHTMulti-agent orchestrator running: Pinecone pollution removal → per-market parallel theme cleanup → Shopify body_html cleanup → Layer 6 gate build. Won’t block ad cascade if iron is already correctly absent from PRO/Elite labels (which the audit confirmed).
Enforcement tool GRAPHITI_API_KEY env-var pathREADY (fallback OK)Flat-file fallback returns canonical answers; not blocking.
18+ disclaimer fix verified liveFIXEDWave 2 Phase 2 swept all 4 markets; Browserbase desktop + Playwright mobile QC PASS

D · Recommended sequencing GREEN LIGHT

Cascade dispatch state: GREEN. All previously-blocking items are now resolved or in isolated flight that doesn’t collide with new ad/LP cascade work.
  1. Wave 3 review items — ALL CLOSED. B7 + B8 are running but isolated (B7 is its own DE collection LP build; B8 is US/UK Dopamine page reassign). Neither touches files Mission 25 will write to.
  2. Canonical messaging — Track A5 watcher live; gate self-refreshes per session. No manual sync needed.
  3. 4 theme repos clean post-Bucket-1 — verify with git status on each (UK/US/DE/FR brainzyme-themes-*) before kicking off the cascade. Should all be clean except whatever B7 + B8 + Iron orchestrator are still writing.
  4. Pre-PUT assertion suite — new mandatory gate captures the pattern that caught DE 422 pre-render. Mission 25 deploy agents will inherit it via AGENTS.md.
  5. Cascade can launch. No outstanding HIGH risks. Open follow-ups are all hygiene tracks (registry sweep done, Browserbase responsive QC pass on quiz pages, secondary heroes A/B wiring) that don’t block new commissions.

Calum: green light to start the cascade. Final blocker check before you go: confirm theme repos are clean (one-liner you can run from this dashboard if useful: cd F:/brainzyme-themes/uk && git status; cd ../us && git status; cd ../de && git status; cd ../fr && git status).

Session 25 working context: F:/Agentic-OS/context/sessions/session-25-competitor-creative-intel.md · Campaign Planner v2 brief: F:/Agentic-OS/projects/briefs/campaign-planner-v2/PHASE-A-BRIEF.md · Phase B sign-off dashboard: /phase-b-signoff/