I think it would be straightforward to write a program that monitors/records whatever applications have focus. I am only familiar with OS X, though. Using the accessibility APIs you can get the focused window and register for focus change notifications.
Of course there is a bit more in parsing the data you gather and creating reports/doing whatever, but the monitoring part should be easy enough.
>Hence the major effect of the Panopticon: to induce in the inmate a state of conscious and permanent visibility that assures the automatic functioning of power. So to arrange things that the surveillance is permanent in its effects, even if it is discontinuous in its action; that the perfection of power should tend to render its actual exercise unnecessary; that this architectural apparatus should be a machine for creating and sustaining a power relation independent of the person who exercises it; in short, that the inmates should be caught up in a power situation of which they are themselves the bearers. To achieve this, it is at once too much and too little that the prisoner should be constantly observed by an inspector: too little, for what matters is that he knows himself to be observed; too much, because he has no need in fact of being so.
Michel Foucault on Bentham's Panopticon Prison design, which utilized a ring of cells around a central guard tower.
I am using RescueTime because i want to track on all my computing devices, but there are a few alternatives that runs locally. I recently came across this one: http://timingapp.com/ Haven't tried it tho.
Of course there is a bit more in parsing the data you gather and creating reports/doing whatever, but the monitoring part should be easy enough.