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

rsih-codex

v0.6.0

Published

Local correction-aware memory and quality controls for Codex

Readme

RSIH-Codex

Codex forgets your corrections. Your harness should not.

Status: technical alpha Python 3.11+ No API key Tests: 837 passing License: MIT

RSIH-Codex is a local, correction-aware memory and quality-control layer for Codex. It finds explicit corrections in your previous Codex sessions, turns them into bounded personal memory, and—only with your approval—uses that memory to help Codex avoid repeating the same mistakes.

It does not retrain the model. It gives Codex better, evidence-backed instructions at the time they matter.

The value in one sentence: correct Codex once, preserve the lesson locally, and make that correction available to future Codex tasks.

Read the visual product overview


Why RSIH-Codex?

Without a harness, valuable feedback often disappears with the session:

| Without RSIH-Codex | With RSIH-Codex | | --- | --- | | You correct the same mistake again | Explicit corrections become private memory | | Every new task starts almost from zero | Relevant lessons can carry into later tasks | | Improvement is hard to measure | Changes are replay-tested and reported honestly | | Instructions drift invisibly | Every behavioral change has an exact preview | | Removing a change is risky | RSIH-Codex reverts only the state it owns |

What you get

| Learn from history | See an immediate benefit | Improve with continued use | | --- | --- | --- | | Onboarding scans eligible previous Codex tasks after asking permission. | Production-reviewed lessons can be activated immediately without model calls. | Later scans add new corrections to the private memory corpus and identify broader candidates. | | Raw sessions stay in Codex storage. | You see the exact AGENTS.md change before approving it. | Broader changes must pass replay checks before they can affect Codex. |


Quick start

Requirements

  • macOS or Linux
  • Node.js 18 or newer for the npm launcher
  • Python 3.11 or newer
  • Codex CLI installed and signed in with a ChatGPT subscription
  • Git available on PATH for isolated replay fixtures

No OpenAI API key is required. Optional replay certification uses the Codex subscription login already saved on your computer.

Install with npm

npm install --global rsih-codex
rsih-codex onboard

The npm package has no JavaScript dependencies or install-time lifecycle scripts. It ships the validated Python core and launches it with a locally installed Python 3.11 or newer. If several Python versions are installed, select one explicitly with RSIH_CODEX_PYTHON=/path/to/python.

For development from a checked-out source tree, install with uv:

uv tool install .

Onboard

rsih-codex onboard

That single command guides you through:

  1. Readiness — verifies Codex, authentication, private state, and existing deployments.
  2. Consent — explains exactly what history will be read before reading anything.
  3. Learning — scans 90 days of eligible local history, including archives by default.
  4. Immediate value — shows any production-reviewed memory that can be activated now.
  5. Exact approval — displays the complete AGENTS.md diff before changing Codex.
  6. Future value — shows what was learned and what evidence is needed for broader adaptation.

Start a new Codex session after activation so the new memory loads into context.

For a read-only first look:

rsih-codex onboard --allow-history --scan-only

How the learning loop works

flowchart LR
    A["Past Codex sessions"] --> B["Detect explicit corrections"]
    B --> C["Create private correction cards"]
    C --> D{"Evidence path"}
    D -->|"Production-reviewed lesson"| E["Preview immediate memory"]
    D -->|"Broader behavior pattern"| F["Replay certification"]
    E --> G["Exact user approval"]
    F --> G
    G --> H["Future Codex sessions"]
    H -. "More use and corrections" .-> A

Immediate memory versus future adaptation

| | Immediate reviewed memory | Broader future adaptation | | --- | --- | --- | | Source | A correction matching a production-reviewed lesson | Repeated correction patterns and verified controls | | First effect | Durable global guidance in AGENTS.md | Candidate rule plus relevant task-time memory | | Model calls | None during onboarding | Only after a separate subscription-spend approval | | Activation | Exact diff and explicit approval | Replay certificate, exact deployment preview, and approval | | Claim | Useful reviewed memory is active | Benefit remains unclaimed until appropriate evaluation passes |

RSIH-Codex does not silently run in the background today. Rerun rsih-codex onboard after more Codex use to import newer corrections. This keeps history access visible and consent-based.


What is actually remembered?

RSIH-Codex looks for explicit human corrections, not every conversation detail. Eligible corrections become source-bound cards containing:

  • a project scope;
  • keyed matching cues;
  • a bounded correction excerpt or reviewed lesson;
  • a source fingerprint and detector version; and
  • lifecycle state so stale evidence can be retired.

When trusted hooks are active, a later matching prompt can receive at most three reviewed lessons and three relevant correction cards. The current request always wins if it directly conflicts with historical memory.

Example

You ask Codex to add note archiving. Later, you correct it because archive and delete were conflated. RSIH-Codex can preserve the reviewed acceptance contract:

Archive retains and hides the note. Delete permanently removes it. Unless explicitly excluded, implement and verify both lifecycle paths.

On a later relevant note-library task, Codex receives that lesson instead of relying on you to repeat it.


Evidence so far

Exploratory proof of mechanism

In the corrected V7 paired benchmark, GPT-5.5 medium completed unseen synthetic note-lifecycle tasks under two conditions:

RSIH-Codex reviewed memory  [#####.]  5 / 6
No reviewed memory          [......]  0 / 6

Observed difference: +83.3 percentage points.

The benchmark used six previously unexposed task representations, hidden state-based verifiers, balanced execution order, one attempt per arm, disabled actor web access, and Codex subscription authentication with API credentials unset.

This is promising evidence that the reviewed-memory mechanism works. It is one exploratory synthetic benchmark in one semantic task cluster. It is not evidence that RSIH-Codex makes every Codex task 83.3% better, and it does not yet prove broad or longitudinal benefit for every user.

That distinction is enforced in the product: replay certificates and historical measurements cannot silently authorize a causal benefit claim.


Privacy by design

| Data or action | RSIH-Codex behavior | | --- | --- | | Raw Codex sessions | Read locally after consent; remain in Codex storage | | Derived evidence | Stored privately under ~/.codex/rsih-codex/ by default | | Prompt matching | Uses keyed cues and keyed project scope | | Prompt text seen by hooks | Not persisted by the hook | | OpenAI API credentials | Not required or used | | Subscription calls | Never started without an exact replay preview and approval | | AGENTS.md changes | Exact diff shown before application | | Hooks | Installed inactive and require separate trust before activation | | Revert | Removes only RSIH-Codex-owned state |

Safety principles

  • Unknown, incomplete, stale, or conflicting evidence fails closed.
  • Current user instructions override historical memory.
  • Holdout evidence never becomes static-rule training evidence.
  • Broad behavior changes require replay certification.
  • Every deployment is signed, source-bound, monitored, and reversible.
  • RSIH-Codex never modifies model weights.

Commands

| Command | Purpose | Starts model calls? | | --- | --- | --- | | rsih-codex onboard | Guided first run, history learning, and safe activation | No | | rsih-codex doctor | Verify the local installation and deployment health | No | | rsih-codex run | Incrementally refresh historical evidence | No | | rsih-codex report | Show a privacy-preserving product report | No | | rsih-codex rules | List candidate rules and certificates | No | | rsih-codex explain --candidate ID | Explain one candidate and its evidence gaps | No | | rsih-codex improve | Estimate or preview an improvement | No by default | | rsih-codex monitor | Refresh evidence and inspect deployment decisions | No | | rsih-codex revert | Preview or remove owned integration state | No | | rsih-codex measure | Assess what benefit evidence does and does not establish | No |

Only the exact confirmation command emitted by rsih-codex improve can start subscription replay calls.


Project status

RSIH-Codex 0.6.0 is a technical alpha.

Ready today:

  • guided, consent-based onboarding;
  • local historical correction mining;
  • immediate reviewed-memory activation when eligible;
  • bounded project-scoped correction cards;
  • subscription-only replay certification with no API key;
  • exact deployment previews, health checks, monitoring, and revert; and
  • validated zero-dependency npm package, Python wheel, and source distribution.

Still in progress:

  • automatic background history refresh;
  • a larger, multi-cluster external benchmark; and
  • prospective evidence that measures benefit accumulated from each user's future corrections.

This project is independent and is not affiliated with or endorsed by OpenAI.


License

RSIH-Codex is available under the MIT License.


Development

uv sync
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy src
npm test
npm pack --dry-run

Current release verification: 837 tests passing, repository-wide Ruff checks clean, and strict mypy passing across 42 source modules.

See LOG.md for the complete implementation and verification history.