npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adlc/merge-forecast

v1.3.0

Published

Conflict forecast and dispatch schedule for parallel ticket execution (D2).

Readme

@adlc/merge-forecast

ADLC phase: D2 — The time dial / fan-out mechanics

Conflict forecast + dispatch schedule for parallel ticket execution. Predicts merge conflicts before any agent runs, certifies the safe fan-out width, and emits a foundation-first merge schedule.

Usage

merge-forecast [options]

Options:
  --tickets <path>           Path to tickets JSON (default: .adlc/tickets.json)
  --width <N>                Desired fan-out width; gate fails (exit 2) if > certifiedWidth
  --build-min <X>            Mean ticket build time in minutes (for backpressure width)
  --merge-min <Y>            Mean merge-rebase-regreen time in minutes
  --co-change-limit <N>      Git log depth for co-change mining (default: 500)
  --conflict-threshold <F>   Score >= this triggers SEQUENCE verdict (default: 0.5)
  --json                     Machine-readable JSON output
  --help                     Show this help

Exit Codes

| Code | Meaning | |------|---------| | 0 | Gate passes — schedule is safe at the recommended width | | 1 | Operational error — bad tickets file, unresolvable input | | 2 | Gate fails — --width exceeds certifiedWidth, or vetoed/high-risk pair scheduled concurrently |

Signals

Each parallel-eligible ticket pair (neither is an ancestor of the other in the DAG) is scored by four signals. Combined score = max of individual signals.

| Score | Signal | Description | |-------|--------|-------------| | 1.0 | scope-overlap | HARD VETO — tickets' declared scope globs overlap. These must serialize. | | 0.8 | namespace-collision | Dynamic route segments conflict ([pk] vs [voteKey] at same path depth) or migration prefix collision (drizzle/0005_* vs migrations/0005_*). | | 0.6 | import-radius | Files matching ticket A's scope import from ticket B's scope or vice versa. | | 0–0.5 | co-change | Historical co-commit coupling: pairCount / min(fileCountA, fileCountB) × 0.5. |

Pairs at or above --conflict-threshold get a SEQUENCE verdict. Below threshold: PARALLEL.

Width Analysis

  • certifiedWidth — greedy largest independent set among wave-1 tickets (tickets where all pairs are below threshold).
  • backpressureWidthround(buildMin / mergeMin) when both flags are given. Derived from integrator-lane throughput: if builds complete faster than merges absorb them, queue depth compounds.
  • recommendedWidthmin(certifiedWidth, backpressureWidth?, --width?).

Schedule

The schedule is derived from the ticket DAG via Kahn topological waves. All tickets in the same wave are ready to build concurrently (their dependencies completed in earlier waves). The merge order is foundation-first (ticket dependencies merge before their dependants; within a tier, first-done-first-merged).

Examples

# Basic forecast (auto-detect .adlc/tickets.json)
merge-forecast

# Gate against fan-out width
merge-forecast --width 4

# With backpressure — 20-min builds, 4-min merges
merge-forecast --width 5 --build-min 20 --merge-min 4

# JSON output for orchestrators
merge-forecast --json

# Custom tickets path + looser threshold
merge-forecast --tickets plan/tickets.json --conflict-threshold 0.7

# Deep co-change history
merge-forecast --co-change-limit 1000

Relation to Sibling Tools

  • Upstream: Tickets are produced by model-router (P2 phase). This tool validates the partition quality before agents run.
  • Downstream: rails-guard enforces the contract rails that merge-forecast identifies as conflict surfaces.
  • Complement: After completing parallel branches, merge-forecast can be re-run against the updated main to confirm rebase safety.

Core Gaps

None. All required functionality is available in @adlc/core (coChange, pairKey, isGitRepo, topoSort, globMatch, scopesOverlap, loadTickets).