Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
# Run MemCode with Chainlit chainlit run app/main.py # Run in development mode with auto-reload chainlit run app/main.py --watch
# Generate database migration python -m alembic revision --autogenerate -m "Description" # Apply migrations python -m alembic upgrade head # Downgrade migration python -m alembic downgrade -1
# Run all tests python -m pytest # Run specific test file python -m pytest tests/test_function_manager.py # Run tests with coverage python -m pytest --cov=services --cov=core --cov=data # Run integration tests python -m pytest tests/test_integration.py -v
# Format code python -m black . # Sort imports python -m isort . # Type checking python -m mypy services/ core/ data/ # Run all quality checks python -m black . && python -m isort . && python -m mypy services/ core/ data/
MemCode is an AI-powered coding assistant with intelligent memory and function management capabilities. The system uses a layered architecture:
Application Layer (
)app/
main.py: Chainlit application entry point with async event handlersServices Layer (
)services/
llm_service.py: Claude integration with function calling tools (save_function, search_functions)function_manager.py: Function storage, retrieval, and versioning managementmemory_manager.py: Conversation memory with context retrievalretrieval_service.py: Enhanced search with semantic similarity and categorizationData Layer (
)data/
models.py: SQLAlchemy models with versioning, testing, and performance trackingrepositories.py: Data access patterns (planned)Core Infrastructure (
)core/
database.py: Async database connection managementembeddings.py: Vector embedding utilitiesTools (
)tools/
execution.py: Secure function execution with sandboxing, timeout, and resource limitsbase.py, registry.py: Extensible tool frameworkFunction Versioning System
Secure Execution Environment
Semantic Search & Retrieval
Testing Framework
Function Model - Core entity with:
Supporting Models:
FunctionExecution: Execution history and performance metricsFunctionDependency: Inter-function dependency trackingConversationMemory: Context-aware conversation storageEnvironment Variables
ANTHROPIC_API_KEY: Required for AI functionalityDATABASE_URL: Database connection (SQLite dev, PostgreSQL prod)DEBUG: Debug mode toggleDependencies
Async-First Design
Security-First Approach
Modular Architecture
Test Organization
test_function_manager.py)test_integration.py)test_memory_manager.py, test_retrieval_service.py)Key Test Areas