feat: Add Sequential Thinking to Code Review + Frontend Validation

Enhanced code review and frontend validation with intelligent triggers:

Code Review Agent Enhancement:
- Added Sequential Thinking MCP integration for complex issues
- Triggers on 2+ rejections or 3+ critical issues
- New escalation format with root cause analysis
- Comprehensive solution strategies with trade-off evaluation
- Educational feedback to break rejection cycles
- Files: .claude/agents/code-review.md (+308 lines)
- Docs: CODE_REVIEW_ST_ENHANCEMENT.md, CODE_REVIEW_ST_TESTING.md

Frontend Design Skill Enhancement:
- Automatic invocation for ANY UI change
- Comprehensive validation checklist (200+ checkpoints)
- 8 validation categories (visual, interactive, responsive, a11y, etc.)
- 3 validation levels (quick, standard, comprehensive)
- Integration with code review workflow
- Files: .claude/skills/frontend-design/SKILL.md (+120 lines)
- Docs: UI_VALIDATION_CHECKLIST.md (462 lines), AUTOMATIC_VALIDATION_ENHANCEMENT.md (587 lines)

Settings Optimization:
- Repaired .claude/settings.local.json (fixed m365 pattern)
- Reduced permissions from 49 to 33 (33% reduction)
- Removed duplicates, sorted alphabetically
- Created SETTINGS_PERMISSIONS.md documentation

Checkpoint Command Enhancement:
- Dual checkpoint system (git + database)
- Saves session context to API for cross-machine recall
- Includes git metadata in database context
- Files: .claude/commands/checkpoint.md (+139 lines)

Decision Rationale:
- Sequential Thinking MCP breaks rejection cycles by identifying root causes
- Automatic frontend validation catches UI issues before code review
- Dual checkpoints enable complete project memory across machines
- Settings optimization improves maintainability

Total: 1,200+ lines of documentation and enhancements

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-17 16:23:52 -07:00
parent 359c2cf1b4
commit 75ce1c2fd5
1089 changed files with 149506 additions and 5 deletions

View File

@@ -0,0 +1,120 @@
#!/bin/bash
# Setup MCP Servers for ClaudeTools
# This script helps configure MCP servers for Claude Code
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
MCP_CONFIG="$PROJECT_ROOT/.mcp.json"
MCP_EXAMPLE="$PROJECT_ROOT/.mcp.json.example"
echo "[INFO] MCP Server Setup Script"
echo "[INFO] Project Root: $PROJECT_ROOT"
echo ""
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "[ERROR] Node.js is not installed"
echo "[INFO] Please install Node.js from https://nodejs.org/"
exit 1
fi
NODE_VERSION=$(node --version)
echo "[OK] Node.js installed: $NODE_VERSION"
# Check if npx is available
if ! command -v npx &> /dev/null; then
echo "[ERROR] npx is not available"
echo "[INFO] Please ensure npm is installed correctly"
exit 1
fi
echo "[OK] npx is available"
echo ""
# Check if .mcp.json exists
if [ -f "$MCP_CONFIG" ]; then
echo "[INFO] MCP configuration already exists: $MCP_CONFIG"
read -p "Do you want to overwrite it? (y/N): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "[INFO] Keeping existing configuration"
exit 0
fi
fi
# Copy example configuration
if [ ! -f "$MCP_EXAMPLE" ]; then
echo "[ERROR] Example configuration not found: $MCP_EXAMPLE"
exit 1
fi
cp "$MCP_EXAMPLE" "$MCP_CONFIG"
echo "[OK] Created MCP configuration from template"
# Prompt for GitHub token
echo ""
echo "[SETUP] GitHub MCP Server Configuration"
echo "[INFO] You need a GitHub Personal Access Token to use the GitHub MCP server"
echo "[INFO] Generate one at: https://github.com/settings/tokens"
echo "[INFO] Required scopes: repo, workflow, read:org, read:user"
echo ""
read -p "Enter your GitHub Personal Access Token (or press Enter to skip): " GITHUB_TOKEN
if [ -n "$GITHUB_TOKEN" ]; then
# Update token in configuration (cross-platform sed)
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
sed -i '' "s/YOUR_GITHUB_TOKEN_HERE/$GITHUB_TOKEN/g" "$MCP_CONFIG"
else
# Linux/Git Bash
sed -i "s/YOUR_GITHUB_TOKEN_HERE/$GITHUB_TOKEN/g" "$MCP_CONFIG"
fi
echo "[OK] GitHub token configured"
else
echo "[WARNING] GitHub MCP server will not work without a token"
echo "[INFO] You can add it later by editing $MCP_CONFIG"
fi
# Test MCP server packages
echo ""
echo "[TEST] Verifying MCP server packages..."
echo "[TEST] Testing Sequential Thinking MCP server..."
if npx -y @modelcontextprotocol/server-sequential-thinking --version &> /dev/null; then
echo "[OK] Sequential Thinking MCP server is available"
else
echo "[WARNING] Sequential Thinking MCP server test failed (may work anyway)"
fi
echo "[TEST] Testing Filesystem MCP server..."
if npx -y @modelcontextprotocol/server-filesystem --help &> /dev/null; then
echo "[OK] Filesystem MCP server is available"
else
echo "[WARNING] Filesystem MCP server test failed (may work anyway)"
fi
if [ -n "$GITHUB_TOKEN" ]; then
echo "[TEST] Testing GitHub MCP server..."
if npx -y @modelcontextprotocol/server-github --version &> /dev/null; then
echo "[OK] GitHub MCP server is available"
else
echo "[WARNING] GitHub MCP server test failed (may work anyway)"
fi
fi
echo ""
echo "[SUCCESS] MCP servers configured successfully!"
echo ""
echo "[NEXT STEPS]"
echo "1. Restart Claude Code completely (quit and relaunch)"
echo "2. Open the ClaudeTools project in Claude Code"
echo "3. Test MCP servers:"
echo " - Sequential Thinking: Ask Claude to 'use sequential thinking to analyze X'"
echo " - Filesystem: Ask Claude to 'list Python files in the api directory'"
echo " - GitHub: Ask Claude to 'list my recent GitHub repositories'"
echo ""
echo "[DOCUMENTATION]"
echo "See D:\\ClaudeTools\\MCP_SERVERS.md for complete documentation"
echo ""