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

ralph-research

v0.1.2

Published

Local-first runtime for recursive research improvement.

Downloads

335

Readme

ralph-research

Local-first runtime for recursive research improvement.

ralph-research runs a bounded improvement loop over a real artifact:

  1. define a metric
  2. generate one candidate change
  3. evaluate it
  4. keep only verified improvements

The v0.1 focus is a writing workflow that is runnable in under five minutes on a local machine.

Quickstart

Zero-config demo

npx ralph-research demo writing

This creates a temporary writing repo, runs one accepted cycle, and prints the path plus the run id. The v0.1 demo supports the bundled writing template only.

Template flow

npx ralph-research init --template writing
npx ralph-research run --json
npx ralph-research run --until-target --until-no-improve 3 --json
npx ralph-research inspect run-0001 --json

This path is the v0.1 success bar: init -> run -> inspect should work quickly and produce an acceptance reason you can inspect. The bundled template set is currently writing only.

Core Concepts

  • Manifest: ralph.yaml defines the research program.
  • Metric: how candidate quality is measured.
  • Frontier: the currently accepted best candidate set.
  • Ratchet: the acceptance policy that decides whether the frontier advances.
  • Proposer: how a bounded candidate change is generated.
  • Judge: how qualitative outputs are compared when numeric metrics are not enough.

Writing Template

The bundled writing template is self-contained:

  • docs/draft.md: sample draft
  • scripts/propose.mjs: bounded rewrite
  • scripts/experiment.mjs: output materialization
  • scripts/metric.mjs: local heuristic metric
  • prompts/judge.md: pairwise judge prompt you can upgrade to later

The default template uses a local command metric so the first run does not require API keys. When you are ready, replace the numeric metric with an llm_judge extractor and use the included pairwise prompt as a starting point.

CLI

rrx validate
rrx doctor
rrx init --template writing
rrx demo writing
rrx run
rrx run --until-target
rrx run --until-target --until-no-improve 3
rrx status
rrx frontier
rrx inspect <runId>
rrx accept <runId>
rrx reject <runId>
rrx serve-mcp --stdio

rrx run --cycles N still executes a finite loop. Progressive modes are opt-in:

  • --until-target: keep iterating until manifest.stopping.target is satisfied
  • --until-no-improve N: stop after N consecutive cycles without a frontier improvement
  • --cycles N with a progressive flag: treat N as a max-cycle cap instead of an exact count

rrx status now reports both the persisted latest run snapshot and the runtime view derived from the lock heartbeat, so running (alive) is distinguished from stale (resumable) and the output includes heartbeat and last-progress timestamps when available.

Stopping Targets

Use stopping.target when the workflow contract is "keep going until metric X reaches threshold Y":

metrics:
  catalog:
    - id: exact_rate
      kind: numeric
      direction: maximize
      extractor:
        type: command
        command: "python scripts/metric.py"
        parser: plain_number

frontier:
  strategy: single_best
  primaryMetric: exact_rate

ratchet:
  type: epsilon_improve
  metric: exact_rate
  epsilon: 0

stopping:
  target:
    metric: exact_rate
    op: ">="
    value: 0.8

Metric Diagnostics

If a metric script can explain why a candidate was zeroed or downgraded, prefer JSON output plus parser: json_path so the reason survives into run, decision, and inspect output:

metrics:
  catalog:
    - id: exact_rate
      kind: numeric
      direction: maximize
      extractor:
        type: command
        command: "python scripts/metric.py"
        parser: json_path
        valuePath: $.value
{
  "value": 0,
  "metricId": "overfit_safe_exact_rate",
  "reasons": ["all_missing_features", "normalized_order_leak"]
}

When project.workspace=git, rrx now warns if proposer, experiment, or metric command files are dirty in the working tree, because detached candidate worktrees only see committed baseline content.

MCP

The bundled MCP server currently supports stdio transport and exposes three thin tools backed by the same service layer as the CLI:

  • run_research_cycle
  • get_research_status
  • get_frontier

Design Principles

  • local-first execution
  • bounded changes
  • recoverable state transitions
  • trusted signal before automation
  • inspectable accept/reject decisions

Development

npm install
npm test
npm run typecheck
npm run build

License

MIT