## Environment - Plannotator: `0.25.1` - GitButler CLI: `but 0.22.0` - OS: macOS arm64 - Surface: Pi / `plannotator review` ## Reproduction 1. Use a GitButler workspace with `but 0.22.0`. 2. Run: ```bash plannotator review ``` ## Actual result Plannotator invokes: ```bash but --format json status ``` GitButler 0.22.0 rejects that flag: ```text error: unexpected argument '--format' found tip: 'status --short' exists ``` Plannotator then fails with: ```text GitButlerContractError: GitButler status failed: error: unexpected argument '--format' found ``` ## Expected result Either GitButler `0.22.0` should work, because Plannotator currently documents/accepts `but >= 0.21.0`; or Plannotator should raise its documented and enforced minimum GitButler version to the first release supporting `--format json`. GitButler 0.22.0 supports this equivalent command and returns the required JSON fields (`mergeBase`, `stacks`, and `uncommittedChanges`): ```bash but --json status ``` ## Context GitButler changed the JSON-output syntax in [gitbutlerapp/gitbutler#14061](https://github.com/gitbutlerapp/gitbutler/pull/14061): > `feat(cli)!: remove --json in favor of --format json` Plannotator’s GitButler integration was added in [backnotprop/plannotator#1067](https://github.com/backnotprop/plannotator/pull/1067) and currently invokes only the newer syntax while setting `GITBUTLER_MIN_VERSION = "0.21.0"`. ## Suggested fix Use a capability-based fallback: ```ts const result = await runtime.runBut(["--json", "status"], ...); if (result.exitCode !== 0 && stderrIndicatesUnsupportedJsonFlag(result.stderr)) { return runtime.runBut(["--format", "json", "status"], ...); } ``` Only retry when the first command specifically fails because the JSON flag is unsupported; do not retry arbitrary status failures.