Skip to content

archgate review-context

Pre-compute review context with ADR briefings for changed files. Designed for CI and editor plugin integrations that need a summary of which ADRs apply to the files being changed.

Terminal window
archgate review-context [options]
OptionDescription
--stagedOnly include git-staged files
--base [ref]Compare changed files against a base ref (auto-detects when omitted)
--run-checksInclude ADR compliance check results
--domain <domain>Filter to a single domain
--verboseInclude each ADR’s Decision and Do’s/Don’ts prose
Terminal window
archgate review-context --staged

By default each ADR is identified by id, title, domain, files, and rules only — enough to know which ADRs apply to the changed files. Read the ones you need with archgate adr show <id>.

Pass --verbose to embed every applicable ADR’s Decision and Do’s/Don’ts prose in the response instead. That prose grows with the number of matched ADRs and dominates the payload — large enough on a repository with many ADRs that agent harnesses stop displaying the result inline. Prefer the default and drill down; reach for --verbose only when a single self-contained payload is genuinely required.

Briefing prose is capped per section. When a Decision or Do’s and Don’ts section exceeds the cap it is cut, and the omission is reported four ways:

  • The cut point is marked inline with [... truncated — read full ADR via adr://<id>].
  • The ADR’s own briefing lists the affected section names in truncatedSections.
  • Every affected ADR id is collected in the top-level truncatedBriefings array. It is populated after --domain filtering, so it names only ADRs present in the response.
  • A warning naming those ADRs is written to stderr, leaving stdout valid JSON.

Treat any of these as meaning the ADR’s governing text is incomplete: the rules it states may sit in the part that was cut. Read the full document with archgate adr show <id> before relying on the briefing.

Two other limits truncate this payload, each with its own stderr warning. truncatedFiles is set when the changed-file list exceeds its cap, so files beyond it are absent from every domain. With --run-checks, checkSummary.truncated is set when a rule reported more violations than the per-rule cap — run archgate check for the complete list.

When --run-checks is passed, checkSummary follows the same rule as archgate check --json: its results array carries only rules with something to report, while the counts beside it still cover every rule that ran.