Engineering on an astronomical scale, or astronomical engineering, i.e., engineering involving operations with whole astronomical objects (planets, stars, etc.), is a known theme in science fiction, as well as a matter of recent scientific research and exploratory engineering. [1]
On the Kardashev scale, Type II and Type III civilizations can harness energy on the required scale. [2] [3] This can allow them to construct megastructures.