---
title: "YAGNI in AGENTS.md: A Six-Rule Coding Standards Snippet for AI Agents"
date: "2026-10-25"
video_id: "7700449602780122398"
tiktok_url: "https://www.tiktok.com/@philofsurprises/video/7700449602780122398"
creator: "@philofsurprises"
category: "AI"
tags: ["agents.md", "claude.md", "claude code", "yagni", "coding agents"]
excerpt: "A six-rule coding standards snippet credited to claude-mem is spreading as an AGENTS.md tip. The rules, what YAGNI means, and when Claude Code reads AGENTS.md."
---
A TikTok from @philofsurprises shares a six-rule "Global Coding Standards" snippet seen at a San Francisco JavaScript meetup, credited on screen to @Claude_Memory, and recommends adding its YAGNI rule to your AGENTS.md files to stop coding agents from overbuilding. The rules are real and circulate publicly. The catch for Claude Code users is that Claude reads AGENTS.md by default only when there is no CLAUDE.md in the working directory or above it.

## What are the six rules?

The slide in the video, headed `# Global Coding Standards`, lists:

1. **YAGNI**: "Don't build it until you need it"
2. **DRY**: "Extract patterns after second duplication, not before"
3. **Fail Fast**: "Explicit errors beat silent failures"
4. **Simple First**: "Write the obvious solution, optimize only if needed"
5. **Delete Aggressively**: "Less code = fewer bugs"
6. **Semantic Naming**: "Always name variables, parameters, and API endpoints with verbose, self-documenting names that optimize for comprehension by both humans and LLMs, not brevity (e.g., `wait_until_obs_is_saved=true` vs `wait=true`)"

The same six rules appear in a public pull request dated 25 October 2026, [jondubin95/skirt_steak PR #17](https://github.com/jondubin95/skirt_steak/pull/17), which adds them as a Cursor rule at `.cursor/rules/coding-standards.mdc`. The list works in whatever instruction file your tool reads.

## Is the snippet an AGENTS.md file?

Not as shown. The video calls it an "agents.md file," but the slide never shows that filename. The visible heading is "Global Coding Standards" and the editor path starts at "Users >", which points to a file in a home directory rather than a repository's AGENTS.md.

AGENTS.md is a specific format. The [agents.md](https://agents.md/) site describes it as "a simple, open format for guiding coding agents." It came out of work by OpenAI Codex, Amp, Jules, Cursor and Factory, is now stewarded by the Agentic AI Foundation under the Linux Foundation, and is supported by over 20 coding agents. The site reports GitHub search showing it in over 60,000 open-source projects. The video uses "agents.md" as a general label for an agent instruction file.

## Does Claude Code read AGENTS.md?

Only in some setups. The [Claude Code memory documentation](https://code.claude.com/docs/en/memory) says: "By default, Claude reads `AGENTS.md` only when you have no `CLAUDE.md` in your working directory or above it." If a repository has both, Claude reads "Your `CLAUDE.md` files only."

Three details matter:

- A personal, uncommitted `CLAUDE.local.md` counts. The docs warn: "Because `CLAUDE.local.md` counts, adding one to keep your own uncommitted instructions in a project that relies on `AGENTS.md` stops Claude from reading `AGENTS.md` for you."
- Reading AGENTS.md directly "requires Claude Code v2.1.277 or later."
- The **Project instructions** setting accepts `claude-md-and-agents-md`, which makes Claude read both files.

The speaker says he put the snippet "in almost all of my agents.md files." That works in repositories with AGENTS.md and no CLAUDE.md, on a recent version. In a repo with any CLAUDE.md, Claude Code skips it by default, and the video does not mention this.

## Where to put rules you want in every project

The video describes one rule applied everywhere, which is user scope. For Claude Code, the docs list `~/.claude/CLAUDE.md` as "Personal preferences for all projects." A home-directory file also matches the path shown on the slide.

## What does YAGNI stand for?

YAGNI stands for "You aren't gonna need it." [Martin Fowler's 2015 entry](https://martinfowler.com/bliki/Yagni.html) traces it to the C3 project in Extreme Programming: "Chet came up to Kent with a series of capabilities that the system would soon need, to each one Kent replied 'you aren't going to need it.'" That places Kent Beck and Chet Hendrickson at its origin.

Wikipedia attributes the standard statement to XP co-founder Ron Jeffries: "Always implement things when you actually need them, never when you just foresee that you [will] need them," citing a post from 4 April 1998 and *Extreme Programming Installed* (2001). Wikipedia lists "You ain't gonna need it," the video's phrasing, as an accepted variant.

## Does YAGNI work as an agent rule on its own?

Partly. The slide's version, "Don't build it until you need it," is narrower than the original. Fowler applies YAGNI to presumptive features, meaning "some capability we presume our software needs in the future should not be built now." He also ties it to continuous refactoring, automated unit tests and continuous integration, which keep the approach safe when needs change. An agent given only the one-line rule gets half of the practice. Pairing it with instructions to refactor and run tests is closer to what Fowler describes.

## Who wrote the snippet?

The video's on-screen sticker reads "thanks to @Claude_Memory on X." That is the account for [claude-mem](https://github.com/thedotmack/claude-mem), a project by Alex Newman (@thedotmack) that describes itself as "Persistent Context Across Sessions for Every Agent." It is Apache 2.0 licensed, and the repository showed version 15.2.1 and 103.4k stars when checked. The video never names the presenter, and the credit appears only in the sticker.

The speaker says the rule has helped, with agents telling him they skipped extra work after reading it. The video shows no agent output to back this up, so treat it as one person's report. The meetup itself is not identified in the video.

## Bottom line

The six-rule list is a sensible, publicly shared set of coding standards, and YAGNI is a long-standing XP principle. If you use Claude Code and your repository has any CLAUDE.md or CLAUDE.local.md, put the rules there or in `~/.claude/CLAUDE.md`, or turn on the setting that reads both files. Pair the YAGNI rule with refactoring and testing instructions.

## Sources

- [Yagni, Martin Fowler](https://martinfowler.com/bliki/Yagni.html) - YAGNI's origin and its dependence on refactoring and testing
- [You aren't gonna need it, Wikipedia](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it) - expansion, variants and the Ron Jeffries attribution
- [Claude Code memory documentation](https://code.claude.com/docs/en/memory) - when Claude reads AGENTS.md and CLAUDE.md
- [AGENTS.md](https://agents.md/) - the AGENTS.md format and its adoption
- [thedotmack/claude-mem on GitHub](https://github.com/thedotmack/claude-mem) - the credited project
- [Claude-Mem on X](https://x.com/claude_memory) - the account credited in the video
- [jondubin95/skirt_steak PR #17](https://github.com/jondubin95/skirt_steak/pull/17) - the same six rules as a Cursor rule


## Video description and verification notes

**The artifact is an 89.65 second vertical clip, 1080x1920, aspect ratio 0.56, in an MP4 container that ffprobe reports as `mov,mp4,m4a,3gp,3g2,mj2`, carrying an HEVC Main profile video stream at 30/1 fps with 2,689 frames and a 429,081 bps bitrate alongside an HE-AAC stereo stream at 44,100 Hz and 96,124 bps, for an overall 531,852 bps and a 5,960,205 byte file; yt-dlp labelled the format `bytevc1_1080p_531846-1` with `vcodec=h265`, `acodec=aac`, `tbr=531`, and `dynamic_range=SDR`. The post timestamp is epoch 1792900651, which is 2026-10-25T03:57:31Z, from uploader `philofsurprises` (uploader_id 6946020016044131333, channel name `philofsurprises`, no separate nickname field populated), with audio credited to `original sound` by `philofsurprises`. The description is 84 characters: "This event was interesting to say the least #javascript #sf #programming #ai #claude". Capture happened at epoch 1793057622, which is 2026-10-26T23:33:42Z, and at that moment the counts were 20,300 views, 1,125 likes, 16 comments, 47 reposts, and 466 saves. I read 15 frames from the 45 already extracted at 2 second intervals: 001, 004, 006, 009, 013, 020, 021, 022, 024, 026, 027, 028, 029, 030, and 045, plus three upscaled crops of frames 022 and 026. Frames 001 and 004 are handheld B-roll of two different indoor rooms, one with exposed concrete columns and people seated in rows of white chairs, one an open-plan office with long tables, laptops, and a green EXIT sign, both with a small picture-in-picture of the speaker inset at the bottom. From frame 006 onward the shot is a single talking head in a sunlit backyard with an ivy wall, a pellet grill, folding patio chairs, and a lavalier mic clipped to a grey t-shirt. Frames 022 through 027, roughly 41 to 53 seconds, cut to a photograph of a projection screen showing a markdown file headed `# Global Coding Standards` followed by six numbered entries, verbatim: "1. **YAGNI**: Don't build it until you need it", "2. **DRY**: Extract patterns after second duplication, not before", "3. **Fail Fast**: Explicit errors beat silent failures", "4. **Simple First**: Write the obvious solution, optimize only if needed", "5. **Delete Aggressively**: Less code = fewer bugs", and "6. **Semantic Naming**: Always name variables, parameters, and API endpoints with verbose, self-documenting names that optimize for comprehension by both humans and LLMs, not brevity (e.g., `wait_until_obs_is_saved=true` vs `wait=true`)". Over that slide sit two white sticker cards, "Link in bio" and "thanks to @Claude_Memory on X". The editor breadcrumb above the heading reads "Users > alexne" before the sticker covers it, the status bar carries "Auto Attach: With Flag" and "Select Postgres Server", a badge below the window controls reads 2.1.89, and a bottom-left status item reads "thedotmack" plus two or three unresolvable characters; I upscaled the breadcrumb and the status item and neither resolves cleanly enough to transcribe in full. From frame 028 at 54 seconds through frame 045 at 88 seconds a monospace card stays pinned over the backyard shot reading "- **YAGNI**: Don't build it until you need it." Burned-in auto-captions in white and yellow all-caps run the whole clip, for example "I WAS AT" at frame 001, "OSTENSIBLY WHAT PEOPLE" at frame 004, "THESE STARTUP FOUNDERS" at frame 009, "DOT MD FILE" at frame 022, "SNIPPET IN ALMOST" at frame 024, and "YOU PROBABLY DON'T" at frame 045. The spoken argument is that a San Francisco JavaScript meetup billed as an agents.md show-and-tell degenerated into founder pitches, that one presenter showed a snippet worth keeping, and that the YAGNI line from that snippet now stops the speaker's coding agents from overbuilding. The transcript is 303 words across 18 Whisper segments; the final segment runs 87.60 to 89.62 seconds against an audio.mp3 duration of 89.70 seconds and an in-container audio stream duration of 89.65 seconds, so nothing is timestamped past the end of the audio and no segment is hallucinated.**

## The video says "agents.md file" four times; nothing on screen says AGENTS.md, and the file shown is a Global Coding Standards list

At 5.12 s the video says the attendees "were supposed to do was present their agents.md file," and at 40.42 s it says "there was one guy that actually presented a very useful agents.md file, in particular this snippet." The auto-caption at frame 022, 42 seconds in, renders the phrase as "DOT MD FILE."

The artifact the video cuts to does not show that filename. Frames 022, 024, 026, and 027 show an editor whose visible heading is `# Global Coding Standards` and whose breadcrumb begins "Users >" followed by a username fragment, which places the file inside a home directory rather than a repository root. No tab label, path segment, or heading reading AGENTS.md appears in any frame I read. The six-item list is a coding-standards document, and its contents are format-agnostic: the same six entries appear in a public pull request dated 25 October 2026 that adds them as a Cursor rule at `.cursor/rules/coding-standards.mdc`, not as an AGENTS.md, in [jondubin95/skirt_steak PR #17](https://github.com/jondubin95/skirt_steak/pull/17). The snippet is being pasted into whichever instruction file a given tool reads.

AGENTS.md itself is a real and specific thing. Per [agents.md](https://agents.md/), it is "a simple, open format for guiding coding agents," it emerged from work by OpenAI Codex, Amp, Jules, Cursor, and Factory, it is now stewarded by the Agentic AI Foundation under the Linux Foundation, over 20 coding agents support it, and agents.md reports GitHub search showing it in over 60,000 open-source projects. None of that is wrong in the video. The video simply uses "agents.md file" as a generic label for "the file where you put agent instructions," and the one it actually displays is headed something else.

## "Almost all of my agents.md files" will not reach Claude Code in any repo that also has a CLAUDE.md

At 46.54 s the video says "I included that snippet in almost all of my agents.md files. I've seen really good benefits from this." At 57.12 s it adds "this is you're instructing your quad or you're instructing your agents how they should write code for you." That "quad" is a Whisper mangling of "Claude," which the description confirms with its `#claude` hashtag and which the sticker card confirms with "thanks to @Claude_Memory on X."

The behaviour the video assumes is conditional. [The Claude Code memory documentation](https://code.claude.com/docs/en/memory) sets out exactly when AGENTS.md loads. Its table reads: a repository with "An `AGENTS.md`, and no `CLAUDE.md` or `CLAUDE.local.md` in your working directory or above it" means Claude reads "Your `AGENTS.md`," while a repository with "An `AGENTS.md` and a `CLAUDE.md` or `CLAUDE.local.md` in your working directory or above it" means Claude reads "Your `CLAUDE.md` files only." The page is explicit about the default: "By default, Claude reads `AGENTS.md` only when you have no `CLAUDE.md` in your working directory or above it." It also notes that reading AGENTS.md directly "requires Claude Code v2.1.277 or later," and that the behaviour is configurable through the **Project instructions** setting, where `claude-md-and-agents-md` makes Claude read both.

So the advice as given works for a developer whose repositories contain AGENTS.md and no CLAUDE.md, on a recent enough version. For anyone who keeps a project `CLAUDE.md`, a `.claude/CLAUDE.md`, or even a gitignored `CLAUDE.local.md` for personal notes, pasting the snippet into AGENTS.md puts it somewhere Claude Code will not read by default. The docs flag that trap directly: "Because `CLAUDE.local.md` counts, adding one to keep your own uncommitted instructions in a project that relies on `AGENTS.md` stops Claude from reading `AGENTS.md` for you." The video never mentions the condition.

The same documentation also names the file for the use the video is actually describing. The speaker wants one rule in every project, which is user scope, and the user-scope location Claude Code documents is `~/.claude/CLAUDE.md`, described as "Personal preferences for all projects." That matches the breadcrumb on the projected slide, which starts at "Users >" rather than at a repository name.

## YAGNI is "You aren't gonna need it," from Extreme Programming; the video's "you ain't gonna need it" is a recorded variant, not an error

At 51.70 s the video says "the one I want to talk about is YAGNI, which stands for you ain't gonna need it," and at 76.62 s calls it "kind of an old timey programming wisdom."

[Martin Fowler's bliki entry, published 26 May 2015](https://martinfowler.com/bliki/Yagni.html), gives the expansion as "You Aren't Gonna Need It" and traces the phrase to the C3 project: "Chet came up to Kent with a series of capabilities that the system would soon need, to each one Kent replied 'you aren't going to need it.'" That puts Kent Beck and Chet Hendrickson at the origin, inside Extreme Programming, and ties YAGNI to the XP practice of Simple Design. [The Wikipedia article on the principle](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it) gives the same primary expansion, "You aren't gonna need it," and explicitly lists "You ain't gonna need it" among the alternative phrasings, alongside "You aren't going to need it." It attributes the canonical statement to Ron Jeffries, an XP co-founder: "Always implement things when you actually need them, never when you just foresee that you [will] need them," citing a Jeffries post dated 4 April 1998 and *Extreme Programming Installed* (2001).

The video's wording is a documented variant rather than a mistake. "Old timey" is defensible on the dates: the XP origin sits in the late 1990s, which is close to three decades before this clip was posted on 25 October 2026.

Worth noting that the slide's own gloss is narrower than the XP one. The slide says "Don't build it until you need it." Fowler's framing is about presumptive features specifically, that "some capability we presume our software needs in the future should not be built now," and he is clear the principle leans on continuous refactoring, automated unit testing, and continuous integration to stay safe. The slide drops that dependency. An agent told only "don't build it until you need it," with no refactoring or test discipline behind it, is being given half the practice.

## The credited source is claude-mem, and the on-screen fingerprints point at its author

The sticker card visible on frames 022 through 027 reads "thanks to @Claude_Memory on X." That account is [Claude-Mem](https://x.com/claude_memory), the account for the claude-mem project. [The claude-mem repository on GitHub](https://github.com/thedotmack/claude-mem) lists Alex Newman, GitHub handle @thedotmack, as the author, is licensed Apache 2.0, and at the time I fetched it reported version 15.2.1 and 103.4k stars. The project describes itself as "Persistent Context Across Sessions for Every Agent" and supports Claude Code, OpenClaw, Codex, Gemini, and others.

Two details in the slide photograph are consistent with that attribution and with the presenter being Newman himself. The editor breadcrumb begins "Users > alexne" before a sticker covers the rest, and the bottom-left status bar item reads "thedotmack" followed by characters I could not resolve even after upscaling the crop. I am reporting both as partial reads. Neither is legible enough to assert as a full string, and I am not claiming the identification beyond what the sticker card states on its own.

The video itself never names the presenter. It says only "there was one guy that actually presented a very useful agents.md file" at 40.42 s. The attribution lives entirely in the overlay sticker, which a viewer watching with sound and no close attention to the screen would miss.

## The meetup is not identifiable from the clip, and the video's own numbers strain

At 0.00 s the video says "A few months ago I was at this JavaScript meetup in San Francisco," and at 19.46 s says "I sat through probably a few dozen at least of these five minute talks." Earlier, at 9.56 s, it says "people were given a five minute slot."

Those numbers do not sit together comfortably. A few dozen means roughly 24 to 36. At the stated five minute slot, and before the overruns the video complains about at 25.12 s ("People were just overstaying their time"), that is two to three hours of talks as a floor. The video is simultaneously asserting that the slots ran long, which pushes the implied runtime higher still. "A few dozen at least" is most likely loose speech rather than a count, and the clip offers nothing to pin it down: no event name, no venue card, no date overlay, and no program appears in any frame I read.

I could not identify the event. Searching for a San Francisco JavaScript meetup built around presenting AGENTS.md files returned general listings of Bay Area JavaScript and agent meetups and no match for this format. I am recording that as unverified rather than attaching the claim to any particular group.

One further gap: the video asserts a result at 46.54 s, "I've seen really good benefits from this," and at 82.68 s describes agents telling him "I'm gonna do this for you. I thought about doing this other thing for you. But then I read that little snippet." No terminal, no agent transcript, no diff, and no before-and-after appears in any frame I read. The claimed benefit is anecdote, presented as anecdote, with no artifact behind it in the video.

## Key Takeaways

- **Verified:** The slide shown at 41 to 53 seconds is headed `# Global Coding Standards` and contains six numbered rules, which I transcribed verbatim from frames 022, 024, 026, and 027. The same six rules appear in a dated public repository artifact, [jondubin95/skirt_steak PR #17 of 25 October 2026](https://github.com/jondubin95/skirt_steak/pull/17), added there as a Cursor rule rather than an AGENTS.md.
- **Clarification:** The video calls the artifact an "agents.md file" at 5.12 s and 40.42 s, but no frame shows that filename. The visible heading is "Global Coding Standards" and the breadcrumb starts at "Users >", which indicates a home-directory file rather than a repository AGENTS.md.
- **Partial correction:** The advice at 46.54 s to put the snippet "in almost all of my agents.md files" is conditional for Claude Code users. The Claude Code docs state that AGENTS.md is read by default "only when you have no `CLAUDE.md` in your working directory or above it," that a `CLAUDE.local.md` is enough to suppress it, and that direct AGENTS.md reading "requires Claude Code v2.1.277 or later."
- **Clarification:** The canonical expansion of YAGNI is "You aren't gonna need it" per Martin Fowler and Wikipedia. The video's "you ain't gonna need it" at 51.70 s is listed on Wikipedia as a recognised alternative phrasing, so it is a variant rather than an error.
- **Context:** YAGNI comes from Extreme Programming, attributed by Fowler to an exchange between Kent Beck and Chet Hendrickson on the C3 project and stated canonically by Ron Jeffries in a post dated 4 April 1998. The video's "old timey programming wisdom" at 76.62 s holds up against those dates.
- **Correction:** The transcript word "quad" at 57.12 s is a Whisper mangling of "Claude." The description's `#claude` hashtag and the on-screen "thanks to @Claude_Memory on X" sticker both confirm the intended word. Do not quote "quad" as spoken.
- **Context:** The credited account @Claude_Memory belongs to claude-mem, whose repository lists Alex Newman (@thedotmack) as author, Apache 2.0 licence, version 15.2.1 and 103.4k stars when I fetched it. The slide's partial breadcrumb "Users > alexne" and partial status-bar string "thedotmack" are consistent with that, but neither is legible enough to assert in full.
- **Clarification:** The slide's YAGNI gloss, "Don't build it until you need it," drops the XP context Fowler attaches to it. Fowler ties YAGNI to presumptive features specifically and notes it depends on continuous refactoring, automated unit testing, and continuous integration.
- **Unverified:** The meetup. No event name, venue, date, or program appears in any frame I read, and searching for a San Francisco JavaScript meetup organised around presenting AGENTS.md files returned no match.
- **Unverified:** The claimed outcome. At 46.54 s the video says "I've seen really good benefits from this," and no terminal output, agent transcript, or diff appears in any frame I read to support it.
- **Verified:** The transcript is clean. Its last segment runs 87.60 to 89.62 seconds against an audio duration of 89.70 seconds, so nothing is timestamped past the end of the audio and no segment is fabricated.

## Resources

- [Yagni, Martin Fowler, 26 May 2015](https://martinfowler.com/bliki/Yagni.html) establishes the expansion "You Aren't Gonna Need It," the Kent Beck and Chet Hendrickson origin on the C3 project, the Extreme Programming context, and the dependency on Simple Design that I cite.
- [You aren't gonna need it, Wikipedia](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it) establishes the primary expansion, the listed alternative phrasings including "You ain't gonna need it," and the Ron Jeffries attribution with its 4 April 1998 and *Extreme Programming Installed* (2001) references that I cite.
- [How Claude remembers your project, Claude Code documentation](https://code.claude.com/docs/en/memory) establishes the CLAUDE.md scope table including `~/.claude/CLAUDE.md` for user scope, the AGENTS.md precedence table, the default that AGENTS.md loads only with no CLAUDE.md in or above the working directory, the CLAUDE.local.md suppression note, the v2.1.277 version requirement, and the `claude-md-and-agents-md` setting that I cite.
- [AGENTS.md](https://agents.md/) establishes the format description, the OpenAI Codex, Amp, Jules, Cursor, and Factory origin, the Agentic AI Foundation stewardship under the Linux Foundation, the 20-plus supporting agents, and the 60k-plus open-source project figure that I cite.
- [thedotmack/claude-mem, GitHub](https://github.com/thedotmack/claude-mem) establishes the author Alex Newman (@thedotmack), the Apache 2.0 licence, the version 15.2.1 and 103.4k star figures at fetch time, and the multi-agent support that I cite.
- [Claude-Mem (@Claude_Memory), X](https://x.com/claude_memory) establishes that the account credited in the video's sticker card is the claude-mem project account that I cite.
- [Add global coding standards Cursor rule, jondubin95/skirt_steak PR #17, 25 October 2026](https://github.com/jondubin95/skirt_steak/pull/17) establishes that the same six-rule list circulates as a Cursor rule at `.cursor/rules/coding-standards.mdc` rather than only as an AGENTS.md, which I cite as evidence the snippet is format-agnostic.

I attempted to fetch the original c2 wiki page for the principle at `https://wiki.c2.com/?YouArentGonnaNeedIt` and could not use it. The page returned only a loading shell with no article text, so I have not cited it and relied on Fowler and Wikipedia instead.
