Skip to content

ADR-0012: CI and release logic ships as the rn-forge-devops package, never as workflow logic or copied scripts

Status: accepted (2026-10-15) · Scope: CI and release automation for pykit and every repository kiln generates

Decision

CI and release logic that is more than calling a task lives in rn-forge-devops, a pykit package. A pipeline file holds only its platform's constructs (triggers, jobs, matrices built from the planner's output, setup) and calls the package.

  • No rn-forge dependencies. The package depends on no other rn-forge package, and on only the third-party libraries its logic needs (packaging today).
  • A core and adapters. The core knows neither the CI platform nor the repository's stack. Each CI platform is an adapter (GitHub Actions first, Azure DevOps when a repository needs it). Each stack's workspace is an adapter too (a uv workspace first). A stack adapter reads the dependency graph from the stack's own tool, such as pnpm or nx, Maven or Gradle, and does not reimplement it (ADR-0001). This is ADR-0011's adapter structure. An adapter with no third-party dependency needs no extra.
  • One command. Callers invoke the console script rn-forge-devops <command>, never a module path.
  • How repositories reach it. A kiln-generated repository runs the version pinned in kiln's pin table, through uvx, whatever its language. pykit runs its own workspace member, so its CI tests the planner it ships.

Consequences

  • A fix reaches a repository through a devops tag and a kiln pin bump, not through regenerating or copying files.
  • Every repository that runs it needs uv. kiln's generated CI already installs uv to run the pinned kiln (kiln's ADR-0006), so CI gains no prerequisite. Running task ci:* on a workstation needs uv too.
  • A commons or cli release never forces a devops release, because no pin connects them (ADR-0004).
  • The command line uses the standard library's argparse, not rn-forge-cli. This departs from pykit's CLI shape because of the no-dependency rule.
  • A new CI platform or stack is a new adapter module with its tests and docs page. The core's API does not change.
  • .importlinter enforces two rules: rn_forge.devops imports no other rn_forge package, and the core imports no adapter.
  • The package costs a tag, a CI job, a site, a changelog and a release slot. It takes no entry in kiln's archetype allowed lists: repositories do not depend on it, kiln pins it as a CI tool.

Influences

E16 and its F16.1. Two kiln decisions match it from kiln's side: ADR-0014 places the planner, and ADR-0006 has generated CI run the pinned kiln. ADR-0011's three tests govern parts split out of commons. This package does not come from commons; it exists because of its audience (CI runners of any language) and its dependency floor, not because of dependency weight.

Alternatives considered

  • Logic in workflow files. It cannot be tested, and it would be written again for each CI platform and each archetype.
  • A .github/scripts/ file seeded by kiln. Seeded files are never updated, so a fix would never reach a repository.
  • A .github/scripts/ file generated by kiln. kiln would own pykit's code, and each fix would need a regeneration commit in every repository.
  • A module of rn-forge-tooling (this record's first version). Tooling serves Python authors of tools that write files into a repository. It would bring commons, cli, Typer, Rich and Jinja into every CI run, Node and Java repositories included, and every commons release would re-release it. kiln bakes the call into generated tasks, so moving the module later would break every repository.
  • A kiln ci plan command. It ties every CI run to kiln's release line, and breaks kiln's rule that a module only renders and checks.
  • A non-Python implementation, such as a Node script or a Go binary. kiln and pykit are Python, and uv is already in every kiln repository's CI. Another toolchain would add a prerequisite and a second codebase.

Background

2026-11-13: kiln's ADR-0017 supersedes this record for the planner, which is now kiln's kiln-devops. rn-forge-devops keeps only pykit's release commands, requirements and umbrella.