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

@consensus-tools/personas

v0.10.0

Published

Persona lifecycle for consensus-tools — types, defaults, reputation, respawn

Readme

@consensus-tools/personas

Persona lifecycle for consensus-tools — types, default packs, deterministic reputation updates, and persona respawn with learning.

Install

pnpm add @consensus-tools/personas

Persona Packs

Three built-in packs of personas ready to use:

| Pack | Count | Focus | |------|-------|-------| | default | 3 | Security analyst, compliance officer, operations engineer | | skill-review | 5 | Specialists for SKILL.md evaluation | | governance | 5 | Lifecycle personas for consensus voting (with reputation) |

import { getPersonasByPack, getEvalPersonas, PERSONA_PACKS } from "@consensus-tools/personas";

// Get governance personas (PersonaConfig[])
const voters = getPersonasByPack("governance");

// Get evaluation personas with systemPrompt + evaluationFocus (EvalPersonaConfig[])
const evalPersonas = getEvalPersonas("default", 3);

// List available pack names
console.log(PERSONA_PACKS); // ["default", "skill-review", "governance"]

Reputation Updates

Deterministic reputation engine. Aligned voters gain reputation, misaligned voters lose it, with a confidence penalty boost for high-confidence wrong votes.

import { updateReputation, DEFAULT_RULESET } from "@consensus-tools/personas";

const votes = [
  { persona_id: "security-analyst", vote: "NO", confidence: 0.9 },
  { persona_id: "compliance-officer", vote: "YES", confidence: 0.7 },
];

const result = updateReputation(votes, "BLOCK", voters, DEFAULT_RULESET);
// result.changes: ReputationChange[] — per-persona delta and new reputation

Default Ruleset

| Parameter | Value | Effect | |-----------|-------|--------| | rewardAligned | +0.02 | Aligned with final decision | | penalizeMisaligned | -0.03 | Disagreed with final decision | | highConfidencePenaltyBoost | -0.02 | Extra penalty for confident wrong votes | | minRep | 0.05 | Floor — personas are never fully silenced | | maxRep | 0.95 | Ceiling |

Persona Respawn

When a persona's reputation drops too low, analyze its mistakes and create a successor:

import { buildLearningSummary, mutatePersona } from "@consensus-tools/personas";

// Analyze past decisions to find mistake patterns
const learning = buildLearningSummary("security-analyst", decisionHistory);
// learning: { source_decisions: number, mistake_patterns: string[] }

// Create a successor persona informed by learning
const successor = mutatePersona(originalPersona, learning);
// successor: PersonaConfig with updated bias/non_negotiables

Exports

| Export | Kind | Description | |--------|------|-------------| | getPersonasByPack(pack) | Function | Get lifecycle personas by pack name | | getEvalPersonas(pack, count?) | Function | Get evaluation personas with prompt fields | | PERSONA_PACKS | Const | List of available pack names | | updateReputation(input) | Function | Deterministic reputation update engine | | DEFAULT_RULESET | Const | Default reputation update rules | | buildLearningSummary(id, history) | Function | Analyze past decisions for mistake patterns | | mutatePersona(persona, learning) | Function | Create successor persona from learning | | PersonaConfig | Type | Base persona (id, name, role, reputation?, bias?) | | EvalPersonaConfig | Type | Evaluation persona (extends PersonaConfig with systemPrompt, evaluationFocus) | | PersonaSet | Type | Set of personas with metadata and lineage | | ReputationRuleset | Type | Configurable reputation update rules | | ReputationChange | Type | One persona's reputation delta | | ReputationDeltaResult | Type | Full reputation update result | | LearningSummary | Type | Learning analysis from decision history | | RespawnResult | Type | Result of a persona respawn operation |

Links

consensus-tools on GitHub