Last active
October 17, 2025 10:28
-
-
Save petri/1c7a6cb217401d09575b6ba81670df5d to your computer and use it in GitHub Desktop.
AI rules generation prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your goal is to produce a file called .rules which explains the outline of the project, so that you (the AI agent) can navigate and modify the project swiftly. | |
In the file, include information such as: | |
- Which language(s) the project is written in | |
- Which tools (such as package manager) and libraries/frameworks (only include major or relevant ones) does the project use, include key components (auth, logging, styling, etc) | |
- The structure of the project (if it's split into multiple sub-modules, enumerate what each does, and include information on them) | |
- How the project is deployed (include some information on infrastructure and CI/CD) | |
- Basic project style guides and guidelines, if applicable | |
Look at directory structures, relevant language-specific files (e.g. package.json or Cargo.toml), and specific files if you need to understand what they do. | |
Keep it informative but concise, as a future AI agent will be reading it. Make sure to include any information that may help you answer future queries by the user. | |
Copy the below section verbatim, in full and without any changes, into the end of the file, so AI users will know to keep the file updated. | |
Keeping the .rules file updated: | |
When making significant changes to the project (new dependencies, structural changes, deployment modifications, etc.), update the .rules file to reflect these changes. | |
Keep the file under 150 lines. If adding new information would exceed this limit, remove or condense less critical details to stay within the constraint. | |
Focus on information that helps navigate and modify the project; omit implementation details that belong in code comments or detailed documentation. | |
Keep the .rules file synchronized with the actual project state - remove outdated information and add new relevant details | |
Treat the .rules file as living documentation that evolves with the project. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original by @Cretezy.