  In the microscopic regime, we consider a stroke-based heat engine that
utilizes the temperature difference between two heat baths to produce work
using a working body. The working body of the engine aims to extract heat from
the hot heat bath, generate work, and discharge the surplus heat into the cold
heat bath through the successive execution of three strokes. We discuss the
thermodynamic framework for such an engine that involves any
arbitrary-dimensional working body. Next, our investigation focuses on the
smallest version of this engine, which involves a two-level working body,
resulting in a closed expression for optimal work production and efficiency.
Furthermore, we investigate the possibility of realizing such an engine within
the Jaynes-Cummings model, gaining insights into optimal work production and
efficiency. Finally, we scale down the engine, taking into account
finite-dimensional heat baths, and obtain the expressions for optimal work and
efficiency in this scenario.
