Migrated from design-system-swarm with fresh git history.
Old project history preserved in /home/overbits/apps/design-system-swarm
Core components:
- MCP Server (Python FastAPI with mcp 1.23.1)
- Claude Plugin (agents, commands, skills, strategies, hooks, core)
- DSS Backend (dss-mvp1 - token translation, Figma sync)
- Admin UI (Node.js/React)
- Server (Node.js/Express)
- Storybook integration (dss-mvp1/.storybook)
Self-contained configuration:
- All paths relative or use DSS_BASE_PATH=/home/overbits/dss
- PYTHONPATH configured for dss-mvp1 and dss-claude-plugin
- .env file with all configuration
- Claude plugin uses ${CLAUDE_PLUGIN_ROOT} for portability
Migration completed: $(date)
🤖 Clean migration with full functionality preserved
57 lines
1.6 KiB
Bash
Executable File
57 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Pre-commit hook for documentation synchronization
|
|
#
|
|
# Validates manifest and warns about documentation changes
|
|
|
|
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
|
|
DOC_SYNC_DIR="$PROJECT_ROOT/.dss/doc-sync"
|
|
RUNNER="$DOC_SYNC_DIR/doc_sync_runner.py"
|
|
|
|
# Colors
|
|
RED='\033[0;31m'
|
|
YELLOW='\033[1;33m'
|
|
GREEN='\033[0;32m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo "🔍 Pre-commit: Validating documentation manifest..."
|
|
|
|
# Check if runner exists
|
|
if [ ! -f "$RUNNER" ]; then
|
|
echo -e "${YELLOW}⚠️ Doc sync runner not found, skipping validation${NC}"
|
|
exit 0
|
|
fi
|
|
|
|
# Validate manifest
|
|
cd "$PROJECT_ROOT"
|
|
python3 "$RUNNER" validate 2>&1
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo -e "${RED}❌ Manifest validation failed${NC}"
|
|
echo -e "${YELLOW}Fix errors in .dss/doc-sync/manifest.json${NC}"
|
|
exit 1
|
|
fi
|
|
|
|
echo -e "${GREEN}✓ Manifest is valid${NC}"
|
|
|
|
# Warn if .knowledge/ files are being committed without corresponding code changes
|
|
STAGED_KNOWLEDGE=$(git diff --cached --name-only | grep "^\.knowledge/")
|
|
STAGED_CODE=$(git diff --cached --name-only | grep -E "\.(py|js|ts|jsx|tsx)$")
|
|
|
|
if [ -n "$STAGED_KNOWLEDGE" ] && [ -z "$STAGED_CODE" ]; then
|
|
echo -e "${YELLOW}⚠️ Warning: You're committing .knowledge/ changes without code changes${NC}"
|
|
echo -e "${YELLOW} This might indicate manual edits to generated files${NC}"
|
|
echo ""
|
|
echo "Staged knowledge files:"
|
|
echo "$STAGED_KNOWLEDGE" | sed 's/^/ - /'
|
|
echo ""
|
|
echo -e "${YELLOW}Continue? (y/N)${NC}"
|
|
read -r response
|
|
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
|
echo "Commit aborted"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
exit 0
|