| @@ -40,8 +40,9 @@ can restore the previous branch tips, PR bases, and stack metadata. · 39 unmodified lines |
| 40 | 40 | - `stack status`: show the relevant tracked stack graph and include open PR details when GitHub is available. |
| 41 | 41 | - `stack guide`: print the opinionated happy path for agents and humans. |
| 42 | 42 | - `stack track <branch> --onto <parent>`: record stack intent for an existing branch. |
| 43 | | −- `stack sync --dry-run`: preview inferred PR-base stack links and repairs without changing branches or PRs. |
| 44 | | −- `stack sync`: infer clear PR-base stack links, repair descendants, retarget PRs, and refresh stack blocks. |
| 43 | +- `stack sync --dry-run [branch]`: preview inferred PR-base stack links and repairs without changing branches or PRs. |
| 44 | +- `stack sync [branch]`: infer clear PR-base stack links, repair descendants, retarget PRs, and refresh stack blocks. With a branch argument, sync only the stack containing that branch. |
| 45 | +- `stack sync --continue-on-failure` / `stack sync --keep-going`: process independent stacks, summarize successes and failures, and exit nonzero if any stack failed. |
| 45 | 46 | - `stack doctor`: inspect local Git, GitHub, stack metadata, trunk branches, and undo journal health without changing anything. |
| 46 | 47 | - `stack merge [branch]`: dry-run root PR merge plus descendant repair. |
| 47 | 48 | - `stack merge [branch] --apply`: retarget immediate child PRs, squash-merge the root PR, then repair descendants. |
| @@ -58,6 +59,8 @@ gh pr create --base dev --head stack-a · 10 unmodified lines |
| 58 | 59 | gh pr create --base stack-a --head stack-b |
| 59 | 60 | stack sync --dry-run |
| 60 | 61 | stack sync |
| 62 | +stack sync cleanup/schema-source |
| 63 | +stack sync --keep-going |
| 61 | 64 | ``` |
| 62 | 65 | |
| 63 | 66 | Prefer this workflow. `stack sync --dry-run` should show the inferred links, and |
| @@ -112,6 +115,17 @@ changed, or the repo needs the safe common maintenance flow. It: · 48 unmodified lines |
| 112 | 115 | Run `stack sync --dry-run` first when you want a preview of inferred links and |
| 113 | 116 | repairs before mutation. |
| 114 | 117 | |
| 118 | +`stack sync <branch>` scopes sync to the stack containing that branch. If no |
| 119 | +branch is provided and the current branch is stack-relevant, bare `stack sync` |
| 120 | +scopes to the current stack; if the current branch is off-stack, it keeps the |
| 121 | +repo-wide behavior. `--dry-run` follows the same scoping rules. |
| 122 | + |
| 123 | +Use `stack sync --continue-on-failure` or `stack sync --keep-going` when one |
| 124 | +independent stack should not block the rest. It runs each root stack separately, |
| 125 | +prints succeeded and failed stacks, preserves the usual failure cleanup block for |
| 126 | +each failed stack, saves undo information for every mutated stack, and exits |
| 127 | +nonzero if any stack failed. |
| 128 | + |
| 115 | 129 | Sync output is intentionally outcome-oriented. It should show the stack tree with |
| 116 | 130 | icons like `●`, `✓`, `◌`, and `✕`, plus changed PRs/backups/undo instructions. It |
| 117 | 131 | should not default to internal phase logs like fetch, inspect, or reconcile. |