Skip to main content

Commands reference

The full grammar for ZAR’s comment commands. For a friendlier walkthrough, see Commands.

Invocation

A command is a comment that begins with one of these tokens (case-insensitive), followed by the command text:
@docagent <command>
/docagent <command>
@zar <command>
/zar <command>
All four prefixes are equivalent.

Permission

The author must have write access. OWNER, MEMBER, and COLLABORATOR are accepted automatically; others are checked for write, maintain, or admin permission via GitHub. Insufficient permission gets a refusal reply.

Commands

ActionAccepted formsContextNotes
Helphelp, commandsPR or issueLists commands with examples.
Statusstatus, settingsPR or issueShows CI gate, auto-commit, use_updates_branch, and a style-guide preview.
Set stylestyle "<text>", style '<text>', style <text>PR or issueSets the style guide. Quoted or unquoted.
CI gate on/offenable ci-gate, enable ci gate, disable ci-gate, disable ci gatePR or issueToggles the CI gate. Dash or space.
Auto-commit on/offenable auto-commit, enable auto commit, disable auto-commit, disable auto commitPR or issueToggles auto-commit. Still requires the DOCAGENT_WRITE_COMMITS env var to actually commit.
Update nowupdate docs now, update docs, update documentation now, updatePR onlyForces a docs analysis on the current PR, ignoring trigger mode.

Behavior notes

  • Parsing. ZAR first matches commands with a fast deterministic parser; if that doesn’t match, it falls back to interpreting the comment with Claude. Plain forms above always match the fast path.
  • Replies. ZAR responds in a threaded reply, mentioning the author, confirming the change or explaining why it couldn’t act (e.g. “didn’t understand the command”, or “update” used outside a PR).
  • Quotes for style. Both "…" and '…' work; unquoted text is taken up to the end of the command. Use quotes when the style text contains punctuation.
  • Immediate effect. Toggles and style changes apply right away; there’s no separate confirmation step.

Examples

@docagent help
@zar status
@docagent style "US English. Short sentences. Params in tables. One code example per endpoint."
/docagent enable ci-gate
@docagent disable auto-commit
@zar update docs now