Microscopic phase-field chemomechanics (MPFCM) is employed in the current work to model solute segregation, dislocation-solute interaction, spinodal decomposition, and precipitate formation, at straight dislocations and configurations of these in a model binary solid alloy. In particular, (i) a single static edge dipole, (ii) arrays of static dipoles forming low-angle tilt (edge) and twist (screw) grain boundaries, as well as at (iii) a moving (gliding) edge dipole, are considered. In the first part of the work, MPFCM is formulated for such an alloy. Central here is the MPFCM model for the alloy free energy, which includes chemical, dislocation, and lattice (elastic), contributions. The solute concentration-dependence of the latter due to solute lattice misfit results in a strong elastic influence on the binodal (i.e., coexistence) and spinodal behavior of the alloy. In addition, MPFCM-based modeling of energy storage couples the thermodynamic forces driving (Cottrell and Suzuki) solute segregation, precipitate formation and dislocation glide. As implied by the simulation results for edge dislocation dipoles and their configurations, there is a competition between (i) Cottrell segregation to dislocations resulting in a uniform solute distribution along the line, and (ii) destabilization of this distribution due to low-dimensional spinodal decomposition when the segregated solute content at the line exceeds the spinodal value locally, i.e., at and along the dislocation line. Due to the completely different stress field of the screw dislocation configuration in the twist boundary, the segregated solute distribution is immediately unstable and decomposes into precipitates from the start.