The hardcoded workings of ghosts(Always occur if not memorialized, specific condition gives specific personality) seems totally out of place, ghosts could do with a rework.
I think that whether a ghost is existent or not should depend on whether the aspiration of the ghost is currently satisfied.
The aspiration of a dwarf should be rechecked when they die, allowing malevolent aspirations (Highly dependent on the happiness of the dwarf in life), and a higher chance of there being no aspiration.
If it doesn't look like they're getting a grave, that's checked for too, taking personality into account (Highest weight would probably be tradition).
Aspirations are rechecked if something pertaining to the ghost happens, for example a loss of their memorial.
Also, multiple aspirations should be allowed:
So if an especially violent and unforgiving ghost has something against several dwarves and then gets eaten by an Elf (All the stoneworkers are busy, no memorial for you), their aspiration list could look like:
1. Haunt Urist Mcnotsobadbutnotsogood (Topple a few things around them or something)
2. Maim Urist Ihatethisguy
3. Traumatize the Elf that killed me. (KILL HIS FAMILY HAHAHA)
4. Hell, kill them too.
5. And their entire civilization.
6. A masterwork of my own creation would be nice for the job. (They might have had this one unsatisfied in life, and gotten it again due to personality traits)
7. Oh, yeah, and I want to be memorialized. (Float by the gravestones with puppy eyes)
8. Hey, I almost forgot about the Hammerer. I want to drive him to suicide.
9. And I want to meet my wife one last time.
Obviously it's pretty much impossible to do all of these, 5 in particular.
And it'd be hilarious but ridiculous if there were a hundred ghosts from a range of centuries all ripping apart elves.
So, ghosts should be able to tire(Speed of tire depending on perserverance and the number of aspirations) of an aspiration while attempting it without success, automatically halting the job and moving onto another; or forget the aspiration if they're really tired of the aspiration.
There could be aspirations where tiring only occurs if the ghost has little acknowledgement (of the kind they like, depends on their intent) from other dwarves, such as the aspiration to help (Doing any job that the skill for exists) or bother everyone.
Why did I make this whole thread about something as minor as ghosts?
Because it'd be hilarious if you melted a masterwork copper sword and found your furnace operator dead the next day.
Or a very mistreated dwarf died, and brought chaos to your fort.
Maybe even a legendary miner leaving their body behind when they get up for work.