|
| 1 | +# Agent Guidelines for Nakimi |
| 2 | + |
| 3 | +## Git Workflow |
| 4 | + |
| 5 | +### ⚠️ IMPORTANT: Use Feature Branches |
| 6 | + |
| 7 | +**Never commit directly to `main`**. Always use feature branches: |
| 8 | + |
| 9 | +```bash |
| 10 | +# 1. Create a feature branch |
| 11 | +git checkout -b feature/descriptive-name |
| 12 | + |
| 13 | +# 2. Do your work, commit as needed |
| 14 | +git add . |
| 15 | +git commit -m "feat: add new feature" |
| 16 | + |
| 17 | +# 3. Push the branch |
| 18 | +git push origin feature/descriptive-name |
| 19 | + |
| 20 | +# 4. When ready to merge, squash to keep history clean |
| 21 | +git checkout main |
| 22 | +git merge --squash feature/descriptive-name |
| 23 | +git commit -m "feat: descriptive commit message" |
| 24 | +git push origin main |
| 25 | + |
| 26 | +# 5. Clean up |
| 27 | +git branch -d feature/descriptive-name |
| 28 | +``` |
| 29 | + |
| 30 | +### Why? |
| 31 | +- Keeps `main` history clean and professional |
| 32 | +- Allows iterative commits during development |
| 33 | +- Easy to review changes before merging |
| 34 | +- Avoids polluting history with "fix", "wip", "oops" commits |
| 35 | + |
| 36 | +### When is Force Push Acceptable? |
| 37 | + |
| 38 | +Only use `git push --force-with-lease` when: |
| 39 | +- Cleaning up history on `main` (as we did with the rebase) |
| 40 | +- You're the sole contributor and no one else has pulled |
| 41 | +- You've coordinated with other contributors |
| 42 | + |
| 43 | +**Never force push to shared branches others are working on.** |
| 44 | + |
| 45 | +## Code Style |
| 46 | + |
| 47 | +- Run `black src/ tests/` before committing |
| 48 | +- Run `flake8 src/ tests/` to check linting |
| 49 | +- Run `pytest` to ensure tests pass |
| 50 | +- Keep commits focused on a single logical change |
| 51 | + |
| 52 | +## Project Structure |
| 53 | + |
| 54 | +- `src/nakimi/` - Core library code |
| 55 | +- `tests/` - Test suite |
| 56 | +- `docs/` - Documentation |
| 57 | +- `.github/workflows/` - CI/CD configuration |
0 commit comments