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

@shikanga/openclaw-self-improvement-runtime

v0.1.0

Published

[![CI](https://github.com/phantom-instruction-set/openclaw-self-improvement-runtime/actions/workflows/ci.yml/badge.svg)](https://github.com/phantom-instruction-set/openclaw-self-improvement-runtime/actions/workflows/ci.yml)

Readme

openclaw-self-improvement-runtime

CI

npm: @shikanga/openclaw-self-improvement-runtime

An OpenClaw workspace plugin that enforces structured self-correction at runtime.

When the agent makes a mistake, this plugin intercepts the normal task flow and requires a demonstrable correction cycle before work can continue — not a reminder, an enforcement gate.

What it does

  • Detects mistakes — user corrections and tool failures trigger an incident
  • Gates finalization — the agent cannot close a turn until it has acknowledged the mistake, identified the root cause, stated a prevention rule, and confirmed verification
  • Enforces closure format — replies are steered toward a labeled template (Root cause:, Prevention rule:, Verification:) rather than free-form apologies
  • Checks persistence evidence — closure only counts if a learnings file was actually written during the turn (mtime check)
  • Records everything — every incident open, revise, bypass, and close is written to a JSONL event log and a status dashboard in the workspace

Requirements

  • OpenClaw >=2026.5.6
  • Node.js >=22

Installation

clawhub install @shikanga/openclaw-self-improvement-runtime

Then enable it in your openclaw.json:

{
  "plugins": {
    "entries": {
      "self-improvement-runtime": {
        "enabled": true
      }
    }
  }
}

Restart the gateway:

systemctl --user restart openclaw-gateway

Configuration

All fields are optional. Defaults work out of the box.

{
  "plugins": {
    "entries": {
      "self-improvement-runtime": {
        "enabled": true,
        "maxReviseCount": 2,
        "eventLogRelativePath": "memory/self-improvement-runtime-events.jsonl",
        "persistenceCheckPaths": [
          "memory/FOREVER_LEARNING.md",
          ".learnings/LEARNINGS.md",
          ".learnings/ERRORS.md"
        ]
      }
    }
  }
}

| Field | Default | Description | |---|---|---| | enabled | true | Enable or disable without uninstalling | | maxReviseCount | 2 | Maximum gate retries before degraded bypass | | eventLogRelativePath | memory/self-improvement-runtime-events.jsonl | Workspace-relative path for the JSONL event log | | persistenceCheckPaths | ["memory/FOREVER_LEARNING.md", ".learnings/LEARNINGS.md", ".learnings/ERRORS.md"] | Workspace-relative paths checked for mtime evidence of a learnings write |

How closure works

When an incident is open, the agent must produce a reply containing all four elements:

I made a mistake.
[what was wrong]

Root cause: [why it happened]
Prevention rule: [concrete rule for future behaviour]
Verification: [how you confirmed the fix]

The gate checks for labeled sections first. If all four are present and non-trivial, the incident closes. If any are missing, the gate retries with an explicit skeleton. After maxReviseCount retries, the gate degrades to allow the conversation to continue — the incident is marked bypassed, not closed.

Learnings files

The persistence check looks for evidence that the agent actually wrote a lesson to disk during the turn — not just said it would.

The default paths (memory/FOREVER_LEARNING.md, .learnings/LEARNINGS.md, .learnings/ERRORS.md) are workspace-relative and follow the standard OpenClaw workspace layout. You do not need to create these files before installing — the plugin checks for an mtime newer than the incident open time, and simply skips any path that does not exist yet.

If your workspace uses different paths for learnings files, override them via persistenceCheckPaths in your openclaw.json.

Observability

Two files are written in the workspace:

  • Event log (memory/self-improvement-runtime-events.jsonl) — one JSON line per event: mistake_opened, gate_retry, gate_degraded_bypass, mistake_closed
  • Status dashboard (memory/self-improvement-status.md) — human-readable summary regenerated after each turn

Running tests

git clone https://github.com/phantom-instruction-set/openclaw-self-improvement-runtime.git
cd openclaw-self-improvement-runtime
npm install
node --test

npm install is required before node --test — it installs the minimal OpenClaw stub from test-fixtures/openclaw-stub/ that allows the test suite to resolve the openclaw import without a live gateway.

103 tests, 29 suites.

Releasing a new version

Releases are fully automated via GitHub Actions. The release workflow runs tests first — a failing test blocks the publish.

  1. Bump version in package.json, commit, and push to main
  2. Tag and push:
git tag vX.Y.Z
git push origin vX.Y.Z

GitHub Actions runs node --test then npm publish --access public on green.

License

MIT