Skip to content

Commit 1b02247

Browse files
Patrick Roebuckclaude
andcommitted
docs: Enhance module docstrings for core engine components
Improve module-level documentation for MemDocs core functionality: - MCP Server: Clarify flagship feature for Claude Desktop integration - Extract: Document multi-language symbol extraction capabilities - Embeddings: Highlight zero-cost ($0) local embedding generation - Search: Detail FAISS-based offline vector similarity search - Summarize: Describe Claude-powered structured documentation - Policy: Explain intelligent scope escalation logic Also update .gitignore to commit .memdocs/ directory, demonstrating dogfooding of MemDocs on itself with git-committed memories. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 204f56a commit 1b02247

File tree

7 files changed

+32
-14
lines changed

7 files changed

+32
-14
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ dmypy.json
5858
.env.local
5959
.env.*.local
6060

61-
# MemDocs output (for testing)
62-
.memdocs/
61+
# MemDocs output
62+
# NOTE: Committing .memdocs/ to demonstrate dogfooding
63+
# .memdocs/ # Uncomment to exclude from git (for testing only)
6364
*.memdocs.yml.backup
6465

6566
# Distribution

memdocs/embeddings.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
"""
22
Local embeddings generation using sentence-transformers.
33
4-
Zero-cost alternative to OpenAI embeddings API.
5-
Model downloads once (~90MB), runs 100% locally.
4+
Zero-cost alternative to OpenAI embeddings API ($0.13/1M tokens → $0).
5+
Model downloads once (~90MB), runs 100% locally for privacy-first operation.
6+
7+
Enables semantic search over code documentation without external API dependencies.
68
"""
79

810
import json

memdocs/extract.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
"""
22
Extract context from git diffs, code files, and repository metadata.
33
4+
Core extraction engine that powers MemDocs documentation generation.
5+
46
Responsibilities:
57
- Parse git diffs to identify changed files
68
- Extract code symbols (functions, classes) using AST parsing
79
- Gather metadata (commit info, file stats, dependencies)
10+
- Support multi-language symbol extraction (Python, TypeScript, JavaScript)
811
"""
912

1013
import json

memdocs/mcp_server.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
MCP (Model Context Protocol) server for Claude Desktop integration.
33
44
Enables Claude Desktop to query project memory stored in .memdocs/
5+
via semantic search, symbol lookup, and documentation retrieval.
6+
7+
This is MemDocs' flagship feature - allowing AI assistants to autonomously
8+
query git-committed memory without file system access.
59
"""
610

711
import json

memdocs/policy.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
"""
2-
Policy engine for scope determination and escalation rules.
2+
Policy engine for intelligent scope determination and escalation.
33
4-
Determines when to expand scope from file → module → repo based on:
4+
Automatically expands documentation scope from file → module → repo based on:
55
- Security-sensitive paths (auth/*, security/*)
6-
- Cross-module dependencies
7-
- Public API changes
8-
- File count thresholds
6+
- Cross-module dependencies and import chains
7+
- Public API signature changes
8+
- File count thresholds (configurable)
9+
10+
Ensures critical changes get comprehensive documentation while keeping
11+
costs low for routine single-file updates.
912
"""
1013

1114
from pathlib import Path

memdocs/search.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
"""
2-
Local vector search using FAISS.
2+
Local vector search using FAISS (Facebook AI Similarity Search).
33
4-
Zero-cost alternative to Pinecone ($70-200/month).
5-
Index stored in .memdocs/memory/ (git-committed).
4+
Zero-cost alternative to Pinecone ($70-200/month → $0).
5+
Index stored in .memdocs/memory/ (git-committed, version-controlled).
6+
7+
Provides fast L2 distance similarity search for semantic code queries.
8+
Works offline with no external dependencies or API latency.
69
"""
710

811
import json

memdocs/summarize.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""
2-
AI-powered summarization using Claude.
2+
AI-powered summarization using Claude Sonnet 4.5.
33
4-
Generates structured documentation from extracted code context.
4+
Generates structured YAML documentation from extracted code context,
5+
transforming git diffs and AST symbols into human-readable summaries
6+
with risk analysis, impact tracking, and feature descriptions.
57
"""
68

79
import os

0 commit comments

Comments
 (0)