Skip to content

Commit 54a269b

Browse files
author
Federico De Ponte
committed
Add root AGENTS.md with hard primitive-first architecture rule
Moves enforcement from optional skill to system-level instruction. Any agent entering the repo must follow the lock before proposing infrastructure. Bans known bad patterns (Modal/Docker for code exec, etc).
1 parent d89bfa3 commit 54a269b

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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

Comments
 (0)