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

@lannguyensi/debug-playbook-engine

v0.1.2

Published

Guides agents through domain-specific, ordered diagnostic sequences

Readme

debug-playbook-engine

Guides agents through domain-specific, ordered diagnostic sequences. Prevents hypothesis-hopping. Part of the agent-grounding stack.

Problem

Agents jump between hypotheses without systematic verification:

  • Is the process running?
  • Is configuration correct?
  • Is the dependency reachable?
  • Does the architecture assumption even hold?

Install

npm install -g @lannguyensi/debug-playbook-engine

Usage

# Start a diagnostic playbook
debug-playbook run -d clawd-monitor -p "agent not visible in monitor"

# Show next required step
debug-playbook next -d clawd-monitor -p "agent not visible"

# JSON output
debug-playbook run -d clawd-monitor -p "agent not visible" --json

Example Output

🔍 Debug Playbook: clawd-monitor.basic-connectivity

  Problem: agent not visible in monitor

  Steps:
    1. check-repo-model [mandatory]
       → Verify architecture summary from README
    2. check-agent-process [mandatory]
       → Verify clawd-monitor-agent is running
    3. check-start-mode [mandatory]
       → Determine whether agent is manual, docker, or systemd started
    4. check-config [mandatory]
       → Verify authoritative env/token source
    5. check-network [optional]
       → Verify target URL reachability (only after process/config confirmed)

  ▶ Start with: Verify architecture summary from README

Built-in Playbooks

| Domain | Playbook | |--------|----------| | clawd-monitor | Basic connectivity: process → start mode → config → network | | github | API connectivity: token → rate limit → repo access → permissions | | generic | Read docs → check process → verify config → deps → logs |

API

import { getPlaybook, initRun, recordStep, canMakeClaim } from '@lannguyensi/debug-playbook-engine';

const playbook = getPlaybook('clawd-monitor', 'agent not visible');
const state = initRun(playbook);

// Record step results as you work through them. `recordStep` enforces
// the playbook's mandatory order, so you cannot jump past pending
// mandatory steps.
recordStep(state, 'check-repo-model', 'done', 'README confirms Docker deployment');
recordStep(state, 'check-agent-process', 'done', 'process not running');

// `canMakeClaim` gates a claim behind the steps it requires.
// A `config` claim needs the `check-config` step, which we have not run
// yet, so the gate correctly blocks here.
const blocked = canMakeClaim(state, 'config');
// blocked.allowed === false
// blocked.reason === ['Required step not completed: check-config']

// Walk the mandatory order to reach `check-config`, then the gate opens.
recordStep(state, 'check-start-mode', 'done', 'manual: clawd run');
recordStep(state, 'check-config', 'done', 'CLAWD_TOKEN sourced from .env');
const allowed = canMakeClaim(state, 'config');
// allowed.allowed === true

Caveat: canMakeClaim's requirements for root-cause and architecture mix step IDs from different built-in playbooks (check-repo-model lives in clawd-monitor / github, while read-docs and check-process live in generic), so no single built-in playbook can satisfy either claim type on its own. To gate those claims today, extend a domain playbook with the missing step IDs, or compose facts from multiple playbook runs before the call.

Part of the grounding stack

  1. domain-router
  2. readme-first-resolver
  3. debug-playbook-engine ← you are here
  4. evidence-ledger