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 (type vs interface)
  • 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

  • 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

  1. Starting a new feature: Read Code Style Conventions and Testing Patterns first
  2. Before opening a PR: Review PR and Commit Conventions to ensure compliance
  3. CI failures: Check cross-referenced troubleshooting docs for common solutions
  4. Architecture questions: Refer to architecture docs for system design context

Document Structure

Each review follows this structure:

  1. YAML frontmatter: Version metadata and confidence level
  2. Language toggle: Links to English/Chinese versions
  3. Introduction: What this review covers
  4. Key observations: Practical, actionable findings
  5. Code examples: Real patterns from the codebase (when applicable)
  6. 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).