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

domain-knowledge-kit

v0.2.7

Published

Domain Knowledge Pack — YAML + ADR links + deterministic search + generated docs

Readme

Domain Knowledge Kit

Define, validate, search, and document your domain model — all from YAML.

What Is This?

Domain Knowledge Kit (DKK) is a CLI tool for teams practicing Domain-Driven Design. Instead of scattering domain knowledge across wikis, diagrams, and tribal memory, you define your bounded contexts, events, commands, policies, aggregates, read models, and glossary in structured YAML files. DKK then:

  • Validates schema conformance and referential integrity across your entire model
  • Generates browsable Markdown documentation from your YAML definitions
  • Builds a full-text search index (SQLite FTS5) for instant domain queries
  • Links Architecture Decision Records (ADRs) bidirectionally to domain items
  • Integrates with AI coding agents so they understand your domain, not just your code

Quick Start

# Install
npm install -g domain-knowledge-kit

# Create a bounded context
cat > domain/contexts/ordering.yml << 'EOF'
name: ordering
description: Handles customer order lifecycle.
events:
  - name: OrderPlaced
    description: Raised when a customer order is confirmed.
    raised_by: Order
commands:
  - name: PlaceOrder
    description: Submit a new customer order.
    handled_by: Order
aggregates:
  - name: Order
    description: Manages order state and invariants.
    handles: [PlaceOrder]
    emits: [OrderPlaced]
policies: []
read_models: []
glossary: []
EOF

# Register it
# Add "- name: ordering" to the contexts array in domain/index.yml

# Validate and render
dkk validate
dkk render

# Explore
dkk search "order"
dkk show ordering.OrderPlaced
dkk related ordering.Order

Full Getting Started Guide — step-by-step walkthrough with examples.

Documentation

| Guide | What You'll Learn | |-------|-------------------| | Getting Started | Install, create your first context, run quality gates, search and explore | | Domain Modeling | All item types, YAML structure, cross-references, naming conventions, ID formats | | CLI Reference | Every command and flag: list, show, search, related, validate, render, init, prime, adr show, adr related | | ADR Guide | Architecture Decision Records: format, bidirectional linking, querying, best practices | | AI Agent Integration | dkk init, dkk prime, Copilot integration, reusable prompts, portable skills |

Key Commands

dkk validate              # Schema + cross-reference validation
dkk render                # Validate → render docs → rebuild search index
dkk search "payment"      # Full-text search with ranking
dkk show ordering.Order   # Display full item definition
dkk related ordering.Order  # Graph traversal of connected items
dkk list --type event     # List all events across contexts
dkk init                  # Set up AI agent onboarding
dkk prime                 # Output agent context to stdout

Full CLI Reference

AI Agent Integration

DKK has first-class support for AI coding agents. Two commands get you set up:

dkk init    # Add a DKK section to AGENTS.md (idempotent)
dkk prime   # Output full domain context for AI consumption

Agents can then search, show, and traverse your domain model — making domain-aware decisions when writing, reviewing, or refactoring code. DKK also ships with GitHub Copilot instructions, reusable agent prompts, and a portable agent skill.

AI Agent Integration Guide

Directory Layout

domain/                         # Domain model (YAML)
  index.yml                     #   Contexts + flows
  actors.yml                    #   Global actors
  contexts/<name>.yml           #   Bounded context definitions
.dkk/                           # Generated + managed
  adr/                          #   Architecture Decision Records
  docs/                         #   Generated docs (do not edit)
src/                            # Source code (vertical slices)
tools/dkk/                      # Schemas + templates
  schema/                       #   JSON Schemas for validation
  templates/                    #   Handlebars templates for rendering

Contributing / Local Development

npm install

# Run directly via tsx (no build step needed)
npm run dev -- validate
npm run dev -- render

# Or build first
npm run build
npx dkk validate

The source code uses vertical feature slices — each feature (query, adr, pipeline, agent) owns its commands, logic, and tests. Cross-cutting infrastructure lives in shared/.

License

Elastic-2.0