Skip to content

AT4: atomic-crm becomes an Orun baseline - #5

Merged
ruehowl merged 1 commit into
mainfrom
at/4-a-baseline
Oct 29, 2026
Merged

ruehowl merged 1 commit into
mainfrom
at/4-a-baseline

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

This PR makes atomic-crm an Orun baseline: one build takes a new CRM from nothing to live on stage and prod.

  • The card: blueprint.yaml mints five brokered credentials (Cloudflare and Supabase), has two milestones, and estimates about 17 minutes (16 + 1).
  • The build: repo-blueprint.yaml uses saas-starter's shape, since the chain is the same: Supabase, Hyperdrive, db-migrate and one Worker.
    • 01-product lands the whole CRM as one pull request. Its convergence provisions and deploys supabase → cloudflare-hyperdrive → db-migrate → web, each edge enforced on main.
    • 02-docs records the deployment from probed facts: the Worker's wiring as /api/health reports it, and whether inbound email is connected.
  • The rename engine:
    • It renames the slug, the Worker, the secret refs and the display name "Atomic CRM" (the title, the installable app's name, the sign-up and inbound-email texts).
    • It protects Marmelab's repository, site, telemetry endpoint and release history.
  • Fail-closed secrets: the Worker's deploy now resolves the wiring documents and the service-role key through secretEnv, with both environments' rungs named, and stores the deploying environment's key (worker-secrets.mjs --env). The Postmark secrets stay optional.
  • Docs and helpers: the product's README, its operating contract, BOOTSTRAP.md, the phase pages, the task contracts and the bootstrap helpers.

Tests:

  • Contract tiers: manifest, phases, coverage, rebrand, retouch, bootstrap-defer and wire, plus the docs check.
  • Leak gate: 643 files derived.
  • Placement tier: the offline bootstrap and the product's own plans. Stage and prod are ordered and enforced, and the plan resolves exactly the 5 minted keys, the 6 published ones, and 4 optional keys the README names.
  • End-to-end tier, all green locally:
    • the bootstrapped product's landing checks: 437 web tests (in Chromium) plus upstream's skip, and 16 DB tests;
    • upstream's 33 migrations applied twice by its own runner to a Supabase-shaped Postgres, the second run applying nothing;
    • the stage lane built and dry-deployed in its staged tree (561 KiB compressed), with the service-role key in neither the bundle nor the config;
    • the Worker served against that database and a stand-in for Supabase's Auth and Storage, then driven through:
      • its own smoke test;
      • the app under the product's name;
      • signed-out callers refused;
      • the first account becoming the administrator;
      • a password reset;
      • a contact merge as the signed-in user through Hyperdrive;
      • the MCP server reading the schema twice;
      • the Cron Trigger removing a deleted note's attachment;
    • row-level security: anon reads nothing.

Generated by Claude Code

The card (blueprint.yaml: five brokered credentials, two milestones, about
seventeen minutes) and the build (repo-blueprint.yaml, on saas-starter's
shape — the same chain of Supabase, Hyperdrive, db-migrate and one Worker:
01-product lands the whole CRM as one pull request whose convergence
provisions and deploys it in dependency order; 02-docs records the deployment
from probed facts, the Worker's wiring and whether inbound email is
connected). The rename engine renames the slug, the Worker, the secret refs
and the display name "Atomic CRM", and protects Marmelab's repository, site,
telemetry endpoint and release history. The Worker's deploy now resolves the
wiring documents and the service-role key fail-closed, both environments'
rungs by name, and stores the deploying environment's key
(worker-secrets.mjs --env). The product's README, its operating contract and
the bootstrap's docs, task contracts and helpers.

The baseline's tests: the contract tiers, the leak gate, the placement tier
(the offline bootstrap and the product's own plans), and the end-to-end tier
— the bootstrapped product's landing checks, upstream's migrations applied
twice by its own runner to a Supabase-shaped Postgres, the stage lane built
and dry-deployed in its staged tree, and the Worker served against that
database and a stand-in for Supabase's Auth and Storage: the app under its own
name, a password reset, a merge as the signed-in user through Hyperdrive, the
MCP server reading the schema, and the Cron Trigger draining the attachments
queue.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PcpNVpFBcbeiX3EHdXfmn
@ruehowl
ruehowl merged commit 285c144 into main Oct 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants