Skip to content

Use the convention profile for repository-level naming drift fallback #2

@7shep

Description

@7shep

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions