# ReleaseKit Adoption Implementation Plan ## Purpose And Execution Implement the target in the [ReleaseKit roadmap](releasekit.md). That document owns intent and the target state; this document owns implementation steps. The source baseline is `8b4d56acc5eb76731f74fe5c2a1a7bb806fbb335`. Execute Stage 1 through Stage 7 in order. Each stage is a focused task sized for a Luna coding agent. This is one end-to-end sprint: intermediate stages may temporarily leave stale documentation, tests, or builds. Do not add compatibility layers or temporary orchestration merely to make every stage independently coherent. Validate focused changes as useful and perform the assembled verification in Stage 7. Record completion and actual validation results here without describing unperformed checks as successful. Start with `docs/development.md` and `docs/policy/agents.md`. Read the architecture, testing, release, documentation, and OSS policies for the changes they govern; read policy provenance when editing local policy adaptations. Preserve unrelated work and follow the adopted commit policy. The approved dependency-source decision in the roadmap replaces the older blanket prohibitions as part of this sprint. This sprint implements adoption, not a production release. It does not authorize pushing repository refs, publishing tags, creating hosted releases, uploading real assets, editing upstream repositories, or provisioning secrets in external systems. Those operations require their appropriate separate authorization. Local disposable Git fixtures are sufficient for verification. ## Fixed Decisions And Scope - Select ReleaseKit **v0.10.0**, source commit **`82bac1a3ab935beddd4b8789d1e07f52135d4243`**, through the public `go.maximumdirect.net/releasekit` module. The current module graph already selects that version transitively; this work makes the native tool and runtime use explicit. - Keep the Go consumer minimum at **1.27.0** and use **Go 1.27.4** for release validation/builds. Keep existing application framework versions unless ordinary module selection necessarily changes a transitive requirement. - Use the public runtime `buildinfo.Version()` accessor and CommandKit's existing version command. Drop Scriptorium's injected revision metadata. - Use a single root-module profile and a root `releasekit` forwarding launcher. There is no application release subcommand, custom Go release orchestrator, legacy script alias, independent tool installation, or floating tool version. - Keep stable versions, `main`, remote `origin`, branch-before-tag publication, race-enabled candidate testing, Linux amd64/arm64 binaries, and `SHA256SUMS`. Source-publication completion and asynchronous hosted delivery stay separate. - The release dependency rule is publicly available library sources/versions, independent of local checkouts, for all current and future libraries. Development may use local checkouts. Implement this as policy guidance and ordinary dependency review, with no dedicated mechanical enforcement or additional approval gate. Do not select optional workspace/replacement validators, retain the old bans as tests, or bypass native ReleaseKit checks. - Retain application/framework responsibility and import boundaries. Standard vendoring and published versioned replacements are not themselves violations of the release dependency rule. - Application configuration, prompt execution, public CLI families other than version identity, HTTP behavior, and runtime lifecycle are unchanged. - Do not select a real Scriptorium release version in this sprint, retrofit historical releases, or expand the supported target matrix. Upstream references below are pinned to the selected source. Read them for native behavior instead of reconstructing it from Scriptorium's old script. ## Stage 1: Register The Tool And Adopt Runtime Version Identity **Completed:** Entrypoint tests and a temporary application build passed with Go 1.27.4; the built `version` command ran without configuration or credentials. The registered host-target tool reported `releasekit v0.10.0`, and `go mod tidy` retained its tool declaration. **Primary files:** `go.mod`, `go.sum`, `cmd/scriptorium/main.go`, `cmd/scriptorium/main_test.go`. ### Work 1. Select Go 1.27.4 locally and follow the [adoption guide][adoption] to register `go.maximumdirect.net/releasekit/cmd/releasekit@v0.10.0` as a Go tool dependency. Add the ordinary runtime import described below and run module tidy after both uses exist. Commit the resulting module/checksum changes. Preserve `go 1.27.0`; a new `toolchain` directive is not needed solely to record the selected maintainer toolchain. 2. In `cmd/scriptorium/main.go`, import `go.maximumdirect.net/releasekit/buildinfo`. Supply `buildinfo.Version()` as `commandkit.Identity.Version` and leave `Revision` unset. Remove the `version` and `revision` globals. Keep name `scriptorium`, signal handling, stream wiring, invocation context, and native status propagation unchanged. There is no local version accessor, metadata cache, fallback implementation, `debug.ReadBuildInfo` reader, or import of ReleaseKit internals. 3. Update `TestProcessIdentityAndNativeStatus` to check successful text version output against `scriptorium ` plus the public accessor's value and newline, with no revision suffix. Preserve its usage-error and cancellation checks. Do not hardcode the accessor's development fallback into a separate local algorithm or mutate a new test-only version global. 4. Keep CLI adapter tests that supply synthetic CommandKit identities: they test adapter behavior and need not lose CommandKit's optional revision support simply because the real entrypoint stops supplying it. 5. Review module changes. There is no need to add sibling replacements, a committed workspace, or vendored source to adopt the released module. Such scaffolding would also evade the intended consumer integration. ### Verification And Completion - Run the entrypoint's focused tests and a normal application build with output in temporary storage. Verify its `version` command works without configuration or credentials. - Invoke the registered tool by its full package path with `version`, with host `GOOS/GOARCH` selected as in the upstream guide; it must identify ReleaseKit v0.10.0. Verify tidy retains its `tool` declaration. - The actual injected application version will be verified through native builds in Stage 7, not by copying a private linker symbol into local tests. ## Stage 2: Install The Profile And Launcher And Retire The Old Script **Completed:** Launcher tests and shell syntax checking passed. The registered tool reported v0.10.0 both normally and with inherited Windows/arm64 target settings. The former script and its test harness were removed. **Primary files:** new root `releasekit.json`, new root `releasekit`, new root `releasekit_test.go`; delete `scripts/release.sh` and `scripts/release_test.go`. ### Work 1. Create the native profile with exactly these product selections: ```json { "product": "Scriptorium", "remote": "origin", "validation": { "go": { "race": true } }, "build": { "main_package": "./cmd/scriptorium", "binary_name": "scriptorium", "targets": ["linux/amd64", "linux/arm64"] }, "delivery": { "forge": "gitea", "base_url": "https://forge.maximumdirect.net", "owner": "eric", "repository": "scriptorium", "token_env": "RELEASEKIT_GITEA_TOKEN" } } ``` Omit `module_dir` to select the root. Omit `checks` and other optional validators rather than adding custom commands, duplicate compilation, or scanners. Omit `expected_push_url`: use `origin`'s effective endpoint, as already selected, without adding a new exact-URL restriction. Omit `token_file`; native environment credentials suffice for this adoption. The [configuration contract][configuration] remains authoritative. 2. Create an executable POSIX-shell root `releasekit` using the small launcher from the [adoption guide][adoption]: obtain `GOHOSTOS` and `GOHOSTARCH`, select them for the tool process, and `exec go tool` with the full `go.maximumdirect.net/releasekit/cmd/releasekit` path and unchanged arguments. Preserve the native status. Document invocation from the module root; directory discovery, flag parsing, retries, tool installation, Git checks, and release logic do not belong in this launcher. 3. Delete both old script files and their obsolete fake-Go/Git-transport fixture machinery. Do not port their all-replacement/vendor/workspace rejection tests to another package. Keep `internal/adapter/dependency_test.go`'s unrelated framework import/removal coverage: it is not a dependency-source enforcement test. 4. Add one small root test file, package `scriptorium_test`, covering the consumer-owned launcher boundary. Use a test-owned fake `go` executable through a subprocess-scoped environment to verify that inherited cross-target values are replaced by the reported host, arguments including a value with spaces arrive intact, and a nonzero tool status is preserved. Also exercise a successful handoff. The fake must not invoke Go recursively. Skip this POSIX launcher test on Windows. Keep it independent of Git, network access, real credentials, and the module cache. 5. Do not create a profile parser or permanent profile/schema/CI snapshot suite. The actual native profile and versioned builds will be exercised in Stage 7; the unchanged upstream workflow is checked in Stage 3. ### Verification And Completion - Run the focused launcher tests and shell syntax checking. - From the module root, run `sh ./releasekit version`, including once with inherited cross-compilation settings. The native executable must still run on the host and identify the selected tool version. - The old script path and package-specific script test harness are gone; current-document references are repaired in Stage 6. No second publication entry point remains. ## Stage 3: Adopt The Native Woodpecker Delivery Workflow **Completed:** The workflow matches the pinned template byte-for-byte; its YAML parsed and its unescaped shell block passed syntax checking. In an annotated-tag fixture with a local-only origin, the actual block reached the native missing-token error (status 2) without hosted access. Tagged module files remained unchanged and temporary bootstrap metadata was removed. This does not demonstrate hosted delivery. **Primary file:** `.woodpecker/release.yml`. ### Work 1. Replace the old two-step build/plugin workflow with the selected revision's [single-module consumer template][workflow]. Its existing `golang:1.27.4-bookworm` image, tag selection, and secret mapping already match this roadmap, so use its contents without application-specific shell changes. Destination, package, and targets belong in the profile. 2. Preserve the template's tag/CI-event commit resolution, detached clean checkout, temporary module metadata outside the checkout, host-target selection, full tool path, and `ci-deliver --prepared` invocation. Keep Woodpecker's literal-dollar escaping intact. Do not substitute the ReleaseKit self-build template or a multi-module selector. 3. Remove local build loops, `main.version`/`main.revision` injection, note copying, checksum generation, and the separate upload plugin. Native delivery owns these responsibilities and the unchanged checked-in note supplies the hosted body. 4. Document, in Stage 6, that an operator provisions Woodpecker repository secret `releasekit_gitea_token`, mapped to `RELEASEKIT_GITEA_TOKEN`. Provisioning is deployment setup, not a new source-publication gate. Do not delete the previous `GITEA_RELEASE_TOKEN` secret as part of adoption; historical tagged workflows may still need it. ### Verification And Completion - Compare the copied workflow with the pinned template, parse its YAML, and syntax-check its shell block after accounting for Woodpecker escaping. No permanent template-copy test is needed: upstream owns generic bootstrap coverage, and this repository supplies no custom selector logic. - Perform one disposable annotated-tag bootstrap exercise using the actual command block and module-selected tool. Use a temporary consumer checkout containing the current sprint changes, a committed fixture release note, and a local-only `origin`. Supply fixture `CI_WORKSPACE`, `CI_COMMIT_TAG`, and an event ID resolving to that tag's source commit. Never use the real repository's origin in this exercise. - Explicitly remove the delivery-token environment value in the fixture, with no token file selected. Successful tag/bootstrap/profile handoff must reach the native missing-credential error with status 2, before forge access. Verify tagged module files stayed unchanged and temporary bootstrap metadata was cleaned up. Dependency preparation for the tool may use ordinary public module downloads. This is bootstrap verification, not successful hosted delivery; report that distinction. ## Stage 4: Modernize Dependency Policy And Preserve Decision History **Completed:** Release and architecture policies and contributor guidance now express the public-source release requirement. ADR 0007 records the decision; ADR 0002's status identifies its partial supersession without rewriting its historical decision. Reviewed the wording and profile for conflicting bans or additional dependency-source enforcement. **Primary files:** `docs/policy/release.md`, `docs/policy/architecture.md`, `docs/development.md`, new `docs/adr/0007-public-release-dependencies.md`, and the Status section of `docs/adr/0002-split-promptkit-from-scriptorium.md`. ### Work 1. Replace the local release-policy selection that calls for committed workspace/vendor/all-replacement rejection with the agreed positive rule: Scriptorium releases depend on publicly available library sources and versions, independent of local checkouts. Apply it uniformly to all libraries, including release tooling, and distinguish development usage. Ordinary dependency review addresses this guidance. No dedicated checker, scanner, enforcement test, recurring sign-off, or publication gate is added. 2. Identify native ReleaseKit as the release machinery in the local selections. Keep race-enabled offline testing, both Linux build targets, branch-before- tag publication, annotated notes, immutability, and separate delivery status. Preserve general upstream release-policy wording and compatibility rules except where the approved local adaptation is actually needed. 3. Align architecture and contributor guidance: remove the blanket ban on committing workspaces, local replacements, or vendored PromptKit as a general development prohibition. Describe the release-scoped public-source requirement and link to the release policy. Preserve public-package/import rules and the application/framework ownership boundary. Clarify, where needed, that avoiding an application-maintained copy of framework logic is distinct from ordinary dependency vendoring; do not add vendoring support machinery or a new framework implementation. 4. Respect ADR immutability. ADR 0002's Compatibility And Versioning and Local Development sections contain stronger release-branch dependency rules. Create concise ADR 0007, Status Accepted, recording the already-approved release-dependency scope and library ownership of release mechanics, using the adopted lightweight format and the actual implementation date. Identify its replacement of the older tagged-dependency/local-replacement release restrictions and blanket workspace/filesystem-replacement commit rules with the agreed public-source release requirement. Update only ADR 0002's Status to identify this partial supersession and link to ADR 0007; the framework split and other decisions remain in force. Do not rewrite the old decision, supersede unrelated ADRs, or seek a new policy decision for what the user has already approved. 5. Update the Last Updated date of edited policies to the implementation date. Retain their adopted Base Policy Version and Upstream Source: local adaptation does not adopt a different standard-policy release. No upstream policy-suite refresh is part of this sprint. Existing ignore patterns for developer-local workspaces/vendor directories can remain; ignore rules are housekeeping, not mechanical release enforcement. ### Verification And Completion - Review current policy and contributor wording together for contradictory dependency-source requirements. Confirm stronger historical ADR wording is clearly scoped by the successor's status link rather than silently edited. - Confirm that preserving application boundary tests did not add any workspace/vendor/replacement validator, and that the native profile still has only the approved race selection beyond its standard checks. - The result is a policy change implementing the resolved user decision, not a justification for maintaining custom release checks. ## Stage 5: Attribute The Adopted Runtime And Copied Material **Completed:** ReleaseKit's runtime and adapted/copied material are attributed to the selected source. Its v0.10.0 tag resolves to the pinned commit; local LGPL and GPL texts match the system standard texts. Dependency inspection distinguished the runtime package and its internal implementation from the tool-only Markdown and module tooling. **Primary file:** `docs/oss/attribution.md`; existing standard texts under `docs/oss/licenses/` are reused. ### Work 1. Add a ReleaseKit entry in House Format. Identify the selected module/version and factually scope its public runtime version package, the root launcher adapted from the adoption guide, and the copied Woodpecker workflow. Preserve the selected source's copyright statement `Copyright (C) 2026 Eric Rakestraw` and SPDX expression `LGPL-3.0-or-later`. 2. Link the local LGPL 3.0 and GPL 3.0 texts and the upstream `COPYRIGHT`, `LICENSE`, and source at commit `82bac1a3ab935beddd4b8789d1e07f52135d4243`. Follow the existing factual component-entry style, including source/notice link labels and scope of any adapted material. Preserve required notices in incorporated material. 3. Compare reused license texts against their applicable standard texts; do not rewrite or duplicate them. The project grant and existing policy attribution stay unchanged. The roadmap/plan's links to upstream manuals do not copy those manuals into the repository. 4. Inspect `go list -deps ./cmd/scriptorium` and the resulting module graph to distinguish runtime imports from maintainer-tool dependencies. ReleaseKit's Markdown/module tooling is not application runtime merely because the tool shares `go.mod`. Update another entry only if an incorporated component's actual selected version/material changed; avoid adding graph-only entries or a blanket SBOM requirement. ### Verification And Completion - Verify notice wording, local text links, and pinned upstream file targets against the selected source. Reuse the existing OSS policy's treatment of notice links; add no license assets, legal review gate, or compliance essay. - Attribution accurately covers the material actually introduced by this sprint without relicensing the application. ## Stage 6: Rewrite The Maintainer Runbook And Align Canonical Documentation **Completed:** The runbook and current CLI, contributor, internal, migration, and navigation guidance now describe the native path and version handoff. Reviewed current documentation for obsolete script, injection, and mechanical dependency-ban references; checked pinned guide paths and credential mapping. `go mod download` and the harmless launcher version command succeeded offline. **Primary files:** `docs/release.md`, `docs/development.md`, `docs/cli.md`, `docs/internal/overview.md`, `docs/internal/adapters.md`, and relevant concise guidance in `docs/consumers/upgrading-cli.md` and `README.md`. ### Work 1. Replace the existing runbook with a short native workflow. It identifies: POSIX shell/Git and tagger identity, Go 1.27.4 and native race prerequisites, dependency preparation before offline validation, root invocation, `releasekit.json`, `main`, and authoritative `origin` (currently `ssh://git@forge.maximumdirect.net:22222/eric/scriptorium.git`). 2. Give the normal sequence: prepare and commit a version-matched note, publish the intended `main` commit, then invoke `sh ./releasekit publish VERSION`. Native `check` is optional diagnosis, not a preceding required stage. Identify the two Linux binaries and `SHA256SUMS`, with delivery run by the tag-triggered Woodpecker workflow. Explain successful source publication separately from delivery status in one brief orientation paragraph. 3. Keep upstream manuals canonical. Link the selected adoption, CLI, profile, build, publication/reconciliation, runtime-version, and delivery guides. Remove local algorithms, exact linker flags, custom Git-inspection recipes, plugin skip semantics, and copied status matrices. Give only the smallest native entry-point examples useful for the local runbook and link upstream for recovery, partial/unknown outcomes, and retention of original artifacts. Do not replace one long duplicated release manual with another. 4. Document the profile's native environment credential selection and the Woodpecker secret mapping from Stage 3. Source publication needs no delivery token. Local delivery, if mentioned, uses native `deliver` after preparing a suitable tagged checkout and dependencies; local token files are optional upstream functionality, not an extra setup requirement. 5. Retain preparation of the release-note footer with immutable links to Scriptorium's `COPYRIGHT`, `LICENSE`, and `docs/oss/attribution.md` at the chosen version under `https://forge.maximumdirect.net/eric/scriptorium`. Hosted delivery uses the complete committed note unchanged. Preserve historical notes and avoid a new publication-time link/network audit. 6. Update developer orientation to identify the selected native tool and the small `buildinfo` runtime use separately. Update the internal entrypoint inventory and adapter orientation to explain only the application handoff to CommandKit. In the CLI contract, identify the version provider and link upstream for fallback semantics; leave CommandKit's structured shape and options unchanged. Add a short migration note about loss of the separately injected revision and replacement of the old maintainer script. Link the runbook from existing contributor/navigation locations where useful. 7. Do not select a release version or edit historical notes to explain these changes. Record the implemented migration in the canonical guidance above; the runbook should remind preparation of the eventual adoption release to mention the new maintainer entry point and revision-metadata change. That future version-matched note belongs to release preparation, not a synthetic production note created to validate this sprint. 8. Repair references to the deleted script in current documents. Leave historical release records and decision content intact. Preserve deferred work in `docs/roadmap/future.md`; this sprint does not retire roadmaps until the user requests cleanup. The feature roadmap has no numbered stages to remove and remains the target-state owner. ### Verification And Completion - Check changed links, current script paths, package names, targets, and credential mapping. Verify harmless commands against the implemented tool; exercise publication examples only with the isolated fixture below, never against real `origin`. - No current documentation advertises the deleted script, old injection symbols, or retired mechanical dependency-source bans. Descriptions of native internals have been replaced by pinned canonical links, while local runbook selections remain discoverable. ## Stage 7: Verify The Assembled Consumer Integration And Hand Off **Scope:** final application/tool integration and documentation checks. Use temporary outputs/fixtures; do not add production release machinery. ### Work And Verification 1. Use Go 1.27.4 and provision needed public modules before offline checks. Run ordinary `go test ./...`, `go vet ./...`, and an application build to temporary output. Check formatting and `git diff --check`. Reuse focused checks from earlier stages when the relevant content is unchanged. 2. Exercise native validation and publication on the final sprint source in a disposable Git repository on `main`, with a local-only bare `origin`. Capture all final source/module/profile/launcher files; do not accidentally test a stale `HEAD` that omits uncommitted sprint changes. Commit a fixture note titled `# Scriptorium v0.0.0` there, with the usual footer shape. `v0.0.0` is an isolated test input, not the next Scriptorium release. 3. Push the fixture's candidate to its local bare `origin`, then invoke `sh ./releasekit publish v0.0.0` there with the actual production profile. This must run the race-enabled offline suite and both configured builds, including ReleaseKit's native application-version smoke check, and publish only to the local fixture remote. Inspect its successful annotated tag, source commit, and checked-in note in that bare repository. This satisfies the final race-suite/build verification; do not first run native `check` or add a duplicate explicit `go test -race ./...` to repeat that evidence. A successful ordinary source build alone does not verify injected version integration. No permanent publication harness or simulated push-failure matrix is needed; those are upstream responsibilities. 4. Reuse the actual tagged bootstrap check from Stage 3 if its inputs have not changed. Otherwise repeat it on the final fixture. Confirm native missing-credential classification before any hosted request; actual Gitea delivery and secret provisioning remain separately authorized deployment work, not prerequisites for finishing the repository implementation. 5. Check the final changed-file set, module registration, application dependency boundary, profile values, copied workflow provenance, and documentation navigation. Confirm the old script/harness and all production `main.version`/`main.revision` injection are gone. Existing application behavioral tests must still pass. Do not turn this review into a new automated dependency-source gate. 6. Review against every section of the feature roadmap. Record actual checks, fixture-only limitations, commits, and the outstanding operator secret setup. Do not claim successful production publication, hosted delivery, or all-platform execution from these checks. Complete the normal commit workflow and leave a clean workspace; do not push without authorization. ### Completion All seven stages implement one native release path: module-selected tool, minimal launcher, product profile, public runtime version accessor, maintained native CI workflow, modernized dependency policy, and accurate attribution and documentation. Verification is proportionate consumer integration work, not new permanent release gates. The agreed dependency-source policy is guidance, with no dedicated mechanical enforcement remaining. ## Open Questions No implementation-blocking design questions remain. The dependency-source choice is resolved. Selecting the actual next release version and provisioning the agreed Woodpecker secret are later release/deployment tasks, not open implementation choices or new approval gates for this sprint. [adoption]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/adoption.md [configuration]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/config.md [workflow]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/examples/woodpecker/tag-delivery.yml