Contribution Reviews
This directory contains contribution review documents that capture real observations about OpenClaw's code conventions, architectural patterns, and development practices. These reviews are based on source code analysis and serve as practical notes for future contributors.
Purpose
These documents answer the question: "What have we learned about contributing to OpenClaw?" They provide actionable guidance on:
- Code style conventions and linting rules
- Testing patterns and coverage expectations
- PR and commit formatting requirements
- Pre-commit hooks and quality gates
Review Entries
Code Style Conventions
Observations about OpenClaw's code formatting, linting, and TypeScript configuration.
Key topics:
- Oxlint and Oxfmt configuration (NOT ESLint/Prettier)
- TypeScript strict mode settings
- Type definition preferences (
typevsinterface) - Critical rules from CONTRIBUTING.md
- Error handling patterns
- Barrel export conventions
Why this matters: Following these conventions ensures your code passes CI checks and maintains consistency with the existing codebase.
Testing Patterns
Observations about OpenClaw's testing framework, file organization, and test execution patterns.
Key topics:
- Vitest configuration with V8 coverage
- Test file patterns (colocated, e2e, live)
- Coverage thresholds (70% lines, 55% branches)
- Test structure and mocking patterns
- Test harnesses and helpers
- Running tests in low-memory environments
Why this matters: Understanding these patterns helps you write tests that integrate seamlessly with the existing test suite and CI pipeline.
PR and Commit Conventions
Observations about OpenClaw's git workflow, PR templates, and pre-commit hooks.
Key topics:
- Conventional Commits format with scopes
- PR template requirements (summary, security impact, verification)
- Pre-commit hooks (secret detection, linting, formatting)
- Human verification requirements
- Changelog conventions
Why this matters: These conventions ensure your PRs are reviewable, secure, and properly documented for future reference.
Cross-References
Related Architecture Documentation
- Architecture Overview: System design and component interactions
- Gateway Architecture: Multi-tenant request handling
- Skills System (planned): Skill execution and lifecycle
Related Pattern Documentation
- Patterns Overview: Recurring design patterns
- Configuration Patterns: Config loading and validation
- Error Handling Patterns (planned): Error formatting and redaction
Related Troubleshooting
- Troubleshooting Overview: Common issues and solutions
- Build Failures (planned): CI/CD and dependency issues
- Test Failures (planned): Test isolation and timeout problems
How to Use These Documents
- Starting a new feature: Read Code Style Conventions and Testing Patterns first
- Before opening a PR: Review PR and Commit Conventions to ensure compliance
- CI failures: Check cross-referenced troubleshooting docs for common solutions
- Architecture questions: Refer to architecture docs for system design context
Document Structure
Each review follows this structure:
- YAML frontmatter: Version metadata and confidence level
- Language toggle: Links to English/Chinese versions
- Introduction: What this review covers
- Key observations: Practical, actionable findings
- Code examples: Real patterns from the codebase (when applicable)
- Why this matters: Context for contributors
Maintenance Notes
These documents are based on analysis of:
- Source code in
src/ - Configuration files (
.oxlintrc.json,vitest.config.ts, etc.) - Development documentation (
CONTRIBUTING.md,CLAUDE.md) - Git history and PR templates
Last verified against commit aceb17a (2026-02-24).