From 8d0c5f98adf0c53feec659fa0cefb307658e3969 Mon Sep 17 00:00:00 2001 From: PBNZ <93853627+PBNZ@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:34:17 +1200 Subject: [PATCH] feat(new-repo): early-licence opt-in for promotion-planned private repos (refs #32) The promotion path wants nothing to scrub at flip time, yet following it used to require declaring a variance to stamp LICENSE before going public. The interview now asks private repos "is a public release already planned?" - yes stamps LICENSE at Core from the existing Public-tier template, plus a minimal NOTICE when third-party licensed material is expected while still private (attribution is owed from the moment the material arrives). Recorded in ADR-0001, no variance row: the standard's Promotion path section states the early licence IS the promotion path. Default stays no. Decided in ADR-0011. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_013g4xpqBjwwzfqtKyEHuWUr --- CHANGELOG.md | 9 +++++ docs/CHECKPOINT.md | 10 +++--- ...rly-licence-for-promotion-planned-repos.md | 36 +++++++++++++++++++ plugins/repokit/skills/new-repo/SKILL.md | 6 ++++ .../references/file-set-resolution.md | 27 ++++++++++++++ .../repo-standard/standard/the-standard.md | 7 ++++ 6 files changed, 91 insertions(+), 4 deletions(-) create mode 100644 docs/adr/0011-early-licence-for-promotion-planned-repos.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 68221f8..049759b 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. + ## [0.6.0] - 2026-08-13 ### Added diff --git a/docs/CHECKPOINT.md b/docs/CHECKPOINT.md index b34f4e5..83eea62 100644 --- a/docs/CHECKPOINT.md +++ b/docs/CHECKPOINT.md @@ -4,9 +4,11 @@ Resume state: what a fresh session needs to pick this repo up. Keep every line c pre-commit checklist has the tripwire, and stale entries are worse than none. - Last updated: 2026-08-13 -- Status: DONE -- In progress: nothing — author-identity + branch-hygiene batch (#25/#26/#28, PRs #29/#30, - ADR-0009) merged and closed; release 0.6.0 cut; `delete-branch-on-merge` enabled on the repo -- Next step: paused — nothing pending +- Status: IN PROGRESS +- In progress: scaffolding field-report batch #31/#32/#33/#34 — four local branches ready for + review (`fix/31-planned-start-here-paths`, `docs/33-adopt-existing-dir-and-branding`, + `feat/32-early-licence-optin`, `feat/34-privacy-guard`; ADR-0010/0011/0012) +- Next step: review the four branches locally, push, open one PR each (`Refs #NN`), merge in + numeric order resolving trivial `CHANGELOG.md` [Unreleased] overlaps, verify each issue, close One line per fact, current state only — history lives in `CHANGELOG.md` and git. 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 34fd8fd..fb39af0 100644 --- a/plugins/repokit/skills/new-repo/SKILL.md +++ b/plugins/repokit/skills/new-repo/SKILL.md @@ -39,6 +39,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 c2fa315..e22cbd5 100644 --- a/plugins/repokit/skills/repo-standard/standard/the-standard.md +++ b/plugins/repokit/skills/repo-standard/standard/the-standard.md @@ -186,6 +186,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