Skip to content

Comments

docs: create comprehensive CONTRIBUTING.md guide (#5)#12

Open
addidea wants to merge 1 commit intoClawland-AI:mainfrom
addidea:docs/contributing-guide
Open

docs: create comprehensive CONTRIBUTING.md guide (#5)#12
addidea wants to merge 1 commit intoClawland-AI:mainfrom
addidea:docs/contributing-guide

Conversation

@addidea
Copy link

@addidea addidea commented Feb 16, 2026

Description

Complete development and contribution guide for PicoClaw with detailed setup instructions, code style guidelines, and PR process.

Closes #5

What's Included

Development Environment Setup

  • Prerequisites (Go 1.24+, Git, Make)
  • Installation steps with make deps
  • Dependency management
  • Verification commands

Building and Running

  • Quick start: make build
  • Run from source (no build)
  • Multi-platform builds (AMD64, ARM64, RISC-V, Darwin, Windows)
  • System-wide installation options

Testing Guide

  • Run all tests: make test
  • Package-specific tests
  • Coverage reports (go test -coverprofile)
  • Race detection (go test -race)
  • Benchmarks

Code Style Guide

  • Go conventions (gofmt, Effective Go)
  • Linting: make lint, make lint-fix
  • Project structure explanation
  • Naming conventions (packages, files, types, functions)
  • Error handling patterns
  • Testing best practices (table-driven, >80% coverage)

Pull Request Process (6-step guide)

  1. Fork and clone
  2. Create descriptive branch (feat/fix/docs/test)
  3. Make changes with tests
  4. Test locally (lint + test + build)
  5. Commit with Conventional Commits
  6. Push and open PR with checklist

Project Structure
Complete directory tree with explanations:

  • cmd/ - Main entry point
  • pkg/ - Public packages (agent, bus, channels, providers, tools)
  • skills/ - Agent skills
  • assets/ - Images, assets

Common Tasks
How-to guides for:

  • Add new channel
  • Add new tool
  • Add new skill
  • Update dependencies
  • Debug configuration

Community & Support

  • Bug reporting template
  • Discord, GitHub Discussions links
  • License information

Requirements Met

Requirement Status
Dev environment setup (Go 1.22+, tools) ✅ Go 1.24+
Build and run locally ✅ make build, go run
Run tests ✅ make test, coverage
Code style guide ✅ gofmt, conventions
PR submission process ✅ 6-step guide

Example: PR Checklist

- [ ] Code compiles without warnings
- [ ] All tests pass (`make test`)
- [ ] Linter passes (`make lint`)
- [ ] Documentation updated (if needed)
- [ ] Commit messages follow convention
- [ ] Branch is up to date with `main`

Example: Code Style

// ✅ Good error handling
if err != nil {
    return fmt.Errorf("failed to publish: %w", err)
}

// ✅ Table-driven tests
func TestMessageBus(t *testing.T) {
    tests := []struct {
        name string
        want int
    }{
        {"case 1", 1},
        {"case 2", 2},
    }
    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            // Test logic
        })
    }
}

Benefits

  • 📚 Comprehensive guide for new contributors
  • 🛠️ Step-by-step setup instructions
  • 🧪 Testing best practices
  • 📝 Code style standards
  • 🔄 Clear PR process
  • 🏗️ Project structure overview
  • 🔧 Common task guides

Production-ready contribution guide! 📚

Closes Clawland-AI#5

Complete development guide for PicoClaw contributors:

**Sections** (7 main sections):
1. Development Environment Setup
2. Building and Running Locally
3. Running Tests
4. Code Style Guide
5. Pull Request Process
6. Project Structure
7. Common Tasks

**Development Environment**:
- Prerequisites (Go 1.24+, Git, Make)
- Installation steps
- Dependency management
- Verification commands

**Build Instructions**:
- Quick start (`make build`)
- Run from source
- Multi-platform builds (AMD64, ARM64, RISC-V)
- System-wide installation

**Testing Guide**:
- Run all tests
- Package-specific tests
- Coverage reports
- Race detection
- Benchmarks

**Code Style**:
- Go conventions (gofmt, Effective Go)
- Linting (`make lint`)
- Project structure
- Naming conventions (packages, files, types)
- Error handling best practices
- Testing patterns (table-driven tests, >80% coverage)

**PR Process** (6 steps):
1. Fork and clone
2. Create feature branch (feat/fix/docs/test)
3. Make changes
4. Test locally
5. Commit (Conventional Commits)
6. Push and open PR with checklist

**Project Structure**:
- cmd/ - Main entry point
- pkg/ - Public packages (agent, bus, channels, providers, tools)
- skills/ - Agent skills
- Complete directory tree

**Common Tasks**:
- Add new channel
- Add new tool
- Add new skill
- Update dependencies
- Debug configuration

**Community**:
- Bug reporting guidelines
- Discord, GitHub Discussions
- License info

Production-ready contributor guide! 📚
@addidea addidea requested a review from Tonyfudecai as a code owner February 16, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: create CONTRIBUTING.md with development setup guide

1 participant