Reference

Commands, settings and files

The short list of everything pr-brief reads, writes and accepts.

Commands

CommandWhat it doesMain flags
pr-brief initSets a repo up: writes .pr-brief.json, and optionally the PR template and the CI check (a GitHub workflow, or an Azure Pipelines file). --rewrite adds a job that lets the Claude Code GitHub Action write the description (GitHub only; you choose --auth). Never overwrites. With --config inline the style and theme go in the CI file and no .pr-brief.json is written.--pr-template --workflow --host github|azure-devops --config file|inline --rewrite --auth federation|bedrock|vertex|api-key --style S --theme T --dir D
pr-brief shapeReads the git diff and prints the flows to draw, the references, and the files ranked by risk, as JSON.--base REF --head REF --working-tree --title T --dir D
pr-brief diagramDraws one flow as a complete Mermaid diagram in a theme.--flow FILE|- --report FILE --flow-number N --theme T --raw
pr-brief gateChecks a description with fixed rules and no AI. Exit 0 passes, 1 means findings, 2 means a usage or config error. --ci reads a GitHub pull request event; in an Azure pipeline use --stdin. See the gate.--hook --ci --file F --stdin --host github|azure-devops --branch B --style S --json
pr-brief lintRuns the ASD-STE100 lint on prose. A Go port of ste-lint.py.--file F --json
pr-brief configReads and writes the settings.show [--json] [--ci] get KEY set KEY VALUE --scope user|repo init validate
pr-brief linksMakes each file in the Read-these-first table a link, so a reviewer opens it from the description. With --pr N the link goes to the file’s diff in the PR, which always shows the latest commit. Without it, the link goes to the file on the branch. It never links to a commit. Prints the new description.--body F --pr N --branch B --remote URL
pr-brief assembleFinishes a description in one call. It replaces each {{diagram FILE}} line with the diagram and its Legend, links the Read-these-first files, and keeps the tickets. It runs the same code as diagram, links and tickets, in that order. It does not draw plain text: you draw that by hand. Prints the new description.--body F --pr N --branch B --remote URL --current F --ticket T --no-tickets --theme T --format F --host H
pr-brief hookOpt in to the Claude Code or Codex hook that blocks a PR command whose description fails the gate. The plugin declares no hook. install adds the entry to your own settings.json (Claude Code) or hooks.json (Codex, with --harness codex) (and keeps a copy of the file), remove takes out only that entry, show prints it. The entry finds the newest installed version when it runs. check says whether an entry from an older install is out of date, and exits 1 when it is.install|remove|show|check --harness claude|codex --scope user|repo --dir D --bin PATH
pr-brief ticketsKeeps the Jira and Linear tickets visible. Writes a Tickets line above the begin marker with every ticket in --current (the description being replaced), in a Tickets line the description already has, in each --ticket (a ticket the user named, such as “Closes ENG-45”), and in the branch name. It does not read the new text, which only summarises the diff. Refuses to write if one would be lost. --list prints the tickets and changes nothing. body improve does the same for an existing PR.--body F --current F --branch B --ticket T --list
pr-brief themeLists, shows and validates themes.list show [NAME|FILE] [--json] validate FILE
pr-brief bodyRewrites an existing description safely. wrap folds a description for quiet: the Brief stays visible, and the Change map and the Review guide go in a collapsed block.improve past restore uncomment wrap --managed F --summary S --host H
pr-brief versionPrints the version.

Run any command with -h for its flags. The binary is bin/pr-brief in the plugin; it picks the right build for your machine.

Settings and precedence

KeyValuesDefault
styleste+iceberg ste icebergste+iceberg
improve.previousfold comment dropfold
diagram.themea built-in name, or a path to a .json theme filegithub-dark
diagram.formatauto, mermaid or ascii. auto picks ascii on Azure DevOps and mermaid on GitHub and GitLabauto
tickets.patterna regular expression (RE2, at most 200 characters, never empty-matching) for a ticket key in text and in a branch name, such as (PAY|OPS)-[0-9]+ or AB#[0-9]+. config set tickets.pattern '' clears it. Jira and Linear links are always reada guess at ABC-123 style keys
OrderSourceNotes
1A flag--style on one run. CI ignores flags.
2The repo file .pr-brief.jsonAt the git top-level. Committed, so the whole team shares it. CI reads it from the base commit.
3Your user file ~/.config/pr-brief/config.jsonOr $XDG_CONFIG_HOME/pr-brief/config.json. CI ignores it.
4The defaultste+iceberg, fold, github-dark and the built-in ticket guess

Everything else is a fixed convention.

Where things live

WhatWhere
Repo settings.pr-brief.json at the repo root
Your settings~/.config/pr-brief/config.json
Saved descriptions~/.local/state/pr-brief/<host>/<owner>/<repo>/<pr>/<timestamp>-NN.md. One is written before every body improve, whatever the setting. pr-brief body restore prints one.
Theme filesAnywhere for you; inside the repo for a repo config

Markers

<!-- pr-brief:begin v1 style=ste+iceberg theme=github-dark -->
## Brief
...
<!-- pr-brief:end -->

<!-- pr-brief:previous v1 saved=2026-10-05T14:02Z
the earlier human description, every "--" written as "-&#45;"
pr-brief:previous:end -->

<details><summary>Previous description</summary>
<!-- pr-brief:fold v1 saved=2026-10-05T14:02Z -->
the earlier human description, readable in the PR
<!-- pr-brief:fold:end -->
</details>

<details><summary>Previous description</summary>
<!-- pr-brief:fold v1 saved=2026-10-05T14:02Z -->
the earlier human description, readable in the PR
<!-- pr-brief:fold:end -->
</details>

> pr-brief skipped: <reason>                  # skip one PR
<!-- pr-brief:no-diagram: <reason> -->          # a small or config-only PR

The begin marker names the style and the theme. When a config names them, the config wins, so a marker cannot weaken the gate. A theme is a built-in name or custom:<8 hex>.

A description can also end with a visible signature, on the line before the end marker: <sub>Written with [pr-brief](https://github.com/gagoar/pr-brief) v0.8.1</sub>. It is opt-in. The skill writes it only for /pr-brief sign, and the gate never requires it. The gate does not treat it as prose.

A quiet description (/pr-brief quiet) keeps the Brief visible and folds the rest. The fold sits inside the markers, between the Brief and the Change map, and closes on the last line before the end marker. A blank line must follow </summary>, or the host shows the Markdown inside as plain text. The gate reads the same sections as for any description, and the Brief ends where the fold starts. pr-brief body wrap writes it. Do not write it by hand.

<!-- pr-brief:begin v1 style=ste+iceberg theme=github-dark -->
## Brief
One paragraph, always visible.

<details>
<summary>Change map and review guide · pr-brief, Claude Opus 5.5 medium</summary>

## Change map
...
## Review guide
...

</details>
<!-- pr-brief:end -->

An older pr-brief rejects a quiet description: it reads the fold as a second Brief paragraph. Upgrade the plugin and the CI check together.

JSON Schemas

SchemaFor
pr-brief.schema.jsonThe settings file. Unknown keys are errors.
pr-brief-theme.schema.jsonA custom theme file.
pr-brief-flow.schema.jsonThe input of pr-brief diagram: node-link shaped, with inputs, nodes, outputs and edges. pr-brief shape emits this shape.

A test keeps each schema in step with the Go types.