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

@pikku/knowledge

v0.12.19

Published

The Open Knowledge Format app-project profile — read, validate and index a project's knowledge/ notes

Readme

@pikku/knowledge

Read, validate and index a project's knowledge/ directory — the notes that say what an app is, in the language its users use. MIT licensed, deliberately: the format is the open core, so any tool can adopt it without taking on the Pikku CLI's Business Source License.

The format is the Open Knowledge Format: a note is a markdown file whose path is its identity, carrying YAML frontmatter in which only type is required. This package implements one OKF profile — the app-project profile, whose sections are slices/, entities/, decisions/, questions/ and wishlist/.

Reading a bundle

import { readKnowledgeNotes, resourceIds } from '@pikku/knowledge'

for (const note of await readKnowledgeNotes(process.cwd())) {
  console.log(note.type, note.path, resourceIds(note))
}

Validating one

import { runKnowledgeValidate } from '@pikku/knowledge'

const { ok, findings } = await runKnowledgeValidate(root, outDir)

findings carries every note with no type, every section missing its index.md, every slice with a status outside proposed | dispatched | built or more than three entities or no third-person gherkin scenario — and every resource: that no longer resolves.

outDir is the pikku codegen output directory, which is what makes the last check possible: a note's resource: func:createEntry is verified against the generated function meta, so a rename in the code surfaces as a dangling reference rather than quietly turning the note into fiction.

The check fails closed on drift and open on ignorance — an id missing from a kind that resolved is an error, while a kind with no generated meta at all is skipped. A project with no queues is never told its queue references are broken.

Indexing one

import { runKnowledgeIndex } from '@pikku/knowledge'

await runKnowledgeIndex(root) // pass `true` to check without writing

Each index.md keeps whatever prose a human wrote; only the block between <!-- pikku:knowledge-index --> markers is regenerated.

Measuring a changeset against its plan

A changeset that touches the schema or adds an entity is planned before any code: its plan — JSON at knowledge/plans/<groupId>.plan.json, committed on the changeset's branch — says what has to EXIST for it, in passes. planShortfall reconciles that plan against pikku's generated meta under .pikku/, so "was this function written, this route wired, this scenario exported" is set membership rather than anyone's status:

import {
  functionsDirFor,
  planShortfall,
  readPikkuMeta,
  readPlan,
} from '@pikku/knowledge'

const read = readPlan(root, groupId)
if (read.ok) {
  const { missing, deferred, problems } = planShortfall(
    read.plan,
    readPikkuMeta(functionsDirFor(root))
  )
}

missing is the first pass and blocks; deferred is later work and is reported only. problems are things that exist but do not do what was planned — a function planned as restricted whose meta says auth: false, for one — and they block whatever pass they came from, because the hole is in the app now.

From the CLI

pikku knowledge validate
pikku knowledge index
pikku knowledge index --check

pikku knowledge plan schema                        # the plan format, in full
pikku knowledge plan set <changeset> <file>        # validate, then write
pikku knowledge plan show <changeset> --for-build  # the ordered work a build follows
pikku knowledge plan progress <changeset>          # what it still owes; non-zero while short
pikku knowledge plan defer <changeset> <item> -r "<why>"
pikku knowledge gaps                               # notes no change builds yet