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

pi-thread-engine

v0.4.7

Published

Thread-Based Engineering for pi — all 7 thread types + stories + fusion + zero-touch + TUI dashboard. Based on @IndyDevDan framework from agenticengineer.com.

Readme

🧵 pi-thread-engine

"When you start thinking in threads, you stop being a bottleneck and become an orchestrator." — @IndyDevDan, Thinking in Threads

Thread-Based Engineering for Pi Coding Agent. 7 thread types + stories + fusion + zero-touch + full TUI dashboard. Built on @IndyDevDan's framework from agenticengineer.com.

Install

pi install npm:pi-thread-engine

The Thread Framework

Everything starts with the base thread:

PROMPT → TOOL CALLS → REVIEW
  You      Agent       You

You show up at two nodes for maximum leverage. Your agent handles everything in between.

Then you multiply:

Thread Types
├── Base    → You → Agent → You (minutes)
├── P       → Parallel 5+ agents (hours)
├── C       → Checkpoint chains (high-stakes)
├── F       → Fusion 9 agents, pick winner
├── B       → Branch (orchestrator agents)
├── L       → Long-running 26hrs (days)
└── Z       → Zero-touch, no review (ultimate)

Commands

| Command | Type | What | |---------|------|------| | /threads | Dashboard | TUI: 3-column status view, search, inline reply, keyboard nav | | /pthread | P-Thread | N independent tasks in parallel | | /cthread | C-Thread | Sequential phases with checkpoint reviews | | /bthread | B-Thread | scout → plan → build → review pipeline | | /fthread | F-Thread | Same prompt → N models → compare, pick winner | | /zthread | Z-Thread | Autonomous + verification gate (ships only if tests pass) | | /lthread | L-Thread | Extended autonomous run | | /story | Stories | Auto-decompose goal into thread phases | | /agents | Alias | Same as /threads — Claude muscle memory |

Dashboard

Run /threads (or /agents) to open the TUI dashboard:

  🧵 Thread Dashboard
  ═══════════════════════════════════════════

  ⚡ Needs Input (2)
  ▸ t-001  ████████░░  needs_input  /fix bug in auth     → "password has special chars"
  ▸ t-003  ░░░░░░░░░  needs_input  /audit dependencies  → "found 3 vulnerable"

  ⚙ Working (3)
  ▸ t-002  ██████░░░░  running  /migrate database        ⏱ 4m 23s
  ▸ t-004  ████░░░░░░  running  /build API endpoints     ⏱ 2m 11s
  ▸ s-001  →scout→plan→build  running  /story add payments

  ✓ Done (4)
  ▸ t-005  ██████████  success  /refactor auth module     → "cleaned up 12 files"
  ▸ t-006  ██████████  success  /update docs             → "30 pages updated"
  ▸ t-007  ██████████  error    /deploy to prod          ✗ "missing env vars"

  nav=↑↓ exp=Enter rep=i srch=/ kill=k rev=r prune=p quit=q

Keyboard shortcuts:

  • ↑↓ — navigate threads
  • Enter — expand/collapse thread details
  • i — inline reply (send message to blocked thread)
  • / — search/filter threads
  • k — kill selected thread
  • r — review selected thread results
  • p — prune (clear) finished threads
  • q — quit dashboard

Thread Types in Depth

P-Thread — Parallel

Five in the terminal. Five to ten in the browser. Zero apologies. — Boris Cherny, creator of Claude Code

/pthread "Review all PRs" --count 8
/pthread "Fix bug in auth" --count 3 --each

C-Thread — Checkpoint Chains

High-stakes work needs verification at critical junctures. Intentional chunking is a feature, not a bug.

/cthread "Migrate to new database" --phases scout,plan,build,test,deploy

F-Thread — Fusion (pi-thread-engine unique)

Nine agents. Nine parallel futures. Pick the winner.

/fthread "Design the caching architecture" --count 5
/fthread "Refactor the auth module" --models claude,gpt-4o,gemini-pro

Best-of-N gives you confidence. Cherry-picking gives you quality. Each agent runs in complete isolation — no cross-contamination.

B-Thread — Branch/Meta-Agentic

When agents manage agents. You become an Orchestrator of Intelligence.

/bthread "Build the checkout flow"

Auto-runs: plan agent → scout → build → review → deploy

L-Thread — Long-Running

A single prompt that ran 26 hours.

/lthread "Audit and fix all security vulnerabilities" --hours 24

Z-Thread — Zero-Touch (pi-thread-engine unique)

Maximum earned trust. No review node. Ships only if verification passes.

/zthread "Fix all ESLint warnings" --verify "npm run lint"
/zthread "Add dark mode" --verify "npm test && npm run build"

This is NOT vibe coding. Z-threads are the opposite: maximum earned trust through hundreds of iterations.

Stories — Goal Decomposition (pi-thread-engine unique)

Auto-decompose a goal into thread phases. pi-thread-engine picks the right type for each.

/story "Add dark mode to the dashboard" --verify "npm test"

Auto-generates phases:

  1. Scout (meta) — research the codebase
  2. Plan (fusion) — 3 models brainstorm approaches
  3. Decide (checkpoint) — human picks the winner
  4. Build (parallel) — implement across files
  5. Verify (zero) — run tests

LLM Tools

Use these inside any Pi prompt:

thread_spawn({ type: "parallel", prompts: [...] })  // Start any thread type
thread_status({ id: "t-001" })                       // Check progress
thread_kill({ id: "t-001" })                         // Stop a thread

The Core Four

Every thread runs on these four pillars. Invest in all of them:

| Pillar | Description | pi-thread-engine | |--------|-------------|-----------------| | Context | Right information (no more, no less) | ~/.pi-memory/ integration | | Model | Capable of sustained reasoning | 324+ models via OpenRouter | | Prompt | Crystal-clear agentic engineering | Structured commands | | Tools | Self-verifying, comprehensive | 40+ pi-skills |

Measuring Progress

You know you're improving at agentic coding when:

  • Width ↑ — P-threads = 5x exploration per hour
  • Time ↑ — L-threads = 10min → 8hrs autonomous work
  • Depth ↑ — B-threads = one prompt → entire teams
  • Checkpoints ↓ — Earned trust through evidence

The common denominator: increase tool calls per unit of your attention.

Architecture

┌─────────────────────────────────────────────────────┐
│                   pi-thread-engine                  │
├─────────────┬──────────────┬────────────────────────┤
│  Dashboard  │  Registry    │  Executor              │
│  (TUI v3)   │  (state)     │  (dispatch)            │
├─────────────┴──────────────┴────────────────────────┤
│  Commands: /threads /pthread /cthread /fthread     │
│            /bthread /zthread /lthread /story        │
├─────────────────────────────────────────────────────┤
│  Backends                                           │
│  ├─ pi-subagents (P/C/B threads)                   │
│  └─ native (F/Z/L threads, Stories)                 │
└─────────────────────────────────────────────────────┘

Further Reading