Commits should use conventional commits.
Examples:
feat: add pet adoption search
fix: handle empty pet profile response
docs: add agent contribution guidelines
style: format Swift files with swift-format
refactor: split pet loading logic into PetService
test: add adoption flow unit tests
chore: update Swift package dependencies
build: require Swift 6 toolchain
ci: run swift test on pull requests
perf: cache rendered pet thumbnails
feat(auth): add Sign in with Apple
fix(api): retry transient network failures
feat(api)!: replace legacy pet response model
This project uses Swift 6.
We use Swift 6.x:
- All code should be modern Swift 6 friendly.
- Respect separation of concerns. Prefer dedicated classes for business logic, UI, and other responsibilities.
- Create new files when needed. We prefer more small files over a few large files.
- Respect the DRY principle and avoid code duplication.
- Use actors when appropriate.
- Avoid
Timer, DispatchQueue-based concurrency models, andNSLock. Prefer async/await,Task,ContinuousClock, and actors.
- Delete old code when replacing it.
- Use meaningful names:
userID, notid. - Use early returns to reduce nesting.
- Leave no warnings after compilation unless you can justify them.
- Do not optimize prematurely.
- Benchmark before claiming something is faster.
✓ Implemented authentication (all tests passing)
✓ Added rate limiting
✗ Found issue with token expiration - investigating
The current approach works, but I notice [observation].
Would you like me to [specific improvement]?
After you are done implementing:
- Build the project to check for compilation errors.
- Start a subagent to review your changes and ensure the initial issues are addressed.