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

@unilinear/pi-file-chat-tracer

v0.1.0

Published

Align Pi conversation tree navigation with git file-state checkpoints for safe AI exploration and rollback.

Readme

@unilinear/pi-file-chat-tracer

A global Pi package that aligns conversation tree navigation with git file-state checkpoints.

It lets you explore aggressively with an AI coding agent while keeping a clean way to decide later:

  • keep the generated files and return only the chat context with /tree;
  • restore both chat and files;
  • cherry-pick useful files;
  • discard rough code but keep distilled lessons.

Why

Pi's /tree can move through conversation branches, while git can move through file history. This package records anchors between the two:

Pi leaf id  <->  git branch  <->  git commit  <->  checkpoint name

Tracer records are stored per repository under:

.git/pi-tracer/records.jsonl

They do not dirty your worktree.

Install

pi install npm:@unilinear/pi-file-chat-tracer

or from GitHub:

pi install git:github.com/unilinear/pi-file-chat-tracer

Reload Pi after installation if needed:

/reload

Commands

Start an exploration branch

/trace-explore <idea>

Creates exp/<idea>, makes a start checkpoint, and records the current chat leaf.

Manual checkpoint

/trace-checkpoint <name> | <reason>

Commits current file changes and links the commit to the current Pi leaf.

Status

/trace-status

Shows current branch, HEAD, dirty count, and recent file-chat anchors.

Restore files

/trace-restore <commit>

Runs a confirmed git reset --hard <commit>.

Agent tools

The package exposes two tools to the model:

  • tracer_status: inspect current git/tracer state.
  • tracer_checkpoint: create a rate-limited milestone checkpoint.

The checkpoint tool is intentionally conservative: it has a per-session limit and requires a meaningful reason.

/tree integration

The extension listens to Pi tree events:

  • session_before_tree: injects recent tracer anchors into the tree summary.
  • session_tree: records the new leaf id with the current git branch/commit.
  • session_before_fork: if an anchor exists for a forked node, shows restore instructions instead of restoring automatically.

This gives /tree enough checkpoint history to align conversation return points with file return points.

Safety model

This package is deliberately conservative:

  • no autonomous reset;
  • no autonomous merge;
  • no autonomous branch switching except explicit /trace-explore user command;
  • destructive restore requires confirmation;
  • agent checkpointing is rate-limited;
  • tracer metadata is stored inside .git/, not committed to your project.

Recommended workflow

/trace-explore new-idea
# let the agent explore
/trace-checkpoint rough-v1 | first working prototype, still needs cleanup
# use /tree if context is polluted
/trace-status
# choose: merge, cherry-pick, reset, or keep only lessons

At the end of each exploration, classify the result:

A. keep code and lessons  -> merge/promote
B. keep only some files   -> cherry-pick
C. keep only lessons      -> write notes, reset/delete branch
D. discard all            -> delete branch

License

MIT