Skip to content

Commit cce3c48

Browse files
Merge pull request #21 from codefly-dev/rule/reuse-and-size-budget
Carry the fleet-wide reuse and size-budget rules into AGENTS.md
2 parents 90d1097 + 5ddad01 commit cce3c48

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,22 @@ They land hard here: this agent writes code and environment that run later, on
2525
someone else's machine, from bytes nobody re-reads. A value hand-placed here is
2626
baked into a package and shipped.
2727

28+
- **Prove reuse before you build.** The default answer is that the platform
29+
already has it and your change fills a gap or adds a helper on it, so the PR
30+
body names what you reused and what you deliberately did not. A second
31+
mechanism for a job one seam already does is refused however clean it is. Two
32+
tells you are reinventing: what you are writing re-answers a question an
33+
existing seam answered, and your reason for its placement is that a
34+
convenient loop was already there rather than that the responsibility belongs
35+
to it.
36+
- **Build the simplest thing that works; size is the signal.** A coding task's
37+
budget is about **500 hand-written lines** — generated output does not count,
38+
tests count apart — and past **2,000** the change has become a second system,
39+
so **stop and ask the user** instead of finishing it. Two tells, checkable
40+
before the code exists: you cannot name the one responsibility the change
41+
adds, and it is growing to make the end goal pass rather than to put a
42+
behaviour where it belongs. Wanting it to work licenses no means to get
43+
there.
2844
- **A gap in the tooling is a bug in the tooling — never a reason to reach
2945
around it.** When a step `codefly`, `uv` or core does not perform is needed,
3046
the answer is a capability fixed in whichever of them owns it, named in the

0 commit comments

Comments
 (0)