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

@shahmilsaari/memory-core

v1.0.53

Published

Universal AI memory core — generate AI context files from architecture profiles with RAG support

Readme

memory-core

Universal AI memory for developers. Store architecture rules once — every AI coding agent reads them before writing code.

npm version npm downloads Node.js License: MIT


The problem

AI tools like Copilot, Cursor, and Claude Code start fresh every session. They don't know your architecture decisions, your layer boundaries, or your team conventions. They write code that violates patterns you spent months establishing.

memory-core fixes that. Store your rules once, enforce them everywhere.


What it does

  1. Remember — store architecture decisions and rules in PostgreSQL with plain-English reasons
  2. Distribute — generate instruction files for 14 AI agents automatically from your stored rules
  3. Enforce — multi-tier pipeline: deterministic layer graph (instant, confidence 1.0) → AI semantic review → optional model critique second opinion → confidence gate arbitrates. Auto-fixes violations on save by default.
npx @shahmilsaari/memory-core init

Key features

  • 281 pre-built rules — seed best-practice rules for your stack in one command, with plain-English reasons
  • 14 AI agents supported — generates instruction files for Copilot, Cursor, Claude Code, Windsurf, and more automatically
  • Evidence-based enforcement — deterministic AST + dependency graph catches layer violations instantly; AI semantic review with confidence gating catches the rest; optional AI auto-fix on save
  • Runs fully local — embeddings stay on your machine via Ollama; use any cloud provider (DeepSeek, OpenAI, Anthropic) only for code analysis
  • Live dashboard — real-time violations feed, interactive architecture graph, memory model-check with batch resolve, and model switcher at localhost:5178
  • Team-ready — export rules to memories.json, commit it, and teammates import with one command — no shared database needed
  • Token-optimized — compressed prompts, prompt caching, and confidence-gated model critique save ~58% tokens per check without sacrificing accuracy
  • CI/CD built-in — generates a GitHub Actions workflow; CI reads memories.json directly, no Ollama required
  • Commit message linting — enforce conventional commits or any regex pattern via the commit-msg hook
  • Violation analytics — track which rules fire most and auto-tune noisy ones with memory-core tune
  • Pre-commit hook — advisory or strict mode; bypass anytime with MEMORY_CORE_SKIP_HOOK=1

Get started

Requires: Node.js ≥ 18, PostgreSQL 14+, Ollama with nomic-embed-text

# 1. Initialize in your project
npx @shahmilsaari/memory-core init

# 2. Load best-practice rules for your stack
memory-core seed --arch clean-architecture

# 3. Store your own decisions
memory-core remember "No direct DB calls from controllers"

# 4. Enforce on every commit
memory-core hook install

That's it. Every AI agent in your project now reads your rules before writing code.


Supported agents

Claude Code · GitHub Copilot · Cursor · Windsurf · Cline · Roo Code · Aider · Continue.dev · Devin · Amazon Q · Gemini Code Assist · Zed AI · JetBrains AI · OpenHands


Architecture profiles

281 pre-built rules ready to load:

clean-architecture · nestjs · react · svelte · vue · hexagonal · modular-monolith · mvc · laravel-service-repository · nuxt · angular · go-api · react-native


Commands

memory-core remember "..."          # store a rule or decision
memory-core sync                    # push rules to all AI agent files
memory-core check --diff HEAD~1     # enforce architecture on a diff (deterministic by default)
memory-core check --diff HEAD~1 --ai # same, but with AI analysis
memory-core watch                   # real-time violation detection on save
memory-core watch --auto-fix        # also auto-rewrite violating files via AI
memory-core dashboard               # live command center at localhost:5178
memory-core export                  # share rules with your team via memories.json
memory-core stats                   # see which rules fire most

Full command reference


Environment

Local Ollama (default):

DATABASE_URL=postgresql://localhost:5432/memory_core

EMBEDDING_URL=http://localhost:11434
EMBEDDING_MODEL=nomic-embed-text
EMBEDDING_TIMEOUT_MS=30000

CHAT_PROVIDER=ollama
CHAT_MODEL=qwen2.5-coder:7b
CHAT_URL=http://localhost:11434
CHAT_TIMEOUT_MS=120000

Remote Ollama (different host for embedding and chat):

DATABASE_URL=postgresql://localhost:5432/memory_core

EMBEDDING_URL=http://192.168.1.10:11434
EMBEDDING_MODEL=nomic-embed-text
EMBEDDING_TIMEOUT_MS=30000

CHAT_PROVIDER=ollama
CHAT_MODEL=qwen2.5-coder:7b
CHAT_URL=http://192.168.1.10:11434
CHAT_TIMEOUT_MS=120000

Cloud provider for chat, local Ollama for embedding:

DATABASE_URL=postgresql://localhost:5432/memory_core

EMBEDDING_URL=http://localhost:11434
EMBEDDING_MODEL=nomic-embed-text

CHAT_PROVIDER=openai
CHAT_MODEL=gpt-4o-mini
CHAT_API_KEY=sk-...

EMBEDDING_URL and CHAT_URL are independent — point them to different hosts if needed. EMBEDDING_TIMEOUT_MS defaults to 5 s; increase to 30 s+ for remote Ollama.


Links


License

MIT