Skip to content

feat(scripts): --help/--version on cap-probe, score-checkpoint, force-claim#198

Merged
NagyVikt merged 1 commit into
mainfrom
agent/claude/helper-script-help-flags-2026-05-18-16-52
May 20, 2026
Merged

feat(scripts): --help/--version on cap-probe, score-checkpoint, force-claim#198
NagyVikt merged 1 commit into
mainfrom
agent/claude/helper-script-help-flags-2026-05-18-16-52

Conversation

@NagyVikt
Copy link
Copy Markdown
Contributor

Summary

Implements docs/future/PROTOCOL.md §22.4.1 (PROPOSED → done): wires
--help / -h and --version flags into three previously flag-less
bash entry points via a tiny shared lib.

  • scripts/codex-fleet/lib/version.sh — new. Exposes FLEET_VERSION
    (env override > nearest git tag > 0.0.0-dev) and
    handle_help_version_flags "$@".
  • scripts/codex-fleet/{cap-probe,score-checkpoint,force-claim}.sh
    each sources lib/version.sh and calls handle_help_version_flags
    before its real argv parsing. Every existing flag / arg still passes
    through unchanged.
  • tests/scripts/test-script-help.sh — new smoke test asserting exit 0
    • non-empty, script-name-bearing stdout for all six --help /
      --version invocations.

No existing logic was refactored; this is purely additive.

Acceptance evidence

$ bash scripts/codex-fleet/cap-probe.sh --help          # exit=0
cap-probe.sh — verify candidate codex accounts are usable.
$ bash scripts/codex-fleet/cap-probe.sh --version       # exit=0
cap-probe.sh 0.0.0-dev
$ bash scripts/codex-fleet/score-checkpoint.sh --help   # exit=0
score-checkpoint.sh — score uncommitted diffs in active Guardex
$ bash scripts/codex-fleet/score-checkpoint.sh --version # exit=0
score-checkpoint.sh 0.0.0-dev
$ bash scripts/codex-fleet/force-claim.sh --help        # exit=0
force-claim.sh — dispatch ready plan sub-tasks across all
$ bash scripts/codex-fleet/force-claim.sh --version     # exit=0
force-claim.sh 0.0.0-dev
$ bash tests/scripts/test-script-help.sh
test-script-help: 6 passed, 0 failed                    # exit=0
$ bash -n on all five touched files                     # OK

shellcheck was unavailable on the build host; bash -n parsed every
modified file cleanly. Pass-through sanity check:
bash scripts/codex-fleet/force-claim.sh --dry-run still runs one_pass
and exits 0.

Test plan

  • --help exits 0 with non-empty stdout for all three scripts
  • --version exits 0 and prints <basename> <version> for all three
  • tests/scripts/test-script-help.sh exits 0
  • bash -n on every touched file
  • CI green

…int, force-claim

Wires a small shared lib/version.sh (FLEET_VERSION + handle_help_version_flags)
into the three entry-point scripts so each accepts --help/-h and --version
before its real argv parsing runs. Adds tests/scripts/test-script-help.sh
as a smoke test that asserts exit 0 + non-empty, name-bearing output for
every flag/script combination.

Implements PROTOCOL.md section 22.4.1 (PROPOSED → done) without touching
any other script logic.
@NagyVikt NagyVikt merged commit 42da011 into main May 20, 2026
2 checks passed
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