Canonwell
  • Features
  • How It Works
  • For Solo Players
  • Getting Started
  • Examples
  • Pricing
Sign InGet Started
  • Features
  • How It Works
  • For Solo Players
  • Getting Started
  • Examples
  • Pricing
Sign InGet Started
← All documentation

Canonwell guide

Canonwell Markdown

A practical guide to writing and importing session chapters with front matter and structured directives.

Start here

Open Import and choose Markdown. Select an existing campaign, or choose Create a new campaign and name it. The first imported session creates that campaign. Preview catches format errors before you save.

Every document needs YAML front matter with arcstate: 1 and a title, followed by story prose. A prose-only document is accepted with a warning; use directives when you want structured events saved alongside the chapter.

Smallest valid session
---
arcstate: 1
title: The Ashen Road
playedAt: 2026-11-12
---

# The Ashen Road

Rain followed Rowan to the old bridge. A lantern flickered between the trees.

Front matter

Front matter starts and ends with a line containing three dashes. arcstate and title are required. subtitle, playedAt (YYYY-MM-DD), id, number, opening.summary, opening.locationId, and system are optional. If id or number is omitted, the importer assigns it when saving.

When starting a campaign, leave campaignId out; the campaign you create in the importer is the destination. For an existing campaign, you may leave it out or set it to that campaign’s exact ID. A mismatch is rejected. If system is present, provide system.name; system.id is generated from the name when omitted.

Front matter with optional details
---
arcstate: 1
title: The Ashen Road
subtitle: Trouble at the old bridge
playedAt: 2026-11-12
opening:
  summary: Rowan reaches the bridge after dark.
system:
  name: Ironsworn
---

Chapter text and directives

Write the chapter as ordinary Markdown outside directives. A directive starts with ::: followed by a supported name, contains a YAML mapping, and ends with ::: on its own line. Directive blocks become structured events and are removed from the chapter text. Put closing last; it stores session wrap-up details rather than creating an event.

In the importer editor, type ::: to browse directive templates. Inside a directive, blank lines suggest fields; action, category, outcome, and other enum fields suggest valid values. Use the arrow keys, then Enter or Tab to insert a suggestion. Escape closes the suggestions.

The parser does not infer facts from prose. A sentence such as ‘Rowan rolled a 9’ stays story text unless you add a roll directive. Directive-looking text inside a fenced code block is also treated as ordinary chapter text.

A directive block
:::roll
formula: 2d6
dice: [4, 3]
modifiers:
  - label: Wits
    value: 2
total: 9
outcome: mixed
:::

Rolls and event links

A roll records what you rolled; it does not roll dice or calculate the total. formula is required. dice, modifiers, total, outcome, actorId, challengeId, and sceneId are optional. Each modifier needs a numeric value and may have a label. Outcomes are success, failure, mixed, critical_success, critical_failure, or custom.

Use id on a roll if another event should link to it. For example, player.linkedRollEventId must exactly match the roll’s id. If you omit id, an event ID is assigned from the session ID and directive order when saved.

Record and link an action and roll
:::player
id: action-rowan-search
actorId: rowan
action: Rowan searches the bridge.
intention: Find a safe crossing.
linkedRollEventId: roll-rowan-search
:::

:::roll
id: roll-rowan-search
actorId: rowan
formula: 2d6
dice: [4, 3]
modifiers:
  - label: Wits
    value: 2
total: 9
outcome: mixed
:::

Directive reference

scene — Requires title and action (start, end, or transition). Optional: sceneId, locationId, description. If omitted, sceneId is generated from the title and directive order.

player — Requires action text. Optional: actorId, intention, linkedRollEventId, sceneId. Use linkedRollEventId to point to a roll event ID.

roll — Requires formula. Optional: dice (number list), modifiers (list of label/value pairs), total, outcome, actorId, challengeId, sceneId, and id.

oracle — Requires question and result. Optional: oracleType (yes_no, detail, meaning, random_event, scene, custom), interpretation, sceneId, and id. fate-question is accepted as an alias for yes_no.

discovery — Requires category and name. Categories: character, location, item, clue, secret, faction, threat, lore, custom. Optional: description, discoveredEntityId, sceneId.

consequence — Requires description. Optional: severity (minor, moderate, major, critical), status, actorId, challengeId, and sceneId.

thread — Requires action: created, updated, advanced, blocked, resolved, or abandoned. Provide threadId; for a new thread, created plus title can generate one. Optional: description, progress, resolution, sceneId.

challenge — Requires action: introduced, progressed, changed, overcome, escaped, failed, or resolved. Provide challengeId; introduced plus title can generate one. Optional: description and sceneId.

entity — Requires action: introduced, updated, departed, returned, changed, or resolved, plus entityType (character, location, challenge, thread, lore, other). Provide entityId; introduced plus title can generate one. Optional: description and sceneId.

closing — Does not create an event. Optional: synopsis, cliffhanger, discoveries, majorEvents, newChallengeIds, newCharacterIds, newLocationIds, resolvedThreadIds, unresolvedThreadIds.

Complete example

This complete example shows how prose and directives fit together. It includes a scene, player action, roll, oracle answer, discovery, consequence, thread, challenge, entity, and closing summary. Adjust the IDs and story to match your campaign.

IDs are exact strings. Reuse the same ID when updating a thread, challenge, entity, or location in a later session. Preview reports missing fields and invalid actions with line numbers; resolve errors before importing.

Complete session example
---
arcstate: 1
title: The Ashen Road
subtitle: Trouble at the old bridge
playedAt: 2026-11-12
opening:
  summary: Rowan reaches the old bridge after dark.
system:
  name: Ironsworn
---

# The Ashen Road

Rain followed Rowan to the old bridge. A lantern flickered between the trees.

:::scene
action: start
sceneId: scene-old-bridge
title: A Light in the Rain
locationId: old-bridge
:::

:::player
id: action-rowan-search
actorId: rowan
action: Rowan searches the bridge for a safe crossing.
intention: Find a way across before the lantern disappears.
linkedRollEventId: roll-rowan-search
sceneId: scene-old-bridge
:::

:::roll
id: roll-rowan-search
actorId: rowan
formula: 2d6
dice: [4, 3]
modifiers:
  - label: Wits
    value: 2
total: 9
outcome: mixed
sceneId: scene-old-bridge
:::

:::oracle
oracleType: yes_no
question: Is anyone waiting beneath the bridge?
result: Yes, someone is hiding among the supports.
interpretation: Rowan hears a second set of footsteps.
sceneId: scene-old-bridge
:::

:::discovery
category: character
name: The Lantern Keeper
description: A traveler watching the bridge from the far bank.
:::

:::consequence
description: Rowan slips on the wet stones and loses time.
severity: minor
actorId: rowan
sceneId: scene-old-bridge
:::

:::thread
action: created
threadId: thread-who-is-the-lantern-keeper
title: Who is the lantern keeper?
description: Find out why the traveler is watching the bridge.
progress: 0
:::

:::challenge
action: introduced
challengeId: challenge-cross-the-flooded-bridge
title: Cross the flooded bridge
description: The swollen river has damaged the narrow crossing.
:::

:::entity
action: introduced
entityType: character
entityId: lantern-keeper
title: The Lantern Keeper
description: A wary traveler carrying a shuttered lantern.
:::

:::closing
synopsis: Rowan finds someone waiting beneath the bridge.
majorEvents:
  - Rowan investigates the lantern.
  - A hidden traveler is discovered.
unresolvedThreadIds:
  - thread-who-is-the-lantern-keeper
cliffhanger: The traveler calls Rowan by name.
:::

Update ongoing story records

A later session can update records created earlier. Keep the same threadId, challengeId, or entityId. Actions such as resolved, abandoned, overcome, or departed update campaign continuity; they do not create a second record with a guessed name.

Update existing records in a later session
:::thread
action: advanced
threadId: thread-who-is-the-lantern-keeper
progress: 2
description: Rowan learns the keeper is searching for a missing child.
:::

:::challenge
action: progressed
challengeId: challenge-cross-the-flooded-bridge
description: Rowan finds a loose plank that might hold.
:::

:::entity
action: updated
entityType: character
entityId: lantern-keeper
title: The Lantern Keeper
description: The keeper reveals why they were waiting at the bridge.
:::
Canonwell

A campaign journal and memory layer for stories that keep going.

Product

FeaturesHow It WorksPricing

Learn

Getting startedDocumentationMCP connectionCanonwell Markdown

Account

Sign InGet StartedSupport
© 2026 Canonwell. Remember every story.
Privacy PolicyTerms of Service