|
1 | 1 | # Contributing to Sofia |
2 | 2 |
|
3 | | -Thanks for your interest in contributing to Sofia! Whether it's a bug report, feature idea, documentation improvement, or code contribution — every bit helps. |
| 3 | +First off, thank you for considering contributing to Sofia! It's people like you that make Sofia such a great tool. |
4 | 4 |
|
5 | | -## Getting Started |
| 5 | +## 🚀 Quick Start |
6 | 6 |
|
7 | | -1. **Fork** the repository and clone your fork: |
8 | | - ```bash |
9 | | - git clone https://github.com/YOUR_USERNAME/sofia.git |
10 | | - cd sofia |
11 | | - ``` |
| 7 | +1. **Fork** the repository |
| 8 | +2. **Clone** your fork: `git clone https://github.com/YOUR_USERNAME/sofia.git` |
| 9 | +3. **Create a branch**: `git checkout -b my-feature` |
| 10 | +4. **Make changes** and commit: `git commit -m "Add my feature"` |
| 11 | +5. **Push**: `git push origin my-feature` |
| 12 | +6. **Open a Pull Request** |
12 | 13 |
|
13 | | -2. **Install dependencies and build:** |
14 | | - ```bash |
15 | | - make deps |
16 | | - make build |
17 | | - ``` |
| 14 | +## 🛠️ Development Setup |
18 | 15 |
|
19 | | -3. **Run Sofia locally:** |
20 | | - ```bash |
21 | | - ./build/sofia onboard # First time only |
22 | | - ./build/sofia gateway |
23 | | - ``` |
| 16 | +```bash |
| 17 | +git clone https://github.com/grasberg/sofia.git |
| 18 | +cd sofia |
| 19 | +make deps && make build |
| 20 | +make test |
| 21 | +``` |
24 | 22 |
|
25 | | -4. **Create a branch** for your change: |
26 | | - ```bash |
27 | | - git checkout -b my-feature |
28 | | - ``` |
| 23 | +**Prerequisites:** Go 1.26+ |
29 | 24 |
|
30 | | -## How to Contribute |
| 25 | +## 📝 Commit Conventions |
31 | 26 |
|
32 | | -### Reporting Bugs |
| 27 | +We follow [Conventional Commits](https://www.conventionalcommits.org/): |
33 | 28 |
|
34 | | -Open a [bug report](https://github.com/grasberg/sofia/issues/new?template=bug_report.md) with: |
35 | | -- What you expected to happen |
36 | | -- What actually happened |
37 | | -- Steps to reproduce |
38 | | -- Your Go version and OS |
| 29 | +- `feat:` New feature |
| 30 | +- `fix:` Bug fix |
| 31 | +- `docs:` Documentation changes |
| 32 | +- `style:` Code style changes (formatting, etc.) |
| 33 | +- `refactor:` Code refactoring |
| 34 | +- `test:` Adding or updating tests |
| 35 | +- `chore:` Build process or auxiliary tool changes |
39 | 36 |
|
40 | | -### Suggesting Features |
| 37 | +## 🧪 Testing |
41 | 38 |
|
42 | | -Open a [feature request](https://github.com/grasberg/sofia/issues/new?template=feature_request.md) describing your idea and why it would be useful. |
| 39 | +Run the full test suite: |
43 | 40 |
|
44 | | -### Submitting Code |
| 41 | +```bash |
| 42 | +make test |
| 43 | +``` |
45 | 44 |
|
46 | | -1. Make sure your code builds cleanly (`make build`) |
47 | | -2. Follow the existing code style — Sofia is written in idiomatic Go |
48 | | -3. Keep commits focused — one logical change per commit |
49 | | -4. Write a clear PR description explaining *what* and *why* |
| 45 | +Run tests for a specific package: |
50 | 46 |
|
51 | | -### Improving Documentation |
| 47 | +```bash |
| 48 | +go test ./pkg/yourpackage/... |
| 49 | +``` |
52 | 50 |
|
53 | | -Documentation improvements are always welcome. If you spot a typo, unclear instruction, or missing info — feel free to open a PR. |
| 51 | +## 📋 Pull Request Process |
54 | 52 |
|
55 | | -## Code Structure |
| 53 | +1. Ensure all tests pass: `make test` |
| 54 | +2. Update documentation if needed |
| 55 | +3. Add tests for new features |
| 56 | +4. Keep PRs focused — one feature per PR |
| 57 | +5. Write a clear description of your changes |
| 58 | + |
| 59 | +## 🏗️ Project Structure |
56 | 60 |
|
57 | 61 | ``` |
58 | 62 | sofia/ |
59 | | -├── cmd/ # CLI entry points |
| 63 | +├── cmd/ # Command-line interface |
60 | 64 | ├── pkg/ # Core packages |
61 | | -├── assets/ # Static web UI assets |
62 | | -├── docs/ # Documentation |
63 | | -├── workspace/ # Default workspace templates |
64 | | -├── Makefile # Build targets |
| 65 | +│ ├── agent/ # Agent orchestration |
| 66 | +│ ├── llm/ # LLM provider abstraction |
| 67 | +│ ├── memory/ # Memory and knowledge graph |
| 68 | +│ ├── skills/ # Skill system |
| 69 | +│ ├── tools/ # Built-in tools |
| 70 | +│ └── gateway/ # Web UI and API |
| 71 | +├── workspace/ # Default workspace files |
| 72 | +├── Makefile # Build and test commands |
65 | 73 | └── go.mod # Go module definition |
66 | 74 | ``` |
67 | 75 |
|
68 | | -## Good First Issues |
| 76 | +## 💡 Ways to Contribute |
| 77 | + |
| 78 | +- **Bug reports** — Found a bug? Open an issue! |
| 79 | +- **Feature requests** — Have an idea? We'd love to hear it. |
| 80 | +- **Documentation** — Help improve our docs |
| 81 | +- **Code** — Fix bugs, add features, improve performance |
| 82 | +- **Skills** — Create and share new skills via ClawHub |
| 83 | +- **Reviews** — Review open PRs |
69 | 84 |
|
70 | | -Look for issues labeled [`good first issue`](https://github.com/grasberg/sofia/labels/good%20first%20issue) — these are specifically chosen to be approachable for new contributors. |
| 85 | +## 🤝 Code of Conduct |
71 | 86 |
|
72 | | -## Questions? |
| 87 | +This project adheres to the [Contributor Covenant](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. |
73 | 88 |
|
74 | | -Open a [Discussion](https://github.com/grasberg/sofia/discussions) or file an issue — happy to help. |
| 89 | +## ❓ Questions? |
75 | 90 |
|
76 | | ---- |
| 91 | +Open a [Discussion](https://github.com/grasberg/sofia/discussions) — we're happy to help! |
77 | 92 |
|
78 | | -Thank you for helping make Sofia better! |
| 93 | +Thank you for contributing! 🎉 |
0 commit comments