Skip to content

CLI Reference Skill

The Archgate cli-reference skill loads the canonical CLI documentation on demand so AI agents never guess at command syntax, the rules API, or the ADR format.

The cli-reference skill is an internal helper for AI agents. The archgate CLI, its .rules.ts authoring API, and the ADR file format are all newer than most model training cutoffs — so rather than letting an agent guess, this skill fetches the canonical documentation on demand and returns only the section the agent asked for.

When invoked, the skill fetches the canonical documentation served at a single LLM-optimized URL and extracts the relevant section. It is a reference loader — it does not run commands, write files, or reason about your code.

The caller specifies which section it needs, and only that section is returned (returning the full document would exhaust the caller’s context window):

SectionLoaded when the agent needs to…
CLI CommandsRun any archgate command — syntax, flags, and expected output
Rules AuthoringWrite or edit a .rules.ts file — the RuleContext API, the RuleSet type, and the reporting methods
ADR FormatCreate or edit an ADR .md file — frontmatter fields, required sections, naming, and domain prefixes
  1. It determines which section(s) the calling agent needs from the request.
  2. It fetches the canonical documentation.
  3. It extracts and returns only the requested section(s).
  4. If the fetch fails, it reports the error clearly — it never guesses or reconstructs reference content from memory.

This grounding-over-guessing design is why the documentation is the single source of truth: when a command or API changes, every agent picks up the change the next time the skill is invoked, with no plugin update required.

cli-reference is a supporting skill the others lean on:

  • The developer agent loads the CLI Commands section before running an unfamiliar archgate command.
  • The adr-author skill loads the Rules Authoring and ADR Format sections when writing ADRs and their companion .rules.ts files.
  • Any agent that is unsure of exact syntax loads the relevant section rather than risking an incorrect command.

Agents load only the section the current task requires — never all of them at once.