Command Reference

August 11, 2026 · View on GitHub

Complete reference for all squadron CLI commands.

review

Run structured reviews using built-in templates.

review arch

Run an architectural review comparing a document against an architecture reference.

sq review arch <INPUT_FILE> --against <ARCH_DOC> [OPTIONS]
Argument/OptionTypeRequiredDefaultDescription
INPUT_FILEstringyesDocument to review
--againststringyesArchitecture document to review against
--cwdstringnoconfig or .Working directory
--modelstringnoconfig or template defaultModel override (e.g. opus, sonnet)
-v, --verbosecountnoconfig or 0Verbosity level (use -v or -vv)
--outputstringnoterminalOutput format: terminal, json, file
--output-pathstringnoFile path (required when --output file)
sq review arch slice-design.md --against hld.md -v
sq review arch spec.md --against arch.md --output json
sq review arch spec.md --against arch.md --model sonnet

review tasks

Run a task plan review comparing a task breakdown against its parent slice design.

sq review tasks <INPUT_FILE> --against <SLICE_DOC> [OPTIONS]
Argument/OptionTypeRequiredDefaultDescription
INPUT_FILEstringyesTask breakdown file to review
--againststringyesParent slice design to review against
--cwdstringnoconfig or .Working directory
--modelstringnoconfig or template defaultModel override (e.g. opus, sonnet)
-v, --verbosecountnoconfig or 0Verbosity level
--outputstringnoterminalOutput format
--output-pathstringnoFile path for --output file
sq review tasks 105-tasks.md --against 105-slice.md -v

review code

Run a code review against the current project.

sq review code [OPTIONS] [SLICE_NUMBER]
ArgumentTypeRequiredDescription
SLICE_NUMBERintno*Slice index to review (e.g. 305); resolves the slice's own diff

* Not required by the parser, but at least one of SLICE_NUMBER, --diff, or --files must be given. Without any of them the review has no code to look at and is rejected rather than run unscoped.

OptionTypeRequiredDefaultDescription
--cwdstringnoconfig or .Project directory to review
--filesstringnoGlob pattern to scope the review
--diffstringnoGit ref to diff against
--rulesstringnoconfig default_rulesPath to additional rules file
--rules-dirstringnoRules directory override
--no-rulesflagnooffSuppress all rule injection
--modelstringnoconfig or template defaultModel override (e.g. opus, sonnet)
--profilestringnoconfigProvider profile (sdk, openrouter, openai, local, …)
-v, --verbosecountnoconfig or 0Verbosity level
--outputstringnoterminalOutput format
--output-pathstringnoFile path for --output file
--jsonflagnooffOutput and save as JSON instead of markdown
--no-saveflagnooffDo not write a review file
# Review a slice's own changes (the common case)
sq review code 305 -v

# Review changes against an explicit ref
sq review code --diff main -v

# Review specific files with custom rules
sq review code --files "src/**/*.py" --rules rules/python.md -vv

# Output JSON
sq review code --diff main --output json > review.json

How the slice diff is resolved. With a SLICE_NUMBER, squadron finds the slice's merge commit and diffs against a base ref — git.integration_branch from Context Forge when that key is set, otherwise main. If Context Forge is not installed or the key is unset, the base is main and everything behaves as before. This matters on repos that promote work through an integration branch: diffing against main there returns the whole accumulated band rather than the slice, and a reviewer handed dozens of already-reviewed files will return a confident, meaningless PASS.

Review files are overwritten in place, but the prior content is archived first. A second sq review code 305 replaces project-documents/user/reviews/305-review.code.<slice>.md with no revision suffix and no prompt — but before the write, the existing file is copied to project-documents/user/reviews/archive/ under its original name, the copy is read back and compared byte-for-byte, and only then is the overwrite allowed. If the archive cannot be written or does not verify, the review is not saved and the command says so; the original is left untouched. Hand edits therefore survive as an archived copy, not in place.

review resolve

Record whether a prior review's findings were addressed by the work done since.

sq review resolve [OPTIONS] INDEX [REVIEW_TYPE]
ArgumentTypeRequiredDescription
INDEXintyesSlice number whose review to resolve (e.g. 305)
REVIEW_TYPEstringnocode, slice, tasks, arch. Omit when the index has exactly one review; when several exist the command errors and lists them rather than guessing
OptionTypeRequiredDefaultDescription
--cwdstringnoconfig or .Project directory
--modelstringnoconfig or template defaultJudge model override (e.g. opus)
--profilestringnoconfigProvider profile (sdk, openrouter, openai, local, …)
--no-judgeflagnooffRun the deterministic screens only; never consult the judge
--sincestringnothe review's reviewedShaGit ref to measure from
-v, --verbosecountnoconfig or 0Verbosity level (-v adds the per-finding note column)
# Resolve the only review for slice 305
sq review resolve 305 -v

# Disambiguate when both a code and a tasks review exist
sq review resolve 305 code

# Screens only — no model call, no tokens
sq review resolve 305 --no-judge

# Measure from an explicit ref instead of the review's stamp
sq review resolve 305 --since v1.4.0

How the diff base is chosen. In precedence order: --since if given; otherwise the review's own reviewedSha frontmatter key, stamped when the review was authored; otherwise the last commit that touched the review file, with a WARNING saying the base is approximate. The reviews directory is excluded from the measurement — a review file is written after the commit its own reviewedSha names, so counting it would make every review look like a change to itself.

What each resolution means.

ResolutionMeaningExit code
ADDRESSEDEvery CONCERN+ finding was settled as addressed, and each claim survived verification against the diff0
UNADDRESSEDAt least one finding is demonstrably not addressed — commonly, nothing changed since the review1
UNKNOWNThe check could not run or could not be trusted: a git failure, a judge transport failure, --no-judge, a change set over the injection cap, a claim contradicted by the diff, or a review whose verdict and findings disagree1

UNKNOWN is never a soft pass. A resolution that could not be reached exits 1 exactly as a failure does, so sq review resolve 305 && ... is safe to compose.

The resolution artifact. Each run writes:

project-documents/user/reviews/{index}-resolution.{type}.{slice-name}-r{n}.md

{n} starts at 1 and increments; a resolution is never overwritten, and a name collision raises rather than replacing a record. The name deliberately contains no -review. substring, so metrology's review-discovery globs never pick it up.

Frontmatter schema:

KeyDescription
docTypeAlways review-resolution
reviewFileFilename of the review this resolves
reviewTypeThe review's type
slice, projectCarried from the review's frontmatter
reviewVerdictThe review's own verdict, verbatim
resolutionADDRESSED | UNADDRESSED | UNKNOWN
reviewedShaWhat the review assessed, or null
resolvedShaThe base the diff actually ran against
shaSourcefrontmatter | file-history | since
judgeModelModel consulted, or null when no judge ran
dateCreatedYYYYMMDD
findingStatusesList of {id, status, screen, successor?, note?}

This artifact does not affect verdict: on the review file. The review is the reviewer's record and is never edited by this command. The resolution is evidence for a human — or a future tool — to act on.

Interim procedure for verdict edits. Until tooling consumes the artifact directly, a maintainer who edits a review's verdict: should do so only when an ADDRESSED resolution artifact justifies it, and should cite that artifact's filename in the commit message. This is the practice already used for slice 305's own verdict edit, named here as the standing procedure.

review list

List all available review templates.

sq review list

No options. Outputs template names and descriptions.

config

Manage persistent configuration.

config set

Set a configuration value.

sq config set <KEY> <VALUE> [OPTIONS]
Argument/OptionTypeRequiredDefaultDescription
KEYstringyesConfig key to set
VALUEstringyesValue to set
--projectflagnofalseWrite to project-level config
--cwdstringno.Working directory (for project config location)
sq config set cwd ~/source/repos/myproject
sq config set verbosity 1
sq config set default_rules ./rules/python.md --project
sq config set default_model opus

config get

Show the resolved value of a configuration key and its source.

sq config get <KEY> [OPTIONS]
Argument/OptionTypeRequiredDefaultDescription
KEYstringyesConfig key to read
--cwdstringno.Working directory
$ sq config get cwd
cwd = ~/source/repos/myproject  (user)

config list

Show all configuration keys with their resolved values and sources.

sq config list [OPTIONS]
OptionTypeRequiredDefaultDescription
--cwdstringno.Working directory
$ sq config list
  cwd            ~/source/repos/myproject  (user)
  default_rules  ./rules/python.md         (project)
  verbosity      0                         (default)

config path

Show configuration file locations and whether they exist.

sq config path [OPTIONS]
OptionTypeRequiredDefaultDescription
--cwdstringno.Working directory
$ sq config path
  User:    ~/.config/squadron/config.toml  exists
  Project: ./.squadron.toml                not found

Metrology keys

Settings for judge calibration and the tech-debt audit harness. Run sq config list to see resolved values and their source.

KeyTypeDefaultDescription
metrology.store_dirstring~/.config/squadron/metrologyWhere records are written
metrology.project_idstringderived from git remoteOverrides the project identity on records
metrology.sample_budgetint20Samples retained per judge configuration
metrology.min_evidence_nint5Samples required before a recommendation is offered
metrology.trend_bucketstringmonthBucket size for trend reporting
metrology.graduate_match_ratefloat0.9Agreement rate at which a config is offered for graduation
metrology.tighten_match_ratefloat0.6Agreement rate below which tightening is suggested
metrology.residual_sample_ratefloat0.1Sampling rate retained after graduation
metrology.audit_profilestringreview defaultProvider profile for audit runs
metrology.audit_modelstring(unset)Model for audit runs — see below
metrology.audit_variance_runsint3Runs per project in a variance series
metrology.audit_timeout_sint3600Wall-clock cap per audit run
metrology.audit_run_cooldown_sint60Pause between runs in a series
metrology.audit_rate_limit_retriesint10Retries before a rate-limited run gives up
metrology.audit_rate_limit_cap_sint60Ceiling on exponential rate-limit backoff
metrology.preemption_fragment_dirstring~/.config/squadron/metrology/preemptionWhere preempt generate writes fragment files

Pinning the audit model

metrology.audit_model is unset by default, which means squadron sends no model to the CLI and the CLI picks its own — measured as a 1M-context Opus, the most expensive option available, chosen silently and subject to change when the CLI updates.

Pin it for two reasons:

  • Cost. The default is the priciest model, selected without being asked for.
  • Comparability. Models produce systematically different finding counts on identical code. Measured on one unchanged repository: Opus returned 22-30 findings across four runs, Sonnet 5 returned 12-16. An unpinned model is not a fixed instrument, so a noise floor measured today is not comparable to one measured after the default shifts.
sq config set metrology.audit_model claude-sonnet-5 --project

An explicit --model on the command still overrides the pin. The resolved model is stored on each record, so an audit can say what produced it.

spawn

Spawn a new agent instance.

sq spawn --name <NAME> [OPTIONS]
OptionTypeRequiredDefaultDescription
--namestringyesUnique agent name
--typestringnosdkAgent type
--providerstringnosdkProvider to use
--cwdstringno.Working directory
--system-promptstringnoSystem prompt
--permission-modestringnoacceptEditsPermission mode
--modelstringnoconfig default_modelModel override (e.g. opus, sonnet)

list

List running agents.

sq list [OPTIONS]
OptionTypeRequiredDefaultDescription
--statestringnoFilter by agent state
--providerstringnoFilter by provider

task

Send a task prompt to an agent.

sq task <AGENT_NAME> <PROMPT>
ArgumentTypeRequiredDescription
AGENT_NAMEstringyesTarget agent name
PROMPTstringyesTask prompt to send

shutdown

Shutdown agents.

sq shutdown <AGENT_NAME>
sq shutdown --all
Argument/OptionTypeRequiredDescription
AGENT_NAMEstringnoAgent to shut down
--allflagnoShutdown all agents

events

Run and inspect user-definable actions on supported events (commit, post-action). See the Events Guide for the full contract.

events fire

Fire all bound actions for an event. This is what .githooks/pre-commit invokes; it is the process-boundary entry point.

sq events fire <EVENT> [PATHS...] [OPTIONS]
Argument/OptionTypeRequiredDefaultDescription
EVENTstringyescommit (the only event fireable from the CLI)
PATHSstring(s)noStaged paths (commit event only)
--cwdstringno.Working directory
sq events fire commit -- staged-file.md another.md
sq events fire post-action     # usage error — has no meaning outside a run

Exit codes: 0 every bound action succeeded, 1 at least one action failed, 2 the run could not happen at all (unknown event, plugin import failure, or manifest error).

events list

Show every binding grouped by event, with its source (built-in or the manifest file path), and any disabled built-ins.

sq events list [OPTIONS]
OptionTypeRequiredDefaultDescription
--cwdstringno.Working directory

--step-done and events.timeout_seconds

sq run --step-done <run-id> now runs every bound post-action action before marking the step done (see Events Guide § Prompt-only parity). A failing action prints its attributed error to stderr and exits non-zero without recording the step — a behavior change for scripted callers; see the CHANGELOG.

Every event action's execute is bounded by the events.timeout_seconds config key (default 30) — sq config set events.timeout_seconds 60.

Exit codes

CodeMeaning
0Success
1Error (invalid arguments, missing files, runtime error, unknown config key), or a review that ran but could not be saved
2Review verdict is FAIL

A review whose file could not be written exits 1 even though the review itself ran and was displayed — the artifact is what Context Forge and every other downstream reader gate on, so reporting success with nothing on disk would be a silent failure. A FAIL verdict keeps exit 2 in that case: it is the more specific signal, and both codes are non-zero.