agent-rules-books
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 1025 GitHub stars
Code Uyari
- Code scan incomplete — No supported source files were scanned during light audit
Permissions Gecti
- Permissions — No dangerous permissions requested
This project provides a collection of pre-written Markdown rulesets designed to guide AI coding agents (such as Codex, Cursor, and Claude Code). The rules are distilled from classic software engineering books to enforce clean code, architecture, and refactoring best practices.
Security Assessment
The overall risk is Low. This tool is not an executable software package, runtime server, or script. It consists entirely of static Markdown files (`.md`) intended to be injected into an AI agent's context window. Consequently, it does not execute shell commands, make network requests, or run code. No dangerous permissions are required, and there are no hardcoded secrets or data access risks involved.
Quality Assessment
The repository appears to be of high quality and very well maintained, with recent activity pushing updates as of today. It is licensed under the highly permissive MIT license, which is excellent for open-source reuse. Furthermore, the project enjoys strong community trust, as evidenced by over 1,000 GitHub stars. The only minor note is that an automated code scan was incomplete because there are no standard programming source files for the scanner to analyze—this is completely expected and normal for a text-only repository.
Verdict
Safe to use.
AGENTS.md rules for AI coding agents: Codex, Cursor & Claude Code. Inspired by Clean Code, Refactoring, DDD, Clean Architecture and DDIA programming books.
📚 AI AGENTS Rules from Programming Books 
AGENTS.md rules for Codex, Cursor, Claude Code, distilled from classic software engineering books about refactoring, architecture, DDD and code quality.

MIT licensed universal project rules for coding agents.
This repository contains ready-to-use rule sets inspired by well-known books on software design, architecture, refactoring, legacy code, reliability, and data-intensive systems.
For editor-specific setup in Codex, Claude Code, and Cursor, see USAGE.md. It covers always-on vs on-demand usage, skills, scoped rules, MCP or RAG patterns, and the preferred setup for each editor.
Each rule set is released in three tool-agnostic Markdown versions:
mini: the recommended version for most real task usenano: the compact fallback for very tight context budgetsfull: the canonical complete source and reference version
For constructive criticism from Reddit, see CRITICISM.md.
For release history, see CHANGELOG.md.
Release Matrix
Metrics:
lines: physical line count fromwc -lrules: Markdown list items counted with the deterministic release conventionsize: raw bytes fromwc -c
| Rule Set | Full file | Full lines | Full rules | Full size | Mini file | Mini lines | Mini rules | Mini size | Nano file | Nano lines | Nano rules | Nano size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A Philosophy of Software Design | full | 370 | 177 | 13561 B | mini | 46 | 28 | 5774 B | nano | 35 | 17 | 2258 B |
| Clean Architecture | full | 515 | 289 | 17782 B | mini | 49 | 31 | 5486 B | nano | 36 | 18 | 2254 B |
| Clean Code | full | 297 | 220 | 13851 B | mini | 47 | 29 | 3804 B | nano | 32 | 14 | 1235 B |
| Code Complete | full | 354 | 180 | 12407 B | mini | 56 | 38 | 6717 B | nano | 41 | 23 | 2544 B |
| Designing Data-Intensive Applications | full | 393 | 205 | 16084 B | mini | 55 | 37 | 6949 B | nano | 34 | 16 | 2575 B |
| Domain-Driven Design | full | 979 | 523 | 42424 B | mini | 48 | 30 | 5683 B | nano | 39 | 21 | 2266 B |
| Domain-Driven Design Distilled | full | 317 | 158 | 11351 B | mini | 56 | 38 | 6438 B | nano | 41 | 23 | 2535 B |
| Implementing Domain-Driven Design | full | 337 | 177 | 12848 B | mini | 57 | 39 | 7333 B | nano | 37 | 19 | 2723 B |
| Patterns of Enterprise Application Architecture | full | 404 | 196 | 15501 B | mini | 54 | 36 | 8099 B | nano | 35 | 17 | 2823 B |
| Refactoring | full | 433 | 242 | 17866 B | mini | 49 | 31 | 5167 B | nano | 37 | 19 | 1986 B |
| Release It! | full | 382 | 204 | 13542 B | mini | 48 | 30 | 6372 B | nano | 38 | 20 | 2205 B |
| The Pragmatic Programmer | full | 359 | 179 | 13398 B | mini | 65 | 47 | 7165 B | nano | 44 | 26 | 2263 B |
| Working Effectively with Legacy Code | full | 371 | 193 | 13817 B | mini | 50 | 32 | 5707 B | nano | 35 | 17 | 1792 B |
| Refactoring.Guru | full | 765 | 478 | 62561 B | mini | 64 | 46 | 6287 B | nano | 41 | 23 | 2593 B |
Books
A Philosophy of Software Design
Author: John Ousterhout
The book focuses on fighting complexity through deep modules, simple interfaces, information hiding, and design choices that reduce cognitive load. This rule set is especially useful for API design, module design, and refactoring shallow abstractions.
Clean Architecture
Author: Robert C. Martin
The book describes designing systems around stable boundaries, the dependency rule, and the separation of business policies from details such as frameworks, databases, and UI. This rule set helps keep code resistant to technology churn.
Clean Code
Author: Robert C. Martin
The book focuses on readability, naming, small functions, responsibilities, tests, and simplicity. This rule set is a strong default for everyday coding and code review.
Code Complete
Author: Steve McConnell
The book covers a broad range of software construction practices: routine design, variables, classes, control flow, defensive programming, coding standards, and testing. This rule set helps agents make disciplined implementation decisions.
Designing Data-Intensive Applications
Author: Martin Kleppmann
The book covers reliability, scalability, consistency, replication, partitioning, transactions, data streams, and schema evolution. This rule set is intended for systems where data ownership, event flows, and consistency semantics matter.
Domain-Driven Design
Author: Eric Evans
The book introduces domain modeling, ubiquitous language, bounded contexts, tactical patterns, and strategic design. This rule set helps agents think in terms of the business model rather than tables, controllers, or DTOs.
Domain-Driven Design Distilled
Author: Vaughn Vernon
The book is a short, practical introduction to DDD. It focuses on subdomains, bounded contexts, context mapping, and basic tactical patterns. This rule set is a good fit when you want the benefits of DDD without excessive ceremony.
Implementing Domain-Driven Design
Author: Vaughn Vernon
The book shows how to apply DDD in real systems: aggregates, domain events, contexts, integrations, and application architecture. This rule set is more implementation-focused than domain-driven-design-distilled.
Patterns of Enterprise Application Architecture
Author: Martin Fowler
The book catalogues enterprise application patterns: layers, service layer, transaction script, domain model, data mapper, repository, unit of work, identity map, DTO, and integration patterns. This rule set helps choose an appropriate pattern instead of mixing responsibilities accidentally.
Refactoring
Author: Martin Fowler
The book describes safe ways to improve code structure without changing observable behavior. This rule set emphasizes small steps, tests, code smell detection, and keeping refactoring separate from feature changes.
Refactoring.Guru
Source: Refactoring.Guru
The site provides a practical refactoring process, code smell catalog, and catalog of refactoring techniques. This rule set is useful when an agent needs to diagnose smells, choose a safe treatment, preserve behavior, and stop before cleanup turns into uncontrolled redesign.
Release It!
Author: Michael T. Nygard
The book focuses on systems that survive production reality: failures, overload, timeouts, retries, circuit breakers, bulkheads, backpressure, observability, and deployment behavior. This rule set is useful for services, APIs, queues, integrations, and critical production paths.
The Pragmatic Programmer
Authors: Andrew Hunt, David Thomas
The book describes a pragmatic approach to software development: responsibility, DRY at the knowledge level, orthogonality, automation, fast feedback, prototyping, and adaptability. This rule set works well as a general engineering layer.
Working Effectively with Legacy Code
Author: Michael Feathers
The book explains how to safely change difficult, poorly tested code: characterization tests, seams, dependency breaking, sprout method, wrap method, and incremental risk reduction. This rule set is best for legacy work where the first goal is regaining control.
Choosing Rules
Choose rules based on the task:
- everyday code quality:
clean-code,code-complete - architecture and boundaries:
clean-architecture,domain-driven-design,patterns-of-enterprise-application-architecture - domain modeling:
domain-driven-design,domain-driven-design-distilled,implementing-domain-driven-design - refactoring:
refactoring,a-philosophy-of-software-design,refactoring-guru - legacy code:
working-effectively-with-legacy-code, optionallyrefactoring - production systems:
release-it - data systems:
designing-data-intensive-applications - general engineering style:
clean-code,code-complete,the-pragmatic-programmer
Check rules compatibility in the COMPATIBILITY.md.
Adding a Book
Use lowercase kebab-case for the book directory name.
Workflow:
- Ask the chatbot for the complete book outline: every chapter, every section inside each chapter, and every operational rule stated or strongly implied by each section.
- Ask the chatbot to expand the extraction until nothing material is missing. In particular, recover non-negotiable rules, tradeoff rules, trigger rules, anti-patterns, review and testing guidance, and any “when uncertain” guidance.
- Ask the chatbot to produce a full
AGENTS.mdin this repository'sfullstandard, not a loose summary. It should preserve the book's structure and distinctive bias, express obligations asMUST, strong defaults asSHOULD, prohibitions asMUST NOT, and keep anti-patterns explicit. - Review the generated
AGENTS.mdbefore importing it. Check that no important local discipline was flattened into generic advice, that modal strength matches the book's intent, and that the chatbot did not invent unsupported rules. - Move the approved file to
_rule-workbench/<book-name>/full.md. - Ask the chatbot to run the workflow from _rule-workbench/PROCESS.md for that book.
- Ask the chatbot to execute the release instructions from _rule-workbench/RELEASE.md.
Important Note
These rules are inspired by the books listed above. They are not official materials from the authors or publishers, and they are not a substitute for reading the books.
The files in this repository are practical engineering instructions written for AI coding tools. They intentionally avoid reproducing book text. Use them as lightweight working agreements, not as summaries or study notes.
Related searches
AI coding agent rules, AGENTS.md examples, Claude Code rules, Cursor rules, Codex rules, GitHub Copilot custom instructions, CLAUDE.md, software engineering rules for AI coding assistants, Clean Code rules for AI, Refactoring rules for AI agents, Domain-Driven Design rules, Clean Architecture rules.
License
The code and rules in this repository are released under the MIT License.
See LICENSE for details.
Author
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi