We describe a method for programming the autonomous navigation of active colloidal particles in response to spatial gradients in a scalar stimulus. Functional behaviors such as positive or negative chemotaxis are encoded in the particle shape, which responds to the local stimulus and directs self-propelled particle motions. We demonstrate this approach using a physical model of stimuli-responsive clusters of self-phoretic spheres. We show how multiple autonomous behaviors can be achieved by designing the particle geometry and its stimulus response.