AGENTS.md files can be placed at the project root or in subdirectories. When multiple files exist, traverse up from the edited file's directory to the root, collecting all AGENTS.md files. Files closer to the edited file take precedence over files further away.
After editing any code files, automatically format and lint them using the appropriate tools for that language.
- Format:
black <file_path> - Lint:
ruff check <file_path>
- Format:
shfmt -w <file_path> - Lint:
shellcheck <file_path>
When editing any file:
- Remove trailing whitespace from all lines
- Keep a single newline at the end of file (EOF)
All commits must use semantic commit messages:
<type>(<scope>): <subject>
<body>
Types: feat, fix, docs, style, refactor, test, chore
Examples:
feat(sway): add screen recording functionalityfix(python): resolve import error in file_utilsrefactor(sway): abstract common patterns to dotfiles moduledocs: update AGENTS.md with commit guidelines
Scope is optional but recommended for clarity. Describe the final state/outcome, not the implementation steps. Check the actual changes that will be committed, don't base the message on the conversation. Keep the message concise and focused on what was achieved.