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

@ebowwa/logic-spec

v1.0.1

Published

Language-agnostic standard for extracting pure logic from implementations into logic.yaml

Readme

Logic Specification Framework

A language-agnostic standard for extracting pure logic from implementations into logic.yaml.

Quick Start

# logic.yaml
meta:
  spec_version: "1.0"
  name: my-module
  version: "1.0.0"

inputs:
  - name: data
    type: string

outputs:
  - name: result
    type: string

logic:
  - id: process
    type: transform
    input: data
    output: result
    algorithm: |
      1. Transform input
      2. Return output

Why

| Problem | Solution | |----------|----------| | AI agents drown in implementation details | Clean spec they can parse | | Logic locked to one language | Portable across any runtime | | Tests scattered in codebase | Assertions in the spec | | State machines implicit | Explicit state definitions | | Errors handled inconsistently | Declared failure modes |

Documentation

| File | Purpose | |------|---------| | skill.md | Skill definition and workflow | | SPEC.md | Full specification | | REFERENCE.md | Quick reference card | | schema.json | JSON Schema for validation | | examples/ | Example logic.yaml files |

Examples

| Example | Demonstrates | |---------|--------------| | minimal.yaml | Basic transform | | state-machine.yaml | State machine | | smart-glass-supervisor.yaml | Full complex system |

Core Principles

┌────────────────────────┬─────────────────────────────────────────┐
│      Principle         │                   Why                   │
├────────────────────────┼─────────────────────────────────────────┤
│ I/O at edges           │ Logic blocks are pure                  │
│ Algorithm as text      │ Human-readable, language-agnostic      │
│ Types explicit         │ Schema validation                      │
│ State first-class      │ State machines are explicit            │
│ Constraints separate   │ Performance not buried in code         │
│ Failures declared      │ Errors part of the contract            │
│ Composable blocks      │ Logic chains, not monoliths            │
│ Versioned              │ Spec can evolve without breaking       │
│ Observable             │ Metrics/logging hooks built-in         │
│ Testable               │ Assertions in spec                     │
└────────────────────────┴─────────────────────────────────────────┘

Sections

| Section | Required | Purpose | |---------|----------|---------| | meta | ✅ | Identity, version | | inputs | ✅ | Entry points | | outputs | ✅ | Exit points | | types | ❌ | Custom type definitions | | logic | ✅ | Pure function blocks | | state | ❌ | State machine | | flows | ❌ | Logic composition | | failures | ❌ | Error handling | | constraints | ❌ | Performance bounds | | dependencies | ❌ | External services | | observability | ❌ | Metrics/logging | | tests | ❌ | Built-in assertions |

Validate

# Using ajv-cli
bunx ajv-cli validate -s schema.json -d logic.yaml

# Or using yajsv
bunx yajsv -s schema.json logic.yaml

Use with AI

Extract from code:

"Extract logic.yaml from this authentication module"

Generate from spec:

"Generate TypeScript from this logic.yaml"

Validate spec:

"Validate this logic.yaml against the spec"

License

MIT