Thank you for your interest in contributing! This guide covers how to set up the development environment and submit changes.
# Clone and install dependencies
git clone https://github.com/your-org/Code2Database.git
cd Code2Database
bash scripts/setup.sh
# Or manually:
pip install -r scripts/requirements.txt
pip install pytest # for running testspython3 -m pytest tests/ -v- Fork the repository and create a feature branch
- Make your changes — keep diffs minimal and focused
- Run tests — ensure
python3 -m pytest tests/passes - Update documentation — if you add features, update
docs/en/anddocs/zh/accordingly - Submit a pull request with a clear description of the change
- Python: Follow PEP 8; 4-space indentation
- Keep functions focused and single-purpose
- Use type hints for public APIs
- No
__pycache__or.pycfiles in commits (gitignored)
- Documentation lives in
docs/en/(English) anddocs/zh/(Chinese) - The
SKILL.mdin each language directory is the main skill instruction file - When adding new features, update both language versions
- Reference docs go in
docs/*/references/
- Create
scripts/_scanner/<lang>_scanner.pyinheriting frombase.py - Implement
scan_file()to extract functions, edges, and callbacks - Register in
scripts/_scanner/__init__.py - Add tree-sitter binding to
scripts/requirements.txt - Add tests in
tests/ - Update
skill.jsonand bothSKILL.mdfiles
When extending Code2Database with a new reasoning, query, or operational capability:
- Implement the module in
scripts/_builder/<module>.py - Wire CLI commands in
scripts/code2database_builder.py(argparse routing) - Add unit tests in
tests/covering the core behavior - Document config fields (if any) in
docs/<lang>/RUNTIME_CONFIG.md(both EN and ZH) - Update
skill.jsoncommandsarray andoutput_files(if new artifacts are produced) - Update
docs/<lang>/SKILL.mdQuick Reference and Constraint sections (both EN and ZH) - Update
README.mdanddocs/zh/README.mdCapability/Feature tables - Update
CLAUDE.mdandAGENTS.mdif the capability introduces constraints or query entry points - Add a CHANGELOG entry under
### Addeddescribing the capability and its commands
Keep the boundary clear: SKILL.md is for AI agents using the tool; CLAUDE.md/AGENTS.md are for developers modifying the tool; reference docs are for on-demand detail; OVERVIEW.md is internal architecture only.
- Use GitHub Issues
- Include: OS, Python version, reproduction steps, expected vs actual behavior
- For scan quality issues, include a small code sample that demonstrates the problem