概要
This skill provides specialized guidance for implementing aggregation patterns in PolicyEngine, focusing on the efficient summing of variables across different entities like households, tax units, and individuals. It helps developers choose between the declarative 'adds' attribute for simple sums and the 'add()' function for complex logic involving conditions or mathematical clips. By automating entity hierarchy traversal, it ensures consistency, improves code readability, and prevents common anti-patterns in tax-benefit model development.