# Contributing to OpenClaw Command Center > _"Join the Swarm. Evolve together."_ First off, thank you for considering contributing to OpenClaw Command Center! This project thrives on community involvement. ## ๐Ÿ“‹ Table of Contents - [Code of Conduct](#code-of-conduct) - [Getting Started](#getting-started) - [Development Setup](#development-setup) - [Making Contributions](#making-contributions) - [Pull Request Process](#pull-request-process) - [Style Guidelines](#style-guidelines) - [Publishing to ClawHub](#publishing-to-clawhub) - [For AI Contributors](#for-ai-contributors) ## ๐Ÿ“œ Code of Conduct This project adheres to our [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you're expected to uphold this code. Please report unacceptable behavior to the maintainers. ## ๐Ÿš€ Getting Started ### Prerequisites - Node.js v20 or higher - npm v10 or higher - Git ### Development Setup 1. **Fork the repository** Click the "Fork" button on GitHub to create your own copy. 2. **Clone your fork** ```bash git clone https://github.com/YOUR_USERNAME/openclaw-command-center.git cd openclaw-command-center ``` 3. **Add upstream remote** ```bash git remote add upstream https://github.com/jontsai/openclaw-command-center.git ``` 4. **Install dependencies** ```bash npm install ``` 5. **Create configuration** ```bash cp config/dashboard.example.json config/dashboard.json ``` 6. **Install pre-commit hooks** ```bash make install-hooks ``` This enforces project rules automatically on each commit. 7. **Start development server** ```bash npm run dev ``` ## ๐Ÿ› ๏ธ Making Contributions ### Types of Contributions We welcome: - ๐Ÿ› Bug fixes - โœจ New features - ๐Ÿ“š Documentation improvements - ๐Ÿงช Test coverage - ๐ŸŽจ UI/UX enhancements - ๐Ÿ”ง Performance optimizations ### Before You Start 1. **Check existing issues** โ€” Someone might already be working on it 2. **Open an issue first** โ€” For major changes, discuss before implementing 3. **Keep scope focused** โ€” One feature/fix per PR ### Branch Naming Use descriptive branch names: ``` feat/add-session-filtering fix/overlord-connection-timeout docs/update-api-reference refactor/simplify-creep-cache ``` ## ๐Ÿ“ค Pull Request Process ### 1. Create Your Branch ```bash git checkout main git pull upstream main git checkout -b feat/your-feature-name ``` ### 2. Make Your Changes - Write clean, documented code - Add tests for new functionality - Update documentation if needed - Follow the [style guidelines](#style-guidelines) ### 3. Test Your Changes ```bash npm test npm run lint ``` ### 4. Commit Your Changes Follow [Conventional Commits](https://www.conventionalcommits.org/): ```bash git commit -m "feat: add overlord heartbeat indicator" git commit -m "fix: resolve session timeout on reconnect" git commit -m "docs: clarify API authentication flow" ``` ### 5. Push and Create PR ```bash git push origin feat/your-feature-name ``` Then open a Pull Request on GitHub. ### 6. PR Review - Maintainers will review your PR - Address any requested changes - Once approved, a maintainer will merge ### PR Checklist Before submitting, ensure: - [ ] Code follows project style guidelines - [ ] Tests pass locally (`npm test`) - [ ] Lint passes (`npm run lint`) - [ ] Documentation updated if needed - [ ] Commit messages follow convention - [ ] PR description explains the change ## ๐ŸŽจ Style Guidelines ### Code Style - Use ESLint configuration provided - Use Prettier for formatting - Prefer `const` over `let`, avoid `var` - Use meaningful variable names - Add JSDoc comments for public functions ### Thematic Naming Embrace the Starcraft theme when naming: ```javascript // Good const overlordStatus = await checkEssence(); const creepCache = new CreepLayer(); // Less thematic const monitorStatus = await healthCheck(); const cacheLayer = new CacheService(); ``` ### Documentation - Use clear, concise language - Include code examples where helpful - Keep README and docs in sync with code - Add inline comments for complex logic ## ๐Ÿ“ฆ Publishing to ClawHub This skill is distributed via [ClawHub](https://clawhub.ai). After changes are merged to `main`, maintainers publish updates to the registry. ### Prerequisites ```bash # Install clawhub CLI (if not already installed) # See https://clawhub.ai for installation instructions # Authenticate clawhub login clawhub whoami # verify ``` ### Publishing a New Version 1. **Bump the version** in `package.json` 2. **Tag the release** (see [Git Tags for Releases](#git-tags-for-releases)) 3. **Publish:** ```bash clawhub publish . --registry https://www.clawhub.ai \ --slug command-center --version \ --changelog "Description of changes" ``` > **Note:** The `--registry` flag is required until the upstream `.well-known` redirect is fixed. > You can also set `export CLAWHUB_REGISTRY=https://www.clawhub.ai` to avoid passing it each time. ### Git Tags for Releases Tag each release so the [release workflow](.github/workflows/release.yml) can generate GitHub Releases automatically: ```bash # Tag the current commit git tag -a v -m "v โ€” short description" # Push tags git push origin --tags ``` ### Version Bumping Follow [semver](https://semver.org/): | Change type | Bump | Example | | ----------------------------- | ------- | --------------- | | Bug fixes, minor tweaks | `patch` | `0.1.0 โ†’ 0.1.1` | | New features, backward compat | `minor` | `0.1.0 โ†’ 0.2.0` | | Breaking changes | `major` | `0.1.0 โ†’ 1.0.0` | โš ๏ธ **Important:** When bumping version, update **both** files: - `package.json` โ€” `"version": "X.Y.Z"` - `SKILL.md` โ€” `version: X.Y.Z` (in frontmatter) The pre-commit hook will block commits if these versions don't match. ### Verifying a Publish ```bash # Check the published version clawhub inspect command-center # Install into a workspace to test clawhub install command-center ``` ## ๐Ÿค– For AI Contributors AI agents are welcome contributors! If you're an AI working on this project: 1. **Read the context files first** - [AGENTS.md](./AGENTS.md) โ€” Your workspace guide - [SKILL.md](./SKILL.md) โ€” ClawHub skill metadata 2. **Follow the same PR process** as human contributors 3. **Document your changes thoroughly** โ€” Future AI (and humans) will thank you 4. **When in doubt, ask** โ€” Open an issue to discuss before major changes ## ๐Ÿ’ฌ Getting Help - **Questions?** Open a GitHub Discussion - **Found a bug?** Open an Issue - **Security concern?** Email maintainers directly (don't open public issue) ## ๐Ÿ™ Recognition Contributors will be recognized in: - GitHub Contributors list - Release notes for significant contributions - Our eternal gratitude ๐Ÿ› --- _"The Swarm welcomes all who serve the greater purpose."_