diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cf8f80..2f1cd60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- `/new-repo` offers an **early-licence opt-in** to promotion-planned private repos (#32, + ADR-0011): answer yes to "is a public release already planned?" and `LICENSE` is stamped at + Core from the Public-tier template — plus a minimal `NOTICE` when third-party licensed + material is expected while still private. Recorded in ADR-0001, no variance row needed: the + standard's *Promotion path* now states an early licence is the promotion path, not a + deviation. Default stays no; forever-private repos keep zero ceremony. + ### Fixed - `repokit-check.ps1` no longer fails START-HERE rows that declare planned-but-not-yet-created diff --git a/docs/adr/0011-early-licence-for-promotion-planned-repos.md b/docs/adr/0011-early-licence-for-promotion-planned-repos.md new file mode 100644 index 0000000..de680da --- /dev/null +++ b/docs/adr/0011-early-licence-for-promotion-planned-repos.md @@ -0,0 +1,36 @@ +# ADR-0011: Early licence — LICENSE (+ NOTICE) at Core when promotion is planned + +- **Status:** accepted +- **Date:** 2026-08-13 + +## Context + +Field report #32: the promotion path (private now → public later, "nothing to scrub") is core +RepoKit philosophy, but `LICENSE` ships only at the +Public tier. Two cases want it at commit +one: the public release is already planned, so the licence choice is made and stamping it later +adds a promotion step without adding safety; and third-party licensed material incorporated +while still private, whose attribution belongs in `NOTICE` from the moment the material arrives, +not from the go-public commit. Doing this before required a declared variance (START-HERE row + +ADR) — following the standard's own promotion philosophy required declaring an exception to the +standard. + +## Decision + +An opt-in interview question in `/new-repo`, offered to private repos only: "Is a public release +already planned?" — yes stamps `LICENSE` from the existing Public-tier template, and a follow-up +("third-party material expected?") additionally stamps a minimal `NOTICE` (name, copyright, +placeholder for attributions; content specified inline in `references/file-set-resolution.md` +rather than as a template, so the Public tier's default file set is unchanged). The choice is +recorded in ADR-0001 automatically. **No variance row**: the standard's *Promotion path* now +states that an early licence on a promotion-planned repo is the promotion path itself, not a +deviation from the Core file set. The default stays **no**, so forever-private repos keep zero +ceremony. + +## Consequences + +Promotion-planned repos carry their licence from commit #1 and third-party attribution from the +moment it is owed, with one less step (and nothing to scrub) at flip time. The tier model gains +one named, documented exception — a Public-tier template shipping at Core — alongside the +existing living-docs `docs.yml` exception (ADR-0006), both stated in +`references/file-set-resolution.md`. Repos that opt in and then never go public carry a harmless +LICENSE; nothing else changes for them. diff --git a/plugins/repokit/skills/new-repo/SKILL.md b/plugins/repokit/skills/new-repo/SKILL.md index afb1e37..c930077 100644 --- a/plugins/repokit/skills/new-repo/SKILL.md +++ b/plugins/repokit/skills/new-repo/SKILL.md @@ -41,6 +41,12 @@ Gather these from the user's arguments / message, else ask — keep it to load-b operational state (deployed resources, scheduled jobs, long-running migrations)?"* If yes, the add-on stamps `docs/RUNBOOK.md`, `docs/STATE.json`, `scripts/check-docs.ps1`, and a `docs.yml` check workflow (see `references/living-docs-rules.md`). +- **early licence** — *private repos only*, default **no**. Ask: *"Is a public release already + planned?"* If yes, stamp `LICENSE` now from the Public-tier template, and ask one follow-up: + *"Will third-party licensed material be incorporated while still private?"* — if so, also + stamp `NOTICE` (see `references/file-set-resolution.md`, *Early licence*). Record both answers + in ADR-0001. No START-HERE variance row — an early licence on a promotion-planned repo follows + the standard's *Promotion path*, it doesn't deviate from it. - For `powershell-module` only: **ModuleName** (PascalCase, e.g. `MyModule`). If the chosen type is a **stub** (anything other than `powershell-module`, `docker-compose`, or `power-platform-connectors`), tell the user so: the diff --git a/plugins/repokit/skills/new-repo/references/file-set-resolution.md b/plugins/repokit/skills/new-repo/references/file-set-resolution.md index 6f80dbb..028081d 100644 --- a/plugins/repokit/skills/new-repo/references/file-set-resolution.md +++ b/plugins/repokit/skills/new-repo/references/file-set-resolution.md @@ -35,6 +35,33 @@ Deliberate exception to "CI ships at the Public tier": the `living-docs` add-on `docs.yml` check workflow at **core**, because deterministic doc-consistency enforcement is the add-on's entire point — including, especially, in a private repo (see ADR-0006). +## Early licence — promotion-planned private repos (opt-in) + +A `private` repo whose public release is already planned may opt in during the interview +(ADR-0011): + +``` +file_set ∪= templates/public/LICENSE.tmpl (on "public release already planned?" = yes) +file_set ∪= NOTICE (additionally, when third-party licensed + material is expected while still private) +``` + +This is the one deliberate case where a Public-tier template ships at Core: once the licence +choice is made, stamping it later adds a promotion step without adding safety, and third-party +attributions belong in `NOTICE` from the moment the material arrives — not from the go-public +commit. `NOTICE` has no template file; write it as: + +``` +{{name}} +Copyright {{year}} {{author}} + +Third-party attributions are added below as licensed material is incorporated. +``` + +Record the opt-in in ADR-0001. No START-HERE variance row is needed: an early licence on a +promotion-planned repo is the standard's promotion path, not a deviation from the tier's file +set (see the standard, *Promotion path*). + ## Precedence — higher tier wins, then type overlay wins If the same target path is produced by more than one template, pick a single winner (you never diff --git a/plugins/repokit/skills/repo-standard/standard/the-standard.md b/plugins/repokit/skills/repo-standard/standard/the-standard.md index 1c0ac26..c2dd98a 100644 --- a/plugins/repokit/skills/repo-standard/standard/the-standard.md +++ b/plugins/repokit/skills/repo-standard/standard/the-standard.md @@ -191,6 +191,13 @@ and rely on the identity check plus review. Private → public → published just **switches on the next layer** over the *same* structure. Moving a script from a private collection into a public collection repo is a **copy, not a rewrite**. +**Early licence (opt-in).** When the public release is already planned at scaffold time, +`/new-repo` offers to stamp `LICENSE` at Core — and `NOTICE` too, when third-party licensed +material will be incorporated while still private, since its attribution belongs there from the +moment the material arrives. The choice is recorded in ADR-0001; no START-HERE variance row is +needed, because a licence stamped early on a promotion-planned repo *is* the promotion path +("nothing to scrub at flip time"), not a deviation from the Core file set (ADR-0011). + ## Variance declarations The standard tolerates variants by design — ceremony scales by tier, and a README-status