Skip to content

feat(roadmap): alternatives reads package facts from deps.dev #4654

Open

Description

@dan-petty

Problem or Motivation

  • src/devops_cli/roadmap/alternatives.py:241-260 reads only https://pypi.org/pypi/<name>/json, and roadmap_alternatives.md:14 names only pypi_package.
  • Alternatives is a model lane, and it runs for every repository in service.repos.
  • dreamscaper (Rust) has 13 labeled items, and vibes also holds Rust and JS. For these, the alternatives check gets no package facts.

Proposed Solution & Architectural Design

  • Replace pypi_package with one package tool (system, name) over the deps.dev v3 API (GET /v3/systems/{system}/packages/{name}). It covers PYPI, CARGO, NPM, GO, MAVEN, NUGET and RUBYGEMS, and needs no key.
  • The prompt names the systems of the detected languages of the profile.
  • Remove the PyPI path with no shim.
  • Owner decision 4 (2026-11-11): the job may call api.deps.dev through the public egress level of devops_cli.http. The pull request has a security section that names the new host.
  • Tests use recorded answers.

Target Subsystem

SDLC, Git & PR Governance (src/devops_cli/roadmap/alternatives.py).

Existing Tool Considered

deps.dev (Open Source Insights) gives one API for 7 package systems, with no key. The PyPI JSON API covers 1 system. Cost of the tool: about 60 lines with recorded answers, about 200,000 tokens and 2 hours to build.

Acceptance Criteria

  • A test with a recorded answer: the tool returns the latest version and licence for (CARGO, serde) and for (PYPI, httpx).
  • git grep -n 'pypi.org/pypi' src/devops_cli/roadmap gives 0.
  • A test: the rendered alternatives prompt for a Rust profile names CARGO and does not name PYPI.
  • The pull request has a security section that names the new host.

Dependencies

#4633 and #4635. Merge after the change of alternatives.py that is in progress now (the tools in use).

Source: #4627

Alternatives check of 2026-11-26: in-use.
The repository already uses this tool.
Tool: google/deps.dev (https://github.com/google/deps.dev), Apache-2.0, last activity 2026-11-24, maintained.
Reason: Searches found no tool that does the alternatives check itself, and deps.dev already gives keyless package facts for seven systems in one API; the issue names it and the inventory already calls api.deps.dev.

Covers:

  • Keyless package facts for seven systems in one API
  • Latest version and license for a system and name
  • Version publish date for the maintained fallback

Lacks:

  • No alternatives prompt, egress level or dry-run wiring
  • No facts for packages that deps.dev does not index
  • Client code and recorded test answers still written in devops_cli

Proposed design

Problem statement

The alternatives check reads package facts only from the PyPI JSON API. It gets no package facts for Rust, JavaScript and other non-Python repositories. The change replaces the PyPI tool with one deps.dev v3 package tool for a system and a name. It removes the PyPI path with no shim. The prompt names the package systems of the detected languages of the project profile.

Acceptance criteria

Requirement: deps.dev package facts

The alternatives package tool SHALL read package facts from the deps.dev v3 API for a (system, name) pair.

Scenario: CARGO and PYPI package facts

  • WHEN the test calls the package tool for (CARGO, serde) and (PYPI, httpx) with recorded deps.dev answers for the package and version endpoints
  • THEN the tool returns the latest version and the license for each package.

Requirement: deps.dev package publish date

The alternatives package tool SHALL return the publish date of the package version.

Scenario: A package version with a publish date

  • WHEN the test calls the package tool for (PYPI, httpx) with a recorded deps.dev answer for its default version
  • THEN the tool returns the publishedAt date of the version.

Requirement: Maintained state from deps.dev publish date

The alternatives job SHALL use the deps.dev publish date to set maintained for a package when no repository read gives a last push.

Scenario: A package with no repository read

  • WHEN the deps.dev package tool returns a publish date within 12 months and no repository read gives a last push
  • THEN the job records the tool as maintained.

Requirement: PyPI JSON path removed

The alternatives code SHALL NOT read package facts from the PyPI JSON API.

Scenario: No PyPI JSON path remains

  • WHEN the test runs git grep -n 'pypi.org/pypi' src/devops_cli/roadmap and git grep -n 'pypi_package' src/devops_cli/roadmap
  • THEN both commands return no line.

Requirement: PyPI package tool replaced

The alternatives agent tool set SHALL replace the pypi_package tool with the deps.dev package tool.

Scenario: The prompt lists the deps.dev package tool

  • WHEN the test renders the alternatives prompt for a Python project profile
  • THEN the prompt names the deps.dev package tool and does not name pypi_package.

Requirement: Prompt names the profile package systems

The alternatives prompt SHALL name the package systems of the detected languages of the project profile.

Scenario: Rust profile prompt

  • WHEN the test renders the alternatives prompt for a Rust project profile
  • THEN the prompt names CARGO and does not name PYPI.

Requirement: Failed deps.dev read skips the item

A failed deps.dev package read SHALL skip the item and record the failure.

Scenario: A failed deps.dev read skips the item

  • WHEN the deps.dev package tool returns an error for an item
  • THEN the run skips the item, records the failure, and takes the item again after roadmap.alternatives.retry_days.

Requirement: Pending a person after the merge

The pull request SHALL name api.deps.dev as a new public host in its security section.

Scenario: Security section names the new host

  • WHEN a person reviews the pull request before the merge
  • THEN the security section names api.deps.dev and the public egress level.

Requirement: Dry run lists the deps.dev requests

The alternatives dry run SHALL list each deps.dev package request and version request with their placeholders.

Scenario: Dry run lists the package and version requests

  • WHEN the test runs devops roadmap alternatives --dry-run
  • THEN the output lists api.deps.dev/v3/systems/{system}/packages/{package}, api.deps.dev/v3/systems/{system}/packages/{package}/versions/{version}, and no pypi.org/pypi request.

Existing Tool Considered

The alternatives block in the issue body records in-use for google/deps.dev (https://github.com/google/deps.dev), Apache-2.0, maintained. The repository already uses this tool. The block lists what the tool covers and lacks. The proposal adds the client code, the prompt systems, the egress call, the dry-run wiring and the recorded test answers that the block lists as lacks.

Key questions

  • Which package tool replaces pypi_package?: Use one deps.dev v3 package tool for a (system, name) pair. It reads the package record, then the default version record for the license and publish date. It covers PYPI, CARGO, NPM, GO, MAVEN, NUGET and RUBYGEMS and needs no key. Remove the PyPI JSON path with no shim. (best practice) [sources: src/devops_cli/roadmap/alternatives.py:471, src/devops_cli/ai/tasks/roadmap_alternatives.md:14, openspec/specs/roadmap-alternatives/spec.md]
    • Chosen: deps.dev v3 package tool. It covers seven package systems in one keyless API and gives facts for Rust and JavaScript repositories.
    • Rejected: PyPI JSON API. It covers only PYPI and gives no package facts for Rust and JavaScript repositories.
    • Rejected: Two tools, PyPI and deps.dev. It keeps two paths for one fact and adds a shim that the issue removes.
  • Which package systems does the prompt name?: Name the package systems of the detected languages of the project profile. A Rust profile names CARGO and not PYPI. The systems come from the resolved project profile that feat(roadmap): a toolchain preset sets the implement checks #4635 extends. (best practice) [sources: src/devops_cli/project/profile.py, src/devops_cli/ai/tasks/roadmap_alternatives.md:14, openspec/specs/roadmap-alternatives/spec.md]
    • Chosen: Systems of detected languages. It gives the model only the systems that the repository can use and keeps the prompt short.
    • Rejected: All seven deps.dev systems. It adds unrelated systems to every prompt and can mislead the model.
    • Rejected: PYPI only. It gives no package facts for non-Python repositories.
  • What does a failed deps.dev read do?: A failed deps.dev read skips the item. The run records the failure and takes the item again after roadmap.alternatives.retry_days. (best practice) [sources: openspec/specs/roadmap-alternatives/spec.md, src/devops_cli/roadmap/alternatives.py]
    • Chosen: Skip and retry after the delay. It matches the existing failed check rule.
    • Rejected: Write a check with no facts. It gives a false result.
    • Rejected: Stop the round. One failed read would hold other items.
  • May the alternatives job call api.deps.dev through the public egress level of devops_cli.http?: Yes. Owner decision 4 allows it. The host is public and keyless. The change's security section names the host. (best practice) [sources: SECURITY.md]
    • Chosen: Public egress level. The owner decision allows the new call, and the host is public and keyless.
    • Rejected: A new egress level. It adds a setting for one public keyless API and gives no security gain.
    • Rejected: No deps.dev call. It keeps the PyPI-only path and gives no package facts for non-Python repositories.
  • What does the alternatives dry run list after the PyPI tool is removed?: The dry run lists each deps.dev package request and each version request with the system, package and version placeholders, and no PyPI request. The dry run lists every request a run makes. (best practice) [sources: src/devops_cli/roadmap/request_plan.py, openspec/specs/roadmap-alternatives/spec.md]
    • Chosen: deps.dev package and version request templates. The dry run lists every request a run makes.
    • Rejected: No package request. It hides a request that a run makes.
    • Rejected: Keep the PyPI request. The PyPI path is removed, so no run makes it.
  • How does the job decide maintained for a package after pypi_package is removed?: The deps.dev package tool returns the publish date of the package version. The job uses that date when no repository read gives a last push. It records the tool as maintained when the date is within 12 months. (best practice) [sources: openspec/specs/roadmap-alternatives/spec.md, src/devops_cli/roadmap/alternatives.py]
    • Chosen: deps.dev publish date. It keeps the maintained rule for a package with no repository read and removes the PyPI JSON path.
    • Rejected: Keep pypi_package for the date. The issue removes the PyPI path with no shim.
    • Rejected: No maintained fallback. It changes the existing maintained behavior for PyPI packages with no repository.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4633, #4635

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It extends the alternatives check to non-Python ecosystems but does not block a release or fix a defect.
    • Value: Medium. It makes the alternatives check return package facts for Rust, JS, Go, and other systems instead of only Python.
    • Effort: Low. The body states about 60 lines of code and 2 hours of work with recorded test answers.
    • Related: feat(roadmap): devops roadmap alternatives searches the web for the open tool that covers an item and records what it covers and lacks #2650, which asks for a different change. Both work on the alternatives check in the roadmap lane, but #2650 designs the overall command while the candidate changes only the package-facts data source.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 0410772 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: src/devops_cli/roadmap/alternatives.py.

  6. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at cd3e0f9 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: src/devops_cli/project/profile.py.

  7. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  8. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (7)

    Tools considered:

    Searches run:

    • one keyless API package facts version license multiple ecosystems cargo npm pypi, results: 5
    • deps.dev v3 API python client library packages, results: 5
    • "deps.dev" python library pypi, results: 5
    • api.deps.dev v3 systems packages API documentation, results: 5
    • deps.dev, results: 5
    • ecosyste.ms API package license versions keyless, results: 5
    • depsdev python package deps.dev API wrapper GetPackage, results: 5

    Sources:

  9. added
    status/ready
    and removed
    status/new
    on Nov 26, 2026
  10. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  11. added
    owner/service
    and removed
    owner/service
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agentstatus/readytype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions