2.0 KiB
2.0 KiB
Contribution Guide
1. Coding Standards
- Use TypeScript with
strictmode enabled. - Follow the import order: core, library, project, then relative.
- Naming: PascalCase for components, camelCase for functions/variables, UPPER_SNAKE_CASE for constants.
- Add JSDoc comments for all public APIs.
- Keep line length <= 120 characters, use Prettier for formatting.
- Lint with
pnpm lintand fix warnings.
2. Branch Workflow
- Create a feature branch:
git checkout -b feat/<short-description> - Keep branches up to date with
mainviagit rebaseorgit merge --ff-only. - Submit a Pull Request with a clear title and description.
- Ensure PR passes CI (tests, lint, type-check).
- Address review comments promptly.
3. Running Tests
- Install dependencies:
pnpm install. - Run tests in watch mode:
pnpm test --watch. - Run tests with coverage:
pnpm test --coverage. - Run lint:
pnpm lint. - Run type-check:
pnpm typecheck.
4. Making Your First Contribution
- Pick a beginner-friendly issue labeled
good first issue. - Follow the steps in the Quickstart guide.
- Make a small change (e.g., fix typo, add JSDoc).
- Run the relevant tests.
- Commit and push, then open a PR.
5. Where to Extend (AI Agent Guidance)
- Canvas rendering: Extend
src/app/canvas/CanvasPage.tsxby adding new node types or customizing the context menu. - Recollection management: Modify
src/app/recollections/RecollectionsPage.tsxto add new views or actions. - State management: Update
src/app/canvas/canvasStore.tsfor new graph features. - Performance: Optimize expensive renders in
src/app/recollections/RecollectionsPage.tsxusing memoization.
6. Useful Links
- ARCHITECTURE.md – High-level architecture overview.
- PERFORMANCE_IMPROVEMENTS.md – Performance improvement plan.
- QUICKSTART_FOR_JUNIORS.md – Junior developer quickstart.
- CODE_REVIEW_CHECKLIST.md – Checklist for reviewers.
Thank you for contributing!