Thank you for your interest in contributing to ForgingBlocks.
This document explains how to participate in the project and where to find the rules that apply once you start contributing.
You do not need to read everything before opening a pull request. This guide is meant to help you orient yourself.
Contributions are welcome in several forms, including:
- Bug fixes and improvements
- Documentation clarifications and examples
- New abstractions that align with the existing design
- Tooling, automation, and developer experience improvements
If you are unsure whether an idea fits, opening an issue for discussion is encouraged.
ForgingBlocks is organized around explicit responsibility boundaries.
The documentation mirrors this structure:
- The Guide explains how to read and use the toolkit.
- The Reference defines responsibilities and terminology.
- Architectural Styles show optional interpretations.
- Examples demonstrate usage without prescribing structure.
Understanding this separation will make contributing easier.
Documentation is a first-class concern in this project.
If you plan to modify or add documentation, please read:
- Docs Conventions
docs/contributing/docs_conventions.md
That document defines the rules and expectations for documentation changes.
When contributing code:
- Prefer clarity over cleverness.
- Keep responsibilities explicit.
- Avoid introducing architectural enforcement.
- Add tests where behavior is non-trivial.
If a change affects public behavior, documentation updates are expected.
- Fork the repository
- Clone your fork:
git clone https://github.com/<username>/forging-blocks.git - Install dependencies:
poetry install - Set up pre-commit hooks:
pre-commit install
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Add tests for new functionality (see Testing Guidelines)
- Run the full test suite:
poetry run poe ci:check
- Submit a pull request with a clear, concise description
Small, focused pull requests are easier to review.
This project uses a 3-tier testing architecture:
- Unit Tests (
@pytest.mark.unit) - Fast, isolated tests with mocks for business logic - Integration Tests (
@pytest.mark.integration) - Real infrastructure in isolated environments - End-to-End Tests (
@pytest.mark.e2e) - Complete workflows (typically skipped)
During development:
# Fast feedback loop - run frequently
poetry run poe test:unit
# Before committing - verify all stable tests pass
poetry run poe testWhen adding new functionality:
- Add unit tests for domain logic and business rules
- Add integration tests for external system interactions
- Use mocks appropriately at architectural boundaries
- Follow the naming pattern:
test_when_condition_then_outcome
See the Testing Guide for detailed examples.
# Testing - Primary Commands
poetry run poe test # Run ALL tests (stable + conditional)
poetry run poe test:unit # Run unit tests only (fast feedback)
poetry run poe test:integration # Run integration tests only
# Testing - Extended Commands
poetry run poe test:e2e # Run end-to-end tests only
poetry run poe test:debug # Run tests with verbose output
# Code quality
poetry run poe lint # Check code style
poetry run poe lint:fix # Fix code style issues
poetry run poe type # Type checking
poetry run poe bandit # Security scanning
# CI simulation
poetry run poe ci:check # Run full CI suite
poetry run poe ci:simulate # Include documentation build
# Documentation
poetry run poe docs:build # Build documentation
poetry run poe docs:generate # Generate API referenceFor maintainers preparing releases, see detailed instructions in Release Guide:
# Prepare release (simulation)
poetry run poe release patch
# Execute release (creates branch and PR)
poetry run poe release patch --execute- This file explains how to contribute.
- Other documents explain how things should be written or structured.
- When in doubt, ask questions early.
Contributions are welcome as long as they respect the project’s emphasis on clarity, boundaries, and intentional design.