ワンクリックで
eforge-stack
Synchronize the git-spice stack, preview with dry-run, interpret the sync report, and recover from manual sync conflicts
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Synchronize the git-spice stack, preview with dry-run, interpret the sync report, and recover from manual sync conflicts
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Enqueue a source for the eforge daemon to build — PRD file, inline description, or conversation context. Use when the user wants to hand work off to eforge.
Initialize or edit eforge/config.yaml team-wide settings, with validation via daemon tools
Author eforge TypeScript extensions from a natural-language request using the existing extension tooling and docs/examples
Inspect the recovery verdict for a failed PRD and apply the recommended action (retry, continue-repair, abandon, or manual)
Create a new agent runtime profile in eforge/profiles/
List, inspect, and switch agent runtime profiles
| name | eforge-stack |
| description | Synchronize the git-spice stack, preview with dry-run, interpret the sync report, and recover from manual sync conflicts |
| disable-model-invocation | true |
Manually synchronize the git-spice stack for this project. Use --dry-run to preview what commands would run without executing them.
This skill covers manual eforge stack sync recovery. During stacked PR landing with landing.action: pr, eforge attempts automatic provider-encapsulated recovery for provider-classified recoverable restack conflicts before asking for manual intervention. Landing also preflights the remote base: if a missing parent branch's artifact commit is an ancestor of trunk, eforge automatically performs branch-scoped stale-parent repair by tracking initially untracked children against trunk or retargeting already tracked children; otherwise it fails closed with manual stack-base repair guidance. Before submitting the PR, landing runs provider repo sync, branch restack, and a remote-base freshness proof for the branch being submitted.
Stack sync is a daemon-owned operation that runs from the project root. The daemon calls git-spice repo sync followed by git-spice stack restack. Triggers include: this command (/eforge:stack:sync), the CLI (eforge stack sync), the eforge_stack_sync tool, and — when stacking.sync.afterBuild: true is configured — automatically after each build completes.
Stack sync requires stacking.enabled: true in eforge/config.yaml and git-spice initialized in the repository (git-spice repo init). If stacking is not enabled the daemon returns outcome: "skipped" with a reason.
Check $ARGUMENTS for --dry-run. If present, set dryRun: true in the tool call.
Call the eforge_stack_sync tool with { dryRun: <true|false> }.
The tool returns a structured sync report. Interpret each field:
| Field | Meaning |
|---|---|
outcome | One of "skipped", "complete", "deferred", "failed", "conflict" |
reason | Human-readable reason (always present for skipped/deferred/failed/conflict) |
stackingActive | Whether stacking is enabled and active for this project |
dryRun | Whether this was a preview-only run |
localTrunkSha | SHA of the local trunk branch |
originTrunkSha | SHA of origin/<trunk> |
fastForward | True when local trunk is at or behind origin (fast-forward eligible) |
restackCandidates | Artifact branches eligible for restack |
activeBuildSkips | Branches/worktrees skipped because active builds are using their worktrees and overlap the stack candidate set |
providerCommands | git-spice commands that ran (or would run in dry-run) |
error | Error message when outcome is "failed" or "conflict" |
skipped - Stacking is not enabled or no stacking configuration found. Nothing was changed. Show the reason to the user. Suggest enabling stacking with /eforge:config or /eforge:workflow.
complete - All eligible artifact branches were restacked onto the latest trunk. Show the list of providerCommands that ran and the restackCandidates that were processed.
deferred - Active builds are running and their worktrees overlap the stack candidate set. The restack step was skipped to avoid conflicting with in-flight builds. Show activeBuildSkips and reason. The activeBuildPolicy field will be "defer" when a deferred outcome was explicitly requested. If stacking.sync.afterBuild: true is configured, the daemon will retry deferred syncs after each build completes — no manual action is needed. Otherwise, suggest waiting for active builds to complete and then running /eforge:stack:sync again.
failed - The sync command exited with a non-zero code. Show error and the failed providerCommands. Suggest running git-spice manually to investigate, then re-running sync after resolving the issue.
conflict - A manual sync restack step hit a merge conflict. Show error and the providerCommands list. Proceed with the manual sync conflict recovery flow below.
When activeBuildSkips is non-empty, report which branches were excluded and why. These branches were left unchanged because active eforge builds are using their worktrees. When outcome is "deferred", the entire restack step was skipped; when outcome is "complete", only the listed branches were skipped and the rest were restacked. Re-run sync after the active builds complete to restack the skipped branches.
When fastForward is false, the local trunk is ahead of origin/<trunk>. Sync uses a fast-forward-only trunk policy: it will not force-push or rebase trunk. Tell the user to push or align their local trunk before syncing.
When outcome is "conflict", the conflict came from eforge stack sync. Do not describe this as the stacked PR landing recovery path; landing recovery runs automatically first for provider-classified recoverable restack conflicts, stale-parent landing repair is automatic and branch-scoped when parent artifact ancestry proves trunk integration (tracking initially untracked children against trunk or retargeting already tracked children), and landing-time sync/freshness is automatic for the branch being submitted.
When outcome is "conflict":
A merge conflict occurred during manual stack sync restack. To recover:
- Run
git statusto see the conflicting files.- Resolve the conflicts in the affected files.
- Run
git add <resolved-files>to stage the resolved files.- Run
git rebase --continue(or the git-spice equivalent) to resume the restack.- Once the restack finishes, run
/eforge:stack:syncagain to sync remaining branches.
When dryRun is true:
providerCommands with its command and args.restackCandidates — the branches that would be restacked.activeBuildSkips — branches that would be skipped due to active builds.| Skill | Command | When to suggest |
|---|---|---|
| Workflow | /eforge:workflow | User wants to configure workflow preset (stacking, landing action, auto-sync) |
| Config | /eforge:config | User wants to enable/disable stacking or change sync config |
| Status | /eforge:status | User wants to check build progress before sync |