Thanks for your interest in contributing. This guide covers the process and conventions.
See the Development section in the README for setup, running, and testing instructions.
- Check existing issues and PRs to avoid duplicating work.
- For non-trivial changes, open an issue first to discuss the approach.
- Bug fixes and small improvements can go straight to a PR.
- Fork the repo and clone your fork.
- Create a feature branch from
main. - Make your changes.
- Run all checks:
bun run tsc -b # Type check cd src/client && bun run lint # Lint bun run test # Server/shared tests cd src/client && bun run test # Client tests (Vitest)
- Commit with a conventional commit message (see below).
- Open a PR against
main.
- TypeScript strict mode — no
anyunless absolutely necessary. - Path aliases — use
@server/,@client/,@shared/imports, not relative paths across boundaries. - State management — React Context API only. No Redux, Zustand, or other state libraries.
- Styling — Tailwind CSS, single dark theme (
#0d1117background,#58a6ffaccent). No light theme, no theming system. - Test file naming:
- Server/shared:
*.test.ts - Client unit tests:
*.vitest.ts/*.vitest.tsx - E2E tests:
*.pw.ts
- Server/shared:
- Commit messages — use conventional commits:
feat:,fix:,refactor:,docs:,test:,ci:,chore:.
- One concern per PR — don't mix a bug fix with a refactor.
- CI must pass (type check, lint, tests, build).
- Add tests for new functionality.
- If your change affects the API contract, update types in
src/shared/types/. - Keep PRs focused and reviewable — large PRs take longer to review and are more likely to need rework.
When filing a bug report, include:
- Expected vs actual behavior
- Steps to reproduce
- ocwatch version (
bunx ocwatch --helpor checkpackage.json) - macOS version
- Screenshots for UI issues
The following are intentionally excluded from this project. PRs for these will be closed:
- Token/cost estimation
- Filtering or search UI
- Historical analytics or metrics
- Data export (CSV, JSON)
- Remote monitoring
- Theming or visual customization
- Config persistence (beyond URL params)
- Modifying or controlling OpenCode files/agents
- Windows or Linux support
- WebSocket (use HTTP polling + SSE)
- Server-side rendering
See AGENTS.md for the full rationale behind these constraints.