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

@repochan/core

v0.2.0

Published

Pure RepoChan protocol, schemas, and entity management primitives.

Readme

@repochan/core

Pure TypeScript primitives for the RepoChan .repochan/ protocol — the deterministic backbone shared by the CLI and tests.

Core has no agent runtime, no image credentials, and no pixel-processing dependencies. APIs take projectRoot: string or plain JSON and preserve the on-disk format used by the public repochan CLI. See the monorepo ARCHITECTURE.md for how core fits the layered design.

Three-layer design (inside core)

┌─────────────────────────────────────────────┐
│  Business Rules  entities/*.ts               │  state machine, dependency gates, approval
├─────────────────────────────────────────────┤
│  Protocol        protocol/index.ts           │  current.json + versions/, safe paths, require*()
├─────────────────────────────────────────────┤
│  Schema          schemas/index.ts            │  artifact shapes, params gates, WriteOpSchemas
└─────────────────────────────────────────────┘

Principle: anything that can be formalized as a deterministic constraint lives here, not in a prompt. Schemas are gates (they validate the params core actively reads), not mirrors of entities — business rules run after validateInput passes.

What core owns

Schema — src/schemas/index.ts

Artifact shapes (written under .repochan/):

  • PersonaArtifactSchema, InterviewArtifactSchema, OrderResultVersionSchema, AnalysisArtifactSchema
  • Each carries schemaVersion, generatedAt, provenance.

Write-operation params gates and the WriteOpSchemas registry. validate.ts exposes validateInput(action, schema, params).

Protocol — src/protocol/index.ts

  • PROTOCOL_DIR (.repochan), protocolRoot, safeProtocolPath, and safe read/inspect APIs
  • initProtocol / inspectProtocol
  • Versioning helpers and order/review/persona-candidate path helpers
  • Dependency gates: requireAnalysis, requirePersona, requireInterview

Business rules — src/entities/

  • Persona: create/update, candidates, promote
  • Interview: create/update, append
  • Orders: CRUD-ish ops, status machine, results, candidates, foundation find, reference resolve (role-sorted), file-reference materialization
  • Reviews: order review, persona review
  • Approval gate: ensureOrderApprovedForExecution

Deterministic analysis — src/analysis/

performAnalysis / writeAnalysisArtifact / updateAnalysisArtifact — runnable without any LLM. Helpers: walk, git-profile, tech-stack, colors, desensitize, inventory, sample, abstract.

Validation — src/validation.ts, src/validate.ts

  • validateInput — per-write params gate
  • validateProtocol — whole-tree integrity (used by repochan validate)

Public API

The package root exposes the supported library surface. Protocol mutation primitives stay internal; public writes use schema-validated entity actions:

export * from "./types.js";
export * from "./protocol/public.js";
export * from "./schemas/index.js";
export * from "./utils/index.js";
export * from "./validate.js";
export * from "./entities/index.js";
export * from "./analysis.js";
export * from "./validation.js";
export * from "./starter.js";

Consumers import solely from @repochan/core.

Purity rules (enforced)

Core must not:

  • import agent runtimes or register tools,
  • contain agent prompts or role guidelines,
  • hold image-provider API keys,
  • perform grid slicing / sticker extraction (that lives in @repochan/image-edit).

Development

# From monorepo root
pnpm --filter @repochan/core build
pnpm --filter @repochan/core test

Per monorepo AGENTS.md: when changing core protocol or business rules, always run the core test suite.

Related