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

ruledev-kit

v0.1.1

Published

Rules as Code toolkit for AI-driven development

Readme

RuleDev Kit

RuleDev Kit is a Rules as Code toolkit for AI-driven development.

It helps you define project-specific development rules, generate AI-readable instruction files, and check whether your source code follows those rules.

Concept

AI coding agents can read project instructions such as AGENTS.md, but instructions alone do not guarantee rule compliance.

RuleDev Kit provides a simple workflow:

  1. Define development rules as structured YAML files
  2. Generate AI-readable instruction files
  3. Check source files against rule definitions

The goal is to make AI-driven development more reliable, repeatable, and rule-based.

Features

  • Define project rules in .rules/rules/*.yml
  • Generate AGENTS.md for AI coding agents
  • Generate AI instruction files to a custom output path
  • Check source files against simple rule definitions
  • Support repeatable AI-driven development workflows
  • Prepare a foundation for future CI and review automation

Installation

Install globally from npm:

npm install -g ruledev-kit

After installation, the ruledev command becomes available:

ruledev --help

You can also run it without global installation:

npx ruledev-kit --help

Usage

Initialize rule files

Create the initial .rules directory and sample rules:

ruledev init

This generates:

.rules/
├── project.yml
└── rules
    ├── ai-workflow.yml
    └── nextjs.yml

Generate AGENTS.md

Compile YAML rule definitions into an AI-readable AGENTS.md file:

ruledev compile

Generate AGENTS.md to a custom path

By default, ruledev compile generates AGENTS.md in the current directory.

To avoid overwriting an existing development guide, use --out:

ruledev compile --out examples/basic/AGENTS.md

Check rule violations

Check source files against rule definitions:

ruledev check

Example output:

No rule violations found.

When a violation is found:

Found 1 rule violation(s).

✗ nextjs.no-client-fetch
  Client Componentで直接fetchしない
  severity: error
  file: src/sample/BadComponent.tsx
  Matched patterns: useEffect, fetch(

Example Rule

id: nextjs.no-client-fetch
title: Client Componentで直接fetchしない
category: frontend
severity: error
instruction: |
  データ取得は Server Component、page.tsx、actions.ts に集約してください。
  Client Component 内で直接 fetch を呼ばないでください。
check:
  type: text
  include:
    - "app/**/*.tsx"
    - "src/**/*.tsx"
  pattern:
    - "useEffect"
    - "fetch("

Generated AGENTS.md

RuleDev Kit compiles rule definitions into an AGENTS.md file.

Example:

# AGENTS.md

This file is generated by RuleDev Kit.
Follow these rules when modifying this repository.

## ai-workflow

### AI開発の基本手順

- Rule ID: `ai.workflow.basic`
- Severity: `warning`

実装前に既存構造を確認してください。
推測で新しい設計を作らず、既存の命名規則・ディレクトリ構造に合わせてください。
実装後は lint、typecheck、test の実行結果を確認してください。

Commands

ruledev init
ruledev compile
ruledev compile --out examples/basic/AGENTS.md
ruledev check

Development

Clone the repository and install dependencies:

git clone https://github.com/yusukesugahara/ruledev-kit.git
cd ruledev-kit
npm install

Run checks:

npm run check
npm run build
npm test

Use the local CLI during development:

npm run build
npm link
ruledev --help

Project Structure

src/
├── cli.ts
├── commands/
│   ├── init.ts
│   ├── compile.ts
│   └── check.ts
└── core/
    ├── load-rules.ts
    └── render-agents.ts

Development AGENTS.md

The root AGENTS.md is used as a development guide for AI agents working on this repository.

Do not overwrite it with generated output.

When testing generated instructions, use:

ruledev compile --out examples/basic/AGENTS.md

Roadmap

  • Add rule presets for Next.js, NestJS, OpenAPI, and monorepos
  • Generate instruction files for Claude, Copilot, Cursor, and Gemini
  • Add ESLint-based rule checks
  • Add CI integration
  • Add rule severity handling
  • Add JSON output for review automation
  • Add rule documentation generation

License

MIT