0095. Open source under AGPL-3.0, with the SDLC, protection and releases as code
Source:
docs/decisions/0095-open-source-sdlc-and-releases.md. Generated at build time; edit the source file.
- Status: accepted
- Date: 2026-11-23
- Lane: L1 (
chore/open-source-foundation)
Context
Section titled “Context”The project goes public as Rematch, chess improver so the community can help build it. A
public repository needs a licence, community files, a clear way for strangers to contribute, a
main branch only the maintainer can change, and releases people can follow. The repository is
private today (free plan), where rulesets are not available; they start working the moment it
is public. The owner decided (2026-11-23): AGPL-3.0, only the owner merges to main, the rules
kept as code and applied from the owner’s login with no stored admin token, the history kept as
it is, and a beta versioned from 0 until there is an MVP.
Decision
Section titled “Decision”- Licence:
AGPL-3.0-only.LICENSEis GitHub’s AGPL-3.0 text; everypackage.jsonand the Cargo workspace carry the SPDX id.NOTICElists the third-party work with its own licences: Stockfish 19 (GPL-3.0-or-later, an unmodified official binary checked by SHA-256 and run as a separate process), Maia-2 (MIT, opt-in), the Syzygy tables (computed data, fetched and verified, never committed), the Lichess opening names (CC0), the cburnett pieces (BSD-3), the OFL fonts, Phosphor, chess.js and react-chessboard./licensesshows Stockfish’s licence notice from itssf_19source with a link to that source.cargo denykeeps third-party crates to permissive licences; the workspace crates are private and are skipped. - Community files: CONTRIBUTING, the Contributor Covenant 2.1 (reports through GitHub private
reporting, no published email), SECURITY (private vulnerability reporting), SUPPORT, GOVERNANCE
(one maintainer who merges, and how trust is earned), issue forms (bug, feature, coaching idea;
blank issues off), a PR template,
CODEOWNERS, and Dependabot (weekly, grouped, with a 7-day cooldown to matchcheck-npm-age.mjsandcheck-crate-age.sh). - The lifecycle is
docs/SDLC.md: issue, triage labels, fork and branch, PR, CI green, maintainer review, squash merge with a Conventional title, release. - Protection as code in
.github/settings/:rulesets/main.json(GitHub’s REST ruleset schema) targets~DEFAULT_BRANCH: no deletion or force push, linear history, a pull request (0 approvals, conversations resolved, squash only), and strict required checksts,e2e,e2e-fakes,rust,baseline-schema,schema-driftandpr-title, each pinned to the GitHub Actions app (id 15368). The only bypass actor is the repository admin role (id 5, always), so the maintainer alone can merge or push; contributors work from forks.repo.json: squash merges only, titled by the PR, branches deleted on merge, Discussions on, wiki and projects off, the description, homepage and topics, private vulnerability reporting, and Pages built by Actions.labels.json: the triage labels.scripts/github/apply-settings.sh [--dry-run] [--prune]reads the live state withgh, prints a diff, and writes only what differs (the ruleset found by name and updated in place, else created), so it is idempotent. It runs under Git Bash on Windows and on Linux. The maintainer runs it from their own login right after the repository is made public.scripts/github/test-settings.mjs(in thetsjob) validates the files and fails when the required checks and the job names inci.ymlandpr-title.ymlpart ways, so renaming a job cannot silently drop protection.Settings drift(weekly, and on changes) compares what a read-onlyGITHUB_TOKENcan see: the ruleset’s rules, its bypass list when visible, the labels and the public repo fields. It only notices while the repository is private.
- CI for a public repository:
pushruns only onmain,pull_requestruns for every branch and fork, with concurrency that cancels superseded runs and read-only permissions. No workflow uses a secret. - One product version and releases:
- The root
package.jsonis the version; release-please keepsapps/web/package.json, the Cargo workspace version (ax-release-please-versionmarker) and the workspace crates inCargo.lock(thetomlupdater on$.package[?(!@.source)].version, checked against the lock file with release-please 17.11.2) in step.scripts/test-versions.mjsfails CI if they differ. - SemVer with every 0.y.z a beta:
bump-minor-pre-majorandbump-patch-for-minor-pre-majorare both on, so while the major is 0 a breaking change bumps the minor andfeatorfixbump the patch. This keeps the minor for “you may need to change something” and lets features ship often without racing towards 1.0. - 1.0.0 is reserved for the MVP, a deliberate maintainer decision in its own ADR, set with
release-as, never reached by a commit message. GitHub Releases are prereleases while below 1.0 (prerelease: true, which the version test ties to the major), taggedv0.y.z. - The first release is 0.1.0: the manifest starts at 0.0.0 with
release-as: 0.1.0, and the changelog starts after9717616(bootstrap-sha), so the ~980 private commits are not replayed.CHANGELOG.mdopens with a pre-history note pointing to this decision log. - The changelog sections read for players: Features, Fixes, Performance, Reverts and Docs; chore, test, ci, refactor, build and style are hidden.
- The
Releaseworkflow (release-please-action v5.0.0, pinned by commit) is the only workflow with write permissions,contentsandpull-requests, on its ownGITHUB_TOKEN. - Squash merges use the PR title, so the
PR titleworkflow (amannn/action-semantic-pull-request v6.1.2, pinned by commit) checks it on plainpull_requestwith a read token, neverpull_request_target, and is a required check. - The app shows “Rematch v0.1.0 · beta” in the account menu, from the build’s package version.
- The root
Alternatives
Section titled “Alternatives”- MIT or Apache-2.0. More permissive, but a hosted fork could close the source. AGPL keeps network deployments open, which suits a community-built coaching service.
- Branch protection through the UI. Not reviewable, not testable, and drifts silently.
- An admin token in CI to apply settings. A stored admin secret in a public repository is the largest risk the project could take; applying from the maintainer’s login avoids it.
- Starting at 1.0.0, or letting
featbump the minor. Either would promise stability the beta does not have, or burn through minors with every feature. - Per-package versions. The web app, worker and backend ship together as one product; one version is what players and bug reports need.
Consequences
Section titled “Consequences”- Rulesets are only enforced once the repository is public: the maintainer runs
apply-settings.shright after the flip, then checks the drift workflow is green. - Every new CI job must be added to
rulesets/main.jsonin the same PR, ortsfails. - The release PR is opened by
GITHUB_TOKEN, which does not trigger other workflows, so its required checks don’t report; the maintainer merges it with the admin bypass. - After 0.1.0 ships,
release-asmust be removed fromrelease-please-config.json(test-versions.mjswarns). - The visual baselines and fixtures use the synthetic handle
sample_playerinstead of a real third-party Lichess player; the games themselves are unchanged.