|
| 1 | +# Contributing to Pocket Claude |
| 2 | + |
| 3 | +Thanks for your interest! Here's how to get started. |
| 4 | + |
| 5 | +## Development Setup |
| 6 | + |
| 7 | +```bash |
| 8 | +git clone https://github.com/GrapeInTheTree/pocket-claude.git |
| 9 | +cd pocket-claude |
| 10 | +cp .env.example .env # fill in your Telegram token and chat ID |
| 11 | +go mod download |
| 12 | +``` |
| 13 | + |
| 14 | +## Workflow |
| 15 | + |
| 16 | +1. Fork the repo |
| 17 | +2. Create a branch (`git checkout -b feature/my-feature`) |
| 18 | +3. Make changes |
| 19 | +4. Run checks: `make ci` (fmt + vet + build + test with race detector) |
| 20 | +5. Commit with a clear message |
| 21 | +6. Open a pull request |
| 22 | + |
| 23 | +## Code Style |
| 24 | + |
| 25 | +- Follow standard Go conventions (`gofmt`, `go vet`) |
| 26 | +- Keep functions short and focused |
| 27 | +- Add tests for new functionality |
| 28 | +- Use `any` instead of `interface{}` |
| 29 | + |
| 30 | +## Project Structure |
| 31 | + |
| 32 | +``` |
| 33 | +cmd/pocket-claude/ Entry point |
| 34 | +internal/ |
| 35 | + bot/ Telegram listener, commands |
| 36 | + claude/ CLI execution, session tracking |
| 37 | + config/ Environment config, logger |
| 38 | + project/ Multi-project management |
| 39 | + store/ JSON persistence |
| 40 | + worker/ Message queue, background pool, ralph loop |
| 41 | +``` |
| 42 | + |
| 43 | +## Running Tests |
| 44 | + |
| 45 | +```bash |
| 46 | +make test # all tests |
| 47 | +make test-race # with race detector |
| 48 | +make ci # full pipeline (fmt + vet + build + test) |
| 49 | +``` |
| 50 | + |
| 51 | +## Reporting Issues |
| 52 | + |
| 53 | +- Bug reports: include logs (`bot.log`) with sensitive data redacted |
| 54 | +- Feature requests: describe the use case, not just the solution |
| 55 | + |
| 56 | +## License |
| 57 | + |
| 58 | +By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments