git clone https://github.com/Pro0f/devscontext.git
cd devscontext
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"Configure for local testing:
cp .devscontext.yaml.example .devscontext.yaml
# Edit .devscontext.yaml with your Jira URL
export JIRA_EMAIL="you@company.com"
export JIRA_API_TOKEN="your-token"Unit tests (no API keys needed):
pytest tests/ --ignore=tests/test_integration.pyIntegration tests (requires real API keys):
pytest tests/test_integration.py-
Create adapter file
src/devscontext/adapters/your_source.py:- Extend the
Adapterbase class fromplugins/base.py - Set class attributes:
name,source_type,config_schema - Implement required methods:
fetch_task_context(task_id, ticket=None) -> SourceContextsearch(query, max_results) -> list[SearchResult]health_check() -> bool
- Optionally implement
close()andformat_for_synthesis()
- Extend the
-
Add config model to
src/devscontext/models.py:- Create Pydantic model with
enabled,primaryfields - Add to
SourcesConfig
- Create Pydantic model with
-
Register in plugin registry
src/devscontext/plugins/registry.py:- Add to
register_builtin_plugins()method - Add loading logic in
load_from_config()
- Add to
-
Add tests in
tests/test_your_source.py
See adapters/slack.py as a complete reference for communication sources.
For full details, see docs/plugins.md.
DevsContext uses a plugin system for extensibility:
- Adapters: Fetch context from data sources
- Synthesis Plugins: Process and combine context
External plugins can be published as pip packages using entry points. See docs/plugins.md for the complete guide.
# Unit tests (no API keys needed)
pytest tests/test_your_source.py
# Test with real API (integration)
devscontext test --task YOUR-123# Process a single ticket
devscontext agent process TEST-123
# Check storage status
devscontext agent statusBefore submitting:
ruff check .
ruff format .
mypy src/
pytest tests/ --ignore=tests/test_integration.pyRequirements:
- Type hints on all functions
- Pydantic models for data structures
- Tests for new functionality
- Fork and create a branch from
main - Make your changes with tests
- Ensure all checks pass
- Open a PR describing what and why
Open an issue.