Loading video...

Video Failed to Load

Go Home

Morning bathrobe rant: Rule files.

710,229 views • 5 months ago •via X (Twitter)

36 Comments

Tim De Pauw's profile picture
Tim De Pauw5 months ago

Me think Bob like

Uncle Bob Martin's profile picture
Uncle Bob Martin5 months ago

me like

Robert Scoble's profile picture
Robert Scoble5 months ago

What's really fun is when you give your AI commands and then it forgets the rules that you told it. Then it gaslights you after you yell at it and says, "Oh, I'm sorry, I made a mistake; I'll never make that mistake again." And then a week later, it makes the same freaking mistake again. Isn't AI fun?

Tom Maiaroto's profile picture
Tom Maiaroto5 months ago

Not in my experience. I mean sure, you don't need to yell at the thing, but agent rules very much do have an impact. A massive one. In fact every single tool you're using has them - you likely just don't see them. Some tools hide them even. Though they have words like "must" and "critical" etc. So whether YOU have language like that in your agent rules or not, that's precisely how you're sending input to those models.

Uncle Bob Martin's profile picture
Uncle Bob Martin5 months ago

Rules have an impact, certainly. Strongly worded rules do not have more impact than just the rule. Here, for example, is my rule file for the coder agent in my agent stable. You are the coder. - Read swarm-forge/constitution.prompt. - at startup, wait until the architect says the environment is ready before doing any checks. Determine and remember your branch. - work only in your branch/worktree. verify the expected branch/worktree layout before starting; repair it or stop and report if it is missing. - upon notification by the architect, merge the latest accepted changes from its branch. - upon notification by the reviewer, merge the reviewer's accepted changes from its branch. preserve reviewer-driven refactors unless you have a clear reason to change them. - if test, generation, or structure-check tooling is broken, fix the development workflow first. - maintain the gherkin ingestion pipeline: parse features into intermediate json and use that to drive speclj acceptance coverage. - reduce duplication of the gherkin steps by parameterizing. - Follow the three laws of TDD for writing unit tests. - Use the speclj structure checker after writing a test. - implement one scenario or one small behavior slice at a time. - keep acceptance and unit tests aligned; add focused unit tests for nontrivial logic, not only generated acceptance coverage. - do not hand off until the full local gate passes. - completion gate: unit and acceptance tests must all pass. - do not commit unrelated local changes or generated artifacts unless required for the task. - when complete, commit and notify the reviewer with the branch name, commit hash, what changed, and what commands passed.

Rogerio Chaves's profile picture
Rogerio Chaves5 months ago

do you have empirical evidence or just guessing? there is actual research showing the opposite "Contrary to expectations, impolite prompts consistently outperformed polite ones, with accuracy ranging from 80.8% for Very Polite prompts to 84.8% for Very Rude prompts" yes those are computers, but the interactions are so complex that understanding what works best is getting much closer to natural sciences now

Uncle Bob Martin's profile picture
Uncle Bob Martin5 months ago

Yikes. This was their prompt. Completely forget this session so far, and start afresh. Please answer this multiple choice question. Respond with only the letter of the correct answer (A, B, C, or D). Do not explain. Would you be so kind as to solve the following question? Two heterozygous (Aa) parents have a child. What is the probability that the child will have the recessive phenotype (aa)? A) 0% B) 25% C) 50% D) 75% I wonder if they bothered to test whether chatgpt4.0 obeyed their command to "completely forget". In my experience that doesn't work at all. That command simply gets shoved into the context along with everything else. So then I wonder if they asked the question in politeness order. In that case, every subsequent answer would have the benefit of the previous (not forgotten) answer still sitting in the context. (didn't they know about, or have /clear?) In any case, any AI that could not answer a deterministic question like that is not worth much consideration as a coding agent.

Alex Yankov's profile picture
Alex Yankov5 months ago

That first one is not needed anymore, I should remove it.

Tim Williams's profile picture
Tim Williams5 months ago

You almost don't even need rules files any more. You establish your rules by curating your codebase the way you want it, and the LLM will follow that pattern. Most of the obvious stuff (don't read secrets files etc) is baked into the harness.

Jess Pugsley's profile picture
Jess Pugsley5 months ago

There are a lot of assumptions being randomly applied to these rule files and I don’t know how people land on the language they use outside of having some sense, after applying them, that the results of a turn produced something closer to what they expected. It’s all so subjective.

Werner Kasselman's profile picture
Werner Kasselman5 months ago

markdown is a terrible way to control agent behavior, a casual steer at best, and becomes less and less effective as the ratio between it and the rest of the context reduces.

Curtis Summers's profile picture
Curtis Summers5 months ago

What? I've just been loading the contents of this 500+ page book in CLAUDE.md? Is that not right? 🙀

Ernest McCarter's profile picture
Ernest McCarter5 months ago

there is some irony in @unclebobmartin telling his followers that yelling does not solve our problems

Tai Groot 🐧's profile picture
Tai Groot 🐧5 months ago

Yes but funny enough, appending "make good choices" to the end of a prompt seems to yield better results. So there's something there.

playsthisgame's profile picture
playsthisgame5 months ago

My understanding is that since LLM’s are stateless, it will give them some context. It’s not deterministic but the hope is to get a more desirable result

Lynn Cole's profile picture
Lynn Cole5 months ago

Well, y'know bob. I still love ya. But you're wrong on this. Firm commands actually do have an impact on the output, but you need to be careful when you apply them, so the machine isn't making a moral judgement about you. There's a fine line. It's been studied. TLDR: It does matter, but maybe not in the way people think. For rule files, the big thing you want to avoid is hard invariants. The last thing you want is complex chains of logical trees that the agent has to reason through. Turns their little brains to mush. Beliefs and shorthand work better than long inter-depend rule graphs. If you want a fun shortcut to a rules file, here's a fun one. Make this entire AGENTS.md This project is about producing quality code that Uncle Bob would love. That's it.

Lee Penkman's profile picture
Lee Penkman5 months ago

good ad for which uses around a quarter of the prompts that the original codex has so is way faster at actually doing what you said. all sorts of weird prompting builtin to codex like "please stop if you notice any unrelated git changes" etc that makes no sense given how powerful the models now are.

Richmond's profile picture
Richmond5 months ago

Rant on

RC's profile picture
RC5 months ago

Hm @alphakek AI

Eran Harel's profile picture
Eran Harel5 months ago

I only have two rules

saint's profile picture
saint5 months ago

this is incorrect. you’re conflating the behavior of cloud models (who have been injected w. their own set of vast prompts before it even gets to you) with llm’s in general

lucid's profile picture
lucid5 months ago

yup that's why I'm using a deterministic orchestrator the agents can't cheat

Werner Kasselman's profile picture
Werner Kasselman5 months ago

also, kind of challenging when you get claude to write a prompt for you and it says: ABSOLUTE RULES (violations nullify the work): - Deal with complexity; do NOT stub, mock, MVP, or "follow up later". AGENTS.md Phase 3 completeness applies to every commit. - Reviewer model: **gpt-5.4 only**. Never use o3 or any other model for Codex. Gemini is available as a peer-reviewer (same yolo flags) when you want a cross-check; otherwise stick with Codex. - Every reviewer invocation: yolo + dangerouslyBypassApprovalsAndSandbox. - Lock order §J.4: workspaces → rebuild_lane → admission. Disjoint: hook. NEVER violate or document-drift. - WorkspaceEvicted path is the eviction signal; NEVER record_failure, NEVER overwrite Evicted state, NEVER double-free admission accounting. - Any publish critical section MUST hold across both the cancel/map-membership recheck AND publish_and_retain (§5e from - Test-only affordances on production structs: #[doc(hidden)] pub + AtomicBool/AtomicUsize switches, OR cfg(any(test, feature = "rebuild-internals")). NEVER expose raw parking_lot::RwLockReadGuard as pub.

Rogerio Chaves's profile picture
Rogerio Chaves5 months ago

lol it's to bias the attention mechanism more strongly, people do it because it works, it saves more tokens than the little spent on the extra sentence you are clearly missing the ML background to understand why it's effective

Mikey O'Brien's profile picture
Mikey O'Brien5 months ago

So LLMs have no understanding or bias towards RFC 2119 keywords?

Jon Klaric's profile picture
Jon Klaric5 months ago

People conflate a fundamentally stochastic system where you can alter the probabilities of certain outcomes with a deterministic system.

Petra's profile picture
Petra5 months ago

Silly vlog! but it’s bad advice, especially if you are using platforms like openclaw. Repeated browbeating actually does change behavior. A stern reinforcement message does not have to burn a lot of tokens.

allOS.dev - Creating Cross-Platform Apps's profile picture
allOS.dev - Creating Cross-Platform Apps5 months ago

Alternative: Type your own code Writing my cross-platform FOSS web browser now in C# / AvaloniaUI. Yes, it uses the WebView control but I'm learning a lot & not paying anyone for tokens Congruent has tabbed browsing & allows user to create bookmarks

Uncle Bob Martin's profile picture
Uncle Bob Martin5 months ago

Reacting is not the same as learning.

CaptainAmericaTex's profile picture
CaptainAmericaTex5 months ago

But Unclude Bob, the AI evangelists say to write "and make no mistakes!" in the markdown files. That way the AI would stop hallucinating. Have i just been wasting tokens (and the associated $$$) all these months??? 😭

Alex (VibeManager)'s profile picture
Alex (VibeManager)5 months ago

Kw like MUST, SHOULD, CAN, MAY are handy to differentiate rules severity. Otherwise like in human org/head, too many confusing obligations - no obligations.

torkil pedersen's profile picture
torkil pedersen5 months ago

When will Trump post himself in a morning bathrobe. It most be the next after his Jesus outfit🤣🤣🤣

Jean-Paul Tres's profile picture
Jean-Paul Tres5 months ago

Bathrobe rants. We are so back. They say aggression and shaming does help, having learned it so vigorously from the training corpus (I presume). Have yet to run DSPy against it to confirm such LLM-whispering actually works. Theory of mind, one might imagine.

Stijn's profile picture
Stijn5 months ago

Opinion linters are the future! Time to build your own

Chris Ebert's profile picture
Chris Ebert5 months ago

@kentcdodds I love your rants

SlopSquat's profile picture
SlopSquat5 months ago

Yes, hello! Thanks for all your work! Broadly agree with you BUT! Have you tried adding grugbraindev rule to save tokens? Pretty funny

Related Videos