Here's the rules on how melee engagement works with buildings.
I'm posting these without the usual graphic/screenshot treatment because crap has suddenly started falling on me from different 3 directions today, and I don't want to leave everyone hanging for an update until I get it all sorted out.
Engaging Building Sections
During Melee, troops on the outside of a building do not directly engage those inside. Instead, they'll engage the section that those troops are within, via any openings that connect to it.
[3.4.7] Models outside of a building will be considered engaged with an occupied building section if, as viewed from above, they are in base contact with an opening attached to that section.
If that opening is located too high up on a wall though, then any attempt by troops outside to gain forced entry through it will be fruitless.
[3.4.8] No model may engage with a building opening whose wall height is greater than the width of that model's base.
Exactly how many models within a building section will be allowed to engage with those outside, depends on how many of the troops within are able to fight through each opening.
[3.4.9] The total number of models in a building section that may fight from an opening in melee is one, plus the number of model bases that can completely fit into the opening's width. If a section contains models with differing base sizes, only identically-based models may fight at the same opening.
Once you know how many models can fight at each opening, the player controlling that section must allocate models to each of them.
[3.4.10] Whether attacking or defending, the player controlling an engaged building section must allocate models from that section to each engaged opening for the duration of the current initiative round.
Engagement Within Buildings
Within buildings things are much simpler to work out. Put simply... Everyone attacks everyone!
[3.4.11] All models within a building section will be considered to be engaged against all enemy models in an adjacent section.
Engagement Against Buildings
Troops strong (or desperate) enough to take a swing at some masonry have it the easiest of all.
[3.4.12] Models in base contact with the outer walls of a building section may choose to engage against the building section itself instead of any other models or openings that they may be engaged with.
One thing that does occur to me is that there needs to be a clear-cut way of determining which section will be affected by the attacks of an outside model attacking the building itself. We can say 'confirm your intentions' during the movement phase, which is how Flames handles positioning disagreements. But it's inevitable that someone won't do that.