Yes it has to be free. I should have been clearer in my instruction and perhaps design, the foritifications are there to hold the necromancer still in the 1x1 elevated pit. Chained creatures cannot engage in combat with their holders (they can fight other entities close enough on chains though if memory is correct) so they wont aggro. Aggrovation is nessecary for necromancy
You can deposit the necromancer in that room using a pit hatch above the fortifications (on the left hand side of the diagram), if you want to reclaim him later, build a retracting floor onto a little room below with a cage trap directly underneath so he'll fall into it. The dwarves that are meant to be patrolling (on the bigger right hand side) are melee militia patrolling the room, obviously they have to be reasonably close to the fortifications because unlike a GCS silk farm its at the edge of aggro range and in a line of sight of the zombies, there needs to be no conventional pathway to the target and the access to the zombie room needs to be forbidden until they are all caught in pre-prepared cage traps (could use a bridge) to stop militia men running in and forcing combat/zombie overflow.
You could also use a statue in front of the necromancer to block them with certainty the necromancer can't squeeze through the fortification, keeping in mind that it might be a building destroyer target, creating a risk that the necromancer could get loose if its not looked after properly.
What i mean by giant cave spider farm is that a wild non chained cave giant spider becomes aggrovated at soldiers behind a bridge and afortification at the opposite side of a room where it's being kept, it'll shoot out its web at them . Infuriated but unable to move, it shoots its webs out at the soldiers, and the bridge is raised and lowered to give both the soldiers and the spider some rest while silk collectors work through what was spun. (giant cave spider silk is very valuable, and GCS spit out lots of it, though it can be obnoxious to have the spider spitting and the soldiers spamming *unable to reach target all the time, so lowering the bridge is recommended)
Here is the wiki provided diagram of the basic original setup of a spider farm
╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗
║ + + + + + + + + + ║
║ + + + + + + + + + ╠ ═ ╗
║ + + + + + + + + + ┼ + ║
┼ + + + + + + + + ╥ ║ ^ ║
║ + + + + + + + + ║ ╬ ┼ ╣
║ + + + + + + + + ║ ╬ S ║
║ + + + + + + + + ║ ╬ ═ ╝
┼ + + + + + + + + ╨ ║
║ + + + + + + + + + ║
║ + + + + + + + + + ║
║ + + + + + + + + + ║
╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝
If you are familiar with ascii graphics, then you can probably distinguish that the spider is kept in a forbidden - pet 1 door access room with a cage trap on the opposite side. Though im uncertain whether necromancers can lock pick, that design could work too if you dont like the idea of pitting the necromancer into a room directly from above. The bridge covers directly infront and the sides of the 1x1 room.
You can release creatures via placing a cage attached to a lever, which will cause the creatures inside to pop out, which is also handy if you need to reset.
There are more precised details of a giant cave spider silk farm on the wiki
DFWIKI - Silk farm