Writing and publishing your first deck

Jennifer

From an empty directory to a deck others install with jvc: the manifest, the source layout, tests, the shared CI gate, a tag, and the registry.

November 2026, by @mplx.
Based on Jennifer 0.27.0

Powered by Jennifer's Cantrip - Markdown into slide decks, https://github.com/jennifer-language/cantrip
1 / 19

What a deck is

NameWhat it isWhere it comes from
http (bare)a bundled modulethe interpreter, versioned with it
@scope/decka deckjvc install, into vendor/scope/deck/
2 / 19

Start from the template

cp -r deck-template deck-beaufort && cd deck-beaufort
tools/init-deck.sh mplx beaufort "Wind speed to Beaufort force"
rm TEMPLATE.md tools/init-deck.sh tools/sync-deck.sh
initialised @mplx/beaufort (repository github.com/mplx/deck-beaufort)

A working deck: one export, one test overlay, one example, docs, green CI.

3 / 19

deck.toml: who the deck is

[package]
name = "@mplx/beaufort"
version = "0.1.0"
description = "Wind speed to Beaufort force"
license = "LGPL-3.0-only"
capabilities = []

[package.urls]
deck = "https://raw.githubusercontent.com/mplx/deck-beaufort/main/deck.toml"

[engines]
jennifer = ">=0.27.0"
4 / 19

Capabilities, engines, dependencies

# It talks to the vendor's HTTPS API, so it opens sockets.
capabilities = ["net"]

[decks]
"@deckyard/forensicgenetics" = "^0.1.0"
5 / 19

src/: the part that ships

src/beaufort.j          the entry module: import "@mplx/beaufort/"
src/beaufort_test.j     its white-box test overlay

Every .j file opens with the same header; tools/check-headers.sh compares it with the manifest:

# SPDX-License-Identifier: LGPL-3.0-only
# SPDX-FileCopyrightText: Copyright (C) 2026 mplx <mplx@jennifer-lang.dev>
# pragma-jennifer-version: >=0.27.0

Two shapes: modules (one file per subject) or topics (one entry file that includes src/topics/*.j).

6 / 19

The code

/**
 * The Beaufort force of a wind speed.
 * @return {int} the force, 0 (calm) to 12 (hurricane)
 */
export func force(kmh as int) {
    if ($kmh < 0) {
        throw Error{kind: "beaufort", message: "beaufort: negative speed"};
    }
    def f as int init 0;
    while ($f < 12 and $kmh >= LIMITS[$f]) { $f = $f + 1; }
    return $f;
}
7 / 19

Tests: an overlay beside every module

func testLimitsBelongToTheForceAbove() {
    testing.assertEqual(force(38), 5);
    testing.assertEqual(force(39), 6);
}

func testNegativeSpeedThrows() {
    testing.assertThrowsArgs("force", [-1], "beaufort");
}
$ jennifer test src/beaufort_test.j
PASS testCalm (0 ms)
...
4 passed, 0 failed, 4 total
8 / 19

The shared CI layer

deck-template/tools/shared-files lists what every deck carries byte-identically: the workflows, .github/actions/, most of tools/, AGENTS.md.

KindMeaning
sharedcopied verbatim, pinned in tools/shared.lock
optionallike shared, but a deck may delete it
seed / merge / importthe deck's own file, created or extended
retiredremoved on the next sync
9 / 19

Never edit a shared file in a deck

$ tools/check-shared.sh
error: shared files differ from the template they were synced from:
  tools/check-src.sh: changed

These files are shared by every deck. Undo the local change, and either
move deck-specific logic to tools/check-extra.sh or fix the file in the
template and sync it
10 / 19

The gate: tools/check-all.sh

@mplx/beaufort 0.1.0 - deck.toml, modules shape, tiny=no
=== shared     all 22 shared files match the template
=== format     === lint
=== headers    all 3 source files carry the SPDX pair and >=0.27.0
=== overlays   all 1 modules in src/ have a co-located test overlay
=== src        src/ holds only Jennifer source
=== coverage   all 1 exported functions are called from an overlay
=== docs       docs name 1 functions, ... all matching the code
=== identity   no template identity left in @mplx/beaufort
=== suites     4 passed, 0 failed, 4 total
=== examples   all 1 examples ran
the gate is green
11 / 19

What the gate catches

A new export, isCalm(kmh), with no test and no cheatsheet line:

=== coverage
  src/beaufort.j: beaufort.isCalm() is exported but never called from an overlay
1 of 2 exported function(s) are untested.
=== docs
  docs/cheatsheet.md: beaufort.isCalm() has no signature in the API surface
1 documentation problem(s).
...
failed: coverage docs
12 / 19

Docs, design notes, JENNIFER.md

13 / 19

Using it from another project

[decks]
"@mplx/beaufort" = "^0.1.0"
jvc add "@mplx/beaufort" "^0.1.0"   # writes the line above
jvc install                         # vendor/mplx/beaufort/beaufort.j
use io;
import "@mplx/beaufort/";

io.printf("force %d\n", beaufort.force(45));

A sibling checkout is not found: @ resolves only under vendor/.

14 / 19

Releasing: the tag is the version

# bump version in deck.toml, commit, then:
git tag 0.1.0
git push origin 0.1.0
15 / 19

Scopes: who may publish what

jvc login              # device flow through the registry's provider
jvc claim mplx         # your GitHub username, or an organisation of yours
jvc scopes             # who holds what
16 / 19

jvc publish: nothing is uploaded

$ jvc publish --remote github --tag 0.1.0
checked @mplx/beaufort@0.1.0
  ok    lint: 1 module(s) clean
  ok    tests: 1 overlay(s) passed
  ok    docblocks: no doc drift
  1. jvc runs the gate locally: lint, every overlay from a copy of src/, the docblocks
  2. It sends the registry a repository and a tag, nothing else
  3. The registry reads the manifest at that tag through the forge's API and records the commit as the pin
17 / 19

After the first release

18 / 19

Checklist and read more

  1. deck.toml: name, version, floor, capabilities with a reason
  2. src/<deck>.j plus an overlay per module; docblocks on every export
  3. Cheatsheet, design notes, an example; tools/check-all.sh green
  4. Bump, tag N.N.N, push, jvc publish

Based on Jennifer 0.27.0, November 2026.

19 / 19