Usage: rebar <subcommand> [args...]

Run 'rebar <subcommand> --help' for usage of a specific subcommand.

Subcommands:
  show                  Show ticket details.
  list                  List all tickets as JSON.
  next-batch            Select next parallel agent batch for an epic.
  deps                  Show dependency graph for a ticket.
  ready                 List tickets ready to work (all blockers closed).
  search                Full-text search over titles/descriptions/comments/tags.
  session-logs          List the newest session_log tickets, newest first.
  validate              Repo-wide tracker health check (scores the whole store 1-5).
  get-file-impact       Get the current file impact array for a ticket (JSON).
  get-verify-commands   Get the current verify commands array for a ticket (JSON).
  exists                O(1) presence check (exit 0=exists, 1=not found).
  resolve               Resolve an id/alias/prefix to a canonical ticket id.
  format                Render a ticket for display.
  list-descendants      BFS walk from a root ticket, bucketed by type (JSON).
  clarity-check         Score one ticket's clarity (exit 0=pass, 1=fail).
  check-ac              Check one ticket has an Acceptance Criteria block.
  quality-check         Check one ticket's dispatch readiness.
  summary               One-line ticket summary with blocking status for one or more IDs.
  sign                  Sign a ticket's manifest of verified steps with the environment key.
  verify-signature      Certify that a ticket's verified steps match its signature.
  compact               Compact a ticket's event log.
  compact-all           Compact all eligible tickets.
  export                Export the store as NDJSON (one ticket per line).
  import                Import tickets from export NDJSON for a clean rebar-to-rebar migration.
  transition            Transition ticket status (optimistic concurrency).
  reopen                Reopen a closed ticket (closed -> open; exit 10 if not currently closed).
  claim                 Atomically claim an open ticket (-> in_progress + assignee; exit 10 if taken).
  create                Create a new ticket.
  idea                  Capture an undesigned idea (creates an epic in status 'idea'; excluded from ready/next-batch).
  comment               Add a comment to a ticket.
  link                  Link two tickets (relation REQUIRED: blocks|depends_on|relates_to|duplicates|supersedes|discovered_from|caused_by).
  unlink                Remove a link: unlink <source> <target> [relation] (no relation: most-recent for pair; relation: exactly that relation).
  revert                Revert a ticket to a prior event UUID.
  edit                  Edit ticket fields (--title, --priority, --assignee, --ticket_type, --description, --parent; tags via --add-tag/--remove-tag/--set-tags).
  tag                   Add a tag to a ticket.
  untag                 Remove a tag from a ticket.
  archive               Archive an open ticket (excludes from default list; idempotent).
  set-file-impact       Record file impact for a ticket (JSON array of {path,reason} objects).
  set-verify-commands   Record DD-level verify commands (JSON array of {dd_id,dd_text,command}).
  attach-commits        Link commits to a ticket by SHA (repairs a missing rebar-ticket: trailer).
  session-log           Capture helper: append "<entry>" to the current session_log (start rotates to a fresh log).
  reconcile             Preview or synchronize Jira reconciliation for a repository.
  review-code           Run an LLM code review of a change (a git range or a diff file) and emit aggregated structured findings. Requires the 'agents' extra and an API key.
  scan-spec             Batch-scan open epics against a specification and emit structured findings (gaps, conflicts, and overlaps). Requires the 'agents' extra.
  verify-completion     Run the completion-verifier agent on a ticket and emit a PASS or FAIL verdict for whether its completion requirements are demonstrably met by the implementation. Completion requirements are the acceptance, success, and close criteria and the definitions of done, and for a bug, that the bug is resolved. Requires the 'agents' extra and a model API key. Run `rebar verify-completion --check` to confirm availability.
  review-plan           Run the plan-review gate on a ticket. The gate applies a deterministic Layer-1 floor and a four-pass review of the plan (find, verify, decide, then coach), then signs a plan-review attestation on a non-blocking PASS. It is the inverse of verify-completion.
  sign-review           Persist the plan-review attestation again, cheaply, for an already-computed and still-valid PASS verdict from the latest REVIEW_RESULT sidecar, without re-running the multi-pass LLM review. Use it to recover a signature that `rebar review-plan` computed but failed to persist, for example after a transient git index.lock. It refuses to sign a non-PASS verdict or a verdict that is stale because the plan changed since the review.
  enrich                Inspect or drain the ticket enrichment queue.
  explain               Print a plan-review criterion's authoring-guide section (for example `rebar explain F1`), or an author-facing prose guide (commit-trailer, plan, review). For example, `rebar explain plan` explains how to write a plan that passes the plan-review gate. One shared lookup with the MCP explain_criterion tool.
  verify-commit-ticket  Verify a commit message references a rebar ticket that resolves in the store.
  verify-identity       Verify authenticated authorship of the store's mutating events against each author identity's epoch-scoped keyring. This is the authorship merge-gate, also available under the back-compat alias `rebar verify-authorship`. It is advisory unless identity.require_authenticated (or --require-authenticated) is on, in which case any enforced event that is not `verified` fails the gate with a non-zero exit. Events whose introducing commit predates --since or identity.enforce_since are grandfathered, which means they are reported but never fail the gate.
  verify-authorship     Verify authenticated authorship of the store's mutating events against each author identity's epoch-scoped keyring. This is the authorship merge-gate, also available under the back-compat alias `rebar verify-authorship`. It is advisory unless identity.require_authenticated (or --require-authenticated) is on, in which case any enforced event that is not `verified` fails the gate with a non-zero exit. Events whose introducing commit predates --since or identity.enforce_since are grandfathered, which means they are reported but never fail the gate.
  verify-opcert         Verify the required-environment operation certificate of the store's closed tickets, which is the op-cert merge-gate. It walks the merged log, groups events by ticket, and for each in-scope closed ticket verifies that verify.require_environment (or --require-environment) produced a valid completion-verifier op-cert against its out-of-band-pinned key in .rebar/trusted_environments.yaml. It is advisory unless a required environment is set, in which case any enforced closed ticket without a valid cert fails the gate with a non-zero exit. Tickets whose close commit predates --since or verify.opcert_enforce_since are grandfathered, which means they are reported but never fail the gate.
  trusted-env           Add or revoke trusted environment keys with ticket log position anchors.
  remote-cert           Request a trusted-environment op-cert with `rebar remote-cert <ticket-id> <kind>`.
  workflow              Author, validate, and run git-native workflows (.rebar/workflows/*.yaml).
  llm                   Configure and check the rebar LLM framework.
  jira-onboard          Interactively configure Jira: detect existing settings, prompt for missing url/user/project, persist them to rebar.toml, and validate via bridge check-access. The secret JIRA_API_TOKEN stays an environment variable and is never written to a config file.
  prompt                Evaluate git-canonical prompts.
  criteria              Evaluate + calibrate review criteria.
  identity              Create identities, select the active identity, and manage identity keys.
  config                Show the resolved rebar configuration and the precedence layer (cli > env > project > user > default) each value came from.
  metrics               Render the full metric registry over a date range.
  tracker-footprint     Measure Git, checkout, allocation, and whole-clone tracker footprint.
  audit                 Show a ticket audit trail (plan-review history + completion + code reviews).
  bridge                Synchronize rebar tickets with Jira.
  init                  Initialize the ticket system.
  scratch               Manage per-ticket scratch values (set/get/clear).
  delete                Delete a ticket (destructive; requires --user-approved).
  fsck                  Check store integrity (JSON validity, CREATE presence, index.lock).
  fsck-recover          Recover the tracker worktree (dangling commits, interrupted rebases).
  tracker-maintenance   Supported door for raw git in the tracker; backup ref + refusal + audit.
  doctor                Diagnose the store and heal what is safe to fix (--repair).
  grounding-info        Print the code-grounding oracle contract (dimensions/kinds/reasons/backends).
