Skip to content

feat(skills): add fast-forward to level the default branch and land changes - #141

Merged
synthet merged 2 commits into
mainfrom
feat/fast-forward-skill
Nov 29, 2026
Merged

synthet merged 2 commits into
mainfrom
feat/fast-forward-skill

Conversation

@synthet

@synthet synthet commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

New global skill /fast-forward, user-typed only. It brings the default branch level with origin and lands the intended tracked changes through a small PR, merged pinned to the pushed commit. It's the sequence used on synth-term to land tracker snapshot PR #32.

Steps and guards

  1. Confirm the target: the repository's own default branch, with --repo named on every gh call, since a fork otherwise targets its parent. It asks before switching branches in a checkout another session shares.
  2. Fetch and fast-forward: --ff-only only, and it stops when incoming commits touch files with uncommitted changes. Local commits on the default branch move to a branch (git switch -c, then git branch -f <default> origin/<default>, never reset); they're never pushed directly.
  3. Commit: only the intended tracked paths, staged explicitly (never git add -A), after a secrets check. Untracked files stay untracked and are listed in the report.
  4. Push and open the PR: git push origin <branch> without -u, because -u writes branch tracking into .git/config. The staged-diff scan for secrets, machine paths and identities blocks the push on a hit, and public repositories also go through commit-and-push's checks.
  5. Merge, pinned to the full 40-character SHA and only when every run and check on the pushed SHA has completed green, with headRefOid equal to the pushed commit. If CI exists but no run registered, or the repository has no CI, it hands the merge to /merge-pr. On a conflict it merges the default branch in and regenerates generated files, with no force-push.
  6. Fast-forward the local default branch until it's 0 ahead and 0 behind, then delete the branch with -d.

Also: a library.json global entry, an inventory row, a regenerated asset inventory, and the eval fixture fast-forward-lands-through-pinned-pr.

Checks

  • sync --check, inventory --check, okf_lint, frontmatter, portability and secrets checks all pass.
  • 17 eval fixtures validated.
  • pytest tests: 319 passed.

Refs scf-sh3h2

🤖 Generated with Claude Code

synthet and others added 2 commits November 28, 2026 19:35
…hanges

Captures the fetch -> --ff-only pull -> branch commit -> PR -> pinned
merge -> fast-forward sequence used on synth-term (#32), with the
guards it needed: stop when incoming commits touch dirty files, never
push or force the default branch, leave untracked files alone, name the
repo on every gh call, merge pinned to the full SHA, merge origin and
regenerate on conflict, end at 0/0 and delete the branch with -d.

Refs scf-sh3h2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes: push without -u (it writes .git/config); require every run
and check on the pushed SHA to be green and hand no-CI cases to
/merge-pr; confirm headRefOid; move the default branch with
git branch -f, never reset; make the secrets scan block the push and
add the public-repo checks; describe upstream sync generically; note
branch -d may already be done; CHANGELOG entry; fixture pins all.

Refs scf-sh3h2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@synthet
synthet merged commit a2108c8 into main Nov 29, 2026
1 check passed
@synthet
synthet deleted the feat/fast-forward-skill branch November 29, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant