Private Copier template for new repositories set up for plan-then-execute AI coding: Claude Opus plans each change into PLAN.md, a cheaper model executes it one verified step at a time, and any step that needs a decision goes back to Opus. Every project works with Claude Code and with GitHub Copilot, and you can switch between them at any time (Claude Code or GitHub Copilot). The base works for any language, with the decisions behind its rules recorded as ADRs; a .NET layer adds shared build settings, analyzers, banned APIs, C# and test conventions, and for libraries the license files, icon and a NuGet publish workflow. Projects live on GitHub by default, or on GitLab. Every project made from it can pull later template improvements with Update-Project.ps1.
Related: Configuration G — the accounts, the shack PC, the VS Code tunnel and the daily loop this template is built for. Plan-and-execute — how the workflow works and how to choose between its variants. This repository is the single source of truth for the workflow's templates and scripts (workflow/); personal-notes and every project consume them. USAGE.md — setting up a PC for Claude Code and GitHub Copilot, and using and switching between them.
- Adopt a Project, End to End: every manual step, in order, to create or adopt a repository and finish its setup
- What a Project Gets
- Claude Code or GitHub Copilot
- Extend or Override the Template
- Questions
- Create a Project
- Adopt an Existing Repository
- Protect the Default Branch
- Update a Project
- Commit Attribution
- Stay Current
- Change the Template
- Publish the Template
- Repository Layout
Every file has one of three owners, listed in copier.yml:
| Owner | Files | On update |
|---|---|---|
| Template | The workflow machinery | Replaced; an edit in the project is discarded |
| Template and project, merged | Settings files whose tools can't include a second file | The template's changes merge with the project's edits, like a Git merge |
| Project | AGENTS.md, README.md, .node-version (with uses_node) and, for .NET, Directory.Build.props and, for a library, version.json |
Never touched |
Where a tool can include a second file, the template's part and the project's part are separate files, so the project changes the template's behavior without editing it (Extend or Override the Template).
Replaced on every update. A project never edits them; an edit is discarded by the next update. A project that has to keep its own version of one, such as a build/dod.ps1 of its own, names it in the project_owned_files answer, which makes it project-owned (Project-Owned Files).
| File | Purpose |
|---|---|
.github/instructions/project-template.instructions.md |
The plan-then-execute rules and base conventions, for every agent, among them the languages tooling is written in: Node.js first, then Go, then PowerShell 7 (ADR-0021). Copilot loads it on its own; Claude Code imports it through the first entry in AGENTS.md |
CLAUDE.md |
Imports AGENTS.md for Claude Code and adds Claude-specific notes |
.claude/commands/ (28), .claude/agents/plan-executor.md |
Claude Code: /plan-feature, /plan-bugfix, /plan-issue, /triage-issues, /run-issues, /run-issues-all-in, /address-feedback, /run-feedback, /plan-template-update, /orchestrate-plan, /replan-step, /review-plan-diff, /ship-plan, /continue-plan, /finish-plan, /audit-conventions, /best-practices, … and the Sonnet subagent that executes steps; each plan runs in its own git worktree, so several sessions work at once — generated |
.github/agents/ (8 + 1), .github/prompts/ (29) |
Copilot Chat in VS Code: the Copilot agents (planner, implementer on Claude Sonnet 5.5, reviewer, orchestrator), the Hybrid agents (the same, with the Local Implementer on the shack PC's model), and the same commands as prompt files — generated |
.github/skills/ (28), .github/agents/plan-executor.agent.md |
Copilot CLI: the same commands as skills, and the agent /orchestrate-plan delegates to — generated |
build/ProjectTemplate.props (.NET) |
Latest C#, nullable reference types, implicit usings, warnings as errors, the .NET analyzers at latest-recommended with code style enforced in the build, XML documentation (so unused usings are reported; CS1591 off unless nuget_package), NuGet vulnerability warnings as errors in CI only, compile-time minimal-API request delegates, the null-forgiving operator banned outside test projects (Nullable.Extended.Analyzer), ContinuousIntegrationBuild when CI=true, author metadata; *.Tests projects aren't packable and take build/ProjectTemplate.Tests.globalconfig; with nuget_package, the license expression, the project's own README (or the repository's) and the icon in each package, Source Link with untracked sources and symbol packages, the package's project page set to the documentation site docs/site/site.config.json names (its site.url, the NCodeGroup/docs toolchain's config), else the repository, unless the project sets PackageProjectUrl, each packable project's public API checked against its PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt (PublicApiAnalyzers), EnablePackageValidation, which dotnet pack runs against the package's other target frameworks and, once the project sets PackageValidationBaselineVersion, against the last package on nuget.org (CP0002 fails the pack), and Nerdbank.GitVersioning stamping each assembly and package with the version in version.json, with AssemblyVersion on the major version, or, without version.json, AssemblyVersion pinned to the major version while FileVersion keeps the exact one |
build/dod.ps1 (.NET) |
The Definition of Done: checks the decision index, checks the formatting with dotnet csharpier check . (the Format stage, in -Fast too) when .config/dotnet-tools.json names CSharpier, builds in Release with every analyzer, runs the tests, with coverage_gate checks their coverage with .template/Test-Coverage.ps1 once a *.Tests project exists, and, with nuget_package, packs into artifacts/packages; stops at the first failing stage and ends with Definition of Done: PASSED. -Fast (Debug, no pack) is the local gate a new project's Landing section names; -Filter narrows the tests. CI runs it while the build and test commands are the defaults |
build/Get-TestRuntimes.ps1 (.NET) |
Names the .NET runtimes the <Name>.Tests projects in the root solution target besides the SDK's own, one channel per line, such as 8.0.x; on GitHub, the .github/actions/install-dotnet action, which CI, copilot-setup-steps.yml and publish.yml call, installs them with actions/setup-dotnet, and on GitLab, CI runs build/Install-Dotnet.ps1, so a test project that targets an older .NET runs there too |
build/Install-Dotnet.ps1 (.NET) |
Installs the .NET SDK global.json selects, as actions/setup-dotnet reads it: the version it names, or, under the rollForward policy latestPatch, latestFeature, latestMinor or latestMajor, the newest release that policy allows. Then installs the runtimes build/Get-TestRuntimes.ps1 names, or the channels -Channel names, from each channel's latest ASP.NET Core runtime archive, which holds the .NET runtime too. Takes each download from Microsoft's release metadata and refuses it unless it matches the SHA-512 the metadata gives; adds the SDK's files the installation lacks, replacing none, and only each runtime's shared/<framework>/<version> folders, skipping what is already there. Installs into the .NET that runs dotnet, or -InstallDir, on Windows, Linux and macOS; -SkipSdk installs only the runtimes. A request gives up after 30 seconds without an answer, or 60 seconds without more of a download. A failed one is tried twice more, after 5 and then 10 seconds, or after the Retry-After a 429 or 503 gives, up to 60 seconds, each plus up to a second at random so that clients don't retry in step; a client error other than 408 or 429 fails at once. Needs PowerShell 7.4 or later. .gitlab-ci.yml runs it before the build; on GitHub, the .github/actions/install-dotnet action installs the same SDK and runtimes with actions/setup-dotnet |
build/Update-PublicApi.ps1 (.NET, nuget_package) |
Creates each packable project's PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt when missing, records the public symbols they don't list yet and names the stale ones; -Release moves the unshipped entries into PublicAPI.Shipped.txt. Adopt-Project.ps1 runs it before verifying an adopted library |
build/Update-Baseline.ps1 (.NET, nuget_package) |
Raises each PackageValidationBaselineVersion that Directory.Build.props or a project file sets to a released version once nuget.org lists it for every packable project, never lowering one or adding one, and adds a ### Changed entry to a Keep a Changelog file's ## [Unreleased], in place of any baseline entry an earlier run left there; when it raises a project's baseline to a new major version, it removes the baseline suppressions (IsBaselineSuppression true, PKV006, PKV007) from the CompatibilitySuppressions.xml beside it, deleting the file when none is left; raise-baseline.yml runs it on GitHub, and it runs by hand anywhere (ADR-0150); a GitLab library's .gitlab-ci.yml raise-baseline job runs it from a version tag with BASELINE_TOKEN |
.template/Test-AdrIndex.ps1 |
Fails when docs/decisions/README.md's index misses a decision record, links one that doesn't exist or shows another number than its record's, when two records share a number, and when a record numbered below 1000 is new since the merge base with the default branch, so the records a project already had below 1000 still pass; without a merge base, as in a shallow clone, it skips that check and says so. CI runs it for every stack, on GitHub from a full clone and on GitLab against the merge request's base, and build/dod.ps1 runs it for .NET |
.template/Test-Coverage.ps1 |
Reads the coverage reports the tests wrote, Cobertura (.NET, Python, PowerShell) or LCOV (Node.js), merges them line by line, leaves out test code and the template's files, prints the statement and branch coverage and, with the coverage_gate answer, fails CI below 90% of the statements or 80% of the branches, the OpenSSF Best Practices gold thresholds; a report without branch data, as Pester writes, counts its branches as covered (ADR-0026) |
.template/Test-ReproducibleBuild.ps1 (.NET, nuget_package) |
Packs twice and compares entry by entry; run by the reproducible-build job of the GitHub ci.yml, and by hand on GitLab |
.template/Test-FileHeaders.ps1 |
Fails on a tracked source file, outside the template's folders, the five build/ scripts the template owns and any node_modules/ or vendor/ folder, among them hand-written .d.ts files, whose first 10 lines lack the comment lines Copyright © <author_name> and SPDX-License-Identifier: <license>: # comments in scripts, // in the C family and JavaScript, /* */ in stylesheets, and // inside an Astro component's frontmatter, which the build drops; -Fix adds them, after any #! line or a frontmatter's opening --- line, and gives an Astro component without frontmatter a --- block that holds them. With the file_headers answer, CI runs it (ADR-0027) |
.template/Initialize-Nvs.ps1 (Node.js, when uses_node) |
Once per PC: installs nvs with install-nvs.sh on Linux and macOS (on Windows it names the pinned winget command), adds nvs to ~/.bashrc and the PowerShell profile (idempotent, between # >>> nvs (project-template) >>> markers), installs the .node-version release and links it |
.template/Use-Node.ps1 (Node.js, when uses_node) |
Dot-sourced: accepts the node on PATH when it is the .node-version release, as in GitHub CI and Copilot's cloud agent, else selects it through nvs without a profile, and fails naming Initialize-Nvs.ps1 when neither works; it is the prelude a new project's AGENTS.md names |
.template/use-node.sh (Node.js, when uses_node) |
The same for bash, sourced in each Bash call and in GitLab CI, with the same rule and message |
.template/install-nvs.sh (Node.js, when uses_node) |
The one nvs installer outside Windows: clones nvs at the v1.7.1 tag and checks its commit, does nothing when nvs is there, and edits no profile; Initialize-Nvs.ps1, GitLab CI and .claude/hooks/ensure-nvs.sh run it |
build/ProjectTemplate.globalconfig, build/ProjectTemplate.Tests.globalconfig (.NET) |
The template's analyzer severities: unused usings (IDE0005) are errors; in *.Tests projects, CS1591, CA1707, CA1816, CA1859, CA1861 and CA1869 are off, each with its reason. .editorconfig overrides them |
build/BannedSymbols.txt (.NET) |
APIs banned in every project, tests included (RS0030, through Microsoft.CodeAnalysis.BannedApiAnalyzers): blocking on tasks (.Result, .Wait(), .GetAwaiter().GetResult(), WaitAll, WaitAny), JsonDocument.Parse (use JsonElement.Parse) and Newtonsoft.Json. A project bans more in a BannedSymbols.<name>.txt of its own |
.github/instructions/csharp.instructions.md (.NET) |
C# conventions for every *.cs file, applied by Copilot: code style, async, nullability, public API discipline, types and collections, file organization, DI registration, concurrency, security defaults, clean code, memory, testability, XML documentation, logging, metrics and traces, configuration, build and EF Core migrations |
.github/instructions/csharp-tests.instructions.md (.NET) |
Test conventions for <Name>.Tests projects: layout and naming, regions, what a test proves, assertions, strict Moq mocks verified on dispose, real collaborators, isolation, FakeTimeProvider, EF Core and integration tests |
.claude/hooks/session-start.sh |
Run by the SessionStart hook in .claude/settings.json: in a Claude Code cloud session (CLAUDE_CODE_REMOTE=true), runs every .claude/hooks/ensure-*.sh in name order, each with its own bash and at most ENSURE_SCRIPT_TIMEOUT seconds (240 by default), goes on past one that fails or times out and names it, and always exits 0; it does nothing on a developer's machine. A project bootstraps another tool in its cloud sessions by adding .claude/hooks/ensure-<tool>.sh, which template updates leave alone (ADR-0017) |
.claude/hooks/ensure-pwsh.sh |
Run by session-start.sh: in a Claude Code cloud session without pwsh, installs the pinned PowerShell package from Microsoft's apt repository after checking its SHA-256 (Ubuntu 24.04 x86_64), so the session never stops to ask for PowerShell; it does nothing on a developer's machine or when pwsh is present, and never fails the session. A cloud environment's setup script can install pwsh ahead of time, which makes the hook a no-op |
.claude/hooks/ensure-nvs.sh (Node.js, when uses_node) |
Run by session-start.sh: in a Claude Code cloud session whose project has a .node-version, sources use-node.sh, which accepts the image's Node.js when it is that release; otherwise installs nvs with install-nvs.sh and selects the release through it. Either way it puts that Node.js first on PATH for the session's later commands through CLAUDE_ENV_FILE, so the prelude passes without nvs; it never fails the session |
.claude/rules/csharp.md, .claude/rules/csharp-tests.md (.NET) |
Point Claude Code at the same conventions whenever it touches a *.cs file, or one in a test project |
docs/decisions/project-template/ |
The template's architecture decision records, the reasons behind its rules, numbered below 1000 while a project numbers its own from 1000: every project gets the ones on commit attribution, plan-then-execute, trunk-based development, pull requests, issues, pinned inputs, the pre-release posture and the languages tooling is written in; .NET projects also get those on the build, the banned APIs and the C# conventions, the ASP.NET Core ones and, with nuget_package, the library ones. A project that decides otherwise supersedes one with an ADR of its own |
docs/best-practices-criteria.md |
Every OpenSSF Best Practices criterion of the passing, silver and gold levels, 145 in all, with its requirement at that level, whether N/A and a URL apply, and the answer a project should expect, Met, Check, N/A, Gap, Person or Unmet, with its evidence for the project's stack and host; what stops a level, the checks to run before answering, and on GitHub the prompts that register the project and update its answers in Claude in Chrome. tests/Test-BestPracticesCriteria.ps1 checks it against the badge's own list (ADR-0025) |
.copier-answers.yml |
Copier's: the answers and template version that Update-Project.ps1 reads |
.template-version |
The template version the project is on, one line such as v0.6.0: Copier writes _commit from .copier-answers.yml here, for people and scripts to read. A repository with only the workflow installed gets the same file from workflow\Install-HybridWorkflow.ps1 |
.template/Update-Project.ps1 |
The update script: run in the project, it pulls in the newest template version and updates itself |
.template/Get-PlanState.ps1 |
Prints where the plan in a folder stands (its steps, review, landing policy, the session's push branch and the branch on origin its pull request comes from, whether the default branch takes changes only through pull requests, pull request, tag, the version it moves to when another plan took its release, the files that conflict with the default branch, the version tags its changelog has no section for, each of its issues, the issues it only refers to, and the follow-ups not yet filed as issues) and the workflow command to run next; it reads GitHub through gh api REST paths, which work where GitHub's GraphQL API is refused, as in a Claude Code cloud session; /ship-plan, /continue-plan, /finish-plan and /run-issues run it, and Install-HybridWorkflow.ps1 installs it with the commands — generated |
.template/Publish-Release.ps1 |
The script tag-release.yml runs; this repository's own Release workflow runs the same file |
.githooks/pre-push |
Refuses a push to the default branch when AGENTS.md's Landing section says protect: hook, for a host that can't require pull requests, such as a private repository on GitHub Free; does nothing otherwise. In a clone that uses pre-commit or its own hooks, Update-Project.ps1 and Adopt-Project.ps1 print a two-line .git/hooks/pre-push wrapper to add, because pre-commit's pre-push stage checks only one ref of a push |
.github/workflows/template-update.yml (GitHub only) |
Every Monday at 07:00 UTC, and on demand, runs .template/Get-TemplateUpdate.ps1 with only contents: read and issues: write, so a project learns of a new template version without checking (The Update Notice) |
.github/workflows/code-review-auto-merge.yml (GitHub only) |
Turns on auto-merge, by a merge commit where the repository allows one, else a rebase, else a squash, for a Dependabot pull request that only moves the NCode Review pin in code-review.yml to a newer minor or patch release, so the bump merges once the required checks pass (Stay Current); where an approval is required, a maintainer approves it |
.github/workflows/tag-release.yml (GitHub only) |
The Tag and publish release workflow. On each push to main, a first job with only contents: read, whose checkout keeps no token, reads release from AGENTS.md's Landing section with .template/Publish-Release.ps1 -Policy. Only with release: tag or tag+release does a test job run ci.yml again on the commit, as a reusable workflow, and once it passes a third job run .template/Publish-Release.ps1 with contents: write, actions: write, pull-requests: read and id-token: write: it tags the commit a pull request merged as with the plan's version, signed with gitsign in a public repository, from the changelog's newest section or, in a pre-release project, the pull request's Release: line, publishes the GitHub release through the REST API and, for a .NET library, starts publish.yml; it never moves a tag or changes a release, so /ship-plan run after the merge finds both done. A merge whose pull request has no Release: line, such as a plan's that changes nothing a release ships, finds the changelog's newest section already tagged and published, so it tags nothing, publishes nothing and starts nothing; when that earlier release's tag or GitHub release is still missing, it finishes that release (ADR-0032). It refuses to tag a commit whose version.json, when it has one, holds another version. |
.github/workflows/scorecard.yml (GitHub only) |
Runs OpenSSF Scorecard on each push to the default branch and weekly, publishes the score and uploads the findings to code scanning (ADR-0020) |
.template/Get-TemplateUpdate.ps1 |
Compares .template-version with the template's newest version tag and keeps one open issue labeled template-update, "Update to project-template ", with the changelog sections in between; closes it once the project is current (The Update Notice) |
Which generated files a project gets follows workflow_tools. A command, prompt file, skill or agent the project adds under a name the template doesn't use is the project's.
Generated files are rendered from workflow/templates by tools/Update-Template.ps1; change them there.
The project edits them freely, and later template changes merge in: an update keeps the project's edits and adds the template's, and only the same lines changed on both sides conflict. These are the files whose tools can't include a second file — _merged_files in copier.yml lists them.
| File | Purpose |
|---|---|
.claude/settings.json |
Commit and pull request attribution off; the default stance is allow everything, with a deny list for the exceptions: every Bash and PowerShell command runs without asking, git push, git tag and gh release create included, except that any command that mentions .env or the root secrets/ folder asks first (a source folder named Secrets deeper in the tree doesn't), which slows a careless read but is not a sandbox; .env files and the root secrets/ folder can't be read with the Read tool; entering a plan's worktree doesn't ask; a SessionStart hook that runs .claude/hooks/session-start.sh |
.vscode/settings.json, .vscode/extensions.json |
LF and final newlines, git.addAICoAuthor off, the Ollama timeout (only with the local model); recommended extensions (Claude Code, GitHub Copilot Chat, Ollama, EditorConfig, and the stack's language extension; the Ollama extension only with the local model) |
.editorconfig, .gitattributes, .gitignore |
UTF-8 and LF everywhere, binary types, and ignores for Claude Code's local files and worktrees, the plan in progress (PLAN.md), secrets and build output; for .NET, the C# wrapping style and the header each new C# file starts with (file_header_template: the copyright line, and an SPDX-License-Identifier line for the license answered; none when author_name holds a ; or #, where Roslyn ends an .editorconfig value), a suggestion so existing files still build |
.github/workflows/ci.yml or .gitlab-ci.yml |
CI on GitHub or GitLab, whichever the git_host answer names: a job that runs the build and test commands once code exists (for .NET with the default commands, build/dod.ps1, keeping its test results, and for a library its packages, as artifacts for 14 days, after a failure too) and checks the decision index with .template/Test-AdrIndex.ps1; for .NET, a NuGet package cache keyed on the restore's inputs, and the SDK global.json selects and the runtimes build/Get-TestRuntimes.ps1 names installed before the build: on GitHub by the .github/actions/install-dotnet action, on GitLab by build/Install-Dotnet.ps1, in the mcr.microsoft.com/dotnet/sdk:10.0 image, which supplies git and PowerShell. On GitHub it also runs in a merge queue; tag-release.yml calls it, through its workflow_call trigger, before it tags a release, granting it only contents: read, so no job of it may ask for more; a newer push to a pull request or topic branch cancels the run it supersedes, but a default-branch commit's run and a merge queue entry's are never cancelled; every job has a timeout; actions are pinned to commit SHAs, and checkouts set persist-credentials: false, so later steps can't read the job's token |
.github/dependabot.yml (GitHub only) |
Dependabot, built into GitHub: a weekly pull request for newer CI actions, for .NET those of the composite actions under .github/actions/ too, and, by stack, NuGet packages and the .NET SDK, pip or npm packages, one per ecosystem, except a new release of the NCode Review action, which has a pull request of its own so it can merge itself, and security updates in a pull request of their own per ecosystem; a new .NET SDK major isn't offered, since moving to it is a planned migration |
.github/workflows/copilot-setup-steps.yml (GitHub, with Copilot in workflow_tools) |
Prepares the Copilot cloud agent's runner before each session, in the one job GitHub runs for it, copilot-setup-steps: checks out without persisted credentials, sets up the stack as CI does (for .NET the SDK global.json selects and the test runtimes, through the .github/actions/install-dotnet action, the NuGet cache CI uses, dotnet tool restore and dotnet restore; Python, Node.js or PowerShell and their dependencies), and stops at 59 minutes, the session's limit. GitHub runs it only from the default branch; it also runs by hand and when the file or a file its steps run changes, which its push and pull_request triggers list beside it: for .NET the .github/actions/install-dotnet action and build/Get-TestRuntimes.ps1. The project adds the steps its sessions need, such as a frontend's tools, and later template changes merge in |
.github/actions/install-dotnet/action.yml (GitHub, .NET) |
A composite action that installs the .NET SDK global.json selects and then the runtimes build/Get-TestRuntimes.ps1 names, with actions/setup-dotnet, as build/Install-Dotnet.ps1 does on GitLab. CI, copilot-setup-steps.yml and publish.yml call it right after their checkout with - uses: ./.github/actions/install-dotnet, and so does any workflow of the project's own that builds or tests; one whose push or pull_request trigger lists paths also lists .github/actions/install-dotnet/** and build/Get-TestRuntimes.ps1, which the action runs. Dependabot moves its actions/setup-dotnet pins, and later template changes merge in |
Directory.Packages.props (.NET) |
Central package management: versions in one place, the banned API analyzer as a GlobalPackageReference every project gets, and the versions of the analyzers build/ProjectTemplate.props references for some projects: Nullable.Extended.Analyzer and, with nuget_package, PublicApiAnalyzers |
nuget.config (.NET) |
nuget.org as the only package source, with the ones a user or machine configuration adds cleared, so restore resolves the same packages everywhere; add a private feed here |
global.json (.NET) |
The .NET SDK version (10.0.402, rolling forward to newer feature bands); CI installs the SDK it selects, with the .github/actions/install-dotnet action on GitHub and build/Install-Dotnet.ps1 on GitLab: the newest release its rollForward policy allows, or, with no rollForward or with disable, exactly the version it names |
A project that replaced a merged file with its own, such as a CI workflow of its own, makes it project-owned: .\.template\Update-Project.ps1 -Data @{ project_owned_files = '.github/workflows/ci.yml' }, or a list of several files. Adopt-Project.ps1 takes the same answer: -Data @{ project_owned_files = '.github/workflows/ci.yml' } keeps the repository's own file exactly as it is. Updates then leave the file alone and show the template's changes to it, as for the project-owned files below. Without the answer, a rewritten file shares almost no lines with the template, so the template's changes conflict in unrelated places. When the template changed a merged file that shares less than half its distinct non-blank lines with the template's version of it, Update-Project.ps1 names the file and prints the -Data to run; it only suggests, and the update goes on. The answer can name a template-owned file too (Project-Owned Files). -Data @{ project_owned_files = @() } gives the files back to the template: merged files merge again, and template-owned ones are replaced again.
Written once, when the project is created, and never touched by an update, even when the template's copy changes; Update-Project.ps1 lists those changes. _skip_if_exists in copier.yml lists these files. So is each file the project_owned_files answer names, merged or template-owned. A project that replaced one, such as its CI workflow or a build/dod.ps1 of its own, sets the answer with .\.template\Update-Project.ps1 -Data @{ project_owned_files = '.github/workflows/ci.yml', 'build/dod.ps1' }, naming every file it owns, and Adopt-Project.ps1 takes the same -Data. That update and every later one leave the files alone, never resetting a template-owned one to the template's copy, and show the template's changes to them. When an update stops on a conflict in a template-owned file, such as a build/dod.ps1 of the project's own that the template now adds, Update-Project.ps1 names the file and prints that command, with the files the answer already names and any merged file the project seems to have replaced; abandon the update with git reset --hard; git clean -fd and run it. The answer can name any file that the version the update moves to renders, also one that version adds or first merges, except the update's own files: .copier-answers.yml, .template-version and those in .template/. Any other name, such as a file that version no longer renders, stops the update before it changes anything (Merged Files).
| File | Purpose |
|---|---|
AGENTS.md |
The index every agent reads: the template's rules first, then the project's own instruction files, build and test commands, and conventions |
README.md |
Build and test commands, and the workflow at a glance |
Directory.Build.props (.NET) |
Imports build/ProjectTemplate.props, then holds the project's own build settings, which override the template's |
version.json (.NET, nuget_package) |
The version the next release ships, which Nerdbank.GitVersioning stamps into every assembly and package, as <version>-g<commit> except on its release tag, with assemblyVersion keeping AssemblyVersion on the major version. A plan with a Release: line sets it; Update-Project.ps1 and Adopt-Project.ps1 add it to an existing library at the patch after its newest release |
docs/decisions/README.md, docs/decisions/0000-template.md |
How the project records its own architecture decisions (statuses, numbering from 1000, taking a number no other branch has, a record never overriding an external standard), its index of them, and the format to copy for a new one |
docs/README.md, docs/designs/_template.md |
The index of the project's documentation with the rules docs follow (they change with the code, claim only what is built, link a decision rather than restate it), and a design-document template for work bigger than one plan |
docs/metrics.md (.NET) |
The catalog of the project's instruments and spans, which the C# conventions keep current in the change that adds one |
.config/dotnet-tools.json, .csharpierignore (.NET, csharp_format) |
The tool manifest that pins CSharpier at 1.4.0 (Dependabot bumps it) and the paths CSharpier skips, including the template-owned build/ProjectTemplate.props and nuget.config; build/dod.ps1 runs its Format stage whenever the manifest names CSharpier |
biome.json (Node.js, node_lint) |
Biome's settings: the JavaScript and TypeScript files it checks, outside .claude/ and .template/, the formatting and the recommended rules turned off, each for a reason ADR-0201 gives. The project pins @biomejs/biome@2 in package.json and adds its lint and format scripts, as its CONTRIBUTING.md says; CI runs <package_manager> run lint before the build, and a new project's Landing gate runs it too |
docs/api-compatibility.md (.NET, nuget_package library) |
How a library sets its PackageValidationBaselineVersion once and how build/Update-Baseline.ps1 raises it, records an intended break and hand-edits PublicAPI.*.txt, and the known limit of the unresolved-reference warning; written once |
SECURITY.md, CONTRIBUTING.md |
How to report a vulnerability privately (on GitHub through private vulnerability reporting, which tools/Set-RepositoryBaseline.ps1 turns on), an acknowledgement within 14 days, which versions get fixes, for a library how to verify a package and, on GitHub, how to verify a release with gh release verify; and how to contribute: prerequisites, setup, the build and test commands, the change flow, the review requirements, the good first issue label, commit attribution and, on GitHub with CodeQL, dismissing an alert again after a reformat |
GOVERNANCE.md, CODE_OF_CONDUCT.md, ROADMAP.md |
The project's roles and how decisions are made, with a Continuity section that says a second owner is needed; the Contributor Covenant 2.1, with reports going to conduct_contact or the host's private form; and the year's direction. Project-owned: an update adds missing ones and prompts say what to write (ADR-0023) |
docs/architecture.md, docs/assurance-case.md, docs/best-practices-badge.md |
The components and design rules; the requirements, threats, the evidence the template controls and the security reviews; and the OpenSSF Best Practices silver criteria mapped to evidence, where the project stands and what needs a person at silver and gold, linking docs/best-practices-criteria.md. Project-owned (ADR-0023) |
LICENSE.txt, COPYRIGHT.txt |
The license text for an Apache-2.0 or MIT license, and for Apache-2.0 the copyright notice; Adopt-Project.ps1 leaves them out of a repository that already has a license file, and it and .template\Update-Project.ps1 warn when the repository has no LICENSE or COPYING file |
NCodeGroup.png (.NET, nuget_package) |
The NCode Group package icon, the {N} mark on a blue tile at 128 by 128 pixels, when package_icon names it, the default for the author NCode Group |
.github/workflows/publish.yml (GitHub, .NET, nuget_package) |
Publishes the packages to nuget.org when a GitHub release is published, or when tag-release.yml starts it for the release it published: refuses a tag whose commit the default branch doesn't hold, so a tag on an unreviewed commit publishes nothing, packs in Release as a public release, with the version version.json holds, which must be the tag's, then pushes through nuget.org trusted publishing (OIDC, no stored API key) in the protected nuget environment, with every action pinned to a full commit SHA. Before testing it installs the SDK global.json selects and the runtimes build/Get-TestRuntimes.ps1 names with the .github/actions/install-dotnet action, and it counts only a 404 from nuget.org as a package not published yet, stopping on any other failed lookup. Update-Project.ps1 and Adopt-Project.ps1 leave it out of a repository where another workflow runs nuget push, and the update warns when both do; they record that workflow in the nuget_publisher answer, which also leaves out release-provenance.yml and raise-baseline.yml and has the documents name it. Needs a one-time setup, which its header describes: a trusted publishing policy on nuget.org, the nuget environment and the NUGET_USER variable. Its provenance and baseline jobs call the release follow-ups (ADR-0151); the update and adoption say what to add to one that doesn't |
.github/workflows/release-provenance.yml (GitHub, .NET, nuget_package) |
Called by publish.yml after its publish job, or by hand with a tag and the id of a Publish packages run whose artifact is kept (14 days), attests the packages with GitHub's build provenance and attaches them and <tag>.intoto.jsonl to the release, and an SPDX SBOM from GitHub's dependency graph (<tag>.spdx.json); left out where the nuget_publisher answer names the library's own publishing workflow (ADR-0139, ADR-0151) |
.github/workflows/raise-baseline.yml (GitHub, .NET, nuget_package) |
Called by publish.yml after it publishes a stable release, or by hand with a tag, runs build/Update-Baseline.ps1, pushes baseline-<version> and opens an issue whose link opens its pull request, which names each CompatibilitySuppressions.xml the script deleted or edited, with a checkout that keeps no credential; needs no Actions approval setting, which tools/Set-RepositoryBaseline.ps1 keeps off; left out where the nuget_publisher answer names the library's own publishing workflow (ADR-0150, ADR-0036) |
.github/workflows/code-review.yml (GitHub, code_review answer only) |
Reviews each pull request with the NCode Review bot (NCodeGroup/code-review): runs from the default branch on pull_request_target, in the code-review environment, and, in a separate outcomes job outside that environment, with no id-token, checkout or model key and only contents: read and pull-requests: read, records each finding's outcome when a pull request closes; both jobs pin the action to a release's full commit SHA, with its tag in a comment, the one pin CodeQL's actions/unpinned-tag query accepts. Project-owned so an update never moves a pin Dependabot bumped; Update-Project.ps1 lists the template's changes to it. Nothing requires its "Code review" check: the person who merges waits for the review (ADR-0019). The review passes approve: true, which the baseline ruleset requires as one approval where NCode Review's approver is set up, or where a second person can write (ADR-0022) |
Every project carries the same workflow for both, so you can work on it with your Claude plan or your Copilot plan, and switch whenever you like: open the other panel in VS Code, or run claude or copilot in a terminal. Nothing in the project needs to change. PLAN.md is the only state the tools share, so one can plan and another execute, re-plan or review. Each plan lives in its own git worktree, .claude/worktrees/<name>/, in every tool, so several sessions can work on different plans at once; a Copilot session starts each command in the plan's folder; open that folder to continue the plan in the other tool. A Claude Code cloud session, which may push only to the branch made for it, still makes each plan on its own branch and lands it through that branch, one pull request at a time (USAGE.md). Each request bills the plan of the tool that makes it.
USAGE.md is the guide: the tools to install, signing in to each, the commands per tool, switching mid-plan, and troubleshooting.
A project never edits a template-owned file. It adds to the template and overrides it with files of its own, which win where they differ.
AGENTS.md is the project's index. Its first entry imports the template's rules; every entry after it is the project's:
## Instructions
- @.github/instructions/project-template.instructions.md — the plan-then-execute workflow and base conventions, from the project template. …
- @.github/instructions/api.instructions.md — how this project designs its HTTP API
- @docs/agents/releases.md — how to cut a release| To | Add | Picked up by |
|---|---|---|
| Add an instruction, or override one of the template's, for every agent | A line under Conventions in AGENTS.md, or a file listed in its index as @<path> — what it covers. A .github/instructions/<name>.instructions.md file with an applyTo glob also reaches Copilot automatically |
Claude Code imports each @ entry; Copilot reads AGENTS.md and loads every .github/instructions/ file; other agents follow the index |
| Add a command, skill or agent | A file with a new name in .claude/commands/, .github/prompts/, .github/skills/<name>/ or .github/agents/ |
The tool; updates leave it alone |
| Add an instruction for Claude Code only | .claude/rules/<name>.md |
Claude Code loads every file there |
| Override a .NET build setting | A property in Directory.Build.props, after its import of build/ProjectTemplate.props |
MSBuild: the later value wins |
Change a merged file — .gitignore, CI, editor settings, permissions |
Edit the file; later template changes merge into it | — |
An instruction override is the project's word against the template's, so say it plainly — "Ignore the template's rule on X; here, do Y" — and the agents follow the project.
New-Project.ps1 runs copier copy, which asks these questions in the terminal, in this order. Each shows its default; press Enter to accept it. A question answered in advance with -Data isn't asked, and -Defaults takes the default for every other question without asking. Project-owned files take the answers once, when the project is created; template-owned and merged files follow a later change made with Update-Project.ps1 -Data.
| Question | Default | Affects |
|---|---|---|
project_name |
None; required, so -Defaults needs it in -Data |
Headings in AGENTS.md and README.md |
project_description |
Blank | The line under each heading |
stack |
.NET | The .NET layer, default commands, CI setup steps, .gitignore section, recommended extension |
git_host |
GitHub | The CI file (.github/workflows/ci.yml or .gitlab-ci.yml) and, on GitHub, .github/dependabot.yml; the pull-request command in the template's rules; with -CreateRemote, where the repository is created: gh on GitHub, glab on GitLab |
workflow_tools |
Claude Code and Copilot | Which workflow files the project gets: CLAUDE.md and .claude/ with Claude Code; the Copilot agents, prompt files, skills and plan-executor.agent.md with Copilot; the Hybrid agents, execute-step-local.prompt.md and the Ollama settings with the local model. -Data takes a list; add the local model with workflow_tools = 'claude', 'copilot', 'local' |
code_review (GitHub only) |
Off | .github/workflows/code-review.yml, which reviews pull requests with the NCode Review bot, and a note after the copy to run tools/Enable-CodeReview.ps1 from a clone of NCodeGroup/code-review, which creates the code-review environment and gives the repository the organization's secrets. A public repository also needs pull_request_target allowed for the code-review workflows from December 2, 2026, which tools/Set-RepositoryBaseline.ps1 does, and New-Project.ps1 -CreateRemote runs it (Protect the Default Branch). Not asked on GitLab. Adds - draft: yes in AGENTS.md |
nuget_package (.NET only) |
Off | The package settings in build/ProjectTemplate.props |
csharp_format (.NET only) |
Yes for a new project, no for an updated or adopted one | .config/dotnet-tools.json (CSharpier), .csharpierignore and IDE0073, the missing file header, as a warning in .editorconfig. An existing project turns it on with .\.template\Update-Project.ps1 -Data @{ csharp_format = $true }, then runs dotnet csharpier format . once. The update that turns it on, and an adoption, count the C# files without the header and name the first five |
license |
Apache-2.0, NCode Group's license; blank for none; required with nuget_package |
The SPDX license expression of the repository and its packages, such as MIT or Apache-2.0: LICENSE.txt for MIT and Apache-2.0, COPYRIGHT.txt for Apache-2.0, the C# file header, and each package's license expression. An update or an adoption never gives existing code the default (ADR-0024) |
author_name (.NET, or any stack with a license) |
NCode Group | Authors, Company and Copyright in build/ProjectTemplate.props, and the copyright holder in the license files |
package_icon |
NCodeGroup.png for the author NCode Group, otherwise blank |
A PNG at the repository root, packed as the icon; the template writes NCodeGroup.png itself |
nuget_publisher (.NET, nuget_package) |
Blank; not asked: .\.template\Update-Project.ps1 and Adopt-Project.ps1 set it to the workflows that run nuget push when the library has no publish.yml, and record it only while it is set |
The library's own NuGet publishing workflows, such as .github/workflows/main.yml: the project gets no publish.yml, release-provenance.yml or raise-baseline.yml, which only publish.yml calls, and SECURITY.md, GOVERNANCE.md, docs/architecture.md, docs/assurance-case.md, docs/api-compatibility.md and docs/best-practices-criteria.md name these workflows instead of describing publish.yml, trusted publishing, the nuget environment and provenance |
uses_node |
Yes for Node.js, else no | Adds .node-version (the Node.js major version, project-owned), the nvs scripts, the prelude line in AGENTS.md, the Node.js rules and ADR-0200; CI and the Copilot setup workflow set up the .node-version Node.js on GitHub for every stack, and GitLab CI selects it through nvs for a Node.js project other than Bun and for every other stack, running the other stack's job in node:lts instead of alpine:3 |
package_manager (Node.js only) |
npm | How CI installs dependencies — npm ci; pnpm and Yarn through Corepack, which runs the version package.json's packageManager field names; Bun through oven-sh/setup-bun on GitHub and the oven/bun image on GitLab — Dependabot's ecosystem (bun for Bun, else npm), and the default build and test commands |
node_lint (Node.js only) |
Yes for a new project, no for an updated or adopted one | biome.json, the CI step that runs <package_manager> run lint, the Landing gate a new project's AGENTS.md names, and the Biome extension in .vscode/extensions.json. An existing project turns it on with .\.template\Update-Project.ps1 -Data @{ node_lint = $true }, adds Biome to package.json, then runs <package_manager> run format twice (ADR-0201) |
coverage_gate (.NET, Python, Node.js, PowerShell) |
Yes for a new project, no for an updated or adopted one | CI fails below 90% of the statements or 80% of the branches: build/dod.ps1 collects .NET's coverage, the default Python and PowerShell test commands write coverage.xml, and a Node.js project's test script writes lcov.info. An existing project turns it on with .\.template\Update-Project.ps1 -Data @{ coverage_gate = $true } (ADR-0026) |
build_command, test_command |
By stack, below | AGENTS.md, README.md, and through them every plan's Context for the executor |
file_headers (every stack but .NET, with a license) |
Yes for a new project, no for an updated or adopted one | The CI check that each source file starts with the copyright line and the SPDX license line, .template/Test-FileHeaders.ps1; .NET's C# files get theirs from .editorconfig and csharp_format. An existing project turns it on with .\.template\Update-Project.ps1 -Data @{ file_headers = $true }, then runs ./.template/Test-FileHeaders.ps1 -Fix once (ADR-0027) |
conduct_contact |
Blank | Where CODE_OF_CONDUCT.md sends a report: an email address or a URL, or, blank, Report a vulnerability on GitHub's Security tab titled "Conduct:", or a confidential GitLab issue |
pre_release |
untracked; never asked or recorded: Adopt-Project.ps1 answers tracked, and -Data sets it |
The pre-release line of the ## Landing section in the AGENTS.md the template writes, once: untracked keeps a new project pre-release until its first stable release, and tracked tracks every change from the first release (ADR-0015) |
release_policy |
tag+release for a .NET library on GitHub, else none; never asked or recorded: .\.template\Update-Project.ps1 and Adopt-Project.ps1 take it from the release line of AGENTS.md's Landing section, and -Data sets it |
The release line of the Landing section in the AGENTS.md the template writes, and whether SECURITY.md says how to verify a release tag's gitsign signature: not with none, under which nothing tags a release |
project_owned_files |
None; not asked, set with Update-Project.ps1 -Data |
Files the project owns, merged or template-owned: updates leave them alone and show the template's changes to them (Project-Owned Files) |
best_practices_project |
None; not asked, set with Update-Project.ps1 -Data @{ best_practices_project = '<number>' } once the project is registered |
The project's number at bestpractices.dev: docs/best-practices-criteria.md shows its badge and the address of its saved answers, and a project created or adopted with it gets the badge in README.md and docs/best-practices-badge.md; Copier refuses anything but digits (ADR-0025) |
| Stack | Build | Test |
|---|---|---|
| .NET | dotnet build |
dotnet test |
| Python | None | python -m pytest -q --cov --cov-branch --cov-report=xml, or python -m pytest -q without coverage_gate |
| Node.js or TypeScript | <package_manager> run build, such as npm run build |
<package_manager> run test |
| PowerShell | Invoke-ScriptAnalyzer -Path . -Recurse -EnableExit |
Invoke-Pester with Cobertura code coverage, or Invoke-Pester -CI without coverage_gate |
| Other | None | None |
docs/adopt.md is the runbook that takes a repository through every manual step in order; this section is the reference for the script. Needs Git with user.name and user.email set, Copier (uv tool install copier; the scripts fall back to uvx), network access to this repository, which is public, and for -CreateRemote the signed-in gh or glab CLI. USAGE.md sets all of it up, along with Claude Code and GitHub Copilot.
.\New-Project.ps1 -Path C:\src\qso-viewer # asks the questions, then git init and the first commit
.\New-Project.ps1 -Path C:\src\qso-viewer -CreateRemote # also creates the repository, public, on the host you answer (GitHub by default), and pushes
.\New-Project.ps1 -Path C:\src\qso-viewer -CreateRemote -Visibility private # the same, but private
.\New-Project.ps1 -Path C:\src\qso-viewer -CreateRemote -Data @{ git_host = 'gitlab' } # on GitLab instead of GitHub, without asking that question
.\New-Project.ps1 -Path C:\src\qso-viewer -CreateRemote -Owner bixbots # under a GitHub org or GitLab group
.\New-Project.ps1 -Path C:\src\qso-viewer -CreateRemote -Defaults -Data @{ project_name = 'QSO Viewer'; stack = 'python' } # asks nothing: GitHub, public| Parameter | Default | Purpose |
|---|---|---|
-Path |
— | New, empty project folder; its name becomes the repository name |
-Template |
https://github.com/NCodeGroup/project-template.git |
Template source; . uses this clone |
-Ref |
The newest tag | Template version to use |
-CreateRemote, -Owner |
Off, your account | Create the repository on GitHub or GitLab, whichever the git_host answer names, and push main |
-NoBaseline |
Off | Skip protecting the new repository after -CreateRemote creates it: tools/Set-RepositoryBaseline.ps1 on GitHub, tools/Set-GitLabBaseline.ps1 on GitLab |
-Visibility |
public |
The new repository's visibility: public, private, or internal (GitLab: any signed-in user; GitHub: organizations under an enterprise account only) |
-Data |
None | Answers given in advance, so those questions aren't asked: -Data @{ project_name = 'Demo'; git_host = 'gitlab' } |
-Defaults |
Off | Ask nothing: every question not in -Data takes its default |
The script runs copier copy, which asks the questions and writes the files and the answers (.copier-answers.yml), then git init -b main, enables the template's Git hooks (git config core.hooksPath .githooks) unless Git already has a hooks path for the new repository, such as a global one, which it keeps and warns about, and makes the first commit, Create project from project-template v0.1.0. With -CreateRemote it reads git_host from .copier-answers.yml: for github it runs gh repo create <name> --public --source . --push; for gitlab, glab repo create <name> --public and git push -u origin main. -Visibility replaces --public with --private or --internal. GitLab would otherwise default to internal, so the script always passes the flag. It then runs tools/Set-RepositoryBaseline.ps1 for GitHub, or tools/Set-GitLabBaseline.ps1 for GitLab (Protect the Default Branch), unless -NoBaseline says not to.
A public project is readable by anyone, including its .copier-answers.yml, which names this template; the template is public too, so anyone can run copier update against it. Secrets stay out of it as in any project (AGENTS.md, .gitignore), and its CI is safe for pull requests from forks: pull_request with a read-only token and no secrets. Its license answer, Apache-2.0 unless you answer otherwise, gives it LICENSE.txt; without a license file the code is all rights reserved, and .template\Update-Project.ps1 warns until it has one. To change the visibility later: gh repo edit --visibility private --accept-visibility-change-consequences, or glab api --method PUT projects/:id --raw-field visibility=private (glab repo update has no visibility flag).
For a .NET project, dotnet new templates put a Version on each <PackageReference>, which central package management rejects (NU1008); move each version into Directory.Packages.props. The template's rules tell the agents the same, and dotnet add package already does it. Add each project to one solution at the repository root (dotnet new sln once, then dotnet sln add <project folder>), so the default dotnet build and dotnet test — and CI — cover it.
To bring an existing repository under the template, use Adopt-Project.ps1.
docs/adopt.md is the runbook that takes a repository through every manual step in order; this section is the reference for the script. Adopt-Project.ps1 brings a repository that already exists under the template, so it gets the workflow and later updates. Run it from this clone, on a repository with a clean working tree. It needs the same tools as Create a Project.
.\Adopt-Project.ps1 -Path C:\src\buffers # works out the answers, adopts, verifies, commits
.\Adopt-Project.ps1 -Path C:\src\buffers -Data @{ workflow_tools = 'claude', 'copilot', 'local' } # adds the Hybrid agents, which use the shack PC's private model; without it a repository with no Copilot or Hybrid agent files gets Claude Code and Copilot only
.\Adopt-Project.ps1 -Path C:\src\buffers -Data @{ project_owned_files = '.github/workflows/ci.yml' } # keeps the repository's own CI workflow as it is, and later updates show the template's changes to it
.\Adopt-Project.ps1 -Path C:\src\buffers -NoCommit # stages the result for review instead| Parameter | Default | Purpose |
|---|---|---|
-Path |
— | The repository's root folder |
-Template |
https://github.com/NCodeGroup/project-template.git |
Template source; . uses this clone |
-Ref |
The newest tag | Template version to use |
-Data |
None | Answers that win over everything the script works out: -Data @{ stack = 'node' } |
-NoVerify |
Off | Skip the build and test commands before the commit |
-NoCommit |
Off | Stage the result instead of committing it; it still verifies unless -NoVerify is also given |
The script refuses a folder that isn't the root of a Git repository, has uncommitted changes, has no commits yet, already has .copier-answers.yml (use Update-Project.ps1 instead), or has no Git user.name or user.email.
It never asks a question. Each answer comes from the first of these that has it:
-Data.- A legacy adapter.
- What the script works out from the repository.
- The template's default.
The script works out these answers:
| Answer | Worked out from |
|---|---|
stack |
dotnet if there is a solution or a C#, F# or VB project within two folders of the root; else node if package.json is at the root; else python if pyproject.toml, requirements.txt or setup.py is; else other if there is an OpenTofu or Terraform file (.tf, .tofu or .tftest.hcl) within two folders of the root; else powershell if there is a .ps1, .psm1 or .psd1 file outside the build, eng, scripts, tools, .github and .gitlab folders at the root; else other |
project_name |
The only solution's name, else the origin remote's repository name, else the main checkout's folder name, so a Claude Code worktree doesn't name the project after itself |
git_host |
gitlab if the origin remote names GitLab, else github |
author_name (.NET) |
Authors, else Company, in the root Directory.Build.props |
license |
PackageLicenseExpression in the root Directory.Build.props (.NET); else Apache-2.0 or MIT when the root LICENSE, LICENSE.txt, LICENSE.md or COPYING holds that license's text; else blank, never the template's Apache-2.0 default, and the adoption warns when the repository has no license file (ADR-0024) |
build_command, test_command (.NET) |
dotnet build <solution> and dotnet test <solution>, when the only solution isn't at the root |
package_manager (Node.js) |
The one the packageManager field in package.json names, else the one whose lockfile is at the root (pnpm-lock.yaml, yarn.lock, bun.lock or bun.lockb), else npm |
uses_node (not Node.js) |
Yes when a package.json is within two folders of the root, outside bin, obj and node_modules, or a .nvmrc or .node-version is at the root; a Node.js repository takes the default, yes |
build_command, test_command (Node.js) |
<package_manager> run build and <package_manager> run test, each only when package.json has that script and the test script isn't the failing placeholder npm init writes; else blank |
workflow_tools |
claude, plus copilot if .github/agents/copilot-*.agent.md, .github/skills/ or .github/prompts/ exists, plus local if .github/agents/hybrid-*.agent.md exists; with none of these, the template's default (claude and copilot), and the script prints a line saying so and how to add local |
Everything else takes the template's default. The script prints the answers, runs copier copy --overwrite, and enables the template's Git hooks (git config core.hooksPath .githooks) unless the repository already sets its own, has hooks in .git/hooks, which a hooks path would turn off, or uses pre-commit, which won't install while a hooks path is set; then it warns, naming the command that runs them.
What it does with a file the repository already has depends on the file's owner (What a Project Gets):
| Owner | What happens |
|---|---|
| Template | Replaced by the template's file; the repository's copy is discarded, unless the project_owned_files answer names it: then the repository's copy is kept exactly as it is, and later updates show the template's changes to it |
| Merged | Rebuilt as the template's file plus the repository's own content, so a later update merges the repository's content like any project's edits (below) |
| Project | Kept. AGENTS.md gains the template's rules as an index entry: first under its ## Instructions heading, else in a new ## Project Template section before its first section, else at the end. Directory.Build.props gains the import of build/ProjectTemplate.props as its first element, so its own settings override the template's. An AGENTS.md the template writes, for a repository that had none, says pre-release: tracked in its Landing section, since the repository has a history (ADR-0015). A .node-version the repository has is kept; with only a .nvmrc that names a version number, such as v22, .node-version gets that version, and any other .nvmrc value is a follow-up. |
A merged file is rebuilt by type:
| File | Rebuilt as |
|---|---|
A file the project_owned_files answer names, such as -Data @{ project_owned_files = '.github/workflows/ci.yml' } |
The repository's file, exactly as it is; Copier doesn't touch it, and a file the repository lacks isn't created. Later updates leave it alone and show the template's changes to it (Merged Files). A template-owned file can be named too; a file the template doesn't render, or one of the update's own files (.copier-answers.yml, .template-version, .template/), stops the adoption before it changes anything |
.gitignore, .gitattributes, .editorconfig |
The template's file, then the repository's lines under a comment (.editorconfig drops its root = lines; .gitattributes drops a catch-all text rule such as * text eol=lf, because Git uses the last rule that matches and the repository's lines come after the template's, so it would override the template's binary rules and corrupt an image). An update sets those lines aside while Copier merges and puts them back at the end, so a template change never conflicts with them |
*.json |
The two merged key by key in the template's order; the repository's values win and lists are combined. Comments are dropped, and the report says so. The exception is global.json with a partial SDK version, such as 10.0.0, and a rollForward policy: the template's CI reads it with actions/setup-dotnet on GitHub and build/Install-Dotnet.ps1 on GitLab, which both reject that, so the template's file is used and the report says so |
*.props |
The template's file with the repository's elements added before </Project> |
| Anything else, such as YAML CI and Dependabot files | The repository's file, kept. A template change to it conflicts on update: keep your side; or name it in project_owned_files when adopting |
A .NET repository without Directory.Packages.props moves to central package management: each Version goes from the project files into Directory.Packages.props. When projects disagree on a version, the highest wins and the report says so.
Before committing, the script runs the build and test commands from the answers. It then commits on the current branch as Adopt project-template v0.1.0, with the report of what it merged, removed and moved as the message body. If a command fails, it stages everything, commits nothing, and exits 1; fix the problem and commit, or abandon the adoption with git reset --hard; git clean -fd. If anything else fails after the template is applied, the script resets the repository to where it was and says so, so there is nothing to clean up.
Some judgment is left to you. The script prints it as a ready request: folding .github/copilot-instructions.md into AGENTS.md; for a .NET repository, reconciling the template's csharp.instructions.md with the repository's own instruction files; and, when the template added ci.yml because the repository had none, reconciling its other workflows in .github/workflows with it. A ci.yml the repository already had is kept, and so is every workflow beside it. On GitHub, the adoption then prints, word for word, the notes Update-Project.ps1 prints when that ci.yml has no workflow_call trigger, or asks for more than contents: read in its top-level permissions: or a job's: tag-release.yml calls it with only contents: read before it tags a release, so until it is fixed, no release is tagged.
When the repository has version tags merged into the current branch that its changelog has no section for, the request also says to backfill them, such as backfill CHANGELOG.md from the releases v0.1.0..v0.3.0. The changelog is the file the changelog key of AGENTS.md's Landing section names, CHANGELOG.md by default, and only tags shaped like v1.2.3 or 1.2.3 count. With pre-release: untracked in that Landing section, the tags below 1.0.0 don't count.
For a .NET library, adoption sets the version.json it adds to the patch after the newest release tag, with the assemblyVersion a release of its current major shipped when it was built with a higher one than the template pins, such as { "version": "5.3", "precision": "minor" }, and the request asks to add -p:PublicRelease=true to a publish.yml the repository keeps without it. A library whose own workflow already runs nuget push keeps it alone, without the template's publish.yml, release-provenance.yml or raise-baseline.yml, records it in the nuget_publisher answer, and the report says so. Adoption drops the repository's own Nerdbank.GitVersioning reference, which build/ProjectTemplate.props makes a second one once version.json exists, and reports it; the update warns about a .gitlab-ci.yml that packs without PublicRelease=true or GIT_DEPTH: "0", as it does for a publish.yml, and both name each job of the repository's own workflows that builds in a checkout without fetch-depth: 0 or passes -p:Version, leaving out a checkout no build step's working directory lies in. Adoption and the update both name the stale NuGet logistics of an older library (an unimported .props file, GeneratePackageOnBuild, settings the template already makes, a .sln, a UTF-8 BOM, projects at the root) and fix none (ADR-0149). They also compare each packable project's Description and PackageTags with the newest published package and name any that differ. A repository that keeps its own .github/workflows/publish.yml without a workflow_dispatch trigger gets the warning Update-Project.ps1 prints for it: the Release workflow, tag-release.yml, starts publish.yml through that trigger, so until it has one, a release ships no packages.
Still to do — in the repository, run:
/plan-migration Finish adopting the project template: fold .github/copilot-instructions.md into AGENTS.md or a file it lists; reconcile .github/workflows/main.yml with ci.yml
Afterwards the repository updates like any project: .\.template\Update-Project.ps1 (Update a Project).
A legacy adapter removes one old setup that the template replaces. Each is a script in tools/adopt/legacy/ that takes -Path and -Phase. Adopt-Project.ps1 runs every script there with -Phase Detect; for each that returns $true it:
| Phase | When | Returns |
|---|---|---|
Detect |
First | $true if the repository has the setup |
Answers |
Before Copier runs | A hashtable of answers, which beat what the script works out but not -Data |
Apply |
After Copier runs | Lines for the report; the script prints them and puts them in the commit message |
To handle another setup, add a script to tools/adopt/legacy/; nothing else changes.
| Adapter | Detects | Does |
|---|---|---|
NCode.ProjectSettings.Scaffold.ps1 |
A project file referencing the NCode.ProjectSettings.Scaffold NuGet package |
Answers nuget_package, license (Apache-2.0), author_name (NCode Group) and, when NCodeGroup.png is at the root, package_icon. Removes the package reference, whose settings build/ProjectTemplate.props now provides, and reports that its GlobalAssemblyInfo.cs, its license and copyright copies and its build-time release notes are gone. Lists any file still using a property the package defined |
HybridWorkflowInstall.ps1 |
.github/prompts/execute-step-copilot.prompt.md, the name an older Install-HybridWorkflow.ps1 used |
Deletes it; the template's Copilot prompt is execute-step.prompt.md |
docs/adopt.md says when to run the baseline and how to check it; this section is the reference. A repository on GitHub should take changes only through pull requests, whatever its CI is. tools/Set-RepositoryBaseline.ps1 gives a repository a "Protect main" ruleset on its default branch, the same shape as this repository's: no deletion, no force push, a pull request required with every conversation resolved (a finding from the review bot, CodeQL or a person blocks the merge until it is resolved), merge-commit or rebase merges only (never squash, so each commit of a plan stays on the branch, as a project's ADR-0013 records; a project that squash-merges, such as through a merge queue, supersedes that one record), where CodeQL's default setup is configured and analyzes at least one language, a code-scanning rule that blocks a pull request whose CodeQL results add an alert at warning level or above or a security alert of any severity, no bypass; the ruleset also dismisses stale approvals on a push, which an earlier run's "Protect main" ruleset gets on the next run, like conversation resolution, and a ruleset of the owner's keeps its shape. It requires no approval, except where NCode Review's approver is set up, or the default branch's .github/workflows/code-review.yml passes approve: true and a second person has write access: there one approval, of the last push (ADR-0022). Where one person has write access, counted as the users the repository's collaborators list gives with push access or more, and NCode Review's approver isn't set up, it requires no approval and no approval of the last push, even with approve: true, and turns both off in a "Protect main" that requires an approval, saying so, also with -WhatIf: GitHub counts toward a required approval only a review from someone with write access, never the author's, and NCode Review's app has none, so on NCodeGroup/PropertyBag#53 its approval left "Approvals, 1 still required" (ADR-0034). NCode Review's approver is set up where code-review.yml passes approve: true and approver-private-key, and the repository's code-review environment holds NCODE_REVIEW_APPROVER_PRIVATE_KEY: the NCode Review Approver, an app that can write, submits the approval with a token that can only write pull requests, so the ruleset requires one approval, of the last push, with one writer too; with the input but no secret, the run names tools/Enable-CodeReview.ps1 -ApproverPrivateKeyPath from NCodeGroup/code-review and requires no approval for it (ADR-0036). A collaborators list it can't read is named, and the ruleset then gets no approval it doesn't have and keeps those it has. A ruleset of the owner's that requires an approval keeps its shape, and with one writer the run prints a notice with the command that requires no approval and no approval of the last push in it, as it does when GitHub refuses the change to "Protect main". It never requires approval of the last push without an approval: GitHub then waits for an approval from someone other than the pusher and never lets an author approve their own pull request, so every merge stays blocked where one maintainer authors every pull request, as it did NCodeGroup/docs on 2026-11-16. A "Protect main" ruleset that has it on with no approval required, which an older run or a hand-made ruleset of that name can, gets it turned off, and the run says so, also with -WhatIf (ADR-0031); one that requires approvals keeps it. For a ruleset of the owner's that has it on with no approval, and for "Protect main" where GitHub refuses the change, it prints the gh api command that turns it off, and -All -WhatIf lists them; -RequireChecks adds the CI jobs a pull request must pass as required status checks, on a branch that is up to date with the default branch. Where it reads CodeQL's default setup as configured with a language to analyze, it switches the setup to the extended query suite, before it writes the ruleset, so a refused switch changes nothing and the next run retries it. GitHub can report a default setup as configured with no language: on 2026-11-16 NCodeGroup/docs and NCodeGroup/brand answered "state":"configured","languages":[], their organization's enforced security configuration having turned default setup on before any CodeQL setup ran there, so CodeQL ran on no pull request and the rule blocked every one, with every check green. The script counts such a setup as not configured: it leaves the rule out, says why, and switches no suite, since the switch sends query_suite alone and sets up no language; a later run with -RequireChecks adds the rule once the repository's settings give CodeQL a language (ADR-0030). A "Protect main" ruleset that already has a code-scanning rule, such as one an older version of the script made, keeps that rule and its alert thresholds, and the script never switches that repository's suite, since the extended suite can raise new alerts the rule would then block merges on: it reads the default setup and, when it runs another suite, prints a notice with the gh api command that switches it by hand. Where the setup is configured but analyzes no language and the rule requires CodeQL, it warns instead that every pull request stays blocked, and names the fix: set up CodeQL's languages in the repository's settings (Settings > Advanced Security > CodeQL analysis), or remove the rule, which the script never does. It prints the notice or the warning also for a "Protect main" that sits beside a ruleset of the owner's. A default-branch ruleset that already requires pull requests, its own or one someone else shaped, keeps its shape, but the script turns on its conversation resolution where it is off, changing nothing else in it, so every repository blocks a merge until each discussion is resolved, as a project's ADR-0014 records. It also turns on delete-branch-on-merge.
It gives the repository a "Protect release tags" ruleset too, on the tags matching v*: no deletion and no update, so a release tag is never moved, with no bypass. A release tag names one published package set, so it never changes; creating one stays open, so the Tag and publish release workflow's GITHUB_TOKEN can tag a release as its pull request merges, and /ship-plan can when that workflow didn't. A ruleset of that name is left alone whatever its state, and so is an active tag ruleset on v* tags, or on every tag, that already refuses both deletion and update.
It then turns on the security settings a public project should have, each where it is off: the workflow token (GITHUB_TOKEN) read-only by default, with GitHub Actions not allowed to create or approve pull requests, in every repository, since any workflow's approval would count toward a required approval, and raise-baseline.yml opens no pull request itself (ADR-0036); -OrganizationPolicy sets the organization's defaults the same way; secret scanning and its push protection; Dependabot alerts and Dependabot security updates, which need the alerts; private vulnerability reporting; and immutable releases, after which GitHub signs an attestation of each release it publishes, which gh release verify checks, except where a .yml or .yaml file in the default branch's .github/workflows runs on a release event or uploads release assets (gh release upload, actions/upload-release-asset, softprops/action-gh-release or uploadReleaseAsset), such as release-provenance.yml, which attaches a library's packages to its release, or a project's own workflow that attaches files, since an immutable release refuses a file attached after it is published, or where it can't read one, and with -SkipImmutableReleases; the line names the files, and .template/Update-Project.ps1 then says to delete SECURITY.md's "Releases are immutable" paragraph (Adopt-Project.ps1 prints the same note); where they are already on and such a workflow exists, it prints a notice with the gh api -X DELETE command that turns them off, since it never loosens a setting (ADR-0028). Each is read first and reported as set, already set, would set (with -WhatIf) or not available, with the reason, and none costs money: secret scanning and its push protection are left out of a repository that isn't public, where they need the paid GitHub Secret Protection. A setting the API won't read or refuses to change, such as private vulnerability reporting on a private repository, or a token setting the organization decides, is reported, and the run goes on with the next one. Requiring actions to be pinned to a full-length commit SHA is left out: it fails every workflow that names an action by tag, which an adopted repository's workflows may.
Last, it allows auto-merge where it is off, read and reported the same way, so .github/workflows/code-review-auto-merge.yml can have a Dependabot bump of NCode Review merge itself (Stay Current). Allowing it merges nothing by itself: a pull request merges itself only once someone, or that workflow, turns auto-merge on, and still waits for what the ruleset requires and merges only as it allows.
For a public repository with one writer, the run ends with a notice naming tools/Dismiss-ScorecardAlerts.ps1. One person can't bring Scorecard's Branch-Protection, CII-Best-Practices and Contributors checks to 10, so their code scanning alerts never close; .\tools\Dismiss-ScorecardAlerts.ps1 -Repo <owner>/<name> -WhatIf lists every open Scorecard alert and the ones it would dismiss as won't fix, with a standard comment: the one ADR-0035 gives for CII-Best-Practices and Contributors, and for Branch-Protection one that cites ADR-0034 and ADR-0036, since the one ADR-0035 gives predates ADR-0036. It leaves every other alert open; without -WhatIf it dismisses them. With two writers or more it dismisses nothing.
From December 2, 2026, GitHub blocks workflows that start on pull_request_target in a public repository that has no Actions event policy allowing the event, and not in a private or internal one (Default policy for pull_request_target); brownouts before then already block it. The template's two workflows keep the event: code-review.yml runs from the default branch so a pull request can't change its own review, and its code-review environment, which Anthropic's federation rule trusts, accepts only default-branch runs; code-review-auto-merge.yml needs contents: write and pull-requests: write on a Dependabot pull request, which pull_request doesn't grant; neither checks out or runs the pull request's code. So for a public repository that has either file on its default branch, the script creates the active policy "Allow pull_request_target for code review" for those two files alone, allowing pull_request_target and issue_comment, the events the template's two files start on, and every other event either file's top-level on: key names, such as a workflow_dispatch a project adds to its code-review.yml; an event rule allows only the events it lists, for the workflows it targets, so every other workflow keeps GitHub's default. It reads on: as one event, a list in brackets, the keys or items indented below it, or - items at its own indent; a mapping in braces adds no event. It leaves alone a repository that isn't public or has neither file, and an active policy, the repository's or, when the account running it may read them, its organization's, that already allows each of those events for its files. A policy of that name is updated in place when it isn't active, doesn't allow an event the files start on or doesn't cover both files: the script sends the whole policy again, keeping any other event it allows, and says what was wrong, also when the update is refused, so a project that adds a trigger to its code-review.yml reruns the script. When the organization's policies can't be read for a reason other than HTTP 403 or 404, which an account that may not read them, or a user's repository, gets, the policy's line says so. Outcomes are reported like a security setting's and a refusal doesn't fail the run. GitHub stores the repository policy as the script sends it, on every plan, GitHub Free included: read back with gh api repos/<owner>/<name>/actions/policies/<id>, it is active, names the two workflow files under conditions.workflow_path, and has one restrict_action_events rule allowing pull_request_target and issue_comment.
An organization owner can instead run it once with -OrganizationPolicy, which creates the same policy for the organization, on every repository, and touches no repository. It needs GitHub Team or above, since GitHub offers organization event policies only on those plans, and the admin:org scope. On another plan, such as GitHub Free, where GitHub answers Upgrade to GitHub Team to enable this feature., it says so and to run the script for each repository instead, with -Repo <name>, or with -All once its -WhatIf looks right: a repository's own policy works on every plan. It updates one of that name in place, keeping the other events it allows, when it isn't active, misses one of those events or doesn't cover both files on every repository, and leaves alone one that does, or an active one that already allows pull_request_target and issue_comment for both files on every repository, -WhatIf prints the body, and it exits 1 when it can't read the policies or is refused; a later repository run finds it, when its account may read the organization's policies, and adds none.
gh auth refresh -h github.com -s admin:org
.\tools\Set-RepositoryBaseline.ps1 -OrganizationPolicy -Owner NCodeGroup -WhatIf # prints the policy it would post
.\tools\Set-RepositoryBaseline.ps1 -OrganizationPolicy -Owner NCodeGroup- A new repository:
New-Project.ps1 -CreateRemoteruns it for a GitHub repository after the first push, requiring the template'sbuild-and-testjob.-NoBaselineskips it. If it fails, the repository exists and the script says how to run it again. It can leave the code-scanning rule out: where an organization's security configuration turns CodeQL's default setup on, the setup may analyze no language yet right after the first push, as on NCodeGroup/docs and NCodeGroup/brand, and the run says so. Once CodeQL's languages are set up in the repository's settings, run the baseline again with-RequireChecks build-and-testto add the rule (ADR-0030). - An adopted repository:
Adopt-Project.ps1only commits locally, so it prints the command to run, with the same-RequireCheckswhen the repository's CI is the template's and, when it isn't, a reminder to pass-RequireChecks autoor name its own jobs. - A repository that is protected already (an active ruleset on the default branch that requires pull requests) keeps that ruleset, and so does one with the "Protect main" ruleset an earlier run made; both still get the release tags ruleset, the security settings, auto-merge and the event policy, so running the script again brings a repository protected by an older version up to date.
-WhatIfshows what the script would do, and-All -Owner <owner>covers every repository an owner has, except archived repositories and forks. A repository the script skips for its default branch, because CodeQL's default setup can't be read or-RequireChecks autofinds nothing to require, gets nothing else either. GitHub Free has no organization rulesets, so this applies them to each repository. - Name only jobs that run on pull requests with
-RequireChecks: a job that runs on a release or a schedule never reports on a pull request, and requiring it would block every merge. -RequireChecks autonames them for you. It reads the check runs on the head commit of the latest pull request merged into the default branch, which it finds among every closed pull request, and requires the GitHub Actions jobs that ran there for thepull_requestevent and passed. It leaves out, with the reason, the review bot's advisoryCode review, which the person who merges waits for instead (ADR-0019), and itspull_request_targetjob,CodeQL(the code-scanning rule covers it) and its Analyze jobs, checks other apps report, and anything skipped, neutral, failed or unfinished, since a skipped required check counts as passing. A repository with no merged pull request, or no check to require, is skipped with the reason and nothing changes. With-WhatIfit lists the checks and prints the command that names them, to trim and run (a job whose name has a comma is listed apart, since-RequireCheckswould split it);-All -RequireChecks autoreads each repository's own pull request. The list comes from one pull request, and every run says so: a job whose workflow haspathsorbranchesfilters reports nothing on a pull request the filters skip, and that pull request can't merge, so run-WhatIffirst and leave such jobs out.
On GitLab, tools/Set-GitLabBaseline.ps1 turns on a project's "All threads must be resolved" (only_allow_merge_if_all_discussions_are_resolved) and "Pipelines must succeed" (only_allow_merge_if_pipeline_succeeds) merge checks, the part GitLab plays of the ruleset's conversation resolution and required checks, as a project's ADR-0005 and ADR-0014 record. It sets "Squash commits when merging" to "Do not allow" (squash_option never), so a plan's step commits stay on the default branch, as a project's ADR-0013 records, and lets no one push to the default branch ("Allowed to push and merge" set to "No one"), so a change reaches it only through a merge request, as ADR-0005 records, and .template/Get-PlanState.ps1 reports protected: host. It also schedules a weekly pipeline on the default branch, "Weekly dependency audit", Mondays at 06:00 UTC, so the dependency-audit job a Node.js or Python project's .gitlab-ci.yml runs, and a .NET project's NuGet advisory check, also run when nothing is pushed (ADR-0029); a schedule with that description is left as it is. Each setting is read first, changed only where it isn't so already, and reported as set, already set, would set (with -WhatIf) or not available, with the reason; a refusal doesn't fail the run, and all five are on GitLab Free. GitLab Free can't change a protected branch's access levels in place, so the script removes a default branch protection made only of roles and protects the branch again, with no one allowed to push and its own merge, unprotect and force-push settings; when that fails it restores the earlier protection, and it fails the run, saying so, only when the branch is left unprotected. A protection that names users, groups, deploy keys or code owners, which GitLab Premium allows, is reported and left to change in the project's Settings > Repository > Protected branches, and an unprotected default branch is protected, with Maintainers allowed to merge. Name the project with -Project <group/name>, and -Hostname for a GitLab other than gitlab.com, or with -Path, a clone whose origin remote names it, the current folder by default. A project it can't read fails the run, and an archived one is skipped. Run it signed in to glab as a Maintainer of the project. New-Project.ps1 -CreateRemote runs it for a GitLab project, and Adopt-Project.ps1 prints the command. "Pipelines must succeed" blocks a merge request that has no pipeline: the template's .gitlab-ci.yml runs one on every merge request, and a project that keeps CI of its own needs one that does too. With -BaselineToken it also protects the v* tags (Maintainers only) and creates the project access token and the protected, masked BASELINE_TOKEN variable that a library's raise-baseline job needs.
Every project carries its update script as .template\Update-Project.ps1. Run it in the project:
cd C:\src\qso-viewer
.\.template\Update-Project.ps1 # newest template tag; commits the update
.\.template\Update-Project.ps1 -NoCommit # stages it for review instead
.\.template\Update-Project.ps1 -Ref v0.3.0 # a specific template versionFrom this repository's clone, .\Update-Project.ps1 -Path C:\src\qso-viewer does the same: it's a wrapper that runs template\.template\Update-Project.ps1, the script's single source.
| Parameter | Default | Purpose |
|---|---|---|
-Path |
The project the script sits in | The project; it must have no uncommitted changes |
-Ref |
The newest tag | Template version to update to |
-Data |
None | Answers to change: -Data @{ author_name = 'K0MTP' }. Template-owned and merged files follow the new answer; project-owned files don't |
-NoCommit |
Off | Stage the update instead of committing it |
The script needs no template clone: it clones the template from the address in .copier-answers.yml into a temporary folder, with the Git access Copier needs anyway, and deletes it afterwards. The script is template-owned, so it updates itself: when the target version's copy differs from the running one, it hands the update over to that copy, and the newest update logic always does the update. Every version accepts the same parameters, so any version can hand over to any later one. It refuses to run on the default branch (the branch origin/HEAD names), because it commits: run it on a branch of its own, such as git switch -c build/project-template-v0.2.0, or pass -NoCommit.
A project on v0.8.0 or earlier doesn't hand over: its script can't read the newer copy from a template cloned over a URL, so it runs its own, older logic — it prints Copier's raw "Make sure Git >= 2.24 is installed" warning and no "Handing the update over" line — and installs the newer script for the next update (CHANGELOG.md). To run the newest logic on that first update, run the wrapper from a clone of this repository: git clone https://github.com/polewskm/project-template.git, then .\Update-Project.ps1 -Path <project> in that clone.
On Windows, a project on v0.69.0 to v0.75.0 can't update: the update starts with copier recopy at the project's own version, and Git for Windows refuses to check those versions out, because their uses_node file names hold a |. The script stops before it changes anything when the project's version has a path Git for Windows refuses, names the path, and says to update once from Linux, macOS or WSL, such as with pwsh ./.template/Update-Project.ps1 in WSL; later updates run on Windows again.
| File | On update |
|---|---|
| Template-owned | Replaced by the new version; files the template added are created, and files it removed are deleted. A local edit is discarded and a deleted file restored, and the script lists both, so the change can move into a project file; a file the update leaves as the project had it, such as an edit the new version also makes or a deleted file it also deletes, is listed under neither. A template-owned file that an earlier template version never updated, such as docs/decisions/project-template/README.md before 0.59.1, is first reset to the project's version, discarding a local edit, and listed under Refreshed |
| Merged | The template's changes since the project's version merge with the project's edits. Only the same lines changed on both sides conflict. A merged file the project deleted stays deleted. An adopted project's .gitattributes loses a catch-all text rule, such as * text eol=lf, from the lines it kept at adoption, and the script says so: those lines come after the template's, and Git uses the last rule that matches, so the rule overrode the template's binary rules. A merged file the project seems to have replaced, sharing less than half its lines with the template's, gets a suggestion to make it project-owned. |
| Project-owned | Including each file, merged or template-owned, that the project_owned_files answer names. Never touched, even if the project deleted it. When the template changed one since the project's version, the script shows the template's change, rendered with the project's answers, with pre-release: untracked only when AGENTS.md's Landing section says so and with that section's release line, leaving out what the project's file already has; copy over what you want |
.copier-answers.yml, .template-version |
Record the new version |
Without a conflict the result is one commit, Update from project-template v0.2.0:
Handing the update over to the v0.2.0 version of Update-Project.ps1.
Template v0.1.0 -> v0.2.0:
added .claude/commands/plan-release.md
modified .github/instructions/project-template.instructions.md
modified .gitignore
modified .template-version
modified .template/Update-Project.ps1
modified CLAUDE.md
Local edits discarded — these files are the template's; make the change in a project file instead:
CLAUDE.md
The template changed these project-owned files since v0.1.0. They weren't touched; copy over what you want:
AGENTS.md:
@@ -23,3 +23,3 @@ Run from the repository root in PowerShell 7.
-## Conventions
+## Conventions and Overrides
Committed "Update from project-template v0.2.0". Review it with: git show --stat
The script runs copier recopy at the project's current template version, which resets the template-owned files and so shows any local edits, then copier update --defaults, which moves to the new version and merges the merged files. If anything else fails, it resets the project to where it was. It stages only what the update changed, the tracked files with git add -u and each file it added by name, never with git add -A, and from its reset to its end .git/info/exclude holds a copy of the project's whole .gitignore, an adopted project's kept lines included, so a folder the project ignores, such as node_modules/ in a checkout with a frontend installed, is never staged, also when the updated .gitignore doesn't ignore it. copier check-update, run in a project, tells whether a newer template version exists.
When the license answer is blank and the repository has no LICENSE or COPYING file at its root, the update warns, also when the project is already up to date, and prints the command that adds Apache-2.0, NCode Group's license. It never chooses a license itself: a project from before the license question gets a blank answer (ADR-0024). When the answer names a license and the root has no license file, such as an SPDX expression the template writes no file for or a deleted LICENSE.txt, it warns too, starting No license file:, and says to add that license's text as LICENSE.txt.
No license: the license answer is blank and the repository has no LICENSE or COPYING file, so no one else may use, copy or change its code, and the OpenSSF Best Practices criteria for a license can't be met. To license it under Apache-2.0, NCode Group's license, which adds LICENSE.txt and COPYRIGHT.txt, run the command below in the repository; for another SPDX license expression, such as MIT, put it in place of Apache-2.0:
.\.template\Update-Project.ps1 -Data @{ license = 'Apache-2.0' }
When the best_practices_project answer is set and README.md doesn't show the project's OpenSSF Best Practices badge, the update says so, also when the project is already up to date, and prints the line to add near the top of README.md, which documentation_achievements asks for within 48 hours of earning a level: README.md is project-owned, so the template never adds it there (ADR-0025).
With NCode Review, when .github/workflows/code-review.yml pins NCodeGroup/code-review before v1.5.0, passes no approve: true or passes it without approver-private-key, or AGENTS.md's Landing section doesn't say draft: yes, the update says what to change, also when the project is already up to date, to store the approver's key with NCodeGroup/code-review's tools/Enable-CodeReview.ps1 -ApproverPrivateKeyPath, and to run tools/Set-RepositoryBaseline.ps1 again, so the default branch requires one approval, of the last push, once NCode Review's approver is set up or a second person has write access, and none with one writer otherwise, since GitHub counts no approval from NCode Review's own app (ADR-0022, ADR-0034, ADR-0036). It also says that NCode Review v1.5.0, published on 2026-11-21, waits out the three-day cooldown of ADR-0009 until 2026-11-24, or is adopted sooner only by that record's commented exception. Both files are the project's, so the update changes neither.
When the project has version tags merged into the current branch that its changelog has no section for, such as releases from before it had a changelog, the update ends with a request to backfill them:
Version tags without a section in CHANGELOG.md: v0.1.0..v0.3.0. To give the changelog the project's full release history, in the repository, run:
/plan-migration Backfill CHANGELOG.md from the releases v0.1.0..v0.3.0
For a .NET library whose current major has a release built with a higher assembly version than build/ProjectTemplate.props pins, such as 5.3.0 built as 5.3.0.0 by a build that doesn't pin it, the update writes it into the version.json it adds, as the template's ADR-0136 and ADR-0138 say, or, for a library without version.json, names the AssemblyVersion to set in Directory.Build.props until the next major. It leaves .github/workflows/publish.yml out of a library whose own workflow already runs nuget push, so a published release runs one publisher, and warns when both exist; the nuget_publisher answer then names that workflow, so the update also leaves out release-provenance.yml and raise-baseline.yml, deleting them where an earlier update added them, and renders the documents it adds, and the template changes it shows, with that workflow in place of publish.yml. A version.json the update adds starts at the patch after the newest release tag, and while the library has one, the update warns about a publish.yml that packs without -p:PublicRelease=true and names the files that reference Nerdbank.GitVersioning themselves, and each job of the project's own workflows, other than publish.yml, that builds, packs, tests or pushes packages with an actions/checkout step without fetch-depth: 0 whose folder holds such a step's working directory (its working-directory:, or the job's or workflow's defaults:), on which Nerdbank.GitVersioning fails the build, or with a -p:Version argument, which it ignores. A NuGet package needs a license: when a library's answers and -Data give none, the update stops before it changes anything and prints the -Data @{ license = '<SPDX expression, such as MIT or Apache-2.0>' } to run it with.
To plan an update instead of running it, run /plan-template-update in the project, or name a version: /plan-template-update v0.14.0. It reads .copier-answers.yml and the release notes since the project's version, runs Update-Project.ps1 -NoCommit on a clone of the project in a temporary folder, and plans from what that trial changed. The plan's first step runs the update with -Ref pinned to the target and -NoCommit, so it is committed as a plan step, and a result that differs from the trial escalates. The next steps run the project's checks and fix the project's own files that still describe the old template, and the last runs the project's tests. Every check is judged by its exit code. The planning session files an issue here for each gap in the template that the trial shows. In Claude Code the plan gets its own worktree, unless the project's plan-executor subagent predates v0.11.0 and can't run PowerShell there; then it runs on a build/project-template-<version> branch in the current checkout. A project on v0.13.0 or earlier doesn't have the command yet: compose it from this repository's clone with .\workflow\New-PlanPrompt.ps1 plan-template-update, or install the commands for your user with .\workflow\Install-HybridWorkflow.ps1 -User.
A GitHub project gets .github/workflows/template-update.yml, which runs .template/Get-TemplateUpdate.ps1 every Monday at 07:00 UTC, and on demand from the Actions tab or with gh workflow run template-update.yml. It needs only the workflow's own GITHUB_TOKEN, with contents: read and issues: write. The script reads the project's version from .template-version, lists the template's tags at _src_path in .copier-answers.yml with git ls-remote, and takes the newest vX.Y.Z, as Update-Project.ps1 does. While the project is behind, it keeps one open issue labeled template-update (it creates the label the first time): it opens "Update to project-template v0.42.0" with the CHANGELOG.md sections after the project's version up to that tag, read at that tag; a later run edits that same issue, retitling it and rewriting its text when a newer version comes out, and leaves it alone when nothing changed. A section that doesn't fit in an issue is left out, with a link to the changelog. Once the project is on the newest version, the next run closes the open issue with a comment; with no open issue it does nothing. /plan-issue on that issue plans the update with /plan-template-update's instructions, so /triage-issues and /run-issues send it there too. The script rewrites the issue's text, so put notes in comments. To stop the notices, disable the workflow: gh workflow disable template-update.yml. The file is template-owned, so deleting or editing it lasts only until the next update. A template that the workflow's token can't read, such as a private one, fails the run.
A project records where its template came from in .copier-answers.yml (_src_path). The template moved from polewskm/project-template to NCodeGroup/project-template. GitHub redirects the old address, but only while nobody creates a repository at it, so the update script moves a project over: when _src_path is https://github.com/polewskm/project-template.git, it changes that one line to https://github.com/NCodeGroup/project-template.git, clones from there, and commits the change with the update, even when the project is already at the newest version. A project on an older script gets this with the update that hands over to the newer one (Update a Project).
When the template and the project changed the same lines of a merged file, the script commits nothing, exits 1, and says how to finish:
Template v0.2.0 -> v0.3.0:
conflict .gitignore
modified .template-version
modified CLAUDE.md
1 file(s) conflict: the template and this project changed the same lines. In each, keep the right lines and delete the <<<<<<<, ======= and >>>>>>> marker lines. Then:
git add -u
git diff --cached --check # prints any marker you missed
git commit -m "Update from project-template v0.3.0"
To abandon the update instead: git reset --hard; git clean -fd
The rest of the update is already in place and staged, deletions included; only the conflicting lines wait for you, so once you resolve them, git add -u stages the whole update. In the file, the top half is the project's version and the bottom half the template's:
<<<<<<< before updating
Thumbs.db # project
=======
Thumbs.db # template
>>>>>>> after updating
VS Code lists the file under Merge Changes in Source Control and calls the halves Current and Incoming, with Accept buttons above each block. Git won't commit while a file is still unmerged, but git add marks it resolved even with markers left in it, so run git diff --cached --check before committing.
A conflict in a template-owned file comes from a copy of the project's own, such as a build/dod.ps1 the template now adds. The script then also names the file and prints the .\.template\Update-Project.ps1 -Data @{ project_owned_files = ... } that makes it project-owned, so the project keeps its copy: abandon the update and run that instead (Project-Owned Files).
A commit records the people who wrote it. AI tools add their own attribution by default — Claude Code a Co-Authored-By: Claude <noreply@anthropic.com> trailer and a Claude-Session: trailer, Copilot a Co-authored-by: Copilot trailer, and Codex, Cursor, Devin, Jules, Gemini, Grok, GitLab Duo, aider and other agents their own trailers, footers, session links or bot accounts — and GitHub then lists the agent as a contributor, which only rewriting published history undoes. Every project, and this repository, prevents it at the source, in settings and rules that travel with the repository, and enforces nothing (ADR-0018):
| Layer | Stops |
|---|---|
attribution in .claude/settings.json: commit and pr empty, sessionUrl off |
Claude Code's trailers and pull request text |
git.addAICoAuthor off in .vscode/settings.json |
VS Code's own Copilot trailer when you commit from Source Control |
The rule in .github/instructions/project-template.instructions.md (here, AGENTS.md) |
Agents that write the commit message themselves, such as Copilot's |
/ship-plan and /run-issues delete agent attribution lines from the pull request title and description they write (workflow/templates/_pr-attribution.md) |
Attribution in the text the workflow writes |
Nothing checks for attribution or fails over it: no hook rewrites or refuses a commit, no CI job or required check fails a pull request, push or pipeline, and no workflow command reads a post back to remove a footer, such as the _Generated by [Claude Code](…)_ line a Claude Code cloud session appends, or reports one. What gets through stays. A repository whose ruleset still requires a Commit attribution check, from a template version before v0.83.0, drops it from the required checks, or every pull request waits for a check no workflow reports; .template/Update-Project.ps1 says so when its update removes the check.
A project pins exact versions so that a build today matches a build next month: each package, each CI action (by commit SHA), the .NET SDK in global.json, and the template version in .template-version (from _commit in .copier-answers.yml). Pinned versions never update themselves; something has to notice each new upstream release and change the pin.
| What goes stale | How it's kept current |
|---|---|
| A GitHub project's CI actions, packages and .NET SDK | Dependabot, built into GitHub: .github/dependabot.yml turns it on, with nothing to install or sign up for. Each week it opens a pull request for newer versions that are at least three days old (its cooldown) — every update of one kind together, except a new release of the NCode Review action, which comes alone, and security updates in a pull request of their own per ecosystem — which CI tests and you merge. Dependabot doesn't offer a new .NET SDK major: moving the target frameworks to a new .NET major version is a planned migration, /plan-migration |
| A GitLab project's packages and .NET SDK | By hand; GitLab has no free built-in equivalent. Its CI images use floating tags such as python:3 and mcr.microsoft.com/dotnet/sdk:10.0, so they follow upstream on their own. A .NET job installs the SDK global.json selects with build/Install-Dotnet.ps1, so global.json is the one place its version moves |
| A project's template-owned files | .template\Update-Project.ps1, run in the project. copier check-update, run there too, tells whether a newer tag exists. On GitHub, the weekly template-update workflow opens an issue when one does (The Update Notice) |
A repository or user profile with only the workflow installed (workflow\Install-HybridWorkflow.ps1 -Repo or -User) |
By hand: re-run the installer from a clone at the newest tag. The version it has is in .template-version — at the repository root, or in ~\.claude\ and ~\.copilot\ for the profile |
| This template's generated workflow files | tools/Update-Template.ps1 regenerates them from workflow/templates; tests/Test-Template.ps1 fails when they're behind |
This template's own CI actions, in .github/workflows/test-template.yml; the Node.js packages its tests use, the yaml and nunjucks packages tests/Test-Template.ps1 runs for its YAML and _exclude checks, pinned in tests/node/package.json and its lock file; and the Python programs its tests run, the Copier CI installs and the pre-commit tests/Test-GitHooks.ps1 runs through uvx, pinned in tests/requirements.txt |
Dependabot in this repository |
The pins inside template/ — the actions in ci.yml.jinja and in the .github/actions/install-dotnet action, and the SDK in global.json — are in merged files, which each project's Dependabot keeps current on its own. A template release that moves the same pin to a different version conflicts on that line (keep the newer version), so change a pin in the template only when you change that step anyway, or to keep new projects from starting far behind. The checkout pin in template-update.yml and the dependabot/fetch-metadata pin in code-review-auto-merge.yml are in template-owned files instead: when a project's Dependabot moves one, the next update lists the file under its discarded local edits and puts back the template's pin, so keep those pins current here.
A Dependabot pull request that only moves the NCode Review pin in .github/workflows/code-review.yml to a newer minor or patch release merges itself. .github/workflows/code-review-auto-merge.yml runs from the default branch on pull_request_target for Dependabot's pull requests from the repository itself, with only contents: write and pull-requests: write, and checks nothing out: it reads the update with dependabot/fetch-metadata, which must name NCodeGroup/code-review alone, checks through the API that every changed line is in a .github/workflows/*.yml file and is that action's uses: line, pinned to a full commit SHA with its # vX.Y.Z tag, and runs gh pr merge --auto for the commit it checked, with the first merge method that both the repository's settings and the active rules of the branch it merges into allow: a merge commit, else a rebase, else a squash. A ruleset's allowed merge methods and its "Require linear history" rule count; when no method is left, the run fails and says so. Classic branch protection's "Require linear history" can't be read with the workflow's token: a repository that sets it there should turn merge commits off in its settings, or require linear history in a ruleset instead. The bump then merges once the checks the default branch requires pass, and, where the ruleset requires an approval, once a maintainer approves it: NCode Review doesn't review a bot's pull request, and the workflow approves nothing. A major release, which can change the inputs the caller passes, a pull request that updates other dependencies too, and any other change wait for you. Dependabot puts every other action update of a week in one pull request, but .github/dependabot.yml gives NCodeGroup/code-review a group of its own, ncode-review, listed before the catch-all group, since Dependabot puts an update in the first group that matches it: so the bump comes in a pull request of its own whatever else moved. Auto-merge has to be allowed in the repository's settings, which tools/Set-RepositoryBaseline.ps1 does (Protect the Default Branch). A project without code-review.yml gets no such pull request, so the workflow never merges anything there; to stop it, gh workflow disable code-review-auto-merge.yml. It is the one exception to ADR-0006, "a person merges every pull request; an agent never does": docs/decisions/project-template/0006-a-person-merges-every-pull-request.md records its scope and why the rule's reason, nothing merging over a review no person read, doesn't apply to a pin bump to a release that was itself reviewed and merged in NCodeGroup/code-review.
- Edit the base files under
template/:*.jinjafiles are rendered with the answers, every other file is copied as is. Keep every file and folder name plain: a name never holds a Jinja tag. To give a file only to some projects, list its path in an_excludeentry ofcopier.yml, under the condition on which a project doesn't get it, such as{% if stack is defined and stack != 'dotnet' %}for the .NET layer; one entry can list several paths, one per line. Test every answer the condition reads withis defined, as those entries do:copier updateapplies the new version's_excludeto its render of the project's old version too, whose answers can lack it, and a file excluded there is left in the project, not deleted, so a later version that narrows a file's condition leaves the file in the projects that already have it. Copier checks out the whole template repository, so every path must check out on Windows, Linux and macOS alike, with no setting such ascore.longpaths:tests/Test-WindowsFileNames.ps1fails a path with a character Windows forbids in file names (<>:"|?*\or a control character), a name Windows reserves, such asCONorNUL, a name that ends in a dot or a space, a Jinja tag, or more than 160 characters.tests/Compare-Renders.ps1 -Base <commit>checks that a change renders, and updates a project, exactly as the template at that commit does. A new file is template-owned unlesscopier.ymllists it under_merged_filesor_skip_if_exists. Each_skip_if_existsentry starts with/, such as/README.md: Copier reads the entries like.gitignorepatterns, so a name without a/also matches every file of that name deeper in the tree, such asdocs/decisions/project-template/README.md, and keeps updates from replacing it.tests/Test-UpdateSkipPatterns.ps1fails an entry without one. Keep a file template-owned whenever its tool can include a second, project-owned file; list it under_merged_fileswhen it can't. A question that a later version adds must be read through a default wherevercopier.ymluses it before the question is answered — the_excludepatterns readworkflow_tools | default([...])— because an update renders the old version's files with the newcopier.ymlbefore the project has that answer; without the default an old project's update stops with conflicts.tests/Test-Template.ps1fails an_excludepattern that excludes anything without the answer. - For the workflow commands, agents and prompts, edit the source templates in workflow/templates, then run
.\tools\Update-Template.ps1to regenerate their copies undertemplate/and at the repository root. - Run
.\tests\Invoke-AllTests.ps1(add-SkipDotnetBuildto skip the .NET build and pack) and confirm its last line readsAll tests: PASSED. It runs everytests\Test-*.ps1suite, each in its own PowerShell process and up to one per processor at once (-ThrottleLimit <n>sets how many;-Serialruns one at a time), so a full run takes about as long as its slowest suite. Once all have finished it printsPASSorFAILand the time for each, in name order, with a failed suite'sFAILlines and the path of its full log, then the run's wall-clock time asTime: <m:ss>, and exits 1 when any suite fails. It also runs each end-to-end fixture setup that.github/workflows/test-template.ymlruns, everyrun: ./tests/e2e/<script>.ps1 -SetupOnlyline with the arguments it gives, such as-Scenario rest, each with a-Workfolder of its own in the run's folder, and prints their results after the suites', in the workflow's order, asPASS e2e/<script>.ps1 -SetupOnly …: a setup builds and checks its fixture without a model, so a change that breaks one fails the local run as it fails CI. To measure a change,.\tests\Measure-Suites.ps1 -Name <suite>times suites one at a time instead:-Repeat <n>prints the median of n runs, and-MaxSeconds <s>fails a suite slower than that. - Add the version's section to
CHANGELOG.mdin its Keep a Changelog format (## [0.2.0] - <date>below## [Unreleased], entries under### Added,### Changed,### Fixedand the other groups, and the compare links at the end) and land the change through a pull request: this repository'smaintakes no direct pushes (AGENTS.md's Landing section). Once it merges, the Release workflow (.github/workflows/release.yml) tags the commit it merged as and publishes the GitHub release from that section; when its run fails, run it again from the Actions tab. For a planned change, the plan's last step writes these notes, and/ship-plandoes the rest: it drops the empty plan commits, pushes the branch and opens the pull request, and, run again after the merge, files the plan's follow-ups as issues and closes the issue.
tests/Test-Template.ps1 works on a tagged snapshot of the working tree, without Claude Code's worktrees, in the temp folder. Each suite works in a folder of its own there, named for the suite and its process ID, such as project-template-test-<PID>, so two runs at once, from two worktrees or two sessions, don't collide; a run that passes deletes its folder through tests/Remove-TestWork.ps1, which says so when it can't, and one that fails, or stops with an error, keeps it and prints its path. -Work picks the folder instead, and leaves it in place. A suite that builds a template snapshot keeps Copier's mirrors in a copier-cache folder in its work folder instead of the user's Copier cache, unless COPIER_CACHE_DIR is already set, as tests/Invoke-AllTests.ps1 sets it to its own folder for the suites it runs; tests/Test-Template.ps1 gives each render a folder of its own there. tests/Test-Template.ps1, tests/Test-TemplateDotnet.ps1, tests/Test-ProjectUpdate.ps1, tests/Test-ProjectUpdateHooks.ps1, tests/Test-Adoption.ps1, tests/Test-AdoptEdgeCases.ps1, tests/Test-AdoptOwnedFiles.ps1, tests/Test-UpdateIgnoredFiles.ps1, tests/Test-UpdateExitCode.ps1, tests/Test-UpdateLibrary.ps1, tests/Test-UpdateKeptLines.ps1, tests/Test-UpdateConflictStaging.ps1, tests/Test-UpdateOwnedFiles.ps1, tests/Test-UpdateOwnedTemplateFiles.ps1, tests/Test-UpdateSkipPatterns.ps1, tests/Test-UpdateTemplateOwnedConflicts.ps1, tests/Test-UpdateRewrittenFiles.ps1, tests/Test-UpdateWindowsCheckout.ps1, tests/Test-UpdateBaseline.ps1, tests/Test-CSharpierWrapper.ps1, tests/Test-PlanState.ps1, tests/Test-ChangelogBackfill.ps1, tests/Test-DecisionIndex.ps1, tests/Test-TemplateUpdate.ps1, tests/Test-GitHooks.ps1, tests/Test-RepositoryBaseline.ps1, tests/Test-GitLabBaseline.ps1, tests/Test-NewProjectRemote.ps1, tests/Test-ScriptAnalyzer.ps1, tests/Test-AgentRunner.ps1, tests/Test-WindowsFileNames.ps1, tests/Test-BestPracticesCriteria.ps1 and tests/Test-InvokeAllTests.ps1 run on every push to main and every pull request through .github/workflows/test-template.yml:
| Check | For |
|---|---|
| Common files present | Every stack, on GitHub and GitLab |
| The six Best Practices documents and the criteria map | Their sections, among them CONTRIBUTING's Review Requirements and good first issue, SECURITY's 14-day acknowledgement and the assurance case's Security Reviews, and the conduct contact; GOVERNANCE.md and docs/architecture.md never saying the project starts with release: none; docs/best-practices-criteria.md with all 145 criteria, what stops a level, the checks, whose Coverage check says CI doesn't gate on coverage only when coverage_gate is off, and, on GitHub only, the registration prompt; with best_practices_project, the answer recorded and the badge in README.md, docs/best-practices-badge.md and the criteria page; and Copier refusing a project number that isn't digits; every stack, on GitHub and GitLab |
| Release follow-ups | provenance and baseline call the follow-ups, which run on workflow_call and never workflow_run, with ADR-0151; a .NET library on GitHub |
| NCode Review approval | approve: true in the review job alone, draft: yes and CONTRIBUTING's /review; GitHub with code_review |
| .NET layer present, or absent | .NET, or every other stack |
NuGet package settings in build/ProjectTemplate.props only with nuget_package |
.NET |
The analyzers, banned APIs and test-project suppressions in the build settings, the banned API analyzer in Directory.Packages.props; LICENSE.txt, COPYRIGHT.txt, NCodeGroup.png, the C# file header and the library decisions for the license and icon answered, and no C# file header for an author_name holding ; or #; CI's NuGet cache, the SDK and runtimes it installs before the build, and test-result artifacts, and for a library its package artifacts; on GitHub, the .github/actions/install-dotnet action, only for .NET, which installs the SDK global.json selects and then the runtimes with actions/setup-dotnet pinned to a full commit SHA, whose runtimes step, run against stand-ins for build/Get-TestRuntimes.ps1, passes each channel printed and none when none is, and which CI, copilot-setup-steps.yml and publish.yml call with no actions/setup-dotnet step of their own; publish.yml only for a library on GitHub, on a published release, packing only a tag whose commit the default branch holds, with no permission by default, trusted publishing in the nuget environment and every action pinned to a full commit SHA with its tag in a comment; raise-baseline.yml only for a library on GitHub, following Publish packages with no permission by default, a checkout that keeps no credential and the tag only in an env value, and build/Update-Baseline.ps1 for every library |
.NET, and .NET libraries under MIT with their own icon and under Apache-2.0 with the template's, and .NET with the author C# Tools; Inc. |
The null-forgiving operator banned outside test projects, the public API tracked, AssemblyVersion pinned and version.json read through Nerdbank.GitVersioning only for a library, a library's builds fetching the full history, AGENTS.md naming the Definition of Done as the gate, CI running build/dod.ps1 for the default commands, and CI checking the decision index |
.NET on GitHub and GitLab; the decision index for every stack |
A probe that calls every banned method and property overload fails the build with RS0030 on each call, and every banned entry is a documentation ID with a message; ! fails the build with NX000x; build/dod.ps1 passes on the root solution; build/Get-TestRuntimes.ps1 names 8.0.x for a test project that also targets net8.0; build/Install-Dotnet.ps1 -SkipSdk installs nothing without one, and build/Install-Dotnet.ps1 installs the SDK global.json selects, which the installation's dotnet runs, and that runtime into a scratch folder, and skips both once they are there. Before that, offline, with stand-ins for Microsoft's release metadata and downloads (-InstallerOnly runs only these), build/Install-Dotnet.ps1 refuses an archive whose SHA-512 differs from the metadata's and leaves nothing behind; selects the exact version with no rollForward, with disable and for a prerelease version, and the newest release under latestPatch, latestFeature, latestMinor and latestMajor; stops with its own error for an incomplete version, an unlisted SDK and a missing SDK or runtime archive; adds a verified SDK archive's files without replacing one already there; gives every request its 30- and 60-second timeouts, tries a 503, a 408, a 429 and a stalled download again, 5 and then 10 seconds later, waits out a 429's Retry-After of 20 seconds, waits 60 seconds for a 503's Retry-After date an hour away, adds up to a second at random to each wait, gives up after three tries and fails at once on a 404; and, without -InstallDir, adds to the installation dotnet --list-runtimes shows for Microsoft.NETCore.App, stopping when it shows none. For an Apache-2.0 library: the package's project page is the site docs/site/site.config.json names, with one trailing /, else the repository, also for a config without site.url, and a project file's own wins; build/Update-PublicApi.ps1 records a new project's API, build/dod.ps1 packs it at version.json's version with its symbols, an unrecorded public type fails with RS0016, IDE0073 raised to a warning matches a file that starts with the header .editorconfig sets and fails one without it, a version.json at 2.5.0-rc.1 packs 2.5.0-rc.1 with -p:PublicRelease=true and AssemblyVersion 2.0.0.0, and without version.json, version 2.5.0-rc.1 builds as AssemblyVersion 2.0.0.0 with FileVersion 2.5.0 |
.NET, in tests/Test-TemplateDotnet.ps1 (skip with -SkipDotnetBuild) |
The CI file for the git_host answer, with no commit attribution job, a concurrency group that never cancels a default-branch commit's run, a timeout on every job and every action pinned to a full commit SHA, and .github/dependabot.yml (grouped, with a security-update group per ecosystem, NCode Review's bump in a group of its own ahead of the catch-all actions group, only the .NET SDK's majors ignored, and, for .NET, the actions under .github/actions/* read beside the workflows), .github/workflows/copilot-setup-steps.yml only on GitHub with Copilot, with its one copilot-setup-steps job, a 59-minute timeout and only contents: read, and .github/workflows/template-update.yml on GitHub only; the update notice workflow runs weekly and on demand with only contents: read and issues: write, and pins each action to a full commit SHA with its tag in a comment; and .github/workflows/code-review-auto-merge.yml on GitHub only, which runs on pull_request_target for Dependabot's pull requests from the repository itself, holds no permission but its job's contents: write and pull-requests: write, checks nothing out, pins dependabot/fetch-metadata to a full commit SHA with its tag in a comment, turns on auto-merge, by a method the repository allows, only for a minor or patch bump of NCodeGroup/code-review alone whose every changed line is its pin, and passes the event's values to its commands through env only; its diff check, run as the runner runs it against a stand-in for gh that answers with fixture pages of changed files, passes a clean pin bump, on one page or two, and refuses a bump with any other changed line, a file outside .github/workflows or in a folder below it, an added, removed or renamed workflow, an empty or missing patch, unbalanced removed and added pins, and a pull request with no file; and its merge-method choice, run the same way against a stand-in for gh that answers with fixture repository settings and branch rules, picks a merge commit where everything allows one, a rebase where the settings turn merge commits off or a ruleset requires linear history, a squash in a squash-only repository or where a ruleset allows only squash, with rules on one page or two, and turns on nothing, failing with its reason, where no method is left |
Every render |
CI sets up and installs with the package_manager answer, the default commands run it and no other manager, and Dependabot uses its ecosystem |
Node.js with npm, pnpm, Yarn and Bun, on GitHub and GitLab |
GitLab CI selects the .node-version Node.js through the pinned nvs before the build for a project that answers uses_node, and installs no nvs without the answer; the PowerShell job runs in the .NET SDK image with no apt-get, and the other stack's job in node:lts with the answer and alpine:3 without it |
.NET, Python, PowerShell and other on GitLab |
| LF line endings, no leftover Jinja, valid JSON, valid YAML | Every rendered file |
Every shell: pwsh run: block of a workflow or action parses as PowerShell (${{ }} expressions set aside), in each render and in this repository's own .github workflows |
Every rendered file, and this repository |
No line that joins two list items, such as remains.- Secrets |
Every rendered Markdown file |
Every ADR-0NNN a rendered Markdown file cites names a decision record the project has, in docs/decisions/ or docs/decisions/project-template/; ADR-0016 cites ADR-0137 only in a .NET library on GitHub |
Every render |
Workflow files, editor settings, .gitignore, AGENTS.md, the template rules and README.md only for the chosen workflow_tools |
Every render |
.copier-answers.yml and .template-version record the version |
Every render |
Every _exclude pattern excludes nothing when workflow_tools is missing |
Always |
Every tests/Test-*.ps1 script has a run: ./tests/<name> line in the matrix of .github/workflows/test-template.yml, so CI runs it |
Always |
.github/workflows/test-template.yml installs Copier with uv tool install --constraints tests/requirements.txt copier, tests/requirements.txt pins it with copier==<version>, and .github/dependabot.yml has a pip entry for /tests that moves the pin |
Always |
.github/workflows/test-template.yml sets up Node.js from .node-version with actions/setup-node, tests/node/package.json pins every package exactly, and .github/dependabot.yml has an npm entry for /tests/node that moves them |
Always |
tests/requirements.txt pins only the Python programs the tests run, Copier and pre-commit, and the repository has no Python file outside template/, as ADR-0021 says |
Always |
tests/node/check-yaml.mjs fails an invalid YAML file and one with a tag it doesn't know, such as GitLab's !reference; check-exclude.mjs fails an _exclude pattern that renders without answers, one that looks up an attribute of an unanswered question, as Jinja2 does, and a copier.yml without _exclude, and passes a pattern guarded by is defined; and pwsh-steps.mjs lists a workflow's pwsh steps and not its bash ones |
Always |
Every entry in this repository's .github/dependabot.yml waits a three-day cooldown and gives security updates a group of its own |
Always |
Generated workflow files, under template/ and at the repository root, match a fresh run of workflow\Install-HybridWorkflow.ps1 |
Always, including CI |
The installer writes both variants for every tool; New-PlanPrompt.ps1 composes a prompt; Invoke-PlanSteps.ps1 -DryRun parses the example plan |
Always |
The installer writes the template version to .template-version at the repository root; template/ and this repository's root have no installer-written copy |
Always |
Every executor — the Copilot Implementer, the execute-step prompt, and the Copilot CLI and Claude Code plan-executor agents — runs on Claude Sonnet 5.5 |
Always |
| Each tool's planning commands create the plan's worktree, and the commands that execute, re-plan, review or finish a plan join it; no Copilot file uses Claude Code's worktree tools | Always |
The planning commands and /run-issues settle the hooks and the push branch in the main checkout before they create a worktree |
Always |
The planning commands' worktree setup, in each tool, runs a Node.js project's install in the main checkout too when it has none, through workflow/templates/_main-checkout-install.md; Copilot's /run-issues allows that install there, the Node.js rules say why, and USAGE.md's troubleshooting names the fix |
Always |
| No generated command, prompt, skill or agent switches or creates a branch in the main checkout | Always |
Every rendered .gitignore ignores .claude/worktrees/ |
Always |
ship-plan and run-issues delete agent attribution lines from a pull request's title and description before gh pr create or gh pr edit sends them, through workflow/templates/_pr-attribution.md |
Always |
ship-plan, before it opens a plan's pull request, each time it pushes to an open one and before it pushes to the default branch with integrate: direct, run-issues when it refreshes the description and run-feedback after each push find the open follow-up issues created since the branch left the default branch that the branch's work completes, through workflow/templates/_follow-up-check.md, and close them with Closes lines, or, with integrate: direct, a comment and a close once the commits land; one only partly completed gets a comment and a rewritten body once the work lands; the project rules say the same for a push made without /ship-plan |
Always |
_review-request.md posts a /review comment after each push of fix steps and leaves it as posted, footer and all, which each generated copy of run-issues and run-feedback keeps, and no generated copy reads back, edits or deletes a /review comment, or asks for one in an Autopilot: comment |
Always |
Every generated copy of each workflow command or agent whose text runs gh pr, gh issue, gh release or gh api graphql includes workflow/templates/_github-rest.md, the REST forms of those commands for a session that refuses GitHub's GraphQL API, with the review-thread route and the reply route |
Always |
review-plan-diff checks each changed file against the instruction files whose applyTo or paths: match it and reports each departure as should-fix |
Always |
Every command that posts comments and replies from files includes workflow/templates/_reply-check.md, which reads each post back by its id and writes the file's text over it once when it differs |
Always |
New-Project.ps1 passes a list answer in -Data to Copier |
Always |
New-Project.ps1 and Update-Project.ps1 enable .githooks, with pre-push executable, keep a hooks path Git already has and warn with the command to run |
Always; the update check in tests/Test-ProjectUpdateHooks.ps1 |
dotnet new classlib and xunit, added to a root solution, pass the default dotnet build and dotnet test under Directory.Build.props and global.json |
.NET, in tests/Test-TemplateDotnet.ps1 (skip with -SkipDotnetBuild) |
A project's own .template\Update-Project.ps1 hands the update over to the new version's script; it replaces template-owned files, discards and reports an edit to one, and restores a deleted one, but lists neither an edit the new version also makes nor a deleted file it also deletes; merges a merged file, keeping the project's edit, and keeps a deleted one deleted; leaves project-owned files untouched and shows the template's changes to them, leaving out those the project already has; deletes and adds files as the template did; makes one commit, and changes nothing on a second run. On a same-line change to a merged file it stops with exit code 1, commits nothing, still replaces the template-owned files, and finishes once the conflict is resolved. The root wrapper updates another project by -Path |
A Python project, in tests/Test-ProjectUpdate.ps1; the root wrapper on a Node.js project, in tests/Test-ProjectUpdateHooks.ps1 |
tests/Test-Adoption.ps1: the adoption functions and legacy adapters on small inputs; adopting a Python repository on GitLab and a .NET repository built on the NCodeGroup scaffold — answers worked out, merged files rebuilt, AGENTS.md and Directory.Build.props extended, versions moved into Directory.Packages.props, follow-ups reported, a repository's own changelog left as it is, with a follow-up to convert one that isn't Keep a Changelog and one to backfill the version tags it has no section for, the report naming only the follow-ups the repository really has and a publishing workflow's shallow checkout once version.json exists, the package packed with README, icon and license, and a later template update merging cleanly |
Always (-SkipDotnetBuild skips the .NET build and pack) |
tests/Test-AdoptEdgeCases.ps1: adopting the fixture repositories that tests/Test-Adoption.ps1 leaves out, in a suite of its own so a parallel run ends sooner — a failure after Copier rolling the repository back, a hooks path and a ci.yml of the repository's own kept, with a warning that names the command to run, no follow-up to reconcile ci.yml, and the update's notes that the kept ci.yml has no workflow_call trigger and that a job of it asks for more than contents: read, a catch-all .gitattributes text rule left out and a partial SDK version in global.json replaced, Copilot agents without Hybrid ones leaving out the local model's files, and the AGENTS.md the template writes saying pre-release: tracked, a failing build committing nothing, and a Node.js repository without build or test scripts committing without running a command, with CI installing through the package manager package.json names, and a kept publish.yml without a workflow_dispatch trigger getting Update-Project.ps1's warning word for word, which one with the trigger doesn't get, and a kept publish.yml that runs on release getting the note on SECURITY.md's immutable-releases paragraph |
Always |
tests/Test-AdoptOwnedFiles.ps1: adopting a repository with -Data @{ project_owned_files = '.github/workflows/ci.yml', 'CLAUDE.md' } keeps its own ci.yml and CLAUDE.md unchanged and records the answer, a later update shows the template's changes to them instead of merging or replacing them, and naming one of the update's own files stops the adoption before it changes anything |
Always |
tests/Test-UpdateIgnoredFiles.ps1: a .NET project whose own .gitignore ignores a node_modules folder that the template's .gitignore doesn't updates without overflowing Windows' command line (WinError 206); .git/info/exclude ends as it was, without the copy of the project's rules that a killed update left behind, both after a clean update and after one stopped by a conflict |
Always |
tests/Test-UpdateExitCode.ps1: a project's own .template\Update-Project.ps1, run with &, exits 0 after staging an update with -NoCommit that shows a template change to a project-owned file, and after a run with nothing to update, and asks to backfill the changelog from a tag it has no section for, and both runs say what a code-review.yml that pins NCodeGroup/code-review by tag before v1.4.0 lacks |
Always |
tests/Test-UpdateLibrary.ps1: a NuGet library's own .template\Update-Project.ps1, when its answers give no license, stops before it changes anything, exits 1 and prints the -Data that gives one, and with -Data @{ license = 'MIT' } updates and warns that its publish.yml and its own release.yml both push NuGet packages; a library whose own release.yml runs dotnet nuget push updates without publish.yml and is told so, and gets a version.json at 2.3.1 with the AssemblyVersion its v2.3.0 release shipped; a publish.yml without -p:PublicRelease=true and a project's own Nerdbank.GitVersioning reference are warned about; the library whose own release.yml publishes loses release-provenance.yml and raise-baseline.yml, records nuget_publisher, and is told about its shallow checkout and /p:Version |
Always |
tests/Test-LicenseWarning.ps1: a project's own .template\Update-Project.ps1, for a project whose answers have no license, records a blank answer instead of the Apache-2.0 default, adds no license file and warns with the command that adds one, word for word as Adopt-Project.ps1 warns; with -Data @{ license = 'Apache-2.0' } it adds LICENSE.txt and COPYRIGHT.txt and warns no more; a blank answer beside a LICENSE file of the repository's own gets no warning. Adopting a repository without a license answers blank and warns; one with its own LICENSE doesn't. An already up-to-date update still warns; an answer such as GPL-3.0-only without a license file gets the No license file warning instead; a project with the Apache-2.0 default keeps its answer and license files on update; and the render passes license= only for answers without a license line. |
Always |
tests/Test-UpdateWindowsCheckout.ps1: on Windows, a project's own .template\Update-Project.ps1 stops after it hands the update over and before its first Copier call, saying to update from Linux, macOS or WSL, when the project's template version has a path Git for Windows refuses to check out; its name check refuses and accepts the names tests/Test-WindowsFileNames.ps1 does, and its tree check finds such a path at a tag and at a git describe version, and nothing at a clean or unknown version, and the guard's own body, run on that repository, stops at the bad version and lets the clean one through |
Always |
tests/Test-UpdateKeptLines.ps1: an adopted stack: other project whose .gitignore ends with secrets/ and the block kept at adoption takes the template's change to /secrets/ without a conflict, still ends with the kept block, and changes nothing on a second run; when its own edit conflicts with that change, the conflict ends before the kept block and the update says to finish with git add -u; neither update stages a node_modules or .turbo folder that only the kept lines ignore, the clean one leaves .git/info/exclude as it was, and a docs/secrets/ file that v0.1.0's secrets/ ignores and v0.2.0's /secrets/ doesn't is left untracked, not staged; and a project adopted before the adoption left a catch-all text rule out has * text=auto and * text eol=lf left out of its kept .gitattributes lines, keeps its other kept line, is told so, and gets unset from git check-attr text for an .ico file |
Always |
tests/Test-UpdateConflictStaging.ps1: an update of an adopted stack: other project that stops on a conflict in .editorconfig leaves the conflict unmerged, also in café.txt, a template file with a non-ASCII name that the update's reset changed and whose first line renders Copier's _folder_name, so the restage's core.quotePath=false is tested, and leaves its .gitignore, which the template didn't change, unlisted, unstaged and still ending with the block kept at adoption; it stages the template's deletion of removed-later.txt and its change to changed-later.txt, and leaves no change outside the conflicting files unstaged |
Always |
tests/Test-UpdateOwnedFiles.ps1: a project whose project_owned_files answer names its own ci.yml updates without touching it and is shown the template's change to it, while .gitignore still merges; the answer lasts across the update; naming a file the template doesn't render, or one of the update's own files, stops the update before it changes anything; an empty list gives the file back to the merge; a template change to SECURITY.md's "Releases are immutable" paragraph, in a project whose own SECURITY.md lacks it and whose own workflow runs on release, gets the note to leave the paragraph out |
Always |
tests/Test-UpdateOwnedTemplateFiles.ps1: a project that owns its own CLAUDE.md and a scripts/check.ps1 that only the target version renders updates without either file being reset, replaced or listed as a discarded edit, and is shown the template's changes to them; a merged file whose template source was renamed is named once in the rewritten-file note, in the -Data it suggests and among the project-owned changes |
Always |
tests/Test-UpdateSkipPatterns.ps1: an update from a version whose _skip_if_exists names README.md without a / brings the project's out-of-date docs/decisions/project-template/README.md up to the target version and lists it under Refreshed, saying its local edit is discarded, not as a discarded local edit, while the root README.md stays untouched and the template's change to it is shown; an index that already matches the target version is listed neither as refreshed nor as a discarded local edit; every _skip_if_exists entry in copier.yml starts with /; when Copier can't render the project's version with its answers, the update warns that it skipped refreshing the index, lists nothing as refreshed, keeps the index's local line and still reaches the target version |
Always |
tests/Test-UpdateTemplateOwnedConflicts.ps1: an update that stops on a conflict in a scripts/check.ps1 of the project's own that the target version adds names that file, and not the conflicting merged file, in a note of its own, and prints one -Data @{ project_owned_files = ... } that names it with the merged file the project replaced, or with the files the answer already names |
Always |
tests/Test-UpdateRewrittenFiles.ps1: an update of a project that replaced its ci.yml prints the -Data @{ project_owned_files = '.github/workflows/ci.yml' } to run, one with a lightly edited ci.yml doesn't, and one whose version Copier can't render warns with Copier's error and says it skipped the suggestion |
Always |
tests/Test-PlanState.ps1: workflow/Get-PlanState.ps1, on fixture repositories with a local origin, reads a plan's header, steps, Reviewed: line and the Landing section of AGENTS.md, with each key's default, a value in backticks, a label with a space, a gate command with spaces, a pull-request format section, and a prelude that names a script in the repository, a command with arguments, or something that isn't one command, which it prints as invalid; reads the pre-release key, tracked by default and invalid for another value, and prints pre-release: yes only while it is untracked and neither a tag merged into HEAD nor the plan's Release: version is 1.0.0 or later, with the changelog backfill skipping its tags below 1.0.0; counts commits ahead of and behind the default branch, and with -NoFetch leaves out commits pushed after the last fetch; lists the other plan worktrees; counts a merged GitHub pull request or GitLab merge request, read through stand-ins for gh and glab, as landed only when its merge commit is on the default branch and its head holds HEAD or has its tree, also when an older one merged under a newer open or closed one, and prints its merge commit on the merge line; names the base branch in next for a request merged into another branch, and ship-plan under integrate: direct; reads whether the default branch takes changes only through pull requests from a GitHub ruleset or branch protection, or a GitLab protected branch, through the stand-ins; reads every issue on a one-issue and a group plan's Issue: line through the stand-ins, with issue-state open while any is open, and the Refs: line apart from them, whose open issues keep no plan open; counts the follow-ups a plan hasn't filed, tracked or dropped, a follow-up marked to act on next among them until it is filed or tracked, which send a merged plan back to ship-plan unless the Landing section says follow-ups: none; names the version a plan moves to when a newer tag on origin or the default branch's changelog, with ## v1.4.0 or Keep a Changelog ## [1.4.0] - <date> headings, took its release, by a minor or a patch raise; reads the plan's tag as local when only the clone has it, which leaves its version free and ships a landed plan again, and as unknown when origin can't be read; prints the changelog's format, its newest release and the version tags merged into HEAD it has no section for; names the files that conflict when the default branch merges into the plan's branch, none when it merges cleanly and unknown when git merge-tree can't merge them, and ship-plan as the next command for an open pull request that conflicts; reports protected: unknown, not no, when GitHub's rules or GitLab's protection can't be read or the call fails with anything but not found; and names the next command for open, escalated, unreviewed, stale, reviewed, landed, tagged and dirty states, and finish-plan for a landed plan without a Release: line, which needs no tag; reads GitHub pull requests, issues and releases through gh api with a gh that refuses GitHub's GraphQL API, as a Claude Code cloud session's does; and, for a plan whose Pull request: line names a pull request, as an /address-feedback run's plan does, prints its number as feedback, reads that pull request's state by its number through gh api or glab mr view instead of the branch's own, prints conflicts: -, and names address-feedback <number> as the next command once its steps are done and reviewed, never ship-plan, or a none that says address-feedback discards the run once that pull request is merged or closed, open steps and all; and, for a plan pushed through a session's push branch, reads the clone's plan.pushBranch setting as push-branch, invalid for a name that isn't a branch or is the default branch, looks the pull request up through that branch, or through the branch it was pushed to once pushed, without the setting, leaves out the pull requests other plans opened from it, finds a merged one so the plan reads as landed, and prints pr-branch-state as new, ours, landed for a tip on the default branch or a merged pull request's head, busy <number>, other or unknown, and prints version-file as match, mismatch <version> or - for the root version.json against the plan's Release: version |
Always |
tests/Test-PlanStateConcurrency.ps1: workflow/Get-PlanState.ps1, on a fixture repository under a github.com folder with a stand-in for gh that answers after a delay, starts its five gh calls at the same time: a run with a two-second delay takes less than the run without it plus seven seconds and prints the same lines, and a release tag only the fetch brings in is still read as published, and when the stand-in fails the protection check while the other calls wait a minute, the script fails with that error at once and leaves no runspace running a call it never received, and no run leaves a runspace open |
Always |
tests/Test-ChangelogBackfill.ps1: both copies of Get-ChangelogBackfill, in .template/Update-Project.ps1 and tools/adopt/Adoption.psm1, name the version tags merged into HEAD that the changelog has no section for, read every release heading form, ignore a prerelease tag and a tag on another branch, skip the tags below 1.0.0 when the Landing section says pre-release: untracked, and read the changelog the Landing section names |
Always |
tests/Test-LibraryRelease.ps1: both copies of Get-AssemblyVersionFloor, Get-NuGetPublisher, Update-VersionFile, Test-PackageValidationBaseline and Get-CSharpFileWithoutHeader, in .template/Update-Project.ps1 and tools/adopt/Adoption.psm1, name the assembly version a release of the current major shipped above the pin, and nothing for a project that sets its own, a new major or no tag, and list the workflows besides publish.yml that run nuget push, and set a version.json to the patch after the newest tag, with that assembly version and its precision, name the baseline setting in Directory.Build.props or a project file, and name the C# files without the .editorconfig header, skipping generated code, and, in both copies of Get-PackageMetadataDrift, name a package Description or PackageTags that differs from the newest published package, ignoring whitespace and tag order, and nothing for equal metadata, a package never published or a project that can't be evaluated |
Always |
tests/Test-NuGetLogistics.ps1: both copies of Get-NuGetLogistics, in .template/Update-Project.ps1 and tools/adopt/Adoption.psm1, name an unimported .props file, GeneratePackageOnBuild, repeated template settings, a .sln, a byte order mark and a project at the root, and nothing for a clean library |
Always |
tests/Test-UpdateBaseline.ps1: build/Update-Baseline.ps1, offline, raises a lower baseline in a project file or Directory.Build.props and leaves an equal or higher one, a value that isn't a version, or no baseline, alone; adds its ### Changed entry to an empty [Unreleased], an existing ### Changed, after ### Added and before ### Fixed, in the changelog the Landing section names, keeping CRLF and a byte order mark, and leaves a changelog without a release section alone; replaces the baseline entries an earlier run left in [Unreleased] with one, and leaves one in a release section; changes nothing on a second run; removes the baseline suppressions from the CompatibilitySuppressions.xml beside a project whose baseline reaches a new major version, deleting a file left with none and keeping a target-framework suppression with CRLF and a byte order mark, and leaves them for a raise within one major version, a project whose own baseline isn't raised, or a timeout; runs the lines of raise-baseline.yml that list the suppression files in a Git fixture and checks that the pull request description names the deleted and the edited file; refuses a prerelease; and, against stand-ins for nuget.org and Start-Sleep, waits through a failed and an unlisted answer with a 30-second request timeout and back-off with jitter, and gives up after the timeout without changing a file |
Always |
tests/Test-ReproducibleBuild.ps1: .template/Test-ReproducibleBuild.ps1, on a generated class library fixture, prints that two packs match entry by entry, exits 1 and names the difference when the build takes a value from the clock, and reports that a project with no package has none to compare |
Always |
tests/Test-CSharpierWrapper.ps1: both copies of Get-CSharpierWrapper, in .template/Update-Project.ps1 and tools/adopt/Adoption.psm1, name the project's own build/*.ps1 scripts in which a command runs csharpier check, in name order, only when .config/dotnet-tools.json names CSharpier, and never a template script or one that only names the check in a comment, comment-based help or a string |
Always |
tests/Test-GitVersioningReference.ps1: Remove-GitVersioningReference in tools/adopt/Adoption.psm1 drops a repository's own Nerdbank.GitVersioning reference and a second PackageVersion, and leaves build/ProjectTemplate.props and a repository without one alone |
Always |
tests/Test-DecisionIndex.ps1: the decision index check every project gets, .template/Test-AdrIndex.ps1, passes a project with no docs/decisions/ and an index that links every record, numbered from 0001, from 1000 or both, without counting the template's records in project-template/, and a row written with or without the ADR- prefix, and fails a record the index leaves out, a link to a missing record, two records with one number and a row showing another number; in fixture Git repositories, it fails a record numbered below 1000 that is new since the merge base with origin/main or with -Base, passes an older one under a new title, and skips that check, saying so, without a merge base or in a folder that isn't a repository's root; every template decision record, Jinja-named or not, is numbered 0001–0999, has a number no other template record has and is linked from the template's index, and a fixture shows each of those checks failing |
Always |
tests/Test-WindowsFileNames.ps1: every path Git lists in the repository, untracked files included, is one Windows can check out: no part of it has a character Windows forbids in file names, such as a vertical bar, a colon or a question mark, or a control character, is a name Windows reserves, such as CON, NUL, COM1 or LPT1, with or without an extension, or ends in a dot or a space; and the name check refuses each such name and accepts the template's Jinja-named ones |
Always |
tests/Test-BestPracticesCriteria.ps1: every criterion of the passing, silver and gold levels in ossf/best-practices-badge's criteria/criteria.yml, read from GitHub, has one row at its level in template/docs/best-practices-criteria.md.jinja, with the requirement, N/A and URL flags the file gives, and the page lists no criterion the file doesn't or has retired; on fixtures, the parser reads a criterion line with a trailing comment and drops a retired one, and the comparison names a missing, an extra, a repeated and a mismatched row |
Always; reads raw.githubusercontent.com |
tests/Test-TemplateUpdate.ps1: .template/Get-TemplateUpdate.ps1, on a fixture template repository whose tags carry a fixture changelog and a stand-in for gh, says nothing and opens nothing when the project is current, also on a version between tags; one version behind, creates the missing label and opens one issue titled with the newest version, labeled template-update, with that version's section and nothing from [Unreleased], the project's own version or the link definitions; changes nothing on a second run; three versions behind, edits and retitles that same issue, with the three sections newest first; closes it with a comment once the project is current; ignores tags that aren't versions; keeps a section that, with its two closing line breaks, brings the body to exactly 60,000 characters, and leaves out one a character longer; closes the notice for a project ahead of the newest tag; and fails on a template it can't read, or when a gh call fails, without reporting a change |
Always |
tests/Test-GitHooks.ps1: .githooks/pre-push refuses a push to main only while the Landing section says protect: hook, and lets a branch and a tag through; Update-Project.ps1 and Adopt-Project.ps1 enable .githooks only in a clone without hooks of its own, where a .sample hook doesn't count, print nothing when core.hooksPath already names .githooks, print the command to run for another hooks path, print how to run both for other hooks in .git/hooks and nothing for pre-commit's hooks; under protect: hook they print the pre-push wrapper to add (or the call to add to a clone's own pre-push hook) until something runs it, and the wrapper as pre-push.legacy refuses a push to main under pre-commit; Get-PlanState.ps1's protected line is hook under protect: hook with core.hooksPath on .githooks or the wrapper in pre-push or pre-push.legacy, and not with only pre-commit's pre-push hook or under protect: none; Update-Project.ps1's note on the removed Commit attribution check names the required check and any file that still calls .githooks/commit-msg |
Always |
tests/Test-RepositoryBaseline.ps1: tools/Set-RepositoryBaseline.ps1, on a stand-in for gh that records the calls of a -WhatIf run too, with -WhatIf changes nothing; gives a repository with no ruleset a "Protect main" ruleset on its default branch with no deletion, no force push, a pull request with no approvals and merge-commit and rebase merges only, no bypass, and delete-branch-on-merge; adds the required checks -RequireChecks names, passed as one comma-separated string; with -RequireChecks auto, requires the GitHub Actions checks that passed on the latest merged pull request, found on any page of closed pull requests, reading every page of its check runs and workflow runs, leaves out Code review, CodeQL and its Analyze jobs, push-only jobs, jobs no workflow run accounts for, other apps' checks and skipped, neutral, failed or unfinished ones, lists them and a command that names them, quoted so it parses, curly quotes too, with -WhatIf, says in every run that they come from one pull request, gives each repository its own checks with -All, and skips a repository with no merged pull request or no check to require; leaves alone the ruleset of a repository whose default branch already requires pull requests or that already has the ruleset, except that it turns on that ruleset's conversation resolution where it is off, sending only its rules, also with -WhatIf and a reported refusal, and updates the ruleset it made when -RequireChecks is given; requires every conversation resolved and the required checks to pass on an up-to-date branch; adds the CodeQL code-scanning rule (warnings and above, security alerts of any severity) and the extended query suite where CodeQL's default setup is configured and analyzes a language, which the summary names, even one that names no suite, and reports the repository as failed, with nothing else changed, when the switch is refused; keeps the rule on an update and leaves it out elsewhere, saying why and switching no suite where the setup is configured with no language, word for word as NCodeGroup/docs and NCodeGroup/brand answered on 2026-11-16, or its answer lists none, also with -WhatIf; leaves a ruleset's own code-scanning rule and thresholds as they are and never switches that repository's suite, printing a notice with the command to switch it by hand where the default setup runs another suite, also with -WhatIf, or, where the setup is configured but analyzes no language and the rule requires CodeQL, a warning that every pull request stays blocked, naming both fixes, also with -RequireChecks, with -WhatIf and beside a ruleset of the owner's, and no warning for a rule that requires another tool alone or a setup that isn't configured, and reporting a setup it can't read without failing the run, also beside a ruleset of the owner's; gives every repository it doesn't skip, one whose branch ruleset it leaves alone too, a "Protect release tags" ruleset on v* tags with no deletion, no update and no bypass, which -WhatIf shows, unless it has one of that name, whatever its state, or an active tag ruleset that refuses both already; turns on the read-only workflow token with Actions not approving pull requests, .github/workflows/raise-baseline.yml or not, secret scanning, its push protection, Dependabot alerts, Dependabot security updates and private vulnerability reporting, in that order, each with the call and body the API takes and only where it is off, reports each as set, already set, would set or not available, leaves secret scanning out of a repository that isn't public, and reports a setting the API won't read or refuses without failing the run; allows auto-merge, with a PATCH that changes nothing else, only where it is off, on a repository whose branch ruleset it leaves alone too, and reports an answer without the setting, as GitHub gives someone who can't change it, or a refusal without failing the run; gives a public repository with either code-review workflow, last, an active Actions event policy for those two files alone that allows pull_request_target, issue_comment and every other event their top-level on: keys name, read from the files' base64 content in each form on: takes, which -WhatIf shows, unless it isn't public, has neither file, or has an active policy, its own or its organization's, that allows each of those events already; updates a policy of that name in place, with a PUT that keeps its other events, when it isn't active, misses an event or doesn't cover both files, and says why, also with -WhatIf and a reported refusal, and leaves one that does its job alone; reads a policy by its id when the list leaves its rules out; and reports a file or policy it can't read, or a refusal, without failing the run, and an organization read that fails other than with HTTP 403 or 404 in the policy's line; with -OrganizationPolicy, posts the same policy, on every repository, to the organization alone, prints it with -WhatIf, updates one of that name in place, keeping its other events, when it isn't active, misses an event or doesn't cover both files on every repository, says why, also with -WhatIf and when refused, leaves alone one that does or one that already allows both events on every repository, sets the organization's default workflow token to read-only with Actions not approving pull requests, and exits 1 when it can't read the policies or is refused, or that setting fails, saying for a refusal that asks to upgrade the organization's plan that it needs GitHub Team or above and to run it per repository, and otherwise naming the admin:org scope; skips archived repositories and forks with -All; and rejects missing and conflicting parameters; turns on immutable releases, except in a repository with release-provenance.yml or a workflow that runs on a release event or uploads release assets, read from a listing of .github/workflows, or one it can't read, or with -SkipImmutableReleases, which it reports, and turns them on where only a job is named release, and prints a notice with the command that turns them off where they are already on and a workflow runs on a release event or uploads release assets |
Always |
tests/Test-GitLabBaseline.ps1: tools/Set-GitLabBaseline.ps1, on a stand-in for glab that records its calls, with -WhatIf changes nothing; turns on "All threads must be resolved" and then "Pipelines must succeed", each with its own PUT of the project and only where it is off; reports each as set, already set, would set or not available, also a field the answer leaves out and a refusal, without failing the run; fails on a project it can't read and skips an archived one; sets squash_option to never with its own PUT where it is another value; for the default branch's push access, leaves a protection where no one can push, protects an unprotected branch with no one allowed to push and Maintainers allowed to merge, removes a protection made of roles and protects the branch again with no one allowed to push and its merge, unprotect and force-push settings, reports a protection that names a user, one it can't read and a refused removal without changing anything, restores the earlier protection after a refused one, fails the run when that fails too, shows its change with -WhatIf without making it, and reads no protection for a project without a default branch; reads the project and host from a clone's HTTPS or SSH origin, in the current folder or -Path, URL-encodes a subgroup's path and takes -Hostname; and rejects -Project with -Path and a clone with no origin; schedules the weekly pipeline once, on the default branch |
Always |
tests/Test-NewProjectRemote.ps1: New-Project.ps1 -CreateRemote, run from a copy beside stand-ins for tools/Set-RepositoryBaseline.ps1 and tools/Set-GitLabBaseline.ps1 that record their arguments, with stand-ins for copier, gh and glab on PATH, runs Set-RepositoryBaseline.ps1 -Repo <name> -Owner <owner> -RequireChecks 'build-and-test' after gh repo create, with the signed-in user or -Owner, and Set-GitLabBaseline.ps1 -Path <the new project's folder> after glab repo create, with -Owner as the group, and the push; skips either with -NoBaseline; succeeds when a baseline fails, or gh can't read the signed-in user, naming <owner> to fill in, with a warning that gives the command to run it again; and the real baseline scripts take the parameters it passes |
Always |
tests/Test-ScriptAnalyzer.ps1: every .ps1, .psm1 and .psd1 file in the repository outside .claude/worktrees/, the scripts the template ships included, has no PSScriptAnalyzer warning or error under PSScriptAnalyzerSettings.psd1; a finding that can't be fixed is suppressed where it is, with a justification; and a control file with a known warning must be reported, and the same file under .claude/worktrees/ must not, so a pass proves something |
Always |
tests/Test-InvokeAllTests.ps1: tests/Invoke-AllTests.ps1 runs only the Test-*.ps1 scripts in a folder and then each -SetupOnly line of the .github/workflows/test-template.yml in its parent folder, in the workflow's order, each with a -Work folder of its own and a log, skipping a line without -SetupOnly and counting a failed setup as failed, prints PASS or FAIL per suite with a failed suite's FAIL lines, logs each suite's output, counts a suite that throws as failed, passes -SkipDotnetBuild only to suites that take it, points the suites' Copier cache at the run's own folder, exits 1 when a suite fails or none is found, prints the run's wall-clock time as Time: <m:ss> and ends with All tests: PASSED or All tests: FAILED (<n>); runs two suites at once and prints their results in name order, not the order they finish, and one at a time with -Serial or -ThrottleLimit 1; two runs at once without -Work log to folders of their own, deleted when the run passes or finds no suites and kept when one fails; tests/Remove-TestWork.ps1 deletes a folder or says it couldn't; and every suite with -Work keeps a folder of its own on a failure, or on an error, when it prints its path, and deletes it on a pass; every suite that builds a template snapshot keeps Copier's mirrors in its work folder, not the user's cache; tests/Measure-Suites.ps1 prints a suite's median time over -Repeat runs and fails the run for a suite that fails, is missing or is slower than -MaxSeconds, passing -SkipDotnetBuild to a suite that takes it |
Always |
tests/Test-AgentRunner.ps1: tests/e2e/Agent.ps1, against stand-ins for claude and copilot, runs a prompt and resumes its session with each tool's flags, Claude Code's --permission-mode bypassPermissions and --strict-mcp-config, Copilot's --allow-all, --no-ask-user, --disable-builtin-mcps and --secret-env-vars=COPILOT_GITHUB_TOKEN in a COPILOT_HOME of its own with COPILOT_ALLOW_ALL=true and the token it read before the run, and puts the environment back; reads the session, adds up the cost, a Copilot session's from its AI credits, prints the command that continues the session, fails a run that returns no session, and a Copilot run that ran no skill for its slash command or loaded an MCP server; takes GH_TOKEN when COPILOT_GITHUB_TOKEN is unset, with a warning that a general token is in use; caps a Copilot session at 30 AI credits at least and passes no cap for a budget of 0; warns with the path of a usage file it can't read and prints the cost as unknown or as at least what it read; stops a run past -TimeoutMinutes with its child processes and fails its session check; and names each tool's run checkout and installed command |
Always |
tests/Test-BrandKit.ps1: node brand/build.mjs --check passes on the committed logo kit, a build into an empty folder writes every file the kit has and passes its own check, and the check fails, naming the file, once one is removed or holds something else |
Always |
tests/Test-UpdateNotes.ps1: .template/Update-Project.ps1 passes <answer>=false for each opt-in answer the answers file lacks and -Data doesn't set; adoption answers node_lint, coverage_gate and file_headers off; the update says to add workflow_call to ci.yml when tag-release.yml calls it without one, and names each job of ci.yml, or its top-level permissions:, that asks for more than the contents: read tag-release.yml grants, in a block or a flow mapping, and nothing for contents: read, a none scope or a step's with: input; tools/adopt/Adoption.psm1's copies print the same notes; and it prints the badge line to add when best_practices_project is set and README.md lacks the badge; and it says to delete or leave out SECURITY.md's "Releases are immutable" paragraph when a workflow runs on a release event or uploads release assets, with copies of Get-WorkflowEvents and Test-ReleaseAssetWorkflow that match the baseline script's, and copies of those and Get-ImmutableReleaseNote in Adopt-Project.ps1 that match the update's; the update names each job of a workflow other than publish.yml that builds in a checkout without fetch-depth: 0, by a step's own or default working directory, or passes -p:Version once version.json exists, says what code-review.yml and AGENTS.md lack for NCode Review's approval, and works out the nuget_publisher and release_policy answers, and tools/adopt/Adoption.psm1's copies print and answer the same |
Always |
tests/Test-Coverage.ps1: .template/Test-Coverage.ps1 reads and merges Cobertura and LCOV reports, leaves out test code and the template's files, fails below 90% of the statements or 80% of the branches and names the least covered files, fails without a report, and passes a report that measures no code or no branches |
Always |
tests/Test-FileHeaders.ps1: .template/Test-FileHeaders.ps1 fails and names the source files without the copyright or the SPDX line, skips .template/, the five template-owned build/ scripts, vendor/, git-ignored files and other kinds of files, checks a tracked .d.ts file, checks Astro components inside their frontmatter and stylesheets with /* */ comments, -Fix adds the header at the top, after a #! line or inside an Astro frontmatter, a block of its own when there is none, and keeps CRLF and a byte order mark, and a blank license or no author narrows or skips the check |
Always |
tests/e2e/Test-RunIssues.ps1 -SetupOnly: the fixture project, its local GitHub-shaped origin and the gh stand-in, where the state script sees host: github and protected: hook, origin has NCode Review's code-review.yml, and the stand-in gives a new pull request its seeded review threads and records thread replies; the stand-in gives NCode Review's review of a push on the first read after a /review comment that follows the push, footer or not, and with -Scenario max-rounds the Landing section has max-review-rounds: 1; with -Scenario review-with-footer the host folder has footer.txt and footer-pr-only.txt, which keeps the footer off issue comments, and NCode Review's review of the first push carries a request of the owner's; with -Scenario push-branch the Landing section has max-review-rounds: 1, origin's claude/fixture-push-a1b2 holds the head of a pull request #2 that main has as a squash commit, and the state script reads that push branch as landed from a plan's worktree; and the stand-in's gh pr view <branch> picks a branch's open pull request over a merged one, and gh pr list without --state lists only open ones, as gh does |
Always |
tests/e2e/Test-AddressFeedback.ps1 -SetupOnly: the same fixture project with an open pull request from add-farewell, and one from farewell;touch${IFS}pwned, a branch name with shell characters that Git allows and the installed command refuses, whose items the stand-in serves to the installed /address-feedback's own GraphQL query with each author's authorAssociation; its thread reply lands on the thread; the command mandates the reply openings the checks match; the checks on the replies accept a right decline and answer and refuse wrong ones; the stand-in refuses every command and GraphQL mutation it lists as forbidden, such as resolving a thread, dismissing a review, merging, marking ready, closing or editing the pull request and moving a branch; and the writer's and the stranger's claims hold on the branch; with -Scenario rest the host folder has graphql-refused.txt, so the stand-in refuses GraphQL and the gh pr, gh issue, gh release and gh repo commands as a Claude Code cloud session's proxy does, and serves the fixture's pull requests, review threads, comments, reviews and thread replies through the REST routes workflow/templates/_github-rest.md names, and reads a thread reply back by its id and edits it with -X PATCH; and a stopped run's worktree, .claude/worktrees/feedback-1, with a reviewed plan whose Pull request: line names #1, gets feedback: 1, pr: 1 OPEN and next: address-feedback 1 from the state script, still gets them once moved onto feedback-1 in the main checkout, as an earlier Copilot version left one, and back into the worktree, as each tool's resume does, and is removed before any run; with -Scenario resume-claude the setup then leaves such a run in .claude/worktrees/feedback-1, whose one step makes Get-Farewell say Goodbye, world! without a name and whose plan gives each item its verdict, for /address-feedback #1 to resume, and with -Scenario resume-copilot leaves the same run on feedback-1 in the main checkout, as an earlier Copilot version left one |
Always |
tests/e2e/Test-AddressFeedbackGitLab.ps1 -SetupOnly: the same fixture project on a GitLab-shaped origin, with an open merge request from add-farewell, a writer's discussion and a reader's question, which the glab stand-in serves; the stand-in saves each note and discussion reply with a Claude Code cloud session's footer from footer.txt, reads a note back by its id, edits it with PUT, deletes it, and refuses merging, approving, closing and resolving; and a stopped run's worktree with a reviewed plan whose Pull request: line names !1 gets feedback: 1, pr: 1 OPEN and next: address-feedback 1 from the state script and is removed before any run |
Always |
tests/e2e/Test-RunFeedback.ps1 -SetupOnly: the same fixture project, running NCode Review, with an open pull request from add-farewell and a writer's review thread, which the stand-in serves to the installed /address-feedback's own GraphQL query; the installed /run-feedback has the check-runs call the checks match and judges a nit as any finding; and the stand-in, answering that call's own --jq, completes NCode Review's Code review check run on a pushed commit, and gives its review of the push, only after a /review comment that follows the push, and an empty review of a later push after a later /review; the stand-in reads a comment back by its id and edits it with -X PATCH, refuses an id it doesn't hold and any other method, and refuses as FORBIDDEN any comment's delete and an edit of a /review comment; with footer.txt it saves each comment with a Claude Code cloud session's footer, and a /review comment saved with it still asks for a review, since NCode Review reads the command from the first line and sets aside the footer; and with -Scenario review-with-footer the host folder has that file; and the stand-in answers the state script's REST pull request list by head branch and finds no release |
Always |
tests/e2e/Test-RunIssues.ps1 runs /run-issues #1 wait:0 in headless Claude Code (claude -p, --permission-mode bypassPermissions, --strict-mcp-config, so the session has none of your MCP servers) on a fixture project that New-Project.ps1 makes from a snapshot of the working tree, with a bare origin in a github.com folder under %TEMP%\project-template-run-issues-e2e and a stand-in for gh (tests/e2e/gh.ps1), so it touches no real repository; it answers the run's one question by resuming the session, and checks the plan snapshot comment, the draft pull request that closes #1, the step commits on origin without the empty Plan: commit or AI attribution, the reviewed plan, and the fixed function. The fixture runs NCode Review, and the pull request opens with a seeded review: the run must fix the owner's request for pipeline input and reply naming its commit, answer NCode Review's blocker on behavior main already had, which the issue doesn't name, with Autopilot: left as a follow-up and put it in the plan's ## Follow-ups, fix its nit, or decline it with the reason, and reply on it, answer its finding on .github/workflows/ci.yml without a change, treat another bot's thread without the finding marker as data, and leave a /review comment unanswered. By default (-Scenario minor-round), NCode Review reviews the run's first push, once the run comments /review after it, with a should-fix finding that asks only for another test of what tests/Test-Greeting.ps1 already tests, and a nit that holds: the run must decline the first, naming the test, fix the nit in a second round and comment /review again, ask for NCode Review's check run on that push, and recommend the merge once, in an Autopilot: comment, once the stand-in's empty review of that push is in, with no nit in the plan's ## Follow-ups. -Scenario max-rounds sets max-review-rounds: 1 and the stand-in's review of the first push is empty: the run must recommend the merge after its first round, the owner's fix and the nit's. With -Scenario review-with-footer, the stand-in saves each pull request comment with the footer, and the test checks that the run comments /review after each of its two pushes, that each /review comment keeps its footer, and that the run deletes no comment, edits no /review comment, asks no one to comment /review for it and never answers its own /review comments. With -Scenario push-branch, the run gets push-branch:claude/fixture-push-a1b2, max-review-rounds: 1 and an origin whose push branch still holds the head of an earlier pull request merged by squashing: the test checks that the run records the push branch as plan.pushBranch, restarts it from its plan instead of stacking on the merged commits, pushes its commits and its fix round there, never pushes worktree-issue-1, and opens its draft pull request from it, besides the max-rounds checks. With -Scenario fix-now, the run's question is answered with fixing the follow-ups in the same pull request before merge: the run must fix NCode Review's blocker on behavior main already had and its nit in the draft pull request, reply Autopilot: fixed in on each, or Autopilot: not changed on the nit, never reply Autopilot: left as a follow-up, and leave neither in the plan's ## Follow-ups. Run all five. The gh stand-in fails gh pr view <branch> for a branch without a pull request as gh does, since Claude Code itself looks up the current branch's pull request that way. It costs model usage (-MaxBudgetUsd, 30 by default, per claude call or Copilot session), so run it by hand after changing /run-issues or a command it runs; it needs Claude Code, or with -Tool copilot the Copilot CLI, signed in, Copier and a Git identity. Invoke-AllTests.ps1 doesn't run it; CI runs -SetupOnly, which builds and checks the fixture without a model. -CheckOnly checks an earlier run's fixture again. -TimeoutMinutes, 45 by default, stops a claude or copilot call that runs longer, with its child processes, and fails that run's session check; 0 sets no limit.
tests/e2e/Test-AddressFeedback.ps1 runs /address-feedback #1 the same way, on the same fixture project under %TEMP%\project-template-address-feedback-e2e, with a pull request from add-farewell that adds Get-Farewell. The pull request has a review thread from a writer (COLLABORATOR) asking for a real fix, a top-level comment from a stranger (NONE) asking to change the CI workflow, a bot's review thread with a wrong finding, a question, and a thread already answered with Autopilot:. The test checks that only the writer's fix is pushed to add-farewell, never forced, and changes nothing outside src/ and tests/; that the stranger's request gets an ask, the wrong finding a decline whose reason says Get-Farewell uses $Name, and the question an answer that only tests/Test-Greeting.ps1 calls Get-Farewell, each starting with Autopilot:; that the answered thread gets no reply; and that nothing is resolved, merged, marked ready or edited, which the stand-in also refuses and records. It then runs /address-feedback #2, on a pull request from farewell;touch${IFS}pwned, resumes it once with a go-ahead, and checks that it stopped on the branch name: no worktree, branch, push or comment, no pwned file, which the name unquoted in a POSIX shell would create, and the main checkout still on main with no PLAN.md. Run it by hand after changing /address-feedback or a command it runs, as Test-RunIssues.ps1 says. With -Scenario rest the stand-in refuses GraphQL, and the test also checks that the run read through REST and replied on each thread through pulls/<number>/comments/<id>/replies. With -Scenario resume-claude it runs only /address-feedback #1, on a run that stopped once its plan was reviewed, and -Scenario resume-copilot on the same run left on the branch feedback-1 in the main checkout by an earlier Copilot version, which either tool moves into a worktree first; each checks that it pushed that run's step as it was, with no commit of its own, that the writer's reply names that step's commit, that the plan's other items get their decline, ask and answer, and that no worktree, feedback-1 or worktree-feedback-1 branch, or PLAN.md in the main checkout is left. The end-to-end tests build their fixture with tests/e2e/Fixture.ps1.
tests/e2e/Test-AddressFeedbackGitLab.ps1 runs /address-feedback #1 the same way, on the fixture project with a GitLab-shaped origin, under %TEMP%\project-template-address-feedback-gitlab-e2e, where the glab stand-in saves each note and discussion reply with a Claude Code cloud session's footer: it checks that the writer's fix is pushed, never forced, that the writer's discussion gets an Autopilot: reply naming the commit and the reader's question a top-level Autopilot: note naming it, and that nothing is resolved, merged, approved or closed.
tests/e2e/Test-RunFeedback.ps1 runs /run-feedback #1 wait:0 the same way, on the same fixture project, running NCode Review, under %TEMP%\project-template-run-feedback-e2e, with a pull request from add-farewell that adds Get-Farewell and a review thread from a writer (COLLABORATOR) asking for a real fix; it answers the run's one question by resuming the session. Once the run pushes and comments /review, the stand-in completes NCode Review's Code review check run on the pushed commit, which /run-feedback reads with gh api .../commits/<sha>/check-runs, and gives the pull request the bot's review of the push: a nit; a later /review on a newer head gets an empty review, whose check run completes too. The test checks that the writer's fix is pushed to add-farewell, never forced, and changes nothing outside src/ and tests/; that the writer's thread gets Autopilot: fixed in <commit>; that the run fixes the nit in a second round and answers it once with Autopilot: fixed in <commit>; that it comments /review after each push and asks for the check run on its last pushed commit; that it recommends the merge once, in a top-level Autopilot: comment after the /review; and that nothing is resolved, merged, marked ready or edited. It waits at least five minutes for the review, as the command does. -Scenario review-with-footer has the stand-in save each comment and thread reply the run posts with a Claude Code cloud session's _Generated by [Claude Code](…)_ footer: the test checks that the run's /review comment after its last push keeps the footer and still asks NCode Review for its review, that the run deletes no comment and edits no /review comment, that no Autopilot: comment asks for /review, and that the merge recommendation comes after the last /review. -Scenario protected-approval seeds an NCode Review finding on .github/workflows/ci.yml and answers the run's question with yes, all, and the run must then push that change and reply Autopilot: fixed in <commit>. Run all three. Run it by hand after changing /run-feedback or a command it runs, such as /address-feedback, as Test-RunIssues.ps1 says.
Every end-to-end test takes -Tool copilot to run its prompts in the Copilot CLI instead of Claude Code, on the same fixture with the same checks, since the fixture project has both tools' commands; each -SetupOnly checks that the Claude Code and Copilot copies of the commands it runs hold the queries, routes and replies its checks read. The checks on where a run works are the same in every tool: a run's worktree is .claude/worktrees/<name> on worktree-<name>. resume-copilot is a run an earlier Copilot version left on the branch feedback-<number> in the main checkout. The runner, tests/e2e/Agent.ps1, runs copilot -p with --allow-all, --no-ask-user, --disable-builtin-mcps (no GitHub MCP server, so the session posts only through the stand-ins) and --output-format json, in a COPILOT_HOME of its own under the work folder, so the session has none of your Copilot MCP servers, skills or instructions, with COPILOT_ALLOW_ALL=true, so the fixture project's skills and agents load, also on a resume. It signs in with COPILOT_GITHUB_TOKEN, GH_TOKEN or GITHUB_TOKEN, or else the token gh auth token prints, read before the gh stand-in shadows gh, and hides it from the session's shell with --secret-env-vars. A session with --allow-all could still reach a general token, so the runner warns when the token isn't COPILOT_GITHUB_TOKEN: set COPILOT_GITHUB_TOKEN to a fine-grained personal access token with only the Copilot Requests permission. A Copilot run also checks that the session ran the project's skill its prompt names and loaded no MCP server. -Model passes --model to either tool, and -MaxBudgetUsd caps a Copilot session with --max-ai-credits at 100 AI credits a dollar; the cost prints in USD with the AI credits, or, with a warning naming the file, as unknown or as at least what was read when a run's usage file can't be read. -CheckOnly checks the tool the run used. tests/e2e/Test-AddressFeedback.ps1 -Tool copilot -Scenario resume-claude has Copilot finish a Claude Code run in its worktree, and -Scenario resume-copilot under -Tool claude has Claude Code move a run an earlier Copilot version left on feedback-<number> into a worktree and finish it. CI checks the runner against stand-ins with tests/Test-AgentRunner.ps1.
Once, from this folder:
git add -A
git commit -m "Create the project template"
git tag v0.1.0
gh repo create NCodeGroup/project-template --public --source . --remote origin --push
git push origin v0.1.0Copier picks the newest tag, so a change reaches projects only once it is tagged and pushed.
| Path | Purpose |
|---|---|
copier.yml |
Questions and Copier settings: _subdirectory: template keeps everything else out of projects; _merged_files and _skip_if_exists list the merged and project-owned files |
template/ |
The files a project gets |
New-Project.ps1 |
Create a project, its first commit and optionally its remote |
Adopt-Project.ps1 |
Bring an existing repository under the template, with no questions asked |
docs/adopt.md |
The runbook that takes a maintainer from nothing to a fully adopted repository: every manual step in order, who does it, where, how to check it and what usually goes wrong, and a checklist to audit an adopted repository |
tools/adopt/ |
Adoption.psm1, the functions Adopt-Project.ps1 uses, and legacy/, one adapter per old setup it removes |
Update-Project.ps1 |
Update a project by -Path from this clone: a wrapper around template\.template\Update-Project.ps1, the update script every project carries |
workflow/ |
The single source of the workflow: prompt and agent templates, the installer, the prompt composer and the step runner (workflow/README.md) |
tools/Update-Template.ps1 |
Regenerate the workflow files under template/ and at the repository root from workflow/templates |
tools/Set-RepositoryBaseline.ps1 |
Protect a GitHub repository's default branch with a pull-request-only ruleset and its release tags with a ruleset that refuses moving or deleting them, turn on its security settings, allow auto-merge and allow pull_request_target for the code-review workflows, for each repository or, with -OrganizationPolicy, a whole organization, and report the organization's two-factor requirement without changing it (Protect the Default Branch) |
tools/Dismiss-ScorecardAlerts.ps1 |
In a GitHub repository with one writer, dismiss the open OpenSSF Scorecard alerts of Branch-Protection, CII-Best-Practices and Contributors as won't fix with the standard comment, listing every open Scorecard alert first and leaving the others open; -WhatIf shows it (Protect the Default Branch) |
tools/Set-GitLabBaseline.ps1 |
Protect a GitLab project: its "All threads must be resolved" and "Pipelines must succeed" merge checks, no squash commits, and no one allowed to push to the default branch; with -BaselineToken, it protects the v* tags and creates the project access token and the protected, masked BASELINE_TOKEN variable that raise-baseline needs (Protect the Default Branch) |
brand/ |
The NCode Group logo kit: the {N} mark as SVG masters, and the PNG and ICO files that NuGet, a website's favicon, GitHub, GitLab, My Apps, profile pictures, badges and social cards each ask for. brand/build.mjs draws them all, and template/NCodeGroup.png, on Node.js with no packages, and node brand/build.mjs --check says whether every file matches what it draws; brand/README.md says which file is for what. Projects don't get it |
AGENTS.md, .claude/settings.json, .vscode/settings.json, .gitignore |
This repository's own agent instructions and settings: AI attribution avoided in commits (Commit Attribution), and Claude Code's worktrees ignored |
.claude/, .github/agents/, .github/prompts/, .github/skills/, .template/Get-PlanState.ps1 |
This repository's own workflow: the same generated files as template/ gets, committed so that working on the template with Claude Code or Copilot has /plan-feature, /orchestrate-plan and the rest on any PC that clones it. Never edit them; tools/Update-Template.ps1 regenerates them |
tests/ |
This repository's tests, one script per area: they find the repository root themselves, run from any folder, and CI runs them all, except the end-to-end tests in tests/e2e/, which it only sets up |
tests/Test-Template.ps1 |
Render every stack and check the result |
tests/Test-TemplateDotnet.ps1 |
Build, test and pack the rendered .NET projects, including the CP0002 package-validation probe and the Format stage probes |
tests/Test-ProjectUpdate.ps1 |
Update a rendered project through two template versions, the second with a conflict, and check that csharp_format defaults to no |
tests/Test-ProjectUpdateHooks.ps1 |
Check that an update keeps a hooks path a project already has, and update a project through the root wrapper |
tests/Test-Adoption.ps1 |
Check the adoption functions and legacy adapters, then adopt a Python and a .NET test repository and update the first |
tests/Test-AdoptEdgeCases.ps1 |
Adopt the other test repositories: a rollback, CI and a hooks path of their own, with the update's notes on a kept ci.yml, catch-all attributes, Copilot-only agents, a failing build, Node.js without scripts, a publish.yml without workflow_dispatch, and the warning for a kept library publish.yml that doesn't call the release follow-ups, word for word as the update does, and none for a repository that isn't a library |
tests/Test-AdoptOwnedFiles.ps1 |
Adopt a repository that owns a merged and a template-owned file, then update it |
tests/Test-UpdateIgnoredFiles.ps1 |
Update a project whose own .gitignore ignores a large folder |
tests/Test-UpdateExitCode.ps1 |
Check that a successful update exits 0 |
tests/Test-UpdateLibrary.ps1 |
Update a .NET library without a license answer, and one with a NuGet publishing workflow of its own and a release that the assembly version pin would lower; the warning for a library's updated publish.yml that doesn't call the release follow-ups, and none for the template's, which calls them |
tests/Test-LicenseWarning.ps1 |
Update and adopt a repository without a license, and check the warning that says how to add one |
tests/Test-UpdateNotes.ps1 |
Test the opt-in answers an update and an adoption give, the notes on ci.yml's workflow_call trigger and permissions, in both scripts, the badge reminder and the note on SECURITY.md's immutable-releases paragraph |
tests/Test-UpdateWindowsCheckout.ps1 |
Check that an update on Windows stops early for a project on a template version Windows can't check out |
tests/Test-WindowsFileNames.ps1 |
Check that Windows can check out every path in the repository |
tests/Test-BestPracticesCriteria.ps1 |
Check the Best Practices criteria map against the badge's own list of criteria |
tests/Test-UpdateKeptLines.ps1 |
Update an adopted project whose merged files end with the lines it kept |
tests/Test-UpdateConflictStaging.ps1 |
Update an adopted project that stops on a conflict in another file |
tests/Test-UpdateOwnedFiles.ps1 |
Update a project that owns a merged file it replaced |
tests/Test-UpdateOwnedTemplateFiles.ps1 |
Update a project that owns template-owned files |
tests/Test-UpdateSkipPatterns.ps1 |
Update a nested file that an unanchored _skip_if_exists entry kept from updates |
tests/Test-UpdateTemplateOwnedConflicts.ps1 |
Update a project whose own copy of a template-owned file conflicts |
tests/Test-UpdateRewrittenFiles.ps1 |
Update a project that replaced a merged file without owning it |
tests/Test-PlanState.ps1 |
Test the plan state script /ship-plan and /continue-plan run |
tests/Test-PlanStateConcurrency.ps1 |
Test that the plan state script makes its network calls at the same time and stops the ones it never received when it fails |
tests/Test-ChangelogBackfill.ps1 |
Test the check that names the version tags the changelog has no section for |
tests/Test-Coverage.ps1 |
Test the coverage check every project gets |
tests/Test-FileHeaders.ps1 |
Test the file header check every project gets |
tests/Test-LibraryRelease.ps1 |
Test the checks that name an assembly version to keep and a second NuGet publisher, Get-PublishedPackageVersion, the baseline check and the file header check and the package metadata comparison with the newest published package |
tests/Test-NuGetLogistics.ps1 |
both copies of Get-NuGetLogistics, in .template/Update-Project.ps1 and tools/adopt/Adoption.psm1, name an unimported .props file, GeneratePackageOnBuild, repeated template settings, a .sln, a byte order mark and a project at the root, and nothing for a clean library |
tests/Test-UpdateBaseline.ps1 |
Test build/Update-Baseline.ps1 offline: the baseline raise, its changelog entry, the suppressions it removes and the nuget.org wait, against stand-ins for nuget.org and Start-Sleep, and the lines of raise-baseline.yml that name the suppression files in its pull request description |
tests/Test-ReproducibleBuild.ps1 |
Test .template/Test-ReproducibleBuild.ps1 on a generated class library: two packs that match, a build that takes a value from the clock, and a project with no package |
tests/Test-CSharpierWrapper.ps1 |
Test Get-CSharpierWrapper in .template/Update-Project.ps1 and tools/adopt/Adoption.psm1, which names a project's own build scripts that run CSharpier's check a second time |
tests/Test-GitVersioningReference.ps1 |
Remove-GitVersioningReference in tools/adopt/Adoption.psm1 drops a repository's own Nerdbank.GitVersioning reference and a second PackageVersion, and leaves build/ProjectTemplate.props and a repository without one alone |
tests/Test-TemplateUpdate.ps1 |
Test the weekly template update notice every GitHub project runs |
tests/Test-GitHooks.ps1 |
Test the pre-push hook, the note on enabling the hooks, and the update's note on the removed Commit attribution check |
tests/Test-RepositoryBaseline.ps1 |
Test the repository baseline script against a stand-in for gh: a code-scanning rule only where CodeQL's default setup analyzes a language, no suite switch where it analyzes none, and a warning, naming both fixes, where a kept rule that requires CodeQL waits on a setup configured with none; no approval of the last push without an approval, one approval and last-push approval where code-review.yml passes approve: true (an earlier run's ruleset too), approval settings and code-owner review kept on -RequireChecks, stale reviews dismissed on push, a last-push approval with no approval turned off in the script's ruleset, alone, beside a ruleset of the owner's, with other changes, with -RequireChecks, with -WhatIf and when GitHub refuses it (which also prints the command), and kept, on or off and never turned on, at one required approval or more, and a notice, with a printed, parsing, never-sent command that turns it off, for a ruleset of the owner's; with one person with write access, no approval and no last-push approval even with approve: true, an earlier ruleset's turned off on a plain run, with -RequireChecks, with -WhatIf and when GitHub refuses it, a collaborators list it can't read or that isn't JSON named, an empty list or one with a bot counted as one writer, a notice with the command for a ruleset of the owner's that requires an approval and for a refused change, and a notice naming tools/Dismiss-ScorecardAlerts.ps1 for a public repository with one writer |
tests/Test-ScorecardAlerts.ps1 |
Test the Scorecard alert helper against a stand-in for gh: with one writer, a bot with write access not counted, it lists every open alert, then dismisses only Branch-Protection, CII-Best-Practices and Contributors with the standard comment; -WhatIf, two writers, unreadable lists named with gh's reason, a refused dismissal and a -Repo without an owner |
tests/Test-GitLabBaseline.ps1 |
Test the GitLab baseline script against a stand-in for glab |
tests/Test-NewProjectRemote.ps1 |
Test the baseline calls New-Project.ps1 -CreateRemote makes, against stand-ins |
tests/Test-ScriptAnalyzer.ps1 |
Run PSScriptAnalyzer on every script and fail on any warning or error |
tests/Invoke-AllTests.ps1 |
Run every test suite and every -SetupOnly fixture setup the CI workflow runs, and print one line per run |
tests/Measure-Suites.ps1 |
Time the test suites it names, one at a time, against a limit |
tests/Compare-Renders.ps1 |
Render the template at a base commit and from the working tree with six answer sets, update each base render to the working tree's, and fail on any difference: the check for a change that must not alter what projects get |
tests/Test-InvokeAllTests.ps1 |
Test the runner that runs every test suite |
tests/Test-AgentRunner.ps1 |
Test the end-to-end tests' runner against stand-ins for claude and copilot |
tests/Remove-TestWork.ps1 |
Delete a passing run's own work folder, or say it couldn't |
tests/New-TemplateSnapshot.ps1 |
Build the tagged snapshot of the working tree that tests/Test-Template.ps1, tests/Test-TemplateDotnet.ps1, tests/Test-ProjectUpdate.ps1, tests/Test-ProjectUpdateHooks.ps1, tests/Test-UpdateIgnoredFiles.ps1, tests/Test-UpdateExitCode.ps1, tests/Test-UpdateLibrary.ps1, tests/Test-UpdateKeptLines.ps1, tests/Test-UpdateConflictStaging.ps1, tests/Test-UpdateOwnedFiles.ps1, tests/Test-UpdateOwnedTemplateFiles.ps1, tests/Test-UpdateSkipPatterns.ps1, tests/Test-UpdateTemplateOwnedConflicts.ps1, tests/Test-UpdateRewrittenFiles.ps1, tests/Test-LicenseWarning.ps1 and the end-to-end fixture in tests/e2e/Fixture.ps1 render from and tests/Test-Adoption.ps1, tests/Test-AdoptEdgeCases.ps1, tests/Test-AdoptOwnedFiles.ps1 and tests/Test-LicenseWarning.ps1 adopt from |
tests/AdoptionFixtures.ps1 |
The Git calls, fixture repositories and image tests/Test-Adoption.ps1, tests/Test-AdoptEdgeCases.ps1 and tests/Test-LicenseWarning.ps1 share |
tests/StandInLog.ps1 |
The function the gh and glab stand-ins of tests/Test-PlanState.ps1 and tests/e2e/ dot-source to append to their logs one call at a time |
tests/e2e/Test-RunIssues.ps1 |
Run /run-issues end to end on a fixture project, by hand, in Claude Code or the Copilot CLI |
tests/e2e/Test-AddressFeedback.ps1 |
Run /address-feedback end to end on a fixture pull request, by hand, in Claude Code or the Copilot CLI |
tests/e2e/Test-AddressFeedbackGitLab.ps1 |
Run /address-feedback end to end on a GitLab fixture merge request whose notes come back with a session footer, by hand, in Claude Code or the Copilot CLI |
tests/e2e/Test-RunFeedback.ps1 |
Run /run-feedback end to end on a fixture pull request, by hand, in Claude Code or the Copilot CLI |
tests/e2e/Fixture.ps1 |
The fixture project, environment and checks the end-to-end tests share |
tests/e2e/Agent.ps1 |
The headless runner the end-to-end tests share: Claude Code or the Copilot CLI behind one interface, and where each tool's run works and its commands are installed |
tests/e2e/gh.ps1 |
The gh stand-in the end-to-end tests put on PATH |
tests/e2e/glab.ps1 |
The glab stand-in the end-to-end tests put on PATH |
tests/requirements.txt |
The exact versions of the Python programs the tests run: the Copier CI installs, and the pre-commit that tests/Test-GitHooks.ps1 runs through uvx; Dependabot moves them in a pull request |
tests/node/ |
The Node.js checks tests/Test-Template.ps1 runs: check-yaml.mjs, which parses every rendered YAML file, pwsh-steps.mjs, which lists the steps that run under pwsh for the PowerShell parse check, and check-exclude.mjs, which renders copier.yml's _exclude patterns without answers; package.json and package-lock.json pin the yaml and nunjucks packages they use, which Test-Template.ps1 installs with npm ci --ignore-scripts when node_modules doesn't match the lock file, and Dependabot moves them in a pull request |
.node-version |
The Node.js release this repository's own tooling and CI use, as in a project (ADR-0200) |
.github/workflows/test-template.yml |
Sets up the .node-version Node.js and installs Copier at the version tests/requirements.txt pins, then runs tests/Test-Template.ps1, tests/Test-TemplateDotnet.ps1, tests/Test-ProjectUpdate.ps1, tests/Test-ProjectUpdateHooks.ps1, tests/Test-Adoption.ps1, tests/Test-AdoptEdgeCases.ps1, tests/Test-AdoptOwnedFiles.ps1, tests/Test-UpdateIgnoredFiles.ps1, tests/Test-UpdateExitCode.ps1, tests/Test-UpdateLibrary.ps1, tests/Test-LicenseWarning.ps1, tests/Test-UpdateKeptLines.ps1, tests/Test-UpdateConflictStaging.ps1, tests/Test-UpdateOwnedFiles.ps1, tests/Test-UpdateOwnedTemplateFiles.ps1, tests/Test-UpdateSkipPatterns.ps1, tests/Test-UpdateTemplateOwnedConflicts.ps1, tests/Test-UpdateRewrittenFiles.ps1, tests/Test-UpdateWindowsCheckout.ps1, tests/Test-UpdateBaseline.ps1, tests/Test-CSharpierWrapper.ps1, tests/Test-PlanState.ps1, tests/Test-PlanStateConcurrency.ps1, tests/Test-ChangelogBackfill.ps1, tests/Test-LibraryRelease.ps1, tests/Test-NuGetLogistics.ps1, tests/Test-GitVersioningReference.ps1, tests/Test-DecisionIndex.ps1, tests/Test-TemplateUpdate.ps1, tests/Test-GitHooks.ps1, tests/Test-RepositoryBaseline.ps1, tests/Test-GitLabBaseline.ps1, tests/Test-NewProjectRemote.ps1, tests/Test-ScriptAnalyzer.ps1, tests/Test-AgentRunner.ps1, tests/Test-WindowsFileNames.ps1, tests/Test-BestPracticesCriteria.ps1, tests/Test-BrandKit.ps1 and tests/Test-InvokeAllTests.ps1 and sets up the end-to-end fixtures with tests/e2e/Test-RunIssues.ps1 -SetupOnly, also with -Scenario max-rounds, -Scenario review-with-footer, -Scenario push-branch and -Scenario fix-now, tests/e2e/Test-AddressFeedback.ps1 -SetupOnly, also with -Scenario rest, -Scenario resume-claude and -Scenario resume-copilot, tests/e2e/Test-AddressFeedbackGitLab.ps1 -SetupOnly and tests/e2e/Test-RunFeedback.ps1 -SetupOnly, also with -Scenario review-with-footer, on Linux, each in a parallel job, longest first, that a final test job, the check the ruleset requires, passes only when all of them pass; a newer push to a pull request cancels the older run |
.github/dependabot.yml |
Dependabot for the actions in test-template.yml, the pins in tests/requirements.txt and the packages in tests/node/package.json, each waiting three days before it offers a new version and giving security updates a pull request of their own |
PSScriptAnalyzerSettings.psd1 |
The PSScriptAnalyzer rules this repository's scripts leave out, each with its reason |
LICENSE |
The MIT license this repository is published under; projects made from it don't get it and choose their own |
CONTRIBUTING.md, SECURITY.md |
How issues and pull requests reach this repository, and how to report a vulnerability privately; projects don't get them either |
USAGE.md |
Setting up a PC for Claude Code and GitHub Copilot, and using and switching between them in a project |
.gitattributes |
Keeps every file LF on disk, because Copier copies non-.jinja files byte for byte |
TL;DR: .\New-Project.ps1 -Path C:\src\<name> -CreateRemote creates a project with AGENTS.md, CLAUDE.md, Claude Code permissions, the plan-then-execute commands and agents for Claude Code, Copilot Chat and Copilot CLI — switch between your Claude and Copilot plans at any time — CI, Dependabot, and optional .NET settings, then creates its repository on GitHub, public, and pushes. Add -Visibility private for a private repository; answer GitLab to the host question (or pass -Data @{ git_host = 'gitlab' }) for GitLab. Every file has one of three owners: template-owned files are replaced on every update and never edited; merged files — settings whose tools can't include a second file — take the template's changes merged with the project's edits; and project-owned files, including the AGENTS.md index, are never touched. .\.template\Update-Project.ps1, run in a project, updates itself to the newest version first, then does all three and commits, or stops on a same-line conflict in a merged file. Dependabot keeps each GitHub project's actions, packages and SDK current through weekly pull requests. Change the workflow in workflow/templates, run tools/Update-Template.ps1 and tests/Test-Template.ps1, then tag and push; this repository is its single source of truth. .\Adopt-Project.ps1 -Path <repository> brings an existing repository under the template.