Thank you for your interest in contributing to DevArch! This document provides guidelines for contributing to the project.
- Python 3.10 or higher
- Git
- Virtual environment (recommended)
# Clone the repository
git clone https://github.com/KyaniteLabs/devarch-framework.git
cd devarch-framework
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in editable mode with development dependencies
pip install -e ".[dev]"
# Verify installation
devarch --help
pytest --version# Run all tests
pytest
# Run specific test file
pytest tests/test_audit.py
# Run with coverage
pytest --cov=archaeology --cov-report=html
# Run with verbose output
pytest -vThis project follows Python best practices:
- PEP 8 for code formatting
- Type hints for function signatures
- Docstrings for public functions and classes
- Meaningful names for variables and functions
While we don't enforce strict formatting rules, please keep code readable:
- Use 4 spaces for indentation
- Limit lines to 100 characters where practical
- Add docstrings to functions that do something non-obvious
- Use type hints for function parameters and returns
Analysis vectors are modular analysis plugins. To add a new one:
-
Create the vector directory in
analysis-vectors/:analysis-vectors/my-vector/ ├── README.md ├── vector.md └── output/ -
Define the vector in
vector.md:# My Analysis Vector ## Purpose What this vector analyzes and why it matters. ## Input - Required data sources - Parameters ## Analysis Step-by-step analysis process. ## Output Expected findings and format.
-
Register the vector in the analysis runner (if automated):
- Add vector name to
archaeology/analysis_runner.py - Implement the analysis logic
- Add vector name to
-
Test the vector:
devarch analyze test-project --vector my-vector
When reporting bugs, please include:
- Python version:
python --version - DevArch version:
devarch --version - Steps to reproduce: Minimal reproduction case
- Expected behavior: What you expected to happen
- Actual behavior: What actually happened
- Error messages: Full traceback if applicable
- Environment: OS and other relevant details
For feature requests, please describe:
- Use case: What problem would this solve?
- Proposed solution: How do you envision it working?
- Alternatives: What alternatives have you considered?
- Impact: Who would benefit and how?
- Fork the repository and create a branch from
main - Make your changes following code style guidelines
- Add tests for new functionality
- Update documentation if needed
- Run tests to ensure nothing breaks
- Submit a pull request with:
- Clear description of changes
- Reference to related issues
- Screenshots for UI changes (if applicable)
- Tests pass locally
- New tests added for new features
- Documentation updated
- Commit messages are clear and descriptive
- No unrelated changes included
- Start with a clear goal in mind
- Create a feature branch:
git checkout -b feature/my-feature - Make incremental commits with clear messages
- Test frequently
- Refactor before submitting
# Run the demo to verify basic functionality
devarch demo --force --build-db
# Run tests
pytest
# Manual testing with a real repo
devarch init test-project --repo-url https://github.com/user/repo
devarch mine /path/to/repo --project test-project
devarch build-db test-project
devarch signals test-project
devarch analyze test-projectUnderstanding the codebase helps with contributions:
archaeology/ # Main package
cli.py # CLI entry point (all commands)
analysis_runner.py # Vector orchestration
audit.py # Validation and auditing
era_scanner.py # Era detection logic
era_cascade.py # Era label propagation
report.py # Report generation
db/ # Database operations
classifiers/ # Signal classification
extractors/ # Data extraction
validators/ # Output validation
visualization/ # HTML generation
analysis-vectors/ # Vector definitions
config/ # Configuration schemas
shared/ # L3 reference material (concepts, sync rules)
stages/ # 9-stage pipeline contracts with L3/L4 loading
docs/ # Architecture decision records
tests/ # Test suite
- Check the main README.md for usage documentation
- Review CONTEXT.md for architecture details
- Open an issue for bugs or feature requests
- Join discussions in existing issues
Thank you for contributing to DevArch!