Contributing¶
Setup¶
git clone https://github.com/BitConcepts/specsmith.git
cd specsmith
pip install -e ".[dev]"
pre-commit install
Running Checks¶
ruff check src/ tests/ # Lint
ruff format --check src/ tests/ # Format check
mypy src/specsmith/ # Type check (strict)
pytest tests/ -v # All tests
pytest tests/sandbox/ -v # Sandbox integration tests only
specsmith audit --project-dir . # Self-governance check
Adding a New Project Type¶
This is the most common contribution. Follow these 10 steps:
- Enum — Add value to
ProjectTypeinconfig.py - Labels — Add to
_TYPE_LABELSand_SECTION_REFSinconfig.py - Directories — Add to
_get_empty_dirs()inscaffolder.py - Tools — Add
ToolSetto_TOOL_REGISTRYintools.py - CI metadata — Add to
LANG_CI_METAintools.pyif the language is new - AGENTS.md rules — Add type branch to
templates/agents.md.j2 - Requirements template — Add domain starters to
templates/docs/requirements.md.j2 - Test spec template — Add domain test stubs to
templates/docs/test-spec.md.j2 - Tests — Add sandbox test in
tests/sandbox/ - Documentation — Update
docs/site/project-types.mdandREADME.md
Use the New Project Type issue template.
Code Standards¶
- SPDX headers on all
.pyfiles:# SPDX-License-Identifier: MIT - Must pass
ruff check,ruff format --check,mypy --strict - All features require tests
- Windows scripts:
.cmdonly (no.ps1) - Line length: 100
- Python 3.10+ compatibility
Documentation Rule¶
When making changes that affect user-facing behavior, always update in the same commit:
README.md— commands, types, featuresdocs/site/— the Read the Docs pagesCHANGELOG.md— all notable changesdocs/REQUIREMENTS.mdanddocs/TESTS.md— if applicable
Pull Request Process¶
- Branch from
develop(features) ormain(hotfixes) - All CI must pass (lint, typecheck, test × 9 matrix, security)
specsmith auditmust pass on specsmith itself- One approval required
- Use the PR template checklist
Reporting Issues¶
- Bug Report
- Feature Request
- New Project Type
- Discussions for questions and ideas