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

bestwork-agent

v1.0.0

Published

Best harness engineering for Claude Code. Work like a corporation team, not just a club.

Readme

bestwork-agent

Best harness engineering for Claude Code. Work like a corporation team, not just a club.


What is bestwork-agent?

Your AI agent works alone — it hallucinates, loops, misses requirements, and you find out too late.

bestwork-agent organizes your AI agent the way top unicorn companies organize their engineering teams. It analyzes your request, decides whether it needs a hierarchical team (waterfall, top-down authority) or a squad (agile, flat, fast) — and dispatches the right specialists automatically.

You: "Refactor the auth module to support OAuth2"

bestwork analyzes → large scope, architecture decision, security-sensitive
bestwork selects → Hierarchy: Security Team

┌─────────────────────────────────────────────────────┐
│  CISO                                               │
│  "Attack surface acceptable. Approve with           │
│   condition: rotate existing JWT secrets on deploy." │
│          ▲ final decision                           │
│  Tech Lead                                          │
│  "OAuth2 PKCE flow is correct. Consolidate the      │
│   two token refresh paths into one."                │
│          ▲ architecture review                      │
│  Sr. Security Engineer                              │
│  "Implementation secure. Added CSRF protection.     │
│   Input validation on redirect_uri."                │
│          ▲ implementation + hardening               │
│  Jr. QA Engineer                                    │
│  "Found: /callback doesn't handle expired state     │
│   param. Added test for token replay attack."       │
│          ▲ fresh eyes + edge cases                  │
└─────────────────────────────────────────────────────┘
You: "Add a dark mode toggle to the settings page"

bestwork analyzes → single feature, localized scope, fast feedback needed
bestwork selects → Squad: Feature Squad

┌──────────────────────────────────────────────────────┐
│                  Feature Squad (parallel)             │
│                                                      │
│  Sr. Backend         Sr. Frontend       Product Lead │
│  "API endpoint       "Toggle component  "Matches     │
│   for user prefs     with CSS vars,     user story.  │
│   ready. Tests        accessible."      Ship it."    │
│   passing."                                          │
│                         QA Lead                      │
│                    "Tested light/dark                 │
│                     + system pref.                    │
│                     All green."                       │
│                                                      │
│  Verdict: all APPROVE → merged                       │
└──────────────────────────────────────────────────────┘
You: "Why did my last session struggle?"

bestwork analyzes → observability request, not coding
bestwork selects → data analysis

  Session Outcome — b322dc3e  ✗ struggling

  Duration:     45m
  Calls/Prompt: 38 (high — avg is 12)
  Loop detected: Edit → Bash(test fail) → Edit × 6 on auth.ts

  Root cause: missing import caused test failure loop.
  Recommendation: use ./strict to force read-before-edit.

How it works

bestwork-agent mirrors how the best engineering organizations operate:

Hierarchy mode — for decisions that need authority levels

CTO → Tech Lead → Sr. Engineer → Jr. Engineer

Junior implements first (fresh perspective catches obvious issues), seniors refine, leads review architecture, C-level makes final strategic calls. Each level can send work back down.

Squad mode — for tasks that need speed and collaboration

Backend + Frontend + Product + QA (all equal)

Everyone works in parallel. No single authority. Consensus-driven. Fast.

The router picks automatically based on task signals:

  • Large scope / cross-directory / architecture → hierarchy
  • Single feature / bugfix / localized → squad
  • Security-sensitive files → security team
  • Infra / CI/CD files → infra squad

Install

Option 1: Claude Code Plugin (recommended)

/plugin marketplace add https://github.com/rlaope/bestwork-agent
/plugin install bestwork-agent

Option 2: npm

npm install -g bestwork-agent
bestwork install

Option 3: Inside Claude Code

./bw-install
./bw-install --discord <webhook_url> --lang ko
./bw-install --strict

Notifications

Connect your team's channel to receive rich alerts after every prompt:

| Platform | Command | |----------|---------| | Discord | ./discord <webhook_url> --lang ko | | Slack | ./slack <webhook_url> --lang en | | Telegram | bestwork notify setup --telegram-token <token> --telegram-chat <id> |

Supported languages: en (default), ko, ja

Each notification includes: team composition, agent decisions, code snippets, git diff, platform review, and session health — color-coded green/yellow/red.

Verify

bestwork doctor    # check installation health
bestwork update    # check for updates

Organization Chart

bestwork org    # full org chart

14 Roles × 4 Levels

| Level | Roles | Perspective | |-------|-------|-------------| | C-Level | CTO, CPO, CISO | Strategic — architecture, product direction, security posture | | Lead | Tech Lead, EM, QA Lead, Product Lead | Tactical — code quality, delivery, test strategy, requirements | | Senior | Backend, Frontend, Fullstack, Infra, Security | Deep implementation with mentoring | | Junior | Engineer, QA | Fresh eyes — questioning assumptions, finding edge cases |

8 Team Presets

| Mode | Team | Composition | |------|------|-------------| | Hierarchy | Full Team | CTO → Tech Lead → Sr. Fullstack → Jr. Engineer | | Hierarchy | Backend Team | CTO → Tech Lead → Sr. Backend → Jr. Engineer | | Hierarchy | Frontend Team | CPO → Product Lead → Sr. Frontend → Jr. Engineer | | Hierarchy | Security Team | CISO → Tech Lead → Sr. Security → Jr. QA | | Squad | Feature Squad | Sr. Backend + Sr. Frontend + Product Lead + QA Lead | | Squad | Infra Squad | Sr. Infra + Sr. Security + Tech Lead | | Review | Code Review Board | Tech Lead + Sr. Security + QA Lead (2/3 approval) | | Advisory | Architecture Review | CTO + Tech Lead + EM (direction only, no code) |

Commands

./team Full Team refactor auth module       # hierarchy execution
./squad Feature Squad add dark mode         # squad execution

Or just describe what you need — the smart gateway routes it automatically.


Domain Specialists

On top of the org structure, 36 domain-specific agents provide deep expertise:

bestwork agents    # full catalog

18 Tech: backend, frontend, fullstack, infra, database, API, mobile, testing, security, performance, devops, data, ML, CLI, realtime, auth, migration, config

8 PM: product, API, platform, data, infra, migration, security, growth

10 Critic: performance, scalability, security, consistency, reliability, testing, hallucination, DX, type safety, cost

Agent prompts live in prompts/ — edit without rebuilding.


Harness Controls

./scope src/auth/       Lock edits to directory
./unlock                Remove lock
./strict                Block rm -rf, force read-before-edit
./relax                 Disable strict
./tdd add user auth     Test-driven development flow
./context [files]       Preload files into context
./recover               Reset approach when stuck
./review                Platform/runtime hallucination check

Anti-Hallucination (automatic)

  • Grounding — warns when editing unread files
  • Validation — TypeScript typecheck after every code change
  • Platform review — detects OS/runtime mismatches (Linux code on macOS, etc.)
  • Scope enforcement — blocks edits outside locked path
  • Strict enforcement — blocks rm -rf, git push --force

Notifications

./discord <webhook_url>
./slack <webhook_url>

Rich notifications per prompt: summary, git diff, platform review, session health. Color-coded green/yellow/red.


Observability

bestwork                  # TUI dashboard
bestwork sessions         # Session list (CWD, last prompt, usage %)
bestwork session <id>     # Tool breakdown, agent tree
bestwork summary -w       # Weekly overview
bestwork heatmap          # 365-day activity grid
bestwork loops            # Agent loop detection
bestwork replay <id>      # Step-by-step session playback
bestwork effectiveness    # Prompt efficiency trend
bestwork outcome <id>     # Productivity verdict
bestwork export -f csv    # Export data

Data-Driven Agents

./autopsy [id]         Session post-mortem — why did it struggle?
./learn                Extract prompting rules from your history
./predict <task>       Estimate complexity from past sessions
./guard                Current session health check
./compare <id1> <id2>  Side-by-side session comparison

Security

Everything is local. No data leaves your machine. See SECURITY.md.

Contributing

See CONTRIBUTING.md.

License

MIT