Contributing Guidelines - robwhite4/claude-memory GitHub Wiki
Thank you for your interest in contributing to Claude Memory! This guide will help you get started.
By participating in this project, you agree to abide by our Code of Conduct. Please treat everyone with respect and create a welcoming environment for all contributors.
Found a bug? Help us fix it!
- Check existing issues first to avoid duplicates
- Use the bug report template when creating an issue
-
Include details:
- Claude Memory version (
cmem --version
) - Node.js version (
node --version
) - Operating system
- Steps to reproduce
- Expected vs actual behavior
- Error messages/stack traces
- Claude Memory version (
Have an idea for improvement?
- Check the roadmap in Roadmap and existing issues
- Use the feature request template
- Explain the use case - why is this needed?
- Provide examples of how it would work
- Consider implementation complexity
Documentation improvements are always welcome!
- Fix typos or clarify confusing sections
- Add examples or use cases
- Improve installation instructions
- Create tutorials or guides
- Update wiki pages
Ready to code? Here's how:
# Fork on GitHub, then:
git clone https://github.com/YOUR-USERNAME/claude-memory.git
cd claude-memory
npm install
# For features
git checkout -b feature/your-feature-name
# For fixes
git checkout -b fix/issue-123-description
# Make changes
edit files...
# Run tests frequently
npm test
# Check code style
npm run lint
# Test your changes locally
npm link
cmem --version # Test your local version
Write clear commit messages:
# Good examples:
git commit -m "feat: add --verbose flag to task list command"
git commit -m "fix: handle empty task descriptions properly"
git commit -m "docs: clarify multi-machine setup instructions"
git commit -m "test: add coverage for pattern resolution"
# Format: <type>: <description>
# Types: feat, fix, docs, test, refactor, perf, style, chore
Before submitting:
- All tests pass:
npm test
- No lint errors:
npm run lint
- Coverage maintained:
npm run test:coverage
- New features have tests
- Edge cases considered
-
Update your fork
git remote add upstream https://github.com/robwhite4/claude-memory.git git fetch upstream git rebase upstream/main
-
Push your branch
git push origin feature/your-feature-name
-
Create PR
- Use the PR template
- Link related issues
- Describe changes clearly
- Include screenshots if UI changes
-
Review Process
- CI must pass
- Code review required
- Address feedback
- Maintainer will merge
// Use 2 spaces indentation
function example() {
const result = await someOperation();
return result;
}
// Async/await over promises
// Good
async function getData() {
const data = await fetchData();
return process(data);
}
// Avoid
function getData() {
return fetchData().then(data => process(data));
}
// Clear variable names
const taskList = []; // Good
const tl = []; // Avoid
- Keep functions small and focused
- One responsibility per function
- Descriptive function/variable names
- Add JSDoc comments for public APIs
- Group related functionality
// Always handle errors appropriately
try {
await riskyOperation();
} catch (error) {
if (error.code === 'ENOENT') {
throw new MemoryError('File not found', 'FILE_NOT_FOUND');
}
throw error;
}
This project uses Claude Memory itself for development context.
-
Don't modify
.claude/
orCLAUDE.md
in PRs - Document decisions in PR descriptions
- Report patterns via issues, not memory commands
After merging PRs:
# Record important decisions
cmem decision "Implemented feature X" "Reasoning from PR #123" "alternatives"
# Add discovered patterns
cmem pattern "Common issue pattern" "How to handle it" 0.9 high
# Update knowledge base
cmem knowledge add "new_feature_design" "Design details" --category architecture
If you encounter conflicts in .claude/context/
:
# Accept incoming changes
git checkout --theirs .claude/context/
# Re-add your updates
cmem knowledge add "your_update" "value"
- New features
- Bug fixes
- Edge cases
- Error conditions
describe('Feature Name', () => {
test('should perform expected behavior', () => {
// Arrange
const input = 'test';
// Act
const result = functionUnderTest(input);
// Assert
expect(result).toBe('expected');
});
});
See Testing-Guidelines for detailed testing information.
- New features added
- Behavior changes
- Bug fixes that affect usage
- New examples needed
- README.md for major changes
- Wiki pages for detailed guides
- JSDoc comments for API changes
- CHANGELOG.md for all changes
Before submitting PR:
- Tests pass
- Lint passes
- Coverage maintained
- Documentation updated
- Commit messages clear
- PR template completed
- Issues linked
- 💬 Open an issue for questions
- 📚 Check existing documentation
- 🔍 Search closed issues
- 👥 Ask in discussions
Contributors are recognized in:
- Release notes
- Contributors list
- Individual commit credits
Thank you for contributing to Claude Memory! 🎉
See also:
- Development-Workflow - Development process
- Testing-Guidelines - Testing requirements
- Release-Process - How releases work
- Architecture - System design