Thank you for your interest in contributing! This guide will help you get started.
- Getting Started
- Development Setup
- Commit Message Convention
- Branch Strategy
- Pull Request Process
- Code Style
- Issue Reporting
- Fork the repository
- Clone your fork:
git clone https://github.com/<your-username>/astrbot_plugin_self_learning.git - Create a feature branch from
develop:git checkout -b feat/your-feature develop - Make your changes
- Push and open a Pull Request to
develop
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/macOS
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Run tests
pytest tests/Requirements: Python 3.11+
We follow Conventional Commits. All commit messages must use this format:
<type>(<scope>): <short description>
| Type | Description |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation changes only |
style |
Code style changes (formatting, no logic) |
refactor |
Code refactoring (no feature or fix) |
perf |
Performance improvement |
test |
Adding or updating tests |
chore |
Build process, CI, or tooling changes |
ci |
CI/CD configuration changes |
Identifies the module affected. Common scopes:
webui, persona, affection, jargon, learning, social, db, config, api, memory, export
feat(webui): add responsive layout for login page
fix(db): handle SQLite migration on first load
docs: update README installation steps
refactor(persona): extract updater logic into separate service
test(auth): add unit tests for login endpoint
chore(deps): upgrade sqlalchemy to 2.0
perf(memory): optimize graph query with batch loading
ci: add commit message linting workflow
- Use English for commit messages
- Use imperative mood ("add feature" not "added feature")
- Keep the first line under 72 characters
- Do not end the description with a period
- Optionally add a body separated by a blank line for more detail:
feat(social): add relationship decay over time
Relationships now decay gradually if no interaction occurs within
the configured time window. Decay rate is configurable via the
`social.decay_rate` setting in config.
| Branch | Purpose |
|---|---|
main |
Stable releases |
develop |
Integration branch for features |
feat/* |
New features |
fix/* |
Bug fixes |
docs/* |
Documentation changes |
- Always branch from
develop - Always open PRs targeting
develop mainis updated via PR fromdevelopby maintainers only
- Ensure your branch is up to date with
develop - Follow the commit message convention
- Fill out the PR template completely
- Verify your changes:
- No new warnings or errors
- Tested on SQLite mode
- Tested on MySQL mode (if applicable)
- Self-reviewed the code changes
- Wait for maintainer review
PR titles should also follow the commit convention format:
feat(webui): add dark mode toggle
fix(db): resolve connection pool leak
- Indentation: 4 spaces for Python, 2 spaces for YAML/JSON/HTML
- Line length: 120 characters max
- Encoding: UTF-8
- Line endings: LF (Unix-style)
- Naming:
snake_casefor functions/variables,PascalCasefor classes - See .editorconfig for full editor configuration
- Use the issue templates provided
- For security vulnerabilities, see SECURITY.md
Thank you for contributing!