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

jev-chess

v1.1.0

Published

Designing Chess Moves and Games with TypeSafe AI (System One / Jev)

Downloads

133

Readme

jev-chess

Chess moves, evaluations, persona opponents, and game classification using TypeSafe AI System One models.

npm install jev-chess

Quick start

import { ChessEngine, MoveResolver, MoveEvaluator, PersonaEngine } from "jev-chess";

const engine = new ChessEngine();
const resolver = new MoveResolver();
const evaluator = new MoveEvaluator();
const personas = new PersonaEngine();

// Natural language intent -> verified legal move
const { matchedMove } = await resolver.resolveIntent(engine, "Develop knight to attack center");
const move = engine.makeMove(matchedMove.san);

// Parallel System One evaluation
const evalResult = await evaluator.evaluateMove(engine, move);
console.log(`${move.san}: ${evalResult.commentaryBadge} (Sharpness: ${evalResult.tacticalSharpness.score}/3.0)`);

// Opponent response via composite scoring
const { selectedMove, rationale } = await personas.selectMove(engine, "tal");
engine.makeMove(selectedMove.san);
console.log(`Tal plays ${selectedMove.san}: ${rationale}`);

resolveIntent() maps natural language to verified legal moves via Choice. evaluateMove() assesses sharpness, strategic themes, and king risk in parallel. selectMove() weighs candidates against persona archetypes. That's the whole loop.

Natural language move intent

const { matchedMove, confidence, alternativeCandidates } = await resolver.resolveIntent(
  engine,
  "Castle kingside to safety"
);

if (matchedMove && confidence > 0.6) {
  engine.makeMove(matchedMove.san);
}

Resolves ambiguous instructions against verified legal moves instead of generating coordinates from scratch. If confidence falls below threshold, it returns candidate alternatives rather than hallucinating illegal squares.

Parallel move evaluation

const evaluation = await evaluator.evaluateMove(engine, move);

// evaluation.tacticalSharpness -> Score (0.0 to 3.0)
// evaluation.strategicTheme    -> Choice (pawn_break, tactical_strike, prophylaxis, etc.)
// evaluation.kingAttackRisk    -> Noul (0.0 to 1.0 probability)
// evaluation.commentaryBadge   -> "Sharp Tactical Clash"

A single systemOne() call evaluates candidate moves across four orthogonal dimensions simultaneously. Deterministic code synthesizes the results into human-readable commentary without asking an LLM to generate prose.

Persona AI opponents

const decision = await personas.selectMove(engine, "tal");
// or "petrosian", "capablanca", "coffeehouse"

Personas are client-side weight vectors over atomic System One dimensions:

  • Tal: Heavy weight on tactical sharpness, king attack, and psychological pressure
  • Petrosian: Dominant prophylaxis and king safety weights
  • Capablanca: Prioritizes simplification and clear piece coordination
  • Coffeehouse: Romantic gambiteer favoring king assault and complications

Historic game classification

import { ClassicMatchStudio, CLASSIC_MATCHES } from "jev-chess";

const studio = new ClassicMatchStudio();
const report = await studio.classifyMatch(CLASSIC_MATCHES[0]);

console.log(report.archetype);            // "ROMANTIC SWASHBUCKLER"
console.log(report.aestheticBrilliance);   // { score: 2.9, level: "Immortal artistic masterpiece..." }
console.log(report.turningPoint);         // { moveNumber: 20, san: "Ke2", ... }

Classifies full games into historical archetypes, detects turning points, verifies sacrifices, and generates structural tension breakdowns.

Studio & demo

npm run demo     # Interactive terminal showcase
npm run serve    # Browser studio on http://localhost:3333

Interactive studio with board replay, real-time move intelligence, dynamic API key configuration, and classic match recreations.

Related

License

MIT © Hemanth.HM