What were you just doing when I rang the doorbell
- once off event happened by me
I had been in the library reading a book
What have you just been doing as I was washing the dishes?
Continuous event in progress by me
Answer: I have just been sweeping the floor
I don't know the rules about this but I suspect the first one is incorrect. One can say "what have you been doing" - this implies an extended activity over time in the past. But when you toss in the "just", you create a contradiction since you are focusing on what has happened in the immediate past (i.e. a moment or two ago). And this clashes with the implication of an extended time period as generated by the "have you been doing" construct. Just a guess.
I don't think either reflects a natural use of 'just'. I would expect to hear 'just' in the answer to the question 'what were you doing when ... ?'
The use of 'just' would mean ostensibly 'nothing important'. Of course with a detailed context it might have other meanings.