Centralized context generation for commands