agentleFS
o1xhacko1xhack/CodexBar-Mobile/.agents/skills/codexbar-git-workflow/SKILL.md

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

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
  1. Very specific:

    Use Git and GitHub for CodexBar branch, commit, push, PR, and branch cleanup work.

    line 8
  2. Distinctive:

    Start every branch/commit operation from the repo root.

    line 12
  3. Distinctive:

    If the work must start from the latest mainline:

    line 20
  4. Distinctive:

    Do not discard, stash, reset, or overwrite unrelated user changes.

    line 27
  5. Distinctive:

    Create a task branch before implementation unless the user only asked for read-only analysis.

    line 31
  6. Very specific:

    Never push to upstream. Only push branches to origin.

    line 52
  7. Very specific:

    Run the relevant checks before committing.

    line 78
  8. Distinctive:

    Do not bump build numbers for every internal checkpoint commit on a long-lived branch.

    line 96
  9. Very specific:

    Do not change MARKETING_VERSION unless explicitly requested or required by the release plan.

    line 103
  10. Very specific:

    Keep same-MARKETING_VERSION in-app release notes in one block.

    line 104
  11. Distinctive:

    Follow the 4-language localization rule for release notes and all user-facing text.

    line 105
  12. Distinctive:

    Use draft PRs for long-running feature branches until local verification and the review loop are complete.

    line 129
  13. Very specific:

    Every PR push runs only PR Fast Checks.

    line 136
  14. Very specific:

    Use manual Final CI with full=true only for unresolved provenance, risky conflict resolution, or an explicitly requested complete rerun.

    line 141
  15. Distinctive:

    After pushing or opening a PR, check status from GitHub, not memory:

    line 150
  16. Distinctive:

    If checks fail, inspect the failed run and logs, fix, retest locally, commit, and push again:

    line 157
  17. Distinctive:

    Do not merge while the requested review is still in flight.

    line 167
  18. Very specific:

    Run Scripts/check_pr_review_gate.sh <pr> immediately before merge.

    line 175
  19. Distinctive:

    Use these exact non-empty fields so the merge gate can validate the audit:

    line 187
  20. Distinctive:

    When the user authorizes TestFlight, upload directly from the task branch if needed.

    line 203
  21. Distinctive:

    If a PR exists, its review/CI workflow continues independently.

    line 211
  22. Distinctive:

    Before promoting a beta build to App Review/public release, verify its recorded archive source commit and tree against the clean reviewed …

    line 214
  23. Distinctive:

    If review fixes change any shipped inputs, or provenance cannot be established, archive and upload a new build and select that build for …

    line 219
  24. Distinctive:

    After pushed commits for CodexBar Mobile, update Todoist if the tools are available.

    line 225
  25. Very specific:

    Add Bug for bug/crash/fix work.

    line 229
  26. Very specific:

    Add 商业化 for paid/member-facing work.

    line 230
  27. Very specific:

    Keep Next short: only the picks queued to start soon.

    line 232
  28. Very specific:

    After pushed code is complete, move it to Code Complete.

    line 234
  29. Very specific:

    After QA passes, move it to Release when it is submitted to App Review or a release is published.

    line 236
  30. Very specific:

    Only mark done (in Release) after user confirmation or verified release truth (for example App Store READY_FOR_SALE or a live GitHub …

    line 237
  31. Distinctive:

    Only clean up branches after the user confirms merge/release closure or the PR merge operation itself includes cleanup.

    line 250
  32. Distinctive:

    Delete only merged branches:

    line 260
  33. Very specific:

    Use -D or force-push only with explicit user authorization.

    line 267

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 --prune

If the work must start from the latest mainline:

git switch mobile-dev
git pull --ff-only origin mobile-dev

Do 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 typeBranch shape
New user-facing featurefeature/<short-slug>
Smaller function/tooling additionfunction/<short-slug>
Bug fixfix/<short-slug>
Research/docs-only investigationresearch/<short-slug>
Upstream syncupstream-sync/<target-upstream>-mobile.<target-mobile>
Release preparationrelease/<version-or-slug>
Post-merge/review cleanupreview/<short-slug>

Create the branch:

git switch -c <branch-name>
git status --short --branch

Never 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 --cached

Run 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 suite
  • feat(ios): add widget shared snapshot cache
  • feat(widgets): add provider usage widgets
  • fix(sync): preserve stale provider timestamps
  • test(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_VERSION values together.
  • Do not change MARKETING_VERSION unless explicitly requested or required by the release plan.
  • Keep same-MARKETING_VERSION in-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 to pull_request synchronize events while addressing review feedback.
  • Merge to mobile-dev triggers 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=true only 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 10

If 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 push

For every PR, including docs-only, review-fix, and release-closeout PRs:

  1. Record the current headRefOid, trigger @codex review, and keep polling. Do not merge while the requested review is still in flight.
  2. Inspect thread-aware review state, not only checks or flat comments. Every finding must be fixed and retested.
  3. Reply to the finding with the fix commit/evidence, explicitly resolve the GitHub review thread, then push and request another Codex review.
  4. 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.
  5. Run Scripts/check_pr_review_gate.sh <pr> immediately before merge. A pass requires the current-head Didn't find any major issues result 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 Bug for bug/crash/fix work.
  • Add 商业化 for paid/member-facing work.
  • Board columns: Backlog → Next → In Progress → Code Complete → QA → Release.
  • Keep Next short: only the picks queued to start soon; other candidates stay in Backlog.
  • Move active work to In Progress.
  • After pushed code is complete, move it to Code Complete; do not mark complete.
  • Move it to QA for human QA/TestFlight/user validation.
  • After QA passes, move it to Release when 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 Store READY_FOR_SALE or 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,url

Delete only merged branches:

git branch -d <branch-name>
git push origin --delete <branch-name>

Use -D or force-push only with explicit user authorization.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.