Skip to content

Branching Strategy and Integration Flow

Context

Even as a solo developer, the project requires a structured way to integrate code to ensure that the main branch remains stable, secure, and always deployable. As the system complexity increases with Post-Quantum security and AI engines, a two-tier integration model is required.

Decision

We will adopt a Modified Feature Branch Workflow with a dedicated integration branch (develop).

Strategy Details

  1. main branch (Production): Protected. Represents the high-integrity, production-ready state. Only receives merges from develop.
  2. develop branch (Integration/Slowlane): The default branch for active development. Where all features are integrated and tested together.
  3. Feature branches (feat/, fix/, docs/): Isolated branches for specific tasks. These are merged into develop via Pull Requests (PRs).
  4. Automation: All PRs trigger CI/CD pipelines (Linting, Tests, SonarCloud, Security Audits).

Rationale

  • Stability: The main branch is shielded from experimental or incomplete features.
  • Traceability: Each change is linked to a specific PR, providing a history of why and how something was implemented.
  • Safety Gate: Prevents accidental "broken" code from being deployed to production environments.
  • Scalability: Prepares the project for multiple contributors and staging/production environment parity.

Consequences

  • Workflow Change: Developers must target develop for PRs instead of main.
  • Release Cycle: Moving code to main becomes a deliberate "Release" action, allowing for final audit checks.