๐ Code Guidelines
This page covers general contribution guidelines for code changes beyond skill additions.
PR Process
Section titled โPR Processโ- Fork the repository
- Create a branch (
feature/thingorfix/thing) - Make your changes
- Run tests:
python3 -m pytest tests/ -v --tb=short - Open a PR with a clear description of what and why
What Makes a Good PR
Section titled โWhat Makes a Good PRโ- Small and focused โ one feature or fix per PR
- Tested โ include test commands or evidence it works
- Documented โ update relevant docs if behavior changes
- No unrelated changes โ donโt refactor surrounding code in the same PR
Code Style
Section titled โCode Styleโ- Python 3.10+ target
- Use type hints where helpful (not required everywhere)
- No linter enforced yet โ match the style of surrounding code
- Prefer simple, readable code over clever abstractions
- Keep functions focused โ one function, one job
- Use
loggingfor debug/info output,printfor user-facing CLI output
What to Avoid
Section titled โWhat to Avoidโ- Donโt add dependencies without discussion (open an issue first)
- Donโt change the database schema without a migration (auto-applied on startup)
- Donโt modify API response formats โ the dashboard depends on them
- Donโt commit credentials โ API keys, service accounts, personal data
- Donโt force-push to shared branches
Contribution Types
Section titled โContribution Typesโ| Type | Difficulty | Example |
|---|---|---|
| Report a bug | Easy | Open a GitHub issue with repro steps |
| Improve documentation | Easy | Fix typos, add examples, clarify guides |
| Add UI elements for a new app | Easy-Medium | Map resource IDs for WhatsApp |
| Write an Action | Medium | Add send_message for WhatsApp |
| Write a Workflow | Medium | Chain actions into send_dm |
| Build a complete Skill | Medium-Hard | Full app coverage with tests |
| Core framework contribution | Hard | Scheduler improvements, new Device methods |
Reporting Bugs
Section titled โReporting BugsโOpen a GitHub issue with:
- What happened (actual behavior)
- What you expected (expected behavior)
- Steps to reproduce
- Device info (phone model, Android version, app version)
- Logs (relevant error output from
/tmp/sched_job_*.logor server console) - Screenshot (if UI-related)
Project Areas
Section titled โProject Areasโ| Area | Key Files | Complexity |
|---|---|---|
| Device control | bots/common/adb.py | Medium |
| Skill system | skills/base.py, skills/tiktok/ | Medium |
| API server | server.py | High (4500 LoC) |
| Database | db.py | High (2000 LoC) |
| Dashboard | static/dashboard.html | High (400K monolith) |
| Scheduler | server.py (scheduler section) | High |
| Bot scripts | bots/tiktok/*.py | Medium |
| LLM agent | agent/agent_core.py | Medium |
Getting Help
Section titled โGetting Helpโ- Open a GitHub Discussion for questions
- Tag
@maintainersfor urgent issues - Check the Troubleshooting page for common issues
Related
Section titled โRelatedโ- Development Setup โ install and verify
- Adding Skills โ the highest-impact contribution