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

@buildlog/types

v2.1.0

Published

Portable workflow format for AI-assisted development

Readme

@buildlog/types

Portable workflow format for AI-assisted development

Type definitions and Zod schemas for the .buildlog file format v2.0.

What's a Buildlog?

A buildlog is a workflow recipe — a lightweight, portable format that captures your AI coding sessions as replicable workflows. Think of it as package.json for vibe coding.

Key insight: The prompts are the artifact. The code is ephemeral and non-deterministic. We capture the workflow, not the output.

Installation

npm install @buildlog/types
# or
pnpm add @buildlog/types

Slim vs Full Format

Buildlog v2 introduces two capture formats:

| Format | Size | Contents | Use Case | |--------|------|----------|----------| | slim (default) | 2-50 KB | Prompts + summaries | Sharing, agent replication | | full | 1-50 MB | + AI responses, diffs | Debugging, detailed review |

Usage

TypeScript Types

import type { 
  BuildlogFile, 
  BuildlogStep, 
  PromptStep,
  ActionStep 
} from '@buildlog/types';

const buildlog: BuildlogFile = {
  version: '2.0.0',
  format: 'slim',
  metadata: {
    id: 'uuid-here',
    title: 'Add Stripe Integration',
    createdAt: '2026-02-01T14:30:00Z',
    durationSeconds: 720,
    editor: 'cursor',
    aiProvider: 'claude',
    replicable: true,
  },
  steps: [
    {
      id: 'step-1',
      type: 'prompt',
      timestamp: 0,
      sequence: 0,
      content: 'Add Stripe subscription checkout to this Next.js app',
      context: ['package.json', 'app/layout.tsx'],
    },
    {
      id: 'step-2',
      type: 'action',
      timestamp: 45,
      sequence: 1,
      summary: 'Created checkout API route and webhook handler',
      filesCreated: ['app/api/checkout/route.ts', 'app/api/webhook/route.ts'],
      packagesAdded: ['stripe', '@stripe/stripe-js'],
    },
  ],
  outcome: {
    status: 'success',
    summary: 'Built working Stripe integration with checkout and webhooks',
    filesCreated: 4,
    filesModified: 2,
    canReplicate: true,
  },
};

Validation

import { validateBuildlog, parseBuildlog } from '@buildlog/types';

// Validate unknown data
const result = validateBuildlog(data);
if (result.valid) {
  console.log('Valid buildlog!');
  if (result.warnings) {
    console.warn('Warnings:', result.warnings);
  }
} else {
  console.error('Errors:', result.errors);
}

// Parse and validate JSON
const buildlog = parseBuildlog(jsonString);

Utilities

import { 
  isBuildlogFile,
  computeStats,
  formatDuration,
  estimateBuildlogSize,
  isReplicable,
  toSlim,
  getStepIcon,
} from '@buildlog/types';

isBuildlogFile('session.buildlog'); // true
estimateBuildlogSize(buildlog); // 'tiny' | 'small' | 'medium' | 'large'
isReplicable(buildlog); // true
formatDuration(720); // '12m 0s'

// Convert full buildlog to slim (strips AI responses & diffs)
const slim = toSlim(fullBuildlog);

Step Types

| Type | Description | Always Captured | |------|-------------|-----------------| | prompt | User prompt to AI | Full content ✓ | | action | Summary of AI changes | Summary only (full response in full mode) | | terminal | Terminal command | Command + outcome | | note | Human annotation | Full content | | checkpoint | Milestone marker | Name + summary | | error | Error encountered | Message + resolution |

For Agent Consumption

Buildlogs are designed to be agent-consumable. Another AI agent can read a buildlog and replicate the workflow:

// Agent reads buildlog
const buildlog = parseBuildlog(content);

if (buildlog.outcome.canReplicate) {
  for (const step of buildlog.steps) {
    if (step.type === 'prompt') {
      // Execute this prompt in current context
      await agent.execute(step.content);
    }
  }
}

Migration from v1

See MIGRATION.md for upgrading from buildlog v1.

License

MIT