Documentation
¶
Overview ¶
Package discover performs bounded repository layout detection for ds init.
Index ¶
Constants ¶
View Source
const ( // MaxDiscoveryDirs caps how many directories plainDocsWorthIndexing will visit under docs/ // (including the docs/ root). Separate from MaxDocsFiles, which limits regular files scanned // for *.spec.md / *.plan.md / *.prd.md density. MaxDiscoveryDirs = 4096 // MaxDocsFiles caps regular files inspected under docs/ for density heuristics. MaxDocsFiles = 400 )
Limits keep discovery bounded on large trees.
View Source
const MaxScanHints = 8
MaxScanHints is the maximum number of directory paths emitted for empty-scan recovery.
Variables ¶
This section is empty.
Functions ¶
func FormatSuggestCommand ¶
func FormatSuggestCommand(h HintCandidate) string
FormatSuggestCommand returns a concrete ds config add-source line for the candidate.
func HintDisplayPath ¶
HintDisplayPath returns a slash path with trailing slash for directory display lines.
Types ¶
type HintCandidate ¶
type HintCandidate struct {
RelPath string // repo-relative, slash-separated, no trailing slash
SourceType string // markdown | adr | openspec
}
HintCandidate is an on-disk path that may help recover from an empty configured scan.
func ScanHintCandidates ¶
func ScanHintCandidates(repoRoot string, m *ignore.Matcher) []HintCandidate
ScanHintCandidates returns bounded, stable-ordered directories that exist under repoRoot and are not ignored. Used when a configured scan finds zero artifacts.
Click to show internal directories.
Click to hide internal directories.