AI-powered coding assistant specialized in MemCode's intelligent memory and function management architecture. Handles development, testing, database operations, and code quality tasks.
A specialized skill for working with MemCode, an AI-powered coding assistant with intelligent memory and function management capabilities built on Chainlit and SQLAlchemy.
This skill provides expert guidance for developing, testing, and maintaining the MemCode application. It understands MemCode's layered architecture (Application → Services → Data → Core), secure function execution environment, semantic search system, and versioning capabilities.
When starting work on MemCode:
1. **Identify the task category**: development, testing, database migration, code quality, or architecture
2. **Check relevant layers**: Determine which architectural layers are affected (app/, services/, data/, core/, tools/)
3. **Review security implications**: If touching execution or function management, verify security considerations
**When adding or modifying features:**
1. Follow the async-first design pattern - all database operations must use async/await
2. Maintain clear separation of concerns between layers:
- `app/` handles user interactions only
- `services/` contains business logic
- `data/` manages persistence
- `core/` provides infrastructure
- `tools/` implements execution and tool framework
3. Use dependency injection for testability
4. Add appropriate type hints for mypy compatibility
**For function management features:**
**For execution features:**
**For search/retrieval features:**
**Creating migrations:**
```bash
python -m alembic revision --autogenerate -m "Description"
```
1. Review the generated migration file in `alembic/versions/`
2. Verify both upgrade and downgrade functions
3. Test the migration on a development database
4. Document any manual steps required
**Applying migrations:**
```bash
python -m alembic upgrade head
```
**Rolling back:**
```bash
python -m alembic downgrade -1
```
**When modifying models in `data/models.py`:**
**Before running tests:**
**Test execution commands:**
```bash
python -m pytest
python -m pytest tests/test_function_manager.py
python -m pytest --cov=services --cov=core --cov=data
python -m pytest tests/test_integration.py -v
```
**When writing new tests:**
**Standard quality check workflow:**
```bash
python -m black .
python -m isort .
python -m mypy services/ core/ data/
```
**Run this before committing code.**
**Code quality standards:**
**Development mode with auto-reload:**
```bash
chainlit run app/main.py --watch
```
**Production mode:**
```bash
chainlit run app/main.py
```
**Configuration checklist:**
**Service Layer Design:**
**Security-First Development:**
**Modular Tool Development:**
**Adding a new function management feature:**
1. Update `data/models.py` if schema changes needed
2. Generate and apply migration
3. Implement logic in `services/function_manager.py`
4. Add tool integration in `services/llm_service.py` if needed
5. Write unit tests
6. Update `app/main.py` event handlers if UI changes required
7. Run full quality checks
**Enhancing semantic search:**
1. Modify `services/retrieval_service.py`
2. Update embeddings logic in `core/embeddings.py` if needed
3. Test search accuracy with various queries
4. Benchmark performance impact
5. Update integration tests
**Improving execution safety:**
1. Modify security analysis in `tools/execution.py`
2. Update whitelist/blacklist as appropriate
3. Add comprehensive test cases for bypass attempts
4. Document security implications
5. Review with security-first mindset
**Required environment variables:**
**Key dependencies:**
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/memcode-development-assistant/raw