6 min read

Special Bylaw Unit: The Week Witnesses Became Characters

Special Bylaw Unit: The Week Witnesses Became Characters

One of the things that happens when you build an AI-driven courtroom game is that you spend a lot of time asking yourself: does this feel like a real trial, or does it feel like a chatbot wearing a powdered wig? This week, Special Bylaw Unit crossed a threshold — and I didn't see it coming until I was already in the middle of it.

Last week was about jury selection polish and the daily docket flow. This week? This week was about witnesses. Thirty-two commits across seven straight days, and when I look back at what actually changed, there's a clear arc: the game stopped treating witnesses like information dispensers and started treating them like people.

Witnesses With Something to Hide

The shift started quietly on Sunday with a single commit: "Exclude witness secret from LLM prompts until witness has broken." I'd been wrestling with a problem — witnesses felt flat because the AI knew all their secrets from the moment they took the stand. There was no arc. No moment where the mask slipped.

The fix was deceptively simple: the LLM doesn't get access to a witness's secret until they've actually broken on cross-examination. Until then, they're just a character with an occupation and a bias, saying what they'd naturally say. But once they crack? That secret floods into the prompt and suddenly they're a completely different person — defensive, evasive, caught. It's the difference between reading about a character and watching one unravel in real time.

That same day, I also enforced direct first-person dialogue across the board. No more "The witness states that they saw the defendant near the scene." Now witnesses speak for themselves: "I saw him. I know what I saw." It sounds small, but it's the difference between testimony and narration.

The Player Gets a Name

Midweek brought a commit that's been a long time coming: "Name player character defense lawyer Todd Foxwell across frontend and backend."

I've been calling him "the player" or "defense counsel" since July, and it was starting to feel weirdly impersonal for a game that's otherwise bursting with personality. Todd Foxwell. He's a fox (obviously), he's a defense attorney, and now when a witness addresses you as "Mr. Foxwell" in a tense cross-examination, it lands differently than a generic title. The witnesses also got the same treatment — they're now addressed formally as Mr. or Ms. LastName, not "Witness" or by first name. The courtroom has decorum now.

The Wednesday Grind

October 7th was one of those days where you sit down to fix one thing and seven hours later you've shipped seven commits and your coffee's been cold since 10 AM.

I'd noticed that witness composure — the visual indicator showing how rattled a witness is — wasn't updating correctly during examination. That was the first fix. Then I realized the juror bias modal styling didn't match the occupation font. Then I thought: why can't players inspect individual jurors by tapping on the lean bar segments? So I built that. Then the question option font was too big for longer prompts, so I shrunk it. Then I switched defense cross-examination key facts from a sequential model to randomized selection — small change, big impact on replayability. Then I split prosecution witness answers into two lines with one key fact each, because players were missing the second point when it got buried in a single block. Then — and this one had been bugging me for days — I fixed a case where a witness's answer was getting completely omitted when a prosecution objection was overruled.

Seven commits. One day. This is the part of game development that doesn't look glamorous from the outside — no new features, no splashy reveals — but it's where the game actually gets good. The difference between "this is clever" and "I can't put this down" lives in these edges.

The Week's Second Half: Headshots, Strategy, and Confidence

The back half of the week split into two threads that say something about where the game is maturity-wise.

First, headshot standardization. Every animal juror in SBU has a headshot — hippos, penguins, elephants, foxes — and they'd been added piecemeal over the past couple months at inconsistent sizes. Thursday and Friday were spent standardizing everything: a tier-based system where large animals get 590px crops, medium get 495px, small get 400px, all padded to a uniform 471×590 canvas with a 5px crop buffer. It's the kind of work that's invisible when done right and screamingly obvious when it's wrong. The juror seat coordinates had to be synchronized across every jury view to match, and I ended up removing the jury close-up view from witness screens entirely — it was cluttering the examination flow and the new standardized layout didn't need it.

Second, and more telling: I removed the LLM fallback mock generation. For months, when the AI model failed to generate a question or a witness response, the game would quietly substitute a generic fallback so the player never saw an error. On Thursday, that safety net came out. "Remove LLM fallback mock generation and raise explicit errors." It sounds counterintuitive — why make the game more fragile? — but it's actually a confidence play. The generation pipeline is solid enough now that failures are genuinely rare, and when they do happen, I want to know about them immediately instead of papering over them with placeholder text. That's what "production-ready" actually looks like: trusting your systems enough to let them fail loudly.

The same day brought a timezone fix for daily docket and case generation (the game now runs on Pacific time, which matters when you've got midnight case resets), a database reset utility for testing, and parallelized examination question generation targeting guilty-leaning jurors — meaning the AI now focuses its cross-examination fire on the jurors most likely to convict, which makes every case feel strategically different.

What This Week Means

SBU is seventy-two commits old now. It started in late July as a proof of concept — could you build a courtroom game where every witness, every juror, every line of testimony is generated fresh by an LLM? The answer turned out to be yes, but "yes" and "good" are different questions.

This week felt like the transition from the first answer to the second. The witnesses aren't just generated — they're characters with secrets they'll fight to protect. The player has a name and a formal role in the world. The UI has the kind of obsessive polish that players might not consciously notice but will absolutely feel. And the backend is confident enough to fail loudly.

I'm not sure what next week holds — possibly more headshot work (there are a lot of animals), possibly diving into the closing arguments flow which got some attention this week but still needs love. What I do know is that every time I sit down with SBU now, it feels less like I'm building a system and more like I'm directing a courtroom drama. And that's exactly where I wanted to be.

Have a good week, y'all.

— Chad