Problem
analyzeNamingDrift(changedFiles, allFiles, profile) accepts a ConventionProfile, but the implementation currently names it _profile and never uses it. When category and directory evidence are unavailable, repository fallback is rebuilt from baselineFiles instead:
src/analyzers/namingDrift.ts: _profile: ConventionProfile
src/analyzers/namingDrift.ts: buildEvidence("repository", "repository files", baselineFiles, ...)
This diverges from the OpenSpec wording for whole-repo fallback, which says the analyzer should use the whole-repo naming profile.
Impact
Repository-level findings can be based on a different denominator than the profile shown in the CLI summary. In larger changed batches, excluding all changed files from repository fallback can make the baseline look much more dominant than the whole-repo profile, producing findings that do not line up with the reported repository naming distribution.
Suggested Fix
Use profile.naming for repository-level fallback, or deliberately update the analyzer signature/spec to remove the profile dependency and document that repository fallback also excludes changed files.
Verification
Add a focused analyzer test where category and directory evidence are too weak, and the whole-repo profile differs from the baseline-only repository evidence.
Problem
analyzeNamingDrift(changedFiles, allFiles, profile)accepts aConventionProfile, but the implementation currently names it_profileand never uses it. When category and directory evidence are unavailable, repository fallback is rebuilt frombaselineFilesinstead:src/analyzers/namingDrift.ts:_profile: ConventionProfilesrc/analyzers/namingDrift.ts:buildEvidence("repository", "repository files", baselineFiles, ...)This diverges from the OpenSpec wording for whole-repo fallback, which says the analyzer should use the whole-repo naming profile.
Impact
Repository-level findings can be based on a different denominator than the profile shown in the CLI summary. In larger changed batches, excluding all changed files from repository fallback can make the baseline look much more dominant than the whole-repo profile, producing findings that do not line up with the reported repository naming distribution.
Suggested Fix
Use
profile.namingfor repository-level fallback, or deliberately update the analyzer signature/spec to remove the profile dependency and document that repository fallback also excludes changed files.Verification
Add a focused analyzer test where category and directory evidence are too weak, and the whole-repo profile differs from the baseline-only repository evidence.