Just want to be a bit more specific so it's easier to implement:
Swagger is supposed to fail/miss if the opponent is at 999 attack or +6 attack boosts.
Stat boosting moves should not add boosts after the 999 cap is reached or when the boost is already maxed out. This means Snorlax with Curse cannot boost to +6 attack, only +5. It can however boost to +6 defense. Vaporeon can only boost to +5 with Growth, and additional Growths will not raise the stat similar to how it would at +6 for other mons. This is different from simply capping the stat at 999, which is implemented. Snorlax commonly is the target of Growl and Charm, so whether or not it's at +5 or +6 is relevant, since after a Charm it should be at +3 instead of +4. This is also very relevant for Curse on Curse Pokemon as whether or not critical hits ignore stat boosts is based entirely on who has the higher stat boost; this is implemented correctly on PS already, assuming the stat boosts are correct (which they are not).
This does not affect how many stat boosts you can Baton Pass to a Pokemon. If the Baton Passed stat boosts surpass the 999 cap, then the Pokemon will still have the same number of stat boosts as the passer, the stat will simply be capped before being used for anything.
When determining if the 999 cap is met, Thick Club, Screens, Burn and so on are not supposed to be taken into account. The only factors used in determining if the 999 cap has been met are the stat+stat boosts, nothing else. This means Marowak with Thick Club can Swords Dance twice, even if it's pointless.
Belly Drum is a bit weird. Drumming essentially applies a +2 boost until either the user reaches 999 attack or +6. This is why Snorlax reaches +6 on even numbers, but +5 on odd numbers of initial boosts. I'm fairly certain Pokemon with a higher base attack could end up having +4/+5 instead of +5/+6 if it were to use Belly Drum. In the game's code I believe it applies Swords Dance multiple times, so I think Swords Dancing might also only check for the cap before boosting, i.e. check if it can boost -> boost twice regardless of where the first +1 puts you.
edit: srs tho if you need more clarification on something hmu on discord