Project Rules
Configure AI behavior per-project with rules files. Supports multiple formats with priority ordering.
Rules File Priority
QCoder reads rules from multiple files, merged in priority order (lower number = higher priority):
| Priority | File | Location | Description |
|---|---|---|---|
| --- | --- | --- | --- |
| 0 (highest) | .qcoderrules | Workspace root | QCoder-native rules file |
| 1 | .qcoder/rules.md | Workspace root | QCoder rules in markdown format |
| 2 | CLAUDE.md | Workspace root | Compatible with Claude Code format |
| 3 | .cursorrules | Workspace root | Compatible with Cursor format |
| 4 (lowest) | .clinerules | Workspace root | Compatible with Cline format |
If multiple files exist, they are all loaded and merged. Higher-priority rules override lower-priority ones when there are conflicts. This makes it easy to use QCoder alongside other AI tools without maintaining duplicate configuration.
Rules File Format
Rules files use markdown format with sections. Here is an example .qcoderrules file:
markdown# Project Rules## Code Style - Use TypeScript for all new files - Prefer functional components over class components - Use 2-space indentation - Always add JSDoc comments to exported functions
## Testing - Write tests for all new functions - Use Jest for unit tests and Playwright for e2e tests - Maintain minimum 80% code coverage
## Architecture - Follow the repository pattern for data access - Keep business logic in service classes - Use dependency injection via constructor parameters
## Security - Never hardcode API keys or secrets - Always validate user input - Use parameterized queries for database access
## Restrictions - Do not modify files in the /vendor directory - Do not add new npm dependencies without approval - Do not use any deprecated APIs ```
The AI reads these rules at the start of each conversation and follows them throughout the session.
Hot Reload
QCoder watches rules files for changes with a 500ms debounce. When you save a rules file, the updated rules are applied to the current session within half a second -- no restart required.
This means you can iterate on your rules in real time:
1. Open .qcoderrules in the editor.
2. Add or modify a rule.
3. Save the file.
4. The next AI response will follow the updated rules.