Release Setup
For greenfield Codex bootstrap projects, these files are already generated: scripts/new-release.sh, the CMDB checker, version constants, CHANGELOG.md and disabled deployment lifecycle wrappers. Don’t copy them again. Bootstrap never commits or publishes a release. The mandatory Installation Lifecycle skill requires the application developer to finish and test install, upgrade and uninstall, including a successful installed-version marker, before treating the app as release-ready. Merely having executable shell scripts does not establish readiness.
For manually created projects, prepare the tooling once. Use Creating a Release for subsequent releases.
Prepare the Constants and Changelog
Complete CMDB Compliance first. Establish the canonical application name, constants path, literal VERSION, and initial CMDB_CODENAME. Declare persistent components, database references, and network listeners, using empty tuples where none exist. For listener applications, complete Network Configuration so runtime defaults and lifecycle checks consume the declaration.
Add the three lifecycle entry points using Installation Scripts. They must be executable and committed before releasing; deployment remains a separate operation.
Create CHANGELOG.md with exactly one ## [Unreleased] heading. The changelog template provides the initial structure. Follow Changelog Maintenance for every completed change, not just release preparation. Add or refresh ### Summary for meaningful work from the first change onward.
Install the Scripts
For manual projects without the Codex bootstrap, copy these files from BMForge:
| BMForge source | Project destination |
|---|---|
| Release script | scripts/new-release.sh |
| Metadata checker | scripts/check-cmdb.py |
Make scripts/new-release.sh executable. It requires Bash, Git, Python 3.10 or newer, and standard GNU command-line tools. Projects with a static PEP 621 [project].version in pyproject.toml get version synchronization automatically; that version must initially match the literal application VERSION. It reads and edits metadata without importing application code.
Replace __PROJECT_NAME__ and __PROJECT_SLUG__ in the script’s settings block with the canonical application name and its lowercase form. Review the version path, changelog path, remote, and branch names. The standard defaults are origin, dev, main, and feat/maint-.
Deployment impact tracking is configured separately. Leave dependency_rules and deployment_config empty until Deployment Impact Tracking is ready; enable both together when using it.
Establish the Branches
For projects initialized through the Codex bootstrap, the project-local
manager handles the initial local release branching after a user-reviewed
commit on main:
python3 .agents/bmforge/manage.py setup-branches --project . --dry-run
python3 .agents/bmforge/manage.py setup-branches --project .
The first command checks prerequisites without changing refs. The second
creates dev and feat/maint-0.1.0, both based on the initial main
commit, and switches to the feature branch. It does not commit, publish
a branch to origin, configure a remote or create a release. Explicitly
review and commit the generated scaffold first. Do not re-create or overwrite
existing branches: reconcile existing dev/feature remote refs separately.
For projects that were not initialized through the Codex bootstrap, use the original manual commands below.
Start with a committed initial project on main and an origin remote. Create the development and first feature branches:
git switch main
git switch -c dev
git switch -c feat/maint-0.1.0
Use an existing dev branch when one is already present. Feature work branches from dev. Before each release, main must be an ancestor of dev, and dev an ancestor of the feature branch. Local main and dev must contain their remote counterparts. The script can create missing remote branches during its release push.
Verify the Setup
- Run the metadata checker with the actual project name and constants path.
- Run
bash -n scripts/new-release.shandscripts/new-release.sh --help. - Commit the scripts, constants, changelog, and any configured deployment metadata before releasing.
- Exercise an adapted release script in a disposable repository with a local bare remote. Verify matching version, codename, changelog, branch tips, and annotated tag.