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

design-ontology

v0.1.7

Published

An open specification and toolchain for teaching AI agents why behind design decisions, not just what.

Readme

design-ontology

An open specification and toolchain for teaching AI agents why behind design decisions, not just what.

Design tokens tell machines what values to use. Design systems tell them what to build. Design ontology tells them why — encoding reasoning from user intent through psychology, culture, and audience to concrete visual properties.

Setup

Step 1: Add the MCP server to your IDE

Claude Code — add .mcp.json to your project root:

{
  "mcpServers": {
    "design-ontology": {
      "command": "npx",
      "args": ["-y", "-p", "design-ontology", "design-ontology-mcp"]
    }
  }
}

Cursor.cursor/mcp.json:

{
  "mcpServers": {
    "design-ontology": {
      "command": "npx",
      "args": ["-y", "-p", "design-ontology", "design-ontology-mcp"]
    }
  }
}

Windsurf — MCP configuration:

{
  "mcpServers": {
    "design-ontology": {
      "command": "npx",
      "args": ["-y", "-p", "design-ontology", "design-ontology-mcp"]
    }
  }
}

VS Code.vscode/mcp.json:

{
  "servers": {
    "design-ontology": {
      "command": "npx",
      "args": ["-y", "-p", "design-ontology", "design-ontology-mcp"]
    }
  }
}

Step 2: Generate your ontology

Ask your AI agent:

Read my product spec (spec.md) and use the generate_ontology tool to create a design ontology for this product.

The agent generates the ontology itself — no API keys or external accounts needed. It validates and saves a design-ontology.json in your project.

Step 3: Build with it

The MCP server automatically loads design-ontology.json from your project root. When you ask your AI agent to build UI components, it can query the ontology for design reasoning, visual properties, and anti-patterns.

If your ontology file is at a different path, set the ONTOLOGY_PATH environment variable in your MCP config:

{
  "mcpServers": {
    "design-ontology": {
      "command": "npx",
      "args": ["-y", "-p", "design-ontology", "design-ontology-mcp"],
      "env": {
        "ONTOLOGY_PATH": "./path/to/your/design-ontology.json"
      }
    }
  }
}

Try: "Using the design ontology, build a risk assessment card component."


How it works

The ontology is a JSON knowledge graph. Nodes represent design concepts across seven domains. Reasoning chains connect them into traversable paths from user intent to visual output.

| Domain | Prefix | What it encodes | |---|---|---| | intents | INT- | What users are trying to accomplish | | psychology | PSY- | Cognitive principles (load, attention, trust) | | culture | CUL- | Cultural context (color meaning, formality, reading patterns) | | emotions | EMO- | Emotional states the design should evoke or manage | | audience | AUD- | Target audience segments and their characteristics | | visual_properties | VIS- | Concrete specs: colors, typography, spacing, layout | | accessibility | A11Y- | Accessibility requirements constraining visual decisions |

Reasoning chains connect nodes across domains: INT-001 -> PSY-003 -> CUL-002 -> VIS-007 encodes why a visual property exists for a given intent.

Anti-patterns encode what NOT to do, with reasoning for why.

MCP tools

| Tool | Description | |---|---| | generate_ontology | Generate an ontology from a product spec (the agent does the generation) | | save_ontology | Validate and save generated ontology JSON to disk | | get_node | Retrieve a node by ID with its description, reasoning, and connections | | get_chain | Retrieve a reasoning chain with every node expanded | | traverse | Walk the graph from starting nodes to a target domain | | check_anti_patterns | Check a proposed design approach against prohibited patterns | | resolve_for_component | Describe what you're building, get all relevant reasoning and properties | | search | Free-text search across nodes, optionally filtered by domain |

CLI

The CLI is available for scripting and CI workflows. The init and update commands require an LLM API key (Anthropic or OpenAI).

npx design-ontology init [spec-file]        # Generate ontology via LLM API
npx design-ontology validate [ontology-file] # Validate against schema
npx design-ontology update [ontology-file]   # Evolve ontology via LLM API

Writing good product specs

The ontology is only as good as the spec. Include: target audience (who, expertise, constraints), core user flows, brand/tone, cultural context, accessibility needs, and what the product is NOT. See docs/writing-specs.md.

Examples

See examples/ecovoorscan/ — a complete ontology for a Dutch sustainability assessment platform (31 nodes, 8 chains, 6 anti-patterns).

Philosophy

See docs/philosophy.md for why this exists.

License

MIT