Skip to content

📢 Progress Writeup: Rule-Based Engine MVP Complete #19

@ashu17706

Description

@ashu17706

Smriti: Building Intelligent Memory for AI Agents

The Problem

When Claude Code, Cline, or Aider run for months, they produce 1000s of sessions. But without proper categorization, that memory is just noise. You can't find "that time we fixed the auth bug" or "our decision on Redis vs Memcached" — it's all one big undifferentiated pile of text.

Most teams treat categorization as an afterthought: hardcoded regex patterns, one-size-fits-all rules, no ability to adapt.

Our Approach: Categorization as First-Class Citizen

We've built Smriti — a unified memory layer for AI teams that makes categorization fast, accurate, and evolving.

✅ What We Just Shipped (MVP)

3-Tier Rule System — flexible, not rigid

  • Tier 1 (Base): Language-specific rules (TypeScript, Python, Rust, Go)
  • Tier 2 (Custom): Project-specific tweaks (git-tracked, team-shared)
  • Tier 3 (Runtime): CLI overrides for experimentation

Language Detection — automatic, no config needed

  • Detects your tech stack from filesystem markers
  • Identifies frameworks (Next.js, FastAPI, Axum, etc.)
  • Confidence scoring to know when we're guessing

Performance

  • <50ms to categorize a message
  • Rules cached in memory (not re-parsing YAML every time)
  • GitHub rule cache with fallback (works offline)

27 Tests, 100% Pass Rate

  • Language detection working on 5 languages
  • 3-tier merge logic verified
  • Backward compatible — existing projects work unchanged

🚀 What's Coming (Phase 1.5 & 2)

Next 2 weeks:

  • Language-specific rule sets (TypeScript, Python, Rust, Go, JavaScript)
  • smriti init command to auto-detect & set up project rules
  • smriti rules CLI for teams to add/validate custom rules
  • Framework-specific rules (Next.js, FastAPI patterns)

Months ahead:

  • Community rule repository on GitHub
  • Auto-update checking ("new rules available for TypeScript")
  • A/B testing framework for rule accuracy
  • Entity extraction (people, projects, errors) for richer context

💡 Why This Matters

For solo developers: "Find everything we discussed about authentication" — instant, accurate

For teams: Shared rules in git means everyone uses the same categorization schema. Knowledge transfer, not knowledge hoarding.

For AI agents: Agents can search categorized memory, leading to better context and fewer hallucinations.

🎯 Design Principles

Not hardcoded — YAML rules, easy to modify
Evolving — add/override rules without touching code
Language-aware — TypeScript rules ≠ Python rules
Offline-first — caches GitHub rules, works offline
Testable — 27 tests, clear precedence rules


Status: MVP complete, ready for real-world testing.

Related: Issue #18 (Technical tracking)
Commit: f15c532 (Phase 1 MVP implementation)

Building memory infrastructure for the agentic era.

#AI #DevTools #Memory #Categorization #Agents

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions