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

@mostajs/skill-library

v0.1.0

Published

Mémoire de solveur APPRENANTE : décore un Solver (ex. @mostajs/ro-pla), mémorise/indexe les recettes (dialecte+params) par signature de problème avec un indice d'efficacité, les réutilise puis recycle. Injectable dans @mostajs/auto-pilot. Case-Based Reaso

Downloads

22

Readme

@mostajs/skill-library

Mémoire de solveur apprenante — décore un solveur, apprend quelle recette marche pour quelle forme de problème, la réutilise, et recycle.

Auteur : Dr Hamid MADANI [email protected] · Licence : AGPL-3.0-or-later

Module mince à responsabilité unique. Il décore un Solver (typiquement @mostajs/ro-pla.solve) : il mémorise les recettes de résolution (dialecte + paramètres) indexées par signature de problème, leur attribue un indice d'efficacité, les réutilise quand une forme se représente — sinon il retombe sur le solveur et recycle. Le solveur décoré a la même signature que le Solver de @mostajs/auto-pilot, donc il s'injecte tel quel.

Patron : Case-Based Reasoning + algorithm-selection (portfolio) + feedback HITL. Idée née et validée empiriquement sur le CRM TRADING (banc « armes » : la stratégie gagnante dépend de la forme du problème).

Principe clé : un skill = la recette re-résolue, pas la solution figée. On mémorise comment résoudre (rapide car le solveur est déterministe), pas le résultat — qui périme dès que la donnée change.

Installation

npm install @mostajs/skill-library

Usage — composition réelle

import { solve as roPlaSolve } from '@mostajs/ro-pla';
import { createAutoPilot } from '@mostajs/auto-pilot';
import { createSkillLibrary } from '@mostajs/skill-library';

const lib   = createSkillLibrary({ repositories: ormRepos, solver: roPlaSolve, audit, domain: 'matching' });
const pilot = createAutoPilot({ solver: lib.solver });   // ← le solveur DÉCORÉ s'injecte tel quel

// Résolution (via le copilote / l'app) ; la solution est annotée _skill
const res = await pilot.solve('assignment', input, { confirm: true });

// Confirmation HITL du copilote → renforce (ou pénalise) la recette
await lib.recordFeedback(res.solution, { accepted: true });

API

| Membre | Rôle | |---|---| | lib.solver(problem, opts?) | Solver décoré → solution annotée _skill:{ id, runId, from:'ro-pla'\|'cache', efficacy } | | lib.recordFeedback(runRef, { accepted?\|rejected?\|observedMetric? }) | Apprentissage HITL → { skillId, efficacy, active } | | lib.skills.{list,all,get,find,retire,importSeed} | Gestion des skills (dont bootstrap depuis bancs) | | lib.stats() | { skills, runs, reuseRate, avgEfficacy, byKind } | | lib.signatureOf(problem) · lib.lastRun | Signature d'un problème · dernier run |

Options : signature, score, extractMetric (surchargeables) · epsilon (exploration) · decayHalfLifeDays (décroissance) · reviewAfterDays (re-validation) · retireBelow/retireMinSamples (anti-biais) · now/rng (déterminisme).

Garde-fous intégrés

  1. skill = recette re-résolue (pas de solution figée) · 2. feedback HITL prioritaire (label supervisé) · 3. indice normalisé par kind · 4. décroissance + re-validation périodique · 5. ε-exploration · retrait des skills effondrés (anti-biais).

Gouvernance : le module ne contourne aucune garde. Un skill autopiloté reste soumis, côté app, à la permission <domaine>.autopilot + @mostajs/rules/trigger + @mostajs/audit. Le permission-gating reste la mitigation de l'injection de prompt.

Tests & exemple

npm test        # 8 tests unitaires
npm run example # apprentissage → réutilisation → feedback HITL → stats

Voir docs/00-PROPOSITION-PLAN-SKILL-LIBRARY-20062026.md (cas C, étape E13) et l'audit Entreprise/TRADING/docs/AUDIT-APPRENTISSAGE-SKILL-LIBRARY-2026-06-20.md.