T2 chain · engineering / devrel: the release-day ritual as one
file: history in, a typed notes object out, a working copy of the
CHANGELOG edited in place with nika:edit, the team pinged with the
headline, all behind one human decision.
The job
Every release someone copy-pastes git log into a doc, rewrites it, pastes it into the CHANGELOG, then announces it. Four manual steps, four chances to drift. Here the git range is one constant, a single gate asks before anything runs, the notes are a schema-typed object, and the announcement quotes the same headline the CHANGELOG got.The shape
The file
release-notes.nika
How it works
1
One gate before anything runs
approve is a nika:prompt with no default:, at the root. history
and existing re-read its answer (when: ${{ with.go == true }}), so a
« no » reads nothing and writes nothing. The missing default is
deliberate: a default would disarm the decision this file exists to
gate.2
The range is one constant
history runs git log ${{ const.since_tag }}..HEAD as an argv list.
since_tag is a const:: the file owns it, so you edit
const.since_tag for the next release. --var since_tag=… is refused,
because the file declares only the announce and rehearse inputs.3
Typed notes · headline + breaking + body
The schema means
headline is a real field downstream: changelog and
announce bind the whole notes value, test it, then read
with.notes.headline in the CHANGELOG insert AND in the ping. One
source, two consumers, no drift. When no notes were drafted, both close
instead of stepping into a null.4
Copy, then edit in place
existing reads your changelog and copy writes it to
out/CHANGELOG.md. nika:edit then finds the # Changelog heading in
that copy and replaces it with itself plus the new section, so the
history below stays intact. An in-place builtin never touches a file the
workflow did not create, and you review the copy before it lands.Constructs you just used
Run it
What it needs: A local model (Ollama serving
qwen3.5:4b) and the sample changelog. History comes from Git: outside a repository that has the const.since_tag tag (and on macOS in 0.124.3 in any case, Known limits), history recovers a notice and no notes are drafted; add --var rehearse=true to rehearse the chain on the sample log.1
Rehearse it
nika try names the hosts a step may reach: may reach: hooks.slack.com — the mock replaces the model, not the network. It stops at the approve gate, as a real run does. The rehearsal folder holds no repository, so once the gate is answered no notes are drafted unless you add --var rehearse=true.2
Get your own copy
Save the file above as
release-notes.nika in a new folder, then download the sample it reads:3
Check it, then run it
out/CHANGELOG.md, a copy of the changelog
const.changelog_src names, and edits it only when notes were drafted:
from your history, or from the sample log under --var rehearse=true.It asks at the approve gate before anything else runs. On a terminal you answer; in a script it pauses (exit 4) and prints the --resume line that continues it, or you answer up front with --answer approve=true.Any other model works: pass --model <provider>/<name> with its key, and cap a cloud model with --max-cost-usd.The team ping needs --var announce=true, TEAM_WEBHOOK_URL and notes
drafted from real history: it never fires for a rehearsal.Make it yours
- Flag breaking changes in the ping:
announcealready binds the wholenotesvalue, so readwith.notes.breakingthere; bindingtasks.notes.output.breakingwould step into null whennotesis skipped and fail the task.breakingis optional in the schema: add it torequired, then addsize(with.notes.breaking) > 0toannounce’swhen:. Atasks.*reference written straight intowhen:is refused (NIKA-VAR-021). - Render a public version too: a second
infertask with a “user-facing tone” prompt, writingdocs/changelog/.
Next · SEO content brief
Chained fetch extractions (sitemap mode, then article mode) and CEL
indexing into a binding.