Anais Hendricks is the 15-year-old protagonist in Jenni Fagan's debut novel.

Anais is not the only name she has had, but it is the one she currently goes by. It was given to her by her prostitute foster mother and reinforces her dream of living in Paris where, like Anais Nin, she would adopt a bohemian lifestyle.

In the meantime, Anais is stuck with the life that she has, and what a life it is. She has already accounted for 38 social workers and numerous foster parents, been in and out of care homes, and engaged in running battles with the local police. Issues with the law have escalated to the point where Anais is accused of putting a policewoman in a coma. As a result, she is being moved to a model facility called The Panopticon, the fulfilment of Jeremy Bentham's 18th-century idea of a prison centred on an observation tower to enable perpetual surveillance by hidden authority.

There is not much doubt about where The Panopticon is located. It has a minibus parked outside with "Midlothian Social Work Department" written on it. And Anais clearly isn't French. She speaks a form of English liberally punctuated with "willnaes", "shouldnaes" and "urnays" and she swears like a trooper.

Anais has no family and is too old for adoption, but she has a close literary cousin in Mark Renton. Expletive-laden outbursts are interwoven with meditations on the nature of the universe and references to the Pre-Raphaelites and Frida Kahlo. She also shares the Trainspotting anti-hero's attraction to retro-music: Lou Reed for him; Nirvana, Joy Division and a bar or two of Bob Dylan for her. She differs from Renton though in her occasional unleashing of the voice of the Guardian reader, demanding vegetarian options or lecturing the "Eskimo" for hunting whales and seals.

Ethical sustainability issues apart, it's not long before we realise we're in for some good old-fashioned Scottish grunge literature and start to speculate on how far down Anais will take us. The answer is very far down. Her world is populated by "paedos", drug addicts, rapists, pornographers and users of every description. Her skill with rhetorical black humour is diverting but not really that much comfort. An intervention by Alexander McCall Smith declaring it all "a travesty of Scotland" would come as no surprise.

If The Panopticon is a somewhat derivative modern-historical novel, however, it's still a good one. Foucault called Bentham's surveillance tower "permanent in its effects, even if it is discontinuous in its action". In other words, the idea of being watched is more important than whether or not anyone is watching. Fagan uses this conceit to build explosive pressures inside a character who would have had trouble coping even without it.

Imagined watchers feed Anais's notion that she is an experiment on a continuum from Petri dish conception. The panoptic tower seems to be still under construction so there may not be any human watchers. If there are, they should (along with the regular staff) be tabloid-slain for a gross lack of vigilance. The children in the facility are able to access drugs, wander as they please and freely abuse the only inmate who is not part of their impromptu family.

Some suspension of disbelief is required, but Fagan's writing is taut and controlled and the dialogue crackles. Female author/female protagonist is a departure from the big boys of 1990s grunge, though the promise of fresh perspective is tempered a bit by the unveiling of Anais's heart of gold. She reserves it for animals and the few people in her orbit who are not hypocrites, but there is a hint of gender stereotyping or the circumventing of harder conclusions.

Published on the back of the prequel to Trainspotting, perhaps The Panopticon will be part of a new wave of Scottish misery for the e-book generation. If so, best of luck to it. Good writing is good writing. However, that will do little to stem the belief among some young Scottish writers that publishers, big London-based ones in particular, still want their Caledonian novels to read a certain way.