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

@sigloch/graphify

v0.4.0

Published

Extraction/Slicer — chaos documents → governed SE-graph candidate slices (slicer → auto-typing → suggestion-gate)

Readme

graphify

Extraction / Slicer for the sigloch SE-family — turns chaos documents (PDF, Excel, JIRA, plain text) into governed SE-graph candidate slices. The entrance to the family: "chaos in, structure on day one."

What it is / is not

  • IS: a slicer pipeline — Slicer (document → untyped candidate graph) → Auto-Typing (candidates → SE ElementType + attributes) → Suggestion-Gate (human review → ApprovalMatrix). Stateless, local, GDPR-safe. Validates against the family ontology; emits only governed candidates.
  • IS NOT: a generator (→ aimprove) · a governed editor / apply-gate (→ graphcode) · a persistent store owner (the harness owns Kuzu) · a learning engine (→ learning-core) · a viewer (→ graph-view-edit).

The pipeline

document ─▶ Slicer ─▶ SlicerOutput ─▶ Auto-Typing ─▶ TypedCandidatesOutput ─▶ Suggestion-Gate ─▶ ApprovalMatrix ─▶ (consumer's apply-gate)
 (chaos)   (probabilistic, LLM)      (untyped cand.)  (LLM type-inference)    (typed candidates)    (human review)     (approved fragment)

ApprovalMatrix.finalGraph flows to a consumer's apply-gate (graphcode / aimprove harness mutate()). Determinism boundary: the Slicer is left of the line (probabilistic, recall-first); the apply-gate is right of it (deterministic, precision). graphify does not enforce V3_RULES — it emits, the gate enforces.

Code-repo input (deterministic, no LLM)

A second UC-1 realization alongside the document pipeline above — the A1 alternate path (SwappableMatcher.RQ.021): a TypeScript repo is already machine-structured, so it skips Slicer/ Auto-Typing entirely and goes straight to typed candidates via Tree-sitter AST parsing.

{path, content}[] ─▶ extractCodeRepo() ─▶ TypedCandidatesOutput ─▶ Suggestion-Gate ─▶ ApprovalMatrix
     (TS files)      (Tree-sitter, deterministic)   (confidence 1.0, auto-approve)
  • FUNC per free-function declaration, MOD per file and per directory — the directory tree is the MOD-in-MOD hierarchy (MOD -compose-> MOD, file MOD = leaf, FUNC -allocate-> MOD on the file).
  • Every internal call (funcA() calling funcB(), resolved through the import table) becomes FUNC_A -io-> FLOW -io-> FUNC_B, with the callee's parameter/return signature as a SCHEMA (FLOW -relation-> SCHEMA — the only valid trace for a FLOW's data shape). Calls into libraries/stdlib/anything outside the given file set are not modeled at all (dropped, not flagged) — deliberate scope, not a gap.
  • TEST candidates from *.test.ts/*.spec.ts + describe/it/test blocks — emitted as isolated nodes (no edge): the ontology's only valid TEST trace is TEST -verify-> REQ, and this path extracts no REQ from code. A reviewer links them to a REQ later.
  • Scope (v1): free-function declarations and plain-identifier call callees only — no classes/methods, no arrow functions, no obj.method() calls. TypeScript/TSX only; Tree-sitter's ~25 grammars make a second language a new parser file, not a rewrite (see src/structure/code/parse-typescript.ts header).
import { extractCodeRepo, extractCodeRepoPipeline } from '@sigloch/graphify';

// Just the typed candidates:
const typed = extractCodeRepo([{ path: 'src/a.ts', content: '...' }, ...]);

// The full F2 chain (Suggestion-Gate → Import → Markdown/viewer bundle), same as the document path:
const { approval, imported, bundle } = await extractCodeRepoPipeline(files, {
  gate: new McpConsumerGate(transport), // see below — wire straight into a live graphcode store
});

Wiring into a graphcode harness: McpConsumerGate (src/import/consumer-gate.ts) already speaks the graphcode mutate-command shape — it just needs a transport: (commands) => Promise<{success, violations}> that calls the live graph_mutate MCP tool (or, in-process, bindToolsToHarness(harness).graph_mutate.handler). There is no packaged CLI/skill for this yet (src/ports/cli.ts only drives the document path) — until one exists, a consumer (a graphcode skill, a script) imports extractCodeRepoPipeline directly and supplies the transport. docs/cr/done/CR-GF-133/134/135-*.md have the full design + the self-parse E2E (tests/self-parse-e2e.test.ts — graphify parses its own src/, cross-checked against §3.3's module map).

Locked constraints (verriegelt — bok/docs/governance/graphify-governance.md §3)

  • L1 — ElementType set: Auto-Typing emits only the 13 SE types from @sigloch/contracts/se (SYS/UC/ACTOR/FCHAIN/FUNC/FLOW/REQ/TEST/MOD/SCHEMA/SESSION/CR/MS). Import the ontology, never fork.
  • L2 — Rules after the gate: graphify does not pre-check V3_RULES; the consumer's apply-gate does.
  • L3 — Format-E parity: graphify output round-trips through the shared Format-E codec (@sigloch/graph-api-core) using a graphify-owned, SE-typed fixture (round-trip = identity).
  • L4 — Version pin: pins ONTOLOGY_VERSION from @sigloch/contracts/se (3.6.0).

Status

MVP carve-out from aimpro/src/learning-engine/ (extraction pipeline). See docs/cr/open/ for the CR plan (CR-GF-100 foundation+schemas → 101 Slicer → 102 Auto-Typing → 103 Suggestion-Gate → 104 Import). Spec: docs/SPEC.md. Family SSOT: bok/docs/governance/graphify-governance.md.