From b2a09096c7d01e09b98a48404209dea39a572d43 Mon Sep 17 00:00:00 2001 From: Marcin Polewski Date: Sun, 8 Nov 2026 19:12:07 -0700 Subject: [PATCH 1/6] Plan step 1: Update from project-template v0.75.1 --- .claude/commands/finish-plan.md | 4 +- .claude/commands/ship-plan.md | 13 +- .claude/hooks/ensure-pwsh.sh | 58 +++++ .claude/settings.json | 25 +- .copier-answers.yml | 3 +- .../project-template.instructions.md | 13 +- .github/prompts/finish-plan.prompt.md | 4 +- .github/prompts/ship-plan.prompt.md | 13 +- .github/skills/finish-plan/SKILL.md | 4 +- .github/skills/ship-plan/SKILL.md | 13 +- .github/workflows/copilot-setup-steps.yml | 2 + .github/workflows/tag-release.yml | 50 ++++ .template-version | 2 +- .template/Initialize-Nvs.ps1 | 109 +++++++++ .template/Publish-Release.ps1 | 216 ++++++++++++++++++ .template/Update-Project.ps1 | 25 +- .template/Use-Node.ps1 | 53 +++++ .template/use-node.sh | 47 ++++ ...rnal-inputs-are-pinned-and-kept-current.md | 7 +- ...ublished-when-their-pull-request-merges.md | 63 +++++ ...-comes-from-nvs-and-a-node-version-file.md | 48 ++++ docs/decisions/project-template/README.md | 7 + 22 files changed, 742 insertions(+), 37 deletions(-) create mode 100644 .claude/hooks/ensure-pwsh.sh create mode 100644 .github/workflows/tag-release.yml create mode 100644 .template/Initialize-Nvs.ps1 create mode 100644 .template/Publish-Release.ps1 create mode 100644 .template/Use-Node.ps1 create mode 100644 .template/use-node.sh create mode 100644 docs/decisions/project-template/0016-releases-are-tagged-and-published-when-their-pull-request-merges.md create mode 100644 docs/decisions/project-template/0200-nodejs-comes-from-nvs-and-a-node-version-file.md diff --git a/.claude/commands/finish-plan.md b/.claude/commands/finish-plan.md index 740ce443..3207f780 100644 --- a/.claude/commands/finish-plan.md +++ b/.claude/commands/finish-plan.md @@ -26,7 +26,7 @@ Extra instructions (may be empty): $ARGUMENTS 1. Read the state: run `pwsh -NoProfile -File .template/Get-PlanState.ps1` from the repository root, adding `-Path ` when the plan is in another folder. It fetches `origin` and prints `key: value` lines; `-` means none. Below, `` is its `default` value and `` its `branch` value. When `dirty` is `yes`, stop and list the files `git status --porcelain` prints. When `feedback` isn't `-`, stop: the plan belongs to a stopped `/address-feedback` run on pull request ``, and `/address-feedback ` finishes it, or discards it once that pull request is merged or closed. When `steps` isn't `-` and its two counts differ, as in `3/5`, stop and list the step headings in `PLAN.md` that don't start with `### [x]`. When `unfiled` is above 0 and the `landing` line's `follow-ups` isn't `none`, stop: the `## Follow-ups` section of `PLAN.md` lists follow-ups that were never filed as issues. List those lines, and say to run ship-plan, which files them, then finish-plan again. 2. Check the work is upstream: the check passed when `landed` is `yes`. The script counts the branch as landed when `HEAD` is on `origin/`, or when `gh` or `glab` finds a merged pull request from it whose merge commit is on `origin/` and whose head holds `HEAD` or has the same tree, as a squash merge or a merge queue leaves it. When `ahead` isn't `0`, it landed the second way: name the pull request on the `pr` line. When `default` is `-`, stop: there is no `origin` remote. Otherwise — no such pull request, or `pr` is `unknown` because the CLI is missing or failed — show `git log --oneline origin/..HEAD` and stop to ask me whether to push those commits first or whether they reached the default branch another way. -3. Retire the plan: delete `PLAN.md` when it exists. +3. Retire the plan: first note, in order, each line of the `## Follow-ups` section of `PLAN.md` that ends with ` — next — filed as #` or ` — next — already tracked as #`, with its number. Then delete `PLAN.md` when it exists. 4. Fast-forward the default branch: run `git switch `, then `git pull --ff-only`. When either fails, stop and report the error. 5. When the plan's branch is not `-` and not the default branch, delete it with `git branch -d `. When `-d` refuses, use `git branch -D ` only if step 2 passed or I confirmed the commits reached the default branch. When `origin/` still exists, say so and leave it: deleting it is a push. -6. Finish with the range `git pull` printed (or "already up to date"), the default branch's commit (`git log --oneline -1`), and the branches deleted. +6. Finish with the range `git pull` printed (or "already up to date"), the default branch's commit (`git log --oneline -1`), and the branches deleted. When item 3 noted a follow-up, end with the command that plans it next, from the default branch in this session or a new one: `/plan-issue #` for each noted follow-up, one per line, in order; and when it noted two or more and the `landing` line's `integrate` is `pull-request`, also `/run-issues # # …` with every noted number, which takes them all in one session. diff --git a/.claude/commands/ship-plan.md b/.claude/commands/ship-plan.md index c4c3524b..48240190 100644 --- a/.claude/commands/ship-plan.md +++ b/.claude/commands/ship-plan.md @@ -24,24 +24,25 @@ Extra instructions (may be empty): $ARGUMENTS 1. Read the state: run `pwsh -NoProfile -File .template/Get-PlanState.ps1` from the repository root. It prints `key: value` lines. Below, `` is its `default` value, `` its `branch` and `` its `release`. Stop and say what to run instead when `plan` is `-`; when `dirty` is `yes`; when `steps` shows an open, escalated or failed step (run orchestrate-plan, or replan-step); when `reviewed` isn't `current`, because the work changed since its last clean review or never had one (run review-plan-diff); when `next` is `finish-plan`, because everything is done (run finish-plan); or when `feedback` isn't `-`, because the plan belongs to a stopped `/address-feedback` run on pull request ``, whose fixes go to that pull request's branch, with a reply on each item, never to a pull request of their own (run `/address-feedback `, which finishes that run). 2. Read the policy from the `landing` line: `integrate` is `direct` or `pull-request`, `release` is `none`, `tag` or `tag+release`, and `changelog` names the changelog file. `draft` is `yes`, which opens the pull request as a draft, or `no`, the default when the Landing section has no `- draft:` line: it stays `no` so that no template update changes how an existing project lands, a project that wants drafts writes `- draft: yes`, and `run-issues` asks for a draft with its extra instructions either way. `follow-ups` is `issues`, which files the plan's follow-ups as issues in this repository, `none`, which files none, or a repository path such as `owner/repo` or `group/subgroup/project`, which files them there. `follow-up-label` names the label filed follow-ups get, in double quotes when it has a space; below, `