Scan the repository for Markdown documentation files and output a prioritized list as JSON. This command is primarily used as input to the gaze-reporter agent's full mode for document-enhanced classification.
Documents are prioritized by proximity to the target package:
| Priority | Location |
|---|---|
| 1 (highest) | Same directory as the target package |
| 2 | Module root |
| 3 | Other locations |
gaze docscan [package] [flags]
| Argument | Required | Description |
|---|---|---|
package |
No | Go package import path or relative path. Defaults to . (current directory). |
When a relative path is provided (starting with ./ or ../), it is resolved to an absolute path for directory-level priority matching.
| Flag | Type | Default | Description |
|---|---|---|---|
--config |
string |
"" (search CWD) |
Path to .gaze.yaml config file |
The --config flag loads .gaze.yaml for document scanning settings:
| Config Key | Type | Default | Description |
|---|---|---|---|
classification.doc_scan.exclude |
[]string |
See below | Glob patterns for files to exclude from scanning |
classification.doc_scan.include |
[]string |
null (scan all) |
Glob patterns for files to include. When set, only matching files are processed. |
classification.doc_scan.timeout |
string |
"30s" |
Maximum duration for document scanning (Go duration format) |
Default exclude patterns:
vendor/**node_modules/**.git/**testdata/**CHANGELOG.mdCONTRIBUTING.mdCODE_OF_CONDUCT.mdLICENSELICENSE.md
See Configuration Reference for all .gaze.yaml options.
The output is always JSON (there is no --format flag). Each entry includes the file path and its priority level:
[
{
"path": "internal/crap/README.md",
"priority": 1
},
{
"path": "README.md",
"priority": 2
},
{
"path": "docs/concepts/scoring.md",
"priority": 3
}
]gaze docscan ./internal/crapReturns all Markdown files in the repository, prioritized by proximity to the internal/crap directory.
gaze docscan ./internal/crap --config=/path/to/.gaze.yamlThe docscan output is typically consumed by gaze report internally, but can be used standalone for debugging or custom pipelines:
gaze docscan ./internal/crap | jq '.[].path'- Classification — how document signals contribute to classification
- Configuration —
.gaze.yamldoc_scan settings gaze report— the AI report pipeline that uses docscan internallygaze analyze— side effect detection (step 1 before classification)