Skip to content

Smarter filtering for non-package dependency claims #4

Description

@theDakshJaitly

Problem

The claim extractor (src/drift/claims.ts) treats every **bold** word in stack/tech sections as a dependency claim. This produces false positives for things that are clearly not package names: multi-word phrases ("REST API"), all-caps acronyms ("AWS"), descriptive labels ("Frontend", "Backend", "Database Layer").

Where to look

  • src/drift/claims.ts — the strong node visitor (~line 105)
  • src/drift/checkers/dependency.ts — where claims are checked

What to do

Add heuristics to filter out claims that aren't real package names before they reach the dependency checker. Ideas:

  • Skip multi-word phrases that don't look like scoped packages
  • Skip all-caps words (likely acronyms, not packages)
  • Skip common architectural/descriptive terms

This is complementary to expanding KNOWN_RUNTIMES — that's a blocklist approach, this is pattern-based filtering.

Acceptance criteria

  • Fewer false positive DEPENDENCY_MISSING warnings on real-world READMEs
  • Real package names still get checked correctly
  • Add test cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    checkerRelated to drift checkersenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions