Nations agree on rules for implementing Paris climate agreement