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

@dkod/pi

v0.1.6

Published

dkod extension for Pi — parallel agent execution with AST-level semantic merging

Readme

The Problem

Traditional AI agent workflows hit a wall: Git becomes a bottleneck.

You deploy 3 agents on the same repo. Agent A refactors auth. Agent B adds an endpoint. Agent C writes tests. They all finish in 2 minutes. Then you spend 45 minutes resolving merge conflicts.

Even worse — most tools serialize agents to avoid this. One agent at a time. One PR at a time. Sequential. Slow.

AI agents are fast. Git-based workflows make them wait in line.

The Fix

dkod replaces the bottleneck — not the agents. This extension brings dkod to Pi:

  • Multiple agents from multiple users work on the same functions, same files, same repository — simultaneously
  • Each agent gets an isolated session overlay (copy-on-write, not a clone or worktree)
  • Changes merge by function, type, and import — not by line
  • PRs land with zero conflicts in under 60 seconds

The result: 24 minutes becomes 2 minutes. 4 conflicts becomes 0.

Session Isolation

Each agent gets its own overlay on top of the shared repo. Writes go to the overlay, reads fall through to the base. dkod uses AST-level symbol tracking (via tree-sitter) to understand exactly which functions, classes, and methods each agent touches.

No clones. No worktrees. No locks. No waiting.

10 agents editing simultaneously, each in their own sandbox.

AST-Level Semantic Merge

Forget line-based diffs. dkod detects conflicts at the symbol level — functions, types, constants.

Two agents editing different functions in the same file? No conflict. Merged in under 50ms.

Two agents rewriting the same function? Caught instantly, with a precise report — not a wall of <<<<<<< markers.

Verification Pipeline

Every changeset passes through lint, type-check, and test gates before it touches main. Automated code review with scoring on every submission.

Agents get structured failure data — not log dumps — so they fix issues and retry autonomously.

Average time from submission to verified merge: under 30 seconds.

Autonomous Build Pipeline

One prompt in. Working, tested PR out. Zero human interaction.

The harness orchestrates: Planner decomposes work by symbol, N Generators implement in parallel via dkod sessions, Evaluator tests the live app via chrome-devtools.

Based on Anthropic's Planner-Generator-Evaluator research.

Quick Start

Install

# Install dk CLI
curl -fsSL https://dkod.io/install.sh | sh

# Authenticate
dk login

# Install the Pi extension
pi install npm:@dkod/pi

Build something

/dkh Build a project management webapp with kanban boards, team collaboration, and real-time updates

That's it. The harness does the rest.

| Command | Description | |---------|-------------| | /dkh <prompt> | Full autonomous build — plan, build, land, eval, ship | | /dkh:plan <prompt> | Planning only — produce spec + parallel work units | | /dkh:eval | Evaluate current application against criteria | | /dkod:config | Verify dk CLI installation and authentication |

How It Works

%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#06b6d4', 'primaryTextColor': '#f0f0f3', 'lineColor': '#06b6d4' }}}%%
sequenceDiagram
    participant U as User
    participant O as Orchestrator
    participant P as Planner
    participant G as Generators (N)
    participant D as dkod
    participant E as Evaluator

    U->>O: /dkh "build a task app"
    O->>P: expand prompt into spec + work units
    P-->>O: plan with N parallel units

    Note over G,D: Each generator gets an isolated dkod session

    par Generator 1
        O->>G: Pi RPC subprocess
        G->>D: connect → file-write → submit
    and Generator 2
        O->>G: Pi RPC subprocess
        G->>D: connect → file-write → submit
    and Generator N
        O->>G: Pi RPC subprocess
        G->>D: connect → file-write → submit
    end

    Note over D: AST-level merge — zero conflicts

    G-->>O: N changesets
    O->>D: verify → review → approve → merge

    O->>E: start app, test every button via chrome-devtools
    E-->>O: eval report with scores + evidence

    alt PASS
        O->>D: push PR to GitHub
        D-->>U: PR with eval results
    else RETRY
        O->>G: re-dispatch failed units with feedback
    else REPLAN
        O->>P: structural flaw — re-plan from scratch
    end

Why dkod, Not Git Worktrees?

| | Git worktrees | dkod sessions | |---|---|---| | Setup per agent | Full clone or worktree (~seconds) | Copy-on-write overlay (~ms) | | Merge strategy | Line-based diff (conflicts on same file) | AST-level symbol merge (conflicts only on same function) | | 10 agents, same file | 10 worktrees, manual conflict resolution | 10 overlays, automatic merge | | Merge time | Minutes + human review | Under 50ms, automated | | Verification | Manual CI pipeline | Built-in lint + type-check + test + code review | | Disk usage | Full copy per agent | Overlay only (changed symbols) |

Architecture

pi-extension/
├── src/
│   ├── index.ts              Extension entry — registers commands + guard
│   ├── guard.ts              Runtime tool blocker (Write/Edit/git blocked)
│   ├── parallel.ts           RPC subprocess manager (N generators)
│   ├── commands/
│   │   ├── dkh.ts            /dkh — full autonomous pipeline
│   │   ├── plan.ts           /dkh:plan — planning only
│   │   ├── eval.ts           /dkh:eval — evaluate current app
│   │   └── config.ts         /dkod:config — verify setup
│   └── prompts/
│       ├── orchestrator.md   Drives the autonomous loop
│       ├── planner.md        Prompt → spec → parallel work units
│       ├── generator.md      Implements one unit per dkod session
│       └── evaluator.md      Adversarial testing via chrome-devtools
└── skills/dkh/
    └── SKILL.md              Pi skill definition

Key design decisions:

  • dk CLI (--json mode) is the sole dkod interface — no HTTP client, no custom tool wrappers
  • Runtime tool enforcement via Pi's tool_call event — generators are blocked from using Write/Edit/Bash-file-writes at the runtime level, not just prompt instructions
  • Pi RPC subprocesses give true OS-level parallelism for generators — each subprocess is a full Pi instance with its own dkod session
  • Agent prompts adapted from the dkod harness for Pi + dk CLI syntax

Prerequisites

Inspired By

License

MIT — free to use, fork, and build on.