Dependency Selection Quality Score (DSQS)

GMI-SWD-003Software DeliveryPilot-ReadyPattern O-7: Inspection Coverage

Definition

Quality of dependency selection decisions at the moment they are made, scoring new dependencies on maintenance health, security posture, and fit before vulnerability scanners can see them.

The Measurement Gap

Measurement Gap and Decision

The Gap: No existing metric evaluates the quality of dependency selection decisions at the point where they happen. Vulnerability scanners catch CVEs after the dependency is in your lockfile -- they detect the consequence of poor selection, not the selection quality itself. License compliance tools check one dimension but ignore maintenance status, transitive depth, and functional duplication. Dependency count metrics tell you how many packages you have but not whether each one was a good choice.

When dependency selection moves from deliberate human choice to AI pattern matching, the AI selects based on training data popularity and functional match -- not maintenance health, license compatibility, transitive risk, or alignment with your existing stack. A human developer asking "Is this maintained? Do we already have something that does this?" applies judgment the AI does not.

The Decision:

DSQS measures the percentage of AI-suggested dependencies that meet your dependency acceptance criteria. When DSQS falls below threshold, the intervention is implementing dependency allowlists, configuring blocklists, or adding automated vetting gates at PR time -- not restricting AI usage entirely.

Formula

Formula:

DSQS = Dependencies_AI_accepted / Dependencies_AI_sampled

Where:

  • Dependencies_AI_accepted = count of AI-introduced dependencies that pass ALL acceptance criteria
  • Dependencies_AI_sampled = total count of AI-introduced dependencies evaluated

Acceptance criteria (all must pass):
(a) Last commit within 12 months (actively maintained)
(b) License compatible with organizational policy
(c) Transitive dependency count below organizational threshold
(d) No critical or high-severity CVEs without available patches
(e) No functional duplication with packages already in the dependency tree

Worked Example:

Over Q3, AI coding tools introduced 32 new third-party dependencies across 8 services. Evaluating all 32:

  • schema-validator-pro: maintained, MIT, 4 transitive deps, no CVEs, but codebase already uses zod for schema validation. FAIL (duplication).
  • retry-backoff: maintained, Apache-2.0, 0 transitive deps, no CVEs, no existing retry library. PASS.
  • mongo-query-builder: last commit 18 months ago. FAIL (maintenance).
  • express-rate-limit: maintained, MIT, 1 transitive dep, no CVEs, no existing rate limiter. PASS.

Final: 22 of 32 pass all criteria.

DSQS = 22 / 32 = 0.6875

Proposed formula, pending validation pilots.

At a Glance

Unit
Score
Trend Direction
Higher
Reporting Frequency
Quarterly
Category
AI-Generated Code Quality
← Architectural Coherence Drift Index (ACDI)Semantic Defect Origin Rate (SDOR) →

Assess Your Organization

The AI-GPS Assessment evaluates your AI governance maturity and recommends KPIs like this one for your implementation roadmap.

Take the Free AI-GPS Assessment