| description | Amazon Q Rules Location |
|---|---|
| globs | .amazonq/rules/**/*.md |
Rules for placing and organizing Amazon Q markdown files in the repository.
name: amazonq_rules_location description: Standards for placing Amazon Q markdown files in the correct directory filters: # Match any .md files - type: file_extension pattern: "\.md$" # Match file creation events - type: event pattern: "file_create"actions:
-
type: reject conditions:
- pattern: "^(?!\.amazonq\/rules\/.*\.md$)" message: "Amazon Q markdown files must be placed in the .amazonq/rules directory"
-
type: suggest message: | When creating Amazon Q files:
-
Always place markdown files in PROJECT_ROOT/.amazonq/rules/:
.amazonq/rules/ ├── your-rule.md ├── another-rule.md [[1]](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_Rule.html) └── ... -
Follow the naming convention:
- Use kebab-case for filenames
- Always use .md extension
- Make names descriptive of the file's purpose
-
Directory structure:
PROJECT_ROOT/ ├── .amazonq/ │ └── rules/ │ ├── your-rule.md │ └── ... └── ... -
Never place markdown files:
- In the project root
- In subdirectories outside .amazonq/rules
- In any other location
-
examples:
-
input: |
rules/my-rule.md my-rule.md .rules/my-rule.md
.amazonq/rules/my-rule.md output: "Correctly placed Amazon Q markdown file"
metadata: priority: high version: 1.0