|
| 1 | +# Contributing to ClawLess |
| 2 | + |
| 3 | +Thank you for your interest in contributing to ClawLess! We welcome contributions from the community and are grateful for any time you can dedicate to improving this project. |
| 4 | + |
| 5 | +## How to Contribute |
| 6 | + |
| 7 | +1. **Fork** the repository on GitHub. |
| 8 | +2. **Create a feature branch** from `main`: |
| 9 | + ```bash |
| 10 | + git checkout -b feature/amazing-feature |
| 11 | + ``` |
| 12 | +3. **Commit your changes** with a clear message: |
| 13 | + ```bash |
| 14 | + git commit -m 'Add amazing feature' |
| 15 | + ``` |
| 16 | +4. **Push to your branch**: |
| 17 | + ```bash |
| 18 | + git push origin feature/amazing-feature |
| 19 | + ``` |
| 20 | +5. **Open a Pull Request** against the `main` branch. |
| 21 | + |
| 22 | +## Development Setup |
| 23 | + |
| 24 | +```bash |
| 25 | +git clone https://github.com/open-gitagent/clawless.git |
| 26 | +cd clawless |
| 27 | +npm install |
| 28 | +npm run dev |
| 29 | +``` |
| 30 | + |
| 31 | +The project uses **Vite + TypeScript**. All source code is located in the `src/` directory. |
| 32 | + |
| 33 | +## Project Structure |
| 34 | + |
| 35 | +| File | Description | |
| 36 | +|------|-------------| |
| 37 | +| `src/sdk.ts` | Main SDK facade (ClawContainer class) | |
| 38 | +| `src/container.ts` | WebContainer orchestration | |
| 39 | +| `src/policy.ts` | Policy engine | |
| 40 | +| `src/audit.ts` | Audit logging | |
| 41 | +| `src/git-service.ts` | GitHub API integration | |
| 42 | +| `src/plugin.ts` | Plugin manager | |
| 43 | +| `src/ui.ts` | UI manager | |
| 44 | +| `src/terminal.ts` | Terminal manager | |
| 45 | +| `src/templates.ts` | Template system | |
| 46 | +| `src/net-intercept.ts` | Browser network interception | |
| 47 | +| `src/network-hook.ts` | Node.js network hook | |
| 48 | + |
| 49 | +## Code Style |
| 50 | + |
| 51 | +- **TypeScript strict mode** is enabled. Do not disable it. |
| 52 | +- **ES2022** is the compilation target. |
| 53 | +- Use the **typed event emitter pattern** for component communication. |
| 54 | +- Prefer **explicit types** over `any`. If you must use `any`, add a comment explaining why. |
| 55 | + |
| 56 | +## Issue Reporting |
| 57 | + |
| 58 | +Before opening a new issue, please: |
| 59 | + |
| 60 | +1. **Search existing issues** to avoid duplicates. |
| 61 | +2. When filing a bug report, include: |
| 62 | + - **Browser version** and operating system. |
| 63 | + - **Steps to reproduce** the issue. |
| 64 | + - **Expected behavior** versus **actual behavior**. |
| 65 | + - Any relevant error messages or console output. |
| 66 | + |
| 67 | +## Pull Request Guidelines |
| 68 | + |
| 69 | +- **Keep PRs focused and small.** One feature or fix per PR makes review easier. |
| 70 | +- **Add tests** if applicable to cover new functionality or bug fixes. |
| 71 | +- **Update documentation** for any API changes or new features. |
| 72 | +- **Ensure `npm run build` passes** before submitting your PR. |
| 73 | + |
| 74 | +## License |
| 75 | + |
| 76 | +By contributing to ClawLess, you agree that your contributions will be licensed under the **MIT License**. |
0 commit comments