Unified, embeddable memory layer for AI coding agents built on Spec-Driven Development metadata
Project description
SpecMem
๐ง Unified Agent Experience and Pragmatic Memory for Every Coding Agent
The first-ever Agent Experience (AgentEx) platform built for AI coding agents
๐ Documentation โข ๐ Getting Started โข โญ GitHub
๐ฏ The Problem
Modern coding agents (Kiro, SpecKit, Tessl, Claude Code, Cursor, etc.) can generate files, follow tasks, and implement features, but the industry faces critical challenges:
๐ Markdown Madness & Verbosity
Today's coding agents generate mountains of markdown files. Developers are drowning in CLAUDE.md, AGENTS.md, .cursorrules, requirements.md, design.md... What happens to all these specs after features are built? Nobody has figured out how to turn this chaos into better Agent Experience.
๐ Vendor Lock-In & Format Fragmentation
Every coding agent uses its own proprietary format. Claude uses CLAUDE.md, Cursor uses .cursorrules, Kiro uses .kiro/specs/. This creates massive IDE lock-in. Switching agents means rewriting all your specs. Your project knowledge is trapped in one tool.
๐ง Agents Have Amnesia
Modern coding agents suffer from catastrophic forgetting. Sessions reset, context is lost, previous decisions vanish. Agents write code without knowing your specs, acceptance criteria, or earlier decisions.
โก Wasted Compute & Slow CI
Without understanding what changed, agents trigger full test runs for every tiny change, wasting compute and slowing CI pipelines.
๐ No Agent Experience (AgentEx) Layer
We have DevEx (Developer Experience) for humans. But where is AgentEx for AI coding agents? There's no unified memory layer, no context optimization, no impact analysis.
These issues cause: regressions, misaligned implementations, slow CI pipelines, unpredictable agent behavior, and increased costs.
The industry lacks a Cognitive Memory + Agent Experience platform to fix this
๐ก The Solution: SpecMem
SpecMem is the first-ever Agent Experience (AgentEx) platform: a unified, embeddable memory layer for AI coding agents.
How SpecMem Solves Each Problem
| Problem | SpecMem Solution |
|---|---|
| Markdown Madness | Concise spec templates, auto TL;DRs, living documentation |
| Vendor Lock-In | Agent-agnostic adapters: read ANY format, output to ANY agent |
| Agent Amnesia | Persistent cognitive memory with semantic search |
| Wasted Compute | SpecImpact selects only impacted specs/tests to execute |
| No AgentEx | Complete Agent Experience layer with context optimization |
# Using pip
pip install specmem
# Using uv (recommended - faster)
uv pip install specmem
# Or run directly with uvx
uvx specmem --help
from specmem import SpecMemClient
sm = SpecMemClient()
bundle = sm.get_context_for_change(["auth/service.py"])
print(bundle.tldr)
โจ Key Features
Core Features
| Feature | Description |
|---|---|
| ๐ Multi-Framework Adapters | Parse specs from Kiro, SpecKit, Tessl, Claude Code, Cursor, Codex, Factory, Warp, Gemini CLI |
| ๐ง Intelligent Memory | Vector-based semantic search with LanceDB, ChromaDB, Qdrant, or AgentVectorDB |
| ๐ SpecImpact Graph | Bidirectional relationships between specs, code, and tests |
| โฑ๏ธ SpecDiff Timeline | Track spec evolution, detect drift, find contradictions |
| โ SpecValidator | Quality assurance with 6 validation rules (structure, timeline, duplicates, constraints, acceptance criteria, contradictions) |
| ๐ Spec Coverage | Analyze gaps between acceptance criteria and tests with suggestions |
| ๐ฏ Test Mapping Engine | Map tests to specs across pytest, jest, vitest, and more |
| ๐ Health Score | Project health grades (A-F) with improvement suggestions |
| ๐ Web UI | Interactive dashboard with live sync, filtering, and WebSocket updates |
Advanced Features
| Feature | Description |
|---|---|
| โ๏ธ Cloud Embeddings | Support for OpenAI, Google, Together AI embedding providers |
| ๐ Coding Guidelines | Aggregate and view guidelines from Kiro steering, CLAUDE.md, .cursorrules |
| ๐ Spec Lifecycle | Prune stale specs, generate specs from code, compress verbose specs |
| ๐ Kiro Session Search | Index and search Kiro chat sessions for context |
| โ๏ธ Kiro Config Indexer | Index hooks, steering files, and MCP configurations |
| ๐ค Static Dashboard | Export specs to a static HTML dashboard for GitHub Pages |
| ๐ค GitHub Action | CI integration with coverage thresholds and PR comments |
| ๐ MCP Server | Model Context Protocol server for AI agent integration |
| โก Kiro Powers | Native Kiro IDE integration as a Power |
| ๐ Streaming Context API | Token-aware context optimization with streaming support |
๐ The Killer Feature
Swap agents without losing context. SpecMem creates a unified, normalized, agent-agnostic context layer.
Switch from Kiro โ SpecKit โ Tessl โ Claude Code โ Cursor without rewriting spec files or losing project knowledge.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your Project โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ .kiro/specs/ .speckit/ .tessl/ Claude.md cursor.json โ
โ โ โ โ โ โ โ
โ โโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโผโโโโโโโ โ
โ โ SpecMem โ โ
โ โ Adapters โ โ
โ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โ โโโโโโโโผโโโโโโโ โ
โ โ SpecIR โ โ Canonical Representation โ
โ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โ
โ โ Vector DB โ โ SpecImpact โ โ SpecDiff โ โ
โ โ (LanceDB) โ โ Graph โ โ Timeline โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโผโโโโโโโ โ
โ โ AgentXPack โ โ Output for any agent โ
โ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ง Living Documentation & Memory
SpecMem transforms your specifications into living documentation that:
- Stays in sync - File watcher detects changes and re-indexes automatically
- Provides context - AI agents query specs via MCP to understand your project
- Tracks coverage - See which acceptance criteria have tests
- Shows relationships - Impact graph connects specs โ code โ tests
How it acts as "memory" for agents:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Agent asks: "What are the auth requirements?" โ
โ โ โ
โ โโโโโโโโผโโโโโโโ โ
โ โ SpecMem โ โ Semantic search โ
โ โ Memory โ โ
โ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โ Returns: Relevant specs, related code, suggested tests โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Quick Start
Try It Now (Demo)
# See SpecMem in action with its own specs
specmem demo
This launches the Web UI with SpecMem's own specifications - dogfooding at its finest!
CLI
# Initialize SpecMem in your project
specmem init
# Initialize with Kiro hooks for automation
specmem init --hooks
# Scan and index your specifications
specmem scan
# Build the Agent Experience Pack
specmem build
# Query your specs
specmem query "What are the authentication requirements?"
# Analyze impact of code changes
specmem impact --files src/auth/service.py
# Check spec coverage
specmem cov
# Get test suggestions for uncovered criteria
specmem cov suggest auth-feature
# Check project health score
specmem health
# Validate spec quality
specmem validate
# View spec diff/history
specmem diff auth.login
specmem history auth.login
# Lifecycle management
specmem prune --orphaned # Archive orphaned specs
specmem generate src/ # Generate specs from code
specmem compress --all # Compress verbose specs
# View coding guidelines
specmem guidelines
# Kiro configuration
specmem kiro-config # Show all Kiro config
specmem steering --file src/app.py # Get applicable steering
# Session search (Kiro)
specmem sessions search "auth" # Search chat sessions
specmem sessions link # Link sessions to specs
# Export static dashboard
specmem export data # Export spec data to JSON
specmem export build # Build static HTML dashboard
# Graph commands
specmem graph impact src/auth.py # Show affected specs/tests
specmem graph show spec:auth # Show node relationships
specmem graph export --format dot # Export graph
# Launch Web UI
specmem demo
Python API
from specmem import SpecMemClient
# Initialize client
sm = SpecMemClient()
# Get context for code changes
bundle = sm.get_context_for_change(["auth/service.py"])
print(bundle.tldr)
# Query specifications
specs = sm.query("authentication requirements")
# Get impacted specs for changes
impacted = sm.get_impacted_specs(["auth/service.py"])
# Check for spec drift
drift = sm.get_drift_report()
# Analyze spec coverage
coverage = sm.get_coverage()
print(f"Coverage: {coverage.coverage_percentage:.1f}%")
๐ฆ Output: Agent Experience Pack
SpecMem generates a .specmem/ directory containing everything your agents need:
.specmem/
โโโ agent_memory.json # All specs with metadata and rankings
โโโ agent_context.md # Human-readable summary
โโโ knowledge_index.json # Keyword โ SpecBlock mapping
โโโ impact_graph.json # Code โ Spec relationships
โโโ vectordb/ # Embedded vector storage
โก Built for Kiro
SpecMem was built during Kiroween 2025 with first-class Kiro support. Your .kiro/specs/ become living, searchable agent memory.
โก Kiro Powers Integration
Install SpecMem as a Kiro Power for seamless IDE integration:
- Query specs without leaving Kiro
- Get context-aware suggestions in real-time
- Analyze impact of changes instantly
๐ MCP Server
Full Model Context Protocol support. Kiro's agent can query your specs, analyze impact, and get optimized context automatically.
// .kiro/settings/mcp.json
{
"mcpServers": {
"specmem": {
"command": "specmem-mcp",
"args": [],
"env": { "SPECMEM_WORKSPACE": "${workspaceFolder}" },
"autoApprove": ["specmem_query", "specmem_tldr", "specmem_coverage"]
}
}
}
Available MCP Tools:
| Tool | Description |
|---|---|
specmem_query |
Search specifications by natural language |
specmem_impact |
Analyze change impact on specs and tests |
specmem_context |
Get optimized context bundle for files |
specmem_tldr |
Get TL;DR summary of key specs |
specmem_coverage |
Analyze spec coverage and test gaps |
specmem_validate |
Validate specifications for quality issues |
๐ Native Kiro Adapter
First-class support for .kiro/specs/ structure:
| File | What SpecMem Extracts |
|---|---|
requirements.md |
User stories, acceptance criteria, constraints |
design.md |
Architecture decisions, component interfaces |
tasks.md |
Implementation checklist, progress tracking |
๐ฃ Hooks & Steering
SpecMem includes pre-configured hooks and steering files:
.kiro/
โโโ settings/mcp.json # MCP server config
โโโ hooks/
โ โโโ spec-coverage.yaml # Check coverage on test save
โ โโโ spec-validation.yaml # Validate on spec edit
โ โโโ impact-analysis.yaml # Analyze impact on code change
โโโ steering/
โโโ specmem-development.md # Always included
โโโ spec-writing.md # When editing specs
โโโ python-style.md # When editing Python
See Kiro Integration Guide for details.
๐ค GitHub Action
Integrate SpecMem into your CI/CD pipeline:
# .github/workflows/specmem.yml
name: Spec Analysis
on: [pull_request]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: SuperagenticAI/specmem/.github/actions/specmem@main
with:
commands: cov,health,validate
comment_on_pr: true
coverage_threshold: 80
health_threshold: B
Features:
- ๐ Coverage, health, and validation checks
- ๐ฌ Automatic PR comments with results
- ๐ฆ Configurable thresholds for quality gates
- ๐ Static dashboard deployment to GitHub Pages
๐ค Static Dashboard
Export your specs to a static HTML dashboard:
# Generate and preview locally
specmem export data
specmem export build
python -m http.server -d .specmem/static 8080
Or deploy to GitHub Pages with the dashboard action:
- uses: SuperagenticAI/specmem/.github/actions/specmem-dashboard@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
๐ Supported Frameworks
Spec-Driven Development (Priority)
| Framework | Adapter | File Patterns |
|---|---|---|
| Kiro | kiro |
.kiro/specs/**/*.md |
| SpecKit | speckit |
.speckit/**/*.yaml |
| Tessl | tessl |
.tessl/**/*.md |
Commercial Coding Agents
| Framework | Adapter | File Patterns |
|---|---|---|
| Claude Code | claude |
Claude.md, CLAUDE.md |
| Cursor | cursor |
cursor.json, .cursorrules |
| Codex | codex |
.codex/**/*.md |
| Factory | factory |
.factory/**/*.yaml |
| Warp | warp |
.warp/**/*.md |
| Gemini CLI | gemini |
GEMINI.md, .gemini/**/*.md |
๐๏ธ Vector Database Backends
SpecMem supports multiple vector database backends:
| Backend | Install | Best For |
|---|---|---|
| LanceDB (default) | pip install specmem[local] |
Local development, no server needed |
| ChromaDB | pip install specmem[chroma] |
Local/embedded with persistence |
| Qdrant | pip install specmem[qdrant] |
Production, distributed deployments |
| AgentVectorDB | Built-in | Lightweight, in-memory |
Switch backends:
specmem vector-backend chroma
โ๏ธ Cloud Embedding Providers
Use cloud embedding providers for better semantic search:
| Provider | Install | Model |
|---|---|---|
| OpenAI | pip install specmem[openai] |
text-embedding-3-small |
pip install specmem[google] |
embedding-001 | |
| Together AI | pip install specmem[together] |
togethercomputer/m2-bert |
Configure in .specmem.toml:
[embedding]
provider = "openai"
model = "text-embedding-3-small"
โ Spec Validation Rules
SpecMem validates your specifications with 6 built-in rules:
| Rule | What It Checks |
|---|---|
| Structure | Required sections (requirements, design, tasks) exist |
| Timeline | Tasks follow logical order, no circular dependencies |
| Duplicates | No duplicate acceptance criteria or requirements |
| Constraints | Acceptance criteria are testable and measurable |
| Acceptance Criteria | EARS pattern compliance, INCOSE quality rules |
| Contradictions | No conflicting requirements across specs |
Run validation:
specmem validate
specmem validate --spec auth-feature --format json
๐ Documentation
Full documentation is available at superagenticai.github.io/specmem
๐ ๏ธ Development
# Clone the repository
git clone https://github.com/SuperagenticAI/specmem.git
cd specmem
# Using uv (recommended)
uv sync --dev
uv run pytest
# Or using pip
pip install -e ".[dev]"
pytest
Using uv
SpecMem supports uv for fast dependency management:
# Install uv if you haven't
curl -LsSf https://astral.sh/uv/install.sh | sh
# Sync dependencies from lock file
uv sync
# Run specmem commands
uv run specmem --help
# Run tests
uv run pytest
# Add a new dependency
uv add <package>
๐ License
AGPL-3.0 - see LICENSE for details.
For commercial licensing options, contact team@super-agentic.ai
๐ข About
SpecMem is developed by Superagentic AI as part of the Kiroween Hackathon, December 2025.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file specmem-0.1.4.tar.gz.
File metadata
- Download URL: specmem-0.1.4.tar.gz
- Upload date:
- Size: 676.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13396e40937c7f8823423c1688823b5d16d3204ca93ae01d575dd40305c57430
|
|
| MD5 |
3d67ba3a1f96e4638a8f6cadf13bde99
|
|
| BLAKE2b-256 |
099b3f9f9bcc1f97078716d4ef140745293c530bb4da8dca3ddf5aac9980f9c2
|
File details
Details for the file specmem-0.1.4-py3-none-any.whl.
File metadata
- Download URL: specmem-0.1.4-py3-none-any.whl
- Upload date:
- Size: 801.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73784e11b5752669a994b7545b24578e165aa1907632b19c67f5a81224484474
|
|
| MD5 |
ec083d7e734f775cdd8f454ddd2d7a30
|
|
| BLAKE2b-256 |
02ac53c6e93c5d7e0f53a93ffd1e1f690ce68c1d6da0c794c097da52eb923d02
|