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

@specifica/store

v0.1.0

Published

Storage adapter interface for Specifica - implementation-agnostic types and contracts

Readme

@specifica/store

Storage adapter interface for Specifica - implementation-agnostic types and contracts.

Installation

npm install @specifica/store

Overview

This package defines the StorageAdapter interface that any Specifica-compatible storage backend must implement. It includes all TypeScript types and method signatures, with no infrastructure dependencies.

This is an interface package - it contains types only, not implementations.

Possible Implementations

  • Cloudflare Durable Objects + SQLite (Cognium's proprietary implementation)
  • Local filesystem (CLI tools)
  • PostgreSQL (self-hosted)
  • In-memory (testing)
  • better-sqlite3 (Electron/desktop apps)

Usage

import type { StorageAdapter, StoredItem, MemoryItem } from '@specifica/store'

// Implement the interface
class MyStorageAdapter implements StorageAdapter {
  async createItem(title: string, type = 'task') {
    // Your implementation here
  }

  async getItem(id: string) {
    // Your implementation here
  }

  // ... implement all methods
}

Interface

The StorageAdapter interface provides:

Items

  • createItem(title, type?) - Create new item
  • updateItem(id, updates) - Update existing item
  • getItem(id) - Get single item
  • listItems(filter?) - List items with filtering
  • archiveItem(id) - Archive item (soft delete)

Content

  • getContent(itemId) - Get spec/design/tasks files
  • updateContent(itemId, file, content) - Update specific file

Tasks

  • getTasks(itemId) - Get parsed tasks from tasks.md
  • updateTaskStatus(itemId, taskOrder, done) - Toggle task checkbox

Memory

  • addMemory(category, key, value, sourceItemId?) - Add memory
  • getMemory() - Get all memory items
  • deleteMemory(id) - Delete memory
  • getMemoryAsMarkdown() - Serialize to principles.md format

Chat

  • addMessage(itemId, role, content) - Add chat message
  • getMessages(itemId, limit?) - Get chat history

Settings

  • getSettings() - Get user settings
  • updateSettings(updates) - Update settings

Board State

  • getBoardState() - Get board state with columns

Git Sync

  • configureGit(config) - Configure Git settings
  • syncToGit(itemId) - Sync single item
  • syncAllToGit() - Sync all items

Types

interface StoredItem {
  id: string
  title: string
  slug: string
  type: 'task' | 'routine' | 'feature'
  status: 'new' | 'decomposing' | 'in_progress' |
          'waiting_approval' | 'done' | 'archived'
  parentId?: string
  createdAt: number
  updatedAt: number
}

interface MemoryItem {
  id: string
  category: 'people' | 'preferences' | 'location' | 'work' | 'general'
  key: string
  value: string
  sourceItemId?: string
  createdAt: number
}

interface Message {
  id: string
  itemId: string
  role: 'user' | 'assistant'
  content: string
  createdAt: number
}

interface GitConfig {
  token: string
  repo: string
  rootDir: string
  branch?: string
}

See the full type definitions for all exported types.

Design Principles

  1. No infrastructure leakage - No Cloudflare, SQLite, or HTTP transport types
  2. All methods async - Works with any backend (network, filesystem, database)
  3. Generic items - Single interface for features, tasks, and routines
  4. Chat is ephemeral - Stored but never synced to Git
  5. Memory has provenance - Track which item a memory came from

Related Packages

License

MIT