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

llm-wiki-governance

v1.42.0

Published

Governance for AI-written project docs: verify, catch drift, keep them code-grounded, enforce in CI. OKF-compatible, zero-dependency.

Readme

Language: English | 한국어

LLM-WIKI Governance

npm CI license

Review states, source citations, and drift checks for the project knowledge your AI coding agent writes and reads.

Coding agents are good at writing project docs and bad at noticing when those docs stop being true. LLM-WIKI Governance is a zero-dependency CLI that holds that knowledge — a Markdown wiki in docs/llm-wiki/ — to the same discipline as code. Agent-written docs stay needs_review until someone approves them. Every doc cites the files it describes. When a cited file changes, the doc gets flagged and CI can fail on it. It needs Node.js ≥ 18.18, works alongside Claude Code, Codex, Cursor and other agents, and is OKF-compatible.

flowchart LR
  A["Agent writes or updates a doc"] --> B["needs_review"]
  B -- "review --approve" --> C["verified"]
  C -- "a cited source file changes" --> D["drift / impact finding (CI can fail)"]
  D -- "update the doc, approve again" --> C
  C -. "read-only CLI / MCP" .-> E["Agents read verified docs"]
  1. Scaffold. quickstart --write creates the wiki, plus adapter files (AGENTS.md, CLAUDE.md, …) that point your agent at it.
  2. Enrich. Your agent, or you by hand, fills the docs from real source files and cites them in frontmatter (source_files, evidence). The CLI checks that each citation resolves.
  3. Review. Docs stay needs_review until review --approve stamps them verified. No other command promotes a doc.
  4. Watch. drift (by review date) and impact (by diff against a PR base) flag verified docs whose cited sources changed, and CI can fail on them.

Quick start

npm install -D llm-wiki-governance
npx llm-wiki-governance quickstart --write --agent claude   # or --agent codex; add --type <type> if detection is wrong

This detects the project, creates the wiki and adapter files, and prints a handoff prompt. Paste it into your agent: it fills in the docs from real source files and leaves everything needs_review for you to approve with npx llm-wiki review --approve <path>. No agent? Write the docs yourself: Writing docs by hand walks one document from scaffold to verified. quickstart --dry-run shows what would be created; --skills also generates wiki-grounded agent prompts (bootstrap, onboard, prepare, feature, fix, docs-sync, backfill). An existing OKF or plain-Markdown folder works too: --profile okf-v0.1 adds verification and CI without changing your format.

The CLI needs no model or API key. The docs are filled either by your agent or by you, and that first build decides quality; with an agent, use your strongest reasoning model for it.

Change checks start off. A new project starts in the lite governance mode, where impact and drift report nothing when a cited file changes (impact says so in its summary). Turn them on when you want reviewed docs flagged: npx llm-wiki mode set standard --write (warnings) or strict (fails the build). You can also start that way with quickstart --write --mode standard. npx llm-wiki mode shows what is on. On the day you approve a doc, try impact --since HEAD~1 rather than drift: the date-based drift does not see a change committed the same day as the review.

About the command name. Output and docs write commands as llm-wiki …, the bin this package installs. After npm install -D, run them as npx llm-wiki …; without a local install, use npx llm-wiki-governance …. Do not run npx llm-wiki where the package is not installed: an unrelated npm package has that name.

Starting a project that has no code yet (--greenfield, 1.38.0): quickstart --write --greenfield adds requirement and decision (ADR) documents and prints a planning prompt. Your agent records the purpose, requirements, acceptance criteria, and decisions you state, invents none, and cites no source. Approving a requirement approves the plan, not an implementation: validate reports an approved plan with nothing linked as info, and stats counts plans apart. Once code exists, link each requirement's source files and tests in its evidence. From then on it is checked like any other doc, and the existing-project steps above apply. When an approved requirement or decision changes later, impact lists the files it links and whether each changed in the same diff (1.39.0, info); it names what to re-check and judges nothing. examples/greenfield-vue-demo runs this path from an empty repository.

Demo. examples/vue3-typescript-demo runs the whole loop on a small Vue 3 app in a temporary git repo (npm install && npm run demo, Node.js 20.19+, no API key): two source-backed docs, validate --strict, review --approve, then a code change that makes impact exit 1 until the doc is updated. It also shows the limits: a doc updated with the wrong number passes, and date-based drift misses a change committed the same day as the review.

Other stacks. Two more walkthroughs run on an existing Python (FastAPI) service (examples/python-fastapi-brownfield) and on a React + Express workspace with a shared API contract (examples/react-node-fullstack). Each needs only Node.js and git. What has been checked on which stack, how to reproduce it, and what has not been shown is in docs/VALIDATION.md. In an npm-workspace repository whose root manifest names no framework, detection says unknown and init suggests a --type from the member manifests.

Why not just an AGENTS.md or CLAUDE.md?

Keep them: this tool generates them and points them at the wiki. An instruction file tells an agent how to work. It does not record whether a statement was reviewed, which code it came from, or whether that code has changed since.

| | Instruction file alone | With LLM-WIKI Governance | | --- | --- | --- | | Who approved this text? | unrecorded | needs_review → verified, with reviewed_by and reviewed_at | | What is it based on? | prose | cited files, line ranges, symbols, or sections, each checked to resolve | | Is it still current? | you find out when the agent gets it wrong | drift / impact flag the doc when a cited source changes | | Is any of it enforced? | no | validate and impact exit non-zero in pre-commit or CI | | How do agents read it? | the whole file, every session | a small index, then ranked keyword search and targeted reads through the CLI or MCP |

What it does not do

  • It does not check that the prose is true. It checks that each citation resolves: the file exists, the line range fits, the symbol is mentioned, the section heading exists. Whether the sentence is correct is still the reviewer's call.
  • It does not write your docs. The CLI scaffolds, checks, and prints prompts; you or your agent write the content.
  • It cannot prove who approved. reviewed_by records the name given to review --approve. List agent names under agentReviewers so stats counts their approvals apart; branch protection, not this tool, controls who can merge. This repository's own wiki is agent-approved by a recorded maintainer decision (AGENTS.md).
  • It is not semantic search. Retrieval ranks keyword matches (BM25); there are no embeddings and no index service. It is not a hosted service either: the CLI makes no network calls of its own.
  • Change detection is mostly file-level. impact and drift narrow only citations that are line ranges or Markdown sections, and since 1.39.0 drift narrows only when the commit that recorded the review agrees; the date-based drift also has blind spots that depend on your merge strategy. See Wiring the gate.

Commands

| Command | What it does | | --- | --- | | quickstart · init | Set up the wiki and adapter files, then print the agent handoff prompt. | | validate · audit · status | Structure and safety validation for local checks and CI · full findings report · current wiki state. | | drift · impact | Flag documents whose cited source has moved — by date, and by diff against a PR baseline. | | review | Risk-ranked needs_review backlog; --approve is the only path to verified. | | mode · backfill | Read or change the governance level · rebuild an incomplete wiki from what the repository can prove. | | onboard · prepare | Learn a work area, or scope a change before implementing it. Read-only. | | list-docs · search-docs · get-doc · get-related | Read-only retrieval that returns document content, with sensitive-looking values redacted. | | graph · stats | Knowledge graph (text/JSON/Mermaid/DOT) · health snapshot. | | doctor · next · explain | Check the runtime, detection, and CI wiring · suggest the next action · explain a finding. | | mcp | Run the read-only MCP server. | | fix · migrate · archive-log · handoff · prompt · check-run · harness-health · import-memory | Scoped autofix, contract upgrade, change-log volumes, agent prompts, and harness checks. |

Writes happen only with an explicit --write, --apply, --approve, drift --downgrade, or --out <file>; everything else, and every MCP tool, only reads. --lang ko gives Korean findings and --doc-lang ko generates Korean wiki content. The package can be imported instead of shelled out (import { commands, run } from "llm-wiki-governance"). npx llm-wiki-governance help <command> is the full offline reference; --version prints the installed version.

Run it in CI

Copy templates/github-actions/llm-wiki-validate.yml, or use the composite action in one step: uses: Dowon-Kim7949/llm-wiki-governance/.github/actions/[email protected]. It appends the report to the job summary, including the documents impact wants re-reviewed (summary: "false" turns that off). Check the mode first: under lite the impact step passes without checking anything. On a private repository, the runner-free templates/git-hooks/pre-commit hook and the LLM_WIKI_RUNNER variable (self-hosted runner) avoid shared runner minutes. Recipes per repository size: docs/OPERATIONS.md.

Governance modes

One engine, three policy levels, switchable at any time with { "governance": { "mode": "lite" } } in llm-wiki.config.json.

| | lite | standard | strict | | --- | --- | --- | --- | | Intent | development speed | speed and knowledge | completeness, verification, handoff | | Docs after a code change | only what the code cannot show | when a domain, architecture, or contract moves | every affected document | | Drift and missing-doc gate | off | reports (warning) | fails the build (error) |

quickstart scaffolds lite. A config without a governance block resolves to strict, the rule set enforced before modes existed. Structural and safety checks run in every mode. A rule a mode turns off is only not reported: stats and next still measure enrichment and evidence, and review still refuses to approve an unfilled scaffold. The intended path is months in lite, then mode set strict --write and backfill before a handoff. Before making impact a required check: under strict, impact.source_changed is an error, so impact --since <ref> fails a build on its own; use standard, or pin "impact.source_changed": "warning" in rules.

Agent-native (MCP)

llm-wiki mcp runs a Model Context Protocol server over stdio with Node built-ins only:

{ "mcpServers": { "llm-wiki": { "command": "npx", "args": ["-y", "llm-wiki-governance", "mcp"] } } }

Every tool is read-only; promotion to verified stays a CLI action. The server has no authentication and its cwd argument is not a sandbox, so keep it a local subprocess (SECURITY.md). Versions before 1.40.0 could be made to write a file through validate; upgrade.

What it takes to run

Setup is one quickstart --write and one enrichment session. Day to day, when drift or impact flags a doc, update it and approve it again. Value comes from maintained content, not from the tooling: in our benchmark (one external repository, one model, six tasks), a wiki that existed but was never enriched measured worse than no wiki at all. Conditions and the runs that went against us: BENCHMARK.md (Korean prose) and BENCHMARK_DISCLOSURE.md.

Runs on Windows, macOS, and Linux with no runtime dependencies. It detects Node, Python, Go, Rust, JVM, PHP, Ruby, .NET, mobile, and infra projects, and ships adapters for Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, and Gemini CLI.

Troubleshooting and documentation

| If you… | Then | | --- | --- | | get an older version from npx | npx can reuse a cache: run npx llm-wiki-governance@latest … and check with --version. | | see llm-wiki: command not found | Prefix it: npx llm-wiki … after a local install, npx llm-wiki-governance … without one. | | changed a cited file and impact or drift flagged nothing | The project is probably in lite: npx llm-wiki mode. See Change checks start off above. | | found the docs confusing, or setup failed | Open a first-run report. It asks only for versions and the commands you ran. | | see a finding you do not recognize | llm-wiki explain <rule>. | | are unsure about setup or CI wiring | llm-wiki doctor. | | are blocked by sensitive.redacted | When the sensitive-info scan blocks you | | want every command, option, and exit code | help <command> · PUBLIC_API.md (Korean prose) | | want the trust model, or to report a vulnerability | SECURITY.md | | want security fixes | They ship in the latest release only: npm install -D llm-wiki-governance@latest, then check --version. | | want worked examples | EXAMPLES.md (Korean prose) | | want history, direction, or the decision record | CHANGELOG.md · ROADMAP.md · GATE_REVIEW.md |

Bug reports and questions: Issues and Discussions. Before a pull request, read CONTRIBUTING.md and the Code of Conduct. Licensed under MIT.