Repository navigation
Bardo 1.0.0
The first release. Bardo is a local, file-based referee and memory for an AI Game Master. The agent narrates; Bardo calls no AI.
Added
- Campaign folders.
bardo initcreates a campaign:bardo.json, a Game Master guide for the agent (AGENTS.mdandCLAUDE.md) and folders for characters, NPCs, places, things, rules, knowledge and sessions.bardo addadds a character, NPC, place or thing. Everything is plain Markdown you can read and edit. - Modules. A small core every campaign has, and fourteen modules switched on when the game needs them (world, calendar, combat, factions, players, items, economy, languages, exploration, oracle, encounters, downtime, puzzles, simulation). Session zero asks which, with what each is good for;
bardo module on|off <id>changes them at any time, and a module switched off keeps its files.bardo.jsonis format 2; a campaign made before modules keeps everything it had and is upgraded by its first change. - A guide for the modules that are on.
AGENTS.mdcovers the core and the modules that are on, andbardo guide --writewrites it again, keeping your notes under## Your notes. - Fair dice.
bardo rollrolls dice (2d6+1,d20+STR, keep-highest and keep-lowest, success pools), reads named stats from the roller, and logs every roll with its reason. Re-rolls are flagged. - More dice. Exploding dice (
3d6!), Fudge dice (4dF), rerolling low faces once (2d6r1), GM-only rolls no player view shows (roll --gm), and a natural face on a check that always gives its top or bottom band (--natural-top 20). - Rules with the player's approval.
bardo rulesdrafts a named check with outcome bands. A check can be rolled only after the player approves the exact rule, and again if the rule changes. - Rule effects. A check may state what each outcome does (
--effect "hit: target hp -1d8+STR", a condition for a while, a cost); Bardo rolls and applies it in the same step, and undo takes the whole exchange back. Situational modifiers only within the range the rule allows, each with its reason (roll --mod +2 --mod-reason "high ground"); opposed checks (--vs) with a tie rule; conditions that end by themselves (condition --for 10m, or2rfor rounds of a fight). - Tables and the oracle.
bardo tablekeeps random tables in the campaign, checks that they cover their dice and rolls on them by range, by weight or on a d66, with dice and other tables inside an entry and every die logged; starter tables of Bardo's own to copy; GM-only tables. The oracle module answers a yes-or-no question at chosen odds (bardo oracle), with an "and", a "but" or a twist; asking again is flagged like a re-roll. - What each character knows.
bardo recordandbardo learnkeep per-character knowledge.bardo scene --as <character>shows what one character knows. - Revealing a secret.
bardo learn <who> "…" --secret <id>:<key>records that a character learned a secret value. Their view and the party's view then show it; it stays hidden while another entity keeps the same words secret (SECRET_STILL_HIDDEN), and is hidden again if the value changes, the claim is forgotten or the learn is undone. - Facts and things that change.
bardo setsets, changes, unsets or reveals an entity's facts; whoever is there sees the change, and everyone else keeps believing what they last saw (--gm: nobody sees it).bardo givehands a thing over, puts it down or into a container, and splits a stack (--count;add --quantitymakes one); witnesses learn it. - Session zero. A new campaign starts in setup:
bardo setupgives the agent the next of twelve setup questions with its help,bardo setup answerrecords the player's answer (or--you-decide),bardo setup askadds the agent's own, andbardo setup donefinishes once every question is answered and a main quest is open. Until then the commands that play (checks and other rolls,record,learn,move,travel,time advanceandschedule, quest deadlines,fight, counter changes) refuseSETUP_PENDING; character creation may roll plain dice for a player character and set its counters (=n) and conditions. The setup state comes from the event log, so editing or deleting the file never opens the gate. The answers stay instory/session-zero.md, and the limits head every scene. Campaigns made before it count as set up. - Safety. The limits are a list anyone may add to at any time (
bardo limits add line|veil), shown first in every scene, brief and setup;bardo checkwarns when a written line uses a word of a line (LINE_CROSSED), a safety net, not a guarantee.bardo pausestops the game for anyone, without a reason: untilbardo resume, nothing changes but undo and the limits (PAUSED). - Quests.
bardo questkeeps what the story drives toward: one open main quest, side, secret and personal quests, ordered steps, clues tied to what characters know, deadlines scheduled on the world clock and outcomes. Scenes list the open quests the viewer knows; a secret quest stays hidden untilbardo learn … --quest <id>;bardo checkwarns about a missing main quest, a quest with no next step, a stalled quest and a deadline about to pass. - Threads and clues.
bardo threadkeeps the open questions, promises and foreshadowing that are not quests, each closed with what came of it;bardo clueadds clues tied to what they point to, which the party sees once a character finds one (clue found). GM-only threads and clue links stay hidden. - Telling and doubt.
bardo tellpasses on what someone believes, true or not, to everyone there, and it reads just like the truth;bardo distrustdoubts a claim or a teller. Only the GM's view says which beliefs are wrong. - Brief, search and play sessions.
bardo briefis the agent's short start of a session (limits first, then where everyone is, the fight, the last recap, quests, threads and what happened;--long,--for,--gm).bardo searchlooks through what the view may see.bardo session start|draft|endnumbers the play sessions; a recap that holds a secret, an unlearned name or the GM's words is refused (RECAP_LEAK). - People and factions.
bardo profilekeeps a person's personality, motive, goal, fear and voice (a faction's goal, resources and methods), the GM's alone.bardo bondkeeps how someone feels about someone, hostile to devoted, with a note; whoever is there sees it change. The factions module adds factions (add faction), who belongs to which (faction join,--gmfor a spy) and what each thinks of the party. - Progress clocks.
bardo clockcounts 2 to 12 segments toward something, for a quest, a faction or a thread;--every 1dmakes it fill as time passes, and a GM clock stays out of every player view. - Characters that grow.
bardo createmakes a party character by the campaign's creation rule: Bardo rolls in the open or checks the point buy, and places rolls where the rule allows (--assign).bardo xpandbardo advanceadd experience and apply the next level by the advancement rule, which the agent writes in its own words. - Players, spotlight and handouts. The players module knows who plays which character (
bardo player add), with names kept out of the story;bardo spotlightnames who has had the least of the session;bardo handoutgives one player a note their characters alone learn. - Names.
bardo name --gmsuggests names from the world pack's peoples, by place, status, family and parent, and never one the campaign already uses. The built-in packs come with peoples;bardo checkwarns when a people's status can never be named (PEOPLE_NAMES_NOTHING). - Secrets. Text under
## GM only,secret:facts, secret counters and stats, and the real names of NPCs shown under a description stay out of the player's view, in every command and in--json.--gmviews show everything for the GM. Player output goes through one boundary that hides them. - Player views from what was perceived. Each event stores what every viewer perceived of it, and the player views are built from that; tests play twin campaigns that differ only in what the party never saw and check that every view and reply reads alike.
docs/perception.mdlists the rules and the accepted limits. - Time. A clock with an optional calendar,
bardo time advance, and scheduled consequences that fire when the clock passes them. - Places and travel.
bardo moveandbardo travelmove characters along exits and run the clock for each leg. - Exploration and maps. The exploration module adds hidden ways and secret places (
exit --gm,bardo hide) that stay off every view until a character discovers them (bardo discover); travel slowed or sped by the kind of way (road, trail, river, ford, ferry) and the weather (bardo weather,weather set);bardo routeto plan a journey; supplies spent each day on the road, with a warning when they run low; andbardo mapof what the party knows, as text or an SVG picture (--svg). - Encounters. The encounters module rolls the encounter table that fits the terrain, the kind of place, the region, the time of day, the season and the weather (
bardo encounter roll), and checks by chance on each leg of a journey and as time passes, for the GM alone. Two starter encounter tables. - Downtime. The downtime module spends days or weeks on an activity in one step (
bardo downtime <who> <activity>): the clock runs, the activity's check is rolled each period, its cost paid and its results applied, and one undo takes it all back. - Puzzles. The puzzles module keeps riddles, locks and ciphers with their solution hidden from the players (
bardo puzzle): hints in order, every attempt logged and compared without case, accents or punctuation, a GMsolvefor an answer right in spirit, and a quest step it can complete. - Long jumps and a bigger world.
bardo time advanceruns up to ten years in one event, or--untila date, firing everything due on the way in order; consequences can recur (time schedule --every, with--untilor--count). Up to 10,000 characters, places and things, with an index in.bardo/so commands stay quick. - Fights and numbers. A generic fight tracker (
bardo fight), counters (bardo counter) and conditions (bardo condition). Bardo tracks the numbers; the approved rules decide what a hit does. - The combat module.
bardo fight settingssets the combat rule, how long a round lasts on the clock and a defeat rule (such as hit points at 0) that takes a combatant out the moment it is met; fights have sides, say when only one is left standing, roll initiative (--initiative) and end with a tally of the checks rolled and the damage dealt and taken. - A generated world.
bardo world seedfills a campaign's blanks with regions, settlements, routes, history and markets from a seed.bardo world pack usepicks the words the world uses.bardo world routinegives NPCs a daily routine.bardo sceneandbardo worldshow today's weather, festivals, prices and news. - Deep worlds. A seeded world has continents and seas, kingdoms with borders, seats and rulers, faiths with holy places and feast days on the calendar, peoples with homelands, moons and a dated history.
bardo world npcmakes a kingdom's ruler or a faith's clergy when the story needs one. A third built-in pack,starfaring, gives the same world in starfaring words (systems, stations, lanes and jumps). - A world that moves on its own. The simulation module runs a daily tick by Bardo's rules and seeded dice, inside the event that moves the clock: the GM's faction and kingdom clocks (
--gm) gain and set rivals back, NPCs pursue their goals on personal clocks (clock add --npc --gm,--towarda place) and travel toward them, market stock and prices follow production, demand and trade, exchange rates drift, rumours spread along the ways, and notable results go intorules/world/chronicle.md. It is the GM's: a digest in the--gm-replyof passing time,bardo world log --gm, a preview withbardo tick --days n --dry-run --gm, andbardo overrule <id> --reasonto take a result back. The party learns of it only in the world (a rumour, being there, being told), never out of band (docs/perception.md). - Languages. The languages module gives each people a language of its own words, the same every session (
bardo langrenders a phrase,--wordslists them), and knows who speaks what: speech in a tongue a character does not know reads as speech they could not follow (record --in,tell --in,scene --in). - Gear and items. Containers with a capacity; a closed one hides what is inside from all but whoever carries it.
bardo equipandunequipwear or hold gear in a slot, a sheet shows what each character carries and wears and what it is worth as far as they know, andbardo thingshows a thing's history as the view saw it. The items module adds rarity, durability that wears down to broken, and items rolled from tables (bardo item roll). - Money and trade. The economy module adds the setting's currencies and coins from the world pack, a purse for each character (
bardo purse), paying (bardo pay), and buying and selling at a market's prices (bardo buy,bardo sell,bardo market), which follow the season and the news; a foreign currency changes at its rate. - History and undo.
bardo historyshows what happened.bardo undorestores the files, clock, fight and schedule from before the latest event; its rolls stay in the log, marked void. - Checks and repair.
bardo checkreports problems in a campaign,--acceptadopts hand edits,--fixrepairs a torn last log line, and--gmshows real paths for repairs. It exits 2 when it finds errors. - Crash safety. A change is journaled, so the next command finishes one that a crash interrupted. One command at a time holds the campaign lock.
- Machine output. Every command takes
--jsonand returns one JSON object, with stable error codes and exit codes. - The
bardo-gmagent skill, generated from the same source as the campaign guide. - A playtest harness (
pnpm playtest) that plays Claude Code, Codex, OpenCode or a scripted player through a game inside a sandbox and checks the result: no leaked secrets, no invented rolls, approvals respected. It is not published. - Tests. Unit and property tests, mutation testing (
pnpm mutate) and coverage (pnpm coverage). - Project docs and CI. README, CONTRIBUTING, SECURITY, this changelog, funding links, and a CI workflow for Linux, macOS and Windows on Node 22 and 24.
- Releases from GitHub. Pushing a
v<version>tag onmainpublishes@bardo-ttrpg/clithrough npm trusted publishing, after the full check; no npm token is stored. CONTRIBUTING says how to release. - Design records.
GLOSSARY.mdanddocs/adr/hold the project's terms and decisions;docs/perception.mdholds what each viewer perceives. - An example campaign.
examples/the-salt-road, built by Bardo's own commands (pnpm gen:example): session zero done, a seeded world, a market, a faction with its clocks, an NPC with a profile, a first session and three days of the world moving on its own.
Security
- A hostile campaign folder is treated as untrusted input. Bardo never runs anything it finds there.
- A
## GM onlyheading is recognised even with invisible, lookalike or combining characters in it. - Usage and parse errors do not echo the text you typed, so they cannot show a hidden name or secret.
bardo checkhides a hidden name that appears in a file path.- File reads are bounded and checked before they are read: size caps, no symbolic links out of the campaign, no hard-linked logs, no named pipes, and a 10,000-entity cap. The event and dice logs have a 256 MB ceiling.
- Parsing takes time in proportion to the input: a very long line cannot hang a command.
- A forged or hand-edited journal or undo image can write only the files Bardo itself manages, with content that reads back. It cannot write agent configuration such as
.claude/settings.json,.mcp.jsonorCLAUDE.md. - A new id is never
claude,agents,agent,geminiorqwen, whatever the case, because a coding agent loads a file of that name as instructions. A name like "Claude" gets the idclaude-2and is still shown as "Claude". Bardo refuses to write such a file (AGENT_FILE_NAME); a campaign that already holds one is still read, andbardo checkwarns and says to rename it. - Journal records must each be one line, so recovery cannot add forged lines to the logs.
- A forged lock file cannot block the campaign or add lines to the output.
- Event numbers have an upper bound.
- Files that cannot be written safely are refused before anything is changed, so a command does not half-apply.