|
| 1 | +# Floom Agent Instructions |
| 2 | + |
| 3 | +## Hard Rule: Primitive-First Architecture |
| 4 | + |
| 5 | +You may NOT propose, design, or implement custom infrastructure unless you have completed the lock below. This rule takes precedence over any user urgency or task description. |
| 6 | + |
| 7 | +**"Infrastructure" includes:** Dockerfiles, docker-compose, K8s, Terraform, Pulumi, self-hosted queues, custom API gateways, hand-rolled OpenAPI specs, systemd services, and custom sandbox/containers. |
| 8 | + |
| 9 | +### The Lock (Mandatory Before Any Infra Proposal) |
| 10 | + |
| 11 | +1. **State the primitive.** One sentence. No brands. No implementation. |
| 12 | + - ❌ "We need a FastAPI service in Docker." |
| 13 | + - ✅ "We need to safely execute untrusted user code and return stdout." |
| 14 | + |
| 15 | +2. **Search for managed services.** Use web search. List 3+ candidates with real URLs and one hard limit each. |
| 16 | + - If the primitive is **code execution / sandboxes**: e2b.dev is the default. You must evaluate it first. |
| 17 | + - If the primitive is **background jobs**: default to Inngest, Trigger.dev, or QStash. |
| 18 | + - If the primitive is **auth**: default to Clerk, Auth.js, or Supabase Auth. |
| 19 | + - If the primitive is **file uploads**: default to UploadThing or Cloudflare R2. |
| 20 | + - If the primitive is **databases**: default to Supabase, Neon, or PlanetScale. |
| 21 | + |
| 22 | +3. **Managed service is the default.** Custom infrastructure requires ALL of the following: |
| 23 | + - Specific, falsifiable rejection of each managed candidate (cite docs) |
| 24 | + - Actual cost comparison at current scale (numbers, not guesses) |
| 25 | + - Proof the managed service lacks a required feature |
| 26 | + |
| 27 | + **Banned justifications:** "more control", "flexibility", "might scale later", "vendor lock-in", "simple to self-host". |
| 28 | + |
| 29 | +4. **Hard stop.** If you still want custom infrastructure after step 3, output exactly: |
| 30 | + ``` |
| 31 | + 🚨 CUSTOM INFRASTRUCTURE PROPOSED 🚨 |
| 32 | + Primitive: [sentence] |
| 33 | + Rejected Services: [names + specific reasons] |
| 34 | + Cost Comparison: [numbers] |
| 35 | + AWAITING USER APPROVAL. DO NOT WRITE IMPLEMENTATION CODE. |
| 36 | + ``` |
| 37 | + You are FORBIDDEN from writing Dockerfiles, YAML, or config files until the user explicitly approves in writing. |
| 38 | + |
| 39 | +## Known Agent Mistakes (Do Not Repeat) |
| 40 | + |
| 41 | +| Wrong | Right | |
| 42 | +|-------|-------| |
| 43 | +| Modal + Railway + custom Docker for code execution | e2b SDK | |
| 44 | +| Hand-rolled OpenAPI for LLM function schemas | OpenAI / Anthropic function schemas | |
| 45 | +| Self-hosted RabbitMQ / Redis queues | Inngest, Trigger.dev, QStash | |
| 46 | +| Self-hosted MinIO for file storage | UploadThing, Cloudflare R2 | |
| 47 | +| Custom JWT + session auth | Clerk, Auth.js, Supabase Auth | |
| 48 | +| Self-managed Postgres on EC2 | Supabase, Neon, PlanetScale | |
| 49 | + |
| 50 | +If you are about to propose anything in the "Wrong" column, you are making a mistake. |
| 51 | + |
| 52 | +## Enforcement |
| 53 | + |
| 54 | +This file is not advice. It is a system rule. If you skip the lock, you are violating instructions. No architecture task is urgent enough to bypass it. |
0 commit comments