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
6 changes: 3 additions & 3 deletions docs/00-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ python -m mcp_server --transport stdio
| 05 | [Knowledge Graph](05-graph.md) | EpistemicGraph, TemporalGraph |
| 06 | [Lifecycle](06-lifecycle.md) | Type-aware Forgetting, EmotionTrigger, Consolidation, Importance Scheduler |
| 07 | [Hooks](07-hooks.md) | 24 hooks (12 user + 12 agent), type-aware gating |
| 08 | [Wiki](08-wiki.md) | FileWiki (.md files + FTS5), 14 types |
| 08 | [Wiki](08-wiki.md) | WikiManager (.md files + FTS5), 14 types |
| 09 | [Features](09-features.md) | Auth, Backup, Dashboard, Audit, RateLimit, Secrets |
| 10 | [Shared](10-shared.md) | Saga+Retry+Idempotency, Importance Scorer, Middleware, Embeddings |
| 11 | [Operations](11-operations.md) | Transports, Health, Auth, Scheduler, Configuration |
| 12 | [Testing](12-testing.md) | pytest (338 tests + 25 Hypothesis), benchmarks, project structure |
| 12 | [Testing](12-testing.md) | pytest (372 tests + 25 Hypothesis), benchmarks, project structure |

---

Expand Down Expand Up @@ -87,7 +87,7 @@ python -m mcp_server --transport http --port 8000

- **Version:** 1.0.0
- **MCP Tools:** 19
- **Tests:** 338 passed (25 property-based Hypothesis)
- **Tests:** 372 passed (25 property-based Hypothesis)
- **Python files:** 70
- **DB tables:** 23
- **Hooks:** 24
Expand Down
6 changes: 3 additions & 3 deletions docs/01-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ Message → L1 (buffer)
| `epi_tags` | graph/epistemic.py | Epistemic node tags (fast JOIN lookup) |
| `temporal_events` | graph/temporal.py | Temporal events |
| `temporal_links` | graph/temporal.py | Temporal links |
| `user_wiki` | wiki/user_wiki.py | User wiki entries |
| `agent_wiki` | wiki/agent_wiki.py | Agent wiki entries |
| `wiki_index` | wiki/file_wiki.py | Wiki FTS5 index |
| `user_wiki` | wiki/manager.py | User wiki entries |
| `agent_wiki` | wiki/manager.py | Agent wiki entries |
| `wiki_index` | wiki/manager.py | Wiki FTS5 index |
| `memory_conflicts` | rag/conflict.py | Memory conflicts |
| `memory_kind_registry` | shared/memory_types.py | Typed memory categories |
| `importance_audit` | lifecycle/importance_scheduler.py | Importance rescore audit log |
Expand Down
6 changes: 3 additions & 3 deletions docs/04-rag.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ chunks = rag._chunk_text("A" * 1000, max_size=500, overlap=100)
### Constructor

```python
MultiSourceRAG(rag: RAGEngine, wiki: FileWiki, cm: AsyncConnectionManager = None)
MultiSourceRAG(rag: RAGEngine, wiki: WikiManager, cm: AsyncConnectionManager = None)
```

### `search()`
Expand Down Expand Up @@ -597,9 +597,9 @@ The MCP tool `memory_search_rrf` uses MultiSourceRAG under the hood when `source
```python
from rag.multi_source import MultiSourceRAG
from rag.engine import RAGEngine
from wiki.file_wiki import FileWiki
from wiki.manager import WikiManager

ms = MultiSourceRAG(rag=RAGEngine(layer="user"), wiki=FileWiki(layer="user"))
ms = MultiSourceRAG(rag=RAGEngine(layer="user"), wiki=WikiManager(layer="user"))
results = await ms.search("memory architecture", user_id="alice", limit=5)
# Merged + deduplicated results from RAG and Wiki
```
Expand Down
41 changes: 21 additions & 20 deletions docs/08-wiki.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Wiki — wiki/ (FileWiki + UserWiki/AgentWiki with FTS5)
# Wiki — wiki/ (WikiManager with FTS5)

## Shared Utilities (wiki/shared.py)

Common wiki logic extracted from agent_wiki.py, file_wiki.py, user_wiki.py:
Common wiki logic:

| Function | Purpose |
|----------|---------|
Expand All @@ -15,9 +15,10 @@ Common wiki logic extracted from agent_wiki.py, file_wiki.py, user_wiki.py:
| `build_count_query(table, user_id, wiki_type)` | COUNT query builder |
| `format_search_result(row)` | FTS result formatter |

## FileWiki (`wiki/file_wiki.py`) — core module
## WikiManager (`wiki/manager.py`) — unified module

.md files = source of truth + SQLite FTS5 index.
Layer-based wiki: .md files = source of truth + SQLite FTS5 index.
Replaces former FileWiki, UserWiki, AgentWiki classes.

### FTS5 content-sync table

Expand Down Expand Up @@ -65,11 +66,11 @@ wiki:
external_dirs: ["/home/user/notes"]
```

### FileWiki Methods
### WikiManager Methods

```python
from wiki.file_wiki import FileWiki
uw = FileWiki(layer="user")
from wiki.manager import WikiManager
uw = WikiManager(layer="user")

# add() — creates .md + indexes (skips on MD5 match)
await uw.add("diary", "Day 1", "Content", tags=["work"])
Expand All @@ -84,7 +85,7 @@ await uw.reindex_all()
await uw.sync_external(["/home/user/notes"])
```

## UserWiki (`wiki/user_wiki.py`) — 7 types, 590 lines
## UserWiki (layer=user) (deprecated - use WikiManager) (`wiki/manager.py`) — 7 types, 590 lines

Legacy module for user wiki with FTS5. Each type is a separate category.

Expand All @@ -99,14 +100,14 @@ Legacy module for user wiki with FTS5. Each type is a separate category.
| `retrospective` | Retrospective |

```python
from wiki.user_wiki import UserWiki
uw = UserWiki()
from wiki.manager import WikiManager
uw = WikiManager(layer='user')
await uw.add("diary", "Day 1", "Started project", ["work"], 0.7)
results = await uw.search("project") # FTS5 search
await uw.sync_external(["/home/user/notes"]) # import .md
```

### UserWiki — All public methods
### UserWiki (layer=user) (deprecated - use WikiManager) — All public methods

| Method | Signature | Returns | Async |
|--------|-----------|---------|-------|
Expand All @@ -124,7 +125,7 @@ await uw.sync_external(["/home/user/notes"]) # import .md

**WikiEntry dataclass:** `entry_id: int, user_id: str, wiki_type: str, title: str, content: str, tags: List[str], importance: float, created_at: float, updated_at: float`

## AgentWiki (`wiki/agent_wiki.py`) — 7 types, 590 lines
## AgentWiki (layer=agent) (deprecated - use WikiManager) (`wiki/manager.py`) — 7 types, 590 lines

Legacy module for agent wiki. Lore, references, decision journal.

Expand All @@ -139,14 +140,14 @@ Legacy module for agent wiki. Lore, references, decision journal.
| `principle_log` | Principle journal |

```python
from wiki.agent_wiki import AgentWiki
aw = AgentWiki()
from wiki.manager import WikiManager
aw = WikiManager(layer='agent')
await aw.add("decision_log", "DB Choice", "SQLite for simplicity", ["tech"], 0.8)
results = await aw.search("SQLite")
await aw.sync_external(["/path/to/lore"])
```

### AgentWiki — All public methods
### AgentWiki (layer=agent) (deprecated - use WikiManager) — All public methods

| Method | Signature | Returns | Async |
|--------|-----------|---------|-------|
Expand Down Expand Up @@ -225,13 +226,13 @@ updated: 2026-06-21T22:00:00
Discussed the plan for the week.
```

## FileWiki Methods (async)
## WikiManager Methods (async)

```python
from wiki.file_wiki import FileWiki
from wiki.manager import WikiManager

uw = FileWiki(layer="user")
aw = FileWiki(layer="agent")
uw = WikiManager(layer="user")
aw = WikiManager(layer="agent")

# Write
path = await uw.add("diary", "Day 1", "Started project", tags=["work"], importance=0.7)
Expand Down Expand Up @@ -259,7 +260,7 @@ await uw.reindex_all()
await uw.sync_external(["/home/user/notes"])
```

### FileWiki — All public methods
### WikiManager — All public methods

| Method | Signature | Returns | Async |
|--------|-----------|---------|-------|
Expand Down
2 changes: 1 addition & 1 deletion docs/12-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ mcp-ariel-memory/
├── graph/ # Epistemic + Temporal (async)
├── lifecycle/ # Forgetting + Emotion + Consolidation (async)
├── hooks/ # 24 hooks
├── wiki/ # FileWiki (.md + FTS5, async)
├── wiki/ # WikiManager (.md + FTS5, async)
├── features/ # Auth + Backup + Dashboard + Audit + RateLimit + Secrets (async)
└── shared/ # ConnectionManager + Cache + Saga + Middleware + Embeddings (async)
```
2 changes: 1 addition & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- Health endpoints

### Testing
- 338 tests passing
- 372 tests passing
- 25 property-based Hypothesis tests
- CI on Python 3.10-3.13
- Type checking (mypy)
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Universal Two-Layer Memory MCP Server for AI agents**

[![CI](https://github.com/Cipher208/mcp-ariel-memory/actions/workflows/ci.yml/badge.svg)](https://github.com/Cipher208/mcp-ariel-memory/actions/workflows/ci.yml)
[![Tests](https://img.shields.io/badge/tests-338 passed-brightgreen)](https://github.com/Cipher208/mcp-ariel-memory/actions)
[![Tests](https://img.shields.io/badge/tests-372 passed-brightgreen)](https://github.com/Cipher208/mcp-ariel-memory/actions)
[![Python](https://img.shields.io/badge/python-3.10--3.13-blue)](https://www.python.org/)

---
Expand Down Expand Up @@ -78,7 +78,7 @@ mcp-ariel-memory is a production-ready MCP server providing persistent, searchab
## Status

- **Version:** 1.0.0
- **Tests:** 338 passed (including 25 property-based Hypothesis tests)
- **Tests:** 372 passed (including 25 property-based Hypothesis tests)
- **DB tables:** 23
- **Python:** 3.10–3.13
- **Platform:** Windows, Linux, macOS, Docker
6 changes: 3 additions & 3 deletions docs/wiki/agent-wiki.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# AgentWiki
# AgentWiki (deprecated - use WikiManager)

Agent identity wiki for storing agent learning and evolution.

## Usage

```python
from wiki.agent_wiki import AgentWiki
from wiki.manager import WikiManager

aw = AgentWiki()
aw = WikiManager(layer='agent')

# Add page
await aw.add_page(
Expand Down
6 changes: 3 additions & 3 deletions docs/wiki/file-wiki.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FileWiki
# WikiManager

File-based wiki with .md files as source of truth.

Expand All @@ -12,9 +12,9 @@ File-based wiki with .md files as source of truth.
## Usage

```python
from wiki.file_wiki import FileWiki
from wiki.manager import WikiManager

fw = FileWiki(layer="user")
fw = WikiManager(layer="user")

# Add page
fw.add_page(
Expand Down
18 changes: 9 additions & 9 deletions docs/wiki/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,36 @@ Wiki system with .md files as source of truth and FTS5 full-text search.

14 types: spec, decision, error, code, note, guide, reference, tutorial, faq, changelog, architecture, api, example, concept

## FileWiki
## WikiManager

File-based wiki with external folder sync:

```python
from wiki.file_wiki import FileWiki
from wiki.manager import WikiManager

fw = FileWiki(layer="user")
fw = WikiManager(layer="user")
fw.add_page(title="Architecture", content="# Architecture\n...", wiki_type="spec")
results = fw.search("architecture", limit=5)
```

## UserWiki
## UserWiki (layer=user) (deprecated - use WikiManager)

User-specific wiki pages:

```python
from wiki.user_wiki import UserWiki
from wiki.manager import WikiManager

uw = UserWiki()
uw = WikiManager(layer='user')
await uw.add_page(user_id="u1", title="My Notes", content="...")
```

## AgentWiki
## AgentWiki (layer=agent) (deprecated - use WikiManager)

Agent identity wiki:

```python
from wiki.agent_wiki import AgentWiki
from wiki.manager import WikiManager

aw = AgentWiki()
aw = WikiManager(layer='agent')
await aw.add_page(title="Learning", content="...")
```
6 changes: 3 additions & 3 deletions docs/wiki/user-wiki.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# UserWiki
# UserWiki (deprecated - use WikiManager)

User-specific wiki pages stored in database.

## Usage

```python
from wiki.user_wiki import UserWiki
from wiki.manager import WikiManager

uw = UserWiki()
uw = WikiManager(layer='user')

# Add page
await uw.add_page(
Expand Down
Loading