A General Approach to Environment Design with One Agent