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

@miadi/rispecs-builder

v0.1.0

Published

Compile a repository's RISE specifications into deterministic Markdown context for humans and agents.

Downloads

111

Readme

@miadi/rispecs-builder

Compile a repository's RISE specification corpus into deterministic Markdown that a person or agent can carry into implementation work.

The package has one compiler and three entry points:

  • library: buildRispecs() and inspectRispecs();
  • CLI: miadi-rispecs-builder;
  • MCP stdio server: miadi-rispecs-builder-mcp or the CLI's mcp command.

Default contract

Run the CLI from a repository root:

miadi-rispecs-builder

It reads regular *.md files recursively from ./rispecs, in stable source-path order, and writes:

.miadi/rispecs/
├── manifest.json
├── full/
│   └── all.md
└── per-subfolder/
    ├── _root.md        # only when rispecs/*.md exists
    ├── a2a.md
    ├── miadi-code.md
    └── ...             # one file per immediate rispecs/ subfolder

Each source begins with a visible ## Source: <relative path> boundary. This keeps provenance intact when the compilation becomes an agent's context. Symlinks and non-Markdown files are not followed or copied.

No timestamp is written. With unchanged source bytes and paths, a rebuild produces unchanged Markdown.

CLI

Install globally:

npm install --global @miadi/rispecs-builder
miadi-rispecs-builder build

Or run without a global installation:

npx -y -p @miadi/rispecs-builder miadi-rispecs-builder build

Commands and modes:

# Build both projections (the default command and default mode)
miadi-rispecs-builder
miadi-rispecs-builder build --mode all

# Build one projection
miadi-rispecs-builder build --mode full
miadi-rispecs-builder build --mode per-subfolder

# Discover the compilation plan without writing
miadi-rispecs-builder inspect

# Use another working directory or source/output root
miadi-rispecs-builder build --cwd /work/project
miadi-rispecs-builder build --source ./specifications --output ./.agent/rispecs

# Machine-readable result
miadi-rispecs-builder inspect --json

Relative --source and --output values resolve from --cwd. Source and output trees cannot overlap. Existing unrelated files are not deleted.

MCP

Example client configuration using the published package:

{
  "mcpServers": {
    "miadi-rispecs-builder": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@miadi/rispecs-builder",
        "miadi-rispecs-builder-mcp"
      ],
      "cwd": "/path/to/repository"
    }
  }
}

The MCP server exposes:

| Kind | Name | Purpose | |---|---|---| | tool | rispecs_inspect | Resolve paths and list source/group counts without writing | | tool | rispecs_build | Build full, per-subfolder, or all projections | | resource | rispecs://manifest | Read the latest manifest or pre-build inspection | | resource | rispecs://compiled/full | Read full/all.md | | resource template | rispecs://compiled/per-subfolder/{name} | Enumerate/read per-subfolder compilations | | prompt | implementation_from_rispecs | Guide RISE-to-code parity work with source traceability |

miadi-rispecs-builder mcp --cwd /path/to/repository starts the same server. The resources are rooted at the server's configured working directory. Tool path overrides are useful for one-off builds; restart the server with that working directory when those outputs should become its resource surface.

Library

import { buildRispecs, inspectRispecs } from "@miadi/rispecs-builder";

const plan = await inspectRispecs({ cwd: process.cwd() });
const result = await buildRispecs({
  cwd: process.cwd(),
  mode: "all",
});

Both functions return absolute resolved paths and deterministic source/group metadata. buildRispecs() also returns every output and writes manifest.json.

RISE parity workflow

  1. Inspect the corpus and choose the smallest adequate projection.
  2. Build it and read the manifest plus compiled Markdown.
  3. Name the Desired Outcome and Current Reality before editing code.
  4. Trace each implementation decision to the preserved source path.
  5. Verify behavior with the codebase's own tests and state remaining parity.

The builder assembles prose-code; it does not invent, summarize, rank, or rewrite specifications. That boundary keeps the source corpus authoritative.

Development

From the Miadi workspace:

pnpm install
pnpm --filter @miadi/rispecs-builder build
pnpm --filter @miadi/rispecs-builder type-check
pnpm --filter @miadi/rispecs-builder test

Issue and RISE contracts: jgwill/Miadi#627 and SPEC-LINKS.md.

🌸 One corpus can now become a whole horizon or a set of smaller paths, while every sentence remembers the source relation it came from.