brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
project-development-standardAI Workspace Infra branching, PR, release, tagging and incident standard. Use whenever changing one of its independent repositories, creating or reviewing a PR, choosing a target branch, handling dirty worktrees, coordinating a cross-repo change, cutting a release, or responding to a committed secret.
Independent GitHub snapshot · Automated classification · Original documentation governs
A reusable operational digest for teams running trunk-based development (main) alongside
release/* maintenance lines. Treat this as a template: keep the golden rules and direction
matrix, but replace the CI gate names and any repo-specific paths with the target repo's own.
Read AI Workspace Infra Repository Map before creating a branch. artifacts, gitops, playbooks, iac_modules, observability.svc.plus, and platform-ops-toolkit are separate repositories; docs is a non-Git documentation tree. Never report one repository's check or PR as verification for another.
main or any release/* branch — every change lands through a PR, including docs-only changes and locally stranded commits.git status --short --branch before switching branches or staging; only stage named target paths.main and worktree disciplineThe local main checkout is an integration mirror, not a development workspace.
Use it only to fetch, fast-forward, inspect the merged result, and create an
isolated worktree. Do not edit files, run experimental deployment changes, or
accumulate uncommitted work on local main.
Before pulling or changing branches:
git status --short --branch and classify every tracked and untracked
path. Never use reset --hard, clean, checkout -- <path>, or an
unrecorded stash to make a dirty checkout pullable.main is dirty, preserve the named work in a topic or recovery
branch first. A recovery commit is acceptable when it is the safest way to
preserve the exact local state; it is not automatically a merge candidate.origin/main before opening a PR.
Files already present with identical content on origin/main are not new
work and must not be recommitted merely because an old local checkout showed
them as untracked.git fetch origin main and git pull --ff-only. A non-fast-forward result
requires investigation, not a forced update.Prefer one worktree per task:
git fetch origin main
git worktree add ../<repo>-<task> -b feature/<issue>-<task> origin/main
All edits, commits, tests, and PR work happen in that topic worktree. Keep the
local main worktree clean and short-lived. If an uncommitted change is found
on main after work has started, stop and perform the preservation/comparison
sequence above before doing anything else.
| Branch | Purpose | PR target |
|---|---|---|
feature/* | New feature work | main |
bugfix/* | Normal bug fix for trunk | main |
hotfix/* | Urgent fix for a published release line | release/* |
backport/* | Fix moving from main to a release line | release/* |
cherry-pick/* | Fix moving from a release line back to main | main |
Disallowed: release/*→main, main→release/* wholesale merges, feature/*→release/*, hotfix/*→main, backport/*→main, cherry-pick/*→release/*.
Before opening a PR, verify: source branch prefix matches the target branch per the table above. If the repo has a branch-direction CI gate, let it enforce this rather than reviewing it by hand.
Every PR body must include:
For a cross-repository change, open a focused PR in each affected repository. Link the companion PRs and state the merge/order dependency, the compatibility window, and the rollback owner. Do not merge a consumer before the module/declaration it requires is available on the declared ref.
Additionally for maintenance PRs:
hotfix/* / backport/*: name the target release/* branch explicitly.backport/* / cherry-pick/*: link the original change, preserve the original commit SHA in the description, and state why the cross-branch transfer is required.Public-repo hygiene: if the repository is public, PR bodies, commit messages, and committed docs must not contain credentials, tokens, internal hostnames, deploy targets, secret-store paths, or other internal infrastructure details.
feature/* and bugfix/* PRs — one reviewable commit per logical change on main.hotfix/*, backport/*, cherry-pick/* small and traceable.release/vMAJOR.MINOR from a reviewed, stable main commit; after the cut it accepts only hotfix/* and intentional backport/*.vMAJOR.MINOR.PATCH (pre-releases: -alpha.N / -beta.N / -rc.N), annotated, created deliberately at a release point — never as a side effect of branch synchronization.For a coordinated build across repositories:
uat-daily-build-YYYY.MM.DD-rN;r1 for the first snapshot on a UTC date, then increment the same
date's suffix (r2 … rN) for every retry or later snapshot; reset to r1
only when the UTC date changes;The handoff must state whether the snapshot is deployable, tag-ready only, or blocked, and include per-repository evidence. A successful build in one repository does not establish a successful cross-repository release.
When a workflow consumes artifacts from another repository, use this order:
If a preflight fails before resource mutation, fix the owning contract first. Do not bypass the check by widening a Vault policy, accepting a mutable ref, or reusing an old release. For cross-repository changes, record the dependency order and rollback owner in each PR.
The only refs eligible to enter a production-capable path are:
refs/tags/v* for the immutable stable release artifact; orrefs/heads/release/v* for a protected release line with an explicit,
reviewed production action.Everything else, including main, pull-request refs, feature/bugfix branches,
daily-build-*, and uat-daily-build-*, MUST be rejected by the production
entry gate. A shared tag script is acceptable only when it validates tag kind and
environment semantics; it must not treat a successful tag creation as proof that
the artifact is deployable.
Stable tags are append-only history. Do not move, overwrite, force-update, or
delete a published stable tag. Use a new SemVer tag for a stable retry and a new
-rN suffix for a daily snapshot retry.
Before release publication, record passing evidence for the source ref/SHA, artifact build and digest, required tests, Vault role and KV path, environment route, GitOps desired version, and deployment/rollback plan. If any item is unknown or inferred only from a downstream UI, the release is blocked.
main, needed on a release line → backport/* → PR into release/*.release/*, needed on trunk → cherry-pick/* → PR into main.git filter-repo --path <file> --invert-paths), then force-push branches and tags.git fetch --all and re-align local branches.A secret-scanning CI gate prevents new leaks but never replaces this flow for an already-exposed secret.
Every repo names its own gates; treat this as the shape to fill in, not literal workflow names:
| Gate | Typical purpose |
|---|---|
| Branch direction | Rejects PRs whose source-branch prefix doesn't match the allowed target per the table above |
| Layered tests | Static analysis + unit/widget/golden tests on PRs into main |
| Build verification | Confirms the change actually builds/packages |
| Release E2E | End-to-end checks, often scheduled/dispatched rather than blocking every PR |
Changes touching packaging, permissions, authentication, secrets, or release scripts should get the repo's targeted security tests in addition to the normal PR checks — check the repo's own security docs for the current list.