English · 简体中文
A practical workflow for reliable AI-assisted software development.
AgentRules is a reusable workflow for AI-assisted software development. It guides coding agents from understanding a request through implementation and verification, with an emphasis on clarity, simplicity, architectural integrity, focused changes, and observable results.
It can be used with Codex, Claude Code, Cursor, GitHub Copilot, Gemini CLI, and other coding agents through their global or project instruction mechanisms.
AI coding agents can write code quickly, but speed alone does not make a change correct or maintainable. Common failure modes include silently guessing requirements, adding unnecessary abstractions, bypassing an existing framework, touching unrelated code, and claiming success without verification.
AgentRules turns those risks into an explicit working process. It asks the agent to define success before coding, make the smallest suitable change, preserve the project's architecture, and verify the result through normal project entry points.
- Clarify the outcome: turn the request into concrete acceptance criteria and state assumptions.
- Choose the simplest solution: avoid speculative features, abstractions, and configuration.
- Respect the existing system: inspect the architecture and extend it through established boundaries.
- Change only what is needed: keep the diff focused and avoid unrelated cleanup.
- Work toward verifiable goals: reproduce bugs, add focused tests, and check the final behavior.
- Keep failures diagnosable: preserve useful error context without noisy or sensitive logs.
- Finish the requested product surface: cover relevant validation, loading, empty, error, accessibility, and responsive states.
- Verify external integrations: use current primary documentation instead of guessing APIs or SDK behavior.
- Use sub-agents deliberately: delegate only when parallel work provides clear value.
Following the workflow helps teams get:
- Fewer misunderstandings caused by hidden assumptions
- Smaller, easier-to-review diffs
- Less overengineering and speculative code
- Better preservation of framework and architecture guarantees
- Clearer tests and completion criteria
- More diagnosable failures without leaking sensitive data
- More reliable third-party integrations
- More focused use of agent time and context
These guidelines do not replace engineering judgment. They make that judgment visible, reviewable, and easier to apply consistently.
Clone the repository and review AGENTS.md:
git clone https://github.com/LearnAIHubC/AgentRules.gitThen add the file or its contents to the global or project instruction mechanism supported by your coding agent. Tools that read AGENTS.md can use it directly. For other tools, copy or reference the content from their supported instruction file or settings.
Keep the shared rules as a baseline and add project-specific guidance where needed. Review model-specific preferences before adoption and adjust them to the models available in your environment.
AgentRules/
|-- AGENTS.md
|-- README.md
|-- README.zh-CN.md
`-- LICENSE
Issues and pull requests are welcome. Keep proposed rules concrete, broadly useful, and tied to a verifiable improvement in agent behavior.
MIT License. See LICENSE.