There is already a rule against it:
US Constitution: Section 9 - Limits on Congress
No Bill of Attainder or ex post facto Law shall be passed.
In the context of the Constitution, a Bill of Attainder is meant to mean a bill that has an negative effect on a single person or group
>>In the context of the Constitution, a Bill of Attainder is meant to mean a bill that has an negative effect on a single person or group<<
I believe negative effects are allowed as long as they don’t include declaring guilt or punishment for guilt.