First off, thank you for considering contributing to Code Context Recorder! 🎉
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples
- Describe the behavior you observed and what you expected
- Include screenshots if relevant
- Include your environment details (OS, VS Code version, etc.)
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behavior and expected behavior
- Explain why this enhancement would be useful
- Fill in the required template
- Follow the TypeScript styleguide
- Include appropriate test coverage
- Update documentation as needed
- End all files with a newline
- Node.js 18+
- npm 9+
- VS Code (for extension development)
# Clone the repository
git clone https://github.com/yourusername/code-context-recorder.git
cd code-context-recorder
# Install dependencies
npm install
# Build all packages
npm run build
# Run tests
npm testcode-context-recorder/
├── packages/
│ ├── core/ # Core library
│ ├── vscode-extension/ # VS Code extension
│ ├── browser-extension/ # Browser extension
│ ├── cli/ # CLI tool
│ ├── git-hooks/ # Git hooks
│ └── web-viewer/ # Web UI
cd packages/core
npm run dev # Watch mode
npm test # Run testscd packages/vscode-extension
npm run dev # Watch mode
# Press F5 in VS Code to launch Extension Development Hostcd packages/cli
npm run dev
# Test CLI
npm link
ccr --help- Use TypeScript strict mode
- Prefer interfaces over types for object shapes
- Use meaningful variable names
- Add JSDoc comments for public APIs
- Use async/await over promises
/**
* Add context to a file
* @param content - The context content
* @param filePath - Path to the file
* @param options - Additional options
* @returns The context ID
*/
async addContext(
content: string,
filePath: string,
options?: AddContextOptions
): Promise<string> {
// Implementation
}- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters
- Reference issues and pull requests liberally after the first line
<type>(<scope>): <subject>
<body>
<footer>
Types:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Code style changes (formatting, etc.)
- refactor: Code refactoring
- test: Adding or updating tests
- chore: Maintenance tasks
Examples:
feat(core): add voice note support
Implement voice recording and transcription functionality
for capturing verbal context explanations.
Closes #123
- Write tests for all new features
- Ensure all tests pass before submitting PR
- Maintain test coverage above 80%
# Run all tests
npm test
# Run tests for specific package
cd packages/core
npm test
# Run tests in watch mode
npm test -- --watch- Update README.md if you change functionality
- Add JSDoc comments to all public APIs
- Update CHANGELOG.md with your changes
- Create/update examples if needed
- Update version in all package.json files
- Update CHANGELOG.md
- Create git tag
- Push to GitHub
- GitHub Actions will handle publishing
- Open an issue with the
questionlabel - Join our Discord community
- Email us at [email protected]
Contributors will be recognized in:
- README.md Contributors section
- Release notes
- Project website
Thank you for contributing! 🚀