Documentation

Rules and presentation

Shared framework reference

Rules page format

Item Contract
Entry /src/rules/index.bwss.
Additional page /src/rules/<slug>.bwss.
Root One JSON node, usually Box.
Nodes Box, Image, Svg, Anchor.
Text Plain string children, not Markdown or a Text node.
Links Anchor.href names an internal page, fragment, or page with fragment.

Use Box.children to arrange nested nodes and text. Image.src names an uploaded image key. Svg uses the supported vector shape. Read BWSS styles for their complete style contract.

Box and Anchor can supply an id for fragment links. Page slugs and IDs use the validated identifier grammar. External URLs and script destinations are not allowed in page anchors.

{
  "type": "Box",
  "id": "goal",
  "children": [
    "Complete three routes to win.",
    { "type": "Anchor", "href": "setup", "children": ["Set up the board"] }
  ]
}

Translated pages

A translated page keeps the slug under a locale directory, such as /src/rules/fr/index.bwss. It needs a corresponding default page. A missing translation falls back to the default page. The game's framework governs catalog and locale availability.

Validation

write_file saves a draft. validate_code and commit compile pages and report invalid nodes or styles. Check link targets yourself. Rules pages have no automatic navigation tree.

Need a hand with this?

Join our Discord