agentleFS
mislavjcmislavjc/stoop/CLAUDE.md

stoop

CLAUDE.md2 starsChanged 5 months agoMITView on GitHub

Stoop is a Shopify Quick-style instant deployment platform on Cloudflare: uploaded static sites get subdomains, identity, auth, and a per-site realtime database without site-side backend code. This is a Bun-workspaces monorepo with Cloudflare Workers, D1, R2, Durable Objects, TanStack Start SSR, Better Auth, Effect, and Alchemy v2 IaC. - apps/web is the platform app: Worker entry, TanStack Start dashboard, Alchemy stack, D1 migrations, R2 deploys, and the ProjectDB Durable Object. - packages/core (@stoop/core) owns effect/Schema contracts and the typed client…

The file

We split this CLAUDE.md into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Run local dev with bun run dev from the repo root.

    line 22
  2. Very specific:

    Run checks with bun run typecheck, bun run lint, and bun test.

    line 23
  3. Very specific:

    Run browser E2E with bun run e2e.

    line 24
  4. Very specific:

    Treat bun run typecheck, bun run lint, and relevant bun test coverage as the baseline before work is done.

    line 30
  5. Very specific:

    Keep request routing as plain fetch/Workers code at the edge, then move platform behavior into Effect programs.

    line 36
  6. Very specific:

    Prefer Effect.gen(function* () { ...

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Stoop Agent Notes

Stoop is a Shopify Quick-style instant deployment platform on Cloudflare: uploaded static sites get subdomains, identity, auth, and a per-site realtime database without site-side backend code. This is a Bun-workspaces monorepo with Cloudflare Workers, D1, R2, Durable Objects, TanStack Start SSR, Better Auth, Effect, and Alchemy v2 IaC.

Workspace Layout

  • apps/web is the platform app: Worker entry, TanStack Start dashboard, Alchemy stack, D1 migrations, R2 deploys, and the ProjectDB Durable Object.
  • packages/core (@stoop/core) owns effect/Schema contracts and the typed client shared by the dashboard and CLI.
  • packages/cli (@stoop/cli) provides the stoop binary for device-login, deploy, and open commands. It uses effect/unstable/cli and builds a Node target bundle with Bun.

Commands

  • Install dependencies with bun install.
  • Run local dev with bun run dev from the repo root.
  • Run checks with bun run typecheck, bun run lint, and bun test.
  • Run browser E2E with bun run e2e; use bun run e2e:install once to install Chromium. Set E2E_BASE_URL=https://stoop.localhost to include live app smoke tests against bun run dev.
  • Package scripts should be invoked with bun run --cwd <workspace> <script> or the root scripts already defined in package.json.

Treat bun run typecheck, bun run lint, and relevant bun test coverage as the baseline before work is done. For browser-visible behavior, add or run an E2E test as well.

Effect Conventions

  • Keep request routing as plain fetch/Workers code at the edge, then move platform behavior into Effect programs. apps/web/src/platform.ts:43 is the boundary: routePlatform() builds a program and runs it through errorsToResponses and defectsTo500.
  • Domain failures are tagged errors from apps/web/src/errors.ts:3: Unauthenticated, Forbidden, NotFound, BadRequest, and Conflict. Map them to HTTP responses only at the platform boundary.
  • Wrap infrastructure calls with the local io() helper (apps/web/src/platform.ts:127). D1/R2/DO failures are defects unless the code deliberately translates them into a domain error.
  • Prefer Effect.gen(function* () { ... yield* ... }) for multi-step platform flows, matching createProject, deploy, and deleteProject in apps/web/src/platform.ts.

Schema Contracts

Wire contracts live in packages/core/src/contracts.ts as effect/Schema structs. Decode unknown input and responses instead of casting them. The worker's create-project route decodes CreateProjectRequest in apps/web/src/platform.ts:224; keep new API boundaries in that style.

Infrastructure

The Cloudflare stack is defined in apps/web/alchemy.run.ts: D1, R2, the Durable Object namespace, the Vite-built Worker, and wildcard routes. Environment such as BASE_DOMAIN is derived there for local portless dev and production.

Alchemy v2 and Effect 4 are pinned betas; do not bump them casually. The root package.json overrides for @distilled.cloud/* are intentional compatibility pins documented in README.md.

CLI And Scripts

Bun is the default package manager and script runner. Bun APIs are appropriate in CLI code, tests, and scripts when they fit. Worker code runs on the Cloudflare runtime, so use Web/Workers APIs, Durable Object APIs, Effect, and the existing Alchemy/TanStack patterns there.

One documented exception: apps/web/scripts/auth-schema-config.ts is executed by the Better Auth CLI under Node, so it may need Node-specific APIs such as node:sqlite.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.