This paper formalizes selection on a quantitative trait affecting the evolution of behavior rules through which individuals act and react with their surroundings. Combining Hamilton's marginal rule for selection on scalar traits and concepts from optimal control theory, a necessary first-order conditions for the evolutionary stability of the trait in group-structured population are derived. The model, which is of intermediate level of complexity, fills a gap between the formalization of selection on evolving traits that are directly conceived as actions (no phenotypic plasticity) and selection on evolving traits that are conceived as strategies or function valued actions (complete phenotypic plasticity). By conceptualizing individuals as open deterministic dynamical systems expressing incomplete phenotypic plasticity, the model captures selection on a large class of phenotypic expression mechanisms, including the evolution of learning and preferences under life-history trade-offs. As an illustration of the results, a first-order condition for the evolutionary stability of behavior response rules from the social evolution literature is re-derived, strenghthened, and generalized. All results of the paper also generalize directly to selection on mutildimenstional quantitative traits affecting behavior rule evolution, thereby covering neural and gene network evolution.