warfactoryracine/scripts/sync_helpers.sh
StillHammer 61ef2293ad Replace engine architecture with modular triple interface system
- Remove old 10-engine system (engines/ directory deleted)
- Implement C++ triple interface architecture:
  * IEngine: Execution coordination (Debug → Production)
  * IModuleSystem: Strategy pattern (Sequential → Threaded → Cluster)
  * IModule: Pure game logic interface (200-300 lines per module)
  * IIO: Communication transport (Intra → Local → Network)

- Add autonomous module structure:
  * modules/factory/: Production logic with autonomous build
  * modules/economy/: Market simulation with autonomous build
  * modules/logistic/: Supply chain with autonomous build
  * Each module: CLAUDE.md + CMakeLists.txt + shared/ + build/

- Benefits for Claude Code development:
  * Ultra-focused contexts (200 lines vs 50K+ lines)
  * Autonomous builds (cmake . from module directory)
  * Hot-swappable infrastructure without logic changes
  * Parallel development across multiple Claude instances

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 09:15:03 +08:00

37 lines
1.1 KiB
Bash

#!/bin/bash
# Sync helper files to all modules
# Run this when core interfaces change
CORE_HELPERS="core/include/warfactory"
MODULE_DIRS="modules/*/shared"
echo "🔄 Syncing helper files to all modules..."
if [ ! -d "$CORE_HELPERS" ]; then
echo "❌ Core helpers directory not found: $CORE_HELPERS"
exit 1
fi
for module_dir in $MODULE_DIRS; do
if [ -d "$module_dir" ]; then
module_name=$(dirname "$module_dir" | basename)
echo " → Syncing to $module_name"
# Copy core interfaces
cp "$CORE_HELPERS/IModule.h" "$module_dir/"
cp "$CORE_HELPERS/ISocket.h" "$module_dir/"
# Copy base helper (if exists)
if [ -f "modules/factory/shared/ModuleBase.h" ]; then
cp "modules/factory/shared/ModuleBase.h" "$module_dir/"
fi
fi
done
echo "✅ Helper sync completed!"
echo ""
echo "📋 Next steps:"
echo " cd modules/factory && cmake . && make factory-module"
echo " cd modules/economy && cmake . && make economy-module"
echo " cd modules/logistic && cmake . && make logistic-module"