Skip to main content

Chronicler overview

·433 words·3 mins
chronicler - This article is part of a series.
Part 3: This Article

Chronicler uses Claude Code as the reasoning core, with a web-based front-end and a number of Python tools handling the mechanics. Tools are exposed over MCP so the model can invoke them directly.

Persistence
#

Persistence is handled via a combination of file-system storage for campaign information and a few small SQLite databases for reference data. All interactions with the model are persisted to disk, providing a permanent memory of what happened in the campaign. This memory can be consulted in the browser or via MCP, but it doesn’t take up context space unless the model needs to look something up:

Memory browser showing logged events from past sessions

Using the file-system for persistence is convenient because it allows easy toggling between campaigns:

Campaign selection screen with multiple saved campaigns

Campaigns can be fully original, or based on one or more adventure modules. I enjoy replaying the AD&D second edition modules from my youth, and upload them into the system for conversion to markdown.

External services
#

I’m running the application on a low-powered laptop. I wanted the option to migrate it to a Raspberry Pi or other power-efficient always-on server, so besides Claude Code I’m using SaaS solutions for:

  • Narration: OpenAI text-to-speech.
  • Image generation: Replicate, since OpenAI is quite conservative in its filters — image descriptions often triggered NSFW warnings because they mentioned blood or violence.

Data model
#

The engine supports flexibility along three axes:

  • Ruleset: For a given system I save reference materials in markdown format, augmented with database-backed structured data for convenient look-up of spells, equipment etc. Adding rulesets is a matter of importing the relevant manuals in a machine-readable format in a ruleset-specific subdirectory.

  • Ruleset customizations: While I’m essentially playing AD&D 2nd edition, I like to specify:

    • Custom races not supported out of the box: Aarakocra, centaur, Doppelganger, Kobold, Pixie, Tabaxi etc. have their own rules with attribute requirements, class restrictions, special rules etc.
    • Custom classes follow the same pattern. Vanilla AD&D 2nd edition doesn’t support classes such as Barbarian, Alchemist or Witch.
    • House rules: I add rules overriding default behavior on character creation, level-up and combat.
  • Setting: My campaigns so far take place either in the Greyhawk or Forgotten Realms settings. Setting lore is stored as a combination of markdown background material and a database. The user can consult reference data via the browser, the model can make searches via an MCP:

Reference lookup browser for setting lore

GeoJSON is a convenient format for tracking markers across larger-scale maps. Since the Greyhawk setting didn’t have a published GeoJSON map yet, I wrote a small tool to trace existing maps:

Map tracing tool for converting setting maps to GeoJSON

The next post looks at how Claude handles tactical maps — where structured data really starts to pay off.

chronicler - This article is part of a series.
Part 3: This Article