Writing a novel is a process of discovery. It can be intensely frustrating as you try to make headway through landscapes that are, at first, little more than shadows in fog, but it's also intensely rewarding, and full of unexpected surprises, as the world gains shape and focus and internal coherence, and the characters begin to take control of their lives.
When I wrote the last sentence of the Confluence trilogy, I knew far more about its hero, Yama, than when I had begun. After all, we'd walked a long way together, sometimes down paths that had been previously mapped out, sometimes along unplanned diversions and into unknown territory. He's an orphan who wants to escape the petty clerkship his adopted father expects him to take up; wants to find his real family and where he came from; wants to become a hero without any clear idea of the cost. And he does become the hero of his story, as he was always intended to be, but he is not its only hero.
A little more than halfway through the first book, he encounters Pandaras, a pot boy in an inn who warns him of a plot against his life, and helps him escape. Beyond a few lessons in the iniquity and history of the city in which Yama had lost himself, that was about all the use I had for this minor character. But Pandaras had other ideas. He appointed himself Yama's squire, followed him through the gates of the Memory of the Palace of the People, the administrative heart of the great bureaucracy that rules the world, and accompanied him on a voyage down the length of the world's great river. By the third book, Yama and Pandaras have become separated, and the narrative alternates between them as Pandaras searches for his master, and finds him, and loses him again.
None of this was planned from the outset. But just as Pandaras made himself indispensable to Yama, drawing on the skills learned from various relatives in various trades (unlike Yama, he has an extensive family), so he also made himself indispensable to the narrative. Yama is not a high-born hero. He does not serve the masters of his world. He doesn't even want to become one of its masters. He is instead a hero of the ordinary people of the world, the hoi polloi of which Pandaras is an exemplar.* The people who are, as he puts it, the strength of the city.
Yama is a hero to Pandaras, and by serving him Pandaras also becomes a hero: he endures and must overcome his own hardships and perils, and suffers his own grievous wounds. He was the character I'd been looking for without knowing it, until he turned to Yama in that candlelit room in the inn, in his clean, much darned shirt and a pair of breeches, small and unremarkable, and warned him that he was in trouble, and advised him how to get out of it. In novels, as in life, we should always pay attention to people like him.
(*He's also, a point I forgot to make before posting this, a counterpoint to Yama's predestined exceptionalism.)