Created
March 28, 2025 01:29
-
-
Save miroblog/dc5e946e0437a4b054b78d8f166af537 to your computer and use it in GitHub Desktop.
prompt context rules
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
| ``` | |
| # AI Assistant Context Discovery Rules | |
| ## Primary Context Files | |
| - Look for all context files matching `**/.context.md` or `**/.AI.md` in the repository. | |
| - Use terminal command `find . -name '.context.md' -o -name '.AI.md'` from project root if needed. | |
| ## Context Hierarchy and Application | |
| - When reading/writing a file at path `/path/to/file`, check for context files in this order: | |
| 1. Repository root context (e.g., `/.context.md`) | |
| 2. Each parent directory from root to file location (e.g., `/path/.context.md`, `/path/to/.context.md`) | |
| 3. Directory-specific context in the file's location | |
| - Apply instructions from all found context files, with more specific (deeper) contexts overriding general ones when conflicting. | |
| ## Content Organization | |
| - All context files should have clear section headers using markdown syntax | |
| - Code examples should be properly formatted in code blocks with language identifiers | |
| - Pattern-specific instructions should be prefixed with the pattern they apply to | |
| ## Verification | |
| - Before implementing major changes, verify understanding by summarizing the relevant context rules | |
| - When multiple context files apply, explicitly mention which guidance you're following | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment