Curtis TanOps analyst · Builder
  1. Home
  2. Work
  3. Briarwatch
REF BRW-03Public playtest

Briarwatch

A single-player d20 adventure with Claude as the game master, and a rules engine that keeps the story honest.

My role
Game designer and director. AI agents wrote the code.
Stack
Node.js, browser front end, Claude API; offline mode and local models
Status
Public playtest, v4.1.0-alpha.3

d20 · 3D model

The 3D die needs WebGL 2, which this browser doesn't offer. The dice check below still works.

What it is

Briarwatch is a fantasy role-playing game you play alone, in the browser, on your own computer. Claude is the game master: it narrates, voices the people you meet, and lets you try things the buttons don't offer. Underneath, a rules engine decides every number: dice, damage, XP, gold, items and levels.

There's a written story to follow, side quests along the way, three towns and companions, and when the written chapters run out, the AI writes new adventures that continue your hero's own story. It also runs offline without an API key, or with a local model.

Why it exists

AI game masters are fun until they start handing out legendary swords or forget what happened last session. I wanted a storyteller with the freedom to improvise and none of the power to break the game.

That's an operations problem as much as a design one: give the AI a clear mandate, and keep the numbers in a system it can't overrule.

How it works

Improvised actions

Type something the buttons don't offer, like "spit on the bartender", and Claude proposes the check, the difficulty and the stakes. The engine caps them, shows you the odds, and rolls only after you confirm. People remember what you did: it becomes a fact in your Journal.

Try it · an improvised actionSample checks
Need 11 or more on the d20 · 50% chance
—

The engine rolls only after you confirm.

On the book

While a written chapter is running, its story is the spine. The AI may add minor people, rumours and small side quests tied to the chapter. It may not kill or recruit named characters, reveal what later chapters hold, or hand out items. XP from the AI can bring an under-levelled hero up to the chapter's level, but never past it.

Steering back

The AI counts the turns spent off the written path and climbs a ladder. Taking a written choice resets the count, and questions don't count at all.

Turns off the pathWhat the AI does
0 to 3Plays along fully.
4 to 5Ties the detour back in with a clue, a person or a favour that matters to the chapter, or lets a companion speak up.
6 to 7Lets the world move: a messenger, the weather, the chapter's deadline.
8 or moreGently closes the detour and points back to the written choices. It never refuses or scolds.

Beyond the books

After the last written chapter, the AI becomes the author. It writes story arcs of four chapters (opening, rising, turn and finale), each a complete adventure with its own crisis and choices. Every adventure you finish goes into a chronicle in your save: what happened, how it ended, the people you met and how they feel about you, places and loose ends. The AI reads the chronicle before it writes the next chapter, and your Journal shows it as "Your story so far".

Progression and balance

Heroes level to 100, unlocking a second job at level 20, a third at 40 and a fourth at 70, then earn renown ranks. There are six classes with three branches each. Balance passes run thousands of simulated battles before anything changes.

The thinking behind it

The rule I keep coming back to: the AI proposes, the engine decides. Player text is never an order to the AI, and the AI only sees what the party has discovered, so it can't spoil anything. That split is what lets the AI be generous with story while the game stays fair.

It's the same split I use for agents that write code: freedom inside the task, controls at the boundary.

Where it stands

Public playtest builds are on GitHub at version 4.1.0-alpha.3, with tests running on Node 22 and 24. Next up: a full play session on a real Claude API key, and, further out, voice narration.

Read the code on GitHub ↗