Whenever working in a new session start by opening a branch. Use the conventional commits syntax from here https://www.conventionalcommits.org/en/v1.0.0/ based on the initial prompt to create a branch and also do small commits with logical chunks of work based on your plan. Always run the linter and format code before committing. When you are done always push your work to the remote branch for review.
Use the prefixes below based on the work being done. Use this for branch names and commits.
- feat: for general feature work
- infra: for updating terraform, cloud infrastructure, or gitlab CI/CD configuration
- fix: for fixing bugs
- refactor: for general code maintenance or updates
- docs: for updates to documentation alone
- chore: for maintenance updates to the codebase
- test: additions to the test suite
- Write tests when making any significant changes unless the changes are already tested
- When fixing bugs, write tests first to reproduce the issue. Then implement a fix. Then re-run the tests to ensure the bug is fixed.
- Always run all tests before committing code and fix any issues that arise