Skip to content

finos/morphir-scala / .claude/skills/squire

squire

Verified

Use when morphir-scala work needs environment diagnostics or build/network/sandbox unblocking; reference repository management; branch lifecycle refresh after squash-merging a target branch into main; Morphir IR spec/schema sync or export; or task-tracking configuration and beads mode resolution.

FileKindSize
.gitignoreother180 B
.mill-versionother19 B
README.mdmarkdown7.6 KB
SKILL.mdskill md6.7 KB
SquireBranch.scalaother6.4 KB
SquireCellar.scalaother7.4 KB
SquireChangelog.scalaother20.6 KB
SquireDoctor.scalaother13.9 KB
SquireEnv.scalaother16.2 KB
SquireModel.scalaother4.9 KB
SquireProcess.scalaother1.5 KB
SquireRepo.scalaother30.4 KB
SquireSchemas.scalaother25.2 KB
SquireSpec.scalaother35.6 KB
SquireTests.scalaother323.1 KB
SquireTracking.scalaother16.4 KB
SquireVersionCorpus.scalaother3.3 KB
millexecutablescript6.5 KB
mill.batscript9.7 KB
references/branch.mdmarkdown4.4 KB
references/cellar.mdmarkdown4.4 KB
references/doctor.mdmarkdown5.3 KB
references/env.mdmarkdown3.9 KB
references/mill-morphir.mdmarkdown1.6 KB
references/repo.mdmarkdown7.6 KB
references/spec-sync.mdmarkdown10.6 KB
references/tracking.mdmarkdown10.9 KB
squireexecutablescript1.2 KB
squire.batscript1.8 KB
squire.scalaother36.8 KB
test-resources/META-INF/services/kyo.test.Testother275 B
test-resources/schemas/morphir-ir-v4.jsonconfig107.1 KB
test-resources/schemas/morphir-ir-v4.yamlconfig74.2 KB

references/branch.md

View on GitHub
# Squire branch refresh — Post-squash Branch Lifecycle

`/squire branch refresh` safely moves a remote target branch to the current
`origin/main` after the target-to-main pull request has been squash-merged. The
`--target` parameter defaults to `develop`; pass another branch name when
refreshing a different integration branch.

The command does **not** check out or switch a branch, reset the current branch,
modify files, stage changes, or otherwise affect the dirty worktree. Its fetch
does update local `origin/main` and `origin/<target>` remote-tracking refs and
`FETCH_HEAD`; because it uses `--prune`, it may also remove stale local
remote-tracking refs. The remote target branch is unchanged unless the final
leased push succeeds.

## Expected workflow

Use this only after a maintainer confirms in GitHub that the target-to-main PR
was squash-merged and its merge commit is visible on `origin/main`:

```bash
# Prove that develop can be refreshed, without pushing.
.claude/skills/squire/squire branch refresh --dry-run

# Repeat the proof and refresh develop.
.claude/skills/squire/squire branch refresh
```

For another target branch, supply the `--target` parameter:

```bash
.claude/skills/squire/squire branch refresh --dry-run --target <branch>
.claude/skills/squire/squire branch refresh --target <branch>
```

`--dry-run` performs every fetch and safety check but never pushes. It therefore
still updates the local fetch metadata described above. Run it first, then run
the same command without `--dry-run` only after reviewing the validated target
and SHAs.

## Safety proof

Before changing the remote target branch, Squire:

1. Validates the target branch name and refuses `main` as the target.
2. Explicitly fetches the authoritative `origin/main` and `origin/<target>`
   branch heads into their remote-tracking refs. It does not rely on a clone's
   configured fetch refspec or potentially stale local refs.
3. Returns `already-current` without querying GitHub or pushing when those two
   freshly fetched refs are equal.
4. Otherwise requires the current `origin/<target>` SHA to exactly equal the
   `headRefOid` of a merged `<target>`-to-`main` pull request.
5. Requires the merge commit returned for that PR to exist and be reachable
   from the freshly fetched `origin/main`.
6. On a non-dry run, performs only this remote mutation: an explicit
   `--force-with-lease` push whose lease expects the validated target SHA and
   whose source is the validated `origin/main` tracking ref.

Squash merge is a maintainer workflow precondition, not something Squire
can prove. The GitHub fields it queries identify a merged PR, its `headRefOid`,
and its merge commit, but do not distinguish squash from other merge methods.
The operator must confirm the PR was squash-merged before running the command;
Squire then proves the exact target-head match and merge-commit reachability
described above.

The resulting push has this exact shape:

```bash
git push --force-with-lease=refs/heads/<target>:<validated-target-sha> origin refs/remotes/origin/main:refs/heads/<target>
```

`<validated-target-sha>` is the freshly fetched target SHA that exactly matched
the merged PR's `headRefOid`. If the remote target no longer has that SHA, the
lease rejects the push.

The exact head match is deliberate. If the target advanced after the matching
PR merged, the proof fails and the script refuses to push. It never retries
with, suggests, or offers an unconditional force push.

## Failure recovery

- **Fetch, authentication, or GitHub CLI failure:** fix network or `git`/`gh`
  authentication, then rerun the dry run. Do not bypass the proof.
- **No merged PR matches the target SHA:** the wrong target may have been
  selected, or the target advanced after the PR. Inspect the remote target and
  merged PR, preserve any new commits through a new PR, and rerun the dry run
  only after the branch lifecycle is understood.
- **Merge commit is not reachable from `origin/main`:** confirm the PR was
  squash-merged into `main` and that GitHub exposes the merge on the expected
  repository. Retry later if the remote view has not converged.
- **Lease rejection:** the target changed after validation. Fetch and inspect
  the new tip, then rerun `--dry-run`; never replace the lease with `--force`.

After a successful refresh, `origin/<target>` and `origin/main` point at the
same commit. Existing local branches are intentionally left alone; collaborators
can update their local view with their normal fetch/rebase workflow.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall