Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@shahmilsaari/memory-core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
memory-core
Universal AI memory for developers. Store architecture rules once — every AI coding agent reads them before writing code.
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
- Remember — store architecture decisions and rules in PostgreSQL with plain-English reasons
- Distribute — generate instruction files for 14 AI agents automatically from your stored rules
- 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 initKey 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.jsondirectly, no Ollama required - Commit message linting — enforce conventional commits or any regex pattern via the
commit-msghook - 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 installThat'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
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 mostEnvironment
DATABASE_URL=postgresql://localhost:5432/memory_core
EMBEDDING_URL=http://localhost:11434
EMBEDDING_MODEL=nomic-embed-text
# Pick your AI provider for code analysis
CHAT_PROVIDER=openai-compatible
CHAT_BASE_URL=https://api.deepseek.com
CHAT_MODEL=deepseek-chat
CHAT_API_KEY=sk-...Links
License
MIT