multi-channel-release
Standardized playbook and operational invariants for end-to-end multi-channel releases of Context Crystal across GitHub Releases, Maven Central (Sonatype Central Portal), Homebrew, and Coursier.
- License 许可
- MIT
- 最近更新
- 2026-10-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- multi-channel-release
- metadata
- { "version": "1.0", "schemaVersion": "1.0.0" }
- description
- Standardized playbook and operational invariants for end-to-end multi-channel releases of Context Crystal across GitHub Releases, Maven Central (Sonatype Central Portal), Homebrew, and Coursier.
03 SKILL.md 正文
Multi-Channel Release Skill
This skill codifies the complete operational lifecycle, architecture invariants, and automated verification procedures for releasing Context Crystal across all public distribution vectors:
- Maven Central (Sonatype Central Portal): JVM binaries and library dependencies (
io.github.oswaldo:ccrystal-cli_3,ccrystal-core_3). - GitHub Releases: Prebuilt standalone native binaries for 4 target architectures (
linux-x86_64,linux-aarch64,macos-aarch64,macos-x86_64) and consolidatedSHA256SUMS. - Homebrew: Standalone tap formula (
oswaldo/homebrew-context-crystal). - Coursier Application Channels: In-repo descriptor (
apps.json) and upstream catalog (coursier/apps). - Universal OS Support: Windows, Linux, macOS, and BSD execution via the JVM runtime.
1. Architectural Invariants & Hard-Learned Lessons
A. Sonatype Central Portal & sbt Requirements
- sbt 1.11+ / 1.13+ Requirement: Publishing to the modern Sonatype Central Portal relies on the built-in
localStagingresolver. Older versions of sbt (<= 1.10.x) lacklocalStaging, causingsbt-ci-releaseto fail withRepository for publishing is not specified. Always use sbt 1.13.0+. sbt-ci-release 1.12.xDecoupling: Modernsbt-ci-releaserelies directly on sbt's nativelocalStagingandsbt-dynver. Do not add redundantsbt-sonatypeor obsolete endpoint keys (sonatypeCredentialHost,sonatypeRepository) inbuild.sbt.- Mandatory
versionScheme: Always declareThisBuild / versionScheme := Some("early-semver")inbuild.sbtto satisfy eviction verification. - Explicit
scmInfo(Forge Privacy Invariant): Do not rely on git remotes to inferscmInfo. In multi-forge setups whereoriginpoints to a private developer forge (Codeberg), explicitly setThisBuild / scmInfoinbuild.sbtpointing to the public GitHub repository. This prevents leaking private forge URLs into published Maven POMs. - Asynchronous Validation Queues: Sonatype's automated verification queue extracts
.ascsignatures, verifies keys against public keyservers (keyserver.ubuntu.com,keys.openpgp.org), checks POM schemas, and lints javadocs. This process typically takes 3 to 15 minutes. The upload payload is small (~3.2 MB total across CLI and Core JARs); elapsed time is server-side verification queue latency. - Immutability Invariant: Maven Central releases are strictly immutable. Once a version (e.g.
1.0.1) is published, it can never be deleted or overwritten. Never burn a release version on an unverified build.
B. Upstream coursier/apps PR Invariants
-
Runnable Dependencies Required: 100% of apps in
coursier/appsrequire runnable JVM coordinates under"dependencies".cs launchstrictly constructs classpaths from"dependencies"; declaring placeholder libraries causescs launchto crash. Always declare:"dependencies": [ "io.github.oswaldo:ccrystal-cli_3:latest.release" ] -
Launcher Type Idiom: Use
"launcherType": "scala-native"for Scala Native executables. -
Dynamic
${version}Interpolation: Usev${version}inprebuiltBinarieswith thegz+tarball extraction scheme so future releases automatically resolve without modifying the descriptor:"x86_64-pc-linux": "gz+https://github.com/oswaldo/context-crystal/releases/download/v${version}/ccrystal-v${version}-linux-x86_64.tar.gz!ccrystal" -
Explicit Main Class Fallback: Include
"mainClass": "ccrystal.cli.Main?"as standard defensive metadata. -
Strict
check-pr-scopeInvariant: Upstreamcoursier/appsenforces a strict CI check (.github/workflows/check-pr-scope.yml) that forbids mixing hand-written descriptors with generated listing aggregations. NEVER commitlistings/in PRs. Only touchapps-contrib/resources/ccrystal.json. -
GitHub Channel Branch Shorthand (
gh:org/repo/branch): When referencing an in-repoapps.jsonchannel on themainbranch via Coursier'sgh:shorthand, always use a slash (gh:oswaldo/context-crystal/main), never a colon (gh:oswaldo/context-crystal:main). Coursier interprets:mainafter the repository name as a file path on the defaultmasterbranch (master/main), resulting in HTTP 404.
C. Collaborative Release Notes Protocol
- User-Facing Deliverable Focus: Release notes are public product communications. They must focus strictly on tangible user- and AI-facing deliverables:
- New features and CLI capabilities
- Bug fixes and reliability hardening
- Installation and upgrade methods
- Public API and library additions
- Strict Exclusion of Meta-Rules: Repo-internal process improvements, governance guidelines codified into
AGENTS.md, agent prompt engineering, and developer-internal workflows are not external deliverables and must be strictly excluded from public release notes.
D. Zero-Telemetry Terminology Invariant
- 100% Local & Sovereign: Context Crystal is strictly offline, deterministic, and local-first. Never use the word "telemetry" in user-facing CLI options, command descriptions, release communications, or public documentation to describe local workspace inspection, storage accounting, or token savings. Avoid surveillance and phone-home stigmas; prefer metrics, statistics, accounting, observability, or inspection.
2. Pre-Release Verification Checklist
Execute the complete verification sequence prior to cutting any release tag:
# 1. Code formatting and linter checks
sbt "scalafmtCheckAll; scalafixAll --check"
# 2. Markdown documentation linting
npx markdownlint-cli "README.md" "AGENTS.md" "docs/*.md" "skills/**/SKILL.md"
# 3. Shell script verification
npx shellcheck install.sh && find skills -name "*.sh" -exec npx shellcheck {} +
# 4. Full cross-platform test matrix (Native, JVM, JS)
sbt test
# 5. Local dry-run packaging and POM verification
sbt "coreJVM/publishLocal; cliJVM/publishLocal"
3. Release Execution Sequence
Step 1: Draft and Commit User-Facing Release Notes
- Draft release notes adhering strictly to the User-Facing Deliverable Focus rule, present them to the human operator, and obtain explicit sign-off before tagging.
- Save the approved notes to
docs/releases/<version>.md(e.g.docs/releases/v1.0.2.md) and commit tomain. The.github/workflows/release.ymlworkflow automatically detects this file and injects it as the official GitHub Release body, falling back to auto-generated commit logs only if no file exists.
Step 2: Create and Sign Git Tag
# Example: Cutting patch release v1.0.2
git tag -s v1.0.2 -m "Release v1.0.2: <User-facing summary>"
# Verify tag signature and version resolution
git tag -v v1.0.2
sbt "cliJVM/version" # Must output exact tag version without -SNAPSHOT
Step 3: Push Gate (Human-in-the-Loop)
Instruct the operator to push the tag and branch using their locked transport key:
git push github main && git push origin main
git push github v1.1.0 && git push origin v1.1.0
[!TIP] Unified Push Helper Script Pattern: When a release touches multiple repositories or remotes (
context-crystal,homebrew-context-crystal,context-crystal-gh-pages), the agent should generate a clean, temporary POSIX helper script (/tmp/push_release_bundle.sh) withset -euo pipefailand executable permissions. This allows the operator to execute the push sequence with their locked transport key in a single turn without repetitive cross-terminal copy-pasting. Remove the helper script immediately after the pushes succeed.
Step 4: Monitor Release Workflow
Track GitHub Actions run for .github/workflows/release.yml:
build-release-matrix: Compiles native binaries forlinux-x86_64,linux-aarch64,macos-aarch64, andmacos-x86_64.publish-release: Publishes GitHub Release with native.tar.gzbundles andSHA256SUMS.publish-maven-central: Runssbt ci-release, uploading signed JVM artifacts to Sonatype Central Portal.verify-release-smoke: Automatically runs post-release clean-room smoke verification (install.shchecksum verification and atomicccrystal batchDAG lifecycle) across bothubuntu-latestandmacos-14runners so release integrity does not depend on which machine triggered the release.
4. Post-Release Synchronization
Once the GitHub Release and Maven Central publishing succeed:
1. Synchronize Homebrew Formula (Formula/ccrystal.rb)
- Fetch fresh checksums from
https://github.com/oswaldo/context-crystal/releases/download/v<version>/SHA256SUMS. - Update
versionand platform SHA256 checksums inFormula/ccrystal.rb. - Copy updated formula to downstream tap repository
oswaldo/homebrew-context-crystaland push.
2. Synchronize Coursier Application Channel (apps.json)
Verify that root apps.json and upstream apps-contrib/resources/ccrystal.json maintain dynamic ${version} and "io.github.oswaldo:ccrystal-cli_3:latest.release".
3. Update Web Showcase Portal & llms.txt (../context-crystal-gh-pages)
Always execute the complete portal release synchronization checklist:
- Brand Badge: Update the version string in
site/Header.scala(span(className := "brand-badge", "v<version> • ...")). - MCP Tool Catalog: Update tool counts and table entries in
site/TabMcp.scalato reflect new or modified tools. - Platform Matrix: Verify platform compiler and linker optimizations in
site/TabQuickstart.scala. - Cache Busting Invariant: Update the script tag in
index.htmlwith a version query string (<script type="module" src="main.js?v=<version>"></script>) to immediately bust browser caches for returning visitors. - AI Discovery: Update
/llms.txtand/llms-full.txtwith the new version number, commands, and MCP tools. - Bundle Recompilation: Recompile the static bundle with
scala-cli --power package site --js-mode release -o main.js --force. - Commit & Push: Commit changes to
gh-pagesand push via the operator push gate.
5. Clean-Room Smoke Verification
Verify that official installation pathways succeed on target environments. Always use isolated temporary directories (--to and --install-dir) when smoke testing on an operator or developer machine so you do not shadow the active PATH binary (e.g., Homebrew) or leave dangling symlinks in ~/.local/bin or Coursier's bin directory:
SMOKE_DIR="$(mktemp -d)"
# 1. Universal POSIX bootstrap (Linux / macOS Native, isolated --to)
curl -fsSL https://raw.githubusercontent.com/oswaldo/context-crystal/main/install.sh | sh -s -- --to "$SMOKE_DIR/posix"
"$SMOKE_DIR/posix/ccrystal" --store "$SMOKE_DIR/store" batch "init smoke -g 'Smoke test'; conclude smoke -s 'Verified'"
# 2. Homebrew
brew upgrade oswaldo/context-crystal/ccrystal || brew install oswaldo/context-crystal/ccrystal
ccrystal --help
# 3. Coursier Zero-Install (Universal: Windows, Linux, macOS, BSD)
cs launch io.github.oswaldo:ccrystal-cli_3:latest.release -- --help
# 4. Coursier Local Install (isolated --install-dir, using /main branch syntax)
cs install --channel gh:oswaldo/context-crystal/main --install-dir "$SMOKE_DIR/cs" ccrystal
"$SMOKE_DIR/cs/ccrystal" --help
rm -rf "$SMOKE_DIR"
04 同仓库更多 Skills
sample_runner
暂无简介
media
暂无简介
context-crystal
Universal agent skill for Context Crystal. Automates context lifecycle management, state transitions, session persistence, context cleavage, and prompt hydration with zero learning curve for users.
ccrystal-dev-hygiene
Standardized session conclusion and debrief protocol for Context Crystal developers and AI agents. Ensures causal state persistence, clean worktree/branch hygiene across multi-forge remotes, in-flight lease defense, and zero workspace debris before session close.
media
暂无简介
multi-channel-release
暂无简介