What Happened
In early May 2026, an open source project called Agent Rules Books appeared on GitHub (by @ciembor), quickly gaining 931 stars.
What this project does is simple but meaningful:
Extract the core principles of classic software engineering books and transform them into rule files that AI coding agents (Codex, Cursor, Claude Code) can directly read and execute.
Classics covered include:
- Clean Architecture — Robert C. Martin
- Refactoring — Martin Fowler
- Working Effectively with Legacy Code — Michael Feathers
- Designing Data-Intensive Applications (DDIA) — Martin Kleppmann
Each rule file comes in mini, nano, and full sizes, adapting to different context windows.
Why This Matters
1. From “Books Humans Read” to “Rules Agents Execute”
The core problem with software engineering classics: they’re written for humans, not for agents.
An AI coding agent can’t directly “read” a 400-page book and then consciously apply its principles. But if you extract the core rules from the book and turn them into structured rule files, the agent can automatically apply these principles every time it codes:
# Clean Architecture Rules (mini version)
- Dependency direction: inner layers don't depend on outer layers
- Interface segregation: high-level policies don't depend on low-level details
- Single responsibility: each module has only one reason to change
- Explicit boundaries: define architecture boundaries with interfaces
2. The Engineering Significance of Three Sizes
| Size | Context Usage | Applicable Scenario | Rule Granularity |
|---|---|---|---|
| nano | ~500 tokens | Lightweight rules attached to every request | 5-10 most core principles |
| mini | ~2000 tokens | Project-level .clinerules / .cursorrules | Key principles + examples |
| full | ~8000 tokens | Deep code review / architecture review | Complete rules + detailed descriptions |
This reflects a core engineering challenge of AI coding tools in 2026: how to maximize the injection of engineering knowledge within limited context windows.
3. From “Prompt Engineering” to “Rules Engineering”
Over the past year, the best practice for AI coding was “write good prompts.” But prompts are temporary, manual, and easy to forget.
Agent Rules Books represents a paradigm shift:
2025: Manually write prompts each time → Unstable results
2026: Pre-set rule files → Agents automatically apply every time
Rule files (like .cursorrules, AGENTS.md, .clinerules) are becoming standard configurations for code repositories, just like .gitignore and README.md.
Covered Classics and Corresponding Rules
| Classic Book | Core Rules Extracted | Agent Behavior Impact |
|---|---|---|
| Clean Architecture | Dependency inversion, boundary definition, layered architecture | Generated code automatically follows layering principles |
| Refactoring | Extract method, eliminate duplication, improve naming | Automatically identifies refactorable code segments |
| Working with Legacy Code | Protective encapsulation, feature envy identification | Safely modifies legacy code |
| DDIA | Data model selection, consistency trade-offs | More reasonable database design suggestions |
Landscape Assessment
Why This Project Appears Now
- Maturation of AI coding tools: Codex, Cursor, Claude Code can now understand and execute complex rules
- Timing of rule file standardization: Platforms are starting to support project-level rule files (
.cursorrules, etc.) - Bottleneck of engineering knowledge injection: Prompts alone can’t transmit enough engineering knowledge
- Open source community’s collaboration tradition: Structuring and sharing engineering knowledge is the open source community’s strength
Trend Predictions
| Time | Prediction |
|---|---|
| 2026 Q2 | More classics rule-ified: design patterns, SOLID, TDD, etc. |
| 2026 Q3 | AI coding tools build in rule markets, one-click install industry best practices |
| 2026 Q4 | Enterprises start customizing their own Agent Rules, forming internal coding standards |
| 2027 | Agent Rules become standard for code repositories, job requirements include “can write Agent Rules” |
Connection to AI Agent Harness Trends
This trend is highly consistent with LangChain’s recent discovery (same model, only changing Harness yields a 13.7 point boost):
- Harness Engineering optimizes the Agent’s “execution framework”
- Rules Engineering optimizes the Agent’s “behavioral guidelines”
Combined, these are the true reasons for the leap in AI coding capability in 2026.
Action Recommendations
For developers:
- Add
.cursorrulesorAGENTS.mdto your projects, injecting the engineering principles you endorse - Start with the nano version of Agent Rules Books, gradually expanding based on team needs
For team leaders:
- Consider converting your team’s coding standards into Agent Rules files
- This is more effective than writing lengthy development docs — because agents will actually execute these rules
For technical writers:
- If you’ve read any software engineering classic, consider distilling it into Agent Rules
- This is a new way of knowledge dissemination: not writing books, but writing rules
For tool developers:
- Consider supporting standard formats for Agent Rules
- Provide visual management and version comparison features for rule files