This project uses a develop-to-main workflow for stable releases.
The goal is to keep feature integration moving without treating every merged feature as a stable release. main should stay release-ready; develop is where approved work is integrated before promotion.
| Branch | Purpose | Allowed work |
|---|---|---|
develop |
Integration branch for approved work | Feature, docs, CI, runtime, and test PRs linked to approved issues |
main |
Stable released code | Release promotion PRs, tagged releases, and urgent hotfixes |
feature/*, docs/*, ci/*, fix/* |
Short-lived work branches | One approved issue or one tightly scoped work unit |
release/* |
Optional release hardening branch | Release-candidate fixes, changelog/release note finalization, smoke-test fixes |
hotfix/* |
Urgent stable fix branch | Critical fixes from main, then back-merged to develop |
Use this for most work.
-
Create or select a GitHub issue.
-
Wait for
status:approvedbefore implementation. -
Branch from
develop:git switch develop git pull --ff-only git switch -c feature/<issue>-short-name
-
Implement the smallest reviewable slice.
-
Run the relevant local validation commands.
-
Open a PR targeting
develop. -
Merge only after required checks pass and review concerns are resolved.
Feature PRs should not target main directly unless they are explicitly part of an approved hotfix or release-promotion flow.
Use this when develop is ready to become a stable release.
-
Confirm the release milestone/project is complete or explicitly scoped.
-
Confirm all required checks pass on
develop. -
Generate or refresh the release changeset before requesting merge:
git fetch origin main develop --tags bash scripts/generate-release-changeset.sh vX.Y.Z --base origin/main --head origin/develop bash scripts/validate-release-promotion.sh --base origin/main --head HEAD --force
-
Update the generated
docs/releases/vX.Y.Z.mdonly to improve human wording, not to add private evidence. -
Either:
- open a direct release PR from
developtomain; or - create a
release/vX.Y.Z-rc.Nbranch for final hardening, then PR that branch tomain.
- open a direct release PR from
-
Run the release checklist and any first-run smoke validation.
-
Merge to
mainonly when release checks pass. -
Let the
Release tag and notesworkflow create the matchingvX.Y.Ztag and GitHub Release fromdocs/releases/vX.Y.Z.md. If the tag already exists, the workflow leaves it untouched.
main should represent the code users can install from release documentation. Do not use main as a general integration branch.
A release-candidate branch is optional. Use it when at least one of these is true:
- multiple features landed in
developand need final stabilization together; - installation/configuration docs need a clean rehearsal before release;
- release notes, changelog, or version metadata need review without blocking ongoing
developwork; - final smoke testing finds release-only fixes;
- the release has higher user impact or operational risk.
Keep release-candidate branches short-lived. Only merge fixes needed for that release.
Use this for urgent fixes to already released code.
-
Branch from
main:git switch main git pull --ff-only git switch -c hotfix/<issue>-short-name
-
Link the hotfix to an approved issue or an explicit emergency maintainer decision.
-
Implement the minimal fix.
-
Open a PR targeting
main. -
After merge and release/tag, back-merge or cherry-pick the fix into
develop.
Hotfixes should not become a bypass for normal feature work.
The exact GitHub branch-protection configuration is handled separately, but the policy is:
Required checks cover:
Repository contracts: whitespace, shell syntax, GitHub Actions lint, shell lint/formatting, YAML lint, Markdown lint, commit message lint, and repo-safe evidence hygiene viascripts/validate-repo-safe-evidence.sh;Safe validator suite: fake-first repository validators viascripts/run-safe-validation-suite.sh;Compose config and OpenClaw image build: Docker Compose configuration, Dockerfile lint, and OpenClaw image build;Gitleaks secret scan: secret scanning.
These checks must not require private Discord credentials or private runtime data.
Release-promotion or hotfix PRs to main require everything from develop, plus release-specific review evidence such as:
- changelog or release notes update when user-visible behavior changes;
- release checklist completion;
- installation/configuration docs acknowledgement;
- confirmation that no private Discord IDs, tokens, screenshots, raw logs, transcripts, or private payloads are included.
Use the changelog and release notes to explain what changed from the user's point of view.
For feature and fix PRs:
- note whether user-facing behavior changed;
- update
CHANGELOG.mdwhen the project has one and the change is release-relevant; - otherwise document why the change is internal-only.
For release PRs to main:
- include exactly one release note file at
docs/releases/vX.Y.Z.mdfor the intended tag; - summarize completed issues/PRs;
- list known limitations;
- call out installation, configuration, migration, and rollback notes;
- include any private-runtime safety notes using sanitized language only.
The CI Repository contracts job runs scripts/validate-release-promotion.sh for PRs targeting main. It fails release-promotion PRs that do not include a matching docs/releases/vX.Y.Z.md file or that overclaim production/public Discord/live social/live analytics readiness.
No release workflow step should require committing or posting private runtime evidence.
Do not include real Discord IDs, tokens, credentials, screenshots, raw logs, transcripts, or private payloads in public GitHub issues, PRs, docs, fixtures, or release notes. Use sanitized summaries and fake-first validation wherever possible.
Run the repo-safe evidence guard before opening PRs that touch docs, examples, scripts, or templates:
bash scripts/validate-repo-safe-evidence.shThe first stable release readiness track starts with process and automation:
- define this release workflow;
- align issue and PR templates with the workflow;
- harden CI and merge checks;
- finish installation/configuration/usage documentation;
- run a clean first-run rehearsal before release promotion.