Thank you for your interest in contributing to Understand Anything! This document provides guidelines and instructions for contributing to the project.
- Bug Reports: Found a bug? Open an issue with detailed reproduction steps
- Feature Requests: Have an idea? Share it in the issues section
- Documentation: Improve or translate documentation
- Code: Fix bugs, add features, or improve performance
- Testing: Write tests to improve code coverage
- Node.js >= 22 (developed on v24)
- pnpm >= 10 (pinned via
packageManagerfield in rootpackage.json) - Git for version control
-
Fork and Clone
git clone https://github.com/YOUR_USERNAME/Understand-Anything.git cd Understand-Anything -
Install Dependencies
pnpm install
-
Build Core Package
pnpm --filter @understand-anything/core build
-
Run Tests
pnpm --filter @understand-anything/core test pnpm --filter @understand-anything/skill test
-
Start Dashboard (Optional)
pnpm dev:dashboard
Create a descriptive branch name:
git checkout -b feat/my-feature # For new features
git checkout -b fix/bug-description # For bug fixes
git checkout -b docs/update-readme # For documentation- Write clean, readable code
- Follow existing code style and conventions
- Add tests for new functionality
- Update documentation as needed
# Run all tests
pnpm --filter @understand-anything/core test
pnpm --filter @understand-anything/skill test
# Run linter
pnpm lint
# Build packages
pnpm buildWrite clear, descriptive commit messages:
git add .
git commit -m "feat: add keyboard shortcuts to dashboard"Commit Message Convention:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
git push origin your-branch-nameThen open a Pull Request on GitHub with:
- Clear title describing the change
- Detailed description of what changed and why
- Link to related issues (if any)
- Screenshots (for UI changes)
- Use Vitest for testing
- Place tests in
__tests__directories or*.test.tsfiles - Aim for high test coverage for new features
- Test edge cases and error conditions
Example test structure:
import { describe, it, expect } from 'vitest';
describe('MyFeature', () => {
it('should do something', () => {
// Arrange
const input = 'test';
// Act
const result = myFunction(input);
// Assert
expect(result).toBe('expected');
});
});# Run all tests
pnpm test
# Run tests for specific package
pnpm --filter @understand-anything/core test
# Run tests in watch mode
pnpm --filter @understand-anything/core test --watch- Use TypeScript strict mode
- Define explicit types for function parameters and return values
- Avoid
anytype - useunknownif type is truly unknown - Use interfaces for object shapes
- Use type aliases for unions and complex types
- The project uses ESLint for code quality
- Consistent indentation (2 spaces)
- Use meaningful variable and function names
- Keep functions small and focused
- Use functional components with hooks
- Keep components focused and single-purpose
- Use Zustand for state management
- Follow the existing component structure
TypeScript, pnpm workspaces, React 18, Vite, TailwindCSS v4, React Flow, Zustand, web-tree-sitter, Fuse.js, Zod, Dagre
understand-anything-plugin/
├── packages/
│ ├── core/ # Core analysis engine
│ │ ├── src/
│ │ └── package.json
│ └── dashboard/ # React dashboard
│ ├── src/
│ │ ├── components/
│ │ ├── utils/
│ │ └── store.ts
│ └── package.json
├── src/ # Plugin skills implementation
├── agents/ # AI agent prompts
└── skills/ # Skill definitions
- Create
README.{language-code}.md(e.g.,README.fr-FR.md) - Translate all sections while maintaining formatting
- Update main
README.mdto include language link - Keep technical terms in English where appropriate
- Ensure all links still work
Example:
<a href="README.md">English</a> | <a href="README.fr-FR.md">Français</a>When reporting bugs, include:
- Description: Clear description of the issue
- Steps to Reproduce: Detailed steps to reproduce the bug
- Expected Behavior: What you expected to happen
- Actual Behavior: What actually happened
- Environment: OS, Node version, pnpm version
- Screenshots: If applicable
- Error Messages: Full error output
When requesting features:
- Use Case: Describe the problem you're trying to solve
- Proposed Solution: How you envision the feature working
- Alternatives: Other solutions you've considered
- Additional Context: Any other relevant information
Before submitting a PR, ensure:
- Code follows the project's style guidelines
- All tests pass (
pnpm test) - New code has test coverage
- Documentation is updated (if needed)
- Commit messages follow convention
- PR description clearly explains changes
- No console.log or debug code left behind
- Branch is up to date with main
- Automated Checks: CI runs tests and linting
- Maintainer Review: Project maintainers review the code
- Feedback: Address any requested changes
- Approval: Once approved, PR will be merged
- Cleanup: Delete your branch after merge
- Issues: For bugs and feature requests
- Discussions: For questions and general discussion
- Documentation: Check existing docs first
By contributing, you agree that your contributions will be licensed under the MIT License.
Contributors will be recognized in:
- GitHub contributors list
- Release notes (for significant contributions)
- Special mentions for exceptional contributions
Thank you for contributing to Understand Anything! Your contributions help make code understanding accessible to everyone. 🚀