You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exclude entries in .codemap/config.json match a bare name at any depth, and the gitignore-style anchored forms match nothing. So there's no way to exclude only a root-level entry. A common case hits this: a root build artifact that shares its name with a source directory (Go's cmd/<name>/ layout plus a <name> binary at the root). Excluding the binary silently removes the source directory from every view.
Repro (v4.5.1)
.
├── cmd/tool/main.go
├── lib.go
└── tool # a built binary
exclude
files codemap reports
["tool"]
lib.go (the binary andcmd/tool/main.go are gone)
["/tool"]
cmd/tool/main.go, lib.go, tool (nothing excluded)
["tool/"]
cmd/tool/main.go, lib.go, tool (nothing excluded)
codemap cmd on that tree then reports Files: 0.
Why it's easy to miss
--debug prints the root path and the gitignore cache, but not the active config path, the exclude list, or how many files the excludes removed.
Hook and skill output built on the scan inherits the gap without saying so.
Expected
Follow gitignore semantics for exclude: a leading / anchors to the project root, and a trailing / matches directories only. Keep bare names matching at any depth for compatibility.
--debug prints the config file in effect and the count (or a sample) of files each exclude removed.
Consider a warning when an exclude removes files in one of the project's only source extensions. That's almost always unintended.
Summary
excludeentries in.codemap/config.jsonmatch a bare name at any depth, and the gitignore-style anchored forms match nothing. So there's no way to exclude only a root-level entry. A common case hits this: a root build artifact that shares its name with a source directory (Go'scmd/<name>/layout plus a<name>binary at the root). Excluding the binary silently removes the source directory from every view.Repro (v4.5.1)
exclude["tool"]lib.go(the binary andcmd/tool/main.goare gone)["/tool"]cmd/tool/main.go,lib.go,tool(nothing excluded)["tool/"]cmd/tool/main.go,lib.go,tool(nothing excluded)codemap cmdon that tree then reportsFiles: 0.Why it's easy to miss
--debugprints the root path and the gitignore cache, but not the active config path, the exclude list, or how many files the excludes removed..codemap/, the config is read from the primary checkout (seeconfig show/doctorresolve config to the primary checkout, not the current worktree #152). An exclude written there applies somewhere the user never wrote it, and nothing in the tree output or--debugsays so.codemap config showdoes reveal it.Expected
exclude: a leading/anchors to the project root, and a trailing/matches directories only. Keep bare names matching at any depth for compatibility.--debugprints the config file in effect and the count (or a sample) of files each exclude removed.onlysource extensions. That's almost always unintended.