Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 12 additions & 30 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
Here are the detailed, production-ready `ARCHITECTURE.md` and `CONTRIBUTING.md` files based on the comprehensive Structural Memory Protocol (SMP) specifications.

### 1. `ARCHITECTURE.md`

```markdown
# Architecture Guide: Structural Memory Protocol (SMP)

The Structural Memory Protocol (SMP) provides AI agents with a "programmer's mental model" of a codebase. Unlike traditional Retrieval-Augmented Generation (RAG) which treats code as a series of text chunks, SMP treats code as a structured, queryable graph of interrelated entities.
Expand All @@ -25,8 +20,8 @@ This document outlines the production architecture, ingestion pipeline, query en
┌─────────────────────────────────────────────────────────────────┐
│ CODEBASE (Files + Git) │
└──────────────────────────┬──────────────────────────────────────┘
│ Updates (Watch / Agent Push / commit)
│ Updates (Watch / Agent Push / commit)
┌─────────────────────────────────────────────────────────────────┐
│ MEMORY SERVER (SMP Core) │
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────┐ │
Expand All @@ -44,21 +39,21 @@ This document outlines the production architecture, ingestion pipeline, query en
│ │ └────────────────┘ └────────────────┘ └───────────────┘ │ │
│ └──────────────────────────────┬───────────────────────────┘ │
└─────────────────────────────────┼───────────────────────────────┘
┌───────────────────────┼───────────────────────┐
▼ ▼ ▼
┌───────────────────────┼───────────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌──────────────────────┐ ┌───────────────┐
│ QUERY ENGINE │ │ SANDBOX RUNTIME │ │ SWARM LAYER │
│ SeedWalkEngine │ │ Docker / MicroVM │ │ Peer Review │
│ Context / Diff │ │ eBPF trace capture │ │ PR Handoff │
└────────┬────────┘ └──────────┬───────────┘ └───────┬───────┘
└───────────────────────┴───────────────────────┘
│ JSON-RPC 2.0 Dispatcher
┌─────────────────────────────────────────────┐
│ AGENT LAYER │
│ (Coder) (Reviewer) (Architect) │
└─────────────────────────────────────────────┘
└───────────────────────┴───────────────────────┘
│ JSON-RPC 2.0 Dispatcher
┌─────────────────────────────────────────────┐
│ AGENT LAYER │
│ (Coder) (Reviewer) (Architect) │
└─────────────────────────────────────────────┘
```

---
Expand Down Expand Up @@ -173,19 +168,6 @@ async def handle_locate(params: dict, ctx: ServerContext) -> LocateResponse:

---

## 🚀 Recommended Implementation Stack

- **Language:** Python 3.11+ (Strict Typing)
- **Data Serialization:** `msgspec` (Zero-copy, schema-validated structs, `frozen=True`)
- **Protocol:** JSON-RPC 2.0 (compatible with MCP)
- **AST Parsing:** `Tree-sitter`
- **Graph / Compute:** `Neo4j` (with GDS for Louvain & PageRank)
- **Tracing:** `eBPF` (via BCC / libbpf)
- **Mutation Testing:** `Stryker` / `mutmut`
```

---

### 2. `CONTRIBUTING.md`

```markdown
Expand Down
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Here is an expanded, standalone, and highly detailed `CONTRIBUTING.md` file. It goes deeper into the specific developer workflows, testing graph databases, adding protocol methods, and code standards required for the Structural Memory Protocol (SMP).

***

# Contributing to the Structural Memory Protocol (SMP)

Expand Down
Loading