Developer Documentation

The entry point for working on the Song of Heroic Lands (SoHL) system — for developers extending the API, contributors changing core, and anyone who needs a mental model of the code.

This documentation is developer- and API-facing only. Player- and GM-facing rules and play guides are not duplicated here — they live on the project site (see Player & GM rules below).

Start here

  1. Architecture Overview — the system’s mental model and a map of the src/ tree. Read this first.
  2. Getting Started — environment setup, codebase tour, and your first change.
  3. API Reference — generated TypeDoc, with a sidebar grouped to mirror the source: Core / Documents / Domain / Utility.

Security-critical change? If you are touching serialization, HTML rendering, actions/executors, or chat/cross-client flows, read Security Model & Guardrails first. Its keystone rule — data carries a reference to code (a __kind tag, a method name, a Macro UUID), never source; functions are never serialized — is the system’s top security constraint.

Concepts

Design and rationale — how and why the system is built the way it is.

How-to

Task-oriented guides for getting something done.

Content Creator

Authoring the content notes in assets/content/ that compile into compendium documents — for the person writing notes rather than changing the system.

  • Content Creator — the section landing: what a content note is, and which page answers which question.
  • The Authoring Workflow — where content lives, the frontmatter every note carries whatever its type, and how a note becomes a compendium document. Read this first.
  • Item Note Frontmatter — the generated per-type field reference for all 13 item types: every sohl: field, its shape, requiredness, and default.
  • Actor Notes — authoring a being, and the (type, shortcode) address space its embedded items resolve through.
  • Map Notes — authoring a Foundry Scene as a markdown note: the battlemap / localmap / regionalmap schema, the two unit conventions, regions and their behaviours, and how a map is packaged.
  • Authoring a Macro Content Note — how a type: macro note compiles into a Foundry Macro plus its documentation, and what the {#script} anchor does.
  • Linking Between Content Notes — wikilinks for content authors: the four forms, and why an item and its documentation need two different addresses.
  • Asset Conventions — where art files live, how img: resolves to a shipped path, image and SVG standards, and default item art.
  • Generated Content Tables — Dataview TABLE queries that tabulate content notes from their frontmatter.

Reference

Contracts, catalogs, and specifications.

Contributing

How to contribute: standards, the development workflow, and maintainer/project-meta.

Player & GM rules (external)

Rules and play guides are maintained on the project site, not in this repo: