My understanding is that Longstreet had advised Lee to take up a defensive position and let the Union beat its own brains out assaulting their position, similar to Fredericksburg, but Lee wanted to assume the offensive.
Which is exactly why he invaded the North.
Apparently the existence of new fangled computer tools makes analysts incapable of understanding that large bodies of troops in 19th Century military operations created huge clouds of dust while on the march.
I think Lee had very long supply lines which were vunerable and he didn’t have time on his side. Thus going offensive was a good option before the Yanks started to hit his long supply tail.
OTOH, he should have know that before he wandered in Pennsylvania.
Everytime Lee went into Yankee territory he got hit hard. Maybe offensive action in enemy territory was his weak point?
One of the problems was that Lee needed to keep his forces between the AotP and Cashtown Gap, while Meade needed to keep the AotP between the AoNV and Washington.
I’d also suggest that on the second day Lee thought that the Emmitburg Pike ran parallel in front of Cemetary Ridge rather than diverging as it did at an angle. Lees original orders to Longstreet were to anchor his left flank on the Pike, piviot to the North and crash into and roll up the Union left flank.
Had he done this Longstreet would have been enfiladed (sp?) by the AotP’s 2nd and 3rd Corps, which were further East. Except that Sickles had a flashback to Chancellorsville and decided to move forwar and take the Peach Orchard.
At that point it pretty much became a melée.
And yes, Stuart dropped the ball.