Briefing.
1. AI doesn't know how to use 'Fortify' option.
2. Current mechanic is a bit obscure even for human players.
3. Most of us don't want to lose the fortify bonus. How it is achieved is less important.
4. Siege units with siege promotions do extra damage against fortified units.
5. Does AI at least know how to hold a position? If this is the case then, does AI know not to attack to avoid losing fortified status?
To please everyone.
1. Remove 'Fortify' option. Change 'sleep' name for 'Hold position'. It leaves, 'Do nothing', 'Alert' and 'Hold position'. The chosen option will not affect whether the unit gets a fortify bonus.
2. Let units that can fortify get the bonus when the unit has not moved in the last turn. In case AI does not know not to attack, this would apply for units that have not moved from their tiles, even if they attacked.
3. Forget about double defense in forts. Forts already give a terrain bonus, and more than one turn fortifying it's not a simple mechanic in my book.
4. Fortify bonus only applies at defense, so there should be a tooltip somewhere saying 'this unit will fortify for next turn since it has not moved', for units that can fortify.
EDIT
5. Units will lose fortified status only when they abandon the 'fortified' tile. Attacking will have no effect as long as the unit doesn't abandon the tile.