Skip to content

Latest commit

 

History

History
106 lines (77 loc) · 3.02 KB

File metadata and controls

106 lines (77 loc) · 3.02 KB

gaze docscan

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

Synopsis

gaze docscan [package] [flags]

Arguments

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.

Flags

Flag Type Default Description
--config string "" (search CWD) Path to .gaze.yaml config file

Configuration Interaction

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.md
  • CONTRIBUTING.md
  • CODE_OF_CONDUCT.md
  • LICENSE
  • LICENSE.md

See Configuration Reference for all .gaze.yaml options.

Output Format

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
  }
]

Examples

Scan for a specific package

gaze docscan ./internal/crap

Returns all Markdown files in the repository, prioritized by proximity to the internal/crap directory.

Scan with custom config

gaze docscan ./internal/crap --config=/path/to/.gaze.yaml

Pipe to the AI report pipeline

The 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'

See Also

  • Classification — how document signals contribute to classification
  • Configuration.gaze.yaml doc_scan settings
  • gaze report — the AI report pipeline that uses docscan internally
  • gaze analyze — side effect detection (step 1 before classification)