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/preflight

v1.0.2

Published

Permissions and environment preflight check before fan-out (D2 phase 0).

Downloads

363

Readme

@adlc/preflight

Permissions and environment preflight check before fan-out (ADLC D2 Phase 0).

Runs isolated checks to verify that every operation class the agent fleet needs actually works in the current environment — so permission prompts and configuration failures front-load into one batch instead of stalling mid-flight.

From the ADLC D2 field notes:

A permission prompt mid-flight is a hidden serialization point: one blocked agent × N teammates = N stalls, racing siblings, and half-started state. Environment determinism is a precondition of parallel wall-clock math.

Usage

preflight [--test-cmd "..."] [--gh] [--llm] [--worktrees] [--json]

No flags — required checks only

preflight

Runs the four required checks (bash, git, write, branch) and prints a table plus a verdict line. Exit 0 if all pass; exit 2 if any fail.

With optional checks

preflight --test-cmd "npm test" --gh --llm --worktrees

Flags

| Flag | Type | Description | |------|------|-------------| | --test-cmd "CMD" | string | Run CMD via sh -c, expect exit 0. Tail of output shown on failure. | | --gh | boolean | Run gh auth status; expect exit 0. | | --llm | boolean | Call detectProvider() and assert it is non-null. No API call made. Reports which provider was found. | | --worktrees | boolean | git worktree add --detach .worktrees/preflight-test HEAD then remove. | | --json | boolean | Machine-readable output: { checks, verdict, failedNames }. |

Checks

Required (always run)

| Name | What it tests | |------|---------------| | bash | echo preflight-ok succeeds | | git | git status in cwd succeeds (cwd must be a git repo) | | write | Write + delete .adlc/tmp/preflight-test (mkdir -p as needed) | | branch | Create and delete preflight-test-branch; always cleans up in finally |

Optional (run only when flag given)

| Name | Flag | What it tests | |------|------|---------------| | worktrees | --worktrees | git worktree add/remove cycle; always cleans up in finally | | test-cmd | --test-cmd "CMD" | Runs CMD via sh, expects exit 0 | | gh | --gh | gh auth status exits 0 | | llm | --llm | detectProvider() returns non-null (no API call) |

Exit codes

| Code | Meaning | |------|---------| | 0 | Gate passes — all checks (required + explicitly requested optional) passed | | 1 | Operational / internal error | | 2 | Gate fails — one or more required or explicitly requested checks failed |

Note: optional checks that are NOT requested are not run and cannot fail. When a flag like --gh is passed, that check becomes required for this run.

Output

Human-readable (default)

──────────────────────
check      status  detail
──────────────────────
bash       ✓ PASS    echo preflight-ok succeeded
git        ✓ PASS    git status succeeded
write      ✓ PASS    .adlc/tmp/preflight-test written and removed
branch     ✓ PASS    branch 'preflight-test-branch' created and removed
worktrees  ✓ PASS    worktree add/remove succeeded
test-cmd   ✓ PASS    exited 0
──────────────────────

verdict: ALL CHECKS PASSED — environment is ready.

JSON (--json)

{
  "checks": [
    { "name": "bash",   "status": "pass", "detail": "echo preflight-ok succeeded", "required": true },
    { "name": "git",    "status": "pass", "detail": "git status succeeded",          "required": true },
    { "name": "write",  "status": "pass", "detail": ".adlc/tmp/preflight-test written and removed", "required": true },
    { "name": "branch", "status": "pass", "detail": "branch 'preflight-test-branch' created and removed", "required": true }
  ],
  "verdict": "pass",
  "failedNames": []
}

ADLC phase served

D2 Phase 0 (pre-fan-out environment gate). Run once before spawning the parallel agent fleet to ensure every operation class succeeds. Integrates with team-develop as Phase 0 of the parallel build pipeline.

Cleanup guarantees

Every check that creates a side effect (branch, worktree, tmp file) performs cleanup in a finally block — residue is removed whether the check passes or fails.

Relationship to sibling tools

  • merge-forecast — uses after preflight confirms the environment is ready; validates the ticket DAG and forecasts conflict probability before the fan-out.
  • gate-manifest — records gate passage events into the ADLC manifest ledger; preflight should record its passage there in orchestrated flows.

Core gaps

None. All required core APIs (detectProvider, git, parseArgs, printJson) are available in @adlc/core.