Easier access to logs at startup with -f on the run script

Improved prompt for immediate action
Additional logging of tool names
Updated documentation
Context aware decomposition system prompt
New script to run code quality checks
This commit is contained in:
Fahad
2025-06-15 09:25:52 +04:00
parent 318b5c7ae7
commit c7835e7eef
16 changed files with 635 additions and 201 deletions

60
code_quality_checks.sh Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/bash
# Zen MCP Server - Code Quality Checks
# This script runs all required linting and testing checks before committing changes.
# ALL checks must pass 100% for CI/CD to succeed.
set -e # Exit on any error
echo "🔍 Running Code Quality Checks for Zen MCP Server"
echo "================================================="
# Check if virtual environment is activated
if [[ "$VIRTUAL_ENV" == "" ]]; then
echo "❌ Virtual environment not activated!"
echo "Please run: source venv/bin/activate"
exit 1
fi
echo "✅ Virtual environment detected: $VIRTUAL_ENV"
echo ""
# Step 1: Linting and Formatting
echo "📋 Step 1: Running Linting and Formatting Checks"
echo "--------------------------------------------------"
echo "🔧 Running ruff linting with auto-fix..."
ruff check --fix
echo "🎨 Running black code formatting..."
black .
echo "📦 Running import sorting with isort..."
isort .
echo "✅ Verifying all linting passes..."
ruff check
echo "✅ Step 1 Complete: All linting and formatting checks passed!"
echo ""
# Step 2: Unit Tests
echo "🧪 Step 2: Running Complete Unit Test Suite"
echo "---------------------------------------------"
echo "🏃 Running all 361 unit tests..."
python -m pytest tests/ -v
echo "✅ Step 2 Complete: All unit tests passed!"
echo ""
# Step 3: Final Summary
echo "🎉 All Code Quality Checks Passed!"
echo "=================================="
echo "✅ Linting (ruff): PASSED"
echo "✅ Formatting (black): PASSED"
echo "✅ Import sorting (isort): PASSED"
echo "✅ Unit tests (361 tests): PASSED"
echo ""
echo "🚀 Your code is ready for commit and GitHub Actions!"
echo "💡 Remember to add simulator tests if you modified tools"