This chapter is for a maintainer bringing a repository in line with the model. It assumes the earlier chapters. Work from a fresh branch of the remote default branch, and open one pull request per numbered step so that a failure points at one change.
A Roc package follows every step, with one runner in each workflow. The sentences below that begin "A platform" and the acceptance item that begins "For a platform" do not apply to it.
For a Roc package using released utilities and fixed downloaded tooling, start with Adopt a Roc package without Nix. It includes a complete Blueprint recipe, lock review, cache lifecycle and executable handoff.
Risks and controls for adoption evidence§
Copying a starter can leave stale paths, unrelated task names or missing product cases while producing plausible configuration. Adopt through observable behavior. Run the documented local tasks, a release dry run and the published suite; inspect the resulting files and test the required-check and issue-reporting failure paths. Keep configuration-specific fixes in the adopting repository and common fixes in the shared tool. Adoption evidence establishes the exercised integration, not every feature of the product or every future utility version.
Steps§
Environment. Add
Blueprint.rocandBlueprint.lockwith the shared utilities and every tool and toolchain the repository uses. Addroc-stableand source dependencies only for tooling the repository itself runs from source. Using the releasedblueprintbinary, confirm that its named tasks run the selected utilities. Remove anyflake.nix,flake.lock,.envrcor other environment definition this replaces, and add.blueprint/to.gitignore.Tasks. Use the shared utility skeleton for common operations. Configure Blueprint tasks rather than copying their implementations. Consolidate overlapping scripts and delete one that only repeats another test. Keep product-specific source tooling in Roc following Write product-specific automation as Roc scripts. Carry each script’s tests across first, as
expecttests or cases the check script runs. Delete the original only when its replacement runs in CI.Pins. Remove
.roc-version,.github/roc-nightly.jsonand everyrocheader field outsidescripts/. Set therocfield of every script to theroc-stabletag. Make the check script enforce both. A platform also commits its generated host bindings and adds the check that regenerates and compares them.Examples. Point every Roc application in the repository at the working tree by relative path. Record expected output. Remove any step that rewrites committed examples after a release.
Release artifacts. Add tasks that build the bundle, the examples archive, the documentation archive and the manual, and a task that tests the archive against a loopback bundle. Generate and locally validate an SPDX or CycloneDX SBOM for each final artifact as described in the SBOM contract, including transitive components and exact subject digests;
actions/sbom-sidecarsandactions/fetch-dependency-sbomsdo this with a reviewedsbom/composition.json. Arrange immutable downstream distribution and authenticated evidence without granting write permissions to jobs executing repository code.Workflows. Replace the repository’s workflows with
ci.yml,release.ymlandnightly.yml, plus any optional workflows it needs. Callactions/setup-blueprintwith no inputs, after the checkout; it installs the release thatBlueprint.rocnames. A repository that tests on Windows or Intel macOS names a roc-blueprint release that publishes a binary for that system, lists the system in itsSystems, and leavesinstall-nixunset in those jobs.Repository settings. Apply Repository settings, update the required check names, and delete branches that earlier automation owned. Confirm the result with the
check-settingstask, as Confirm the settings describes.
Acceptance§
Record a link for each item in the final pull request.
blueprint run checkpasses locally, using the releasedblueprintbinary and a current nightlyroconPATH.A search finds no
.roc-version, noroc: "header field outsidescripts/, no committed flake files, no rendered documentation, and no Python, bash or PowerShell automation.ci.ymlpasses on the pull request, and its log shows theblueprintchecksum verified beforeblueprint run check.A
release.ymldry run produces every release asset, and the archived examples differ from the repository’s only in the package dependency.The dry run validates each SBOM’s schema, artifact/target digest and relationships, and a query identifies a known transitive component and its source. Documented coverage gaps are reviewed; the release process makes the documents and signature evidence available downstream.
A manual
nightly.ymlrun passes against the latest release.A deliberately failing nightly run opens exactly one tracking issue, a second failure comments on it, and a passing run closes it.
blueprint run check-settings -- <owner>/<name>, run from roc-automation, passes every line for the repository.A real pull request with a failing check is blocked from merging.
For a platform: a deliberate edit to the committed bindings fails
ci.yml.