# Changelog

All notable changes to **Causari** are documented here.

Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Each entry references the [ADR](.dw/decisions/) that motivated it, plus key
commits. Story-driven narrative lives in [`.dw/docs/journey.md`](.dw/docs/journey.md).

---

## [Unreleased]

_No changes yet — next entry lands here._

## [0.6.0] — 2026-05-18 — MCP-primary pivot + CKG 7x expansion + hosted CF Worker

22 commits since v0.5.3. Bundles ADR-0015 MCP-primary pivot, CKG 7× expansion to 9 verticals,
hosted Cloudflare Worker transport, and MCP-first product overhaul.

### Strategy

- **ADR-0015 Accepted — MCP-primary positioning**: Causari pivots from Powflow-first to MCP-first.
  New tagline "Wikipedia for AI agents." MCP server is the primary distribution channel; Powflow
  Canvas repositioned as visual explorer for the same graph. 30-day launch window with explicit
  stop-work list to prevent scope creep.

### Added

- **CKG 7× expansion** — 35→245 events, 36→457 causal links across 9 tech verticals:
  - New: Web Ecosystem (35 events, ~76 links), Cloud/DevOps (35 events, ~80 links), Databases (25, ~55),
    AI/ML Tooling (20, ~55), Security (18, ~45), Mobile (15, ~35)
  - Extended: AI/ML history (15 events, 15 links), Computing (50 events, 81 links)
- **Hosted MCP endpoint** (`apps/mcp-server/src/worker.ts`): Cloudflare Worker HTTP transport.
  JSON-RPC protocol implemented manually — no MCP SDK transport dependency (bundle ≤310 KiB gzip).
  Optional `CAUSARI_API_KEY` bearer auth. Routes: `POST /mcp`, `GET /health`, `GET /.well-known/mcp.json`.
- **`wrangler.toml`** for `apps/mcp-server` — CF Worker deployment config; `deploy` and `deploy:dry` scripts.
- **`@causari/mcp-server` npm-publish-ready** — `package.json`: `private:false`, `files`, `exports`,
  `keywords`, `repository`, `homepage`, `license: MIT`.
- **MCP-primary pricing page** — rewrote all 4 tiers: Free (`npx @causari/mcp-server`, unlimited, all
  5 tools), Pro $15/mo (hosted endpoint + always-fresh CKG), Team $29/seat, Enterprise (org_knowledge +
  custom CKG). Fixed prior contradiction where Free tier said "MCP access — NOT included".
- **`causari-data/data/`** — `events.json` (245), `links.json` (457), `insights.json` (8), `stats.json`;
  README updated with full 9-vertical coverage table.
- **CKG tooling** — `packages/ckg/scripts/generate-seed.mts` (Claude Haiku-powered vertical expansion
  CLI) + `packages/ckg/scripts/export-data.mts` (JSON export to causari-data/).
- **Open `/app` to anonymous users** — Powflow Canvas accessible without Clerk signup; personal save
  actions prompt auth on demand.
- **Waitlist social-proof count** — `/api/waitlist/count` surfaced live on pricing page CTA.
- **SEO + viral surface** — `sitemap.xml`, dynamic OG image (SVG), `<EmbedSnippet>` iframe-embed
  snippet component.
- **Markdown export in demo** — "Export as Markdown" downloads current canvas view as `.md`.
- **Personal-mode quick-add nudges** — in-canvas prompts when in Personal mode.
- **System architecture diagrams** — `.dw/docs/system-architecture.html` with 4 Mermaid diagrams
  (sequence flow, C4 context, C4 container, component dependencies).

### Fixed

- Alias tags added (`k8s`, `golang`, `websockets`, etc.) for dev-term query-hit coverage. (`4b1eea9`)
- Internal ADR links removed from public-facing `mcp-server/README.md`. (`02cedb1`)

### Tests

- Playwright: SaaS shell smoke suite + API smoke + share-view tests + a11y (aria-labels on icon buttons).
- MCP curation validation: 10/10 dev-term query hits with alias tags. (`b3688bc`)

### Commits

- `1f6cdd0` feat(saas): ST-19 pricing page MCP-primary restructure
- `53e5784` feat(mcp-server): add hosted CF Worker endpoint + export CKG data
- `51e6f2f` docs(ckg): add auto-seed CLI docs to CURATION_PIPELINE.md
- `cfdbf92` feat(ckg): expand CKG to 245 events + 457 links across 4 new verticals
- `111fa92` feat(ckg): web ecosystem + cloud/devops verticals — 167 events, 277 links
- `02cedb1` fix(mcp-server): remove internal ADR links from public-facing README
- `4b1eea9` fix(ckg): add alias tags (k8s, golang, websockets) for query hit coverage
- `b3688bc` docs(ckg): curation pipeline + ST-12 validation pass (10/10 dev-term hits)
- `5503352` docs(strategy): ADR-0015 accepted + task tracking + causari-data scaffold
- `44f97e2` feat(saas+mcp): MCP-primary landing page + README v2 rewrite
- `2d080a8` feat(ckg): add computing vertical — 50 events, 81 links, 3 insight patterns
- `b459f13` chore: move legacy demos + docs to .dw/docs/, clean project root
- `c5ed105` docs(strategy): ADR-0015 MCP-primary positioning + task reorg
- `8f0e8ec` feat(saas): open /app to anonymous + waitlist social-proof count
- `c31735a` feat(demo): Markdown export + personal-mode quick-add nudges
- `e4a1c7e` feat(ckg+demo): AI history extension — 15 events + 15 causal links
- `5bf09b8` feat(saas): SEO + viral surface — sitemap, dynamic OG, embed snippet
- `66919b2` test(saas): API smoke + console-error budget + mobile viewport
- `d095ebf` test(saas)+a11y(demo): share-view smoke tests + aria-label on icon buttons
- `b2329e7` test(saas): add SaaS shell smoke tests separate from demo
- `9ffbf80` docs(tasks): update stale task statuses
- `5ece525` docs(handoff): session 2026-05-12 — v0.5.3 done, ops queue + work options

## [0.5.3] — 2026-05-12 — Cosmic overview + brand polish + Clerk redirect

5 commits since v0.5.2. Concise patch release.

### Added
- **5 cosmic milestones in curated NODES** — Big Bang (-13.8B) → first stars (-13.65B) → solar system (-4.6B) → first life (-3.8B) → Cambrian explosion (-540M). Full multi-lens text (science/humanities/systems) + tags + causal links. Always rendered (lod:0).
- **Overview-fit initial view** — `view` initialized to fit ALL nodes in 80% viewport width (zoom + view.x computed from NODES' x extent). User sees Big Bang → present at first load.
- **Reset View = Overview** — button now fits full timeline (was: back to current epoch). Better serves the "re-orient me" use case.

### Changed
- **Demo HUD logo** smaller + subdued: `text-sm tracking-.4em text-white` → `text-[11px] tracking-.25em text-white/70`. Causari (parent brand in SaaS shell header) now dominates the brand hierarchy when iframe is embedded.
- **Demo logo dropped CAUSARI prefix** — was `CAUSARI / Powflow v2.2` (two-line), now `POWFLOW v2.2` (single-line stylized wordmark). Standalone demo viewers still see attribution in beta footer.
- **Landing CTAs** — "Open full ↗" → "Try it ↗"; "Sign up free" → "Try it free". Stronger action verbs.

### Fixed
- **Clerk post-auth redirect** — `<SignUp>` and `<SignIn>` now use `forceRedirectUrl="/app"` (and `signInForceRedirectUrl` / `signUpForceRedirectUrl` for the alternate flow). Previously authenticated users bounced to "/" instead of landing in /app shell.

### Living docs
- `journey.md` adds "Days 5-6: Mobile polish + cosmic overview" section
- `journey.json` adds `responsive-polish` milestone (v0.5.1 → v0.5.3) and updates the `now` milestone description

### Commits
- `d3582f6` feat(demo): cosmic events in curated NODES + overview-fit initial view + Powflow logo shrink
- `3994fa1` feat(brand+cta): drop CAUSARI from demo logo + rename CTAs + Clerk redirect fix
- `0bc11b4` feat(demo): seed 5 cosmic milestones (Phase A — initial BUNDLED_EVENTS placement, later moved)

## [0.5.2] — 2026-05-12 — Demo UX polish + mobile stacking

Iterative polish pass on the demo (Powflow Canvas) addressing 10 founder feedbacks collected after v0.5.1 mobile testing. Mostly CSS + small JS changes — no API/data changes. 11 commits.

### Added
- **Reset View button** in left action rail — animated return to standard zoom + center (400ms ease-out cubic). Works on standalone demo + embedded iframe (single source).
- **Powflow first-load fade-in** — opacity-only staggered reveal across HUD chrome (header, lens-pill, action buttons, panels). Total ~900ms sequence. Respects `prefers-reduced-motion`.
- **Iframe reveal on landing** — `.hero-iframe-reveal` class delays iframe opacity reveal by 1.1s after page load so user reads hero copy first, then Powflow Canvas fades in.
- **Collapsible side panels** — `.collapsible-panel` pattern. Wiki + Stress panels start in `.collapsed` state (LEAN first impression); click header to expand. Stress-panel hidden by default (dev tool); Wiki-panel toggle-able.
- **Feature-panel as right-edge sidebar (desktop)** — slim arrow tab ◀/▶ at panel's left edge. Default state collapsed. Click → panel slides in right-to-left (300ms). Click again → slides out left-to-right. Arrow position computed via JS from panel's actual `getBoundingClientRect()` so it tracks any viewport size and panel state correctly.
- **Perf-panel HUD toggle** — `⊟ FPS` pill in bottom-left action rail. Default HIDDEN. Style muted (dark glass-ui card, white/55% text) vs the previous loud lime-green Matrix terminal.
- **Mobile tap-as-hover** — `g.addEventListener('touchstart')` sets `hoveredNodeId` on tap (mirrors PC's mouseenter behavior) so causal-line highlight appears on mobile node tap. SVG `touchend` clears hover when `e.target === svg` (blank canvas tap).

### Fixed
- **Vertical-pan soft clamp** — touch pan was letting canvas drift completely off-screen on mobile. New `clampViewY()` limits `view.y` to ±35% viewport height around center. Applied in mouse pan + touch pan + pinch zoom + wheel zoom.
- **Touch-action propagation to SVG descendants** — iOS Safari was swallowing touches on `<g>`/`<circle>`/`<text>` children inside `viewport-g`. Fix: `#svg-canvas * { touch-action: none }` cascades the rule to all descendants.
- **Ruler-group pointer-events** — `.era-band` + `.ruler-tick*` + `.swimlane-band` decorative SVG elements were catching pointer events. Now `pointer-events: none` on all decorative layers — touch passes through to the SVG canvas pan handler.
- **Ruler clean-up** — Era bands `opacity:0` (clean canvas backdrop); SVG ticks `display:none` (Canvas 2D era ruler at viewport bottom is the real timeline reference).
- **Causal links brightness** — default alpha `0.15 → 0.42` (2.8x brighter), stroke widths bumped. Links between event nodes are the product's primary visual — shouldn't fade into background.
- **Mobile info-panel stacking** — info-panel + feature-panel chip both at `bottom:38px` overlapped; info-panel z:6 obscured chip z:5. Fix: info-panel shifted to `bottom:90px` (above the 52px chip). Both visible simultaneously now.
- **Toggle arrow position bug** — `getBoundingClientRect().left` was being read mid-transition (off-screen position), so arrow stayed pinned at viewport right edge. Fix: use transform-independent measurements (`rect.width/height` + computed `top` from `getComputedStyle`) to compute final position.
- **Fade-in keyframe transform conflict** — `@keyframes powflow-fade-in` was animating `transform: translateY(...)` on `#feature-panel`, overriding the panel's `transform: translateX(...)` slide animation. Keyframe now animates opacity only.
- **Open full link** — landing page's `Open full ↗` was `target=_blank` to standalone demo URL; now links to `/app` (Clerk-gated full Powflow inside SaaS shell).

### Changed
- **Brand wordmark hierarchy** in demo HUD — `POWFLOW v2.2 / by Causari` → `CAUSARI / Powflow v2.2`. Causari (parent brand) primary, Powflow (product) attribution.
- **Lens-pill** smaller (`.lens-btn-compact` class, padding 5×10, font 9px, min-height 30px) at desktop/tablet — mobile keeps 44px tap targets.
- **Default panel state** — both Wiki + Stress panels start collapsed (was Wiki expanded).
- **Feature-panel width** — `min(280px, 80vw)` so it doesn't dominate narrow desktop viewports.
- **Demo SVG ruler ticks** ditched in favor of the Canvas 2D era ruler at viewport bottom (era bands + year labels + NOW marker).

### Test strategy (adopted this release)
- Pure CSS/visual changes: skip Playwright, visual-verify on browser
- HTML structure changes: `tests/smoke/01-page-loads.spec.ts` only
- Interactive behavior changes: affected test file(s)
- Pre-commit / pre-tag: full suite (this release: 10/10 ✅)

### Commits

- `ffda1da` fix(demo): mobile info-panel stacks above feature-panel chip
- `aee1cd4` fix(demo): toggle arrow tracks panel via transform-independent rect
- `1225a4b` fix(demo): toggle arrow tracks panel's actual rect (viewport-agnostic)
- `764336f` fix(demo): toggle arrow position + panel slide animation
- `d3b3b6f` fix(demo): slim arrow tab attached to panel left-edge
- `0bcc857` fix(demo): toggle arrow at top-right corner + no hover-jump
- `c1a2cbc` feat(demo): edge-arrow toggle + muted perf-HUD with toggle
- `dafa55f` fix(demo): feature-panel — single floating toggle, no partial-cut sliver
- `e9ff8b0` fix(demo+saas): feature-panel collapse working + dark scrollbar globally
- `6b9f2d7` feat(demo): vertical-pan clamp + sidebar feature-panel + iframe reveal
- `d80227e` feat(demo): default collapsed panels + Reset View button + load fade-in

## [0.5.1] — 2026-05-12 — Responsive UI/UX cluster (PR-UX-1 + PR-UX-2)

Mobile-first responsive overhaul of both the SaaS shell and the embedded Powflow demo. Founder tested on iPhone Safari and validated final state. Bundles 21 commits since v0.5.0.

### Added — Responsive shell (PR-UX-1)

- `<SiteHeader>` component with mobile hamburger menu (ARIA disclosure pattern, ESC + click-outside close, vanilla JS `is:inline` — no React island)
- 3 header variants: `full` (landing/pricing/journey), `app` (post-auth with UserButton), `minimal` (sign-in/sign-up/404)
- Embedded Powflow iframe scales with viewport: `h-[60vh] min-h-[420px] md:h-[640px]` (was fixed 640px)
- JourneyCanvas SVG hidden on mobile (`hidden md:block`); narrative list always visible
- Pricing 4-tier grid breakpoint: `lg:grid-cols-4` (was `xl:grid-cols-4`) — 4 columns now at ≥1024px instead of 1280px
- OnboardingNudge responsive position: `inset-x-4` on mobile, anchored bottom-left on md+

### Changed — Responsive typography + padding

- Hero h1s across landing/pricing/journey: `text-4xl sm:text-5xl md:text-6xl` (was `text-5xl md:text-6xl`)
- Section paddings: `py-12 md:py-24` and similar — 60% reduction on mobile while preserving desktop

### Added — LEAN demo Canvas + touch fix (PR-UX-2)

- **Fixed critical touch-move dead zone on mobile** — `#feature-panel` and `#info-panel` now have `pointer-events: none` on background with explicit `pointer-events: auto` only on inner buttons/inputs. Founder reported: dragging "near timeline" failed because finger landed on panel (z:3) instead of `#svg-canvas` (z:1). Now: drag passes through panel gaps to canvas handlers.
- **Collapsible bottom drawer for mode buttons (mobile)** — replaces full-width 50vh panel. Default state: 52px chip showing current mode icon. Tap chip → drawer expands. Tap outside or select mode → drawer collapses. ARIA-compliant.
- **Info panel as bottom sheet (mobile)** — appears only when node selected; explicit ✕ close button; full-width rounded-top sheet.
- **Top bar polish (mobile)**: lens selector pills shrunk + repositioned (no overlap with logo); "CANVAS OFFLINE" button uses ellipsis at 38vw; `#epoch-display` hidden on mobile; FPS dev HUD (`#perf-panel`) hidden by default on mobile.
- **Secondary controls (mobile)**: Help and Feedback links hidden from demo footer (still in SaaS shell footer); brand attribution span preserved.

### Fixed — Post-deploy mobile polish (5 iterations on founder feedback)

- **Touch-action descendant propagation** — `#svg-canvas` had `touch-action:none` but children defaulted to `auto`; iOS Safari swallowed touches on `<g>`/`<circle>`/`<text>` before parent handler fired. Fix: `#svg-canvas * { touch-action: none }`.
- **Ruler-group pointer-events** — `.era-band` rects + `.ruler-tick*` lines + `.swimlane-band` rects caught pointer events as default `visiblePainted` hit-testing; iOS didn't reliably bubble touches up. Fix: all decorative SVG layers `pointer-events: none`.
- **Era bands transparent + SVG ticks hidden** — Era band overlays (`opacity:0.05`) were visible noise over a clean canvas; founder asked for transparent backdrop. Era bands `opacity:0`, SVG ticks `display:none` entirely (the Canvas 2D era ruler at viewport bottom is the real timeline reference).
- **Mobile tap = hover (causal-line highlight)** — PC `mouseenter` brightened connected causal links; mobile had no equivalent so the lines never lit up on tap. Fix: `g.addEventListener('touchstart')` sets `hoveredNodeId` (passive, click still fires); `svg.touchend` clears it when `e.target === svg` (blank canvas tap).
- **Brighter causal links + uncover era footer** — Default link alpha `0.15 → 0.42` (2.8x — these lines ARE the product visual). Bottom drawer + info-panel shifted from `bottom:0 → bottom:38px` so Canvas 2D era ruler with year labels + NOW marker stays visible underneath.

### Verified at this snapshot

- Playwright smoke: 10/10 pass at default viewport (1440×900 desktop) — all mobile-only `@media (max-width:480px)` rules are inert in CI
- MCP smoke: 10/10 pass
- Demo deployed: `causari-demo.pages.dev` (deployment `5f6263b7`)
- SaaS shell deployed: `causari-saas.pages.dev` (deployment `7e801937`)
- Brand attribution preserved: `POWFLOW v2.2 by Causari` logo + `Powflow v2.2 BETA · by Causari · causari.ai` footer + "Welcome to Powflow" onboarding heading

### Verified ST-9 (manual mobile touch test)

Founder confirmed all 10 mobile test cases pass on iPhone Safari after 5 polish iterations (touch-action propagation, ruler-group pointer-events, era-band transparency, tap-as-hover, brighter causal links + era footer uncovered). Tracking moved to ✅ Done in `.dw/tasks/responsive-demo-canvas/tracking.md`.

### Commits

- `df0e0ef` docs(task): PR-UX-2 completion handoff
- `bb5b6dc` style(demo): top bar + secondary controls LEAN on mobile (ST-4+5+6+7)
- `5183296` style(demo): info panel as bottom sheet on mobile (ST-3)
- `a7677fc` feat(demo): collapsible bottom drawer for modes on mobile (ST-2)
- `caa69b6` fix(demo): touch-move dead zone — scope pointer-events on mobile panels (ST-1)
- `18d5e9d` docs(task): responsive-demo-canvas — PR-UX-2 spec + tracking scaffold
- `caddff3` docs(task): responsive-saas-shell — add founder outcome requirements
- `68f1d42` docs(task): fix ST-9 commit hash in completion handoff
- `9745567` test(saas): verify responsive changes — Playwright smoke 10/10 (ST-9)
- `8a8a77b` style(saas): responsive components — journey/pricing/onboarding (ST-6+7+8)
- `d4011e6` style(saas): responsive scales — iframe + typography + padding (ST-3+4+5)
- `122e59d` refactor(saas): integrate SiteHeader into 5 pages (ST-2)
- `60c8e49` feat(saas): SiteHeader component — mobile hamburger menu (ST-1)
- `dc35b2c` docs(task): responsive-saas-shell — PR-UX-1 spec + tracking scaffold

## [0.5.0] — 2026-05-11 — Pre-launch readiness + brand architecture (promoted from rc.1)

First tagged final release after CF Pages preview verification per ADR-0013. Bundles viral readiness, storytelling, the build-journey Canvas page, a pre-launch paper-cut sweep, the v0.5.0-rc.1 RC fixes (Clerk nodejs_compat + D1 migration + Cloudflare Pages first deploy), and ADR-0014 brand architecture (two-tier: Causari parent + Powflow product).

### Added (since 0.4.0)

- **ADR-0014 Accepted — brand architecture**: Causari (company/moat: CKG + MCP + platform) + Powflow (product: interactive causal timeline). All user-facing "Canvas" copy renamed to "Powflow"; demo logo wordmark keeps stylized `POWFLOW v2.2` with new "by Causari" attribution; pricing FAQ adds "Are Causari and Powflow the same thing?" entry. POW etymology preserved as "Proof of World" wordplay.
- **First production deploy** to `causari-saas.pages.dev` (Cloudflare Pages free tier). Cloudflare Access enabled (One-Time PIN email allowlist) per ADR-0012 private-launch gating.
- **D1 migrations applied to remote production database** (4 migrations: users, personal_events, bookmarks, shares, waitlist, webhook_events tables now live).
- **wrangler.toml env blocks**: explicit `[env.production]` + `[env.preview]` with compat flags, public env vars (`PUBLIC_NOINDEX`, `PUBLIC_CLERK_PUBLISHABLE_KEY`, `POLAR_SERVER`, `DEMO_ORIGIN`), and D1 bindings. CF Pages dashboard now read-only for plaintext vars (config-as-code).

### Fixed (vs rc.1)

- **Clerk middleware AsyncLocalStorage crash in CF Workers**: Astro's Cloudflare adapter sets `ssr.target=webworker` → Vite resolved Clerk's workerd export which ships a FakeAsyncLocalStorage stub that throws at runtime. Solved by `noExternal: ['@clerk/astro', '@clerk/backend', '@clerk/shared']` + Node-first resolve conditions so Vite picks the Node build with real `await import("async_hooks")` (which CF Workers provides via `nodejs_compat`).
- **/api/health and /api/status hardcoded `version: "0.1.0"`** → bumped to `0.5.0` (was `0.5.0-rc.1` mid-release).

### Pre-RC content (rolled in unchanged from 0.5.0-rc.1)

- **Viral readiness Tier 1** (ADR-0009): `IUserRepo.findOrCreate()` race fix · `webhook_events` table + Polar idempotency guard · `/api/status` deep health check · `IObservability` adapter + `NoopObservability` default · Hono global error handler.
- **Storytelling layer** (ADR-0010 Accepted): `CHANGELOG.md` + `.dw/docs/journey.md` + `JourneyCanvas.astro` SVG timeline + `/journey` page + `scripts/extract-journey.sh` hardened.
- **ADR-0011 Proposed**: open-source CKG seed data, 3-phase rollout (showcase → curated PRs → trusted reviewers).
- **ADR-0012 Accepted + Phase 1 code**: private-launch access strategy via layered gating. `apps/saas/src/pages/robots.txt.ts` dynamic endpoint + conditional `<meta name="robots">` in BaseLayout, both gated by `PUBLIC_NOINDEX`.
- **ADR-0013 Accepted**: environment topology — Local + CF Pages Preview + Production. Skip formal UAT until signal.
- **ADR-0005 re-evaluation log**: Causari brand confirmed after Causar reconsider audit.
- **Paper-cut sweep**: `predev`/`prebuild` syncs CHANGELOG.md → `apps/saas/public/`, pricing footer nav restored, `/api/status` billing semantics `mode:"unconfigured"` instead of false-flagging `ok:false`.

### Commits (since 0.4.0)

- `6a4ac4d` feat(brand): ADR-0014 Accepted — two-tier brand (Causari + Powflow)
- `c5058fc` fix(saas): production deploy — Clerk nodejs_compat + wrangler env blocks
- `9a35216` chore(saas): gitignore public/CHANGELOG.md (build artifact)
- `b73c2d1` chore(release): v0.5.0-rc.1 — pre-launch readiness candidate
- `f7c5bdc` docs(adr): ADR-0005 re-evaluation log
- `67b85d2` feat(saas): ADR-0012 Accepted — pre-launch noindex env flag
- `c7eefd8` docs(adr): ADR-0011 Proposed (open-source CKG data)
- `01358bb` fix(saas): pre-launch sweep cluster
- `76f0bd1` feat(journey): ADR-0010 Accepted — journey Canvas
- `a3c08f5` feat(viral-readiness+story): ADR-0009 + ADR-0010 draft

### Verified state at v0.5.0 tag

- `https://causari-saas.pages.dev` live behind Cloudflare Access (OTP email allowlist)
- `https://causari-demo.pages.dev` live with Basic Auth + Sec-Fetch-* iframe bypass
- `/api/status` returns `db.ok:true · billing.mode:"unconfigured"` (Polar deferred per design)
- MCP smoke: 10/10 · Playwright smoke: 10/10
- D1 migrations 0000–0003 applied to remote

### Known follow-ups (not blocking v0.5.0)

- **UI/UX responsive audit** — SaaS shell + demo Canvas floating panels need mobile layout work (separate session)
- **Polar billing config** — 4 env vars (POLAR_ACCESS_TOKEN, POLAR_WEBHOOK_SECRET, POLAR_PRODUCT_PERSONAL, POLAR_PRODUCT_TEAM) pending founder dashboard setup. Polar product descriptions passed review 2026-05-11.
- **Custom domain causari.ai** — not registered yet
- **USPTO TESS trademark search** for CAUSARI + POWFLOW
- **GitHub repo push** — 47 commits ahead of origin/main locally; pending org-side push

## [0.4.0] — 2026-05-11 — Lean launch polish + waitlist

### Added
- **Viral readiness Tier 1** (ADR-0009) — operational safety before public launch:
  - `IUserRepo.findOrCreate()` — atomic insert-or-fetch fixes JIT race condition
  - `webhook_events` table + `IWebhookEventRepo` + Polar idempotency guard
  - `/api/status` deep health check (D1 ping + config introspection, UptimeRobot-ready)
  - `IObservability` adapter interface + `NoopObservability` default
  - Hono global error handler captures into observability stream
- **Storytelling layer** (ADR-0010 — drafted then Accepted same day):
  - `CHANGELOG.md` + this version-log discipline
  - `.dw/docs/journey.md` — narrative record of the build
  - `JourneyCanvas.astro` — SVG timeline component mimicking demo aesthetic with 4 swimlanes + 12 curated milestones + causal arrows
  - `apps/saas/src/data/journey.json` (curated source-of-truth) + mirrored `apps/saas/public/journey-data.json` (client fetch)
  - `/journey` Astro page rendering the Canvas above + narrative timeline below
  - `scripts/extract-journey.sh` hardened to output `journey-raw.json` (never clobbers curated JSON)
- **ADR-0011 Proposed** — open-source the curated CKG seed data, 3-phase rollout (showcase → curated PRs → trusted reviewers). Execution deferred until `causari` GitHub org registered.
- **ADR-0012 Accepted + Phase 1 code** — private-launch access strategy via layered gating (rejected IP-blocking + magic-link tokens):
  - `apps/saas/src/pages/robots.txt.ts` — dynamic endpoint, `Disallow:/` when `PUBLIC_NOINDEX=1`
  - Conditional `<meta name="robots" content="noindex,nofollow">` in `BaseLayout.astro`
  - `PUBLIC_NOINDEX` env documented in `.dev.vars.example`
- **ADR-0013 Accepted** — environment topology: Local + CF Pages Preview + Production. Skip formal UAT until signal (≥2 devs, ≥100 paying customers, CI auto-deploy, or compliance audit).
- **ADR-0005 re-evaluation log** — confirmed Causari brand after re-audit triggered by Causar reconsider; rare Italo-Albanian surname overlap acknowledged but no AI/tech collisions found.
- `apps/saas/public/CHANGELOG.md` — synced from repo root via `predev` + `prebuild` npm script (`sync:changelog`).
- Pricing page footer nav links restored (Home / Our story / GitHub / Contact) — was previously missing on `/pricing` only.

### Fixed
- `/journey` footer linked to `/CHANGELOG.md` which returned 404 (file lived at repo root, not `public/`). Now mirrored automatically.
- `/api/status` reported `billing.ok:false` when Polar unconfigured — false-flagged pre-launch monitors. Now returns `ok:true, mode:"unconfigured"` so external uptime checkers stay green.

### Pre-deploy verification
- MCP smoke: **10/10**
- Playwright smoke: **10/10**
- All public surfaces sweep: 0 blockers, 5 paper-cuts (3 fixed in this RC, 2 deferred to founder-side ops)

### Commits
- `f7c5bdc` docs(adr): ADR-0005 re-evaluation log
- `67b85d2` feat(saas): ADR-0012 Accepted + Phase 1 noindex
- `c7eefd8` docs(adr): ADR-0011 Proposed (open-source CKG data)
- `01358bb` fix(saas): pre-launch sweep cluster
- `76f0bd1` feat(journey): ADR-0010 Accepted — Causari-on-Causari Canvas
- `a3c08f5` feat(viral-readiness+story): ADR-0009 + ADR-0010 draft

## [0.4.0] — 2026-05-11 — Lean launch polish + waitlist

### Added
- **Demo-first landing page** — live Causari Canvas iframed in hero (visitors play with the product in <2 seconds, no signup wall)
- **`/pricing` page** with 4 tiers (Free / Pro $15 / Team $29 / Enterprise) + 6-question FAQ
- **First-time onboarding nudge** in `/app` (3-step dismissible card, localStorage-persisted)
- **Floating Feedback button** (`hello@causari.ai` mailto, prefilled with page path)
- **Branded 404 page** ("A missing event")
- **SEO + Open Graph** meta + 1200x630 SVG OG card
- **Waitlist** (ADR pre-GTM strategy): `waitlist` table, `POST /api/waitlist`, `GET /api/waitlist/count`, inline form on `/pricing` for Pro & Team tiers — measures demand without taking money

### Commits
- `b880047` feat(waitlist)
- `85b0fc8` feat(lean-launch)

## [0.3.0] — 2026-05-11 — Phase 4 wiring (ADR-0008)

### Added
- `ensureUser()` helper — JIT user provisioning fixes FK violation on first authenticated write
- Polar `onTierChange` callback — webhook events now actually persist tier changes to D1
- `/s/[slug]` public share-view page + `shares` table + `IShareRepo`
- Trusted-embedder bypass in `apps/demo-gateway` (`Sec-Fetch-*` based) so SaaS shell can iframe the auth-gated demo

### Fixed
- `wrangler.toml` D1 binding header was commented out — broke production deploys
- CSP `frame-ancestors` replaces `X-Frame-Options: SAMEORIGIN` (latter blocked cross-origin embed entirely)
- Clerk publishable key must live in BOTH `.env` (Vite client bundle) AND `.dev.vars` (Cloudflare adapter runtime.env)

### Commits
- `3c1058e` docs(tasks): Phase 4 wiring complete
- `998917f` feat(wiring): ADR-0008
- `44a87cd` chore(local-dev): logged dev server
- `0f86fde` fix(local-dev): CSP + Clerk env split

## [0.2.0] — 2026-05-10 — Brand pivot to Causari + Polar billing

### Changed
- **Brand**: `TGF` / `Causora` → **Causari** (ADR-0005, after 5 rounds + 30+ candidates)
- All `@tgf/*` and `@causora/*` package scopes → `@causari/*`

### Added
- **Polar billing adapter** (ADR-0007) — Stripe Vietnam-blocked; Polar is MoR, supports VN founder payouts. `PolarBillingService` + composition prefers Polar when token set; Stripe retained for future entity migration
- `@causari/db` Drizzle schema for D1 — `users`, `personal_events`, `bookmarks` tables

### Commits
- `029af06` feat(billing): ADR-0007 Polar adapter
- `ee29c54` fix(infra): wrangler + demo-gateway bypass
- `846359a` feat(causari): Phase 2 Clerk + D1 + composition

## [0.1.0] — 2026-05-10 — Phase 1-3: CKG + MCP + SaaS Shell foundation

### Added
- **Causal Knowledge Graph** (ADR-0004) — `@causari/ckg` with 35 events + 36 hand-authored causal links + 5 derived insights
- **MCP server** — `@causari/mcp-server` with 5 tools: `query_events`, `causal_chain`, `historical_resonance`, `org_knowledge`, `predict_scenarios`
- **SaaS shell scaffold** (ADR-0001/0002) — Astro 5 + Cloudflare adapter + Tailwind + Hono API + Clerk auth
- **postMessage protocol** (ADR-0003) — `@causari/protocol` envelope schema; `MessageBus` in demo HTML; `<DemoFrame>` in SaaS shell
- **`@causari/logger`** (ADR-0006) — vendor-neutral structured logging (Console/Json/Browser/Noop impls)
- **Demo Basic Auth gate** — `apps/demo-gateway` for pre-launch access control with trusted-embedder bypass
- **Visual Canvas demo** — `demo-v2.0.html` with 7 modes (Explore/Search/Story/Causal/Forecast/Saved/Personal), deployed at `causari-demo.pages.dev`

### Commits
- `c98ae9b` feat(causari): Phase 3 — DemoFrame + Hono API + Stripe
- `d275e3c` feat(demo+test): MessageBus module
- `75f9f25` feat(infra): @causari/logger + @causari/protocol
- `8c75c01` feat(causari): CKG + MCP foundation
- `efcc73b` test: Playwright smoke suite (8 tests, screenshot evidence)

## [0.0.1] — 2026-04-06 — Initial spark

Original demo "POWFLOW" — single-file HTML visualization of historical events
with log-scale time axis, swimlanes, and causal mode. Curated NODES + CAUSAL_LINKS
become the seed data for the future Causari Knowledge Graph.

---

## Versioning convention

- **Major (1.x.y → 2.0.0)**: breaking changes for API consumers (`@causari/mcp-server` tool schemas, public `/api/*` route shapes, postMessage protocol version bumps)
- **Minor (0.x.y → 0.x+1.0)**: new features, new ADRs, new packages
- **Patch (0.x.y → 0.x.y+1)**: bug fixes, doc updates, dependency bumps

Pre-1.0: minor releases may include breaking changes (documented in entry).

`1.0.0` will be cut on first paying user signup + 30 days of stable production operation.
