|
| 1 | +# Contributing to Buggregator Trap |
| 2 | + |
| 3 | +## How to Contribute |
| 4 | + |
| 5 | +1. Fork the repository |
| 6 | +2. Create a branch: `git checkout -b feat/my-feature` |
| 7 | +3. Make changes and write tests |
| 8 | +4. Commit using [Conventional Commits](https://www.conventionalcommits.org/) |
| 9 | +5. Submit a pull request |
| 10 | + |
| 11 | +## Code Structure |
| 12 | + |
| 13 | +**Client Code** (`src/Client/`): Public API that follows semantic versioning. Changes here affect how developers use the library. |
| 14 | + |
| 15 | +**Server Code** (everything else): Internal code marked with `@internal`. Not subject to semver - breaking changes are allowed. |
| 16 | + |
| 17 | +## Versioning |
| 18 | + |
| 19 | +We use semantic versioning for the **Client API only**: |
| 20 | + |
| 21 | +- **Minor version** for: |
| 22 | + - New Client API features |
| 23 | + - New CLI flags |
| 24 | + - New protocol support |
| 25 | + - New interface features |
| 26 | + - New mechanics |
| 27 | + |
| 28 | +- **Patch version** for: |
| 29 | + - Bug fixes |
| 30 | + - Internal improvements |
| 31 | + - Documentation updates |
| 32 | + |
| 33 | +Breaking changes to server code (`@internal`) don't need major version bumps. |
| 34 | + |
| 35 | +## Code Style |
| 36 | + |
| 37 | +We use extended PER 2.0 code style. You can run `composer cs:fix` to fix code style automatically. Don't worry about following the style perfectly - our GitHub CI will fix it automatically. |
| 38 | + |
| 39 | +## Commit Guidelines |
| 40 | + |
| 41 | +**Important:** Choose commit prefixes carefully! We use automatic releases that look at commit prefixes to decide the next version number. |
| 42 | + |
| 43 | +Use [Conventional Commits](https://www.conventionalcommits.org/) format: |
| 44 | + |
| 45 | +| Type | Purpose | |
| 46 | +|-------------------|-----------------------------------| |
| 47 | +| `feat` | New feature | |
| 48 | +| `fix` | Bug fix | |
| 49 | +| `perf` | Performance improvement | |
| 50 | +| `docs` | Documentation | |
| 51 | +| `style` | Code formatting | |
| 52 | +| `deps` | Dependencies | |
| 53 | +| `refactor` | Code refactoring | |
| 54 | +| `ci` | CI changes | |
| 55 | +| `test` or `tests` | Tests | |
| 56 | +| `revert` | Revert commit | |
| 57 | +| `build` | Build system | |
| 58 | +| `chore` | Other changes | |
| 59 | +| `security` | Security improvements | |
| 60 | + |
| 61 | +**Examples:** |
| 62 | + |
| 63 | +```markdown |
| 64 | +feat(client): add depth() method to TrapHandle |
| 65 | +fix(server): resolve memory leak in parser |
| 66 | +perf(client): optimize dumper performance |
| 67 | +docs: update installation instructions |
| 68 | +``` |
0 commit comments