- 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>
2.0 KiB
2.0 KiB
Logistic Module - Pure Supply Chain Logic
Context
You are working EXCLUSIVELY on logistics and transportation logic. No infrastructure, no networking, no threading.
Responsibilities
- Supply chains: Resource routing, delivery optimization
- Transportation: Vehicle routing, capacity planning
- Warehousing: Inventory management, distribution centers
- Route optimization: Shortest path, load balancing
Interface Contract
// Input JSON examples:
{
"type": "plan_route",
"from": "factory_A",
"to": "warehouse_B",
"cargo": {"steel_plate": 100, "copper_wire": 50},
"constraints": {"max_weight": 1000, "max_distance": 500}
}
{
"type": "optimize_supply_chain",
"demand": {"location_1": {"steel_plate": 50}, "location_2": {"copper_wire": 30}},
"supply": {"factory_A": {"steel_plate": 200}, "factory_B": {"copper_wire": 100}}
}
// Output JSON examples:
{
"route": ["factory_A", "hub_1", "warehouse_B"],
"distance": 350,
"time": 45,
"cost": 120.5,
"vehicles_needed": 2
}
{
"supply_plan": [
{"from": "factory_A", "to": "location_1", "items": {"steel_plate": 50}},
{"from": "factory_B", "to": "location_2", "items": {"copper_wire": 30}}
],
"total_cost": 95.0,
"efficiency": 0.92
}
Build Commands
cd modules/logistic/
cmake . # Build from THIS directory
make logistic-module # Generates logistic.so
make test-logistic # Run isolated tests
./build/logistic-module # Test the module
File Limits
- LogisticModule.cpp: Max 300 lines
- Pure logic only: No sockets, threads, or engine dependencies
- JSON in/out: All communication via JSON messages
Focus Areas
- Routing algorithms (A*, Dijkstra, optimization)
- Supply chain optimization (linear programming concepts)
- Inventory management (stock levels, reorder points)
Claude Code should NEVER leave this directory or reference parent paths!