[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-740":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":10,"languages":10,"totalLinesOfCode":10,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":15,"starSnapshotCount":15,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},740,"agent-rules-books","ciembor\u002Fagent-rules-books","ciembor","AGENTS.md rules \u002F skills for AI coding agents: Codex, Cursor & Claude Code. Inspired by Clean Code, Refactoring, DDD, Clean Architecture and DDIA programming books.","",null,1798,281,18,3,0,29,102,483,87,105.35,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33],"agent-rules","agent-skills","agents-md","ai-agent","code-quality","domain-driven-design","programming-books","refactoring","2026-06-12 04:00:05","\n# 📚 AI AGENTS Rules from Programming Books \u003Ca href=\"CHANGELOG.md\">\u003Cimg align=\"right\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-v0.5-blue?style=for-the-badge\" alt=\"Version v0.5\" height=\"48\">\u003C\u002Fa>\n\n### AGENTS.md rules \u002F skills for Codex, Cursor, Claude Code, distilled from classic software engineering books about refactoring, architecture, DDD and code quality.\n\n![AGENTS Book Rules](books-ai-rules.png)\n\nMIT licensed universal project rules for coding agents.\n\nThis repository contains ready-to-use rule sets inspired by well-known books on software design, architecture, refactoring, legacy code, reliability, and data-intensive systems.\n\nFor editor-specific setup in Codex, Claude Code, and Cursor, see [USAGE.md](USAGE.md). It covers always-on vs on-demand usage, skills, scoped rules, MCP or RAG patterns, and the preferred setup for each editor.\n\nEach rule set is released in three tool-agnostic Markdown versions:\n\n- `mini`: the recommended version for most real task use\n- `nano`: the compact fallback for very tight context budgets\n- `full`: the canonical complete source and reference version\n\nFor constructive criticism from Reddit, see [CRITICISM.md](CRITICISM.md).\n\nFor release history, see [CHANGELOG.md](CHANGELOG.md).\n\n## Release Matrix\n\nMetrics:\n\n- `lines`: physical line count from `wc -l`\n- `rules`: Markdown list items counted with the deterministic release convention\n- `size`: raw bytes from `wc -c`\n\n| 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 |\n| --- | --- | ---: | ---: | ---: | --- | ---: | ---: | ---: | --- | ---: | ---: | ---: |\n| [A Philosophy of Software Design](a-philosophy-of-software-design\u002F) | [full](a-philosophy-of-software-design\u002Fa-philosophy-of-software-design.md) | 370 | 177 | 13561 B | [mini](a-philosophy-of-software-design\u002Fa-philosophy-of-software-design.mini.md) | 46 | 28 | 5774 B | [nano](a-philosophy-of-software-design\u002Fa-philosophy-of-software-design.nano.md) | 35 | 17 | 2258 B |\n| [Clean Architecture](clean-architecture\u002F) | [full](clean-architecture\u002Fclean-architecture.md) | 515 | 289 | 17782 B | [mini](clean-architecture\u002Fclean-architecture.mini.md) | 49 | 31 | 5486 B | [nano](clean-architecture\u002Fclean-architecture.nano.md) | 36 | 18 | 2254 B |\n| [Clean Code](clean-code\u002F) | [full](clean-code\u002Fclean-code.md) | 297 | 220 | 13851 B | [mini](clean-code\u002Fclean-code.mini.md) | 47 | 29 | 3804 B | [nano](clean-code\u002Fclean-code.nano.md) | 32 | 14 | 1235 B |\n| [Code Complete](code-complete\u002F) | [full](code-complete\u002Fcode-complete.md) | 354 | 180 | 12407 B | [mini](code-complete\u002Fcode-complete.mini.md) | 56 | 38 | 6717 B | [nano](code-complete\u002Fcode-complete.nano.md) | 41 | 23 | 2544 B |\n| [Designing Data-Intensive Applications](designing-data-intensive-applications\u002F) | [full](designing-data-intensive-applications\u002Fdesigning-data-intensive-applications.md) | 393 | 205 | 16084 B | [mini](designing-data-intensive-applications\u002Fdesigning-data-intensive-applications.mini.md) | 55 | 37 | 6949 B | [nano](designing-data-intensive-applications\u002Fdesigning-data-intensive-applications.nano.md) | 34 | 16 | 2575 B |\n| [Domain-Driven Design](domain-driven-design\u002F) | [full](domain-driven-design\u002Fdomain-driven-design.md) | 979 | 523 | 42424 B | [mini](domain-driven-design\u002Fdomain-driven-design.mini.md) | 48 | 30 | 5683 B | [nano](domain-driven-design\u002Fdomain-driven-design.nano.md) | 39 | 21 | 2266 B |\n| [Domain-Driven Design Distilled](domain-driven-design-distilled\u002F) | [full](domain-driven-design-distilled\u002Fdomain-driven-design-distilled.md) | 317 | 158 | 11351 B | [mini](domain-driven-design-distilled\u002Fdomain-driven-design-distilled.mini.md) | 56 | 38 | 6438 B | [nano](domain-driven-design-distilled\u002Fdomain-driven-design-distilled.nano.md) | 41 | 23 | 2535 B |\n| [Implementing Domain-Driven Design](implementing-domain-driven-design\u002F) | [full](implementing-domain-driven-design\u002Fimplementing-domain-driven-design.md) | 337 | 177 | 12848 B | [mini](implementing-domain-driven-design\u002Fimplementing-domain-driven-design.mini.md) | 57 | 39 | 7333 B | [nano](implementing-domain-driven-design\u002Fimplementing-domain-driven-design.nano.md) | 37 | 19 | 2723 B |\n| [Patterns of Enterprise Application Architecture](patterns-of-enterprise-application-architecture\u002F) | [full](patterns-of-enterprise-application-architecture\u002Fpatterns-of-enterprise-application-architecture.md) | 404 | 196 | 15501 B | [mini](patterns-of-enterprise-application-architecture\u002Fpatterns-of-enterprise-application-architecture.mini.md) | 54 | 36 | 8099 B | [nano](patterns-of-enterprise-application-architecture\u002Fpatterns-of-enterprise-application-architecture.nano.md) | 35 | 17 | 2823 B |\n| [Refactoring](refactoring\u002F) | [full](refactoring\u002Frefactoring.md) | 433 | 242 | 17866 B | [mini](refactoring\u002Frefactoring.mini.md) | 49 | 31 | 5167 B | [nano](refactoring\u002Frefactoring.nano.md) | 37 | 19 | 1986 B |\n| [Release It!](release-it\u002F) | [full](release-it\u002Frelease-it.md) | 382 | 204 | 13542 B | [mini](release-it\u002Frelease-it.mini.md) | 48 | 30 | 6372 B | [nano](release-it\u002Frelease-it.nano.md) | 38 | 20 | 2205 B |\n| [The Pragmatic Programmer](the-pragmatic-programmer\u002F) | [full](the-pragmatic-programmer\u002Fthe-pragmatic-programmer.md) | 359 | 179 | 13398 B | [mini](the-pragmatic-programmer\u002Fthe-pragmatic-programmer.mini.md) | 65 | 47 | 7165 B | [nano](the-pragmatic-programmer\u002Fthe-pragmatic-programmer.nano.md) | 44 | 26 | 2263 B |\n| [Working Effectively with Legacy Code](working-effectively-with-legacy-code\u002F) | [full](working-effectively-with-legacy-code\u002Fworking-effectively-with-legacy-code.md) | 371 | 193 | 13817 B | [mini](working-effectively-with-legacy-code\u002Fworking-effectively-with-legacy-code.mini.md) | 50 | 32 | 5707 B | [nano](working-effectively-with-legacy-code\u002Fworking-effectively-with-legacy-code.nano.md) | 35 | 17 | 1792 B |\n| [Refactoring.Guru](refactoring-guru\u002F) | [full](refactoring-guru\u002Frefactoring-guru.md) | 765 | 478 | 62561 B | [mini](refactoring-guru\u002Frefactoring-guru.mini.md) | 64 | 46 | 6287 B | [nano](refactoring-guru\u002Frefactoring-guru.nano.md) | 41 | 23 | 2593 B |\n\n## Books\n\n### [A Philosophy of Software Design](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F39996759-a-philosophy-of-software-design)\n\nAuthor: [John Ousterhout](https:\u002F\u002Fweb.stanford.edu\u002F~ouster\u002Fcgi-bin\u002Fhome.php)\n\nThe 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.\n\n### [Clean Architecture](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F18043011-clean-architecture)\n\nAuthor: [Robert C. Martin](https:\u002F\u002Fcleancoder.com\u002F)\n\nThe 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.\n\n### [Clean Code](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F3735293-clean-code)\n\nAuthor: [Robert C. Martin](https:\u002F\u002Fcleancoder.com\u002F)\n\nThe book focuses on readability, naming, small functions, responsibilities, tests, and simplicity. This rule set is a strong default for everyday coding and code review.\n\n### [Code Complete](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F4845.Code_Complete)\n\nAuthor: [Steve McConnell](https:\u002F\u002Fwww.construx.com\u002Fabout-us\u002Four-experts\u002Fsteve-mcconnell\u002F)\n\nThe 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.\n\n### [Designing Data-Intensive Applications](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F23463279-designing-data-intensive-applications)\n\nAuthor: [Martin Kleppmann](https:\u002F\u002Fmartin.kleppmann.com\u002F)\n\nThe 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.\n\n### [Domain-Driven Design](https:\u002F\u002Fwww.goodreads.com\u002Fen\u002Fbook\u002Fshow\u002F179133)\n\nAuthor: [Eric Evans](https:\u002F\u002Fdomainlanguage.com\u002F)\n\nThe 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.\n\n### [Domain-Driven Design Distilled](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F28602719-domain-driven-design-distilled)\n\nAuthor: [Vaughn Vernon](https:\u002F\u002Fvaughnvernon.com\u002F)\n\nThe 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.\n\n### [Implementing Domain-Driven Design](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F18396266-implementing-domain-driven-design)\n\nAuthor: [Vaughn Vernon](https:\u002F\u002Fvaughnvernon.com\u002F)\n\nThe 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`.\n\n### [Patterns of Enterprise Application Architecture](https:\u002F\u002Fwww.goodreads.com\u002Fen\u002Fbook\u002Fshow\u002F70156.Patterns_of_Enterprise_Application_Architecture)\n\nAuthor: [Martin Fowler](https:\u002F\u002Fmartinfowler.com\u002F)\n\nThe 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.\n\n### [Refactoring](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F44936.Refactoring)\n\nAuthor: [Martin Fowler](https:\u002F\u002Fmartinfowler.com\u002F)\n\nThe 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.\n\n### [Refactoring.Guru](https:\u002F\u002Frefactoring.guru\u002Frefactoring)\n\nSource: [Refactoring.Guru](https:\u002F\u002Frefactoring.guru\u002F)\n\nThe 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.\n\n### [Release It!](https:\u002F\u002Fwww.goodreads.com\u002Fen\u002Fbook\u002Fshow\u002F1069827.Release_It_)\n\nAuthor: [Michael T. Nygard](https:\u002F\u002Fwww.michaelnygard.com\u002F)\n\nThe 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.\n\n### [The Pragmatic Programmer](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F50701156)\n\nAuthors: [Andrew Hunt](https:\u002F\u002Ftoolshed.com\u002F), [David Thomas](https:\u002F\u002Fpragdave.me\u002F)\n\nThe 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.\n\n### [Working Effectively with Legacy Code](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F44919.Working_Effectively_with_Legacy_Code)\n\nAuthor: [Michael Feathers](https:\u002F\u002Fwww.r7krecon.com\u002F)\n\nThe 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.\n\n## Choosing Rules\n\nChoose rules based on the task:\n\n- everyday code quality: `clean-code`, `code-complete`\n- architecture and boundaries: `clean-architecture`, `domain-driven-design`, `patterns-of-enterprise-application-architecture`\n- domain modeling: `domain-driven-design`, `domain-driven-design-distilled`, `implementing-domain-driven-design`\n- refactoring: `refactoring`, `a-philosophy-of-software-design`, `refactoring-guru`\n- legacy code: `working-effectively-with-legacy-code`, optionally `refactoring`\n- production systems: `release-it`\n- data systems: `designing-data-intensive-applications`\n- general engineering style: `clean-code`, `code-complete`, `the-pragmatic-programmer`\n\nCheck rules compatibility in the [COMPATIBILITY.md](\u002FCOMPATIBILITY.md).\n\n## Adding a Book\n\nUse lowercase kebab-case for the book directory name.\n\nWorkflow:\n\n1. 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.\n2. 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.\n3. Ask the chatbot to produce a full `AGENTS.md` in this repository's `full` standard, not a loose summary. It should preserve the book's structure and distinctive bias, express obligations as `MUST`, strong defaults as `SHOULD`, prohibitions as `MUST NOT`, and keep anti-patterns explicit.\n4. Review the generated `AGENTS.md` before 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.\n5. Move the approved file to `_rule-workbench\u002F\u003Cbook-name>\u002Ffull.md`.\n6. Ask the chatbot to run the workflow from [_rule-workbench\u002FPROCESS.md](\u002FUsers\u002Fmaciej\u002FProjects\u002FAGENTS\u002F_rule-workbench\u002FPROCESS.md:1) for that book.\n7. Ask the chatbot to execute the release instructions from [_rule-workbench\u002FRELEASE.md](\u002FUsers\u002Fmaciej\u002FProjects\u002FAGENTS\u002F_rule-workbench\u002FRELEASE.md:1).\n\n## Important Note\n\nThese 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.\n\nThe 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.\n\n## Related searches\n\n**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**.\n\n## License\n\nThe code and rules in this repository are released under the MIT License.\n\nSee [LICENSE](LICENSE) for details.\n\n## Author\n\n[Maciej Ciemborowicz](https:\u002F\u002Fmaciej-ciemborowicz.eu)\n","ciembor\u002Fagent-rules-books 项目为 AI 编码助手如 Codex、Cursor 和 Claude Code 提供了一套基于经典编程书籍提炼出的规则和技能。该项目的核心功能是将软件工程中关于重构、架构设计、领域驱动设计及代码质量等知识转化为易于AI理解和应用的规则集。这些规则以工具无关的Markdown格式提供，分为完整版、精简版和迷你版三种版本，适用于不同场景下的需求。特别适合于需要提高AI编码助手生成代码质量或遵循特定编程原则的开发者使用。",2,"2026-06-11 02:38:59","CREATED_QUERY"]