Thank you for contributing! This guide covers everything you need to know before opening a PR.
- Branch naming:
feature/<description>orfix/<description> - All feature/fix branches merge to
dev(notmain) - PR title: English
- PR body: English description + zh-TW summary appended at the bottom
- No AI attribution in commits or PRs (no
Co-Authored-By: Claude, no "generated by Claude")
All commit messages must follow Conventional Commits (Angular variant).
Format:
<type>(<scope>): <short description>
Types:
| Type | When to use |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation only changes |
refactor |
Code change that neither fixes a bug nor adds a feature |
test |
Adding or correcting tests |
chore |
Maintenance tasks (deps, config, tooling) |
build |
Changes to build system or external dependencies |
ci |
Changes to CI configuration |
perf |
Performance improvements |
style |
Formatting changes only (no logic change) |
Examples:
feat(team): add player invitation flow
fix(game): correct set score calculation on substitution
docs(contributing): add branch naming convention
refactor(ui): extract ItemFooter into standalone component
test(usecases): add coverage for CreateRecord edge cases
chore(deps): upgrade mongoose to v8
perf(game): reduce rally list re-renders with memoization
style(components): apply prettier formatting to team directory
This project follows the Airbnb JavaScript Style Guide enforced via ESLint and Prettier.
Before submitting:
pnpm lint # must pass with zero warnings
pnpm typecheck # must pass with zero errorsKey conventions:
- File naming:
kebab-casefor components,.usecase.tsfor use cases,.mongo.tsfor repository implementations - Variables/functions:
camelCase; booleans:is/has/canprefix; event handlers:handleprefix; constants:UPPER_SNAKE_CASE - Path aliases:
@/*for absolute imports fromsrc/
Consult docs/testing-strategy.md before writing tests. It covers:
- Which testing school (Classical vs London) applies per Clean Architecture layer
- What to mock vs. keep real at each layer
- Frontend testing split: Jest for behavioral tests, Storybook + Chromatic for visual regression
- Story coverage requirements per component layer
Run the full suite before opening a PR:
pnpm testThis project uses Changesets for version management. When submitting a PR that includes a user-visible change or version bump, run:
pnpm changesetSelect the bump type (patch/minor/major), then write the changeset body in Keep-a-Changelog format. The body becomes the CHANGELOG.md entry directly — write it for humans, not machines.
Format:
### Changed
#### Infrastructure
- Migrate package manager from npm to pnpmUse only these ### headings: Added, Changed, Deprecated, Removed, Fixed, Security. Add #### domain sub-headings (e.g. Team, Game, CI, Infrastructure) when entries span multiple areas.
Omit internal refactors, test additions, linting fixes, and dep upgrades with no user-visible effect. Always include toolchain changes that affect contributor setup.
Commit the generated .changeset/*.md file along with your changes. PRs that omit a changeset when required will not trigger an automated version PR.
Agent users: the
writing-changelogskill is available in this project to guide changeset authoring.
Consult docs/maintenance-policy.md when upgrading dependencies. It covers:
- Major version bump workflow (dedicated branch, migration guide, full suite verification)
- Mock drift: verifying mock surfaces after upgrading mocked dependencies