THE GITHTML FIELD GUIDE
Check AI-generated CLI documentation for invented flags
Verify every AI-generated flag and argument against the actual command version, using maintained help output and parser definitions where available. Check defaults, required values, and interactions separately. Do not execute a generated command merely because it looks familiar; first identify side effects and replace speculative examples with safe, verified fixtures.
Extract claims into a command-specific checklist
Start by listing every executable, subcommand, flag, positional argument, default, and exit-status claim in the draft. Record the version the article intends to describe. A model can combine conventions from similar tools into a command that looks plausible but does not exist. Treat aliases and negative flags as separate claims rather than assuming symmetry. Identify commands that modify files, send network requests, or affect remote state before testing. The review's first goal is to establish the grammar and authority of the example, not to prove the draft right by trying increasingly broad commands until one succeeds.
Compare with authoritative local evidence
Use the installed tool's maintained help and source parser configuration when available, while recognizing that help output itself may omit behavior or have side effects in poorly designed tools. Inspect unfamiliar code before running it. The review scaffold below separates each draft claim from the evidence and correction. For Python tools, argparse documentation explains how parser definitions relate to accepted arguments, but the project's actual parser remains authoritative. Confirm whether a flag takes a value, can repeat, conflicts with another option, or changes meaning by subcommand. Do not fill missing evidence with conventions borrowed from another package.
Draft claim:
Tool and version:
Flag or argument:
Authoritative help / parser evidence:
Side effects:
Safe fixture:
Observed result:
Correction and verification limit:Verify safe examples and publish bounded results
After the command is understood, run a minimal example in a disposable environment appropriate to its behavior. Compare the output and exit status with the draft. Keep commands and output visually separate and label placeholders clearly. If a behavior cannot be safely tested, cite the authoritative contract and state the verification limit rather than claiming execution. Remove unsupported convenience flags instead of leaving them as suggestions. Record the tool version and evidence date so later upgrades have a clear review trigger. AI assistance can accelerate drafting, but the published reference should reflect the command that exists, not the fluent command the draft imagined. Check short and long aliases independently. A familiar short flag can mean something entirely different in another executable, so visual resemblance is not evidence that the draft chose the correct option.
- Extract every syntax and behavior claim before testing any generated command.
- Identify side effects and consult the exact installed version's help or parser.
- Verify value-taking, repetition, conflicts, defaults, and subcommand scope.
- Run only safe fixtures and distinguish tested behavior from source-backed but unexecuted claims.
Sources and further reading
- Python argparse
- Google developer documentation: Command-line syntax
- Google Technical Writing: Using LLMs
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.