Base code and rules for triplets project