The concept of stellar engineering refers to the deliberate orchestration of artificial changes to a star or other similar astronomical object for the purposes of engineering a useful construction, power source or some other function. Its minor cousin, planetary engineering (the engineering of planets) has been nicely discussed by others.
In 1964 the Soviet astronomer Nikolai Kardashev proposed a scale for measuring the output of interstellar civilisations in the Cosmos that can be used for long distance communications. This has come to be known as the ‘Kardashev scale’, and three types of civilisation were defined.
A Type I civilisation has the capacity to store all of the energy which reaches a home place from its parent star. For the Earth this is of order ~10^17 Watts, when the reality is that today our power consumption for the present civilisation is around ~10^12 Watts or equivalent to an energy consumption of ~10^19 erg/second (where 1 erg is equal to 10^-7 J of energy).
A Type II civilisation has the capacity to harness the total energy of its parent star. The total power output of the Sun is around ~10^26 Watts or equivalent to ~10^33 erg/second. The proposed way by which this can be achieved is through a device known as a ‘Dyson-Stapledon sphere’, more on this below.
A Type III civilisation has the capacity to control energy on the scale of the entire galaxy. The total power output of the Milky Way, defined as its luminosity, is around ~10^37 Watts or equivalent to an energy consumption of around ~10^44 erg/second.
Further work by the American astronomer Carl Sagan in 1973 proposed a method of extrapolating and interpolating intermediate values, on the assumption that there was a Type 0 civilisation that would control around 1 MW of power. Using this scale, it is possible to show that human civilisation on Earth has an average world power consumption of around ~10^12 W, which means we have a Kardashev value of around 0.7. Many other versions of the Kardashev scale have now been proposed, but they all largely agree we are far from the masters of our own local energy sources as a young species.
The ability to engineer astrophysical sources, such as stars, is an interesting idea which we could equally expect a more advanced civilisation to have attempted. It is useful to briefly discuss some of the structures that could be engineered in the universe by those other species or by a future human kind.
Dyson-Stapledon Spheres: These objects were first suggested by the British philosopher Olaf Stapledon in his 1937 novel Star Maker. The idea was later picked up and refined as a thought experiment by the physicist Freeman Dyson in 1960 who reasoned that such a structure would be a result of the escalating energy needs of a technological civilisation. Such a sphere, or set of orbiting structures would completely encompass a star and capture all or the majority of its power output. It would be uniquely distinguished by an infra-red emission spectrum which would make such structures detectable to long distance observations.
One has to ask however, whether such an advanced civilisation with escalating energy needs would instead choose to occupy other star systems by interstellar diffusion, rather than huddling around the light of one lone object? More credible versions of this idea known as a Dyson Swarm consists of many large number of independent constructions orbiting in a dense formation around a star. Another variant is a Ring World, a hypothetical orbiting structure around a star, but rather than a complete sphere, it is instead a ring. The idea was popularised in a 1970 science fiction novel by Larry Niven.
Matrioska Brains: This is another type of hypothetical that is really an extension of the Dyson-Stapledon sphere, but instead of power output purely for energy conversion the output is used to drive massive computational capacity. The idea was conceived by Robert Bradbury and the concept takes its name from Russian Matrioshka dolls, since the analogy is adopted so that there are the equivalent of nested spheres within each other, each built around a star, and drawing all of its power output. The inner shell would have the temperature of the outer stellar atmosphere and the outer shell would be so cool as to be equivalent to the temperature of space. In theory, such a large computing architecture could be full artificial intelligence, or create full artificially simulated universes for people to exist in. The Matrioshka brain concept looks even more complicated that the Dyson-Stapledon sphere.
Shkadov Thruster: This is the term used to describe a type of megastructure which is able to use a stars radiation output to create usable energy, such as for the purpose of producing thrust and therefore actually accelerating the star through interstellar space, and any object orbiting it, in any direction. Several variants or classes of stellar engines have been proposed. It involves the use of a large mirror or light sail to balance gravitational attraction and radiation pressure outwards from the star, such that the net pressure of the star would be asymmetrical and the excess radiation in one direction would act as net thrust to move the star from its original position. Any planetary system that is in orbit around the star, would also be dragged through space, and so the entire Stellar System could in principle be moved. This author used a similar idea to a Shkadov thruster in a short science fiction story titled ‘The World Movers’ published in 2015, although the thrust generation was also originated from negative energy density gravitational fields.
All of the above megastructures are different types of Stellar Engines that could in theory be constructed by advanced extraterrestrial civilisations or by future human kind. This presents interesting observational opportunities, in looking for either ‘live’ stellar engines or ‘dead’ stellar engines, the remnants of a once forgotten civilisation.
There has been several postulated sightings of potential stellar engines by the Kepler Space Telescope. This includes the objects KIC 8462852 and EPIC 204278916, but the analysis is so far inconclusive. The former, known as Tabby’s Star is an F-type main sequence star located in the Cygnus constellation at a distance of around 1,276 Light Years. Astronomical studies of changes in the stars brightness could not be attributed to intrinsic variability and one of the hypothesis being proposed to explain the unusual blocking of the light emission is a stellar engine.
We do not yet know whether advanced extraterrestrial civilisations exist, let alone have built large megastructures, but certainly observational programs that seek such structures out, or eliminate their possibility, will add to our knowledge of life in the universe. It would seem that in our pursuit of enquiry as to the various manifestations of existence, our most powerful tool is that of the imagination, which enables us to see alternate futures that may or may not exist, and therefore help to direct our research programs. Indeed, this may be the most important service that the literature of science fiction has given left us as its legacy.
 M. J. Fogg, Engineering Planetary Environments, Society of Automotive Engineers, 1995.
 N. Kardashev, Transmission of Information by Extraterrestrial Civilizations, Soviet Astronomy, 8, 217, 1964.
 C. Sagan, Cosmic Connection: An Extraterestrial Perspective, 1973.
 O. Stapledon, Star Maker, 1937
 F. Dyson, Search for Artificial Stellar Sources of Infrared Radiation, Science, 131, 3434, pp.1667-1668, 1960.
 L. Niven, RingWorld, Ballantine Books, 1970.
 K. F. Long, The World Movers, Published in Visionary, A Science Fiction Anthology in the Spirit of the British Interplanetary Society, BIS Publication, 2013.