Stanford's CS336 course — which teaches students to build language models from scratch — has published a CLAUDE.md file in its first assignment repository. This file is read automatically by Claude (and compatible AI coding agents) when they operate inside the repo, effectively giving the AI a standing set of rules for how to assist without undermining the learning objectives. With 298 upvotes on Hacker News, it's clearly resonating beyond academia.
The core tension the file addresses is real: AI coding assistants are powerful enough to simply solve the assignments outright, which defeats the purpose of a course designed to build deep, foundational understanding of transformer internals, tokenization, and training loops. The guidelines draw a clear line between legitimate use (clarifying concepts, debugging specific errors, explaining documentation) and prohibited use (generating complete solution code, doing the work the student is supposed to do).
For builders running AI agents in any constrained environment — internal tooling, client codebases, regulated pipelines — the structure here is worth stealing. A CLAUDE.md (or equivalent system-prompt file) lets you encode scope boundaries, preferred coding conventions, off-limits actions, and escalation behavior directly in the repo, so every agent session starts with the same guardrails without relying on per-session prompting.
The file also reflects a broader shift in how institutions are adapting to AI: rather than banning tools outright, CS336 is specifying how they may be used. That's a more durable and honest approach — students in this course will work alongside AI agents professionally, so learning to use them appropriately within constraints is itself a skill worth teaching.
If you're building or managing agentic workflows, the practical action here is straightforward: add a CLAUDE.md or AGENTS.md to your repositories. Document what the agent is allowed to modify, what it should never touch, how it should handle ambiguity, and what coding style to follow. It takes under an hour and meaningfully tightens agent behavior across every session that touches that codebase.