Branch Structure and Repository Organization [AIR-3][AIS-3][BPC-3]¶
Overview¶
Add a brief overview of this document here.
Table of Contents¶
This document defines the standardized branch structure for the Anya Core repository, in accordance with official Bitcoin Improvement Proposals (BIPs) and our hexagonal architecture.
Branch Naming Convention¶
All branches must follow a consistent naming convention:
<type>/<feature-or-component>[-<subcomponent>]
Where:
<type>
is one of:feature
: New functionalityfix
: Bug fixesdocs
: Documentation-only changesrefactor
: Code changes that neither fix bugs nor add featuressecurity
: Security-related changesbitcoin
: Bitcoin protocol-specific implementations-
web5
: Web5-related functionality -
<feature-or-component>
should be a short, descriptive name of the feature or component <subcomponent>
(optional) further specifies the scope
Main Branches¶
Branch | Purpose | Protection Rules |
---|---|---|
main |
Production-ready code | Requires PR and approvals |
develop |
Integration branch for features | No direct commits |
Feature Development Workflow¶
- Create feature branch from
main
:feature/<feature-name>
- Develop and test feature
- Create PR to merge into
main
- After code review and approval, merge with
--no-ff
flag
Security-Related Branches¶
Security branches follow stricter guidelines:
- Name with
security/
prefix - Reference BIPs where applicable:
security/bip341-taproot
- Include thorough testing for all security components
- Require security team approval before merging
Documentation Branches¶
Documentation branches should be prefixed with docs/
:
docs/hexagonal-architecture-update
docs/standards
Bitcoin Protocol Branches¶
Bitcoin protocol implementations should be prefixed with bitcoin/
:
bitcoin/bip341-implementation
bitcoin/transaction-validation
Branch Lifecycle¶
- Creation: Branch created from
main
- Development: Active work
- Testing: Verification phase
- Review: PR submitted
- Merge: Merged into
main
with--no-ff
- Tagging: Version tag applied to main after significant merges
- Cleanup: Branch deleted after successful merge
Tags¶
Version tags follow semantic versioning:
v<major>.<minor>.<patch>[-<prerelease>]
Example: v1.3.0-rc1
Current Repository Structure¶
Main Branches¶
main
- Production-ready code, latest version v1.3.0-rc1
Feature Branches¶
feature/ai-validation-system
- AI validation for code qualityfeature/enhanced-bitcoin-compliance
- Enhanced Bitcoin protocol compliancefeature/enterprise-wallet
- Enterprise wallet featuresfeature/web5-wallet
- Web5 wallet featuresfeature/consolidated-updates
- Consolidated feature updates
Documentation Branches¶
docs/hexagonal-architecture-update
- Updates to architecture docs
Specialty Branches¶
AIP-001-read-first-implementation
- Implementation of AIP-001spv-security-enhancements
- SPV security improvementsnew-feature-branch
- Repository cleanup and restructuring
Hexagonal Architecture Considerations¶
Branch structure should respect the hexagonal architecture:
- Core Domain branches should focus on business logic
- Adapter branches should handle integration with external systems
- Port branches should define interfaces
- Infrastructure branches handle technical concerns
When creating branches, consider which layer of the hexagonal architecture is being modified.
Version History¶
- v1.0.0: Initial branch structure
- v1.1.0: Added BDF-compliance considerations
- v1.2.0: Updated with AI labeling integration
- v1.3.0: Enhanced with SPV security