Goal

bun create patties --template modular scaffolds a working modular monolith; the docs explain when to reach for it; patties ships a minor version with the new convention.

Definition of done

  • A modular template in create-patties (two example modules + a shared _platform) that installs and passes validate.
  • Docs page(s): the module convention, the boundary rule, and when to use it vs the file-based full-stack surface.
  • The agent skills (_claude/_codex) updated so agents know the convention and the boundary rule.
  • A minor changeset; Version Packages PR merged; published to npm latest.
  • Presence confirmed directly on registry.npmjs.org — a green Release run is necessary but not sufficient.

Modular scaffolder template

Files: a new template under packages/create-patties/templates/, wired into the template picker. Stamps a minimal module tree that obeys the boundary rule.

bun create patties /tmp/svc --template modular
cd /tmp/svc && bun install && bun run validate
# app/billing/{index,routes,invoice.service}.ts
# app/orders/{index,routes,order.service}.ts   (imports ../billing)
# app/_platform/{index,db}.ts

Docs & examples

The "two front doors" risk recorded in Decisions bites here. The docs must frame the choice, not bury it.

Reach for…When
File-based full-stack surfaceUI-first apps: pages, islands, SSR, the component catalog.
Module convention + routes.tsService-heavy / API-first apps: many domains, strong internal boundaries.
Both, in one appAllowed — they share the same build pipeline, server, and middleware.

Release

Never hand-edit version — use a changeset. This is additive, so a minor bump. Stable-only flow. Published versions land on the live Release dashboard.

bun changeset                      # patties (+ create-patties for the template) → minor
# merge the Version Packages PR → publishes to latest; if Release doesn't auto-fire:
gh workflow run Release --ref master
npm view patties version           # confirm on the live registry

Result

Convention + boundary check → route macro → starter + docs → minor release. patties gains a modular-monolith convention built entirely on Bun primitives, and its existing surface is exactly as it was.

Dependencies

Blocked by

E1 (the convention to scaffold) and E2 (the macro that wires it).

Blocks

Nothing — this is the finish line.