Skip to content

fix: align --help output with actual flag parser (#6)#86

Merged
mattleaverton merged 1 commit into
danshapiro:mainfrom
mattleaverton:fix/6-align-help-with-parser
Apr 27, 2026
Merged

fix: align --help output with actual flag parser (#6)#86
mattleaverton merged 1 commit into
danshapiro:mainfrom
mattleaverton:fix/6-align-help-with-parser

Conversation

@mattleaverton
Copy link
Copy Markdown
Collaborator

Summary

From docs/plans/2026-04-24-kilroy-fixes-from-feedback.md item #6.

Bug: kilroy attractor run --help did not document --tmux, --prompt-file, --label, --workspace, --input, --package, --detach, or --skip-preflight. kilroy attractor runs --help listed only list and prune — no show, no wait. Every flag the shipped skills depend on was undiscoverable.

Fix:

  1. Updated usage strings in cmd/kilroy/main.go (top-level usage()) and cmd/kilroy/attractor_runs.go (runsUsage()) to list every flag the parser accepts.
  2. Added TestHelpUsageDrift — static-scan drift test that reads the source, extracts case "--foo": arms, extracts flags from fmt.Fprintln usage lines, and asserts every parser flag appears in the usage text. This is the durable fix — the same drift will happen again otherwise.

Named constants (like skipCLIHeadlessWarningFlag) are automatically excluded by the string-literal check, so no allowlist needed.

Flags newly documented

attractor run: --tmux, --package, --input, --prompt-file, --workspace, --label, --skip-preflight.
attractor runs prune: --older-than.
attractor runs: show and wait subcommands added to top-level usage.

Test plan

  • TestHelpUsageDrift with 5 subtests — all pass.
  • Manually verified it fails on intentional drift (add a new case arm without updating usage).
  • go test ./cmd/kilroy/... passes.

Risks / follow-ups

  • Coverage gap: drift test covers attractorRun, attractorRunsList/Show/Wait/Prune. Other parsers (attractorResume, attractorStatus, attractorStop) follow the same pattern — one t.Run per function. Worth extending.

Context

Produced by a dogfood quick-launch run against this repo.

🤖 Generated with Claude Code

@mattleaverton mattleaverton merged commit 97f9584 into danshapiro:main Apr 27, 2026
1 check failed
@mattleaverton mattleaverton deleted the fix/6-align-help-with-parser branch April 27, 2026 17:57
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