codexbar-git-workflow
Skill71 starsChanged 57 days agoMITView on GitHub
CodexBar Git/GitHub workflow for creating feature, fix, upstream-sync, release, review, and cleanup branches; making staged commits; pushing branches; opening PRs; checking CI/review state; and replacing the old jj commit/branch steps with git and gh. Use whenever CodexBar work needs branch planning, commits, push, PR handoff, branch cleanup, or Todoist sync after pushed code.
- Reads credentials
- Commits and pushes
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/claude.mdCLAUDE.md
- docs/llms.txtllms.txt
- codexbarSkill
- qa-testSkill
- release-codexbarSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
33 rules. About 0 are common, 18 are distinctive, and 15 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 8
Use Git and GitHub for CodexBar branch, commit, push, PR, and branch cleanup work.
- Distinctive: line 12
Start every branch/commit operation from the repo root.
- Distinctive: line 20
If the work must start from the latest mainline:
- Distinctive: line 27
Do not discard, stash, reset, or overwrite unrelated user changes.
- Distinctive: line 31
Create a task branch before implementation unless the user only asked for read-only analysis.
- Very specific: line 52
Never push to upstream. Only push branches to origin.
- Very specific: line 78
Run the relevant checks before committing.
- Distinctive: line 96
Do not bump build numbers for every internal checkpoint commit on a long-lived branch.
- Very specific: line 103
Do not change MARKETING_VERSION unless explicitly requested or required by the release plan.
- Very specific: line 104
Keep same-MARKETING_VERSION in-app release notes in one block.
- Distinctive: line 105
Follow the 4-language localization rule for release notes and all user-facing text.
- Distinctive: line 129
Use draft PRs for long-running feature branches until local verification and the review loop are complete.
- Very specific: line 136
Every PR push runs only PR Fast Checks.
- Very specific: line 141
Use manual Final CI with full=true only for unresolved provenance, risky conflict resolution, or an explicitly requested complete rerun.
- Distinctive: line 150
After pushing or opening a PR, check status from GitHub, not memory:
- Distinctive: line 157
If checks fail, inspect the failed run and logs, fix, retest locally, commit, and push again:
- Distinctive: line 167
Do not merge while the requested review is still in flight.
- Very specific: line 175
Run Scripts/check_pr_review_gate.sh <pr> immediately before merge.
- Distinctive: line 187
Use these exact non-empty fields so the merge gate can validate the audit:
- Distinctive: line 203
When the user authorizes TestFlight, upload directly from the task branch if needed.
- Distinctive: line 211
If a PR exists, its review/CI workflow continues independently.
- Distinctive: line 214
Before promoting a beta build to App Review/public release, verify its recorded archive source commit and tree against the clean reviewed …
- Distinctive: line 219
If review fixes change any shipped inputs, or provenance cannot be established, archive and upload a new build and select that build for …
- Distinctive: line 225
After pushed commits for CodexBar Mobile, update Todoist if the tools are available.
- Very specific: line 229
Add Bug for bug/crash/fix work.
- Very specific: line 230
Add 商业化 for paid/member-facing work.
- Very specific: line 232
Keep Next short: only the picks queued to start soon.
- Very specific: line 234
After pushed code is complete, move it to Code Complete.
- Very specific: line 236
After QA passes, move it to Release when it is submitted to App Review or a release is published.
- Very specific: line 237
Only mark done (in Release) after user confirmation or verified release truth (for example App Store READY_FOR_SALE or a live GitHub …
- Distinctive: line 250
Only clean up branches after the user confirms merge/release closure or the PR merge operation itself includes cleanup.
- Distinctive: line 260
Delete only merged branches:
- Very specific: line 267
Use -D or force-push only with explicit user authorization.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CodexBar Git Workflow
Use Git and GitHub for CodexBar branch, commit, push, PR, and branch cleanup work. Do not use jj unless the user explicitly re-enables it.
Preflight
Start every branch/commit operation from the repo root.
git status --short --branch
git remote -v
git fetch origin --pruneIf the work must start from the latest mainline:
git switch mobile-dev
git pull --ff-only origin mobile-devDo not discard, stash, reset, or overwrite unrelated user changes. If the worktree is dirty, inspect it first and either work with it or ask before moving it.
Branches
Create a task branch before implementation unless the user only asked for read-only analysis.
Pick the branch name yourself from the task; the user should not need to put branch names in Goal prompts.
| Work type | Branch shape |
| New user-facing feature | feature/<short-slug> |
| Smaller function/tooling addition | function/<short-slug> |
| Bug fix | fix/<short-slug> |
| Research/docs-only investigation | research/<short-slug> |
| Upstream sync | upstream-sync/<target-upstream>-mobile.<target-mobile> |
| Release preparation | release/<version-or-slug> |
| Post-merge/review cleanup | review/<short-slug> |
Create the branch:
git switch -c <branch-name>
git status --short --branchNever push to upstream. Only push branches to origin.
Commit Cadence
For large Goals, make coherent staged commits instead of one giant final commit. Good checkpoints are:
- research/design docs and product matrix
- project/target scaffolding
- shared data/cache/model layer
- UI or feature slices
- localization and release notes
- tests and review fixes
Each commit should be reviewable and preferably buildable. If a checkpoint cannot fully build yet, document why in the research/testing notes before committing it.
Use focused staging:
git status --short
git diff --stat
git diff
git add <paths>
git diff --cached --stat
git diff --cachedRun the relevant checks before committing. At minimum, run the narrow build/test/lint that matches the files changed; for release-facing or sync-facing work, run the stronger gates required by AGENTS.md and docs.
Commit with Git:
git commit -m "<type>(<scope>): <summary>"Message examples:
docs(research): plan iOS widget suitefeat(ios): add widget shared snapshot cachefeat(widgets): add provider usage widgetsfix(sync): preserve stale provider timestampstest(widgets): cover widget entry formatting
Version And Release Notes
Do not bump build numbers for every internal checkpoint commit on a long-lived branch.
Bump CodexBarMobile/project.yml and update CodexBarMobile/CHANGELOG.md plus MobileReleaseNotesCatalog when a user-facing iOS change is ready for handoff, release prep, TestFlight upload, or merge to mobile-dev.
Rules:
- Increment all
CURRENT_PROJECT_VERSIONvalues together. - Do not change
MARKETING_VERSIONunless explicitly requested or required by the release plan. - Keep same-
MARKETING_VERSIONin-app release notes in one block; merge related bullets instead of creating duplicate lines. - Follow the 4-language localization rule for release notes and all user-facing text.
For Mac/versioning decisions, read docs/versioning.md before editing version.env.
Push And PR
Push only when the user asked to push, open a PR, run remote CI, or the active Goal explicitly authorizes pushed branch handoff.
git push -u origin <branch-name>Open PRs against mobile-dev unless release docs or the user say otherwise:
gh pr create \
--repo o1xhack/CodexBar-Mobile \
--base mobile-dev \
--head <branch-name> \
--draft \
--title "<title>" \
--body "<body>"Use draft PRs for long-running feature branches until local verification and the review loop are complete.
Review And CI Loop
This repository deliberately separates review feedback from expensive CI. The
fork-owned invariant is documented in docs/ci-policy.md:
- Every PR push runs only
PR Fast Checks; do not add macOS/Linux matrices topull_requestsynchronize events while addressing review feedback. - Merge to
mobile-devtriggers one diff-selected Final CI run. - Verified
upstream-sync/*merges reuse upstream release checks instead of repeating the complete upstream matrix. - Use manual Final CI with
full=trueonly for unresolved provenance, risky conflict resolution, or an explicitly requested complete rerun.
Code review may therefore finish before heavy CI exists on the PR. PR Fast Checks and Codex Code Review are independent gates: a green check run never means review is complete. After merge, check Final CI before public release; a failure is fixed forward and public release remains blocked until the relevant final gate passes. TestFlight beta uploads are independent of this remote CI gate.
After pushing or opening a PR, check status from GitHub, not memory:
gh pr view --repo o1xhack/CodexBar-Mobile <number-or-url> --json state,isDraft,headRefName,baseRefName,mergeStateStatus,reviewDecision,statusCheckRollup,url
gh run list --repo o1xhack/CodexBar-Mobile --branch <branch-name> --limit 10If checks fail, inspect the failed run and logs, fix, retest locally, commit, and push again:
gh run view --repo o1xhack/CodexBar-Mobile <run-id> --log-failed
git pushFor every PR, including docs-only, review-fix, and release-closeout PRs:
- Record the current
headRefOid, trigger@codex review, and keep polling. Do not merge while the requested review is still in flight. - Inspect thread-aware review state, not only checks or flat comments. Every finding must be fixed and retested.
- Reply to the finding with the fix commit/evidence, explicitly resolve the GitHub review thread, then push and request another Codex review.
- Any new push invalidates the previous clean result. The final clean review
must name the exact current head, and every thread—including outdated
threads—must show
isResolved=true. - Run
Scripts/check_pr_review_gate.sh <pr>immediately before merge. A pass requires the current-headDidn't find any major issuesresult and zero unresolved threads. CI must also be green.
The loop is review -> fix -> test -> reply -> resolve -> push -> review until
clean. After five review rounds, do not continue making narrow patches by
reflex. Before a sixth review, stop and write a Codex review architecture
audit PR comment that includes the current head, repeated finding pattern,
root design/requirements problem, and revised approach. Re-plan or rewrite the
affected slice, then resume the loop. The audit is not a merge override: the
final current-head clean review and zero-thread gate still apply.
Use these exact non-empty fields so the merge gate can validate the audit:
Codex review architecture audit
Head: <current head SHA>
Repeated finding pattern: <what keeps recurring>
Root design/requirements problem: <shared underlying cause>
Revised approach: <what will be redesigned or rewritten>For release/upstream-sync work, merge, tag creation, Mac live release, and appcast publication are blocked until this PR review gate passes. Review-fix and closeout PR merges are not exceptions.
Independent TestFlight Beta Uploads
When the user authorizes TestFlight, upload directly from the task branch if needed. A PR, completed Codex review, merge to mobile-dev, and remote CI completion are not prerequisites. Do not create a PR solely to unlock TestFlight.
Retain relevant local builds/tests, version and build-number checks, four-language release notes, signing, and CloudKit Production checks. Record the source commit, uploaded version/build, Apple processing/beta-access results, and known validation gaps. An upload does not authorize merging, tagging, or a public App Store release. If a PR exists, its review/CI workflow continues independently; beta upload does not mark those gates passed or waive them for a later merge.
Before promoting a beta build to App Review/public release, verify its recorded archive source commit and tree against the clean reviewed release source. The selected ASC build must contain the exact reviewed code, resources, build settings and version; an unrelated clean review on a newer head is not evidence for an older binary. Record the archive/IPA hash and ASC build ID with that provenance. If review fixes change any shipped inputs, or provenance cannot be established, archive and upload a new build and select that build for submission. Docs-only follow-ups do not require a new binary when the shipped inputs are identical.
Todoist Handoff
After pushed commits for CodexBar Mobile, update Todoist if the tools are available.
- Project:
Dev - Required label:
CodexBar-Mobile - Add
Bugfor bug/crash/fix work. - Add
商业化for paid/member-facing work. - Board columns:
Backlog→Next→In Progress→Code Complete→QA→Release. - Keep
Nextshort: only the picks queued to start soon; other candidates stay inBacklog. - Move active work to
In Progress. - After pushed code is complete, move it to
Code Complete; do not mark complete. - Move it to
QAfor human QA/TestFlight/user validation. - After QA passes, move it to
Releasewhen it is submitted to App Review or a release is published. - Only mark done (in
Release) after user confirmation or verified release truth (for example App StoreREADY_FOR_SALEor a live GitHub release).
Comment format:
[YYYY-MM-DD] <concise progress summary>
https://github.com/o1xhack/CodexBar-Mobile/commit/<sha>Point Todoist comments to the commit or CHANGELOG.md; do not duplicate full release notes there.
Branch Cleanup
Only clean up branches after the user confirms merge/release closure or the PR merge operation itself includes cleanup.
Before deleting:
git fetch origin --prune
git branch --merged mobile-dev
gh pr view --repo o1xhack/CodexBar-Mobile <number-or-url> --json state,mergedAt,headRefName,urlDelete only merged branches:
git branch -d <branch-name>
git push origin --delete <branch-name>Use -D or force-push only with explicit user authorization.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

