Getting Started
- Fork the repository on GitHub
- Clone your fork locally
- Follow the Developer Setup guide
- Create a feature branch
Development Workflow
1. Make Your Changes
- Write your code following our code style
- Add tests for new functionality
- Update documentation if needed
2. Run Quality Checks
Before committing, ensure all checks pass:3. Commit Your Changes
We follow Conventional Commits:Commit Types
4. Push and Create PR
Code Style
TypeScript
- Use TypeScript strict mode
- Prefer
interfaceovertypefor object shapes - Use
constby default,letwhen reassignment is needed - No
anytypes - useunknownand type guards
Naming Conventions
File Organization
Pull Request Guidelines
PR Title
Use the same format as commits:PR Description
Use the PR template provided. Include:- Summary - What does this PR do?
- Changes - Bullet points of specific changes
- Testing - How was this tested?
- Screenshots - If UI changes
Review Process
- At least one approval required
- All CI checks must pass
- No merge conflicts
- Squash merge to main
Architecture Guidelines
Non-Negotiable Rules
- Bot apps MUST use SDK - Never call raw REST from adapters
- LLM calls only in API - Platform adapters never call LLMs directly
- DB access only in API - No direct database access from bots or web
- No secrets in DB - Platform tokens in Cloudflare KV only
- Human confirmation required - LLM creates drafts, user confirms
Adding a New Feature
1
Design
Write a brief design doc if the feature affects multiple packages.
2
Schema Changes
If adding new data, update
packages/db/src/schema/. Run pnpm db:generate to create
migrations.3
Shared Types
Add Zod schemas to
packages/shared/src/schemas.ts. Export enums from
packages/shared/src/enums.ts.4
API Endpoints
Add controller and service in
apps/api/src/modules/. Include Swagger documentation.5
SDK Methods
Add typed methods to
packages/sdk/src/client.ts.6
Tests
Write unit tests for business logic. Write integration tests for API endpoints.
Adding a New Package
- Create the package directory in
/packages - Add
package.jsonwith proper naming (@hitler/package-name) - Add to
pnpm-workspace.yamlif not auto-detected - Export from
src/index.ts - Add
tsconfig.jsonextending../../tsconfig.base.json
Testing Requirements
New Features
- Unit tests for all business logic
- Integration tests for API endpoints
- Update existing tests if behavior changes
Bug Fixes
- Add a test that reproduces the bug
- The test should fail before the fix and pass after
Minimum Coverage
- New code should have 80%+ coverage
- Don’t decrease overall coverage
Documentation
Code Documentation
- Add JSDoc comments to public functions
- Include
@paramand@returnstags - Add
@examplefor complex functions
API Documentation
- Add Swagger decorators to all endpoints
- Include request/response examples
- Document error responses
User Documentation
- Update
/docsif the feature is user-facing - Add to guides if it changes workflow
- Update API reference for new endpoints
Getting Help
GitHub Issues
Open an issue for bugs or feature requests
Discussions
Use GitHub Discussions for questions
Code of Conduct
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Assume good intentions