For AI agents: the complete documentation index is available at https://docs.gage.io/llms.txt, the full documentation bundle is available at https://docs.gage.io/llms-full.txt, and this page is available as Markdown at https://docs.gage.io/scanners/checks.md.

checks

NOTE

This scanner is experimental. It is not in the default group and runs only when you select it.

The scanner applies a set of checks to each session in one agent call. A check describes one kind of issue to look for. The agent reads the session once and writes findings for every check, where separate scanners would each read the session again.

The scanner has two checks. They carry the instructions of the scanners they are named for and write the same notes.

CheckLooks forApplies to
generalAgent misbehavior and user frictionSessions with at least 200 characters of text
code-reviewDefects in code the session wrote or changedSessions that edited files

How it works

The scanner runs three tasks.

The attach_project_files task adds two attachments per project that appears in the scan: project-rule-files holds the project’s rule files, such as memory files, settings, skills, commands, and agent definitions, and project-stack-files holds its manifest files. Each attachment targets the sessions from that project.

The summarize_projects task summarizes each project. One agent call per project reads the attached files and writes summary notes. When a project’s files have not changed since the last run, the existing summary carries forward without a new agent call. A project with no rule or manifest files is skipped.

The scan_sessions task submits each session to one agent. The agent’s prompt holds the instructions of every selected check that applies to the session. The code-review check’s instructions include the project’s summary notes. A session that no selected check applies to is skipped.

Every run scans every session in full. A session scanned before is scanned again, and each run’s notes belong to the scan that wrote them. Repeat runs over the same sessions are independent passes, which lets you compare runs with different checks selected.

Selecting checks

The checks param lists the checks to apply. It defaults to every check. To apply one check, override the param:

gage scan -s 'checks#{checks: ["code-review"]}'

To set it in the config file:

[scanners.checks.params]
checks = ["general"]

What it writes

The scanner writes notes that are in turn used by downstream issue writers. In particular, findings reads *[finding] notes and reports issues from them.

NoteDescriptionTarget
rules[project-summary]Summarizes project rulesAttachment
stack[project-summary]Summarizes a project stack and architectureAttachment
general[finding]Noteworthy observation in a sessionSession
code-review[finding]Code quality findingSession

When known, a finding note also records the session lines the finding refers to.

The notes have the same names as those the general and code-review scanners write. Run checks in a scan of its own, without those scanners, so that each finding is written once.

Running

The scanner is in no group. To run it:

gage scan -s checks