Skip to content

Command index

Start with the source you intend to check, then read the linked reference for its policy, diagnostics, and limits. Run yaga <group> --help for the installed version's exact options. Checks never imply an all-checks mode or automatically run another provider.

Choose a source and prerequisites

"Offline" below describes checking after installation. Optional spelling requires an installed Typos executable; Git-backed commands require local objects and never fetch. No command in the first table needs GitHub credentials except explicit description or review --pr fetches.

Command and reference Source and required selection External tools and execution
yaga commit check One literal title/message, editor file, file, stdin, commit, or range; defaults to HEAD. One discovered or explicit commit config. Offline. Git for history and --edit; Typos if spelling is enabled.
yaga branch check Literal short name via --name and explicit --policy. Offline; no Git.
yaga pull-request description check File, stdin, or current PR; explicit --policy, optional --template. File/stdin are offline. Only --pr uses authenticated gh and network to read current metadata; no checkout. Typos if enabled.
yaga pull-request review check Snapshot JSON file or current PR; explicit --policy, optional --wait-seconds and --submit-review; positive submission requires --triage-policy. Snapshot file is offline. Only --pr uses authenticated gh and network to read (or opt-in submit) review state; no checkout.
yaga pull-request triage check Explicit trusted --policy plus offline --file or live --pr; optional --publish-comment. Metadata-only provenance, sensitive paths, exact duplicate trees, and current-head maintainer admission; no PR execution.
yaga change check Committed changed paths from explicit --range A..B or A...B and --policy. Offline Git; complete history and a unique three-dot merge base.
yaga tree check Committed path names; explicit --revision and --policy. Offline Git; selected commit/tree must exist.
yaga path check Committed path portability; explicit --revision and --policy. Offline Git; selected commit/tree must exist.
yaga mode check Committed entry modes; explicit --revision and --policy. Offline Git; selected commit/tree must exist.
yaga size check Committed blob sizes; explicit --revision and --policy. Offline Git; selected commit/tree/blobs must exist.
yaga workflow check Current workflow files: explicit paths or documented .github/workflows defaults. Offline; installed YAML parser, no external tool.
yaga workflow security Same current files; frozen recommended-v1 default, optional explicit profile/rules. Offline; installed YAML parser, no external tool.
yaga workflow lint Current workflows plus bounded transitive local workflow/Action support files. Docker CLI and Linux daemon; may pull the pinned image. Container networking is disabled. The active context can be remote and receives the snapshot.
yaga github pull-request check Event snapshot, matching runner identity/checkout, complete commit history, and commit config. Offline Git; no API/token. Typos if enabled; trusted gpgv for the opt-in signed Dependabot exemption, otherwise normal checks run.
yaga github pull-request description check Explicit --event-file, --policy, optional --template. Offline; no Git/checkout. Typos if enabled.
yaga repo check Explicit provider list or --plan; selected providers' runtime inputs. Inherits each selected provider's tools and execution boundary.
yaga repo inspect One explicit --plan. Offline. Reads the plan and reports what its providers require.
yaga policy check Explicit policy TOML files or discovered repository policies in --repo; optional --strict. Offline; validates schema versions, required-version floors, and deprecated schema versions.

tree, path, mode, and size do not see staged, untracked, or working-file changes. A repo check --revision SHA sets only their committed source; it does not make workflow checks read that revision. Policies and workflow files remain current runtime inputs.

Planning and optional review

Command and reference Source and required selection External tools and execution
yaga test policy check Explicit policy via --file. Offline; no Git or test execution.
yaga test plan Explicit policy/profile and exactly one range or revision; revision requires a full profile. Offline Git; no test execution. Range needs complete history; revision needs its commit/tree.
yaga test evaluate Explicit plan/results and independent policy, binding, commit/tree, run, and attempt identities. Offline; no Git, provider API, or test execution.
yaga commit quality One message, file, stdin, commit, or range. Defaults to HEAD. Explicitly chosen API provider or a user-managed OpenAI-compatible server. Git for history.
yaga gate agent-review policy check Explicit named-lens policy via --file. Offline; no agent execution or credentials.
yaga gate agent-review policy plan Explicit named-lens policy via --file. Offline; describes work for an external adapter, does not run it.
yaga gate agent-review policy template Explicit named-lens policy via --file. Offline; emits a pending receipt scaffold.
yaga gate agent-review policy evaluate Explicit policy and adapter results via --file and --results. Offline; validates receipts, does not authenticate external provenance.
yaga gate agent-review <operation> Trusted GitHub environment/event, lifecycle evidence, permissions and applicable approval marker. Network and environment-only GitHub token. May write comments/statuses; trusted default-branch workflows only.

Reports and execution surfaces

For ordinary checks, 0 means passed, 1 means findings, and 2 means the check could not complete. Receipt evaluation uses 1 for failed or incomplete obligations. Reports use stdout; structured operational errors use stderr. CLI usage errors may be plain text even with --format json; see exit-aware capture.

Commands Formats; exits Repository plan Bundled Action
commit check; workflow check, security, lint; tree, path, mode, size checks Text, JSON, GitHub; 0/1/2 Exactly these eight providers; tree/path/mode/size require plan v2. Root Action (workflow, workflow-security, workflow-lint, tree, path, mode, size); commit policy runs via default check: commit or check: repo.
repo check Text, JSON, GitHub; 0/1/2 with operational errors taking precedence Runs a selected plan. Root Action (check: repo).
repo inspect Text or JSON; 0/2 Reads the selected plan. None.
policy check Text, JSON, GitHub; 0/1/2 (1 on deprecated schemas with --strict) No. Root Action (check: policy).
branch check, change check, both description checks, pull-request review check Text, JSON, GitHub; 0/1/2 No. Root Action (branch, change, pr-description, pr-review).
pull-request triage check Text, JSON, GitHub; 0 allow, 1 hold, 2 error No. Root Action pr-triage; review submission also accepts triage-policy in pr-review.
commit quality Text, JSON, GitHub; 0/1/2 No. None.
github pull-request check Text, JSON, GitHub; 0/1/2 No. Root Action default (check: commit).
test policy check, test plan Text, JSON; 0/2 No. None.
test evaluate Text, JSON; 0/1/2 No. None.
gate agent-review policy check, plan Text, JSON; 0/2 No. None.
gate agent-review policy template JSON scaffold; 0/2 No. None.
gate agent-review policy evaluate Text, JSON, GitHub; 0/1/2 No. None.
gate agent-review <operation> Lifecycle output; GateError returns 1, not the policy-check error code No. Trusted write-capable root Action (check: gate). Nonempty agent-review-policy-file is rejected.

All installed commands can run in suitable ordinary CI with their stated prerequisites. The unified root Action dispatches the trusted Rust executable with separate inputs and credentials for gate, commit and other checks. Quality advice remains advisory; a plan is not evidence that tests or reviews ran. See Usage modes and Assess and adopt in CI before choosing required gates.

Copyable starting points

These Bash recipes assume the named policies/input files exist. Choose policies from the linked references; YAGA does not discover standalone policies or fetch missing history.

Before creating a commit

yaga commit check --file message.txt --config .yaga.toml
yaga branch check --policy .yaga/branch-policy.toml --name feat/parser
yaga workflow check .github/workflows
yaga workflow security .github/workflows --profile recommended-v3
yaga pull-request description check --policy .yaga/description-policy.toml --file pr-description.md

These select the prospective message, supplied branch name, current workflow files, and local description. Committed-tree checks still need a commit containing the intended changes.

A complete committed pull request

Set YAGA_BASE_SHA and YAGA_HEAD_SHA to the exact base/head commits already available locally. Use two dots for branch-only commit messages and three dots for changed paths against the merge base. This repository plan must select commit and at least one committed-tree provider:

: "${YAGA_BASE_SHA:?Set the exact PR base SHA}"
: "${YAGA_HEAD_SHA:?Set the exact PR head SHA}"
yaga repo check --plan .yaga/checks/ci.toml \
  --range "$YAGA_BASE_SHA..$YAGA_HEAD_SHA" --revision "$YAGA_HEAD_SHA"
yaga change check --policy .yaga/change-policy.toml \
  --range "$YAGA_BASE_SHA...$YAGA_HEAD_SHA"

Check out the intended head separately for working-file workflow checks. A last-commit-only range can miss earlier source changes followed by a docs-only commit. YAGA contributors can use the explicit local qualification override in Contributing. For a plan without committed-tree providers, omit --revision.

Descriptions and reviews when Actions are unavailable

The local command above works offline. To read a current published description or review state, authenticate gh for the intended host and supply the full canonical PR URL; no checkout is required:

: "${YAGA_PR_URL:?Set the canonical HTTPS pull-request URL}"
yaga pull-request description check --policy .yaga/description-policy.toml --pr "$YAGA_PR_URL"
yaga pull-request review check --policy .yaga/agent-review-policy.toml --pr "$YAGA_PR_URL"

Use --pr 123 --repo OWNER/REPO instead when choosing a numeric PR explicitly. These read current pull-request state; they do not check event-bound commit history or edit the pull request.

Authoring and installation helpers

yaga config show reads one discovered or explicit config; yaga config init creates a new standalone config with no-overwrite semantics and supports --dry-run. yaga policy init creates starter TOML files stamped with the latest schema version across YAGA's 12 policy families (with an interactive checkbox selector in a terminal, plus --all, --skip-existing, and --dry-run). All are offline, use text/JSON, and return 0/2. yaga commit template prints an incomplete message from explicit conventional components or plain policy; it is offline, text-only, and returns 0/2. None belongs to repository plans or the bundled Actions.

For installation maintenance, use yaga self update or yaga self update --dry-run to inspect or update a standalone native installation (.yaga-native-receipt), a local Cargo checkout install (.crates2.json), or a uv tool installation. Actual updates access the configured release source, local checkout, or package index; this is maintenance, not a policy check. Use yaga --install-completion or yaga --show-completion (auto-detecting bash, zsh, fish, powershell, or pwsh) to install or inspect idempotent shell tab-completion blocks that preserve existing profile BOM/encoding and never modify PowerShell execution policy.