This is his description for the penalty conditions:
"if not enough luxury and slave owned for more than 7 days outside of jail:"
This is the line in code (Grateful is actually a condition for penalty, not a multiplier, but same effect):
if !person.traits.has("Grateful") && luxury < personluxury && person.metrics.ownership - person.metrics.jail > 7:
Penalty has a matching message in the end of day report. Zero or negative(effectively bonus) penalty has no message nor effect.