New Variables
The last thing Marcus Webb remembered was the notification on his phone.
He'd been walking home from the office — or what passed for an office, a lease on a WeWork desk he used twice a month out of some vague guilt about working from bed — when the number had popped up. He'd stopped on the sidewalk to do the mental math. Another eight months, maybe ten, and he could close the laptop permanently. Or at least stop taking contracts he didn't want.
He never heard the guy behind him.
Merge Conflict
Awareness arrived without ceremony.
No tunnel. No thunderclap. One moment there was nothing — not even the nothing of sleep, just a hard zero — and then there was everything at once, arriving in a heap.
A body. Low ceiling of rough-cut stone. The smell of mold and iron and something else, organic and close, that his new olfactory system filed immediately under good. His old one filed it under dried blood and he sat with that contradiction for a moment, blinking his new eyes in the dark.
The memories came the way a corrupted sync completes — in chunks, out of order, with pieces missing and other pieces duplicated. He let them arrive. He didn't fight the process. He'd learned years ago that you don't fight a merge, you just let it finish and then you read the diff carefully.
He read that last line twice.
Stand. Stand. Stand. Eat. Stand. Sleep.
That was it. That was the entire job description. Not summarized — complete. Grak had never, in what appeared to be eleven years of service, varied the sequence in any way that registered as worth remembering. No incident reports. No lateral thinking. Just the loop, worn smooth as river rock, running on autopilot while whatever passed for Grak's inner life did nothing. Idled. Waited for the next input.
Marcus sat with that for longer than he'd sat with the blood smell.
He tried to find more. There had to be more. Preferences, opinions, something — even a recurring daydream, a grudge carried for years, a joke he'd heard and liked. He dug through the memory stack carefully, the way you grep a large codebase looking for a specific function.
Grak had liked the smell of blood. Grak had been afraid of the Chancellor.
That was, as far as Marcus could determine, the complete interior life of a being that had existed for eleven years.
He felt something move. A faint pulse of want as his hand passed near the short sword at his hip — Grak's muscle memory firing, some association between standing watch and hand near weapon. It lasted half a second. He looked at his hand. The urge was already gone, dissipating like foam on concrete.
That was Grak. That was all that was left of him. A twitch.
Marcus looked at the sword. Then at the corridor beyond the doorway, where two other guards stood in the identical posture of men who had stopped thinking some time ago and not particularly noticed.
Oh, he thought. Oh no.
Duty Cycle
The loop, as it turned out, was non-negotiable.
Grak's shift began at the fourth bell and ended at the eighth. In between, he stood at the junction of Corridor 4 and the east stairwell, facing the wall opposite, moving only to eat and to relieve himself in a designated alcove that smelled exactly as you'd expect. No sitting. No leaning. No conversation during active duty except to challenge anyone who used the corridor without authorization — and authorization, Grak's memory supplied helpfully, meant obviously senior to you, which meant anyone who looked at you like you were furniture could walk through unchallenged.
Marcus stood at his post and did all of this correctly, because Grak's muscle memory did most of it for him and the remainder wasn't complicated. Stand here. Hold the spear like this. When someone walks past, perform the specific combination of not-quite-meeting-their-eyes and slight shoulder-drop that communicated I see you and have assessed you as not my problem. Grak had drilled it to reflex. Marcus wore it like a borrowed coat that almost fit.
The hard part wasn't the standing. The hard part was his mind.
It did not idle. It had never idled. Eight hours of standing in a corridor with nothing to optimize was the specific hell he'd been carefully avoiding since he was nineteen years old. He'd taken the freelance contracts for this reason. He'd arranged his entire life so that boredom was always, at minimum, optional.
He made it to the second hour before he started studying the other guards.
There were three of them in rotation on Corridor 4. The one directly across from him he'd mentally tagged Brix — not his actual name, which Grak either hadn't known or hadn't retained, but he had a thick brow ridge that reminded Marcus of a structural support and he needed something to call him. Brix stood with the particular stillness of a large animal that had learned stillness as a survival strategy and then forgotten there were other options. He had not, in two hours of observation, shifted his weight, scratched anything, or blinked at an unusual rate.
The one at the far end — taller, the secondary arms more developed, which Grak's memory suggested correlated with higher rank — Marcus had tagged Senior. Senior walked the corridor's length every twenty minutes with the mechanical regularity of a scheduled task. He did not vary the interval. He did not look at anything that wasn't directly in his path. He was executing a program and the program did not include subroutines for noticing things.
Marcus considered speaking to one of them for about an hour before Grak's memory talked him out of it.
Conversation during duty was technically unauthorized, but more relevantly it was weird. Guards did not make conversation. Guards stood. If you spoke to another guard unprompted, during duty, about anything other than a direct security concern, the most charitable interpretation was that you'd gone strange in the head, and in a culture organized around dominance displays, strange in the head was an opening, not a sympathy case.
He thought about it anyway. Tried to construct an approach. Something low-stakes. Something that read as normal.
He couldn't get there. Every angle he modeled ended with Brix staring at him with those flat, incurious eyes, and Marcus recalculating his position in the food chain downward. He needed to understand the social graph before he touched it. He had no data. He needed data.
He went back to standing. By the fourth hour he was watching how mana moved through the castle's walls.
Legacy Code
It started as something to do.
He couldn't actually work the magic while standing watch — not obviously, not in ways that would read as other than Grak standing watch. But the looking didn't require movement. Mana wasn't visible exactly; it was more that if you paid a certain kind of attention, you could feel it the way you feel a draft in a room, a slight directional pressure that most people had learned to ignore the same way they'd learned to ignore their own heartbeat.
Marcus paid attention.
The castle was full of it. Thick channels running through the load-bearing stone, thinner capillaries in the walls, pooling in the ceilings of rooms where many demons slept in close quarters. Some of it was moving with apparent purpose — the deliberate pulls of demons actively using magic somewhere in the structure. Most of it was just sitting there, inert, doing nothing in particular.
Wasted, he thought, which was less a moral judgment than a professional one.
The ambient mana was distributed the way a poorly managed memory heap gets distributed — big pools where they didn't need to be, dry patches where the load actually was, no evident optimization strategy, just the natural outcome of a system that had never been defragmented.
He traced one of the main channels back through the wall and found that it ran in a direct line between two structural pillars, which made sense, and then inexplicably bent forty degrees to route around a room that Grak's memory identified as a former storage chamber that had been demolished two hundred years ago. The channel was routing around a room that no longer existed.
He stared at that for a long time.
Nobody had updated the routing table.
The room was gone but the mana still flowed around where the room used to be because that's how it had always flowed, and nobody had ever asked why.
Eleven years of service. Grak had stood in this corridor and felt this mana and had never once thought to ask where it went.
The eighth bell saved him from whatever direction that thought was heading.
Off-Cycle
His quarters were a cell in the lower residential block, indistinguishable from twelve identical cells on either side except for the small authority of having been assigned to Grak rather than someone else. Stone walls. A straw mat that had been fresh approximately never. A bucket he tried not to think about.
He sat on the mat and examined Grak's possessions with the attention of an archaeologist working a shallow dig.
Short sword, standard issue. A whetstone, unused — the blade wasn't sharpened so much as it had been ground into its current shape by years of friction and institutional inertia. A clay bowl. A second tunic, worse than the first. A small carved figure that might have been a person or an animal or a structural support, it was hard to say, tucked into a crack in the wall at eye level when prone.
He looked at the figure for a while. He could not tell if it was art or if Grak had found it somewhere and put it there because it fit the crack. There was no memory attached to it. It had simply always been in the crack.
Eight months, he thought again. He had been eight months from closing the laptop. Then he got to work.
Read The Source
He started the way he always started with an unfamiliar system: he just read it.
Not the techniques. Grak knew the techniques the way a person who has only ever used a calculator knows multiplication — he could execute them reliably and had no idea what was actually happening. Marcus wasn't interested in the calculator. He wanted the arithmetic underneath.
Mana, it turned out, was structured. Not obviously — not in any way that the demonic magical tradition had apparently ever articulated — but the structure was there if you looked for it. Patterns in the way it moved. Consistent behaviors at the boundary between flow and stasis. What felt, to his existing conceptual vocabulary, uncomfortably like a type system.
He followed a single thread of mana from where it entered his body through the channels of the first technique Grak had ever learned — a basic force push, trained into him at age seven — and traced every step of what it actually did before it became the push.
There was a lot of steps. Too many steps. He counted the intermediate representations, the transformations that happened between input and output, the points where mana was converted into something else and then immediately converted back without any evident reason.
He found four of them in the force push alone. Four transformations that went nowhere, did nothing, consumed real mana to execute, and had presumably been baked into the technique by whoever invented it because they were working without the vocabulary to see that the intermediate steps were unnecessary.
He sat back. He thought about the mana channel routing around the demolished storage room. He thought about Brix, standing in the corridor, executing his loop.
This whole civilization is running on the first draft.
Nobody had ever refactored. Nobody had ever asked why. The techniques worked, after a fashion, so they were passed down intact, mistakes included, generation to generation, until the mistakes became tradition and the tradition became load-bearing and nobody remembered there had ever been a choice. He started rewriting the force push.
It took him three sessions, working in the off-hours between shifts, moving carefully, testing each change in isolation before committing it. He was not in a hurry. He had nowhere to be. He had a straw mat and a bucket and eight months he'd been planning to spend on a beach in Portugal that had apparently been reallocated without his consent.
DEMONIC TRADITION
OPTIMIZED FLOW
The optimized version used forty percent of the mana. It produced the same output. He tested it against the wall and left a mark the size of his fist. He sat with the numbers for a while. Then he turned to the fireball.
Code Audit
The fireball was Grak's most-drilled technique. Marcus had access to every repetition, the full accumulated muscle memory of eleven years of practice, and he spent a long time just reading it before he touched anything.
It was worse than the force push. Seven unnecessary intermediate steps. Two full mana conversions that canceled each other out and should have been removed before the technique ever left whoever's workbench had originally produced it. The routing was so inefficient that he initially assumed there must be a reason — some constraint he wasn't seeing — before accepting that no, it was just wrong.
He rebuilt it from first principles. Took what was left after he stripped the waste: the core logic, clean and actually quite elegant, whoever had invented the underlying approach had not been stupid, they'd just had bad tools and no one to review their work.
He ran it at minimum scale. A tiny thing, barely a candle flame in terms of intended output.
The wall disappeared.
Not the mark he'd made with the force push. Not a hole. The entire section of wall — roughly a meter wide and floor to ceiling — was simply gone. He was looking at the corridor. A pipe that had been running through the wall was now a pipe running through open air, dripping something dark and purposeful onto the stone floor.
Marcus looked at the corridor. The corridor looked back at him. A portion of it, specifically, in the shape of Brix, who had apparently been walking his rotation and was now standing in the gap where the wall used to be, covered in a fine gray particulate, staring at Marcus with an expression that was working through several stages of processing simultaneously.
Silence.
"Routine maintenance," Marcus said.
Unhandled Exception
The thing about Brix, Marcus was realizing, was that he was not actually stupid. He was incurious — those were different things — and the distinction was becoming relevant in real time because an incurious demon presented with a hole in the castle was not confused. He had already figured out what had happened and was now performing the social calculation of what you did about it.
Three more guards appeared in the corridor behind Brix. Then two more from the direction of the stairwell. They stood in the hole Marcus had made in the wall and they looked at him and he looked back at them and he understood, from Grak's memory, that he had just done something that had no precedent in eleven years of castle life, which meant there was no established protocol, which meant they were going to fall back on the only universal protocol available: establish hierarchy, establish blame, establish consequence.
He tried anyway.
"I was testing a technique," he said. "Standard magical maintenance. The wall showed signs of structural mana degradation so I cleared it." He paused. Grak's memory was unhelpful here — Grak had never spoken at length to anyone. "I'll rebuild it."
Brix said, "You don't do maintenance."
"I do now."
"Guards don't do maintenance."
"Grak doesn't do maintenance," Marcus corrected, which was technically accurate and also, he could see in Brix's expression, the wrong thing to say.
The guards looked at each other. One of them — smaller, faster-looking — was already leaving. Going somewhere with a purpose. Marcus watched him go and ran the obvious inference.
He's reporting this.
He should probably do something about that. He ran through his options. He could follow. He could call after him. He could—
He looked at the hole in the wall. At the pipe still dripping. At the five remaining guards in various states of waiting for someone else to take the social initiative.
He looked at his hand. The fireball was still theoretically loaded, in the way that a function call was loaded — ready to execute, awaiting an argument.
One wall by accident. He closed his hand. "I'll rebuild it," he said again, to no one in particular.
Nobody responded. They stood there in the way of people who have been tasked by circumstance with watching something they don't have the framework to process, and Marcus sat down on what remained of his floor space, and there was a long and deeply uncomfortable silence during which he thought very hard about whether eight months had really been a realistic estimate or if he'd been optimistic about the Portugal timeline.
He had probably been optimistic.
Runtime Interruption
He heard them before the alarm.
Not the alarm — the alarm came later, the deep resonant bell from the upper tier. Before the alarm there was the sound, traveling down through the stone, of something going wrong in a way that was structurally distinct from the castle's usual ambient wrongness.
The guards in the corridor heard it too. He watched the social calculus shift in real time — the hole in the wall suddenly competing with that sound for priority allocation, and that sound winning, because it was current and the hole in the wall wasn't going anywhere.
Brix left. The others left. In under thirty seconds Marcus was alone in his cell, or what remained of it, the corridor open on one side and the sounds from above becoming more specific, more individual — shouts, the crackle of magic being discharged at scale, the particular impact noise of a large stone object falling down a stairwell.
He sat still for a moment and thought about what to do. Grak's instinct — the twitch of it, fainter every day — said get to your post, stand at your post, wait for instruction. It was a reflex built for exactly this scenario, and it was useless for exactly this scenario.
You did your best, he thought at whatever remained of Grak. With what you had. Then he put the instinct down and went to see what was happening.
The upper corridor was chaos in the specific form that chaos takes when a small number of highly capable actors enter a system optimized for low-capability compliance.
There were four of them. He got that much from the doorway before a fireball — the old kind, the slow kind, the O(n²) inefficient kind — took out a section of banister six feet to his left. Four humans, armed, moving with the coordinated ease of people who had done this many times in many castles, and around them the castle's defenders doing what the castle's defenders apparently did in an emergency.
It wasn't working. He could see why immediately. The guards were executing their combat protocols the same way they executed everything — by rote, without adaptation. The humans were reading the guards better than the guards were reading the humans. They had a tank — a large one, shield and hammer — and behind him a woman with a sword who was not going where the guards expected her to go, ever, specifically. She moved in the gap between where the protocol predicted target and where target actually was.
Marcus watched her for approximately four seconds and identified her as the most dangerous person in the corridor. He also identified the moment everything was about to get significantly worse.
One of the senior mages was building something large. Not a fireball. Something sustained, something that required that much buildup because it was meant to end the engagement decisively: overwhelming force, applied without precision, to everything in the area. Including, incidentally, the corridor Marcus was standing in.
Of course, he thought.
He had maybe fifteen seconds. He thought about Portugal. He thought about the hole in his wall. He thought about the small carved figure in the crack that might have been a person or an animal or nothing at all, and Grak's eleven years of standing watch, and the mana routing around a room that had been gone for two centuries.
Then he built a shield, quickly, using the new architecture, and it went up exactly where it needed to be and cost him almost nothing.
The mage's spell hit it and stopped.
Silence fell in the corridor. The humans looked at the shield. The guards looked at the shield. Everyone looked at Marcus. "Hi," he said.
Nobody moved. He looked at the four humans, doing a fast read: combat-ready, not currently attacking, confused. He looked at the guards, doing a fast read: also confused, also not currently attacking, watching him with the specific expression of people who are recalculating where to put a significant amount of blame.
Above, the mage was building something again. Marcus sighed.
"I'm going to talk to the humans," he said to the guards, in Grak's voice. "While I do that, someone should tell whoever is upstairs to stop doing that, because the next time I'll let it through and I won't be responsible for the ceiling."
He turned to the humans. The woman with the sword had not lowered it. "You speak our language," she said. It wasn't a question. It was the beginning of a threat assessment.
"Apparently." He hadn't thought about that. "I'm not going to fight you."
"You're a demon guard."
"I'm currently a demon guard. It's a transitional role." He looked at her sword. "Can you put that down."
"Can you put that down," she said, and he realized she was looking at his hand, where the new fireball was still technically loaded.
He looked at his hand. He closed it. "We're both putting things down," he said. "At the same time. So neither of us feels like we lost."
A long moment. The woman looked at him for a long time with the expression of someone running a calculation that didn't have a clean solution. She lowered the sword. "Okay," she said. "Talk."