agentleFS
stdinstdin/buy-vs-build/AGENTS.md

buy-vs-build

AGENTS.md3 starsChanged 5 months agoMITView on GitHub

Before writing code, decide whether the work should be bought, reused, or built. First classify the work: is it core (the differentiation users choose you for) or context (needed but unrewarded), and is the capability a commodity (standardized and stable) or novel (still changing or specific to you)? Reuse context and commodity work as far down the ladder as it allows; build in-house only where core meets novel. Scale scrutiny to reversibility: two-way-door choices decide fast, one-way-door commitments (deep platform…

The file

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

11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing code, decide whether the work should be bought, reused, or built.

    line 3
  2. Distinctive:

    Do nothing: skip speculative requirements and scaffolding.

    line 9
  3. Distinctive:

    Use built-ins: prefer language built-ins and the standard library.

    line 10
  4. Very specific:

    Use the native platform: browser controls, OS/framework/database/cloud primitives, and protocol features.

    line 11
  5. Distinctive:

    Use already-installed dependencies: prefer existing project dependencies before adding new ones.

    line 12
  6. Distinctive:

    Use open source: add a mature library only when it lowers total cost of ownership.

    line 13
  7. Distinctive:

    Use commercial: buy reliability, compliance, operations, support, or time when cheaper than owning it.

    line 14
  8. Distinctive:

    When several options satisfy the chosen rung, pick the one whose capabilities match the requirement's real shape — directionality, volume, …

    line 17
  9. Distinctive:

    Before adopting an open-source or commercial dependency, research it — maintenance and health (active maintainers, release cadence, …

    line 19
  10. Distinctive:

    Use these rung labels: do-nothing, built-in, native-platform, installed-dependency, open-source, commercial, in-house.

    line 25
  11. Distinctive:

    Never outsource core differentiation, trust-boundary logic, security-critical decisions, or tiny code that is clearer than a dependency.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.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
AGENTS.md

Buy-vs-build mode

Before writing code, decide whether the work should be bought, reused, or built.

First classify the work: is it core (the differentiation users choose you for) or context (needed but unrewarded), and is the capability a commodity (standardized and stable) or novel (still changing or specific to you)? Reuse context and commodity work as far down the ladder as it allows; build in-house only where core meets novel. Scale scrutiny to reversibility: two-way-door choices decide fast, one-way-door commitments (deep platform or data lock-in) get rigor and an exit plan.

Then stop at the first rung that satisfies the requirement:

  1. Do nothing: skip speculative requirements and scaffolding.
  2. Use built-ins: prefer language built-ins and the standard library.
  3. Use the native platform: browser controls, OS/framework/database/cloud primitives, and protocol features.
  4. Use already-installed dependencies: prefer existing project dependencies before adding new ones.
  5. Use open source: add a mature library only when it lowers total cost of ownership.
  6. Use commercial: buy reliability, compliance, operations, support, or time when cheaper than owning it.
  7. Build in-house only when reuse fails the real constraints, or the work is core differentiation.

When several options satisfy the chosen rung, pick the one whose capabilities match the requirement's real shape — directionality, volume, latency, consistency, and failure mode — not the most powerful, popular, or familiar option.

Before adopting an open-source or commercial dependency, research it — maintenance and health (active maintainers, release cadence, adoption, bus factor), security and supply chain (known vulnerabilities, install scripts, provenance), license, and transitive footprint — and prefer the lowest-ownership option that clears those checks.

For non-obvious decisions, compare fit, total cost of ownership, security, licensing, maintenance, integration, maturity, reversibility, and exit risk. State the chosen rung briefly as Decision: use <rung>: <option>. Tradeoff: <why it wins>. Rejected: <next-best option> because <constraint>. Revisit if <specific trigger>.

After implementing, verify the choice actually paid off — fewer lines, fewer failure modes, less to operate — not just that the right option was named; a sound choice can still be integrated badly. The decision note is the artifact that makes that tradeoff reviewable, so keep it accurate.

Use these rung labels: do-nothing, built-in, native-platform, installed-dependency, open-source, commercial, in-house.

Never outsource core differentiation, trust-boundary logic, security-critical decisions, or tiny code that is clearer than a dependency.

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.