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

@cjhdev/repo-ai-governor

v0.1.5

Published

Repository-local AI governance CLI.

Readme

Repo AI Governor

English | 简体中文

Repo AI Governor 是一个仓库内 AI 治理 CLI,帮助团队让 AI 编码过程始终遵循统一流程和质量规则。

解决什么问题

  1. 强制先方案后编码(plan -> implement -> check -> review)。
  2. 让 sprint 产物保持一致(plan.md、checklist、CSV 台账、任务卡、CR 文件)。
  3. 通过规范包与 slot 注入项目特有规则。
  4. CodexGitHub CopilotClaude Code 之间复用同一套治理能力。

安装

需要 Node.js >=18

# 直接运行
npx @cjhdev/repo-ai-governor --help

# 或安装为开发依赖
npm install --save-dev @cjhdev/repo-ai-governor
npx repo-ai-governor --help

包名和命令名不同:

  1. 包名:@cjhdev/repo-ai-governor
  2. 命令名:repo-ai-governor

快速开始

TMP_DIR="$(mktemp -d /tmp/repo-ai-governor-demo.XXXXXX)"
CLI="npx @cjhdev/repo-ai-governor"

# 1) 初始化治理目录
$CLI init \
  --cwd "$TMP_DIR" \
  --project demo \
  --sprint sprint-001 \
  --adapter codex \
  --locale zh-CN

# 2) 按当前 AI 工具安装官方 skills
$CLI skills install \
  --cwd "$TMP_DIR" \
  --surface codex

# 3) 做一次基线校验
$CLI doctor \
  --cwd "$TMP_DIR" \
  --project demo \
  --sprint sprint-001 \
  --strict

# 4) 准备需求并生成计划
cat > "$TMP_DIR/request.md" <<'EOF'
# Requirement
Build a repository governance demo flow.
EOF

$CLI plan \
  --cwd "$TMP_DIR" \
  --project demo \
  --sprint sprint-001 \
  --input "$TMP_DIR/request.md" \
  --title "Repository governance demo flow"

会生成的核心产物:

  1. .repo-ai-governor/governor.yaml
  2. AGENTS.md
  3. .repo-ai-governor/context/current-context.md
  4. docs/<project>/<sprint>/plan.md
  5. docs/<project>/<sprint>/tasks/*
  6. docs/<project>/<sprint>/code-review/*

与 AI 工具结合

按工具类型安装 skills:

  1. codex -> .codex/skills/
  2. github-copilot -> .github/skills/
  3. claude-code -> .claude/skills/

安装后建议让 AI 助手先做两件事:

  1. 读取 AGENTS.md.repo-ai-governor/context/current-context.md
  2. 按已安装 skill 执行(例如 $governor-plan-runner$governor-task-implementer$governor-delivery-finisher

核心命令

  1. init:初始化治理配置与 sprint 结构。
  2. skills:列出、安装、校验官方 skills。
  3. doctor:校验环境、配置和目录结构。
  4. plan:根据需求生成计划与任务产物。
  5. check:执行治理检查。
  6. review:生成 code review 记录。
  7. review-verify:复核并推进 CR 状态流转。
  8. report:输出 summary/markdown/json 报告。
  9. upgrade:安全升级生成式配置与模板。

自定义规范与项目规则

governor.yaml 支持规范覆盖和 slot 配置:

standards:
  preset: official/base
  overrides:
    quality:
      tests: required
slots:
  enabled:
    - security-review

项目自定义 slot 文件路径:.repo-ai-governor/slots/*.yaml

如果你的团队已经有 code_standards.md,可以在文档里加入 ## Verification Commands 段落,把它变成可执行门禁:

npm run check:code-standards

当前仓库里 npm run check 已经接到了这个 standards 门禁。

参考文档

  1. Quick Start
  2. Getting Started Example
  3. Codex Adapter Example
  4. GitHub Copilot Adapter Example
  5. Claude Code Adapter Example
  6. Official Example Slots
  7. CHANGELOG