From 8064b969e8cc356c7d55e746b8d99ce025531ff9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 02:46:15 +0000 Subject: [PATCH 01/25] Bump the nuget-deps group with 1 update (#506) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated [ptr727.Utilities](https://github.com/ptr727/Utilities) from 4.1.112 to 4.1.119.
Release notes _Sourced from [ptr727.Utilities's releases](https://github.com/ptr727/Utilities/releases)._ ## 4.1.119 ## What's Changed * Skip the Carried Verbatim Trees in the Reviewer Configs by @​ptr727 in https://github.com/ptr727/Utilities/pull/583 * Bump the actions-deps group with 4 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/585 * Bump the nuget-deps group with 1 update by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/587 * Bump the Hub Reusable Workflow Pin to 2.0.1401 by @​ptr727 in https://github.com/ptr727/Utilities/pull/593 * Rename codecov.yml to .codecov.yml by @​ptr727 in https://github.com/ptr727/Utilities/pull/592 * Bump the nuget-deps group with 4 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/591 * Promote Develop: Hub Pin 2.0.1401 and the .codecov.yml Rename by @​ptr727 in https://github.com/ptr727/Utilities/pull/594 * Promote Develop: Reviewer Config Exclusions by @​ptr727 in https://github.com/ptr727/Utilities/pull/584 * Bump the nuget-deps group with 1 update by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/595 * Bound the Loopback Server Teardown Waits With Task.WaitAny by @​ptr727 in https://github.com/ptr727/Utilities/pull/598 * Bound the Loopback Server Teardown Waits With Task.WaitAny on Main by @​ptr727 in https://github.com/ptr727/Utilities/pull/599 * Resync the Instruction Set and Skills Tree With the Hub by @​ptr727 in https://github.com/ptr727/Utilities/pull/597 * Resync the Intent Files With the Hub by @​ptr727 in https://github.com/ptr727/Utilities/pull/600 * Promote the Hub Resync to Main by @​ptr727 in https://github.com/ptr727/Utilities/pull/601 **Full Changelog**: https://github.com/ptr727/Utilities/compare/4.1.112...4.1.119 Commits viewable in [compare view](https://github.com/ptr727/Utilities/compare/4.1.112...4.1.119).
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ptr727.Utilities&package-manager=nuget&previous-version=4.1.112&new-version=4.1.119)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 2e954a7..3f6f3ff 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - + From 70e0abae701b2e0c2dc1a98b2573a8e06681f1b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 02:47:10 +0000 Subject: [PATCH 02/25] Bump the nuget-deps group with 1 update (#507) Updated [Microsoft.CodeAnalysis.CSharp](https://github.com/dotnet/roslyn) from 5.9.0 to 5.12.0.
Release notes _Sourced from [Microsoft.CodeAnalysis.CSharp's releases](https://github.com/dotnet/roslyn/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/roslyn/commits).
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.CodeAnalysis.CSharp&package-manager=nuget&previous-version=5.9.0&new-version=5.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 3f6f3ff..01546cb 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,7 +4,7 @@ - +

... (truncated)

Commits
  • 900039a Promote Develop to Main: Narrowed Observed-Data Rule and a Claude Code 2.1.28...
  • d921ae7 Set a Claude Code 2.1.281 Floor and Load CLAUDE.md and AGENTS.md Both (#4244)
  • a81d199 Narrow the Observed-Data Rule to Names, Account Identifiers, Secrets and Host...
  • 54fc130 Promote Develop to Main: Auto-Mode Allow-Rule Spelling for pr_review.py Calls...
  • 8d0504f Run pr_review.py Calls in the Allow Rule's Exact Spelling Under Auto Mode (#4...
  • 21e4883 Clear the Standup Pending Note on homeassistant-vantage-diagnostics (#4235)
  • 6e05308 Promote Develop to Main: Burndown Refill Pending-Dispatch Window and Away End...
  • a22da65 Count a Just-Dispatched Burndown Group In Flight, and Release Every Unstarted...
  • 8df8cd1 Promote Develop to Main: CodeRabbit Outside-Diff Bold-Line Shape (#4227)
  • d0e8b07 Register the homeassistant-vantage-diagnostics Repository in the Fleet Catalo...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml` from 2.0.1468 to 2.0.1483
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml's releases.

2.0.1483

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1481...2.0.1483

2.0.1481

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1479...2.0.1481

2.0.1479

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1477...2.0.1479

2.0.1477

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1473...2.0.1477

2.0.1473

What's Changed

... (truncated)

Commits
  • 900039a Promote Develop to Main: Narrowed Observed-Data Rule and a Claude Code 2.1.28...
  • d921ae7 Set a Claude Code 2.1.281 Floor and Load CLAUDE.md and AGENTS.md Both (#4244)
  • a81d199 Narrow the Observed-Data Rule to Names, Account Identifiers, Secrets and Host...
  • 54fc130 Promote Develop to Main: Auto-Mode Allow-Rule Spelling for pr_review.py Calls...
  • 8d0504f Run pr_review.py Calls in the Allow Rule's Exact Spelling Under Auto Mode (#4...
  • 21e4883 Clear the Standup Pending Note on homeassistant-vantage-diagnostics (#4235)
  • 6e05308 Promote Develop to Main: Burndown Refill Pending-Dispatch Window and Away End...
  • a22da65 Count a Just-Dispatched Burndown Group In Flight, and Release Every Unstarted...
  • 8df8cd1 Promote Develop to Main: CodeRabbit Outside-Diff Bold-Line Shape (#4227)
  • d0e8b07 Register the homeassistant-vantage-diagnostics Repository in the Fleet Catalo...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/validate-task.yml` from 2.0.1468 to 2.0.1483
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/validate-task.yml's releases.

2.0.1483

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1481...2.0.1483

2.0.1481

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1479...2.0.1481

2.0.1479

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1477...2.0.1479

2.0.1477

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1473...2.0.1477

2.0.1473

What's Changed

... (truncated)

Commits
  • 900039a Promote Develop to Main: Narrowed Observed-Data Rule and a Claude Code 2.1.28...
  • d921ae7 Set a Claude Code 2.1.281 Floor and Load CLAUDE.md and AGENTS.md Both (#4244)
  • a81d199 Narrow the Observed-Data Rule to Names, Account Identifiers, Secrets and Host...
  • 54fc130 Promote Develop to Main: Auto-Mode Allow-Rule Spelling for pr_review.py Calls...
  • 8d0504f Run pr_review.py Calls in the Allow Rule's Exact Spelling Under Auto Mode (#4...
  • 21e4883 Clear the Standup Pending Note on homeassistant-vantage-diagnostics (#4235)
  • 6e05308 Promote Develop to Main: Burndown Refill Pending-Dispatch Window and Away End...
  • a22da65 Count a Just-Dispatched Burndown Group In Flight, and Release Every Unstarted...
  • 8df8cd1 Promote Develop to Main: CodeRabbit Outside-Diff Bold-Line Shape (#4227)
  • d0e8b07 Register the homeassistant-vantage-diagnostics Repository in the Fleet Catalo...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/build-release-task.yml` from 2.0.1468 to 2.0.1483
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/build-release-task.yml's releases.

2.0.1483

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1481...2.0.1483

2.0.1481

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1479...2.0.1481

2.0.1479

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1477...2.0.1479

2.0.1477

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1473...2.0.1477

2.0.1473

What's Changed

... (truncated)

Commits
  • 900039a Promote Develop to Main: Narrowed Observed-Data Rule and a Claude Code 2.1.28...
  • d921ae7 Set a Claude Code 2.1.281 Floor and Load CLAUDE.md and AGENTS.md Both (#4244)
  • a81d199 Narrow the Observed-Data Rule to Names, Account Identifiers, Secrets and Host...
  • 54fc130 Promote Develop to Main: Auto-Mode Allow-Rule Spelling for pr_review.py Calls...
  • 8d0504f Run pr_review.py Calls in the Allow Rule's Exact Spelling Under Auto Mode (#4...
  • 21e4883 Clear the Standup Pending Note on homeassistant-vantage-diagnostics (#4235)
  • 6e05308 Promote Develop to Main: Burndown Refill Pending-Dispatch Window and Away End...
  • a22da65 Count a Just-Dispatched Burndown Group In Flight, and Release Every Unstarted...
  • 8df8cd1 Promote Develop to Main: CodeRabbit Outside-Diff Bold-Line Shape (#4227)
  • d0e8b07 Register the homeassistant-vantage-diagnostics Repository in the Fleet Catalo...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml` from 2.0.1468 to 2.0.1483
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml's releases.

2.0.1483

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1481...2.0.1483

2.0.1481

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1479...2.0.1481

2.0.1479

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1477...2.0.1479

2.0.1477

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1473...2.0.1477

2.0.1473

What's Changed

... (truncated)

Commits
  • 900039a Promote Develop to Main: Narrowed Observed-Data Rule and a Claude Code 2.1.28...
  • d921ae7 Set a Claude Code 2.1.281 Floor and Load CLAUDE.md and AGENTS.md Both (#4244)
  • a81d199 Narrow the Observed-Data Rule to Names, Account Identifiers, Secrets and Host...
  • 54fc130 Promote Develop to Main: Auto-Mode Allow-Rule Spelling for pr_review.py Calls...
  • 8d0504f Run pr_review.py Calls in the Allow Rule's Exact Spelling Under Auto Mode (#4...
  • 21e4883 Clear the Standup Pending Note on homeassistant-vantage-diagnostics (#4235)
  • 6e05308 Promote Develop to Main: Burndown Refill Pending-Dispatch Window and Away End...
  • a22da65 Count a Just-Dispatched Burndown Group In Flight, and Release Every Unstarted...
  • 8df8cd1 Promote Develop to Main: CodeRabbit Outside-Diff Bold-Line Shape (#4227)
  • d0e8b07 Register the homeassistant-vantage-diagnostics Repository in the Fleet Catalo...
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/run-periodic-codegen-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index e4de1a2..125bf76 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -18,7 +18,7 @@ jobs: merge-bot: name: Merge bot pull request job - uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@0c2dd7228fbda6747e4c9f0b0b4136de8e4c8635 # 2.0.1468 + uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 # The repository-wide auto-delete stays off, so the task deletes each merged bot head branch instead. with: delete-branch: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index f21fd17..2492290 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,7 +41,7 @@ jobs: # Single source of the release-gate decision, publish or not and stable or not, reused by every job below. plan: name: Plan release job - uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@0c2dd7228fbda6747e4c9f0b0b4136de8e4c8635 # 2.0.1468 + uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 with: event_name: ${{ github.event_name }} actor: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: name: Validate job needs: [plan] if: ${{ needs.plan.outputs.publish == 'true' }} - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@0c2dd7228fbda6747e4c9f0b0b4136de8e4c8635 # 2.0.1468 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} permissions: @@ -67,7 +67,7 @@ jobs: name: Publish project release job needs: [plan, validate] if: ${{ needs.plan.outputs.publish == 'true' && needs.validate.result == 'success' }} - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@0c2dd7228fbda6747e4c9f0b0b4136de8e4c8635 # 2.0.1468 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 permissions: contents: write actions: write diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index d7afb6e..88fc3db 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -22,7 +22,7 @@ jobs: run-codegen: name: Run codegen and pull request job - uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@0c2dd7228fbda6747e4c9f0b0b4136de8e4c8635 # 2.0.1468 + uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 secrets: CODEGEN_APP_CLIENT_ID: ${{ secrets.CODEGEN_APP_CLIENT_ID }} CODEGEN_APP_PRIVATE_KEY: ${{ secrets.CODEGEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 70878e9..5103487 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -58,7 +58,7 @@ jobs: validate: name: Validate job - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@0c2dd7228fbda6747e4c9f0b0b4136de8e4c8635 # 2.0.1468 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 permissions: contents: read # Mapped explicitly rather than inherited, since this is a cross-repository call and secrets: inherit would hand the callee every secret this repository holds. @@ -75,7 +75,7 @@ jobs: name: Smoke build job needs: [changes] if: needs.changes.outputs.release == 'true' || github.event_name == 'workflow_dispatch' - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@0c2dd7228fbda6747e4c9f0b0b4136de8e4c8635 # 2.0.1468 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 permissions: contents: read with: From 0bc1f7d3c9703c76a84a7abb5429396b1807d87a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 02:47:00 +0000 Subject: [PATCH 07/25] Bump the nuget-deps group with 1 update (#517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated [ptr727.Utilities](https://github.com/ptr727/Utilities) from 4.1.119 to 4.1.128.
Release notes _Sourced from [ptr727.Utilities's releases](https://github.com/ptr727/Utilities/releases)._ ## 4.1.128 ## What's Changed * Bump the actions-deps group with 4 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/603 * Bump the actions-deps group with 4 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/604 * Bump the actions-deps group with 4 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/607 * Bump the actions-deps group with 4 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/608 * Bump Serilog.Extensions.Logging from 10.0.0 to 11.0.0 by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/606 **Full Changelog**: https://github.com/ptr727/Utilities/compare/4.1.119...4.1.128 Commits viewable in [compare view](https://github.com/ptr727/Utilities/compare/4.1.119...4.1.128).
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ptr727.Utilities&package-manager=nuget&previous-version=4.1.119&new-version=4.1.128)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index a27ff23..aaf0877 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - + From 00661f34a487aca6df4e0f95662daa4bad15fc87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 02:47:13 +0000 Subject: [PATCH 08/25] Bump csharpier from 1.4.0 to 1.4.1 (#519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated [csharpier](https://github.com/belav/csharpier) from 1.4.0 to 1.4.1.
Release notes _Sourced from [csharpier's releases](https://github.com/belav/csharpier/releases)._ ## 1.4.1 ## What's Changed ### Fix: Trailing lambda with an expression body that breaks is formatted badly [#​1941](https://github.com/belav/csharpier/issues/1941) 1.4.0 started keeping the arguments before a trailing lambda on the same line as the method name. When the lambda had an expression body that did not fit on one line, the body started on the same line as the `=>` and the closing parenthesis was not moved to its own line. ```c# // input & expected output CallMethod(one, x => x == 1 ? "one" : x == 2 ? "two" : "three" ); CallMethod(one, x => from y in x group y by y.Key into g select new { g.Key.Id, g.Key.Alias, Count = g.Count(), } ); // 1.4.0 CallMethod(one, x => x == 1 ? "one" : x == 2 ? "two" : "three"); CallMethod(one, x => from y in x group y by y.Key into g select new { g.Key.Id, g.Key.Alias, Count = g.Count(), }); ``` ### Fix: Raw string literals are formatted inconsistently [#​1940](https://github.com/belav/csharpier/issues/1940) A raw string literal assigned to a variable kept its opening quotes on the same line as the `=`. In other places, such as a lambda body, an expression bodied member, a property initializer or a cast, the opening quotes moved to the next line and the contents were indented one level further than the quotes. These cases are now formatted the same way as a variable. ```c# // input & expected output Func lambda = _ => """ SomeRawString """; CallMethod(_ => """ SomeRawString """ ); var cast = (object)""" SomeRawString ... (truncated) Commits viewable in [compare view](https://github.com/belav/csharpier/compare/1.4.0...1.4.1).
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=csharpier&package-manager=nuget&previous-version=1.4.0&new-version=1.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index e50ddce..4f40914 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "csharpier": { - "version": "1.4.0", + "version": "1.4.1", "commands": [ "csharpier" ], From 482ec55052001dc21174d7baff214628bf369c33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 02:51:07 +0000 Subject: [PATCH 09/25] Bump the actions-deps group across 1 directory with 5 updates (#521) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the actions-deps group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1483` | `2.0.1509` | | [ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1483` | `2.0.1509` | | [ptr727/ProjectTemplate/.github/workflows/validate-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1483` | `2.0.1509` | | [ptr727/ProjectTemplate/.github/workflows/build-release-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1483` | `2.0.1509` | | [ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1483` | `2.0.1509` | Updates `ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml` from 2.0.1483 to 2.0.1509
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml's releases.

2.0.1509

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1507...2.0.1509

2.0.1507

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1505...2.0.1507

2.0.1505

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1500...2.0.1505

2.0.1500

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1498...2.0.1500

2.0.1498

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1497...2.0.1498

2.0.1497

What's Changed

... (truncated)

Commits
  • d42ad0e Promote Develop to Main: Retired-Path Reasons, Validate Git Isolation, and Hu...
  • c6b9568 Give a Source-Only Retired Path Its True Reason and Isolate the Validate Runs...
  • 03f4af0 Fix Three Hub Hygiene Issues: BLE001 Reason, uv pip install Launcher, Merge-B...
  • 7248333 Promote Develop to Main: Fail Closed on a Malformed inheritingAgentTypes and ...
  • b352fb9 Fail Closed on a Malformed inheritingAgentTypes in the Tier Guard (#4293)
  • 72d41f4 Close Further Latent Edges in the Retired-Path Checks (#4295)
  • 44b0025 Promote Develop to Main: Default Subagents to Frontier and Close Retired-Path...
  • 8a1441e Complete the Missing Subagent Model Diagnostic (#4292)
  • c0cfe26 Report Downstream Copies When a Whole Tree Declaration Is Dropped (#4288)
  • d4f9e6d Close Latent Edges in the Retired-Path Checks (#4286)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml` from 2.0.1483 to 2.0.1509
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml's releases.

2.0.1509

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1507...2.0.1509

2.0.1507

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1505...2.0.1507

2.0.1505

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1500...2.0.1505

2.0.1500

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1498...2.0.1500

2.0.1498

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1497...2.0.1498

2.0.1497

What's Changed

... (truncated)

Commits
  • d42ad0e Promote Develop to Main: Retired-Path Reasons, Validate Git Isolation, and Hu...
  • c6b9568 Give a Source-Only Retired Path Its True Reason and Isolate the Validate Runs...
  • 03f4af0 Fix Three Hub Hygiene Issues: BLE001 Reason, uv pip install Launcher, Merge-B...
  • 7248333 Promote Develop to Main: Fail Closed on a Malformed inheritingAgentTypes and ...
  • b352fb9 Fail Closed on a Malformed inheritingAgentTypes in the Tier Guard (#4293)
  • 72d41f4 Close Further Latent Edges in the Retired-Path Checks (#4295)
  • 44b0025 Promote Develop to Main: Default Subagents to Frontier and Close Retired-Path...
  • 8a1441e Complete the Missing Subagent Model Diagnostic (#4292)
  • c0cfe26 Report Downstream Copies When a Whole Tree Declaration Is Dropped (#4288)
  • d4f9e6d Close Latent Edges in the Retired-Path Checks (#4286)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/validate-task.yml` from 2.0.1483 to 2.0.1509
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/validate-task.yml's releases.

2.0.1509

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1507...2.0.1509

2.0.1507

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1505...2.0.1507

2.0.1505

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1500...2.0.1505

2.0.1500

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1498...2.0.1500

2.0.1498

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1497...2.0.1498

2.0.1497

What's Changed

... (truncated)

Commits
  • d42ad0e Promote Develop to Main: Retired-Path Reasons, Validate Git Isolation, and Hu...
  • c6b9568 Give a Source-Only Retired Path Its True Reason and Isolate the Validate Runs...
  • 03f4af0 Fix Three Hub Hygiene Issues: BLE001 Reason, uv pip install Launcher, Merge-B...
  • 7248333 Promote Develop to Main: Fail Closed on a Malformed inheritingAgentTypes and ...
  • b352fb9 Fail Closed on a Malformed inheritingAgentTypes in the Tier Guard (#4293)
  • 72d41f4 Close Further Latent Edges in the Retired-Path Checks (#4295)
  • 44b0025 Promote Develop to Main: Default Subagents to Frontier and Close Retired-Path...
  • 8a1441e Complete the Missing Subagent Model Diagnostic (#4292)
  • c0cfe26 Report Downstream Copies When a Whole Tree Declaration Is Dropped (#4288)
  • d4f9e6d Close Latent Edges in the Retired-Path Checks (#4286)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/build-release-task.yml` from 2.0.1483 to 2.0.1509
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/build-release-task.yml's releases.

2.0.1509

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1507...2.0.1509

2.0.1507

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1505...2.0.1507

2.0.1505

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1500...2.0.1505

2.0.1500

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1498...2.0.1500

2.0.1498

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1497...2.0.1498

2.0.1497

What's Changed

... (truncated)

Commits
  • d42ad0e Promote Develop to Main: Retired-Path Reasons, Validate Git Isolation, and Hu...
  • c6b9568 Give a Source-Only Retired Path Its True Reason and Isolate the Validate Runs...
  • 03f4af0 Fix Three Hub Hygiene Issues: BLE001 Reason, uv pip install Launcher, Merge-B...
  • 7248333 Promote Develop to Main: Fail Closed on a Malformed inheritingAgentTypes and ...
  • b352fb9 Fail Closed on a Malformed inheritingAgentTypes in the Tier Guard (#4293)
  • 72d41f4 Close Further Latent Edges in the Retired-Path Checks (#4295)
  • 44b0025 Promote Develop to Main: Default Subagents to Frontier and Close Retired-Path...
  • 8a1441e Complete the Missing Subagent Model Diagnostic (#4292)
  • c0cfe26 Report Downstream Copies When a Whole Tree Declaration Is Dropped (#4288)
  • d4f9e6d Close Latent Edges in the Retired-Path Checks (#4286)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml` from 2.0.1483 to 2.0.1509
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml's releases.

2.0.1509

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1507...2.0.1509

2.0.1507

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1505...2.0.1507

2.0.1505

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1500...2.0.1505

2.0.1500

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1498...2.0.1500

2.0.1498

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1497...2.0.1498

2.0.1497

What's Changed

... (truncated)

Commits
  • d42ad0e Promote Develop to Main: Retired-Path Reasons, Validate Git Isolation, and Hu...
  • c6b9568 Give a Source-Only Retired Path Its True Reason and Isolate the Validate Runs...
  • 03f4af0 Fix Three Hub Hygiene Issues: BLE001 Reason, uv pip install Launcher, Merge-B...
  • 7248333 Promote Develop to Main: Fail Closed on a Malformed inheritingAgentTypes and ...
  • b352fb9 Fail Closed on a Malformed inheritingAgentTypes in the Tier Guard (#4293)
  • 72d41f4 Close Further Latent Edges in the Retired-Path Checks (#4295)
  • 44b0025 Promote Develop to Main: Default Subagents to Frontier and Close Retired-Path...
  • 8a1441e Complete the Missing Subagent Model Diagnostic (#4292)
  • c0cfe26 Report Downstream Copies When a Whole Tree Declaration Is Dropped (#4288)
  • d4f9e6d Close Latent Edges in the Retired-Path Checks (#4286)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/run-periodic-codegen-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 125bf76..cebbed7 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -18,7 +18,7 @@ jobs: merge-bot: name: Merge bot pull request job - uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 + uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 # The repository-wide auto-delete stays off, so the task deletes each merged bot head branch instead. with: delete-branch: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 2492290..098e399 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,7 +41,7 @@ jobs: # Single source of the release-gate decision, publish or not and stable or not, reused by every job below. plan: name: Plan release job - uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 + uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 with: event_name: ${{ github.event_name }} actor: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: name: Validate job needs: [plan] if: ${{ needs.plan.outputs.publish == 'true' }} - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} permissions: @@ -67,7 +67,7 @@ jobs: name: Publish project release job needs: [plan, validate] if: ${{ needs.plan.outputs.publish == 'true' && needs.validate.result == 'success' }} - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 permissions: contents: write actions: write diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index 88fc3db..b0ba18b 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -22,7 +22,7 @@ jobs: run-codegen: name: Run codegen and pull request job - uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 + uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 secrets: CODEGEN_APP_CLIENT_ID: ${{ secrets.CODEGEN_APP_CLIENT_ID }} CODEGEN_APP_PRIVATE_KEY: ${{ secrets.CODEGEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 5103487..d08521a 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -58,7 +58,7 @@ jobs: validate: name: Validate job - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 permissions: contents: read # Mapped explicitly rather than inherited, since this is a cross-repository call and secrets: inherit would hand the callee every secret this repository holds. @@ -75,7 +75,7 @@ jobs: name: Smoke build job needs: [changes] if: needs.changes.outputs.release == 'true' || github.event_name == 'workflow_dispatch' - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@900039a58e809975815367938f81c46432ded281 # 2.0.1483 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 permissions: contents: read with: From dcfd09913e65ad20821ca894a8543a677dfb2a17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2026 02:46:24 +0000 Subject: [PATCH 10/25] Bump the nuget-deps group with 1 update (#524) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated [ptr727.Utilities](https://github.com/ptr727/Utilities) from 4.1.128 to 4.1.131.
Release notes _Sourced from [ptr727.Utilities's releases](https://github.com/ptr727/Utilities/releases)._ ## 4.1.131 ## What's Changed * Bump the actions-deps group with 4 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/609 * Bump the nuget-deps group with 2 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/610 **Full Changelog**: https://github.com/ptr727/Utilities/compare/4.1.128...4.1.131 Commits viewable in [compare view](https://github.com/ptr727/Utilities/compare/4.1.128...4.1.131).
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ptr727.Utilities&package-manager=nuget&previous-version=4.1.128&new-version=4.1.131)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index aaf0877..32ad08c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - + From 4f9dee455489e392e1abf9f9a2f1e0757547ca99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2026 02:47:35 +0000 Subject: [PATCH 11/25] Bump the actions-deps group across 1 directory with 5 updates (#526) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the actions-deps group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1509` | `2.0.1521` | | [ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1509` | `2.0.1521` | | [ptr727/ProjectTemplate/.github/workflows/validate-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1509` | `2.0.1521` | | [ptr727/ProjectTemplate/.github/workflows/build-release-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1509` | `2.0.1521` | | [ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1509` | `2.0.1521` | Updates `ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml` from 2.0.1509 to 2.0.1521
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml's releases.

2.0.1521

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1509...2.0.1521

Commits
  • df0ddfd Promote Develop to Main: Standup Ordering, Signal Handling, Merge Hold, and H...
  • 0d399c3 Hold the Registration Grace on an Unread Start, a Re-Pushed Head, and an On-O...
  • 3df20a8 Identify the Re-Arm's Head Pusher From the Branch Activity (#4319)
  • f31ec3c Name the Working Directory per Kind of Standup Step (#4318)
  • 6ff3460 Rank Prereleases Below Stable, Report Interrupt Cleanup Failure, Keep Cached ...
  • 138523a Report Each Caller's Hub Pin Behind the Newest Release, as Drift Past a 30-Da...
  • 0b06540 Watch the Merge Bot's Auto-Merge and Re-Arm a Disable GitHub Makes (#4310)
  • 7420fe3 Count Untracked Files in the Dirty Stamp, State the Session Tree Bound (#4311)
  • 54ca095 Forbid State-Changing Probes and Route Observed Secrets to Revocation (#4304)
  • 5e5fbb5 Read the Branch Before the Tree So an Empty Root Commit Resolves Its Secrets ...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml` from 2.0.1509 to 2.0.1521
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml's releases.

2.0.1521

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1509...2.0.1521

Commits
  • df0ddfd Promote Develop to Main: Standup Ordering, Signal Handling, Merge Hold, and H...
  • 0d399c3 Hold the Registration Grace on an Unread Start, a Re-Pushed Head, and an On-O...
  • 3df20a8 Identify the Re-Arm's Head Pusher From the Branch Activity (#4319)
  • f31ec3c Name the Working Directory per Kind of Standup Step (#4318)
  • 6ff3460 Rank Prereleases Below Stable, Report Interrupt Cleanup Failure, Keep Cached ...
  • 138523a Report Each Caller's Hub Pin Behind the Newest Release, as Drift Past a 30-Da...
  • 0b06540 Watch the Merge Bot's Auto-Merge and Re-Arm a Disable GitHub Makes (#4310)
  • 7420fe3 Count Untracked Files in the Dirty Stamp, State the Session Tree Bound (#4311)
  • 54ca095 Forbid State-Changing Probes and Route Observed Secrets to Revocation (#4304)
  • 5e5fbb5 Read the Branch Before the Tree So an Empty Root Commit Resolves Its Secrets ...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/validate-task.yml` from 2.0.1509 to 2.0.1521
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/validate-task.yml's releases.

2.0.1521

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1509...2.0.1521

Commits
  • df0ddfd Promote Develop to Main: Standup Ordering, Signal Handling, Merge Hold, and H...
  • 0d399c3 Hold the Registration Grace on an Unread Start, a Re-Pushed Head, and an On-O...
  • 3df20a8 Identify the Re-Arm's Head Pusher From the Branch Activity (#4319)
  • f31ec3c Name the Working Directory per Kind of Standup Step (#4318)
  • 6ff3460 Rank Prereleases Below Stable, Report Interrupt Cleanup Failure, Keep Cached ...
  • 138523a Report Each Caller's Hub Pin Behind the Newest Release, as Drift Past a 30-Da...
  • 0b06540 Watch the Merge Bot's Auto-Merge and Re-Arm a Disable GitHub Makes (#4310)
  • 7420fe3 Count Untracked Files in the Dirty Stamp, State the Session Tree Bound (#4311)
  • 54ca095 Forbid State-Changing Probes and Route Observed Secrets to Revocation (#4304)
  • 5e5fbb5 Read the Branch Before the Tree So an Empty Root Commit Resolves Its Secrets ...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/build-release-task.yml` from 2.0.1509 to 2.0.1521
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/build-release-task.yml's releases.

2.0.1521

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1509...2.0.1521

Commits
  • df0ddfd Promote Develop to Main: Standup Ordering, Signal Handling, Merge Hold, and H...
  • 0d399c3 Hold the Registration Grace on an Unread Start, a Re-Pushed Head, and an On-O...
  • 3df20a8 Identify the Re-Arm's Head Pusher From the Branch Activity (#4319)
  • f31ec3c Name the Working Directory per Kind of Standup Step (#4318)
  • 6ff3460 Rank Prereleases Below Stable, Report Interrupt Cleanup Failure, Keep Cached ...
  • 138523a Report Each Caller's Hub Pin Behind the Newest Release, as Drift Past a 30-Da...
  • 0b06540 Watch the Merge Bot's Auto-Merge and Re-Arm a Disable GitHub Makes (#4310)
  • 7420fe3 Count Untracked Files in the Dirty Stamp, State the Session Tree Bound (#4311)
  • 54ca095 Forbid State-Changing Probes and Route Observed Secrets to Revocation (#4304)
  • 5e5fbb5 Read the Branch Before the Tree So an Empty Root Commit Resolves Its Secrets ...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml` from 2.0.1509 to 2.0.1521
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml's releases.

2.0.1521

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1509...2.0.1521

Commits
  • df0ddfd Promote Develop to Main: Standup Ordering, Signal Handling, Merge Hold, and H...
  • 0d399c3 Hold the Registration Grace on an Unread Start, a Re-Pushed Head, and an On-O...
  • 3df20a8 Identify the Re-Arm's Head Pusher From the Branch Activity (#4319)
  • f31ec3c Name the Working Directory per Kind of Standup Step (#4318)
  • 6ff3460 Rank Prereleases Below Stable, Report Interrupt Cleanup Failure, Keep Cached ...
  • 138523a Report Each Caller's Hub Pin Behind the Newest Release, as Drift Past a 30-Da...
  • 0b06540 Watch the Merge Bot's Auto-Merge and Re-Arm a Disable GitHub Makes (#4310)
  • 7420fe3 Count Untracked Files in the Dirty Stamp, State the Session Tree Bound (#4311)
  • 54ca095 Forbid State-Changing Probes and Route Observed Secrets to Revocation (#4304)
  • 5e5fbb5 Read the Branch Before the Tree So an Empty Root Commit Resolves Its Secrets ...
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/run-periodic-codegen-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index cebbed7..42bd274 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -18,7 +18,7 @@ jobs: merge-bot: name: Merge bot pull request job - uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 + uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 # The repository-wide auto-delete stays off, so the task deletes each merged bot head branch instead. with: delete-branch: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 098e399..32fa7a7 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,7 +41,7 @@ jobs: # Single source of the release-gate decision, publish or not and stable or not, reused by every job below. plan: name: Plan release job - uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 + uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 with: event_name: ${{ github.event_name }} actor: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: name: Validate job needs: [plan] if: ${{ needs.plan.outputs.publish == 'true' }} - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} permissions: @@ -67,7 +67,7 @@ jobs: name: Publish project release job needs: [plan, validate] if: ${{ needs.plan.outputs.publish == 'true' && needs.validate.result == 'success' }} - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 permissions: contents: write actions: write diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index b0ba18b..4e6b6b4 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -22,7 +22,7 @@ jobs: run-codegen: name: Run codegen and pull request job - uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 + uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 secrets: CODEGEN_APP_CLIENT_ID: ${{ secrets.CODEGEN_APP_CLIENT_ID }} CODEGEN_APP_PRIVATE_KEY: ${{ secrets.CODEGEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index d08521a..04e165b 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -58,7 +58,7 @@ jobs: validate: name: Validate job - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 permissions: contents: read # Mapped explicitly rather than inherited, since this is a cross-repository call and secrets: inherit would hand the callee every secret this repository holds. @@ -75,7 +75,7 @@ jobs: name: Smoke build job needs: [changes] if: needs.changes.outputs.release == 'true' || github.event_name == 'workflow_dispatch' - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@d42ad0e095e93845521f4c47653fec8c992089d6 # 2.0.1509 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 permissions: contents: read with: From 8fed822a10e3d98b60784a7c6b5c6f90b635bfc1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Nov 2026 02:47:21 +0000 Subject: [PATCH 12/25] Bump the actions-deps group across 1 directory with 5 updates (#528) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the actions-deps group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1521` | `2.0.1538` | | [ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1521` | `2.0.1538` | | [ptr727/ProjectTemplate/.github/workflows/validate-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1521` | `2.0.1538` | | [ptr727/ProjectTemplate/.github/workflows/build-release-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1521` | `2.0.1538` | | [ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1521` | `2.0.1538` | Updates `ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml` from 2.0.1521 to 2.0.1538
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml's releases.

2.0.1538

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1528...2.0.1538

2.0.1528

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1521...2.0.1528

Commits
  • 9296e25 Promote Develop to Main: Atomic Kit Writes, Section Pins, Promotion Local Cov...
  • 01d88d6 Check the Merge Scan Status and Mask Only Before a Dotted Sibling (#4344)
  • 4581d0d Fix Encoding Gate Order, Installer Self-Test UTF-8, Signal Window, and Doc Fi...
  • 6c9aadf Pass PYTHONIOENCODING to Every Python Child a Test Decodes as UTF-8 (#4341)
  • 97fa314 Rebase or Append Where an Upstream Rejects Merges or Rewrites (#4339)
  • 55d4740 Let an Attested Pass Cover a Main Head With No Copilot Table (#4340)
  • c5d952e Pin the Governance Sections the Host CLAUDE.md Blocks Mirror (#4338)
  • ceeb78b Write Kit Files Atomically Through a Temporary File Beside Each Target (#4336)
  • 225c9fc Probe Each Python Candidate in install.ps1 and Bound the Profile Mask (#4335)
  • 3d21cda Correct the Reviewer Reference on CodeRabbit in Private Repositories (#4337)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml` from 2.0.1521 to 2.0.1538
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml's releases.

2.0.1538

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1528...2.0.1538

2.0.1528

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1521...2.0.1528

Commits
  • 9296e25 Promote Develop to Main: Atomic Kit Writes, Section Pins, Promotion Local Cov...
  • 01d88d6 Check the Merge Scan Status and Mask Only Before a Dotted Sibling (#4344)
  • 4581d0d Fix Encoding Gate Order, Installer Self-Test UTF-8, Signal Window, and Doc Fi...
  • 6c9aadf Pass PYTHONIOENCODING to Every Python Child a Test Decodes as UTF-8 (#4341)
  • 97fa314 Rebase or Append Where an Upstream Rejects Merges or Rewrites (#4339)
  • 55d4740 Let an Attested Pass Cover a Main Head With No Copilot Table (#4340)
  • c5d952e Pin the Governance Sections the Host CLAUDE.md Blocks Mirror (#4338)
  • ceeb78b Write Kit Files Atomically Through a Temporary File Beside Each Target (#4336)
  • 225c9fc Probe Each Python Candidate in install.ps1 and Bound the Profile Mask (#4335)
  • 3d21cda Correct the Reviewer Reference on CodeRabbit in Private Repositories (#4337)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/validate-task.yml` from 2.0.1521 to 2.0.1538
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/validate-task.yml's releases.

2.0.1538

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1528...2.0.1538

2.0.1528

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1521...2.0.1528

Commits
  • 9296e25 Promote Develop to Main: Atomic Kit Writes, Section Pins, Promotion Local Cov...
  • 01d88d6 Check the Merge Scan Status and Mask Only Before a Dotted Sibling (#4344)
  • 4581d0d Fix Encoding Gate Order, Installer Self-Test UTF-8, Signal Window, and Doc Fi...
  • 6c9aadf Pass PYTHONIOENCODING to Every Python Child a Test Decodes as UTF-8 (#4341)
  • 97fa314 Rebase or Append Where an Upstream Rejects Merges or Rewrites (#4339)
  • 55d4740 Let an Attested Pass Cover a Main Head With No Copilot Table (#4340)
  • c5d952e Pin the Governance Sections the Host CLAUDE.md Blocks Mirror (#4338)
  • ceeb78b Write Kit Files Atomically Through a Temporary File Beside Each Target (#4336)
  • 225c9fc Probe Each Python Candidate in install.ps1 and Bound the Profile Mask (#4335)
  • 3d21cda Correct the Reviewer Reference on CodeRabbit in Private Repositories (#4337)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/build-release-task.yml` from 2.0.1521 to 2.0.1538
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/build-release-task.yml's releases.

2.0.1538

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1528...2.0.1538

2.0.1528

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1521...2.0.1528

Commits
  • 9296e25 Promote Develop to Main: Atomic Kit Writes, Section Pins, Promotion Local Cov...
  • 01d88d6 Check the Merge Scan Status and Mask Only Before a Dotted Sibling (#4344)
  • 4581d0d Fix Encoding Gate Order, Installer Self-Test UTF-8, Signal Window, and Doc Fi...
  • 6c9aadf Pass PYTHONIOENCODING to Every Python Child a Test Decodes as UTF-8 (#4341)
  • 97fa314 Rebase or Append Where an Upstream Rejects Merges or Rewrites (#4339)
  • 55d4740 Let an Attested Pass Cover a Main Head With No Copilot Table (#4340)
  • c5d952e Pin the Governance Sections the Host CLAUDE.md Blocks Mirror (#4338)
  • ceeb78b Write Kit Files Atomically Through a Temporary File Beside Each Target (#4336)
  • 225c9fc Probe Each Python Candidate in install.ps1 and Bound the Profile Mask (#4335)
  • 3d21cda Correct the Reviewer Reference on CodeRabbit in Private Repositories (#4337)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml` from 2.0.1521 to 2.0.1538
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml's releases.

2.0.1538

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1528...2.0.1538

2.0.1528

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1521...2.0.1528

Commits
  • 9296e25 Promote Develop to Main: Atomic Kit Writes, Section Pins, Promotion Local Cov...
  • 01d88d6 Check the Merge Scan Status and Mask Only Before a Dotted Sibling (#4344)
  • 4581d0d Fix Encoding Gate Order, Installer Self-Test UTF-8, Signal Window, and Doc Fi...
  • 6c9aadf Pass PYTHONIOENCODING to Every Python Child a Test Decodes as UTF-8 (#4341)
  • 97fa314 Rebase or Append Where an Upstream Rejects Merges or Rewrites (#4339)
  • 55d4740 Let an Attested Pass Cover a Main Head With No Copilot Table (#4340)
  • c5d952e Pin the Governance Sections the Host CLAUDE.md Blocks Mirror (#4338)
  • ceeb78b Write Kit Files Atomically Through a Temporary File Beside Each Target (#4336)
  • 225c9fc Probe Each Python Candidate in install.ps1 and Bound the Profile Mask (#4335)
  • 3d21cda Correct the Reviewer Reference on CodeRabbit in Private Repositories (#4337)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/run-periodic-codegen-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 42bd274..0fd6daa 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -18,7 +18,7 @@ jobs: merge-bot: name: Merge bot pull request job - uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 + uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 # The repository-wide auto-delete stays off, so the task deletes each merged bot head branch instead. with: delete-branch: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 32fa7a7..ad2027f 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,7 +41,7 @@ jobs: # Single source of the release-gate decision, publish or not and stable or not, reused by every job below. plan: name: Plan release job - uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 + uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 with: event_name: ${{ github.event_name }} actor: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: name: Validate job needs: [plan] if: ${{ needs.plan.outputs.publish == 'true' }} - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} permissions: @@ -67,7 +67,7 @@ jobs: name: Publish project release job needs: [plan, validate] if: ${{ needs.plan.outputs.publish == 'true' && needs.validate.result == 'success' }} - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 permissions: contents: write actions: write diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index 4e6b6b4..f6fd03f 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -22,7 +22,7 @@ jobs: run-codegen: name: Run codegen and pull request job - uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 + uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 secrets: CODEGEN_APP_CLIENT_ID: ${{ secrets.CODEGEN_APP_CLIENT_ID }} CODEGEN_APP_PRIVATE_KEY: ${{ secrets.CODEGEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 04e165b..a027ae5 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -58,7 +58,7 @@ jobs: validate: name: Validate job - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 permissions: contents: read # Mapped explicitly rather than inherited, since this is a cross-repository call and secrets: inherit would hand the callee every secret this repository holds. @@ -75,7 +75,7 @@ jobs: name: Smoke build job needs: [changes] if: needs.changes.outputs.release == 'true' || github.event_name == 'workflow_dispatch' - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@df0ddfde9ed4b80a0d197e8b83a0f9541cf7e842 # 2.0.1521 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 permissions: contents: read with: From 2c7fc0baa5622fb7a133645740053fee0116ef39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Nov 2026 02:46:54 +0000 Subject: [PATCH 13/25] Bump the actions-deps group across 1 directory with 5 updates (#530) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the actions-deps group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1538` | `2.0.1558` | | [ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1538` | `2.0.1558` | | [ptr727/ProjectTemplate/.github/workflows/validate-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1538` | `2.0.1558` | | [ptr727/ProjectTemplate/.github/workflows/build-release-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1538` | `2.0.1558` | | [ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1538` | `2.0.1558` | Updates `ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml` from 2.0.1538 to 2.0.1558
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml's releases.

2.0.1558

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1538...2.0.1558

Commits
  • 8ef8e96 Promote Develop to Main: Interaction Policy, Exec-Form Hooks, Paste-Safe Comm...
  • 3374a90 Merge develop into promote/develop-to-main
  • 72631ae Show One Quoted Argument per Action File and Note the Convention Layout in Cl...
  • 287ce7d Merge develop into the promotion branch
  • c67e9ef Resolve Promotion Review Findings on Paths, Pilot Limit, and Coverage (#4371)
  • c2fca38 Fix the Ungrammatical Phrase Describing the Host's Own Shell-Form Hook (#4369)
  • dedad9e Merge develop into main
  • a6894ed Read an Exec-Form Hook's Arguments as a Script or Shell Code Only Under an In...
  • 5f0ed05 Accept an Empty Interaction-Limits Body and Align the Promotion Findings' Doc...
  • fd02165 Read a Regex Operand and a Quoted Assignment Correctly in the paste-safe Rule...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml` from 2.0.1538 to 2.0.1558
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml's releases.

2.0.1558

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1538...2.0.1558

Commits
  • 8ef8e96 Promote Develop to Main: Interaction Policy, Exec-Form Hooks, Paste-Safe Comm...
  • 3374a90 Merge develop into promote/develop-to-main
  • 72631ae Show One Quoted Argument per Action File and Note the Convention Layout in Cl...
  • 287ce7d Merge develop into the promotion branch
  • c67e9ef Resolve Promotion Review Findings on Paths, Pilot Limit, and Coverage (#4371)
  • c2fca38 Fix the Ungrammatical Phrase Describing the Host's Own Shell-Form Hook (#4369)
  • dedad9e Merge develop into main
  • a6894ed Read an Exec-Form Hook's Arguments as a Script or Shell Code Only Under an In...
  • 5f0ed05 Accept an Empty Interaction-Limits Body and Align the Promotion Findings' Doc...
  • fd02165 Read a Regex Operand and a Quoted Assignment Correctly in the paste-safe Rule...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/validate-task.yml` from 2.0.1538 to 2.0.1558
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/validate-task.yml's releases.

2.0.1558

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1538...2.0.1558

Commits
  • 8ef8e96 Promote Develop to Main: Interaction Policy, Exec-Form Hooks, Paste-Safe Comm...
  • 3374a90 Merge develop into promote/develop-to-main
  • 72631ae Show One Quoted Argument per Action File and Note the Convention Layout in Cl...
  • 287ce7d Merge develop into the promotion branch
  • c67e9ef Resolve Promotion Review Findings on Paths, Pilot Limit, and Coverage (#4371)
  • c2fca38 Fix the Ungrammatical Phrase Describing the Host's Own Shell-Form Hook (#4369)
  • dedad9e Merge develop into main
  • a6894ed Read an Exec-Form Hook's Arguments as a Script or Shell Code Only Under an In...
  • 5f0ed05 Accept an Empty Interaction-Limits Body and Align the Promotion Findings' Doc...
  • fd02165 Read a Regex Operand and a Quoted Assignment Correctly in the paste-safe Rule...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/build-release-task.yml` from 2.0.1538 to 2.0.1558
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/build-release-task.yml's releases.

2.0.1558

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1538...2.0.1558

Commits
  • 8ef8e96 Promote Develop to Main: Interaction Policy, Exec-Form Hooks, Paste-Safe Comm...
  • 3374a90 Merge develop into promote/develop-to-main
  • 72631ae Show One Quoted Argument per Action File and Note the Convention Layout in Cl...
  • 287ce7d Merge develop into the promotion branch
  • c67e9ef Resolve Promotion Review Findings on Paths, Pilot Limit, and Coverage (#4371)
  • c2fca38 Fix the Ungrammatical Phrase Describing the Host's Own Shell-Form Hook (#4369)
  • dedad9e Merge develop into main
  • a6894ed Read an Exec-Form Hook's Arguments as a Script or Shell Code Only Under an In...
  • 5f0ed05 Accept an Empty Interaction-Limits Body and Align the Promotion Findings' Doc...
  • fd02165 Read a Regex Operand and a Quoted Assignment Correctly in the paste-safe Rule...
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml` from 2.0.1538 to 2.0.1558
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml's releases.

2.0.1558

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1538...2.0.1558

Commits
  • 8ef8e96 Promote Develop to Main: Interaction Policy, Exec-Form Hooks, Paste-Safe Comm...
  • 3374a90 Merge develop into promote/develop-to-main
  • 72631ae Show One Quoted Argument per Action File and Note the Convention Layout in Cl...
  • 287ce7d Merge develop into the promotion branch
  • c67e9ef Resolve Promotion Review Findings on Paths, Pilot Limit, and Coverage (#4371)
  • c2fca38 Fix the Ungrammatical Phrase Describing the Host's Own Shell-Form Hook (#4369)
  • dedad9e Merge develop into main
  • a6894ed Read an Exec-Form Hook's Arguments as a Script or Shell Code Only Under an In...
  • 5f0ed05 Accept an Empty Interaction-Limits Body and Align the Promotion Findings' Doc...
  • fd02165 Read a Regex Operand and a Quoted Assignment Correctly in the paste-safe Rule...
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/run-periodic-codegen-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 0fd6daa..6263adb 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -18,7 +18,7 @@ jobs: merge-bot: name: Merge bot pull request job - uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 + uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 # The repository-wide auto-delete stays off, so the task deletes each merged bot head branch instead. with: delete-branch: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index ad2027f..f160e47 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,7 +41,7 @@ jobs: # Single source of the release-gate decision, publish or not and stable or not, reused by every job below. plan: name: Plan release job - uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 + uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 with: event_name: ${{ github.event_name }} actor: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: name: Validate job needs: [plan] if: ${{ needs.plan.outputs.publish == 'true' }} - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} permissions: @@ -67,7 +67,7 @@ jobs: name: Publish project release job needs: [plan, validate] if: ${{ needs.plan.outputs.publish == 'true' && needs.validate.result == 'success' }} - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 permissions: contents: write actions: write diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index f6fd03f..5091ad2 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -22,7 +22,7 @@ jobs: run-codegen: name: Run codegen and pull request job - uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 + uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 secrets: CODEGEN_APP_CLIENT_ID: ${{ secrets.CODEGEN_APP_CLIENT_ID }} CODEGEN_APP_PRIVATE_KEY: ${{ secrets.CODEGEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index a027ae5..9ee8f28 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -58,7 +58,7 @@ jobs: validate: name: Validate job - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 permissions: contents: read # Mapped explicitly rather than inherited, since this is a cross-repository call and secrets: inherit would hand the callee every secret this repository holds. @@ -75,7 +75,7 @@ jobs: name: Smoke build job needs: [changes] if: needs.changes.outputs.release == 'true' || github.event_name == 'workflow_dispatch' - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@9296e2502d57d1cc7550594e14cbca1587b723a5 # 2.0.1538 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 permissions: contents: read with: From 9fd2f7ea26e29f67f8146a6003a25d64a1663063 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 29 Nov 2026 11:42:27 -0800 Subject: [PATCH 14/25] Regenerate the Table of Contents and Place Its Omit Markers (#531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the omit-from-toc marker to the H1, the headings above the TOC, and the TOC heading itself in README.md, and regenerates the list (removes the six stale entries for the omitted headings). This is the output of the hub's scripts/toc_lint.py --fix (hub develop 1898b55d); no other lines changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- README.md | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index dbf4728..b62ae53 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,25 @@ -# LanguageTags +# LanguageTags C# .NET library for ISO 639-2, ISO 639-3, RFC 5646 / BCP 47 language tags. -## Build and Distribution +## Build and Distribution - **Source Code**: [GitHub][github-link] - Source code, issues, discussions, and CI/CD pipelines. - **Versioned Releases**: [GitHub Releases][releases-link] - Version tagged source code and build artifacts. - **NuGet Packages** [NuGet Packages][nuget-link] - .NET libraries published to NuGet.org. -### Build Status +### Build Status [![Release Status][releasebuildstatus-shield]][actions-link]\ [![Last Commit][lastcommit-shield]][commits-link] -### Releases +### Releases [![GitHub Release][releaseversion-shield]][releases-link]\ [![GitHub Pre-Release][prereleaseversion-shield]][releases-link]\ [![NuGet Release][nugetreleaseversion-shield]][nuget-link] -### Release Notes +### Release Notes **Version: 1.5**: @@ -32,7 +32,7 @@ C# .NET library for ISO 639-2, ISO 639-3, RFC 5646 / BCP 47 language tags. See [Release History][history] for complete release notes and older versions. -## Getting Started +## Getting Started Get started with LanguageTags in two easy steps: @@ -66,14 +66,8 @@ Get started with LanguageTags in two easy steps: See [Usage][usage] for detailed usage instructions. -## Table of Contents +## Table of Contents -- [Build and Distribution](#build-and-distribution) - - [Build Status](#build-status) - - [Releases](#releases) - - [Release Notes](#release-notes) -- [Getting Started](#getting-started) -- [Table of Contents](#table-of-contents) - [Overview](#overview) - [Installation](#installation) - [Usage](#usage) From 4c31bdd46173c7a9db52ece09eb4d1e03d9f1c3a Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 29 Nov 2026 12:47:34 -0800 Subject: [PATCH 15/25] Convert 3rd Party Tools to the Fleet Bullet List (#532) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Converts the README "3rd Party Tools" section to the fleet bullet list standard. Added: actionlint, Codecov, CodeRabbit, GitHub CLI, GitHub Copilot, Qodo, Microsoft.Extensions.Logging.Abstractions, Microsoft.Testing.Platform, NuGet Login, Paths Filter, System.CommandLine, uv, and the ISO 639-2, ISO 639-3, RFC 5646, and UN M.49 standards the library implements. Removed: Create Pull Request and GH Release, which only the hub-hosted workflows use. Added the Qodo word to cspell.json. Local strict review: three passes recorded, the last at the final head. Declined findings, with the fleet ruling as evidence: Microsoft.CodeAnalysis.CSharp (analyzer package family excluded by R3), ptr727.Utilities (fleet-owned, R4), ISO 3166-1 and ISO 15924 (the code does not validate against those code lists). Nerdbank.GitVersioning stays because the repo carries its version.json configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 --- README.md | 34 ++++++++++++++++++++++++++++++---- cspell.json | 1 + 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b62ae53..b21c381 100644 --- a/README.md +++ b/README.md @@ -548,19 +548,33 @@ isValid = languageTag.IsValid; // true The third-party tools, libraries, and actions this project depends on. +- [actionlint][actionlint-link]: GitHub Actions workflow linter. - [AwesomeAssertions][awesomeassertions-link]: Assertion library for .NET tests. -- [Create Pull Request][createpr-link]: GitHub action that opens a pull request from workspace changes. +- [Codecov][codecov-link]: Coverage reporting service. +- [CodeRabbit][coderabbit-link]: AI code review service. - [CSharpier][csharpier-link]: C# code formatter. - [cspell][cspell-link]: Spell checker. - [dotnet-outdated][dotnetoutdated-link]: Outdated NuGet dependency reporter. - [editorconfig-checker][editorconfigchecker-link]: Line-ending and whitespace linter. -- [GH Release][ghrelease-link]: GitHub action that creates a release. - [GitHub Actions][ghactions-link]: CI and automation runner. +- [GitHub CLI][ghcli-link]: Command-line client for GitHub. +- [GitHub Copilot][ghcopilot-link]: AI coding assistant and code reviewer. - [GitHub Dependabot][ghdependabot-link]: Dependency update bot. - [Husky.Net][huskynet-link]: Git hook manager for .NET. +- [ISO 639-2 language tags][iso6392langhome-link]: Language code standard. +- [ISO 639-3 language tags][iso6393-link]: Language code standard. - [markdownlint-cli2][markdownlintcli2-link]: Markdown linter. +- [Microsoft.Extensions.Logging.Abstractions][mslogging-link]: Logging abstractions for .NET. +- [Microsoft.Testing.Platform][mstestingplatform-link]: Test runner and extension host for .NET. - [Nerdbank.GitVersioning][nerbankgitversion-link]: Version computation from git height. +- [NuGet Login][nugetlogin-link]: GitHub action that exchanges a workflow identity token for a short-lived NuGet API key. +- [Paths Filter][pathsfilter-link]: GitHub action that filters jobs by changed paths. +- [Qodo][qodo-link]: AI code review service. +- [RFC 5646 language tags][rfc5646html-link]: Language tag standard. - [Serilog][serilog-link]: Structured logging library for .NET. +- [System.CommandLine][systemcommandline-link]: Command-line parsing library for .NET. +- [UN M.49 region codes][unm49-link]: Region code standard. +- [uv][uv-link]: Python package and project manager. - [xUnit.Net][xunit-link]: Test framework for .NET. ## License @@ -625,25 +639,29 @@ Licensed under the [MIT License][license]\ [acceptlanguage-link]: https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language +[actionlint-link]: https://github.com/rhysd/actionlint [awesomeassertions-link]: https://awesomeassertions.org/ [bcp47-link]: https://www.rfc-editor.org/info/bcp47 [cldr-link]: https://cldr.unicode.org/ +[codecov-link]: https://about.codecov.io/ +[coderabbit-link]: https://www.coderabbit.ai/ [contentlanguage-link]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-language -[createpr-link]: https://github.com/marketplace/actions/create-pull-request [csharpier-link]: https://csharpier.com/ [cspell-link]: https://cspell.org [dansmithlanguagetagssharp-link]: https://github.com/DanSmith/languagetags-sharp [dotnetoutdated-link]: https://github.com/dotnet-outdated/dotnet-outdated [editorconfigchecker-link]: https://github.com/editorconfig-checker/editorconfig-checker [ghactions-link]: https://github.com/actions +[ghcli-link]: https://cli.github.com/ +[ghcopilot-link]: https://github.com/features/copilot [ghdependabot-link]: https://github.com/dependabot -[ghrelease-link]: https://github.com/marketplace/actions/gh-release [huskynet-link]: https://alirezanet.github.io/Husky.Net/ [ianatags-link]: https://www.iana.org/assignments/language-subtags-tags-extensions/language-subtags-tags-extensions.xhtml [ietflanguagetag-link]: https://en.wikipedia.org/wiki/IETF_language_tag [iso15924-link]: https://unicode.org/iso15924/iso15924-codes.html [iso31661-link]: https://en.wikipedia.org/wiki/ISO_3166-1 [iso6392-link]: https://www.loc.gov/standards/iso639-2/ +[iso6392langhome-link]: https://www.loc.gov/standards/iso639-2/langhome.html [iso6392source-link]: https://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt [iso6393-link]: https://iso639-3.sil.org/ [iso6393source-link]: https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab @@ -651,12 +669,18 @@ Licensed under the [MIT License][license]\ [markdownlintcli2-link]: https://github.com/DavidAnson/markdownlint-cli2 [matroskalanguage-link]: https://datatracker.ietf.org/doc/html/draft-ietf-cellar-matroska-07#name-language-codes [mattcglanguagesubtagregistry-link]: https://github.com/mattcg/language-subtag-registry +[mslogging-link]: https://learn.microsoft.com/dotnet/core/extensions/logging +[mstestingplatform-link]: https://learn.microsoft.com/dotnet/core/testing/microsoft-testing-platform-intro [nerbankgitversion-link]: https://github.com/dotnet/Nerdbank.GitVersioning +[nugetlogin-link]: https://github.com/NuGet/login [oxigraphoxilangtag-link]: https://github.com/oxigraph/oxilangtag +[pathsfilter-link]: https://github.com/dorny/paths-filter [pyfischrustlanguagetags-link]: https://github.com/pyfisch/rust-language-tags/ +[qodo-link]: https://www.qodo.ai/ [r12asubtags-link]: https://r12a.github.io/app-subtags/ [rfc4647-link]: https://www.rfc-editor.org/info/rfc4647 [rfc5646-link]: https://www.rfc-editor.org/info/rfc5646 +[rfc5646html-link]: https://www.rfc-editor.org/rfc/rfc5646.html [rfc5646section21-link]: https://www.rfc-editor.org/rfc/rfc5646#section-2.1 [rfc5646section221-link]: https://www.rfc-editor.org/rfc/rfc5646#section-2.2.1 [rfc5646section222-link]: https://www.rfc-editor.org/rfc/rfc5646#section-2.2.2 @@ -671,8 +695,10 @@ Licensed under the [MIT License][license]\ [rfc5646source-link]: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry [rspeerlangcodes-link]: https://github.com/rspeer/langcodes [serilog-link]: https://serilog.net/ +[systemcommandline-link]: https://github.com/dotnet/command-line-api [unm49-link]: https://unstats.un.org/unsd/methodology/m49/ [unm49source-link]: https://raw.githubusercontent.com/unicode-org/cldr/main/common/supplemental/supplementalData.xml +[uv-link]: https://docs.astral.sh/uv/ [w3cchoosingtag-link]: https://www.w3.org/International/questions/qa-choosing-language-tags [w3ctags-link]: https://www.w3.org/International/articles/language-tags/ [wikipediacodes-link]: https://en.wikipedia.org/wiki/Codes_for_constructed_languages diff --git a/cspell.json b/cspell.json index bbc37bd..bc32b53 100644 --- a/cspell.json +++ b/cspell.json @@ -59,6 +59,7 @@ "pyfisch", "Qaaa", "Qabx", + "Qodo", "reimplementation", "reparsed", "rhysd", From e65a2e0c38ee0d1e3873b176cd7365d4d4a81a72 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 29 Nov 2026 14:24:47 -0800 Subject: [PATCH 16/25] Align NuGet Login With the Fleet Catalog Wording (#533) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewords the NuGet Login entry in the 3rd Party Tools list to the fleet catalog description and renames its reference definition to `nuget-login-link`. The wording comes from hub PR #4575, which adds it to the shared catalog. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 5.5 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b21c381..b3dffa1 100644 --- a/README.md +++ b/README.md @@ -567,7 +567,7 @@ The third-party tools, libraries, and actions this project depends on. - [Microsoft.Extensions.Logging.Abstractions][mslogging-link]: Logging abstractions for .NET. - [Microsoft.Testing.Platform][mstestingplatform-link]: Test runner and extension host for .NET. - [Nerdbank.GitVersioning][nerbankgitversion-link]: Version computation from git height. -- [NuGet Login][nugetlogin-link]: GitHub action that exchanges a workflow identity token for a short-lived NuGet API key. +- [NuGet Login][nuget-login-link]: GitHub action that exchanges an OIDC token for a short-lived NuGet API key. - [Paths Filter][pathsfilter-link]: GitHub action that filters jobs by changed paths. - [Qodo][qodo-link]: AI code review service. - [RFC 5646 language tags][rfc5646html-link]: Language tag standard. @@ -672,7 +672,7 @@ Licensed under the [MIT License][license]\ [mslogging-link]: https://learn.microsoft.com/dotnet/core/extensions/logging [mstestingplatform-link]: https://learn.microsoft.com/dotnet/core/testing/microsoft-testing-platform-intro [nerbankgitversion-link]: https://github.com/dotnet/Nerdbank.GitVersioning -[nugetlogin-link]: https://github.com/NuGet/login +[nuget-login-link]: https://github.com/NuGet/login [oxigraphoxilangtag-link]: https://github.com/oxigraph/oxilangtag [pathsfilter-link]: https://github.com/dorny/paths-filter [pyfischrustlanguagetags-link]: https://github.com/pyfisch/rust-language-tags/ From 10327616bc0d6a373c009d95a1d8dbf6f0cd71ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2026 02:46:57 +0000 Subject: [PATCH 17/25] Bump the nuget-deps group with 1 update (#534) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated [Serilog](https://github.com/serilog/serilog) from 4.4.0 to 4.4.1.
Release notes _Sourced from [Serilog's releases](https://github.com/serilog/serilog/releases)._ ## 4.4.1 https://www.nuget.org/packages/Serilog/4.4.1 * #​2251 - record batch transmission latency (@​dualfroz) * #​2247 - avoid overflow on `int.MinValue` widths in message templates (@​vkuropatka) * #​2252 - bump `System.Security.Cryptography.Xml` (dependabot) Commits viewable in [compare view](https://github.com/serilog/serilog/compare/v4.4.0...Serilog/v4.4.1).
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Serilog&package-manager=nuget&previous-version=4.4.0&new-version=4.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 32ad08c..66bfff4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -15,7 +15,7 @@ - + From b9a2f74d9dcb590b9c178159c9f954163210fb12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2026 02:47:05 +0000 Subject: [PATCH 18/25] Bump csharpier from 1.4.1 to 1.4.2 (#536) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated [csharpier](https://github.com/belav/csharpier) from 1.4.1 to 1.4.2.
Release notes _Sourced from [csharpier's releases](https://github.com/belav/csharpier/releases)._ ## 1.4.2 ## What's Changed ### Feature: Show how many files `format` changed and list them with `--list-formatted` [#​1931](https://github.com/belav/csharpier/issues/1931) The summary printed by `format` counted every file it read, so a second run printed the same count even when it changed nothing. The summary now also shows how many files were changed. ```bash $ dotnet csharpier format . # 1.4.1 Formatted 2 files in 120ms. # 1.4.2 Formatted 2 files in 120ms (1 changed). ``` The new `--list-formatted` option prints the paths of the changed files, one per line, instead of the summary. Only errors are logged, and they go to stderr, so stdout contains nothing but the paths. It cannot be used with `--write-stdout` or when piping input to CSharpier. ```bash $ dotnet csharpier format . --list-formatted ./src/Bar.cs ./src/Foo.cs ``` ### Fix: Extra blank lines around assembly attributes inside `#if` or `#region` [#​1949](https://github.com/belav/csharpier/issues/1949) CSharpier added a blank line after an assembly attribute when a directive came next. In a file that also had a using directive and a type, the next run added a second blank line before `#else`, so `check` failed on the output of `format`. ```c# // input & expected output using System; #if A [assembly: SomeAttribute] #else [assembly: OtherAttribute] #endif class ClassName { } // 1.4.1 using System; #if A [assembly: SomeAttribute] #else [assembly: OtherAttribute] #endif class ClassName { } ``` ### Fix: `#else` branch in a member chain loses its indentation [#​1853](https://github.com/belav/csharpier/issues/1853) ```c# ... (truncated) Commits viewable in [compare view](https://github.com/belav/csharpier/compare/1.4.1...1.4.2).
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=csharpier&package-manager=nuget&previous-version=1.4.1&new-version=1.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 4f40914..cf90ad1 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "csharpier": { - "version": "1.4.1", + "version": "1.4.2", "commands": [ "csharpier" ], From c7760a24a7b709744a2e764bcda4adcf4e8123f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2026 02:48:55 +0000 Subject: [PATCH 19/25] Bump the actions-deps group across 1 directory with 5 updates (#538) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the actions-deps group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1558` | `2.0.1621` | | [ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1558` | `2.0.1621` | | [ptr727/ProjectTemplate/.github/workflows/validate-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1558` | `2.0.1621` | | [ptr727/ProjectTemplate/.github/workflows/build-release-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1558` | `2.0.1621` | | [ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1558` | `2.0.1621` | Updates `ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml` from 2.0.1558 to 2.0.1621
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml's releases.

2.0.1621

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1595...2.0.1621

2.0.1595

What's Changed

... (truncated)

Commits
  • 50652fe Promote Develop to Main: Python Line Selector, Docker Lint Digest Pins, Envir...
  • 3183644 Pin the Repo Gate's gh Read and Parse the Docker Pin Manifest Once (#4505)
  • f93f34a Write the Docker Pull Retry Once With One Backoff Schedule (#4503)
  • cf4e380 Pin the GitHub Host for Every gh Child the Hub Scripts Start (#4502)
  • d724120 Pass Over a Signal Handled as the Hook Enabler's First Handler Starts (#4500)
  • c25ec49 Narrow the Qodo Acknowledgment Key to a Link and a Commit Hash (#4496)
  • 3420354 Record the Measured Absence of a Git Floor for --end-of-options (#4484)
  • fc288c4 Build the Gate's Comment Readers on One Trusted-Comment Reader (#4481)
  • 300f204 Add a macOS Bash 4.4 Floor With a Platform-Scoped Host Tool Entry (#4478)
  • 9e766e2 Check Deployment Environment Secret and Variable Names in the Audit (#4480)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml` from 2.0.1558 to 2.0.1621
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml's releases.

2.0.1621

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1595...2.0.1621

2.0.1595

What's Changed

... (truncated)

Commits
  • 50652fe Promote Develop to Main: Python Line Selector, Docker Lint Digest Pins, Envir...
  • 3183644 Pin the Repo Gate's gh Read and Parse the Docker Pin Manifest Once (#4505)
  • f93f34a Write the Docker Pull Retry Once With One Backoff Schedule (#4503)
  • cf4e380 Pin the GitHub Host for Every gh Child the Hub Scripts Start (#4502)
  • d724120 Pass Over a Signal Handled as the Hook Enabler's First Handler Starts (#4500)
  • c25ec49 Narrow the Qodo Acknowledgment Key to a Link and a Commit Hash (#4496)
  • 3420354 Record the Measured Absence of a Git Floor for --end-of-options (#4484)
  • fc288c4 Build the Gate's Comment Readers on One Trusted-Comment Reader (#4481)
  • 300f204 Add a macOS Bash 4.4 Floor With a Platform-Scoped Host Tool Entry (#4478)
  • 9e766e2 Check Deployment Environment Secret and Variable Names in the Audit (#4480)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/validate-task.yml` from 2.0.1558 to 2.0.1621
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/validate-task.yml's releases.

2.0.1621

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1595...2.0.1621

2.0.1595

What's Changed

... (truncated)

Commits
  • 50652fe Promote Develop to Main: Python Line Selector, Docker Lint Digest Pins, Envir...
  • 3183644 Pin the Repo Gate's gh Read and Parse the Docker Pin Manifest Once (#4505)
  • f93f34a Write the Docker Pull Retry Once With One Backoff Schedule (#4503)
  • cf4e380 Pin the GitHub Host for Every gh Child the Hub Scripts Start (#4502)
  • d724120 Pass Over a Signal Handled as the Hook Enabler's First Handler Starts (#4500)
  • c25ec49 Narrow the Qodo Acknowledgment Key to a Link and a Commit Hash (#4496)
  • 3420354 Record the Measured Absence of a Git Floor for --end-of-options (#4484)
  • fc288c4 Build the Gate's Comment Readers on One Trusted-Comment Reader (#4481)
  • 300f204 Add a macOS Bash 4.4 Floor With a Platform-Scoped Host Tool Entry (#4478)
  • 9e766e2 Check Deployment Environment Secret and Variable Names in the Audit (#4480)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/build-release-task.yml` from 2.0.1558 to 2.0.1621
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/build-release-task.yml's releases.

2.0.1621

What's Changed

Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1595...2.0.1621

2.0.1595

What's Changed

... (truncated)

Commits
  • 50652fe Promote Develop to Main: Python Line Selector, Docker Lint Digest Pins, Envir...
  • 3183644 Pin the Repo Gate's gh Read and Parse the Docker Pin Manifest Once (#4505)
  • f93f34a Write the Docker Pull Retry Once With One Backoff Schedule (#4503)
  • cf4e380 Pin the GitHub Host for Every gh Child the Hub Scripts Start (#4502)
  • d724120 Pass Over a Signal Handled as the Hook Enabler's First Handler Starts (#4500)
  • c25ec49 Narrow the Qodo Acknowledgment Key to a Link and a Commit Hash (#4496)
  • 3420354 Record the Measured Absence of a Git Floor for --end-of-options (#4484)
  • fc288c4 Build the Gate's Comment Readers on One Trusted-Comment Reader (#4481)
  • 300f204 Add a macOS Bash 4.4 Floor With a Platform-Scoped Host Tool Entry (#4478)
  • 9e766e2 Check Deployment Environment Secret and Variable Names in the Audit (#4480)
  • Additional commits viewable in compare view

Updates `ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml` from 2.0.1558 to 2.0.1621
Release notes

Sourced from ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml's releases.

2.0.1621

What's Changed

  • Bump DavidAnson/markdownlint-cli2-action from 25.0.0 to 25.1.0 in the actions-deps group across 1 directory by @​dependabot[bot] in ptr727/ProjectTemplate#4446
  • Bump DavidAnson/markdownlint-cli2-action from 25.0.0 to 25.1.0 in the actions-deps group across 1 directory by @​dependabot[bot] in ptr727/ProjectTemplate#4447
  • Have the Agent Open and Drive the Promotion After an Audit's File Fix Merges by @​ptr727 in ptr727/ProjectTemplate#4449
  • Pass Over a Signal Handled as the Prose Gate's First Handler Starts by @​ptr727 in ptr727/ProjectTemplate#4453
  • Record a Managed Copy for claude and codex in install-agents and Report Any Other Copy as a Stray by @​ptr727 in ptr727/ProjectTemplate#4456
  • Name the PowerShell Suppression Form and Fix the Python CI Backstop Text by @​ptr727 in ptr727/ProjectTemplate#4457
  • Read the Metrics Report's Reviewed Heads From the Gate's One Filter by @​ptr727 in ptr727/ProjectTemplate#4458
  • Cross-Check Python Directories Against Dependabot's pip and uv Entries by @​ptr727 in ptr727/ProjectTemplate#4460
  • Pin the Docker Lint Images by Digest Through a Dependabot-Tracked Manifest by @​ptr727 in ptr727/ProjectTemplate#4461
  • State the Platform Weighting and Correct the Hook-Promotion Worked Example by @​ptr727 in ptr727/ProjectTemplate#4464
  • Key Qodo Findings Without Links or Commit Hashes and Ask Dismissal by Title and Location by @​ptr727 in ptr727/ProjectTemplate#4463
  • Hand a Caller's hook-input to the validate and resolve-upstream Hooks by @​ptr727 in ptr727/ProjectTemplate#4465
  • Require an Empty Workflow-Level Permissions Block on Entry-Point Callers by @​ptr727 in ptr727/ProjectTemplate#4466
  • Remove the npm and bun upgrade paths no managed tool reaches by @​ptr727 in ptr727/ProjectTemplate#4467
  • Add a Hub-Hosted Script That Enables a Clone's Hook Framework Once by @​ptr727 in ptr727/ProjectTemplate#4469
  • Select Each Repository's Python Line From Its Root .python-version by @​ptr727 in ptr727/ProjectTemplate#4472
  • Report dotnet and powershell as unmanaged While Microsoft's Feed Is Unconfigured by @​ptr727 in ptr727/ProjectTemplate#4479
  • Bound the Shell Trap's Child Wait and Give the Heading Search a File by @​ptr727 in ptr727/ProjectTemplate#4477
  • Check Deployment Environment Secret and Variable Names in the Audit by @​ptr727 in ptr727/ProjectTemplate#4480
  • Add a macOS Bash 4.4 Floor With a Platform-Scoped Host Tool Entry by @​ptr727 in ptr727/ProjectTemplate#4478
  • Build the Gate's Comment Readers on One Trusted-Comment Reader by @​ptr727 in ptr727/ProjectTemplate#4481
  • Record the Measured Absence of a Git Floor for --end-of-options by @​ptr727 in ptr727/ProjectTemplate#4484
  • Narrow the Qodo Acknowledgment Key to a Link and a Commit Hash by @​ptr727 in ptr727/ProjectTemplate#4496
  • Pass Over a Signal Handled as the Hook Enabler's First Handler Starts by @​ptr727 in ptr727/ProjectTemplate#4500
  • Pin the GitHub Host for Every gh Child the Hub Scripts Start by @​ptr727 in ptr727/ProjectTemplate#4502
  • Write the Docker Pull Retry Once With One Backoff Schedule by @​ptr727 in Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/run-periodic-codegen-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 6263adb..f167c43 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -18,7 +18,7 @@ jobs: merge-bot: name: Merge bot pull request job - uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 + uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 # The repository-wide auto-delete stays off, so the task deletes each merged bot head branch instead. with: delete-branch: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index f160e47..0bc92b1 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,7 +41,7 @@ jobs: # Single source of the release-gate decision, publish or not and stable or not, reused by every job below. plan: name: Plan release job - uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 + uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 with: event_name: ${{ github.event_name }} actor: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: name: Validate job needs: [plan] if: ${{ needs.plan.outputs.publish == 'true' }} - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} permissions: @@ -67,7 +67,7 @@ jobs: name: Publish project release job needs: [plan, validate] if: ${{ needs.plan.outputs.publish == 'true' && needs.validate.result == 'success' }} - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 permissions: contents: write actions: write diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index 5091ad2..4ff8113 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -22,7 +22,7 @@ jobs: run-codegen: name: Run codegen and pull request job - uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 + uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 secrets: CODEGEN_APP_CLIENT_ID: ${{ secrets.CODEGEN_APP_CLIENT_ID }} CODEGEN_APP_PRIVATE_KEY: ${{ secrets.CODEGEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 9ee8f28..72a8bd1 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -58,7 +58,7 @@ jobs: validate: name: Validate job - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 permissions: contents: read # Mapped explicitly rather than inherited, since this is a cross-repository call and secrets: inherit would hand the callee every secret this repository holds. @@ -75,7 +75,7 @@ jobs: name: Smoke build job needs: [changes] if: needs.changes.outputs.release == 'true' || github.event_name == 'workflow_dispatch' - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@8ef8e967f927dbb86cd6e26f87620ddba2856a9d # 2.0.1558 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 permissions: contents: read with: From 3e4ad801cbf7fc3511d49c22ebbb448ae37a0641 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 02:46:54 +0000 Subject: [PATCH 20/25] Bump the nuget-deps group with 1 update (#540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated [ptr727.Utilities](https://github.com/ptr727/Utilities) from 4.1.131 to 4.1.133.
    Release notes _Sourced from [ptr727.Utilities's releases](https://github.com/ptr727/Utilities/releases)._ ## 4.1.133 ## What's Changed * Bump the nuget-deps group with 2 updates by @​dependabot[bot] in https://github.com/ptr727/Utilities/pull/626 **Full Changelog**: https://github.com/ptr727/Utilities/compare/4.1.131...4.1.133 Commits viewable in [compare view](https://github.com/ptr727/Utilities/compare/4.1.131...4.1.133).
    [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ptr727.Utilities&package-manager=nuget&previous-version=4.1.131&new-version=4.1.133)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
    Dependabot commands and options
    You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
    Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 66bfff4..790c012 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - + From 5e9639b23b91a2d2e6ecc3ea1acd9f074a4f9efc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 02:51:28 +0000 Subject: [PATCH 21/25] Bump the actions-deps group across 1 directory with 5 updates (#543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the actions-deps group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1621` | `2.0.1625` | | [ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1621` | `2.0.1625` | | [ptr727/ProjectTemplate/.github/workflows/validate-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1621` | `2.0.1625` | | [ptr727/ProjectTemplate/.github/workflows/build-release-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1621` | `2.0.1625` | | [ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml](https://github.com/ptr727/projecttemplate) | `2.0.1621` | `2.0.1625` | Updates `ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml` from 2.0.1621 to 2.0.1625
    Release notes

    Sourced from ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml's releases.

    2.0.1625

    What's Changed

    Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1621...2.0.1625

    Commits
    • 77a5e2d Promote develop to main (#4515)
    • ee90b1d Refuse a Blanket Stage in Any Checkout With an Origin and Pin the Rules Read'...
    • f804737 Guard Every Signal Handler Against a Nested Later Signal and Refuse a Version...
    • a460090 Keep Dates Out of Scope Beside a Named Person and List history-data Issues Be...
    • 97c5a31 Update upstream versions: dotnet to 11, python to 3.15 (#4509)
    • See full diff in compare view

    Updates `ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml` from 2.0.1621 to 2.0.1625
    Release notes

    Sourced from ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml's releases.

    2.0.1625

    What's Changed

    Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1621...2.0.1625

    Commits
    • 77a5e2d Promote develop to main (#4515)
    • ee90b1d Refuse a Blanket Stage in Any Checkout With an Origin and Pin the Rules Read'...
    • f804737 Guard Every Signal Handler Against a Nested Later Signal and Refuse a Version...
    • a460090 Keep Dates Out of Scope Beside a Named Person and List history-data Issues Be...
    • 97c5a31 Update upstream versions: dotnet to 11, python to 3.15 (#4509)
    • See full diff in compare view

    Updates `ptr727/ProjectTemplate/.github/workflows/validate-task.yml` from 2.0.1621 to 2.0.1625
    Release notes

    Sourced from ptr727/ProjectTemplate/.github/workflows/validate-task.yml's releases.

    2.0.1625

    What's Changed

    Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1621...2.0.1625

    Commits
    • 77a5e2d Promote develop to main (#4515)
    • ee90b1d Refuse a Blanket Stage in Any Checkout With an Origin and Pin the Rules Read'...
    • f804737 Guard Every Signal Handler Against a Nested Later Signal and Refuse a Version...
    • a460090 Keep Dates Out of Scope Beside a Named Person and List history-data Issues Be...
    • 97c5a31 Update upstream versions: dotnet to 11, python to 3.15 (#4509)
    • See full diff in compare view

    Updates `ptr727/ProjectTemplate/.github/workflows/build-release-task.yml` from 2.0.1621 to 2.0.1625
    Release notes

    Sourced from ptr727/ProjectTemplate/.github/workflows/build-release-task.yml's releases.

    2.0.1625

    What's Changed

    Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1621...2.0.1625

    Commits
    • 77a5e2d Promote develop to main (#4515)
    • ee90b1d Refuse a Blanket Stage in Any Checkout With an Origin and Pin the Rules Read'...
    • f804737 Guard Every Signal Handler Against a Nested Later Signal and Refuse a Version...
    • a460090 Keep Dates Out of Scope Beside a Named Person and List history-data Issues Be...
    • 97c5a31 Update upstream versions: dotnet to 11, python to 3.15 (#4509)
    • See full diff in compare view

    Updates `ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml` from 2.0.1621 to 2.0.1625
    Release notes

    Sourced from ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml's releases.

    2.0.1625

    What's Changed

    Full Changelog: https://github.com/ptr727/ProjectTemplate/compare/2.0.1621...2.0.1625

    Commits
    • 77a5e2d Promote develop to main (#4515)
    • ee90b1d Refuse a Blanket Stage in Any Checkout With an Origin and Pin the Rules Read'...
    • f804737 Guard Every Signal Handler Against a Nested Later Signal and Refuse a Version...
    • a460090 Keep Dates Out of Scope Beside a Named Person and List history-data Issues Be...
    • 97c5a31 Update upstream versions: dotnet to 11, python to 3.15 (#4509)
    • See full diff in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
    Dependabot commands and options
    You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
    Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/run-periodic-codegen-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index f167c43..ca2ae9f 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -18,7 +18,7 @@ jobs: merge-bot: name: Merge bot pull request job - uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 + uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 # The repository-wide auto-delete stays off, so the task deletes each merged bot head branch instead. with: delete-branch: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 0bc92b1..b3e14e3 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,7 +41,7 @@ jobs: # Single source of the release-gate decision, publish or not and stable or not, reused by every job below. plan: name: Plan release job - uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 + uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 with: event_name: ${{ github.event_name }} actor: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: name: Validate job needs: [plan] if: ${{ needs.plan.outputs.publish == 'true' }} - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} permissions: @@ -67,7 +67,7 @@ jobs: name: Publish project release job needs: [plan, validate] if: ${{ needs.plan.outputs.publish == 'true' && needs.validate.result == 'success' }} - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 permissions: contents: write actions: write diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index 4ff8113..c2d90ef 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -22,7 +22,7 @@ jobs: run-codegen: name: Run codegen and pull request job - uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 + uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 secrets: CODEGEN_APP_CLIENT_ID: ${{ secrets.CODEGEN_APP_CLIENT_ID }} CODEGEN_APP_PRIVATE_KEY: ${{ secrets.CODEGEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 72a8bd1..460d3ad 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -58,7 +58,7 @@ jobs: validate: name: Validate job - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 permissions: contents: read # Mapped explicitly rather than inherited, since this is a cross-repository call and secrets: inherit would hand the callee every secret this repository holds. @@ -75,7 +75,7 @@ jobs: name: Smoke build job needs: [changes] if: needs.changes.outputs.release == 'true' || github.event_name == 'workflow_dispatch' - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@50652fe00d46d326079fd1d36c6304ee93ef0702 # 2.0.1621 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 permissions: contents: read with: From 98dec9dc00069a074e8c06087e4e4ed675d03b8e Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 6 Dec 2026 10:47:44 -0800 Subject: [PATCH 22/25] Resync the Instruction Set and Skills Tree to Hub 2.0.1682 (#551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Resyncs the carried instruction set and Skills tree to hub `2.0.1682` (`ac58eecb`), as step 1 of `RESYNC.md` together with step 3's re-vendor of the manifest-owned trees. - **AGENTS.md and GOVERNANCE.md:** `carry.py apply-sections` re-vendors the 2 stale AGENTS.md sections and the 16 stale GOVERNANCE.md sections. Every one matched a past hub revision and none was locally modified. The preamble and every intent region, including the repo's own "Repository Layout", came through byte-identical. - **CODESTYLE.md and WORKFLOW.md:** take the hub copies. The `carried-instruction-file-guard` probe found no line absent from every past hub revision of either file, so no local content was lost. - **.github/skills:** `carry.py apply`, which leaves the tree byte-identical to the hub's. 37 files were stale and 1 was new (`dotnet-codestyle/references/console-lifetime.md`). No path was extra, and no skill directory was added or removed, so `.github/copilot-instructions.md` needs no path edits. Audit run `2026-12-06T18:30:21Z`, hub `ac58eecb`, against `main` reported the verbatim and tree drift this PR clears. ## Deferred - `LanguageTagsCreate` does not yet meet the newly carried .NET interrupt and unhandled-exception rules: #550. ## Local review One `local-strict-review` pass at the `frontier` tier raised 5 findings, none a defect in the carried text. Each is caused by the carried rules landing before the repo files they govern, and each has a destination: - The WORKFLOW.md D1.7, D1.9 and S15 text describes workflows the 2.0.1625 pins do not run, and `OPERATIONS.md` line 10 names the old test invocation: the hub pin bump and the `OPERATIONS.md` alignment go in the pins pull request below. - The merge-bot caller lacks `auto_merge_disabled`: the merge-bot pull request below. - `persist-credentials: false` is missing on `test-pull-request.yml`: the same merge-bot and workflows pull request below. - `LanguageTagsCreate` interrupt and unhandled-exception handling: #550. ## Follow-ups, in RESYNC order once this merges 1. Retire `CLAUDE.md`, with the hub pin bump to `2.0.1682` it needs first, and align `OPERATIONS.md`. 2. Merge-bot caller: subscribe to `auto_merge_disabled`, plus `persist-credentials: false` on the checkouts. 3. Intent files: `.editorconfig`, `cspell.json`, `AUDIT.md`, `.github/copilot-instructions.md`, README coverage shield. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .github/skills/add-host-tool/SKILL.md | 11 +- .github/skills/agent-conduct/SKILL.md | 24 +- .github/skills/audit-a-repo/SKILL.md | 14 +- .github/skills/backlog-burndown/SKILL.md | 349 +++++++++++---- .../branching-and-release-model/SKILL.md | 62 ++- .../branch-protection-and-promotion.md | 36 +- .../references/release-publish-mechanics.md | 25 +- .../carried-instruction-file-guard/SKILL.md | 2 +- .github/skills/check-this-repo/SKILL.md | 11 +- .github/skills/comment-and-doc-style/SKILL.md | 64 ++- .../references/carried-doc-references.md | 18 +- .github/skills/decision-triage/SKILL.md | 32 +- .github/skills/dotnet-codestyle/SKILL.md | 158 +++++-- .../references/console-lifetime.md | 414 ++++++++++++++++++ .../references/conventions.md | 37 +- .../references/project-config.md | 8 +- .../dotnet-codestyle/references/testing.md | 4 +- .github/skills/drive-pr/SKILL.md | 124 ++++-- .github/skills/fleet-code-review/SKILL.md | 1 + .../skills/git-commit-conventions/SKILL.md | 13 +- .../references/history-rewrite.md | 49 ++- .github/skills/local-strict-review/SKILL.md | 29 +- .github/skills/merge-and-release/SKILL.md | 82 ++-- .github/skills/pr-review-conduct/SKILL.md | 89 +++- .github/skills/python-codestyle/SKILL.md | 86 ++-- .../python-codestyle/references/code-style.md | 10 +- .../python-codestyle/references/profiles.md | 26 +- .github/skills/repo-worktree/SKILL.md | 82 ++-- .github/skills/resync-a-repo/SKILL.md | 56 ++- .github/skills/session-handoff/SKILL.md | 33 +- .github/skills/shell-codestyle/SKILL.md | 47 +- .github/skills/standup-a-repo/SKILL.md | 46 +- .github/skills/update-host/SKILL.md | 4 +- .../upstream-contribution-workflow/SKILL.md | 64 ++- .github/skills/workflow-ci-contract/SKILL.md | 2 +- .../references/architecture.md | 15 +- .../references/d-guarantees.md | 13 +- .../references/test-methodology.md | 10 +- AGENTS.md | 22 +- CODESTYLE.md | 93 +++- GOVERNANCE.md | 73 +-- WORKFLOW.md | 60 ++- 42 files changed, 1783 insertions(+), 615 deletions(-) create mode 100644 .github/skills/dotnet-codestyle/references/console-lifetime.md diff --git a/.github/skills/add-host-tool/SKILL.md b/.github/skills/add-host-tool/SKILL.md index 22b10df..62f9eb0 100644 --- a/.github/skills/add-host-tool/SKILL.md +++ b/.github/skills/add-host-tool/SKILL.md @@ -25,12 +25,12 @@ description: >- - Prefer the distribution package when it meets the floor. - Use the platform's established package manager and official package identifier. - Keep install and upgrade idempotent. -- Before an apt-managed install, detect and remove an unowned downloaded copy that shadows it. -- Before a downloaded install, detect and remove a conflicting package-managed copy. +- Before an apt-managed install, detect an unowned downloaded copy that shadows it. Report it with the command that removes it by hand, per `GOVERNANCE.md` "Design Before Code". Skip that tool's install until the copy is gone, since the shadowing copy would keep answering on PATH. +- Before a downloaded install, detect a conflicting package-managed copy. Report it and skip the install the same way. - Preserve report, list, explicit selection, install, upgrade, reinstall, and dry-run behavior. -- Do not test a Windows mutation on Linux or a Linux mutation on Windows. +- Hand each native mutation to the operator on its own platform, never a Windows mutation on Linux or a Linux mutation on Windows. -When a platform is unavailable, verify its registry and tests without claiming a native install. Hand off the exact native commands and expected observations to the operator. +Verify each platform's registry and tests without claiming a native install, whether or not the platform is available. Hand off the exact native commands and expected observations to the operator. ## Update the Complete Surface @@ -42,5 +42,6 @@ Update the platform installers, `spec/host-tools.json`, `docs/host-setup.md`, an 2. Run the repository's formatting, lint, type, and test gates required by the changed files. 3. On the current native platform, exercise list and report first. 4. Exercise install and upgrade dry runs. -5. Apply the install, repeat it to prove idempotence, and run the host gate. +5. Hand the operator the exact native commands for the install, a repeat install proving + idempotence, and the host gate, with the expected observations. Verify what the operator reports. 6. Record untested platforms explicitly and leave cross-platform verification open. diff --git a/.github/skills/agent-conduct/SKILL.md b/.github/skills/agent-conduct/SKILL.md index cc82cf8..51345d4 100644 --- a/.github/skills/agent-conduct/SKILL.md +++ b/.github/skills/agent-conduct/SKILL.md @@ -26,7 +26,7 @@ Read `GOVERNANCE.md` "Design Before Code" before the first edit of a change. ## Before Claiming Done -Read the section below before reporting success on anything non-trivial. It is `GOVERNANCE.md` "Verification Discipline", whole. +Read the section below before reporting success. It is `GOVERNANCE.md` "Verification Discipline", whole. @@ -34,14 +34,15 @@ The checks that separate work actually done from work that merely reports succes - **Locate every check a change owes before running any of them, and CI's coverage is not that list.** The checks are read from what the repository declares, rather than inferred from whatever the pipeline happens to run. What it declares means its `OPERATIONS.md` "Local Verification" section alongside the workflows. Part of a repository's contract is routinely unreachable from a runner. Examples are a redirect no build serves, a deploy no pull request performs, and hardware no runner holds. So the check covering that part lives in a document rather than in a workflow. It is run by hand before the pull request opens. Green is then the precise signal that it was skipped. That is because the pipeline reports success over the half it reaches while saying nothing about the half it cannot. Reading a document's own description of itself is not how such a check is found. That is because a topical document is named for its most visible function, usually a post-merge one. It is also because an accurate description of that function routes a pre-merge task away from the file holding the gate. The destination is declared fleet-wide for that reason, rather than left to how well each repository worded a pointer to it. A repository whose `OPERATIONS.md` carries no such heading, or carries no such file, is missing content it owes. In that case, read that file whole where it exists, and the workflows beside it either way. Report what is absent rather than reading its absence as an answer that no local check applies. - **A test runner failing to spawn is not evidence that no test coverage applies here.** `uv run pytest` failing to spawn in a lint-only Python Scripts profile is that profile working as intended, not a missing dependency. The `python-codestyle` Skill's Two Profiles section states this. Read the actual invocation from the same `OPERATIONS.md` "Local Verification" section the bullet above names, rather than guessing a generic test-runner command. Report that document's own command result, not the guessed command's failure. -- **A test must assert the mechanism it names, and a gate has to be watched failing.** Label each case by the behavior it proves, then write the case that reintroduces the fault and confirm the gate objects to it. A case that passes for an incidental reason, the right answer reached by the wrong path, is worse than no case. That is because it is later cited as evidence. A proof that restates the gated data instead of reading it proves only that the function works. So drive the real table or the real config. And a gate that finds nothing is indistinguishable from a gate with nothing to find, so assert a floor on what a healthy run covers. +- **A test must assert the mechanism it names, and a gate has to be watched failing.** Label each case by the behavior it proves, then write the case that reintroduces the fault and confirm the gate objects to it. A case that passes for an incidental reason, the right answer reached by the wrong path, is worse than no case. That is because it is later cited as evidence. A proof that restates the gated data instead of reading it proves only that the function works. So drive the real table or the real config, read as data. A call that would change state as "Repository Boundaries and Write Safety" bounds it is still stubbed or dry-run. And a gate that finds nothing is indistinguishable from a gate with nothing to find, so assert a floor on what a healthy run covers. - **Gates, filters, and gate-like watchers fail loud, never narrow quietly.** A pattern that silently matches less, an allowlist that silently stops matching, or a gate that silently stops gating all report success while doing nothing. When a construct exists to notice something, make the not-noticing case produce an error or an annotation. An identity allowlist used as a gate, for one, must raise an error when its list stops matching, not silently pass everything through. - **Config with a uniqueness rule is validated on read, and its consumers assert what it promised.** A repeated key in a lookup table is not a precedence question to settle quietly. It is two answers to one question. Keeping whichever came last picks one of them where the reader sees no choice being made. Fail on the duplicate at the point the config is read, so the code downstream can rely on the invariant instead of re-deriving it. - **Validate and read on the same normalized key.** A guard that compares stripped names while the join looks up the raw one passes a padded key and then matches nothing. So the exact fault the guard exists to stop is sitting inside the guard. Normalize once at the boundary and use that one value for both the check and the lookup. -- **Every push toward a pull request is preceded by a local adversarial review of the branch's whole diff, and the pass is recorded.** The rule binds every push rather than the first one. So a fix push answering a reviewer's finding owes a pass exactly as the branch's first push did. That is the round it is actually skipped on. The fix looks small, the branch was reviewed once already, and what goes up is content no review has read. Skipping it does not save the round. It moves it into the fix-commit and review-comment cycle, which spends wall-clock, Actions runtime, and agent tokens finding what a local pass would have. The pass itself, its delegation shape, and its model tier are the `local-strict-review` Skill's. `scripts/local_review.py` records it keyed on the content the reviewer actually saw. So a capture point can ask whether a receipt still covers what is about to be pushed. It need not trust the rule to have been remembered. The pass is mandatory and its findings are advisory, which are opposite claims worth keeping apart. A pass is recorded whether it raised ten findings or none. Disposing of each one is judgment, per `GOVERNANCE.md` "PR Review Etiquette". -- **Canonical content one repo authors and others carry is read the way a carrier reads it, whole, in the repo that can fix it. That read is swept periodically rather than owed by a push.** Such content is written and merged against a diff of a few lines. It reaches a reviewer as a new file, in full, only when a repo carries it for the first time. So the first real read of a rule happens where nothing can be done about the result. That is because the tree is manifest-owned, and the copy is compared against the authoring repo's, byte for byte wherever the declared fidelity is verbatim. It is also because a local edit there is drift on the next fidelity check. Where the fidelity is intent the carrier may adapt its own copy. The defect still has to be fixed at the source, since every other carrier holds it too. Every carrier after that re-discovers the same defect. The finding arrives in a session holding no checkout of the authoring repo and no standing to test the claim. The unit is what a reviewer reads whole. The carry manifest, `spec/files.json` in the hub, rather than the document decides what is a unit, down to which files carry units at all. So the engine that reads that manifest is the authority on the set rather than any restatement of its rules. In the ordinary case a unit is one level-two section of a carried Markdown canonical, which is the fidelity unit `spec/section-model.md` declares. The read is of the unit's whole current text rather than of the diff that moved it. The pass itself, its delegation shape, and its model tier are the `local-strict-review` Skill's, exactly as they are for the pass above. **The read is swept because owing it at every push cost too much to keep owing it there.** Measured across this fleet's review rounds, the passes a push owed were a large share of what a pull request spent. What they returned was never measured against that. So the read moves to a schedule on the cost alone, rather than being owed by whichever change happens to touch a unit. A change that moves a unit is no longer refused over one. No capture point asks a change for a pass of this kind. The diff pass the bullet above requires is owed by every push exactly as before. What replaces the per-push read is a schedule in the authoring repo. It gathers the work into one piece and files it where an agent session can run the passes and fix what they find. That work is every unit whose text has moved past the pass that read it. That work also covers a bounded slice of the units nothing has read there at all, taken newest-committed first. The slice is what keeps a newly authored unit from waiting on a volunteer. That is because such a unit has no earlier pass to move past. It is also because such a unit would otherwise reach a carrier with nothing having asked to read it. That is the case this whole rule is about. A unit newly carried by widening the manifest alone is not reached that way. The order reads the unit's own file rather than the manifest. So such a unit joins the backlog at that file's age. There a section written and declared in one commit leads like any other newly authored one. Bounding it is what keeps a long backlog from arriving as one week's work. `scripts/canonical_review.py` records each pass keyed on the content the reviewer saw, and names both sets. So the sweep's list is read off that record rather than remembered. Its ledger is tracked content the change carrying it commits like any other. Like the pass above, a pass the sweep asks for is mandatory and its findings are advisory. +- **Every push toward a pull request is preceded by a local adversarial review of the branch's whole diff, and the pass is recorded.** The rule binds every push rather than the first one. So a fix push answering a reviewer's finding owes a pass exactly as the branch's first push did. That is the round it is actually skipped on. The fix looks small, the branch was reviewed once already, and what goes up is content no review has read. Skipping it does not save the round. It moves it into the fix-commit and review-comment cycle, which spends wall-clock, Actions runtime, and agent tokens finding what a local pass would have. The pass itself, its delegation shape, and its model tier are the `local-strict-review` Skill's. The hub-hosted `scripts/local_review.py` records it keyed on the content the reviewer actually saw. So a capture point can ask whether a receipt still covers what is about to be pushed. It need not trust the rule to have been remembered. The pass is mandatory and its findings are advisory, which are opposite claims worth keeping apart. A pass is recorded whether it raised ten findings or none. Disposing of each one is judgment, per `GOVERNANCE.md` "PR Review Etiquette". +- **Canonical content one repo authors and others carry is read the way a carrier reads it, whole, in the repo that can fix it. That read is swept periodically rather than owed by a push.** Such content is written and merged against a diff of a few lines. It reaches a reviewer as a new file, in full, only when a repo carries it for the first time. So the first real read of a rule happens where nothing can be done about the result. That is because the tree is manifest-owned, and the copy is compared against the authoring repo's, byte for byte wherever the declared fidelity is verbatim. It is also because a local edit there is drift on the next fidelity check. Where the fidelity is intent the carrier may adapt its own copy. The defect still has to be fixed at the source, since every other carrier holds it too. Every carrier after that re-discovers the same defect. The finding arrives in a session holding no checkout of the authoring repo and no standing to test the claim. The unit is what a reviewer reads whole. The carry manifest, `spec/files.json` in the hub, rather than the document decides what is a unit, down to which files carry units at all. So the engine that reads that manifest is the authority on the set rather than any restatement of its rules. In the ordinary case a unit is one level-two section of a carried Markdown canonical, which is the fidelity unit `spec/section-model.md` declares. The read is of the unit's whole current text rather than of the diff that moved it. The pass itself, its delegation shape, and its model tier are the `local-strict-review` Skill's, exactly as they are for the pass above. **The read is swept because owing it at every push cost too much to keep owing it there.** Measured across this fleet's review rounds, the passes a push owed were a large share of what a pull request spent. What they returned was never measured against that. So the read moves to a schedule on the cost alone, rather than being owed by whichever change happens to touch a unit. A change that moves a unit is no longer refused over one. No capture point asks a change for a pass of this kind. The diff pass the bullet above requires is owed by every push exactly as before. What replaces the per-push read is a schedule in the authoring repo. It gathers the work into one piece and files it where an agent session can run the passes and fix what they find. That work is every unit whose text has moved past the pass that read it. That work also covers a bounded slice of the units nothing has read there at all, taken newest-committed first. The slice is what keeps a newly authored unit from waiting on a volunteer. That is because such a unit has no earlier pass to move past. It is also because such a unit would otherwise reach a carrier with nothing having asked to read it. That is the case this whole rule is about. A unit newly carried by widening the manifest alone is not reached that way. The order reads the unit's own file rather than the manifest. So such a unit joins the backlog at that file's age. There a section written and declared in one commit leads like any other newly authored one. Bounding it is what keeps a long backlog from arriving as one week's work. The hub-hosted `scripts/canonical_review.py` records each pass keyed on the content the reviewer saw, and names both sets. So the sweep's list is read off that record rather than remembered. Its ledger is tracked content the change carrying it commits like any other. Like the pass above, a pass the sweep asks for is mandatory and its findings are advisory. - **Another round of edits after either pass is owed only while a defect this change introduced or fixes in place is open.** A finding count never owes one. Which findings count as introduced, what each class owes, and how many rounds a push may spend are the `local-strict-review` Skill's. - **Run the repo's whole lint gate before every push, not the parts that look relevant.** CI runs all of them, so a partial local run only defers the failure. The tool most likely to catch a given change is often the one it seems least about. An edit that manipulates line endings is exactly when `editorconfig-checker` matters. The repo documents each linter's known-working invocation, and this rule is that **all** of them run. +- **Run the repo's whole test suite before every push, not the modules a change touches.** Run it in the invocation `OPERATIONS.md` "Local Verification" declares, as the bullets above require. CI runs every case a runner can reach, so a partial local run only defers the failure, as it does for the lint gate. A suite can hold tests that judge every file in the tree, so a change can fail a module it never touched. - **Editing CRLF files programmatically: `.` matches `\r` in a regex**, so a captured line keeps its carriage return and rejoining with `\r\n` yields `CRCRLF`. Prefer literal replacement over regex reassembly. In Python the *default* path is a text-mode rewrite, which has the mirror failure. `Path.read_text()` decodes through universal newlines and `write_text()` translates each `\n` back to `os.linesep`. So a read-edit-write round trip rewrites every line ending in the file to the host's own while the edit itself looks correct. Work in bytes, or open the file explicitly with `newline=''` on both the read and the write. That is because a read that preserves the endings still hands them to a write that translates them. Use `open()` rather than `Path.read_text()`, which accepts that argument only on Python 3.13 and newer and raises `TypeError` below it. The corruption is worth naming because it is invisible in a rendered diff. - **Scope a check by what the project declares, not by the file that prompted it.** A check written while editing one file tends to cover that file's language and stop. It then reports success on every other surface the rule governs. Read the declared types, or the config that enumerates them, and cover each one. Then assert a floor per surface, so a table that narrows fails loudly instead of passing quietly. A rule about comments means every comment syntax the project ships. A format that carries comments in practice counts even where its specification says otherwise. - **Never write source text carrying backslash escapes through a shell construct that interprets them.** A `printf` format string, a `printf` argument consumed by `%b`, `echo -e`, POSIX `sh`'s builtin `echo`, and `$'...'` each consume the escape. Each writes an invisible control character in its place. So a `\b` inside a regex becomes a backspace, and the pattern silently matches nothing while every test still passes. A quoted heredoc, `<<"EOF"`, is not one of those constructs and writes every backslash literally. An unquoted `< Communicating with the User --> - **Reference every pull request as a clickable link.** When you mention a PR on a surface that renders Markdown (chat, a summary, a report), render it as a Markdown link to the PR. Write it as `[#N](https://github.com/OWNER/REPO/pull/N)`, never a bare `#N`. The same applies to issues and commits. **The form follows the surface.** Some surfaces link neither a Markdown link nor a bare URL, an interactive prompt's question and option text among them. Pasting a full URL into one of those does not rescue it, since the reader gets a string to copy. That is the outcome this rule exists to prevent. There the reference is a bare `#N`. The clickable link goes in the message that comes **before** the prompt rather than merely alongside it. That is because the prompt blocks on an answer, and a message emitted after it is read once that answer is already given. That is the one moment the link is no longer any use. The test is whether the reader can click it where it is read, not whether it was written in the syntax that works elsewhere. - **Put a command the user must run where the user can run it.** This session's input line is where the user types to the agent. A command runs outside this session where this session's input line cannot run it or cannot hold its effect. One waiting on typed input, such as a password or a confirmation, is such a command. So is one meant for another host, or one setting a variable the session reads at launch. Every other one runs at this session's input line, where that line can run a command, and outside the session otherwise. **A command the user runs outside this session goes in the question's own text.** Where a question asks the user to run one, the question carries the exact command, complete and ready to paste. A message before the prompt may repeat the command, but the question never points at that message. A question pointing at it can leave the reader to find the command among a long run of earlier output. Such a command stays in the prompt, where the turn opens one, although the clickable-link bullet above moves a link out of one. The command needs no rendering, since the prompt shows it as plain text the reader can copy. **A command the user runs at this session's input line never goes in an interactive prompt.** On Claude Code such a command is a `!` line, typed at the session's input line so its output lands in the session. While an interactive prompt is open, the user cannot type at the session's input line. So a command placed in one sits in the one surface that blocks running it. It goes in a plain message instead, as a fenced block holding the `!` line itself, complete and ready to paste. Several commands join on that one line with `&&`, which runs them in order and stops at the first that fails. The block opens the message. Any question the same turn owes follows it as a numbered list, and any report comes after both. The message asks the user to reply once the command has run, and the turn ends with no interactive prompt open. The agent then checks the result on the user's next message. It reads back the state the command was meant to change, or the output it left in the session. An answer saying the command ran is not that check. -- **Ask every question through the interface's prompt, never in prose.** When you need the user to decide, answer, or approve anything, put it to them through the interface's own prompt mechanism. Do so whether or not work is blocked on it. An offer to do more work ("want me to file that?") is a question like any other. A question written into a message is lost in the report around it, however short it is. One closing a long report sits where the reader is least likely to reach it. Where no prompt mechanism is available, the questions go as a numbered list opening the message rather than closing it. The user can then reply per number. A turn asking for a command the user runs at this session's input line is an exception, per the command bullet above. It puts every question it owes in that message, since a prompt open beside the command would block the place it runs. This bullet settles how a question is put once it is asked. Whether a question is asked now or recorded for later is the parking bullet's to settle. That is the one opening "A question filed as an issue is parked rather than asked". +- **Ask when the user can cheaply confirm.** An assumption that saves one question and is wrong costs the rework plus the trust. So a genuine ambiguity in intent, scope, or authorization is raised, not resolved by picking the likelier reading. Rules that already answer the question (the committed instruction set) are not ambiguity, so read them first rather than asking what they state. +- **The irreversible step (merging, publishing, releasing, force-pushing, deleting, changing branch protection) stays the maintainer's.** **A grant given in a past session or for a different task authorizes nothing now.** Whether a credential's reach or a tool that happens to work authorizes anything is answered by `GOVERNANCE.md` "Repository Boundaries and Write Safety" rather than here. +- **Ask every question through the interface's prompt, never in prose.** When you need the user to decide, answer, or approve anything, put it to them through the interface's own prompt mechanism. Do so whether or not work is blocked on it. An offer to do more work ("want me to file that?") is a question like any other. A question written into a message is lost in the report around it, however short it is. One closing a long report sits where the reader is least likely to reach it. **Each question reads whole from its own text.** It states the problem, why it is being asked, and what each option does, in plain words. It may cite an issue or a pull request by number. The question and its options still read fully without opening it. A question leaning on an issue for its meaning is often answered without reading that issue, so the answer misses its point. Where no prompt mechanism is available, the questions go as a numbered list opening the message rather than closing it. The user can then reply per number. A turn asking for a command the user runs at this session's input line is an exception, per the command bullet above. It puts every question it owes in that message, since a prompt open beside the command would block the place it runs. This bullet settles how a question is put once it is asked. Whether a question is asked now or recorded for later is the parking bullet's to settle. That is the one opening "A question filed as an issue is parked rather than asked". - **Raise work blocked on the user as a direct interactive prompt.** When progress needs a decision, an authorization, or an answer only the user can give, ask for it at the point the work stops. Ask through the interface's own prompt mechanism. Never leave it as prose in a summary. A handoff buried in a paragraph is a handoff that did not happen. That is because a summary reads as a report of finished work. It is also because the one line still waiting on the user is the easiest in a summary to skim past. The blocked item is the message, not a closing remark on a message about something else. **The options offered are the actions themselves.** The one that unblocks the work names the action it authorizes ("squash and merge it"). Selecting it is then the go-ahead rather than a note to act on later. Offering only ways to wait is the same failure in interactive clothing. That is because a prompt whose every choice is inaction reports the block rather than clearing it. Where the agent may not perform the authorized action itself, the option says who does it. Where no interactive prompt is available, the numbered list the bullet above names is the fallback. In a turn asking for a command the user runs at this session's input line, the command bullet above replaces the interactive prompt. - **Lead every choice with a recommendation and its reason.** Wherever the user is asked to choose, in a prompt or in a numbered list, the option the agent recommends comes first. It is marked as the recommendation, and every option states the reason for it. A user who takes the recommendation then reads one line, and one who does not sees what the other options trade away. A question with no defensible recommendation says so rather than inventing one. Where an open question has no options and the agent does have an answer, that answer and its reason go in the question's text. They never go in as an invented option. - **A question filed as an issue is parked rather than asked, and it stays owed.** Where the work cannot continue without the answer, the interactive-prompt bullet governs and the question is asked at the point the work stops. Wherever the question is recorded rather than asked, recording it is the right thing to do, and recording it is still not asking it. That holds whether the work can continue without the answer or the question was asked once and deferred. So the issue carries the fleet's `decision` label. When the filing session knows the choices the question is between, the issue states them. The label and the stated choices are what let a later session, one that was not there when the issue was filed, find the question. That session can then put the question to the user without inventing its answers. **The parked queue is the failure, not the parking.** An issue holding a question the user has never seen reads to every later session as tracked work rather than as a block. So each session files correctly and moves on. Presenting the accumulation is the step nobody owns. @@ -94,11 +94,11 @@ Where a lesson lands, when it earns a mechanical hook, and where work blocked on - **Durable knowledge lives in the committed docs, not in agent memory.** Anything a future agent must honor belongs in a committed governance file. That covers a rule, a contract, a hard-won gotcha, and a pattern worth repeating or one to avoid. The file is `GOVERNANCE.md` for a cross-cutting rule, or `AGENTS.md`, `CODESTYLE.md`, `WORKFLOW.md`, or a committed backlog the repository already keeps. Agent memory does not survive a new session, a new machine, or a new environment. So it holds only environment-specific nuance and in-flight session state, never anything whose loss on reset would matter. A durable lesson left only in memory is lost to the next agent. -- **Keep the governance current as you work.** When work surfaces something durable, record it in the governance docs as part of that change. Something durable includes a rule worth enforcing, a recurring gotcha, a positive pattern to repeat, or a negative one to design out. Record it rather than leaving it in a local note or routing around it with a one-off workaround. Where the governing doc is carried from a template this repo cannot edit directly, propose the change upstream rather than patching the local copy. A local patch leaves every sibling repo with the same trap. Governance is not static: it improves by agents folding good patterns in and designing bad ones out. +- **Keep the governance current as you work.** When work surfaces something durable, record it in the governance docs as part of that change. Something durable includes a rule worth enforcing, a recurring gotcha, a positive pattern to repeat, or a negative one to design out. Record it rather than leaving it in a local note or routing around it with a one-off workaround. Where the rule text is carried from the hub, file the change as an issue in the hub rather than patching the local copy. A local patch leaves every sibling repo with the same trap. Governance is not static: it improves by agents folding good patterns in and designing bad ones out. - **A blocker filed in another repository is recorded in the repository whose work it blocks.** The binding moment is when the upstream issue is filed or, where it already exists, found. That is because the session filing or finding it is the one that knows what stopped and why. It owes a second issue in the repository that is waiting rather than only the first. Where the upstream issue already exists, the local issue names that one and no second upstream issue is filed. The local issue states what this repository cannot do and why, in its own terms rather than as a pointer to read elsewhere. That is because a reader who has to open the upstream issue to learn whether it affects them opens every one of them. The local issue names the upstream one as its blocker, carries the `blocked` label, and carries whatever labels its own work would carry anyway. A comment on the upstream issue then names the local one in return. It is a comment rather than an edit to the body because a second repository may join the same blocker later. It is also because the body is often not this session's to rewrite. That order is the upstream issue, then the local issue, then the backlink comment. It leaves a partial failure as a record naming its blocker rather than as a blocker naming a record nobody wrote. **A handoff does not do this job.** It carries the blockers a round met, but it belongs to one track and closes when that track's work is done. The wait can outlive that track, so it belongs in the backlog the whole repository reads. - **The blocker record is written under the ordinary write rules, and the label on it is taken off deliberately.** Filing an issue and commenting on another are state-changing calls. So "Repository Boundaries and Write Safety" binds each of them exactly as it binds any other write. That keeps the upstream issue inside this owner. That binding also makes a blocker under a different owner a matter of explicit permission rather than of this rule. The `blocked` label is what every reader of this record selects on. So a repository not carrying it cannot host one until the fleet label set is applied there. That is a change to that repository's configuration rather than anything this rule writes. A session that finds it missing reports that. The label comes off when the blocker clears. The session closing the upstream issue is best placed to take it off. That is because the backlink comments naming every waiting repository are on the issue it is closing. Any later session that finds it cleared takes it off instead. A fix can land well before either of those, so the label lags the fix rather than tracking it. That is why a session meeting a `blocked` issue reads the state of the issue that issue's body names rather than the label. The local issue stays open when the label comes off. That is because the work it records still has to be done and is ordinary backlog from that moment on. -- **A handoff parked on a maintainer decision carries the `blocked` label too.** Its blocker is a `decision` issue in this same repository rather than an issue elsewhere, and the parking comment on the handoff names it. A reader reads the named issue rather than the label, and the blocker clears when that issue loses its `decision` label. Unlike a cross-repository blocker, a session finding it cleared does not take the label off. It comes off only once a session writes the next round and leaves no `decision` issue it filed on that work unanswered. So a running loop never takes a handoff a present maintainer is still working, or one it could only park again. -- **A durable rule earns a mechanical hook only where a hook can actually decide it, otherwise it stays prose.** The conditions below must hold together, not any one alone. The failure recurs even after the governing prose was demonstrably read and understood. So it is not a discovery or loading problem that a structural fix would already solve. A structural fix here means getting the rule into context at all. The triggering shape is decidable from the tool call's own text, arguments, and working directory alone, with no semantic or contextual judgment required. And the failure is destructive or hard to reverse rather than a quality miss. A worktree-isolation lapse met all of them, so it was promoted to a `gh-write-guard` hook rule. It recurred under prose the agent had already read. The question "is this command's target a primary checkout" is a plain directory comparison. And the harm is another task's swept or reverted work. A skill's own trigger going unread by the session at all, by contrast, is a loading problem. It is fixed by getting the rule into context (the `CLAUDE.md` importing `AGENTS.md`), not by a hook. And "was this review finding actually evidence-backed" fails the second condition outright. A hook sees only the command text, never the judgment call itself, so it can only ever nag, not decide. That class of rule stays prose and a chained Skill trigger. Those conditions gate promotion to a **host** hook. That is the involuntary layer that fires in every session under the maintainer's own credentials, and only the maintainer can grant an exemption from it. That is why the bar there is destructive harm. A **committed** hook in the repository's own tree is a third layer between prose and that one, and it is earned on weaker grounds. It is opt-in per clone, visible in the tree, and bypassable by design. It therefore fits a rule whose harm is a quality miss rather than a destruction. The second condition still binds it, since a hook that cannot decide its own trigger is a hook that nags. So what earns the layer is finding the decidable half of a rule whose other half is judgment. The local-review rule under `GOVERNANCE.md` "Verification Discipline" is the worked example. Whether a review's findings were rightly disposed of is judgment no hook can decide, and it stays prose. Whether a review pass ran over exactly the content being pushed is a receipt comparison, which the hub's own `.husky/pre-push` decides. +- **A handoff parked on a maintainer decision carries the `blocked` label too.** Its blocker is a `decision` issue in this same repository rather than an issue elsewhere, and the parking comment on the handoff names it. A reader reads the named issue rather than the label, and the blocker clears when that issue loses its `decision` label. Unlike a cross-repository blocker, a session finding it cleared does not take the label off. It comes off only once a session writes the next round and leaves no `decision` issue on that work unanswered, whichever session filed it. So a running loop never takes a handoff a present maintainer is still working, or one it could only park again. +- **A durable rule earns a mechanical hook only where a hook can actually decide it, otherwise it stays prose.** The conditions below must hold together, not any one alone. The failure recurs even after the governing prose was demonstrably read and understood. So it is not a discovery or loading problem that a structural fix would already solve. A structural fix here means getting the rule into context at all. The triggering shape is decidable from the tool call's own text, arguments, and working directory alone, with no semantic or contextual judgment required. And the failure is destructive or hard to reverse rather than a quality miss. One check within the worktree-isolation rule met all of them. The rule's lapses recurred under prose the agent had already read, and the harm is another task's swept or reverted work. Whether a mutating git command targets a primary checkout is a plain directory comparison. So that check was promoted to a `gh-write-guard` hook rule, requirement 6 of `host-setup/agent-safety/README.md` in the hub, and the rest of the rule stays prose. A skill's own trigger going unread by the session at all, by contrast, is a loading problem. It is fixed by getting the rule into context (the session loading `AGENTS.md` at start), not by a hook. And "was this review finding actually evidence-backed" fails the second condition outright. A hook sees only the command text, never the judgment call itself, so it can only ever nag, not decide. That class of rule stays prose and a chained Skill trigger. Those conditions gate promotion to a **host** hook. That is the involuntary layer that fires in every session under the maintainer's own credentials, and only the maintainer can grant an exemption from it. That is why the bar there is destructive harm. A **committed** hook in the repository's own tree is a third layer between prose and that one, and it is earned on weaker grounds. It is opt-in per clone, visible in the tree, and bypassable by design. It therefore fits a rule whose harm is a quality miss rather than a destruction. The second condition still binds it, since a hook that cannot decide its own trigger is a hook that nags. So what earns the layer is finding the decidable half of a rule whose other half is judgment. The local-review rule under `GOVERNANCE.md` "Verification Discipline" is the worked example. Whether a review's findings were rightly disposed of is judgment no hook can decide, and it stays prose. Whether a review pass ran over exactly the content being pushed is a receipt comparison, which the hub's own `.husky/pre-push` decides. `GOVERNANCE.md` "Durable Knowledge and Self-Improvement" keeps the full rules. The `agent-conduct` Skill at `.agents/skills/agent-conduct/SKILL.md` in the hub carries it whole as a generated include and surfaces it at its decision moments. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. diff --git a/.github/skills/audit-a-repo/SKILL.md b/.github/skills/audit-a-repo/SKILL.md index 5e543ea..29685d2 100644 --- a/.github/skills/audit-a-repo/SKILL.md +++ b/.github/skills/audit-a-repo/SKILL.md @@ -22,8 +22,8 @@ The audit is the fleet's measurement procedure. The failure shapes it guards aga ## Before Measuring Anything - **Route first.** A repo with no carried instruction set, or a partial one, has a baseline that never arrived rather than drift to report (`AUDIT.md` section 0). It therefore goes to `STANDUP.md` sections 1A and 2 first (`AUDIT.md` section 0). Auditing it anyway produces a report that is all absences and reads as catastrophe. -- **Verify the host.** Run `python3 scripts/host_gate.py --repo ` from the hub checkout before any hub tool, and pass `--repo`, since a bare run skips the target's own `host-tools.json` overlay. A stale tool answers `--version`, looks healthy, and produces a wrong answer. -- **Read `main` as ground truth**, for every workflow model, and read `develop` only to detect divergence (`AUDIT.md` section 1). An `operational` repo's `develop` is mid-flight by design. Conformance work sitting there is therefore un-promoted work, not a defect, and it counts when it reaches `main`. Use `uv run --no-project --script spec/audit.py --branch ` to preview in-flight work, which stamps the override so the finding cannot be mistaken for one against ground truth. +- **Verify the host.** Run `python3 scripts/host_gate.py --repo ""` from the hub checkout before any hub tool, and pass `--repo`, since a bare run skips the target's own `host-tools.json` overlay. A stale tool answers `--version`, looks healthy, and produces a wrong answer. +- **Read `main` as ground truth**, for every workflow model, and read `develop` only to detect divergence (`AUDIT.md` section 1). An `operational` repo's `develop` is mid-flight by design. Conformance work sitting there is therefore un-promoted work, not a defect, and it counts when it reaches `main`. Use `uv run --no-project --script spec/audit.py --branch "" ""` to preview in-flight work, which stamps the override so the finding cannot be mistaken for one against ground truth. ## Measuring @@ -31,18 +31,18 @@ The audit is the fleet's measurement procedure. The failure shapes it guards aga - **Know what the runner does and does not prove.** `spec/audit.py` mechanizes the deterministic subset only: settings, rulesets, secret names, file and section presence, verbatim hashing, interface wiring, Dependabot coverage, branch facts. It evaluates no check under a type in `spec/project-types.json` (`AUDIT.md` section 4). So every per-type check is judged by hand, and a clean run is no evidence for them (`AUDIT.md` section 4). Silence from a tool that was never looking reads exactly like a pass. - **Judge letter and intent per check** and keep the vocabulary. A letter miss with intent satisfied is a drift finding. Both missing is a defect. Operational is binary over the applicable set. That vocabulary is in `AUDIT.md` sections 4 and 7. Do not invent a parallel scheme. - **Assert the Actions implement `WORKFLOW.md`** by outcome, not by matching catalog snippets byte for byte (`AUDIT.md` section 5). The method is the 5A static audit, each applicable guarantee cited in the form 5A sets out, then the 5B trace scenarios (`AUDIT.md` section 5). Read a workflow the repo only calls at the SHA it pins, throughout. The `workflow-ci-contract` skill summarizes that contract. -- **Check live settings, rulesets, and secrets from a hub checkout at `main`** with `AUDIT.md` section 6. Use a hub checkout at `develop` instead while the target's registry entry has merged there but not yet reached `main`. Run `repo-config/configure.sh check` with the target repository and model for settings and rulesets, and `uv run --no-project --script spec/audit.py [RepoName]` for secrets, rather than constructing a local comparison. The hub payloads are the only repository-configuration source. +- **Check live settings, rulesets, and secrets from a hub checkout at `main`** with `AUDIT.md` section 6. Use a hub checkout at `develop` instead while the target's registry entry has merged there but not yet reached `main`. Run `repo-config/configure.sh check` with the target repository and model for settings and rulesets, and `uv run --no-project --script spec/audit.py ""` for secrets, rather than constructing a local comparison. The hub payloads are the only repository-configuration source. ## Reporting -- **Write `reports//audit.md` from `reports/_template.md`**, `` being the repository name in lowercase. Findings are ranked most severe first, each with the `file:line` it was judged against. Quote the run stamp. The stamp is quoted because findings are a point-in-time snapshot. All of this is in `AUDIT.md` section 8. +- **Write `reports//audit.md` from `reports/_template.md`**. Findings are ranked most severe first, each with the `file:line` it was judged against. Quote the run stamp. The stamp is quoted because findings are a point-in-time snapshot. All of this is in `AUDIT.md` section 8. - **The hub authors the report.** A downstream repo never opens a hub pull request to write its own, which would be self-certification. Downstream context goes into issues filed against the hub instead. -- **Generate a convergence issue, never compose one**: `uv run --no-project --script spec/audit.py --issue ` emits it from live findings. A finding judged by hand goes under the fixed `## Manual findings` heading that body ends with. That is the issue's one hand-written section, and regenerating replaces only the text above it (`AUDIT.md` section 8). An agent picking such an issue up re-runs the audit first and acts on the live result, not the pasted findings. +- **Generate a convergence issue, never compose one**: `uv run --no-project --script spec/audit.py --issue ""` emits it from live findings. A finding judged by hand goes under the fixed `## Manual findings` heading that body ends with. That is the issue's one hand-written section, and regenerating replaces only the text above it (`AUDIT.md` section 8). An agent picking such an issue up re-runs the audit first and acts on the live result, not the pasted findings. - **Reconcile registry `driftNotes` in the same pass**: a resolved deviation's note is deleted, not left describing finished work. A note naming a check id is retired by a person, not by a run. All of this is in `AUDIT.md` section 8. - **Stale-versus-modified classification and the intent staleness advisory need a full hub clone with git history.** In a shallow clone the audit reports one ERROR per repo and exits non-zero, so run `git fetch --unshallow origin` in the hub checkout first. To verify one finding without history, compare against the current hub canonical on `main`, which decides current-match only. ## After the Report -Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10. In that section, fixes ship as pull requests on the target repo, one focused pull request per drift class. In that section too, the Copilot loop is driven to green per the `pr-review-conduct` skill, and the maintainer merges. For a repo already stood up, `RESYNC.md` sequences the findings, since order matters (a deletion lands before the re-vendor that would refresh it). Its section 6 states the one grouping. Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo. Spec questions are escalated rather than resolved silently. Both are in `AUDIT.md` section 9. +Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10. In that section, a file fix ships as a pull request on the target repo, one focused pull request per drift class. In that section too, the agent drives the fix pull request into the target's `develop` to green, per the `pr-review-conduct` skill. Once the maintainer merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one, and drives it to green. The maintainer merges that too. On an operational repository, the agent confirms that a promotion is wanted before opening one, per `drive-pr`. The re-audit runs once the fix is on `main`. For a repo already stood up, `RESYNC.md` sequences the findings, since order matters (a deletion lands before the re-vendor that would refresh it). Its section 6 states the one grouping. Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo. Spec questions are escalated rather than resolved silently. Both are in `AUDIT.md` section 9. -An audit leaves no checkout behind it, since one left standing is what a later sweep has to tell apart from live work. Each is removed when the run ends, per `repo-worktree` "Listing and Cleanup". The report's pull request is cleaned up once it merges, with `uv run --no-project --script scripts/pr_review.py cleanup --repo ptr727/ProjectTemplate --checkout `. A detached checkout at `main` that only read the hub is removed by hand once it is clean. +An audit leaves no checkout behind it, since one left standing is what a later sweep has to tell apart from live work. Each is removed when the run ends, per `repo-worktree` "Listing and Cleanup". The report's pull request is cleaned up once it merges, with `uv run --no-project --script scripts/pr_review.py cleanup "" --repo ptr727/ProjectTemplate --checkout ~/repos/ProjectTemplate`, `~/repos/ProjectTemplate` being the hub's primary clone. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. Spell every `scripts/pr_review.py` call this skill prints as `pr-review-conduct` "Expected review loop" says. A detached checkout at `main` that only read the hub is removed by hand once it is clean. diff --git a/.github/skills/backlog-burndown/SKILL.md b/.github/skills/backlog-burndown/SKILL.md index 661a2e1..5538580 100644 --- a/.github/skills/backlog-burndown/SKILL.md +++ b/.github/skills/backlog-burndown/SKILL.md @@ -74,19 +74,46 @@ Working them is out of this skill's scope, and a fleet-wide backlog sweep is a d ## The Round -A round is the unit. Each one runs these steps in order. +A round is the unit. Each one runs these steps, step 6 repeating as each worker ends. 1. **Rank** every open issue, per "Ranking". -2. **Group** the top of that ranking, per "Grouping and File Claims". +2. **Group** the top of that ranking, per "Grouping and File Claims", until each free slot holds a + group that passes step 3. A slot is free only while both dispatch limits in "Grouping and File + Claims" leave room for the group taking it. 3. **Verify** each group's predicted file set against everything in flight before dispatching - anything. A group whose files are already claimed waits for the next round. -4. **Dispatch** at most four workers, one per group, per "Dispatching a Worker". + it. A group whose files are already claimed waits for a refill that finds them free, or for + the next round. A file a parked group claims can pass to it instead, per "Grouping and File + Claims". +4. **Dispatch** one worker per group, within the dispatch limits in "Grouping and File Claims", per + "Dispatching a Worker". The scratchpad check in step 6 applies to each dispatch. 5. **Collect** each worker's outcome: merged to develop, stopped on a maintainer-only question, parked behind another group's file claim, handed back for review, or abandoned. The adjudication in "Grouping and File Claims" and a confirmed-gone worker each produce that outcome. Bound this wait per "Bounding the Wait on a Worker". The orchestrator records a handed-back pass and continues the same worker. -6. **Clean up** the worktrees, local branches, and remote branches of every group that has - merged or been abandoned, per "Dispatching a Worker". + **Each owed action a merged group reports is held by an issue before the round promotes + or ends**, per "Dispatching a Worker". Only an `**Owed action:**` issue that names the action + and the pull request owing it holds it. A later pull request owing the same step gets an issue of its own. "Needs the Maintainer" under "Away Mode" defines such an issue. + "Ranking" never ranks one, so no `Closes on promotion:` line closes it. The orchestrator files one where none holds it. The issue names + the pull request owing the action. It says whose step it is, any promotion or release it waits on, and each step's command in order. Every owed action the run collects gets one issue, an action already done included. + Attended, where the step is the maintainer's, the orchestrator also offers the maintainer a walk-through. It gives one step at a time, + each confirmed done before the next. An action that needs a promotion or a release first gets no offer. + Where the maintainer confirmed the step done, in a walk-through or otherwise, a comment on the issue says so and it is closed. + Any other issue stays open with no done comment, so the maintainer confirms the step there. That includes an action the run only + believes done, and a declined or unfinished walk-through. +6. **Clean up and refill as each worker ends**, rather than once the round's last worker has. + Clean up the worktree, local branch, and remote branch of a group that merged or was abandoned, per + "Dispatching a Worker". A group's scratch is part of that cleanup. Once the worktree or fallback + clone is verified and removed, delete the group's scratch directory the brief named. Never delete one that still holds a + worktree git lists. Before + each new dispatch, check the filesystem holding the scratchpad, for example with Python's + `shutil.disk_usage`. Where it is more than 80% used, dispatch no more groups and report to + the maintainer. Otherwise run steps 1 to 3 afresh for the free slots and dispatch the groups + they form. Refilling stops once step 7 + starts. From then, and under the freeze, "The Promotion Boundary" step 6 says what may be + dispatched. In an attended run, a free slot goes first to a stopped group whose question is + answered. The + round moves to step 7 once no worker is in flight and no group can be dispatched. A round + prepared under the freeze first waits for that merge, per step 8. 7. **Promote**, per "The Promotion Boundary". 8. **Re-rank from scratch**. Whenever a promotion pull request is still waiting on the maintainer, the next round prepares under the freeze "The Promotion Boundary" describes. Under that freeze @@ -96,7 +123,7 @@ A round is the unit. Each one runs these steps in order. can rank high once a sibling fix lands. **Measure the run's net flow before that ranking**, read fresh each round rather than carried. Count the issues created since the run began, leaving out what "Ranking" leaves out of every - count and any `decision`. Count the issues fixed since then, with the same exclusions. Those + count, any `decision`, and any `**Owed action:**` issue. Count the issues fixed since then, with the same exclusions. Those are the issues closed since then as completed, and those awaiting promotion as "Ranking" reads that set. Leave out every issue that awaited promotion when the run began. The run records that set in its working notes at its start, and the away planner's brief carries it. Report both counts beside the backlog @@ -156,9 +183,20 @@ split "The Chain" describes, which this run does not make, and the narrowed issu that split lands. The round's report names each issue held back this way, its platform, and whether it waits on a split, as it names a `blocked` one. +An issue whose remaining work lies wholly in another repository is counted and is not ranked, as +one that needs a platform is. No mode touches another repository, per "What Invoking This Skill +Authorizes". So this run gives it no group, no worker, and no claim. The round's report names each +such issue, its repository, and what would move it, such as a tracking issue or a session there. It names the issue as needing the maintainer only where that repository is under +another owner, since a write there needs the maintainer's permission. + +An `**Owed action:**` issue, as "Needs the Maintainer" under "Away Mode" defines one, is counted and is not +ranked, since no diff takes the step. The round's report names each one and whose step it is. +It is held back under that reason alone, never as needing the maintainer, unless it waits on the +maintainer already as "Needs the Maintainer" states. + An issue that asks a question rather than states a defect is not ranked and is never guessed at. It has no group, no worker, and no claim, so nothing in "Raising a Blocked Question" applies to it -except how the question travels. It goes to the maintainer at the end of ranking, per +except how the question travels. It goes to the maintainer at the end of the first ranking that meets it, per `GOVERNANCE.md` "Communicating with the User". It does not wait for a stop that may not come. It is batched with any other question the run is sending at that moment, and goes in a prompt of its own otherwise. It stays unranked until answered. An issue carrying `decision` is such a question already @@ -210,13 +248,14 @@ Group so that **no file is claimed by two live groups at once.** This is the rul for, and it binds harder than any throughput target. - **Group by the files a fix will touch**, not by the issues' subject matter. Two issues that read - as unrelated but both edit a shared governance file are one group. Two issues that read as near + as unrelated but both edit a shared governance file share a group, up to the group cap below. Two issues that read as near duplicates but touch different files are two groups. - **Genuine duplicates are one group.** Never close an issue during triage on the orchestrator's own judgment. Comment to cross-link the pair, and let the fix close both. - **Closing keywords go on the promotion pull request**, not the feature pull request, per - `branching-and-release-model`. A feature pull request merging into develop fires no - auto-close, so a `Fixes #N` line there closes nothing. **The feature pull request body instead + `branching-and-release-model`. A repository's squash setting can copy the body into the commit, + as the hub's does. Then a `Fixes #N` line there closes #N when the promotion brings that commit + to main, a closure no promotion body stated. **The feature pull request body instead carries a line reading `Closes on promotion: #N`**. It lists every issue that pull request actually fixes and nothing it merely mentions. The promotion body is assembled from that line, per "The Promotion Boundary". GitHub reads a closing keyword only where the issue reference @@ -227,7 +266,7 @@ for, and it binds harder than any throughput target. that behavior. That is the doc, the manifest entry, or the rule sentence `GOVERNANCE.md` "Verification Discipline" makes the change's own to fix. Find them by searching the tree for the identifier, flag, check name, or rule phrase the fix changes, rather than by guessing which - docs apply. Two groups needing one such file are one group, per the first bullet. A predicted + docs apply. A predicted edit lands before the first push, where it costs no extra CI run or hosted review. - **Record every claim on the issue itself**, as a comment naming the predicted file set **and the branch that holds it**, before dispatching. The comment opens with `**Backlog burndown claim` @@ -254,10 +293,15 @@ for, and it binds harder than any throughput target. - **Verify the prediction before dispatching**, against everything in flight, which is wider than this round. In flight covers the files changed by every open **feature** pull request on this repository. It also covers the claim comments of every group still holding a branch, parked - groups from earlier rounds included. + groups from earlier rounds included. It covers too the claim of each group dispatched whose + worker has not yet ended. A worker creates its branch only once it runs. A worker handed back + for review has not ended, since the same worker is continued. The orchestrator reads + that set from the assignments and outcomes its working notes hold, per "Run State". A refill + planner's brief names the groups in it. A claim comment alone cannot say, since a merged group's cleanup + leaves its claim reading like one whose worker has yet to start. `gh pr list --state open --limit 1000 --json number,baseRefName,headRefName,isCrossRepository --jq '.[] | select(.headRefName != "develop" or .baseRefName != "main" or .isCrossRepository) | .number'` lists the open pull requests, its filter applying the promotion exclusion below. - `gh pr diff --name-only` then reads each one's files. `git worktree list` reports the + `gh pr diff "" --name-only` then reads each one's files. `git worktree list` reports the registered worktrees and the branch checked out in each. That is not the same as every branch that exists. So pair it with `git branch -r`, after `git fetch --prune origin`, for one that was pushed and whose worktree is already gone. Pair it also with `git branch` for one that was never @@ -269,8 +313,8 @@ for, and it binds harder than any throughput target. the web interface. A plain fetch leaves that ref in `git branch -r` to defer valid groups forever. Stop and report a failed fetch rather than reading `git branch -r` anyway, per `GOVERNANCE.md` "Verification Discipline" on what a local clone answers for. Here the scan would - miss a branch pushed since the last successful fetch and keep one deleted since it. The round - stops there and reports, rather than dispatching against a stale answer. Stopping rather than + miss a branch pushed since the last successful fetch and keep one deleted since it. Dispatch + stops there and the failure is reported, rather than dispatching against a stale answer. Stopping rather than deferring is what the cleanup and promotion steps need too, since both read the same remote. Those three enumerate the branches, with one gap. A branch in the standalone clone `repo-worktree` allows as a fallback is reached only once it is pushed. That is because @@ -281,29 +325,48 @@ for, and it binds harder than any throughput target. open promotion pull request from that enumeration.** Its diff is all of `origin/main..origin/develop`, so counting it claims nearly every file any earlier round touched. A round run during the freeze would then defer every group it formed. A predicted claim that - collides with a real one is a group deferred to the next round, never one dispatched hoping the - overlap stays small. + collides with a real one is a group deferred to a later refill or the next round. It is never + one dispatched hoping the overlap stays small. - **A branch no claim comment covers still has to yield a file set.** The maintainer's own worktree and a hand-driven task's branch are enumerated above and carry no claim comment. So reading only the comments records them as holding nothing. That is the collision this section exists to prevent rather than the absence of one. Read the branch itself instead: - `git diff --name-only origin/...` for what it has committed, and, for a - registered worktree, `git -C status --porcelain` for what it holds uncommitted. + `git diff --name-only "origin/..."` for what it has committed, and, for a + registered worktree, `git -C "" status --porcelain --untracked-files=all` for what it + holds uncommitted. `` is the `baseRefName` of the branch's pull request where it has one, and `develop` otherwise. That is because `repo-worktree` "The Base Branch" lets a task branch from `main`. Read against `develop`, a `main`-based branch can list files it never touched, which errs toward a collision rather than a miss. Where neither read is available the set is unknown rather than empty, and an unknown set collides with every group. So ask the maintainer what that branch holds, per "Raising a Blocked Question". +- **A file a parked group claims can pass to a live group**, which then need not wait for it. It + passes only where the parked branch, read live, holds no commit touching that file. After the prune + fetch above, run `git log --full-history --format=%H "origin/.." -- ""`, with `` as the + bullet above gives it. Run it for `` and for `origin/`, whichever exist. Run it with `git -C ""` + for `` in a standalone clone the claim comment names, too. Each exiting 0 and printing nothing is that read. + It reads commits rather than the net diff above, so an edit the branch later reverted still holds the file. The `--full-history` flag keeps a merge from hiding a side-branch commit it resolved back out. A merge of `` into the branch can list too, which errs toward keeping the file with the parked group. + The parked branch's checkouts must also hold no uncommitted change to the file. They are the worktree + `git worktree list --porcelain` shows holding ``, and any standalone clone the claim comment names. + So `git -C "" status --porcelain --untracked-files=all -- ""` exits 0 and prints nothing in each. + A non-zero exit, or no ref to read, is a read that cannot be made. A read + that cannot be made keeps the file with the parked group. Record the pass on the parked group's claim + comment, keeping its `**Backlog burndown claim` opening. Add a line opening with + `**Passed ():**` that names the file and the receiving group's issues. A file + such a line names is no longer that claim's. When the parked group resumes, the seat running "The + Round" steps 1 to 3 predicts its file set again. It verifies that set as any prediction is verified. + Once it verifies, that seat rewrites + the claim comment with that set and drops each `**Passed` line. A promotion fix takes a + parked holder's file whatever its branch holds, per "The Promotion Boundary" step 5. - **Re-verify when a worker reports that its real file set grew** beyond its claim. A worker needing a file outside its claim stops and reports rather than editing it. A file may sit on a branch no claim comment covers, or on one whose set is unknown. Then the worker is stopped for the maintainer per "Raising a Blocked Question". Where no branch holds the file, the orchestrator - verifies that as it verifies a prediction. It then extends the claim comment at once. A grown + verifies that as it verifies a prediction. It then extends the claim comment. A grown set failing the tier test in "Choosing the Worker's Model Tier" under a worker below `frontier` stops the group there. One passing it lets the worker continue, unless the agent-safety hold below applies. That is the ordinary path for a doc describing the group's own change, and it is - answered at once rather than at a round boundary. Where another group holds the file, the need + answered without waiting for a round boundary. Where another group holds the file, the need is a conflict. The orchestrator decides which group keeps the file and tells the loser what to do rather than leaving it to choose. The loser narrows its change to drop that file, parks until the holder merges, or abandons its branch per "Cleanup Is the Orchestrator's". Some losers need @@ -323,13 +386,24 @@ for, and it binds harder than any throughput target. drifts from the real claim it exists to report. A group told to abandon its branch keeps its claim comment unchanged, since cleanup decides whether that claim is released, per "Cleanup Is the Orchestrator's". -- **Cap the round at four workers**, whatever the grouping allows. +- **Cap each group at three issues and four predicted files.** A wide group draws the most review + passes and sets the round's tail. A refill shortens the idle time around that tail but not the + tail itself. Where the ranking would form a wider group, its lower-ranked issues wait for a later + group, which a refill can dispatch once this one merges. Genuine duplicates count as one issue, + and an issue holding nothing but a question counts as none. A file a generator writes from + another in the set does not count. An issue predicting more than + four files on its own forms a group by itself. +- **Limit the round's dispatch to four workers at once and eight groups in all**, whatever the + grouping allows. A group counts once in a round, however many workers it takes. So a group + resuming in the round it stopped in takes no second place among the eight. One resuming in a + later round counts there. A promotion fix counts toward neither limit. ## Bounding a Prose Group A group whose files are prose-heavy Markdown bloats in a way a code group does not. It needs its own bound stated in the worker's brief. +- **The group's scope is capped** per "Grouping and File Claims", and the brief names that cap. - **The change reaches the units the issue names and the units it puts in disagreement.** A unit stating the rule or behavior the change altered is this change's to fix wherever it sits in this repository, per `GOVERNANCE.md` "Verification Discipline". Its edit is the smallest one that makes it true again. @@ -358,21 +432,38 @@ Brief on `AGENTS.md` "Context and Delegation Discipline"'s subagent shape. another's worktree. That is why "Bounding the Wait on a Worker" removes a dead worker's tree, with or without its branch, or leaves that tree untouched for the maintainer. It never passes the tree on, for the same reason. -- **The worker reports the path of the checkout it worked in**, with its outcome. A standalone +- **The worker reports the path of the checkout it worked in**, with its outcome. It also reports + a missing or wrong shared git hook it met, per `repo-worktree` "Preparing Git Hooks". A standalone clone, the fallback `repo-worktree` allows, appears in no `git worktree list`. So a worker choosing that fallback records the clone's directory name, `-`, on each of its group's claim comments before cloning. Each edit keeps the comment's `**Backlog burndown claim` opening. The brief says so, and names the temporary root the clone goes under. The comment carries the name rather than the path, since the path can name the local account. The recorded name is the only way "Cleanup Is the Orchestrator's" can find a dead worker's clone. -- **The worker does no cleanup**, which is this skill's one stated override of `drive-pr`'s - post-merge cleanup and of `repo-worktree`'s post-merge procedure. Say so in the brief, because - a worker following either alone will clean up. The worker still performs the merge itself, with +- **The worker deletes the scratch it made that is not its working checkout, before its final + return.** A hand-back it is continued from is not one. The brief names one scratch directory for + the group under the scratchpad, and the worker makes all of it there. That is its environments, + copied data, build roots, and any comparison or baseline tree it added. A baseline added as a + worktree goes through a non-force `git worktree remove`, and an extra comparison clone is deleted. + A baseline git refuses to remove is left and reported with its path. The worker never deletes its + own working worktree or fallback clone, which "Cleanup Is the Orchestrator's" verifies and + removes. The brief names the run's one `UV_CACHE_DIR`, which the worker's own uv commands use. Its + `scripts/pr_review.py` calls follow the spelling rule the brief quotes. The worker builds a + baseline with `git worktree add` over the repository it is already working in, never a second + clone. +- **The worker does no cleanup of its working checkout or branches.** That is this skill's one + stated override of `drive-pr`'s post-merge cleanup and of `repo-worktree`'s post-merge + procedure. Say so in the brief, because a worker following either alone will clean up. The worker still performs the merge itself, with `drive-pr` step 4's `merge` run without `--cleanup` or `--checkout`, and none of that step's `cleanup` routes run. What the override moves is the two cleanup halves `drive-pr` runs after it, the worktree procedure and the verify-then-delete of the merged remote branch. It moves **both** rather than only the first. "Cleanup Is the Orchestrator's" below, in this same section, says why and what it covers. +- **The brief quotes the `merge` command in `drive-pr` step 4's exact spelling**, without + `--cleanup` or `--checkout`. It also quotes, whole, the paragraph in `pr-review-conduct` "Expected review loop" + on spelling a `scripts/pr_review.py` call. A worker that writes the call another way, adding a + cache variable for one, sends its merge to the auto-mode classifier. That classifier refuses a merge no + human has approved. - **A worker that cannot dispatch a subagent hands back its worktree path, target, and digest.** The brief says so per `local-strict-review` "Running It", and says the orchestrator can continue the same worker after recording. - **The brief names the branch the worker will use**, which is what lets the claim comment record @@ -380,7 +471,7 @@ Brief on `AGENTS.md` "Context and Delegation Discipline"'s subagent shape. one of its choosing. That is because a claim naming a branch nobody used points at nothing. A brief dispatching an issue returned to the ranking names a new branch. A branch a claim comment names for the first time is one no pull request on the repository has - used as its head. That is checked with `gh pr list --head --state all` before the + used as its head. That is checked with `gh pr list --head "" --state all` before the comment is written. - **The brief quotes `pr-review-conduct` outcome 4 whole and adds no instruction of its own to file a review finding.** A worker reads its brief as the more specific instruction. So a brief saying "file a @@ -395,8 +486,20 @@ Brief on `AGENTS.md` "Context and Delegation Discipline"'s subagent shape. - **The brief requires the `Closes on promotion:` line** in the pull request body, listing exactly the issues this group fixes. A worker never reads this skill, and `drive-pr` does not ask for the line. So a brief that omits it produces a pull request nothing can derive a closing set from. + On an operational-model repository the brief also requires a `Reopens on promotion:` line where + the group undoes a fix already in the range. Without it the promotion closes an issue whose fix + the range no longer holds. It also has the worker draft that body, and each rewrite of it, in a file named for its branch. Workers sharing a scratch directory and one file name each publish the other's draft. +- **The brief asks the worker to report every owed action its change creates**, apart from its + review findings. An owed action is a step outside the diff, usually the maintainer's, without + which a machine or the fleet stays inconsistent once the change merges. Examples are a migration + script, a live `configure.sh apply`, a first live run, and a fleet resync. The worker names, + for each, whose step it is, any promotion or release it waits on, and each step's command in order. It also writes each under a fixed `## Owed actions` heading in its + pull request body before merging, which "Bounding the Wait on a Worker" reads back. That heading + only carries an action, since a `Closes on promotion:` line still closes its source issue. "The + Round" step 5 says how each one is held. Review findings stay `pr-review-conduct` outcome 4's, and this changes + nothing about them. - **The brief names the files this group owns and the files it must not touch.** A subagent never reads this skill, so a claim it was never given is a claim it cannot respect. State this group's claimed set, and state that any other group's file is out of bounds. Also state the duty that @@ -409,7 +512,7 @@ Brief on `AGENTS.md` "Context and Delegation Discipline"'s subagent shape. installed skills need not match develop, since some installs snapshot promoted `main`. So a rule merged to develop during the run may not reach it. In the hub, the brief tells the worker to read each fleet skill from develop as it invokes it. That covers any reference file it links. - The read is `git fetch origin develop && git show origin/develop:.agents/skills//`, + The read is `git fetch origin develop && git show "origin/develop:.agents/skills//"`, in place of the installed copy. The orchestrator reads the skills it applies the same way at each round's start. Reading develop rather than the worker's own tree also covers a worker on an older branch, such as a resumed group. A downstream repository has no such gap, since its skills come from the hub. @@ -425,10 +528,13 @@ that concurrently mutate one shared checkout, which `GOVERNANCE.md` "Repository Write Safety" forbids. So the whole procedure moves to the orchestrator. -It runs the procedure against the base clone at the round's cleanup step, while no worker is live in a tree it touches. +It runs the procedure against the base clone as each group's worker ends, per "The Round" step 6. +It runs it while no worker is live in a tree it touches. It carries the remote half of `drive-pr`'s post-merge cleanup too. -For a merged group both halves are one command, `uv run --no-project --script scripts/pr_review.py cleanup --repo / --checkout `. -It is run from a hub checkout once for each merged group, `` being the repository's primary clone. +For a merged group both halves are one command, `uv run --no-project --script scripts/pr_review.py cleanup "" --repo "/" --checkout ~/repos/""`. +Spell every `scripts/pr_review.py` call this skill prints as `pr-review-conduct` "Expected review loop" says. +The command is run from a hub checkout once for each merged group, `~/repos/` being the repository's primary clone. +That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. It deletes the remote branch, then removes the group's worktree and local branch, per `repo-worktree` "Listing and Cleanup", which also says what its exit leaves to do. Taking that step from the worker without naming a new owner would leave a live remote branch behind every group. `cleanup` holds the delete's checks, among them the tip against the pull request's `headRefOid`. @@ -441,9 +547,10 @@ A group told to abandon its branch keeps a registered worktree until something r That worktree holds a live claim that would collide with the very group the next round re-forms for the same issue. For a merged group the procedure is deferred rather than changed: `repo-worktree`'s verify-before-removing and prove-the-cleanup steps run unchanged, just later and in one seat. A merged group that worked in a standalone clone is checked before anything is deleted, since `cleanup` sees only the base clone's registered worktrees. -The orchestrator confirms the clone the worker reported or recorded is clean and its branch tip is at the pull request's `headRefOid` or behind it. +The orchestrator confirms the clone the worker reported or recorded is clean by `repo-worktree` "Listing and Cleanup"'s hand-removal read. +It also confirms the clone's branch tip is at the pull request's `headRefOid` or behind it. `repo-worktree` "Listing and Cleanup" accepts both, since a GitHub "Update branch" merge leaves a tip behind it that holds nothing the merge lacks. -After `git -C fetch origin `, `git -C merge-base --is-ancestor refs/heads/ ` exits `0` in both cases. +After `git -C "" fetch origin ""`, `git -C "" merge-base --is-ancestor "refs/heads/" ""` exits `0` in both cases. Where either confirmation fails, nothing is deleted and the group is stopped for the maintainer per "Raising a Blocked Question". Where both hold, `cleanup` runs as for any merged group and deletes the remote branch. The orchestrator then removes the clone, per `repo-worktree` "Listing and Cleanup". @@ -451,8 +558,8 @@ The orchestrator then removes the clone, per `repo-worktree` "Listing and Cleanu **Retiring a worktree and deleting its branch are two dispositions with two tests.** Citing one for the other is how a removal that discards nothing gets routed to the maintainer. It is also how a removal that discards commits gets waved through. Retiring a worktree alone, the branch left -standing, risks only what is uncommitted in it. A clean tree is the whole test, and the branch's -own contents do not enter it. A tree that is not clean is left exactly as it stands while the +standing, risks only what is uncommitted in it. A tree clean by `repo-worktree` "Listing and +Cleanup"'s hand-removal read is the whole test, and the branch's own contents do not enter it. A tree that is not clean is left exactly as it stands while the group is stopped for the maintainer per "Raising a Blocked Question". Deleting the branch as well risks what is committed, so it carries whichever branch check the group's state calls for. That is `repo-worktree`'s verify-before-removing for a group whose pull request merged. It is the no-merge @@ -468,7 +575,7 @@ abandon its branch reports its worktree path and ends without discarding anythin orchestrator waits until the dispatch mechanism reports that the worker has ended, per "Bounding the Wait on a Worker". It then reads a live `git worktree list --porcelain` for a linked worktree, an entry other than the first, whose `branch` line names the claimed branch. Where one exists, it -runs `git -C reset --hard` and then `git -C clean -fd`, `` being that entry's +runs `git -C "" reset --hard` and then `git -C "" clean -fd`, `` being that entry's `worktree` line. It discards nothing in any other tree. Where none exists and the worker reported or recorded no standalone clone, nothing is discarded and the group is stopped for the maintainer per "Raising a Blocked Question". A standalone clone follows the clone paragraph below. The @@ -477,32 +584,32 @@ branch's commits stay for the branch check below. An abandoned group, and a dead worker's clean tree, have no merged pull request for `repo-worktree`'s verify-before-removing step to read. So that step gives way here to a check of what it exists to establish, that nothing unmerged is being thrown away. -The orchestrator records the local tip with `git rev-parse refs/heads/`. -After `git fetch origin develop`, `git merge-base --is-ancestor refs/remotes/origin/develop` must exit `0`, and the worktree must be clean. +The orchestrator records the local tip with `git rev-parse "refs/heads/"`. +After `git fetch origin develop`, `git merge-base --is-ancestor "" refs/remotes/origin/develop` must exit `0`, and the worktree must be clean by `repo-worktree` "Listing and Cleanup"'s hand-removal read. Where both hold, the worktree and local branch are removed by hand, since `cleanup` needs a merged pull request to read. -The removal is `git worktree remove `, then `git update-ref -d refs/heads/ `. +The removal is `git worktree remove ""`, then `git update-ref -d "refs/heads/" ""`. That delete refuses only where the branch has moved off the tip the is-ancestor check judged, so it discards nothing that check did not clear. `git branch -d` would not agree with that check, since it judges a branch with no upstream against `HEAD`, and the fetch does not advance local develop. -Where `git config --get-regexp '^branch\.\.'` prints anything, `git config --remove-section branch.` then removes the tracking `git branch -d` would have removed. +Where `git config --get-regexp '^branch\.\.'` prints anything, `git config --remove-section "branch."` then removes the tracking `git branch -d` would have removed. A refusal stops the group for the maintainer per "Raising a Blocked Question". Where the branch was never pushed, the orchestrator records the release once both succeed. -It edits the group's claim comment, and the issue returns to the next round's ranking. +It edits the group's claim comment, and the issue returns to the ranking. Where it was pushed, the orchestrator also deletes the remote branch, since `cleanup` needs a merged pull request to read. That is the one remote delete this skill types by hand. The delete runs only where two more checks hold. -The remote tip, read live with `git ls-remote --exit-code origin refs/heads/`, equals the recorded tip. +The remote tip, read live with `git ls-remote --exit-code origin "refs/heads/"`, equals the recorded tip. And no open pull request uses the branch as its head or its base. -`gh pr list --head --state open --json number --jq length` prints `0`, and so does the same command with `--base`. -The delete is `git push origin --delete `, an outward-facing write bound by `GOVERNANCE.md` "Repository Boundaries and Write Safety". +`gh pr list --head "" --state open --json number --jq length` prints `0`, and so does the same command with `--base`. +The delete is `git push origin --delete ""`, an outward-facing write bound by `GOVERNANCE.md` "Repository Boundaries and Write Safety". So it names the exact branch, takes every identifier from a live read, and keeps its output unsuppressed. -The orchestrator then reads the ref back with `git ls-remote --exit-code origin refs/heads/`, and only its exit `2`, no matching ref, confirms the delete. -Only after that confirmation is the release recorded on the claim comment, and the issue then returns to the next round's ranking. +The orchestrator then reads the ref back with `git ls-remote --exit-code origin "refs/heads/"`, and only its exit `2`, no matching ref, confirms the delete. +Only after that confirmation is the release recorded on the claim comment, and the issue then returns to the ranking. Where any check fails or the delete is not confirmed, the claim is kept and the group is stopped for the maintainer per "Raising a Blocked Question". Where a confirmation fails for an abandoned group, cleanup stops there and the group is stopped for the maintainer. That stop is per "Raising a Blocked Question", since past that point removal discards work. A dead worker's clean tree whose branch fails the check is retired alone instead, per "Bounding the Wait on a Worker". Where a pushed branch still heads or bases an open pull request, what goes to the maintainer names that pull request. -A worker still live, a promotion fix included, keeps its worktree until the next round's cleanup step. +A worker still live, a promotion fix included, keeps its worktree until it ends and its group's cleanup runs. **A standalone clone holds its branch alone**, since the base clone does not register it. So the base-clone commands above do not reach it, and deleting the clone deletes its local branch too. @@ -510,12 +617,12 @@ The orchestrator finds it under the temporary root the brief named, by the recor run that named another root cannot find it, so its group goes to the maintainer. The abandoned-worker discard above does not run there, so a dirty abandoned clone goes to the maintainer. -The clone must be clean, and its tip is read with `git -C rev-parse refs/heads/`. +The clone must be clean by `repo-worktree` "Listing and Cleanup"'s hand-removal read, and its tip is read with `git -C "" rev-parse "refs/heads/"`. A clone retired alone, its branch left standing, also needs that tip to equal the remote tip, read -live with `git -C ls-remote --exit-code origin refs/heads/`. The remote then holds the +live with `git -C "" ls-remote --exit-code origin "refs/heads/"`. The remote then holds the only copy of the branch. A clone removed with its branch and no merged pull request instead needs -`git -C merge-base --is-ancestor refs/remotes/origin/develop` to exit `0` after -`git -C fetch origin develop`. Its branch, where pushed, then takes the abandoned-group +`git -C "" merge-base --is-ancestor "" refs/remotes/origin/develop` to exit `0` after +`git -C "" fetch origin develop`. Its branch, where pushed, then takes the abandoned-group remote checks, delete, and confirmation above first. Where the checks hold, the orchestrator then deletes the clone's exact directory, per `repo-worktree` "Listing and Cleanup". It also removes the recorded name from the claim comments. A clone removed with its branch and no merged pull request @@ -557,12 +664,14 @@ is met here. A worker reports merged, parked, stopped, or handed back for review. A worker that reports nothing at all needs a bound. Its silence looks exactly like slowness, and dying mid-drive is ordinary here. -The bound is a state read rather than a clock. When the other workers in the round have reported, +The bound is a state read rather than a clock. Wait until every other worker dispatched no later than +the silent one has reported or is confirmed gone, as below. Then read the silent worker's branch and pull request directly, with `git log` on that branch and -`gh pr view `. Pass the branch as that command's positional argument, since a +`gh pr view ""`. Pass the branch as that command's positional argument, since a bare `gh pr view` resolves the pull request of whatever branch the caller is standing on. It never resolves the worker's. Let what they show decide. A pull request that is merged means the worker -died after doing the work. The group is then finished. +died after doing the work. The group is then finished. Finishing it includes reading that pull +request's `## Owed actions` heading and holding each action listed there per "The Round" step 5. Anything else needs one thing established before anything is touched: whether that worker is gone or merely slow. No git read answers that, and the two call for opposite actions. So the answer @@ -573,11 +682,12 @@ that is. Waiting costs a round's latency and guessing costs another task's uncom Once the worker is confirmed gone, its worktree decides what follows. A standalone clone recorded on the claim comment is that worktree, retired or removed per "Cleanup Is the Orchestrator's". Where that fails, the group stops there and no fresh worker is dispatched. +A worktree is judged clean or dirty by `repo-worktree` "Listing and Cleanup"'s hand-removal read. **A clean one** is cleaned up as an abandoned group's is, per "Cleanup Is the Orchestrator's". That procedure confirms the branch carries no commit that is not already on develop before anything is removed. A worker that committed its fix and then died leaves a clean tree standing over commits develop has never seen. So that check is what separates the two. It holds, and once that procedure releases the claim, -the issue returns to the next round's ranking to be dispatched on a new branch. It +the issue returns to the ranking to be dispatched on a new branch. It fails, and the branch holds the dead worker's work. So the worktree alone is retired, per "Cleanup Is the Orchestrator's". The branch, its claim, and any pull request it heads stay standing. A fresh worker is then dispatched on that same branch to finish the drive, in the dead @@ -610,17 +720,18 @@ rather than a decision. - **The question is also written on its issue, and so is the answer**, so both survive the session that asked it. - **A stopped group keeps its branch and its claim.** Its worktree is left exactly as it stands while the question is open, since the answer may be that the work in it continues. Say in the - prompt whether that worktree holds uncommitted work. For a standalone clone, say also whether its + prompt whether that worktree holds uncommitted work, by `repo-worktree` "Listing and Cleanup"'s + hand-removal read. For a standalone clone, say also whether its tip equals the remote tip, and that pushing the branch is the maintainer's. That is because what becomes of it is part of what is being asked, rather than something to settle while waiting. - **Resuming retires that worktree first, then dispatches a fresh worker.** Git refuses to attach a branch already checked out somewhere, per `repo-worktree`. So a fresh worker cannot take the branch while the stopped tree holds it. Once the answer is in, remove that worktree if it is - clean. Otherwise apply what the answer said about its uncommitted work, then remove it. A + clean by `repo-worktree` "Listing and Cleanup"'s hand-removal read. Otherwise apply what the answer said about its uncommitted work, then remove it. A standalone clone draws no such refusal and is retired all the same, so two checkouts never hold one branch. It is retired per "Cleanup Is the Orchestrator's", once its tip equals the remote - tip. Only then dispatch. This is the + tip. Only then dispatch, into a slot per "The Round" step 6. This is the same retire-then-dispatch shape "Bounding the Wait on a Worker" uses, and no worker ever inherits another's tree. @@ -675,11 +786,11 @@ the issues it fixes in a `Closes on promotion:` line in its own commit message, yields by handing the file over. A holder that already pushed and has an open pull request yields by having that pull request wait, its branch untouched. It also yields by the promotion fix taking the file, since the two must not be in flight on one file at once. Once the fix - lands, that pull request waits untouched until the freeze lifts. Reconciling its content is the + lands, that pull request waits untouched until the next round dispatches. Reconciling its content is the next round's worker's job rather than the orchestrator's, which opens no branch and edits nothing. The orchestrator retires that group's worktree, the branch and its pull request left standing. That is the worktree-only disposition "Cleanup Is the Orchestrator's" separates out, - and the retire-then-dispatch shape "Raising a Blocked Question" uses. The orchestrator then + and the retire-then-dispatch shape "Raising a Blocked Question" uses. That next round dispatches a fresh worker on that same branch. That worker is briefed either to merge develop in to pick the fix up, or to narrow the change to drop the file. Never rebase it, since its branch is already pushed and a rebase there needs what `GOVERNANCE.md` "Git and Commit Rules" forbids. @@ -704,13 +815,17 @@ two hops. First, for each commit in `origin/main..origin/develop`, freshly fetched, read the pull request that merged it into develop: ```sh -gh api repos///commits//pulls --jq '.[] | select(.merged_at != null and .base.ref == "develop") | .number' +gh api "repos///commits//pulls" --jq '.[] | select(.merged_at != null and .base.ref == "develop") | .number' ``` Then read each pull request it prints for its `Closes on promotion:` line. That is the line "Grouping and File Claims" requires every feature pull request to carry and every worker brief to ask for. A commit it prints nothing for is a direct push. Read that commit's own message for its -line instead. A read that exits non-zero stops the assembly and is reported. +line instead. On an operational-model repository, also read the same places for a +`Reopens on promotion:` line, which a change undoing a fix carries there per `GOVERNANCE.md` +"Operational Repositories". Leave out each issue such a line names, unless a later change in the +range names it on a `Closes on promotion:` line again. A read that exits non-zero stops the +assembly and is reported. **That line exists because the set has to be stated rather than inferred**, distinct from any issue a body merely mentions. A body routinely references an issue it does not fix, the deferral @@ -730,6 +845,22 @@ from a read of the body made immediately before the write, keeping every line th Then read the body again, and repeat the amendment where it lacks a `Fixes` line a freshly fetched range calls for. Checking the whole set rather than only this amendment's own lines is what restores a line another session's write dropped. +On an operational-model repository, a `Reopens on promotion:` line can land in the range during the +freeze. Where it names an issue the body holds a `Fixes` line for, put that line to the maintainer +rather than editing it. A seat cannot tell that line from one added by hand for a change that left +its own line out. + +**Before the promotion pull request opens, hold every owed action in that range.** Read the +`## Owed actions` heading of each pull request the range read above printed. Where no +`**Owed action:**` issue, open or closed, names an action and that pull request, file one. File it as "The Round" step 5 does, without its walk-through offer. A closed one already holds the action, so a rerun never files it twice. An action already done is filed all the same, under step 5's comment rule, since a missed action is lost. A promotion worker returns each issue it files in its outcome. That issue says +whose step it is, any promotion or release it waits on, and each step's command in order. This +catches a worker that merged after the run stopped collecting it. That worker's own `Closes on promotion:` +line closes the source issue, and the new issue is the independent holder, so nothing else would then hold the action. +Run it again whenever the range changes after the pull request opens, a freeze fix included. + +Run the mechanical closing-set check that `branching-and-release-model` states in its +negated-keyword bullet, at each point that bullet names. A body naming a deferral issue +in a sentence that negates a keyword still closes that issue, and reading the body misses it. ## Away Mode @@ -765,6 +896,12 @@ merge to main with no release never exercises artifact creation. rule assumes no other run is live and no attended session works a parked group's issue. So the maintainer starts an away run only once any earlier run has ended and no such attended work is in flight. +- **An away run gains nothing from a session on `highest`.** The lean orchestrator below reads no + issue, diff, or thread. Its planner and workers run at the tiers this skill names, whatever the + session's own. So `highest` there buys only a dearer dispatcher, and an away run is launched at + `frontier`. An attended run is the one a stronger session improves, since there the orchestrator + ranks, groups, and chooses each tier itself. A session on `highest` asked for an away run says + this once, before its first dispatch, and then runs as asked. ### Needs the Maintainer @@ -788,7 +925,8 @@ and a guess costs a revert and a review round. - **It waits on the maintainer already.** It carries the `decision` label, or a comment asks the maintainer something still unanswered. - **The fix reaches past the repository's tree.** It changes a repository setting, a ruleset, - visibility, a secret, or a release condition. Or it needs a credential, an account, or a host + visibility, a secret, or a release condition. Or its remaining work lies in a repository under + another owner, whose writes need the maintainer's permission. Or it needs a credential, an account, or a host the session lacks. - **The fix edits anything under the hub's `host-setup/agent-safety/`.** That tree is the agent's own guard, so a human approves every change to it. An approval on the issue lets an attended @@ -809,10 +947,12 @@ issue for one undecided item is the failure this rule exists to prevent. These are not reasons an issue needs the maintainer, and a report never counts them as such. An issue that is `blocked` on another issue waits on that issue. One that needs a platform, by the -test `session-handoff` "The Chain" states, waits on that platform's lane. One that another group +test `session-handoff` "The Chain" states, waits on that platform's lane. One whose remaining work +lies wholly in another repository under the same owner waits on work there. One that another group or pull request holds waits on that work. One carrying `canonical-sweep` belongs to the workflow that owns it. One carrying `deferred` has its answer already, which is "not yet", and waits on the -condition its answer comment states. A handoff link carrying the `handoff` label is not an issue +condition its answer comment states. An `**Owed action:**` issue is one an account with write +access opened, its body opening with that marker. It waits on the step it names, per `backlog-burndown` "Ranking". A handoff link carrying the `handoff` label is not an issue of its own. @@ -843,23 +983,36 @@ subagents and holds only what they return. undetermined outcome, a settled decision, or an unrequested rule, the planner files it as `decision`. It comments the question there, unless the issue already carries the label. It returns the round plan: each group's issues, branch, claimed files, and tier, then each held-back - issue with its reason. It also names each `deferred` issue it lifted. A promotion fix comes first, and a group resuming parked work names the + issue with its reason. It also names each `deferred` issue it lifted. A planner stopping short of + a plan still returns each claim comment it wrote. A promotion fix comes first, and a group resuming parked work names the parked worktree. 2. **Retire each parked worktree a resuming group names**, before dispatching its worker. Git - refuses to attach a branch another worktree holds, per `repo-worktree`. Remove a clean tree with - `git worktree remove `, leaving its branch standing. That command errors on a + refuses to attach a branch another worktree holds, per `repo-worktree`. Remove a tree clean by + `repo-worktree` "Listing and Cleanup"'s hand-removal read with `git worktree remove ""`, leaving its branch standing. That command errors on a standalone clone, which takes the retire-alone checks of "Cleanup Is the Orchestrator's" instead. Leave a dirty tree, or a clone failing those checks, exactly as it stands. Keep its group parked, and name it in the report. Only the maintainer disposes of another task's uncommitted work. -3. **Dispatch the group workers** per "Dispatching a Worker", each brief built from the group's - line. Each brief also states the park duty below and the comment rule above. A group worker - drives to develop and ends there, whatever the scope. +3. **Dispatch the group workers** per "Dispatching a Worker", each brief built + from the group's line. Each brief also states the park duty below and the comment rule above. + The scratchpad check in "The Round" step 6 applies to each dispatch. + A group worker drives to develop and ends there, whatever the scope. 4. **Collect each worker's one-line outcome**, bounding the wait per "Bounding the Wait on a - Worker". A worker that hands back for review is continued per "The Round" step 5. Dispatch the + Worker". Collect a merged worker's owed actions too. Hold each per "The Round" step 5. + Since this orchestrator reads no issue body, it files an issue for each one. A worker that hands back for review is continued per "The Round" step 5. Dispatch the reviewer, record the pass per `local-strict-review` "Running It", and continue the same worker. - The orchestrator reads only the reviewer's findings and the record's exit. -5. **Clean up** per "Cleanup Is the Orchestrator's". Each command there is one call whose exit and + The orchestrator reads only the reviewer's findings and the record's exit. **The slot a worker + frees is refilled** per "The Round" step 6, once step 5 below has run for its group. Dispatch a + planner that runs orchestrator step 1 for the free slots, without the net-flow count. Dispatch + one for each worker that ends. Once this round has dispatched eight groups, dispatch one only + while a group this round stopped or parked has not resumed. Such a group needs no place among + the eight, and no other group can take a slot. The planner's brief names each group this round dispatched. It marks each whose worker has not yet ended and each that stopped or parked and + has not resumed. It + names no file set. The planner reads each group's current set from its claim comment, which + holds any grown set granted since the plan. One refill planner runs at + a time, and none starts while a dispatch is pending. While one runs, a grown set a worker reports and a group's cleanup + each wait for it to return. So every claim is written from a current read. Then dispatch each group's worker per steps 2 and 3. +5. **Clean up** each group as its worker ends, per "Cleanup Is the Orchestrator's". Each command there is one call whose exit and status line are all the orchestrator reads. 6. **Promote** per "Promoting" below. 7. **Record the round's report** in working notes, per "Run State", and start the next round. @@ -887,6 +1040,8 @@ a state of the session rather than of any issue, so the orchestrator handles it condition, and one leaving unclear whether a subagent started. It also covers a dispatch still failing after its third wait, and a timer that cannot start. The final message names the seat whose dispatch failed and the error its last attempt returned. +- **Once the run is ending, a failed dispatch takes neither path above.** "Ending an Away Run" + says what becomes of it. ### Parking Instead of Asking @@ -984,27 +1139,48 @@ group's pull request merges, the worker ends the track with `close`, per `sessio The run ends at the first of these, each an ending of its own: -- A re-rank finds nothing it can act on. +- A round's opening ranking finds nothing it can act on. - The round cap is reached. - A dispatch fails, per "A Dispatch That Fails". - A condition every later round would meet. Examples are a missing label, an exhausted reviewer allowance, a refused push or merge, and a read the planner cannot make. - The session ends. -The final message is the report "Ending the Run" describes, with every held-back issue under the +Every ending but the session's own first drops every waiting dispatch retry and stops its timer. +From then, a dispatch that fails is not retried and ends nothing. That holds for a reviewer and +for continuing a handed-back worker alike. The ending names that worker as uncollected, leaves its +branch and claim as they stand, and goes on. It names a worker whose dropped retry it needed the +same way. Where the error left unclear whether the dispatch started, it marks that seat as one +that may be live. Every ending but +the session's own and a dispatch failure then collects each worker still in flight. It cleans up each such +group per "The Lean Orchestrator" steps 4 and 5, and refills no slot. Such an ending also waits +for a refill planner still running. An ending releases no claim it did not clean up. "Grouping and File Claims" +counts no claim in flight that has neither a branch nor a live worker. Every ending but +the session's own names each claim the run recorded for a group with no outcome. It also names +each planner that ended returning nothing, since the claims it wrote are unknown. A run ended by a +dispatch failure names each worker and any refill planner still in flight, the claims such a +planner writes being unknown. Where its error left unclear whether the failed dispatch started, it +marks that seat as one that may have. Where that seat was a planner, its claims are unknown too. The final message is the report "Ending the Run" describes, with every held-back issue under the reason that holds it back. **Only what needs the maintainer is reported as needing the -maintainer.** That is an open `decision` issue, a group parked on one, and a parked dirty tree. It +maintainer.** That is an open `decision` issue, a group parked on one, and a parked dirty tree. +It is also a worker named as uncollected, since no later run resumes its group. Where such a worker +merges later, its owed actions sit under its pull request's `## Owed actions` heading. +Where this skill assembles the next promotion, that assembly files each as an `**Owed action:**` issue, per "Assembling the Promotion Body". +A promotion opened elsewhere, or already open when such a worker merges and not reassembled once no run remains, files none. The report names the worker so the maintainer can read that heading. It is also a +missing or wrong shared git hook a worker reported, per `repo-worktree` "Preparing Git Hooks". It also covers an issue held back for a setting, a credential, a host, or the agent-safety tree, reported as needing the maintainer present. An outsider's issue awaiting acceptance is reported -as needing the maintainer to accept it. Each other reason is named as itself, never as a -decision. Those are `blocked` on another issue, needs a platform, held by an open group or pull -request, awaiting promotion, and `deferred`, given by count. A held promotion is named too, with each `decision` issue holding +as needing the maintainer to accept it. Work in a repository under another owner is reported as +needing the maintainer's permission for the write there. Each other reason is named as itself, never as a +decision. Those are `blocked` on another issue, needs a platform, any other work in another +repository, and an owed action. They are also held by an open group or pull request, awaiting promotion, and +`deferred`, given by count. A held promotion is named too, with each `decision` issue holding it. An ending that cannot dispatch a promotion worker the run owes is named too. A run ended by a dispatch failure does not attempt one, since the same harness error would meet it. A session ending on a context limit has no room to run one. The final message says that worker did not run, and names any open promotion pull request. The report gives the count of open `decision` issues and names each by number. It names `decision-triage` as where they get answered. It asks nothing. ## Run State - **Working notes outside the repository hold the round**: the ranking, the working groups, the - tier choices, and the worker assignments. A scratch file the harness gives a session serves + tier choices, the worker assignments, and the outcomes. A scratch file the harness gives a session serves where there is one. Any note kept out of the tree serves where there is not. It is the in-flight session state `GOVERNANCE.md` "Durable Knowledge and Self-Improvement" describes, and nothing about it is committed. @@ -1019,7 +1195,7 @@ it. An ending that cannot dispatch a promotion worker the run owes is named too. The run ends at one of the points below, and they are different endings. -- **The backlog is worked out**, meaning a full re-rank finds no open issue this skill can act on. +- **The backlog is worked out**, meaning a round's opening ranking finds no open issue this skill can act on. That differs from zero open issues, since a backlog of nothing but maintainer questions and issues whose blockers still stand is a finished run. Report it as finished, with the questions put to the maintainer. @@ -1030,7 +1206,8 @@ The run ends at one of the points below, and they are different endings. continuing. Report at every round boundary and at each ending. Say what merged to develop, what the promotion -pull request carries, and what was newly filed. Give the net-flow counts "The Round" step 8 +pull request carries, and what was newly filed. List each owed action with the issue holding it, +open or closed. Give the net-flow counts "The Round" step 8 measures. Say what is stopped and on which question, what was held back and on which blocker, and what the next round would pick. @@ -1046,7 +1223,7 @@ A rule, a Skill, or a brief names a model tier, never a model. A model release i - **`frontier`** is the fleet's default reasoning tier, for orchestrating, rule text, design, spec logic, and adversarial review. It is not the most capable model available, which is `highest`. - **`standard`** is ordinary implementation and driving a pull request. Judging a review finding is never mechanical, however often it repeats, so it runs at `standard` or above. A `standard` driver's evidence-backed decline of a finding raised on its pull request stands, since that pull request's reviewers and its merge gate check it. - **`bulk`** is the cheapest model that does the work correctly. It is for high fan-out mechanical work, such as an extraction or a status check. -- **`highest`** is the most capable model available, and only the maintainer selects it. The maintainer chooses it for the session itself, or allows it for the session's subagents at launch. The host's agent-safety kit reads that launch setting, `FLEET_ALLOW_HIGHEST=1` on Claude Code. Naming the tier in a prompt does not set it. A maintainer naming it partway through a session restarts the session with it allowed, and an agent never sets it. Without that setting, the kit refuses a dispatch that names it. A dispatch naming no model runs at its agent definition's model where one is set, and otherwise at the session's own. A fork always runs at the session's model, whatever it names. So a session launched on `highest` names a tier on every dispatch meant to run below it, and uses no fork for such work. A session never reaches for it because a task looks hard. +- **`highest`** is the most capable model available, and only the maintainer selects it. The maintainer chooses it for the session itself, or allows it for the session's subagents at launch. The host's agent-safety kit reads that launch setting, `FLEET_ALLOW_HIGHEST=1` on Claude Code. Naming the tier in a prompt does not set it. A maintainer naming it partway through a session restarts the session with it allowed, and an agent never sets it. Without that setting, the kit refuses a dispatch that names it. A dispatch naming no model runs at its agent definition's model where one is set. Otherwise it runs at the default the host's agent-safety kit sets, which is the `frontier` model. On a host without the kit it runs at the session's own. That default does not reach every agent type a tool builds in. On Claude Code the `Explore` and `Plan` types still take the session's model, so the kit refuses a dispatch of either that names no model. A fork always runs at the session's model, whatever it names. So a session launched on `highest` names a tier on every dispatch meant to run below it, and uses no fork for such work. The kit's default is a backstop for a dispatch that forgot its tier, never a reason to leave one out. A session never reaches for it because a task looks hard. | Tool | `highest` | `frontier` | `standard` | `bulk` | | --- | --- | --- | --- | --- | @@ -1055,7 +1232,7 @@ A rule, a Skill, or a brief names a model tier, never a model. A model release i Each cell is the name that tool's subagent dispatch takes, which follows the latest model of its family. A dispatch on a tool with no row here, or on one that cannot name a model per subagent, names no model. - **A tier resolves only through this table.** A word such as "frontier", "strongest", or "most capable" never resolves to `highest`. The industry's "frontier model" is the opposite of what this tier means here. A session that cannot see this table names no model rather than guessing one. -- **An orchestrating seat runs at `frontier` and names a tier on every dispatch.** It defaults a subagent to `frontier`, and picks `standard` or `bulk` deliberately for execution or mechanical work. +- **An orchestrating seat runs at `frontier`, or at `highest` where the maintainer chose that for the session, and names a tier on every dispatch.** It defaults a subagent to `frontier`, and picks `standard` or `bulk` deliberately for execution or mechanical work. diff --git a/.github/skills/branching-and-release-model/SKILL.md b/.github/skills/branching-and-release-model/SKILL.md index 68b33c2..b657507 100644 --- a/.github/skills/branching-and-release-model/SKILL.md +++ b/.github/skills/branching-and-release-model/SKILL.md @@ -49,19 +49,49 @@ rather than guessing from the repo's contents. GitHub's web-flow key. - **`develop` is forward-only, with no `main -> develop` back-merges.** The `develop` ruleset's squash-only setting physically blocks merge commits on `develop`. Any historical back-merge - commits in `git log` predate this rule and must not be repeated. + commits in `git log` predate this rule and must not be repeated. A change such as a hotfix can land on `main` + outside the feature -> `develop` -> `main` flow. Such a change reaches `develop` by a feature + pull request of its own. To catch one before starting work, run + `git diff origin/develop origin/main` after `git fetch origin`. Its `+` lines are candidates, + and which ones to mirror is judgment. + `git log origin/develop..origin/main` is no substitute, because every promotion merge and every + `main`-direct bot commit lists there too. - **Never delete `develop`, and take the EOL-only conflict by taking develop's side.** A promotion PR's head *is* `develop`, so `--delete-branch` deletes it. An EOL-only conflict on a workflow YAML file resolves on a throwaway branch off `main`, not on `develop`. Full recovery and conflict-resolution commands: `references/branch-protection-and-promotion.md`. - **A merge or release ends with worktree cleanup and the base clone on current `develop`.** Run the `repo-worktree` post-merge procedure after a feature squash merge. Run it again after a promotion or release completes, unless the user explicitly asks to retain a checkout or branch. Remove finished task, conflict-resolution, installer, and release helpers. Never delete `develop`, and never leave the base clone on `main` merely because `main` was promoted or released. -- **Issue-closing keywords (`Closes #N`, `Fixes #N`) go in the `develop -> main` promotion PR, not - the feature -> `develop` PR.** GitHub auto-closes an issue only when the closing keyword merges - into the **default branch** (`main`), so a feature -> `develop` PR merge never fires it. - Reference the issue in the `develop` PR body if useful, but the actual closing keyword belongs on - the promotion PR. Closing by hand is the ordinary route wherever the keyword cannot fire. Cases include a +- **Issue-closing keywords (`Closes #N`, `Fixes #N`) go in the `develop -> main` promotion PR's + body, and nowhere else.** The keywords are `close`, `closes`, `closed`, `fix`, `fixes`, `fixed`, + `resolve`, `resolves`, and `resolved`. Each closes the issue it directly precedes once the text + holding it reaches the **default branch** (`main`). A feature -> `develop` PR targets another + branch, so it registers no closing reference itself. Its squash commit's message is still what + the repository's squash setting composes, read live with + `gh api "repos//" --jq .squash_merge_commit_message`. Where that reads `PR_BODY`, as + it does in the hub, the PR body becomes the commit message. So a `Fixes #N` in that body lands + on `develop` and closes #N when the promotion brings the commit to `main`. That holds whatever + the promotion body says. A direct-push commit message on `develop` behaves the same way. So a + feature PR body or a direct-push commit carries no closing keyword. It names the issues it fixes, + where it names them, in the inert `Closes on promotion: #N, #M` line. The promotion PR's body + carries one closing keyword per issue those lines name. In an operational repository that line + is required, as "Operational repositories (the complete delta)" below sets. That delta also lets + a rollback's `Reopens on promotion:` line take an issue out of the promotion body. Closing by hand is the ordinary route wherever the keyword cannot fire. Cases include a promotion that already merged without it, or completed work with no promotion imminent. Closing by hand is not a repair for a botched promotion. Cite the squash SHA and re-read that commit before closing. +- **A closing keyword fires inside a sentence that negates it.** GitHub matches the keyword and + the reference alone, with at most a colon between them, and reads no other word. So each of + `does not fix #N` and `narrowed rather than closed: #N` closes its issue. Where text names an + issue it leaves open, keep every keyword away from the reference, as in `#N stays open`. Reading the + text misses this. So check a promotion PR mechanically after opening it and after each body + amendment. Check it again when reporting it ready and before merging it, since a merge into + `develop` moves the range. + Compare the set + `gh pr view "" --repo "/" --json closingIssuesReferences --jq '[.closingIssuesReferences[].number]'` + prints with the intended set. Then scan the range's commit messages, since a keyword there closes + its issue at the promotion merge too: + `git log --format=%B origin/main..origin/develop | grep -n -i -E '\b(close[sd]?|fix(e[sd])?|resolve[sd]?):?[[:space:]]+[[:alnum:]_./:-]*(#|/issues/)[0-9]'`, + run after `git fetch origin`. Each line it prints is a closure the promotion merge makes + whatever its body says. Name any unintended one in the promotion PR's ready report. - **Neither ruleset requires branches to be up to date before merging.** The reasons differ on each branch (a graph-based check that would fail every release on `main`, a check that stalls bot auto-merge on `develop`). Detail: `references/branch-protection-and-promotion.md`. @@ -136,10 +166,18 @@ stays the same: The host write guard allows the in-place commit only once the repository's `.github/agent-policy.json` on `main` lists `develop` in its `guard` section. The maintainer's merge to `main` therefore grants the exemption, and until then the guard denies it. -- **A direct push names the issues it fixes in its commit message**, as one line such as - `Closes on promotion: #N, #M`. The words `on promotion:` keep GitHub from reading the line as a closing keyword. The promotion - PR carrying the push puts a closing keyword in its own body for each issue the line names, per the - closing-keyword bullet above. Its body takes no closing keyword for a push without the line. +- **A change reaching `develop` names the issues it fixes in one line**, such as + `Closes on promotion: #N, #M`. A direct push writes the line in its commit message. A pull + request into `develop` writes it in its body. The promotion reads a merged pull request's line + from its body, never from its commits. The words `on promotion:` keep GitHub from reading the line as a closing keyword. The promotion + PR carrying the change puts a closing keyword in its own body for each issue the line names, per the + closing-keyword bullet above. Its body takes no closing keyword for a change without the line. + A change that undoes a fix not yet on `main` names that fix's issues in one + `Reopens on promotion:` line, written where a `Closes on promotion:` line would go. A rollback + committed as an ordinary change is one. The line is required because a rollback often carries + no revert marker for the range to show. The promotion body takes no closing keyword for an issue + that line names. Where the range names one issue on both lines, the line of the latest change + naming it decides. - **A PR into `develop` stays available, and CI runs on it, reported but not required.** Dropping the requirement permits the direct push. It does not withdraw the pull request, so a change worth reviewing takes one and both paths into `develop` are legitimate. @@ -153,7 +191,9 @@ stays the same: That would withdraw the allowance the model exists to give. - **The `main` promotion gate is unchanged.** The shared `main` ruleset still **enforces** the required `Check pull request workflow status job` on the `develop -> main` PR. For an operational - repo that check is lint/validation only, never unit tests. It is editorconfig/EOL plus a domain linter + repo that check is lint/validation, with unit tests only for a .NET test project or a Python suite + the validator runs. A test in the repo's own `.github/actions/validate/action.yml` hook counts too. + The check is editorconfig/EOL plus a domain linter such as a Home Assistant or ESPHome config validation. So `develop` stays the live surface and a broken config can never reach `main`. - **Release only by manual dispatch.** Operational repos carry `releaseTrigger: dispatch-only` and diff --git a/.github/skills/branching-and-release-model/references/branch-protection-and-promotion.md b/.github/skills/branching-and-release-model/references/branch-protection-and-promotion.md index ad3c111..2a0c05e 100644 --- a/.github/skills/branching-and-release-model/references/branch-protection-and-promotion.md +++ b/.github/skills/branching-and-release-model/references/branch-protection-and-promotion.md @@ -2,8 +2,8 @@ Full detail for the "Branching" rules in `SKILL.md`. Load this when configuring or reconstructing branch protection on a fleet repo, or when executing a `develop -> main` promotion. Also load it -when recovering a lost `develop`, resolving an EOL-only promotion conflict, or working on the -dual-target bot wiring (Dependabot, codegen, the merge-bot). It is not for an ordinary +when recovering a lost `develop`, cutting a conflicted promotion, the EOL-only case included, or +recovering a squash into `main`. Load it too when working on the dual-target bot wiring (Dependabot, codegen, the merge-bot). It is not for an ordinary feature-branch PR, which the SKILL.md summary covers. ## Configuring branch protection: don't hand-build the rules @@ -11,7 +11,7 @@ feature-branch PR, which the SKILL.md summary covers. From a hub checkout at `main`, create **exactly two rulesets named `develop` and `main`** from the hub's `repo-config/*.json` payloads. Use a hub checkout at `develop` instead while the repository's registry entry has merged there but not yet reached `main`. Run -`repo-config/configure.sh apply / release|operational` from that checkout. The names +`repo-config/configure.sh apply "/" release` (substitute `operational` for an operational repo) from that checkout. The names are load-bearing because governance content and workflows reference them. The registry `workflowModel` selects the `develop` payload for a registered repository. `apply` refuses a repository outside the registry, writing nothing. Once `apply` has created both rulesets, delete @@ -27,17 +27,28 @@ These traps were learned the hard way: exactly this reason) deletes `develop` itself. Merge a promotion with a plain `gh pr merge --merge`, no `--delete-branch`. If `develop` is ever lost this way, restore it to the merged PR's head SHA. That SHA is still reachable as the merge commit's second parent: - `gh api -X POST "repos///git/refs" -f ref=refs/heads/develop -f sha="$(gh pr view --json headRefOid --jq .headRefOid)"`. + `gh api -X POST "repos///git/refs" -f ref=refs/heads/develop -f sha="$(gh pr view "" --json headRefOid --jq .headRefOid)"`. - **Spurious EOL-only conflicts resolve by taking `develop`.** When `develop`'s `.editorconfig` line-ending default has changed while `main` hasn't caught up yet, `develop -> main` conflicts *whole-file* on every renormalized path. An example of that default changing is the fleet-wide CRLF-to-LF flip. `develop`'s `required_linear_history` plus PR rulesets forbid resolving on `develop` (no merge commit, no force-push). So resolve on a throwaway branch off `main`: `git checkout -b promote/develop-to-main origin/main && git merge origin/develop`. Take - `develop`'s side for the EOL-conflicted files (`git checkout --theirs `) **after + `develop`'s side for the EOL-conflicted files (`git checkout --theirs ""`) **after confirming each is content-identical modulo EOL, or that `develop` is a strict superset** (`diff <(git show ":2:" | tr -d '\r') <(git show ":3:" | tr -d '\r')`). Then open that branch into `main`. Verify no genuine `main`-only content is dropped (build/test where the repo supports it). +- **A conflicted promotion lands from a branch cut from `main` that merges `develop`.** The EOL-only case above is one instance. A bot bump that landed on `main` and `develop` separately, beside a line `develop` changed, is another. This procedure covers a `develop` that is a strict superset of `main`'s content. The steps: + 1. Run `git fetch origin`, then cut the branch in a worktree of its own: `git worktree add -b promote/develop-to-main "" origin/main`. Run `git merge origin/develop` there. + 2. Take `develop`'s side on each conflict only after the strict-superset check above shows `main` holds nothing `develop` lacks there. Stage each resolved file and commit the merge, so `HEAD` holds it. + 3. Confirm the merged tree equals `develop`'s before the push: `git diff origin/develop HEAD --stat` prints nothing. + 4. A path it prints holds content `develop` lacks. Redo a resolution that kept `main`'s side. Land genuine `main`-only content on `develop` through a feature pull request first. Then run `git fetch origin develop` and merge `origin/develop` again. + 5. Open the branch as the promotion pull request in place of the one headed by `develop`. Carry the superseded pull request's whole body, its closing set included. + 6. Carry its labels too, `comments` among them. Without that label, a local strict pass on the new head reports every comment line the feature pull requests landed as `comment-added`. + 7. Close the superseded pull request with a comment naming the new one. + 8. Land each later `develop` fix on the branch in the same worktree. Run `git fetch origin develop`, then `git merge --no-ff origin/develop`. Re-run the tree check, then push the branch. + 9. Merge it like any promotion, with `--merge`. The merge commit restores the merge base, so the next promotion runs from `develop` again. +- **A squash into `main` is recovered with that same cut.** The `main` ruleset allows only merge commits, yet its admin bypass lets a squash through. A squashed promotion leaves `main` with `develop`'s content but not its history. The merge base stays at the previous merge commit. So the next promotion conflicts wherever a later `develop` change edits a line the squash already carried. Where it merges cleanly instead, it keeps any such line a later `develop` change removed. GitHub runs no pull request workflow while the promotion conflicts. So the hub's `validate-task.yml` `Check promotion history step` fails the next promotion that merges cleanly. It names each single-parent commit on `main`'s first-parent chain since its previous promotion merge. Recover with the conflicted-promotion cut above, resolving each conflict as its step 2 states. The cut merges from the same stale base, so it can keep a removed line too. Its tree check then prints that path. Restore `develop`'s version of each such path the squash carried with `git checkout origin/develop -- ""`. Remove one `develop` has since deleted with `git rm ""`. Then commit. The step passes a head that already holds each commit it named, and the merge then restores the merge base. Never rewrite or force-push `main` to undo the squash. ## Why both rulesets omit "Require branches to be up to date before merging" @@ -52,7 +63,7 @@ The flag is off on `main` and on `develop`, for related but distinct reasons. and the linearity invariant. - **Develop**: the check stalls bot auto-merge when two bot PRs against `develop` land within the same window. As soon as the first merges, the second flips to `mergeStateStatus: BEHIND` and - GitHub's auto-merge will not fire while strict is on. The merge-bot only *enables* auto-merge on + GitHub's auto-merge will not fire while strict is on. The merge-bot arms auto-merge on `opened`/`reopened` and never auto-updates bot branches, and Dependabot's rebase isn't real-time. So the second PR sits OPEN with all checks green indefinitely. Squash mechanics still rebase the diff onto `develop`'s tip on merge, and `required_linear_history` still enforces linearity. @@ -83,12 +94,19 @@ during long-running develop features. Codegen content can also be production-cri So both branches need fresh codegen on their own cadence. **Maintainer-pushed commits on a bot PR auto-disable auto-merge.** The merge-bot's -`merge-dependabot` and `merge-codegen` jobs only fire on `opened`/`reopened` events (auto-merge is -enabled exactly once per PR). A maintainer may push commits to a bot's branch. Such a push is a `synchronize` +`merge-dependabot` and `merge-app` jobs arm auto-merge only on `opened`/`reopened` events. Its +`rearm-auto-merge` job leaves the disable below in place, since the head is then not the bot's own push. A maintainer may push commits to a bot's branch. Such a push is a `synchronize` event with an actor that isn't the same bot. When it happens, the merge-bot's `disable-auto-merge-on-maintainer-push` job fires and calls `gh pr merge --disable-auto`. The maintainer's commits stay in the PR but won't auto-merge with the bot's content. Re-enable -auto-merge manually (`gh pr merge --auto ` or the GitHub UI) when ready. +auto-merge manually (`gh pr merge --auto ""` or the GitHub UI) when ready. + +**A disable GitHub makes is re-armed once, then fails visibly.** GitHub can disable an armed +auto-merge with every check green. It does so for a merge that would write workflow content the +App may not write. The caller stub triggers on `auto_merge_disabled`, so the merge-bot's +`rearm-auto-merge` job answers such a disable. It re-arms once the base branch has settled. Where +every check is green, `gh` merges at once instead, so a refused merge fails the job. That makes the +stall visible rather than recovering it. WORKFLOW.md D8.1 is the contract. ## Codegen determinism diff --git a/.github/skills/branching-and-release-model/references/release-publish-mechanics.md b/.github/skills/branching-and-release-model/references/release-publish-mechanics.md index 0c1d193..0d3fce9 100644 --- a/.github/skills/branching-and-release-model/references/release-publish-mechanics.md +++ b/.github/skills/branching-and-release-model/references/release-publish-mechanics.md @@ -45,10 +45,12 @@ project-path inputs among them. Pick by where each artifact *goes*, not by language: - **Files attached to the GitHub Release** (zips, binaries, packaged libraries): a dotnet-publish - hook or a build-nuget hook per output, each uploading `release-asset--`. This is where the - .NET `dotnet publish` or `dotnet build` lives, though a package push does not. The hub default takes an explicit - project path, and a project needing different build behavior replaces the hook. A data-only - repo's own output (e.g. a symbol library) is a file target, which the `build-release-asset` hook + hook or a build-nuget hook per output, each uploading `release-asset--`. + The default PyPI leaf uploads one too. + The .NET `dotnet publish` lives in the dotnet-publish hook and `dotnet build` in the build-nuget hook, though a package push lives in neither. + The hub default takes an explicit project path. + A project needing different build behavior replaces the hook. + A data-only repo's own output (e.g. a symbol library) is a file target, which the `build-release-asset` hook builds when the caller sets `enable_release_asset: true`. The hook has no hub default, so the caller provides `.github/actions/build-release-asset/action.yml` and the task fails without it. - **Package-registry pushes** (NuGet.org, PyPI): each is split, and the push never sits in the @@ -61,11 +63,12 @@ Pick by where each artifact *goes*, not by language: build-nuget hook uploads a `nuget-build-` artifact for a separate `publish-nuget` job in the caller's own `publish-release.yml`. That job authenticates through `NuGet/login` and therefore carries `id-token: write` (plus `actions: write` to delete the artifact it consumed). The hook - *also* uploads a `release-asset-*` (.7z) for the GitHub release. PyPI is the same shape: the build-pypi hook only builds and uploads the - `pypi-build-` artifact. The separate `publish-pypi` job in the caller's own - `publish-release.yml` does the OIDC Trusted-Publishing upload, behind an `environment: pypi` - gate and with `skip-existing: true`. The `id-token: write` permission is granted only at that - one entry point. PyPI contributes **no** `release-asset-*`. + *also* uploads a `release-asset-*` (.7z) for the GitHub release. + PyPI is the same shape. + The hub default leaf uploads the `pypi-build-` artifact and a `release-asset--pypi` carrying the wheel and sdist. + The separate `publish-pypi` job in the caller's own `publish-release.yml` does the OIDC Trusted-Publishing upload. + It runs behind an `environment: pypi` gate and with `skip-existing: true`. + The `id-token: write` permission is granted only at that one entry point. - **Image-registry pushes** (Docker Hub): `build-docker-task.yml`, hub-hosted like `build-release-task.yml`, pushes the default branch multi-arch (amd64+arm64) and any other branch `amd64`-only, and contributes **no** `release-asset-*`. The image set comes from a docker-prepare hook (the hub default emits the @@ -116,9 +119,9 @@ A package publish job is gated like everything else, `needs:` the release-task c **Re-dispatch, available only while the tip has not moved.** A `workflow_dispatch` takes a ref rather than a commit, and D2.3 admits only `main` or `develop`. So what it builds is that branch's tip at dispatch time. While the tip is still the commit whose push failed, a re-dispatch rebuilds the same version and runs its push again. It refreshes the release the way any dispatch does. -This is a time-of-check-to-time-of-use race rather than a guarded operation, because nothing compares the tip against the failed run. So a push landing between the two mints a new version instead of erroring. The operator then sees a green publish that left the failed version unpublished. Confirm the failed run's own head commit still equals the branch tip immediately before dispatching. Make that comparison with `gh run view --json headSha` against `gh api repos/{owner}/{repo}/branches/` for the branch that run built rather than whichever branch is to hand. Where the two differ, or where the check is not worth making, prefer the re-run route, which is bound to that commit by construction. In those cases, fall back to re-dispatch only once the re-run window below has closed. +This is a time-of-check-to-time-of-use race rather than a guarded operation, because nothing compares the tip against the failed run. So a push landing between the two mints a new version instead of erroring. The operator then sees a green publish that left the failed version unpublished. Confirm the failed run's own head commit still equals the branch tip immediately before dispatching. Make that comparison with `gh run view "" --json headSha` against `gh api "repos/{owner}/{repo}/branches/"` for the branch that run built rather than whichever branch is to hand. Where the two differ, or where the check is not worth making, prefer the re-run route, which is bound to that commit by construction. In those cases, fall back to re-dispatch only once the re-run window below has closed. -**Re-run all jobs, available inside the window whatever the tip has done.** `gh run rerun ` replays the run under the original event's `GITHUB_SHA` and `GITHUB_REF` and re-executes every job rather than only the failed ones. The publisher pins the release task to that commit with `ref: ${{ github.sha }}`. So `get-version` recomputes the same version from the same commit and history, and each build leaf checks out the `GitCommitId` that job emits. So the package artifact D5.2 deleted is rebuilt and re-uploaded rather than missing when `publish-` downloads it. That job then retries the push it failed. The release itself needs nothing from the re-run, the failed run having already cut it. However, on a dispatch-triggered run the re-run re-enters `github-release`. That job refreshes the release per D4.4's dispatch leg and runs the `release-asset-*` delete with it per D5.2. A re-dispatch here would build the new tip instead. NBGV derives the version from git height, so that is a further version and the one whose push failed never reaches the registry. +**Re-run all jobs, available inside the window whatever the tip has done.** `gh run rerun ""` replays the run under the original event's `GITHUB_SHA` and `GITHUB_REF` and re-executes every job rather than only the failed ones. The publisher pins the release task to that commit with `ref: ${{ github.sha }}`. So `get-version` recomputes the same version from the same commit and history, and each build leaf checks out the `GitCommitId` that job emits. So the package artifact D5.2 deleted is rebuilt and re-uploaded rather than missing when `publish-` downloads it. That job then retries the push it failed. The release itself needs nothing from the re-run, the failed run having already cut it. However, on a dispatch-triggered run the re-run re-enters `github-release`. That job refreshes the release per D4.4's dispatch leg and runs the `release-asset-*` delete with it per D5.2. A re-dispatch here would build the new tip instead. NBGV derives the version from git height, so that is a further version and the one whose push failed never reaches the registry. The qualifications below come with the re-run route. diff --git a/.github/skills/carried-instruction-file-guard/SKILL.md b/.github/skills/carried-instruction-file-guard/SKILL.md index 3f41dc3..5c3b0e2 100644 --- a/.github/skills/carried-instruction-file-guard/SKILL.md +++ b/.github/skills/carried-instruction-file-guard/SKILL.md @@ -29,7 +29,7 @@ The fix is not "be careful." Being careful is what failed the first time. The fi - Pick the phrase in it that is most peculiar to this repo, not generic governance vocabulary. A rule about "always sign commits" is generic. A rule about "this repo's Docker image pins Alpine 3.19 because 3.20 broke the s6 supervisor" is peculiar. - Grep the hub's canonical copy of the same file for that peculiar phrase. - **Absent from the hub canonical means it is a local addition.** It is never dropped because it looks similar to something else, and never dropped because a merge or overwrite would be simpler without it. -3. **A local addition found by the probe gets a destination, not a deletion.** It either names a rule that should apply fleet-wide, or it is genuinely specific to this repo. In the first case, flag it for the maintainer to promote into the hub. In the second case, it moves to the repo's own topical doc before the carried file is touched. Those docs are `CODESTYLE.md` for a language/formatting convention, `ARCHITECTURE.md` for a design decision, `OPERATIONS.md` for a runbook or operational note, `TODO.md` for backlog. Move it, confirm it is not lost, and only then proceed with the carry. +3. **A local addition found by the probe gets a destination, not a deletion.** It either names a rule that should apply fleet-wide, or it is genuinely specific to this repo. In the first case, flag it for the maintainer to promote into the hub. In the second case, it moves to the repo's own topical doc before the carried file is touched. Those docs are `CODESTYLE.md` for a language/formatting convention, `ARCHITECTURE.md` for a design decision, `OPERATIONS.md` for a runbook or operational note, `TODO.md` for backlog. Move it, confirm it is not lost, and only then proceed with the carry. `CODESTYLE.md` is the one guarded file that is itself such a destination, for a language convention. A local section there stays in place, and the carried text is merged around it. 4. **Do not trust a similarity or word-overlap check for step 2.** A repo-specific rule written in ordinary governance language reads as a reworded duplicate of an unrelated hub rule to that kind of check. That check will confidently tell you the local content is redundant when it is not. Exact phrase presence or absence is the only check that has held up. ## What is actually safe to overwrite without this procedure diff --git a/.github/skills/check-this-repo/SKILL.md b/.github/skills/check-this-repo/SKILL.md index d289019..1365a8c 100644 --- a/.github/skills/check-this-repo/SKILL.md +++ b/.github/skills/check-this-repo/SKILL.md @@ -45,8 +45,15 @@ reach this particular repo. default, pass the re-run `--dir` or `-Dir` naming the parent of `live.checkout`. That is because re-running the installer from any other directory leaves an existing registration where it is. - Where `live` carries no `vcs` and a non-null `commit`, it names a git checkout. One that - is detached, `branch: null`, or on an old branch is an answer too. Moving that checkout - is the fix rather than re-installing. + is detached, `branch: null`, or on an old branch is an answer too. So is a `live.commit` + behind the hub's own tip of `live.branch`. A checkout on `main` that has not pulled names + the right branch and still serves stale content. Fetch that branch into the same hub + checkout with full history. Name its destination, since a single-branch clone records + none: `git fetch origin "+refs/heads/:refs/remotes/origin/"`, + adding `--unshallow` in a shallow clone. A `live.commit` other than `origin/` for which + `git merge-base --is-ancestor "" "origin/"` exits 0 is behind. An exit + other than 0 or 1 means the test could not judge, which is an answer to report as well. + Moving or fast-forwarding that checkout is the fix rather than re-installing. - Any other shape names no registration, or one this report could not read, and the `reason` it carries, where it carries one, says which. 2. **Does this repo's own carried content still match the hub.** Compare `AGENTS.md`'s diff --git a/.github/skills/comment-and-doc-style/SKILL.md b/.github/skills/comment-and-doc-style/SKILL.md index 5650699..1b495b4 100644 --- a/.github/skills/comment-and-doc-style/SKILL.md +++ b/.github/skills/comment-and-doc-style/SKILL.md @@ -7,7 +7,8 @@ description: >- characters to type in agent-authored text, whenever the file being edited is CRLF, whenever naming a tool in prose or docs, whenever authoring a new Markdown file, whenever editing a carried instruction file (AGENTS.md, GOVERNANCE.md, CODESTYLE.md, WORKFLOW.md, - .github/copilot-instructions.md), and whenever text states how many items a list or a table holds. + .github/copilot-instructions.md), whenever text states how many items a list or a table holds, + and whenever a doc gives a command for a reader to copy and run. Triggers even when the task looks purely mechanical, such as "just fix a typo" or "add a one-line comment", because an em dash slipped into a sentence, a comment that grew by one more clause, or a text-mode edit that silently flattens a CRLF file to LF are each easy to miss. @@ -86,8 +87,8 @@ Agent-specific authorization stays in provider-labeled bullets so one agent's co not read as a shared requirement: - **Codex:** execution rules match exact argument prefixes, so they cannot safely cover changing - worktree paths and digests. Smart Approvals can prompt per task. No-prompt operation is - supported only inside an external sandbox because it removes command-wide protection. + worktree paths and digests. Smart Approvals can prompt per task. No-prompt operation removes + command-wide protection, so it is supported only inside an external sandbox. ## Markdown formatting @@ -99,8 +100,12 @@ not read as a shared requirement: of another sorts first, `[governance]` above `[governance-branching-model]`. A URL inside a fenced code block stays inline. See `references/markdown-links.md` for the full grouping and naming convention. -- **Table of Contents**: generated by the Markdown All in One extension on save, never - hand-authored or hand-edited. Exclude a heading with an inline `` marker. +- **Table of Contents**: generated, never hand-authored or hand-edited. The Markdown All in One + extension rebuilds it on save, and the hub-hosted `scripts/toc_lint.py --fix` writes the + same list for an agent. The `` marker goes on the H1, on every heading + above the Table of Contents, and on the Table of Contents heading itself. It goes on no heading + below it at a level the list includes. This holds for any Markdown file carrying a `Table of + Contents` heading, and `spec/readme-structure.md` item 4 holds the full rule. - **One logical paragraph per line**, no hard-wrap line-length limit. For an intentional line break within a block (stacked badges, status lines), end the line with a trailing backslash rather than trailing whitespace. @@ -159,6 +164,9 @@ Applies to code and workflow (`#`) comments alike. header a tool or policy requires is not a summary and is unaffected. - **Never let a comment grow across edits.** Touching code near an existing comment means the comment comes out the same length or shorter, never one more clause of rationale appended. +- **Leave a human-authored comment exactly as written.** Never reword, trim, reflow, or clean + one, even where another rule would shape it differently. A comment the agent's own change makes + false, one whose code the change deletes included, is the agent's to correct or remove. A continuation stays unindented, one sentence per line: @@ -190,15 +198,15 @@ Deleting the comment is the ordinary answer, since the bullets above already say earn. Where a comment is genuinely owed, and a rule requiring one is the clearest case of that, the pull request carries the `comments` label. With that label the gate stands down for that change. Locally a `PROSE_ALLOW_COMMENTS` does the same, for as long as it is set to anything but a false -spelling. And `--allow-comments` does it for one run by hand. The label and the variable are separate deliberately, so a variable +spelling. It stands down only the local `comment-added` rule. The `comments` label remains the reviewed gate the merge reads. And `--allow-comments` stands the rule down for one run by hand. The label and the variable are separate deliberately, so a variable left exported reaches the commit and never the merge gate. The facts below about reaching those escapes read as a broken gate until they are known. On a public repository the lint job reads the label when it runs, and its log says "Read the pull request's labels live". A label added before then applies, and a rerun picks up one added since. In a private -repository, or where the log lacks that line, the event's snapshot decides. It misses a label -applied after the event, `gh pr create --label` included, so -there the label applies to the next push. The label reaches a repository only when the fleet label +repository, or where the log lacks that line, the event's snapshot decides. A label given to +`gh pr create` usually reaches the opened event, though it is sometimes missed. A label added +after the create applies from the next push, or from a close and reopen. The label reaches a repository only when the fleet label set is applied to it. So a repository that has not had that applied since the label was declared cannot carry it. In such a repository the finding names a remedy that is not yet available. And the local escape reaches a commit before any of that. A commit is where a repository meets this rule first, @@ -291,7 +299,7 @@ It is also because reading those would report a fixture rather than a claim abou Agent-authored text is ASCII by default: documentation, code, comments, commit messages, and PR descriptions. A non-ASCII character is read against the tiers below, because whether one is typography or meaning depends on where it sits. A character in no tier is a finding rather than a -silent pass, a letter of a recorded name excepted per the bullet below. +silent pass. A letter of a recorded name and quoted data are excepted, per the bullets below. - **Tier 1, never legitimate.** Typography carrying no meaning its ASCII form loses. Remove on sight: @@ -324,12 +332,17 @@ silent pass, a letter of a recorded name excepted per the bullet below. document records as data is written with its own letters and the marks they carry. The reason is that folding such a name to ASCII records a different name. Anywhere else a letter the agent writes that no tier covers takes its ASCII form. +- **A Markdown code span is quoted data, as a fenced block is.** A string quoted verbatim from + another source, such as a third party's output, keeps its bytes inside an inline code span. No + tier judges it there. Outside Markdown a backtick is structural, so a code line is read whole. - **An unrecognized non-ASCII character is reported, not allowed.** Classify it into a tier above - before using it. A letter of a recorded name is the one exception, per the bullet above. + before using it. A letter of a recorded name and quoted data are the exceptions, per the bullets + above. - **No semicolon in agent-authored prose.** Recast a mid-sentence semicolon as a comma or as two sentences. A semicolon separating items in a list that already contains commas, or a statement terminator in code, is unaffected. A single semicolon separates such a list only between two labeled items, as in `Inputs: a, b; outputs: c`, and a list item's bold opening label is not one. + A semicolon inside one token, such as `TL;DR`, joins no clause and is unaffected too. - **No spaced hyphen joining or interrupting a sentence** (` - `, or the paired aside ` - x - `). Recast as a comma, two sentences, or parentheses. A hyphen inside a compound word, a leading list marker, a range, and the `- **Label** - explanation` bullet separator are unaffected. @@ -358,20 +371,31 @@ the `spec/` files and the carried `AUDIT.md` never reference the template repo behavior a carried rule needs, not the coordination flow that produced it, the maintainer supplies the destination out of band. A contextually relevant link to a related project (the image this config feeds, a library this depends on) is not a coordination reference. It is expected. The full -exceptions are in `references/carried-doc-references.md`. They are a verbatim section that must -name the hub to do its job, and a pointer to a hub-hosted tool the reader runs. +exceptions are in `references/carried-doc-references.md`. One is a verbatim section that must +name the hub to do its job. The other is a pointer to a hub-hosted tool the reader runs, or to a +procedure the reader runs from a hub checkout. ## PR titles and commit messages - **Format**: an imperative subject, 72 characters or fewer, no trailing period ("Add 24-Hour - PM2.5 Average Sensor", not "Added X" or "Adds X"). An optional body, blank-line separated, + PM2.5 Average Sensor", not "Added X" or "Adds X"). The 72 measures the authored title or subject. + The `(#N)` suffix GitHub appends at a squash merge sits outside it, so a merged subject past 72 + breaks no rule. An optional body, blank-line separated, explains *why* the change is being made when that is non-obvious, the diff already shows *what*. +- **Closing keywords**: `branching-and-release-model` says where one may go. A form of `close`, + `fix`, or `resolve` directly before an issue reference closes that issue, even inside a sentence + that negates it. So `does not fix #N` closes #N. Write a reference to an issue left open with no + keyword beside it, as in `#N stays open`. - **Rules**: no vague titles (`update stuff`, `wip`). Dependabot's default `Bump X from Y to Z` - titles are fine as-is. No `Co-Authored-By:` lines unless the developer explicitly asks. No + titles are fine as-is. A `Co-Authored-By:` line is allowed unless the developer disallows it, + and a repository's own rules may change that default. A link to the agent's session, such as a + `Claude-Session:` trailer, is never allowed in a commit message or a pull request. Neither the + developer nor a repository's rules can allow one. No release-bump magnitude in the title ("minor", "patch", "release v0.2.0"), Nerdbank.GitVersioning computes the next version from `version.json` and git history. A dependency version in a dependency-bump title is fine and expected. US English spelling, and title case with lowercase - short bind words (a, an, the, and, but, or, of, in, on, at, to, by, for, from). A hyphenated + short bind words. The bind-word list is exhaustive: a, an, the, and, but, or, of, in, on, at, to, + by, for, from, with, as, via, into, over, per. A hyphenated compound capitalizes both parts unless the second is a short preposition (*Built-in*, *EPA-Corrected*, *24-Hour*). @@ -383,6 +407,14 @@ Bump xunit.v3 from 3.2.2 to 3.3.0 Clarify Devcontainer Setup Steps in README ``` +## Copy-and-run commands + + + +A command in Markdown is text a reader copies and runs, so it has to run as written once pasted. That covers a code span opening with a command and every line of a shell fence. Such a command holds no bare ``, since the shell reads `<` as a redirection and the paste dies before the command runs. It holds no bracketed `[Placeholder]` either, since the shell reads that as a glob. The glob expands silently to any one-character file it matches. And it holds no bare `a|b` alternation, since the shell reads that as a pipe. The left-hand side then still runs, a live write included, while its own output vanishes behind an error from the right-hand side. A real pipe is spaced, so it never reads as an alternation. A placeholder is quoted instead, as in `git branch -d ""`, so the shell reads it as one word rather than as syntax. The quotes wrap the placeholder alone where its value may need the shell to expand it, such as a path opening `~`. The reader fills the value in inside the quotes. A value that is several arguments, such as a command and its own arguments, or one the shell must expand, replaces the quotes too. A single argument holding spaces keeps them. Inside a string handed to a second shell, such as the one `sh -c` runs, the placeholder is quoted within that string. A choice between values is written as the common value, with the other named in a parenthetical after the command. So `repo-config/configure.sh check "/" release` is followed by "(substitute `operational` for an operational repo)". In a shell fence that parenthetical is a trailing comment instead. An optional flag is not written in brackets, since that is a glob too. It is left out of the command and named in the parenthetical. The rule holds for every such command, one naming a single argument in prose included. That is because whether a reader pastes a span whole is a judgment no check can make. The prose gate's `paste-safe` rule enforces it for the commands its data file names. It also reads a string handed to a second shell, as `su -c`, `sh -c`, `bash -c`, and `ssh` take one, as the command that shell runs. + + + ## Quantitative claims diff --git a/.github/skills/comment-and-doc-style/references/carried-doc-references.md b/.github/skills/comment-and-doc-style/references/carried-doc-references.md index 4aa3397..d9125c0 100644 --- a/.github/skills/comment-and-doc-style/references/carried-doc-references.md +++ b/.github/skills/comment-and-doc-style/references/carried-doc-references.md @@ -53,13 +53,17 @@ same document's own prose, outside that region, is governed normally. A referenc verbatim section is a defect in the canonical. It is fixed once at the source rather than reported against every repository carrying it. -**The second exception is a hub-hosted tool the reader is told to run**, which is a different kind -of reference. A rule naming a gate, a script, or a reference snippet the reader executes or copies -states an instruction rather than a provenance. An instruction with no destination is -unfollowable, which is precisely how a pointer in carried text comes to read as decorative. The -test is whether the reference is something the reader *does* or something that *happened to this -file*. Where the content came from stays out, what the reader runs stays in. Such a pointer names -the hub's canonical rather than this repository's provenance. So it is the hub's to keep resolving +**The second exception is a hub-hosted tool the reader is told to run, or a procedure the reader +runs from a hub checkout.** It is a different kind of reference. A rule naming a gate, a +script, or a reference snippet the reader executes or copies states an instruction rather than a +provenance. So does a procedure whose steps the reader runs from a hub checkout, such as auditing +a repository and converging what the audit finds. Reporting a discrepancy upstream runs no such +step, so it stays under item 1. An instruction +with no destination is unfollowable, which is precisely how a pointer in carried text comes to read +as decorative. The test is whether the reference is something the reader *does* or something +that *happened to this file*. Where the content came from stays out, what the reader runs or +carries out stays in. Such a pointer names the hub's canonical rather than this repository's +provenance. So it is the hub's to keep resolving and never a repository's to edit out or re-point at a local path. What is reached rather than carried, and how, is `GOVERNANCE.md` "Hub-Hosted Tooling". In `AGENTS.md` and `GOVERNANCE.md` this belongs in verbatim rule text, the same region the first exception already covers. So the whole diff --git a/.github/skills/decision-triage/SKILL.md b/.github/skills/decision-triage/SKILL.md index fe537db..e367a42 100644 --- a/.github/skills/decision-triage/SKILL.md +++ b/.github/skills/decision-triage/SKILL.md @@ -28,7 +28,7 @@ maintainer is present. The run that follows then has the answers and meets fewer - **The triage seat** is the session this skill runs in. It reads the issue list, dispatches the classifiers and researchers, writes the `decision` issues, and asks the maintainer. It reads no - issue body itself beyond what a subagent returns. + issue body itself beyond what a subagent returns, save a maintainer's owed-action issue in step 8. - **A classifier** is a subagent given a batch of issue numbers. It returns one line per issue. - **A researcher** is a subagent given a cluster of questions that share a topic, five or six by default. It returns each question with its options and its evidence. @@ -57,7 +57,8 @@ and a guess costs a revert and a review round. - **It waits on the maintainer already.** It carries the `decision` label, or a comment asks the maintainer something still unanswered. - **The fix reaches past the repository's tree.** It changes a repository setting, a ruleset, - visibility, a secret, or a release condition. Or it needs a credential, an account, or a host + visibility, a secret, or a release condition. Or its remaining work lies in a repository under + another owner, whose writes need the maintainer's permission. Or it needs a credential, an account, or a host the session lacks. - **The fix edits anything under the hub's `host-setup/agent-safety/`.** That tree is the agent's own guard, so a human approves every change to it. An approval on the issue lets an attended @@ -78,10 +79,12 @@ issue for one undecided item is the failure this rule exists to prevent. These are not reasons an issue needs the maintainer, and a report never counts them as such. An issue that is `blocked` on another issue waits on that issue. One that needs a platform, by the -test `session-handoff` "The Chain" states, waits on that platform's lane. One that another group +test `session-handoff` "The Chain" states, waits on that platform's lane. One whose remaining work +lies wholly in another repository under the same owner waits on work there. One that another group or pull request holds waits on that work. One carrying `canonical-sweep` belongs to the workflow that owns it. One carrying `deferred` has its answer already, which is "not yet", and waits on the -condition its answer comment states. A handoff link carrying the `handoff` label is not an issue +condition its answer comment states. An `**Owed action:**` issue is one an account with write +access opened, its body opening with that marker. It waits on the step it names, per `backlog-burndown` "Ranking". A handoff link carrying the `handoff` label is not an issue of its own. ## The Procedure @@ -102,7 +105,11 @@ of its own. `git log refs/remotes/origin/develop` on the files the issue names. It also reads the state of any child issues the issue tracks, and any later comment recording a decision. A fix merged into `develop` and not yet promoted makes the issue `HELD` awaiting promotion rather than - `OVERTAKEN`. The queued `decision` issues get the same check and no classification beyond it. + `OVERTAKEN`. An `**Owed action:**` issue, as "Needs the Maintainer" defines one, skips the + `git log` reads, since git records no step taken. + A later comment from an account with write access recording the step done still makes it `OVERTAKEN`. Otherwise it + is `HELD` on the step it names, whoever's step it is, unless it waits on the maintainer already. + The queued `decision` issues get the same check and no classification beyond it. The classifier returns one line per issue in the form "Return Lines" below. Each batch also carries the `deferred` issues to re-check, which get no classification. The classifier reads the comment stating the condition the work waits for, from an account with @@ -166,7 +173,8 @@ of its own. 8. **Report** the counts: issues an agent can fix alone, questions answered, questions deferred, questions still open, overtaken issues closed, and splits filed. Give the count of open `deferred` issues as well, after step 2's lifts, and how many it lifted. Also name each issue held back for any other reason "Needs the - Maintainer" does not count, under that reason. End with one line saying a `backlog-burndown` away-mode run + Maintainer" does not count, under that reason. List each `HELD` owed action that is the + maintainer's as a step to take. Read its issue body for each command it gives, and for any promotion or release it says the step waits on. End with one line saying a `backlog-burndown` away-mode run can now work the rest. ## Return Lines @@ -176,7 +184,7 @@ of its own. | classifier | `AUTO #` | an agent can fix it alone | | classifier | `ASK # ` | the whole issue needs the maintainer | | classifier | `SPLIT # ` | part needs the maintainer, the rest does not | -| classifier | `HELD # ` | waits on something other than a decision, such as a promotion or an attended run for an approved agent-safety edit | +| classifier | `HELD # `, the reason for an owed action reading `owed action, ` | waits on something other than a decision, such as a promotion, an attended run for an approved agent-safety edit, or an `**Owed action:**` issue's step | | classifier | `OVERTAKEN # ` | a later change already settled it, found by the history check | | classifier | `LIFT # ` | a `deferred` issue whose checkable condition now holds | | classifier | `KEEP # ` | a `deferred` issue that stays deferred | @@ -189,7 +197,7 @@ reported as unclassified where it fails twice. ## Briefs Brief on `AGENTS.md` "Context and Delegation Discipline"'s subagent shape. A classifier's brief -quotes "Needs the Maintainer" whole and states the history check and the `deferred` re-check in step 2. It lists its issue +quotes "Needs the Maintainer" whole and states the history check, the owed-action `HELD` line, and the `deferred` re-check in step 2. It lists its issue numbers, marking the ones to re-check. It also states how step 6 says a kept-open comment reads. A researcher's brief names each issue in its cluster, its question, and the rule files it touches. It also states how to weigh what the issue holds: @@ -217,7 +225,9 @@ an item leaves the queue, carried here whole as a generated include. - **Reference every pull request as a clickable link.** When you mention a PR on a surface that renders Markdown (chat, a summary, a report), render it as a Markdown link to the PR. Write it as `[#N](https://github.com/OWNER/REPO/pull/N)`, never a bare `#N`. The same applies to issues and commits. **The form follows the surface.** Some surfaces link neither a Markdown link nor a bare URL, an interactive prompt's question and option text among them. Pasting a full URL into one of those does not rescue it, since the reader gets a string to copy. That is the outcome this rule exists to prevent. There the reference is a bare `#N`. The clickable link goes in the message that comes **before** the prompt rather than merely alongside it. That is because the prompt blocks on an answer, and a message emitted after it is read once that answer is already given. That is the one moment the link is no longer any use. The test is whether the reader can click it where it is read, not whether it was written in the syntax that works elsewhere. - **Put a command the user must run where the user can run it.** This session's input line is where the user types to the agent. A command runs outside this session where this session's input line cannot run it or cannot hold its effect. One waiting on typed input, such as a password or a confirmation, is such a command. So is one meant for another host, or one setting a variable the session reads at launch. Every other one runs at this session's input line, where that line can run a command, and outside the session otherwise. **A command the user runs outside this session goes in the question's own text.** Where a question asks the user to run one, the question carries the exact command, complete and ready to paste. A message before the prompt may repeat the command, but the question never points at that message. A question pointing at it can leave the reader to find the command among a long run of earlier output. Such a command stays in the prompt, where the turn opens one, although the clickable-link bullet above moves a link out of one. The command needs no rendering, since the prompt shows it as plain text the reader can copy. **A command the user runs at this session's input line never goes in an interactive prompt.** On Claude Code such a command is a `!` line, typed at the session's input line so its output lands in the session. While an interactive prompt is open, the user cannot type at the session's input line. So a command placed in one sits in the one surface that blocks running it. It goes in a plain message instead, as a fenced block holding the `!` line itself, complete and ready to paste. Several commands join on that one line with `&&`, which runs them in order and stops at the first that fails. The block opens the message. Any question the same turn owes follows it as a numbered list, and any report comes after both. The message asks the user to reply once the command has run, and the turn ends with no interactive prompt open. The agent then checks the result on the user's next message. It reads back the state the command was meant to change, or the output it left in the session. An answer saying the command ran is not that check. -- **Ask every question through the interface's prompt, never in prose.** When you need the user to decide, answer, or approve anything, put it to them through the interface's own prompt mechanism. Do so whether or not work is blocked on it. An offer to do more work ("want me to file that?") is a question like any other. A question written into a message is lost in the report around it, however short it is. One closing a long report sits where the reader is least likely to reach it. Where no prompt mechanism is available, the questions go as a numbered list opening the message rather than closing it. The user can then reply per number. A turn asking for a command the user runs at this session's input line is an exception, per the command bullet above. It puts every question it owes in that message, since a prompt open beside the command would block the place it runs. This bullet settles how a question is put once it is asked. Whether a question is asked now or recorded for later is the parking bullet's to settle. That is the one opening "A question filed as an issue is parked rather than asked". +- **Ask when the user can cheaply confirm.** An assumption that saves one question and is wrong costs the rework plus the trust. So a genuine ambiguity in intent, scope, or authorization is raised, not resolved by picking the likelier reading. Rules that already answer the question (the committed instruction set) are not ambiguity, so read them first rather than asking what they state. +- **The irreversible step (merging, publishing, releasing, force-pushing, deleting, changing branch protection) stays the maintainer's.** **A grant given in a past session or for a different task authorizes nothing now.** Whether a credential's reach or a tool that happens to work authorizes anything is answered by `GOVERNANCE.md` "Repository Boundaries and Write Safety" rather than here. +- **Ask every question through the interface's prompt, never in prose.** When you need the user to decide, answer, or approve anything, put it to them through the interface's own prompt mechanism. Do so whether or not work is blocked on it. An offer to do more work ("want me to file that?") is a question like any other. A question written into a message is lost in the report around it, however short it is. One closing a long report sits where the reader is least likely to reach it. **Each question reads whole from its own text.** It states the problem, why it is being asked, and what each option does, in plain words. It may cite an issue or a pull request by number. The question and its options still read fully without opening it. A question leaning on an issue for its meaning is often answered without reading that issue, so the answer misses its point. Where no prompt mechanism is available, the questions go as a numbered list opening the message rather than closing it. The user can then reply per number. A turn asking for a command the user runs at this session's input line is an exception, per the command bullet above. It puts every question it owes in that message, since a prompt open beside the command would block the place it runs. This bullet settles how a question is put once it is asked. Whether a question is asked now or recorded for later is the parking bullet's to settle. That is the one opening "A question filed as an issue is parked rather than asked". - **Raise work blocked on the user as a direct interactive prompt.** When progress needs a decision, an authorization, or an answer only the user can give, ask for it at the point the work stops. Ask through the interface's own prompt mechanism. Never leave it as prose in a summary. A handoff buried in a paragraph is a handoff that did not happen. That is because a summary reads as a report of finished work. It is also because the one line still waiting on the user is the easiest in a summary to skim past. The blocked item is the message, not a closing remark on a message about something else. **The options offered are the actions themselves.** The one that unblocks the work names the action it authorizes ("squash and merge it"). Selecting it is then the go-ahead rather than a note to act on later. Offering only ways to wait is the same failure in interactive clothing. That is because a prompt whose every choice is inaction reports the block rather than clearing it. Where the agent may not perform the authorized action itself, the option says who does it. Where no interactive prompt is available, the numbered list the bullet above names is the fallback. In a turn asking for a command the user runs at this session's input line, the command bullet above replaces the interactive prompt. - **Lead every choice with a recommendation and its reason.** Wherever the user is asked to choose, in a prompt or in a numbered list, the option the agent recommends comes first. It is marked as the recommendation, and every option states the reason for it. A user who takes the recommendation then reads one line, and one who does not sees what the other options trade away. A question with no defensible recommendation says so rather than inventing one. Where an open question has no options and the agent does have an answer, that answer and its reason go in the question's text. They never go in as an invented option. - **A question filed as an issue is parked rather than asked, and it stays owed.** Where the work cannot continue without the answer, the interactive-prompt bullet governs and the question is asked at the point the work stops. Wherever the question is recorded rather than asked, recording it is the right thing to do, and recording it is still not asking it. That holds whether the work can continue without the answer or the question was asked once and deferred. So the issue carries the fleet's `decision` label. When the filing session knows the choices the question is between, the issue states them. The label and the stated choices are what let a later session, one that was not there when the issue was filed, find the question. That session can then put the question to the user without inventing its answers. **The parked queue is the failure, not the parking.** An issue holding a question the user has never seen reads to every later session as tracked work rather than as a block. So each session files correctly and moves on. Presenting the accumulation is the step nobody owns. @@ -239,7 +249,7 @@ A rule, a Skill, or a brief names a model tier, never a model. A model release i - **`frontier`** is the fleet's default reasoning tier, for orchestrating, rule text, design, spec logic, and adversarial review. It is not the most capable model available, which is `highest`. - **`standard`** is ordinary implementation and driving a pull request. Judging a review finding is never mechanical, however often it repeats, so it runs at `standard` or above. A `standard` driver's evidence-backed decline of a finding raised on its pull request stands, since that pull request's reviewers and its merge gate check it. - **`bulk`** is the cheapest model that does the work correctly. It is for high fan-out mechanical work, such as an extraction or a status check. -- **`highest`** is the most capable model available, and only the maintainer selects it. The maintainer chooses it for the session itself, or allows it for the session's subagents at launch. The host's agent-safety kit reads that launch setting, `FLEET_ALLOW_HIGHEST=1` on Claude Code. Naming the tier in a prompt does not set it. A maintainer naming it partway through a session restarts the session with it allowed, and an agent never sets it. Without that setting, the kit refuses a dispatch that names it. A dispatch naming no model runs at its agent definition's model where one is set, and otherwise at the session's own. A fork always runs at the session's model, whatever it names. So a session launched on `highest` names a tier on every dispatch meant to run below it, and uses no fork for such work. A session never reaches for it because a task looks hard. +- **`highest`** is the most capable model available, and only the maintainer selects it. The maintainer chooses it for the session itself, or allows it for the session's subagents at launch. The host's agent-safety kit reads that launch setting, `FLEET_ALLOW_HIGHEST=1` on Claude Code. Naming the tier in a prompt does not set it. A maintainer naming it partway through a session restarts the session with it allowed, and an agent never sets it. Without that setting, the kit refuses a dispatch that names it. A dispatch naming no model runs at its agent definition's model where one is set. Otherwise it runs at the default the host's agent-safety kit sets, which is the `frontier` model. On a host without the kit it runs at the session's own. That default does not reach every agent type a tool builds in. On Claude Code the `Explore` and `Plan` types still take the session's model, so the kit refuses a dispatch of either that names no model. A fork always runs at the session's model, whatever it names. So a session launched on `highest` names a tier on every dispatch meant to run below it, and uses no fork for such work. The kit's default is a backstop for a dispatch that forgot its tier, never a reason to leave one out. A session never reaches for it because a task looks hard. | Tool | `highest` | `frontier` | `standard` | `bulk` | | --- | --- | --- | --- | --- | @@ -248,7 +258,7 @@ A rule, a Skill, or a brief names a model tier, never a model. A model release i Each cell is the name that tool's subagent dispatch takes, which follows the latest model of its family. A dispatch on a tool with no row here, or on one that cannot name a model per subagent, names no model. - **A tier resolves only through this table.** A word such as "frontier", "strongest", or "most capable" never resolves to `highest`. The industry's "frontier model" is the opposite of what this tier means here. A session that cannot see this table names no model rather than guessing one. -- **An orchestrating seat runs at `frontier` and names a tier on every dispatch.** It defaults a subagent to `frontier`, and picks `standard` or `bulk` deliberately for execution or mechanical work. +- **An orchestrating seat runs at `frontier`, or at `highest` where the maintainer chose that for the session, and names a tier on every dispatch.** It defaults a subagent to `frontier`, and picks `standard` or `bulk` deliberately for execution or mechanical work. diff --git a/.github/skills/dotnet-codestyle/SKILL.md b/.github/skills/dotnet-codestyle/SKILL.md index 83ad901..a26a19a 100644 --- a/.github/skills/dotnet-codestyle/SKILL.md +++ b/.github/skills/dotnet-codestyle/SKILL.md @@ -2,16 +2,16 @@ name: dotnet-codestyle description: >- Governs C#/.NET code style for ptr727/ProjectTemplate fleet repos: the zero-warnings build policy - and its clean-compile task chain, central Directory.Build.props and Directory.Packages.props, C# - language and naming conventions, XML documentation, analyzer suppression scope, the - library-versus-application logging split, async and error-handling patterns, xUnit v3 and + and its clean-compile task chain, central build and package props, C# language and naming + conventions, XML documentation, analyzer suppression scope, the library-versus-application + logging split, async and error-handling patterns, console-app interrupts, xUnit v3 and AwesomeAssertions testing, and AOT-compatible project configuration. Use this whenever writing, - reviewing, or editing a .cs file, a .csproj, Directory.Build.props, Directory.Packages.props, or global.json, - whenever choosing where to suppress an analyzer diagnostic, whenever a NuGet library needs to log - without depending on Serilog directly, or whenever writing or reviewing an xUnit test. Triggers - even when the task looks like a small local fix ("just silence this warning", "add a quick log - line"), because each of these rules erodes one file at a time and never as one obvious diff. - Applies only to a repo's .NET side. + reviewing, or editing a .cs file, a .csproj, Directory.*.props, or global.json, whenever + choosing where to suppress an analyzer diagnostic, whenever a NuGet library needs to log without + depending on Serilog directly, or whenever writing or reviewing an xUnit test or a console app's + entry point, signal handling, child-process execution, or exit status. Triggers even when the + task looks like a small local fix ("just silence this warning", "add a quick log line"), because + each of these rules erodes one file at a time. Applies only to a repo's .NET side. --- # .NET Codestyle @@ -43,8 +43,11 @@ All builds must complete without warnings, enforced as follows: - **Analyzer configuration.** `true` with `latest-all` and `All` (the full analyzer set), plus `true`. With that, any diagnostic - surfaced as a warning fails the build. Such a diagnostic must be fixed or deliberately suppressed at the - narrowest scope that fits (see Analyzer suppressions below), never left to accumulate. + the build surfaces as a warning fails it. `EnforceCodeStyleInBuild` is left unset, so the IDE code-style + rules do not run in the build, and the `dotnet format style` step fails on their warnings instead. Such a diagnostic must be fixed or deliberately suppressed at the + narrowest scope that fits (see Analyzer suppressions below), never left to accumulate. IDE0079 is + the exception, since neither that step nor the build reports it. Remove a suppression the IDE + flags under IDE0079 only once the format step and every configuration and target framework CI builds pass without it. - **CI lint backstop.** CI runs the clean-compile checks on every PR as the authoritative gate. Husky.Net is wired from the canonical `catalog/snippets/husky/` config in the hub, hub-local and not carried into every fleet repo. Its hook needs a .NET tool manifest declaring @@ -60,9 +63,7 @@ All builds must complete without warnings, enforced as follows: per-clone enablement steps. **A new port is not a license to silence diagnostics.** Brownfield or just-ported status never -justifies relaxing analyzer severities or muting newly surfaced warnings. Fix them. (The only -brownfield allowance in the fleet is the one-time git-signing / line-ending migration described in -GOVERNANCE.md and README.md. That migration has nothing to do with code analysis.) +justifies relaxing analyzer severities or muting newly surfaced warnings. Fix them. ### Central build and package configuration @@ -105,16 +106,38 @@ Shared MSBuild configuration is centralized at the repository root, never duplic The major tracks the repo's .NET TFM (`net10.0`), never a `netstandard` target an analyzer or source-generator project carries beside it. It moves only with that TFM (`11.0.100` alongside - `net11.0`), and such a project's fixed `LangVersion` moves with them. The hub's workflows and composite actions install the SDK line through - `setup-dotnet`'s `dotnet-version`, and the hub's devcontainer snippet through its image tag. A - repo calling them therefore cannot move to a new major alone, since CI would then find no - compatible SDK. Such a move starts in the hub, as a fleet-wide change. The hub's steps and image - provide both lines until every repo has moved. A repo still on - `10.0.100` would otherwise find no compatible SDK once the hub installs only the new line. - - A developer host now needs a release SDK on the line, 10.0.x today. A host holding only a newer - major, or only a 10.0 preview, fails with a clear "A compatible .NET SDK was not found" error - rather than silently drifting. Install the line's SDK beside the newer one. + `net11.0`), and such a project's fixed `LangVersion` moves with them. The line is the + repository's own choice, per `CODESTYLE.md` "Toolchain Versions", so a repository may lead or + lag the hub's baseline. Its move edits `global.json`, the TFM, its devcontainer image tag, and + any analyzer project's fixed `LangVersion` together, in that repository alone. A resync carries + the baseline's `rollForward` and `allowPrerelease` and never changes the repository's + `sdk.version`. The hub's workflows install the line the calling repo's own `global.json` + selects, through `setup-dotnet`'s `global-json-file`, so CI follows each repo's file. A repo + carrying no `sdk` block yet gets `10.x`, the baseline's major, which the hub's tests hold to the + baseline. The hub's host installers install the line the `catalog/snippets/configs/global.json` + baseline selects, named in each installer and held equal to the baseline by the hub's tests. + The Linux one adds the newest line the feed carries, and every other line under `--optional`. + The Windows one adds the two majors below it under `-Optional`. A fleet-wide move is a hub change to that + baseline, the installers, that fallback, and the devcontainer snippet's image tag. A repository + not yet moved keeps building on its own line. + + A multi-targeted project (`net10.0;net11.0`) still has one + selector. Its `global.json` names the highest target framework's line, since that SDK builds + every target framework, so the release and the pack run on it. Where `Directory.Build.props` + sets a singular `TargetFramework`, the multi-targeted `.csproj` clears it, since a singular value + wins and builds one framework only. Its test projects run each framework under that framework's + own runtime. So the repository passes the hub's `validate-task.yml` a `dotnet-versions` input + naming every line, the `global.json` line first, such as `'["11.0", "10.0"]'`. Each line then + runs as its own unit-test leg, with every line installed beside the selected one. An entry + leading with another line fails the run. + + A developer host now needs a release SDK on the repository's line, 10.0.x for the fleet default + today. A host holding only another major, or only a 10.0 preview, fails with a clear error. It + reads "A compatible .NET SDK was not found" rather than silently drifting. The hub's host + installers install the fleet default line's SDK by default. A host building a repository on + another line adds that line's SDK. The Linux `--optional` set, the Windows `-Optional` set for + an older major, or a direct install provides it. On Linux, a package feed carrying no package for the default line is named in a + warning and in the report. **`LangVersion` is left unset** in every `.props` or `.targets` file the repo holds and every project targeting a .NET TFM. The SDK's own targets derive it, which is the point. The C# version then follows the TFM (`net10.0` gives C# 14 under any SDK). Never set it @@ -172,7 +195,8 @@ updates, dependency upgrades, benchmarks) on top: Key rules: no `var` (always explicit types), file-scoped namespaces, Allman braces, Nullable enabled, modern C# features (primary constructors, pattern matching, collection expressions). Every public surface has XML documentation. Private fields use `_camelCase`, static fields `s_camelCase`, -constants PascalCase. Member ordering follows StyleCop SA1201. +constants PascalCase. Member ordering follows StyleCop SA1201 by kind first, then SA1202 by access +within one kind. For language features, naming, code structure, and XML documentation examples, see `references/conventions.md`. @@ -203,6 +227,11 @@ The .NET mechanics, narrowest first: `dotnet_analyzer_diagnostic.severity`) to push a brownfield port through the build is exactly what this forbids. +A code-style option in the root `.editorconfig` takes a `dotnet_diagnostic..severity = warning` +entry for each rule it configures. An option alone leaves its rule at the default severity, often +hidden, which the format gate never reports. A formatting option is the exception, since CSharpier +owns formatting and IDE0055 stays `none`. + ## Error handling and logging 1. **Structured logging**: use structured message templates. Serilog is the application's concrete @@ -240,17 +269,34 @@ The .NET mechanics, narrowest first: } ``` -5. **Exceptions**: do not swallow exceptions, either log and rethrow or translate to a - domain-specific exception. +5. **Exceptions**: do not swallow exceptions. Either log and rethrow them or translate them. + Translate a fault into a domain-specific exception. A library lets a cancellation of its + caller's token propagate as `OperationCanceledException` and never translates it. Application + code lets it propagate too, except at a boundary that returns an outcome, such as the child-tool + runner. That boundary catches it only `when` a stop or kill token from the lifetime owner is + cancelled. It returns a domain result such as a cancelled outcome. A cancellation the filter does + not match still propagates. A catch at the last frame an exception can reach logs or reports it + and does not rethrow, since nothing above it can. Such frames are the entry point's catches, a + signal handler, and the unhandled-exception handler's guards. A callback reporting a fault is + one too. See "Interrupts in .NET" and "Unhandled Exceptions in .NET". ## Code patterns -1. **Guard clauses**: prefer early returns for validation and error handling. +1. **Guard clauses**: prefer early returns for validation and error handling. A guard that CA1510 + to CA1513 match calls the throw helper its rule names, such as `ArgumentNullException.ThrowIfNull`. + That holds even where IDE0046 offers a conditional `return` for it. A `netstandard` project + lacks those helpers, so a guard there that IDE0016, IDE0046, or IDE0270 matches takes the throw + expression instead. A local assigned and then + null-checked takes `?? throw` on the assignment, per IDE0270. IDE0046 makes any other such + shape a single conditional `return`, a throw expression included. That shape is an `if` and + the `return`, `throw`, or `else` right after it, each branch only returning a value or throwing. Both + branches throwing is not that shape. Write that shape as the conditional `return` from the start. 2. **Async all the way**: avoid blocking calls (`.Result`, `.Wait()`), use `async`/`await`. 3. **Cancellation tokens**: accept `CancellationToken` as the last parameter and pass it through. 4. **ConfigureAwait**: in library code, use `ConfigureAwait(false)` unless context is required. Do not call `ConfigureAwait(false)` in xUnit tests (see xUnit1030). -5. **Disposables**: use `await using` for async disposables, prefer `using` declarations. +5. **Disposables**: use `await using` for async disposables. A `using` declaration is required + wherever IDE0063 matches. 6. **LINQ vs loops**: use LINQ for clarity, loops for hot paths or allocations. 7. **HTTP**: reuse `HttpClient` via factory, never per-request instantiation. 8. **Collections**: prefer `IReadOnlyList`/`IReadOnlyCollection` for public APIs. @@ -261,6 +307,58 @@ The .NET mechanics, narrowest first: 12. **Lazy initialization**: use `Lazy` for static, thread-safe instantiation (e.g. a logger factory, an HTTP factory). +## Console app lifetime + +A console app's entry point follows the sections below, carried from `CODESTYLE.md`. +`references/console-lifetime.md` holds a reference skeleton of the lifetime owner, the `Main` +shape, and the tool runner. It also holds the stop matrix measured with a prototype of this design. + +## Interrupts + + + +This applies to every shell and Python script and to every .NET console app, which the bullets below also call a script. `CODESTYLE.md` "Interrupts in Python", "Interrupts in Shell", and "Interrupts in .NET" state each language's mechanics. + +- **On SIGINT or SIGTERM, a script releases what it holds before it exits.** It removes the temporary paths it created, releases the locks it took, and stops the child processes it started. A path, lock, or child left behind can stop the next run from starting, or feed it a half-written input. A script started with SIGINT ignored keeps it ignored, so a stop meant to reach it sends SIGTERM. A non-interactive shell starts a background child that way. +- **A write to persistent state goes to a temporary path beside the target, then is renamed over it.** An interrupt then leaves the old content or the new, never a mix of both. A store with transactions of its own, such as an SQLite database, is written through those instead. A rename over an open database can corrupt it. +- **An interrupted script prints one line naming the signal, with no traceback, and ends by re-raising the signal.** The signal then ends the process, so a shell reports 130 for SIGINT or 143 for SIGTERM, 128 plus the signal number. At Ctrl-C, a calling shell's loop then stops rather than starting its next iteration. A script calling `exit 130` has not died by the signal, so that loop reads an ordinary non-zero exit and runs on. A launcher between them, such as `uv run`, exits with the status rather than dying by the signal, so that loop runs on there too. +- **A script takes this rule when it is created or next edited.** An existing script is not edited for this rule alone. +- **A script that holds a lock, temporary state, or a child process owes a test that signals it mid-run.** The test sends SIGINT or SIGTERM, then asserts that the script died by that signal and that nothing it held remains. It starts the script with its interpreter directly, since a launcher such as `uv run` hides the signal death. It is skipped on Windows, where a test has no way to send SIGINT or SIGTERM to the process it started. A script holding none of these owes no such test. +- **A script that ends by `exec`-ing its long-running process owes no interrupt handling for that process.** The `exec` replaces the script, so a signal reaches the process directly. A background child the script starts to outlive the `exec` is handed across it, and the script neither stops it nor waits for it. Such a child is handed across only where something else stops it, such as a container's teardown of its whole process tree. Anything else the script holds is released before the `exec`. A script that holds nothing else at any point before the `exec` owes no trap and no signal test. As PID 1, such as a container's entrypoint, it ignores a SIGTERM that arrives before the `exec`, so a stop waits for its timeout. + + + +## Interrupts in .NET + + + +- **One lifetime owner handles every stop, and an asynchronous `Main` creates it before it parses arguments or creates the logger.** The owner registers `PosixSignalRegistration` for SIGINT, SIGTERM, and SIGHUP. A signal that lands before then takes its default action, and no summary is logged. SIGQUIT stays unhandled, so it remains the immediate exit. The owner holds a graceful stop token, a forceful kill token, and the recorded stop reason. Its token sources are never disposed, since a handler can still run after its registration is disposed. +- **Stop requests escalate.** The first records the signal and sets `context.Cancel`. It cancels the stop token with `CancelAsync()` and arms the kill token with `CancelAfter` at the kill bound. The second cancels the kill token and sets `context.Cancel` too, so cleanup and the log flush still run. The third cancels the kill token synchronously and leaves `context.Cancel` unset, so the signal's default action ends the process. The handler does nothing else but log one line, and its body sits inside a catch-all. `Cancel()` runs a token's callbacks on the calling thread, which here is the signal thread. An exception that escapes a signal handler ends the process. +- **The kill bound sits below the container stop grace, at a value such as 5 seconds.** That grace is 10 seconds by default. A bound below it leaves time for cleanup and the log flush before the container is killed. +- **On Windows, the console close and shutdown handlers wait for cleanup, since the process ends when each handler returns.** A console close reaches the app as SIGHUP, and a system shutdown reaches it as SIGTERM. The SIGHUP handler and the SIGTERM handler there each cancel the stop token and the kill token. Each then waits, for less than 5 seconds, until `Main` signals that cleanup finished. +- **System.CommandLine handles neither signals nor exceptions.** The app sets `ProcessTerminationTimeout` to null and `EnableDefaultExceptionHandler` to false. Each action takes `(ParseResult, CancellationToken)`, and `InvokeAsync` receives the stop token. `Main` holds one `try`, and its `finally` flushes the log. The library's own handler exists only for an asynchronous action. It returns after its timeout while the action still runs, and it reports a cooperative cancel as exit 1. +- **Cancellation is a parameter end to end.** Every call that can wait takes the token it honors as a parameter. No static accessor reads a token, and no call blocks on a task. A static accessor hides which token a call honors, and a blocked thread cannot see the stop. +- **A fault is its own stop reason.** A callback off the main flow, such as a file watcher or a timer, catches its exception and reports a fault to the owner. An exception that escapes such a callback is unhandled, so the process aborts instead of cleaning up. Any stop, a fault included, arms the kill bound once, and a later stop does not move it. The exit follows the recorded reason: a fault first, then a signal, then the result. A fault exits with the app's error status, never 0 and never a signal status. +- **One function runs every child tool.** On Unix it starts the child in a session of its own with `ProcessStartInfo.StartDetached`, and every standard stream is redirected. A terminal's signal then reaches only the app, which stops the child once. A child left in the app's process group receives the signal twice, the terminal's and the app's. `KillOnParentExit` is set where the platform supports it, so a child does not outlive an app that is killed. The stop token is the graceful stop, and the kill token is the forceful one. Where a stop was requested, the tool run is cancelled, and any other signal death is a tool failure. These start options need the .NET 11 line, so an app that runs child tools selects that line or a later one. On Windows `StartDetached` stays unset, since the graceful stop attaches to the child's console. +- **What a child starts and leaves behind, such as a container, is named and removed in the stop path.** Stopping the child does not stop what it started outside its own process tree. The removal runs under a short bound of its own and takes neither token. It runs after the tools stop, so its bound and the kill bound together fit inside the container stop grace. With a 10-second grace and a 5-second kill bound, a removal bound such as 3 seconds fits. A stop can cancel the stop token and the kill token before the removal starts. A third stop or a kill of the app abandons the removal. +- **A child inherits an ignored SIGINT, so the kill bound is what ends it there.** A non-interactive shell starts a background job with SIGINT ignored, and the app's children inherit that. The app's SIGINT registration then never fires, and a SIGTERM still stops the app. +- **One exit decision ends the app, and a signal stop ends it by re-sending the signal.** This is the .NET form of the re-raise in `CODESTYLE.md` "Interrupts". After the log is flushed, the app disposes its registrations and restores the signal's default action with libc `signal`. It then re-sends the signal to itself with libc `kill`, so a calling shell loop stops. Where that cannot end the process, as PID 1 in a container or on Windows, `Main` returns 128 plus the signal number. Nothing relies on `ProcessExit` or a finalizer, since the default action ends the process without running either. +- **The rename over persistent state uses `File.Move` with overwrite.** The temporary file sits beside the target and is flushed to disk with `Flush(true)` before the move replaces the target. A rename of content that was never flushed can survive a power loss as an empty file. +- **For an app that holds a lock or temporary state or runs children, the signal test in `CODESTYLE.md` "Interrupts" signals the built app mid-run.** It starts the app with default signal dispositions, as `env --default-signal=INT,QUIT` does. It signals the app alone and asserts death by the signal and that nothing the app held remains. An app that runs children is also signaled on its process group, and its test asserts that no child remains. A calling shell loop that stops after SIGINT to its process group proves death by SIGINT, since an exit status alone cannot. An app that ships a container image runs the PID 1 path in that image. The test asserts the logged line naming the signal, which `CODESTYLE.md` "Interrupts" requires. It is skipped on Windows. + + + +## Unhandled Exceptions in .NET + + + +- **The lifetime owner subscribes `AppDomain.CurrentDomain.UnhandledException` first in `Main`, and its handler logs the exception without surviving it.** The handler writes the exception to standard error and cancels the kill token synchronously, so the tools end. It flushes the log on another thread under a bound, such as 3 seconds, and then returns. The runtime then aborts, so the abort status and any crash dump remain. The handler does not call `Environment.Exit`, and the app does not use `ExceptionHandling.SetUnhandledExceptionHandler` to continue. Continuing would run on with whatever state the exception left broken. +- **`TaskScheduler.UnobservedTaskException` is logged as an error.** A faulted task that nothing awaited raises it only when the task is collected, so the log is the one place its exception shows. +- **A fatal runtime error is not a managed exception and reaches no handler, so a crash dump is its only capture.** The `DOTNET_DbgEnableMiniDump` setting enables that dump. +- **As PID 1 the abort surfaces as another status, so after a logged unhandled exception a caller reads any status above 128 as the abort.** Outside PID 1 on Linux the process dies by SIGABRT. The kernel drops the abort signal's default action for PID 1, and the status measured there on x86-64 is 139. + + + ## Testing conventions xUnit v3 (`xunit.v3`, not the legacy `xunit`) + AwesomeAssertions (`.Should()` API, never native @@ -269,7 +367,7 @@ parameterized tests. A test project on `xunit.v3` 4.0.0 or later is MTP-based, a ## Project configuration -.NET 10.0 target, AOT-compatible (`IsAotCompatible=true`, with `VerifyReferenceAotCompatibility=true` only under the `PublishAot` condition), +Target the repository's own .NET line, .NET 10.0 for the fleet default. AOT-compatible (`IsAotCompatible=true`, with `VerifyReferenceAotCompatibility=true` only under the `PublishAot` condition), SourceLink, embedded untracked sources, `InternalsVisibleTo` for test/benchmark access. See `references/project-config.md` for the full property list. diff --git a/.github/skills/dotnet-codestyle/references/console-lifetime.md b/.github/skills/dotnet-codestyle/references/console-lifetime.md new file mode 100644 index 0000000..014750d --- /dev/null +++ b/.github/skills/dotnet-codestyle/references/console-lifetime.md @@ -0,0 +1,414 @@ +# Console App Lifetime + +This is a reference skeleton for `CODESTYLE.md` "Interrupts in .NET" and "Unhandled Exceptions in .NET". It builds on the .NET 11 line under the fleet's analyzer set with no warnings, and CSharpier and `dotnet format style` report nothing on it. Adapt the command, the tool, and the log sink, and keep the shape. + +## Project + +The repository selects the .NET 11 line, since `ProcessStartInfo.StartDetached` and `KillOnParentExit` need it. Its move to that line follows `CODESTYLE.md` "Toolchain Versions", with `TargetFramework` set to `net11.0` in `Directory.Build.props`. The code relies on `ImplicitUsings` being enabled there. The project references System.CommandLine, CliWrap, Serilog, and Serilog.Sinks.Console, with their versions in `Directory.Packages.props`. Its own `.csproj` sets `AllowUnsafeBlocks`, because the `LibraryImport` source generator requires it. + +```xml + + Exe + true + +``` + +## The Lifetime Owner + +`Exit` is the one exit decision. `Main` calls it last, after the log is flushed, and it also tells a waiting Windows close or shutdown handler that cleanup finished. The Windows console close and shutdown handlers wait for cleanup even when another stop came first, and the kill bound is armed once. The token sources are never disposed, which is what the CA1001 suppression records. + +```csharp +using System.Runtime.InteropServices; +using Serilog; + +namespace ConsoleApp; + +[System.Diagnostics.CodeAnalysis.SuppressMessage( + "Design", + "CA1001:Types that own disposable fields should be disposable", + Justification = "A signal handler can still run after its registration is disposed." +)] +internal sealed partial class Lifetime +{ + public const int ErrorExitCode = 1; + + private readonly CancellationTokenSource _stop = new(); + private readonly CancellationTokenSource _kill = new(); + private readonly ManualResetEventSlim _cleanupDone = new(); + private readonly PosixSignalRegistration[] _registrations; + private int _stopCount; + private int _killArmed; + private int _signalNumber; + private Exception? _fault; + + [System.Diagnostics.CodeAnalysis.SuppressMessage( + "Reliability", + "CA2000:Dispose objects before losing scope", + Justification = "The registrations live for the whole run, and Exit disposes them before re-sending a signal." + )] + public Lifetime() + { + AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; + TaskScheduler.UnobservedTaskException += OnUnobservedTaskException; + _registrations = + [ + PosixSignalRegistration.Create(PosixSignal.SIGINT, OnSignal), + PosixSignalRegistration.Create(PosixSignal.SIGTERM, OnSignal), + PosixSignalRegistration.Create(PosixSignal.SIGHUP, OnSignal), + ]; + } + + public TimeSpan KillBound { get; set; } = TimeSpan.FromSeconds(5); + + public CancellationToken StopToken => _stop.Token; + + public CancellationToken KillToken => _kill.Token; + + public bool StopRequested => _stop.IsCancellationRequested; + + public void Fault(Exception exception) + { + _ = Interlocked.CompareExchange(ref _fault, exception, null); + Log.Error(exception, "Stopping on a fault"); + RequestStop(); + } + + public int Exit(int exitCode) + { + _cleanupDone.Set(); + if (Volatile.Read(ref _fault) is not null) + { + return ErrorExitCode; + } + int number = Volatile.Read(ref _signalNumber); + if (number == 0) + { + return exitCode; + } + foreach (PosixSignalRegistration registration in _registrations) + { + registration.Dispose(); + } + if (!OperatingSystem.IsWindows() && Environment.ProcessId != 1) + { + _ = SetSignalHandler(number, 0); + _ = Kill(Environment.ProcessId, number); + } + return 128 + number; + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( + "Design", + "CA1031:Do not catch general exception types", + Justification = "An exception escaping a signal handler ends the process." + )] + private void OnSignal(PosixSignalContext context) + { + try + { + if ( + OperatingSystem.IsWindows() + && context.Signal is PosixSignal.SIGHUP or PosixSignal.SIGTERM + ) + { + _ = Interlocked.CompareExchange(ref _signalNumber, SignalNumber(context.Signal), 0); + Log.Warning( + "{Signal} received, the process ends when this returns", + context.Signal + ); + RequestStop(); + _ = _kill.CancelAsync(); + _ = _cleanupDone.Wait(TimeSpan.FromSeconds(4)); + return; + } + int count = Interlocked.Increment(ref _stopCount); + if (count >= 3) + { + Log.Warning("{Signal} received a third time, ending now", context.Signal); + _kill.Cancel(); + return; + } + context.Cancel = true; + if (count == 2) + { + Log.Warning("{Signal} received again, killing tools", context.Signal); + _ = _kill.CancelAsync(); + return; + } + _ = Interlocked.CompareExchange(ref _signalNumber, SignalNumber(context.Signal), 0); + Log.Warning("{Signal} received, stopping", context.Signal); + RequestStop(); + } + catch (Exception exception) + { + Console.Error.WriteLine($"Signal handler failed: {exception.Message}"); + } + } + + private void RequestStop() + { + if (Interlocked.Exchange(ref _killArmed, 1) == 0) + { + _kill.CancelAfter(KillBound); + } + _ = _stop.CancelAsync(); + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( + "Design", + "CA1031:Do not catch general exception types", + Justification = "The process aborts after this handler, so a failure here only loses the kill." + )] + private void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) + { + Console.Error.WriteLine($"Unhandled exception: {e.ExceptionObject}"); + try + { + _kill.Cancel(); + } + catch (Exception exception) + { + Console.Error.WriteLine($"Killing the tools failed: {exception.Message}"); + } + Thread flush = new(Log.CloseAndFlush) { IsBackground = true }; + flush.Start(); + _ = flush.Join(TimeSpan.FromSeconds(3)); + } + + private static void OnUnobservedTaskException( + object? sender, + UnobservedTaskExceptionEventArgs e + ) => Log.Error(e.Exception, "Unobserved task exception"); + + private static int SignalNumber(PosixSignal signal) => + signal switch + { + PosixSignal.SIGHUP => 1, + PosixSignal.SIGINT => 2, + PosixSignal.SIGTERM => 15, + _ => throw new ArgumentOutOfRangeException(nameof(signal), signal, null), + }; + + [LibraryImport("libc", EntryPoint = "signal")] + [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] + private static partial nint SetSignalHandler(int signalNumber, nint handler); + + [LibraryImport("libc", EntryPoint = "kill")] + [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] + private static partial int Kill(int processId, int signalNumber); +} +``` + +## The Entry Point + +The logger is created after the lifetime owner, so a signal before then logs to Serilog's silent default rather than failing. A callback off the main flow, such as a `FileSystemWatcher` event handler, wraps its body in a catch-all that calls `lifetime.Fault(exception)`. + +```csharp +using System.CommandLine; +using System.Globalization; +using Serilog; + +namespace ConsoleApp; + +internal static class Program +{ + [System.Diagnostics.CodeAnalysis.SuppressMessage( + "Design", + "CA1031:Do not catch general exception types", + Justification = "The entry point turns any failure into the error exit status." + )] + private static async Task Main(string[] args) + { + Lifetime lifetime = new(); + int exitCode; + try + { + Log.Logger = new LoggerConfiguration() + .WriteTo.Console(formatProvider: CultureInfo.InvariantCulture) + .CreateLogger(); + ParseResult parseResult = CreateRootCommand(lifetime).Parse(args); + parseResult.InvocationConfiguration.EnableDefaultExceptionHandler = false; + parseResult.InvocationConfiguration.ProcessTerminationTimeout = null; + exitCode = await parseResult + .InvokeAsync(cancellationToken: lifetime.StopToken) + .ConfigureAwait(false); + } + catch (OperationCanceledException) when (lifetime.StopRequested) + { + Log.Information("Stopped before the run finished"); + exitCode = Lifetime.ErrorExitCode; + } + catch (Exception exception) + { + Log.Error(exception, "Run failed"); + exitCode = Lifetime.ErrorExitCode; + } + finally + { + await Log.CloseAndFlushAsync().ConfigureAwait(false); + } + return lifetime.Exit(exitCode); + } + + private static RootCommand CreateRootCommand(Lifetime lifetime) + { + Argument tool = new("tool") { Description = "The tool to run on each file" }; + Argument files = new("files") + { + Description = "The files to run the tool on", + Arity = ArgumentArity.OneOrMore, + }; + RootCommand root = [with("Runs a tool on each file"), tool, files]; + root.SetAction( + (parseResult, cancellationToken) => + RunAsync( + parseResult.GetRequiredValue(tool).FullName, + parseResult.GetRequiredValue(files), + lifetime.KillToken, + cancellationToken + ) + ); + return root; + } + + private static async Task RunAsync( + string tool, + IReadOnlyList files, + CancellationToken killToken, + CancellationToken stopToken + ) + { + int succeeded = 0; + int failed = 0; + try + { + foreach (string file in files) + { + if (stopToken.IsCancellationRequested) + { + break; + } + ToolOutcome outcome = await ToolRunner + .RunAsync(tool, [file], killToken, stopToken) + .ConfigureAwait(false); + Log.Information("{File}: {Outcome}", file, outcome); + if (outcome == ToolOutcome.Succeeded) + { + succeeded++; + } + else if (outcome == ToolOutcome.Failed) + { + failed++; + } + } + } + finally + { + Log.Information( + "Summary: {Succeeded} succeeded, {Failed} failed, stopped {Stopped}", + succeeded, + failed, + stopToken.IsCancellationRequested + ); + } + return failed == 0 ? 0 : Lifetime.ErrorExitCode; + } +} +``` + +## The Tool Runner + +CliWrap redirects every standard stream of the child on every run. Its `ExecuteAsync` takes the forceful token before the graceful one. + +```csharp +using System.Diagnostics; +using CliWrap; +using Serilog; + +namespace ConsoleApp; + +internal static class ToolRunner +{ + public static async Task RunAsync( + string tool, + IReadOnlyList arguments, + CancellationToken killToken, + CancellationToken stopToken + ) + { + try + { + CommandResult result = await Cli.Wrap(tool) + .WithArguments(arguments) + .WithStandardOutputPipe( + PipeTarget.ToDelegate(line => Log.Information("{Line}", line)) + ) + .WithStandardErrorPipe(PipeTarget.ToDelegate(line => Log.Warning("{Line}", line))) + .WithValidation(CommandResultValidation.None) + .ExecuteAsync(ConfigureStartInfo, null, killToken, stopToken); + return stopToken.IsCancellationRequested ? ToolOutcome.Cancelled + : result.ExitCode == 0 ? ToolOutcome.Succeeded + : ToolOutcome.Failed; + } + catch (OperationCanceledException) + when (stopToken.IsCancellationRequested || killToken.IsCancellationRequested) + { + return ToolOutcome.Cancelled; + } + } + + private static void ConfigureStartInfo(ProcessStartInfo startInfo) + { + if (!OperatingSystem.IsWindows()) + { + startInfo.StartDetached = true; + } + if (OperatingSystem.IsLinux() || OperatingSystem.IsWindows()) + { + startInfo.KillOnParentExit = true; + } + } +} +``` + +```csharp +namespace ConsoleApp; + +internal enum ToolOutcome +{ + Succeeded, + Failed, + Cancelled, +} +``` + +## Measured Stop Matrix + +The table holds results measured with a prototype of this design. The prototype runs on .NET 11 with System.CommandLine and CliWrap, in the .NET 11 SDK container image. Its child is a shell script that logs each signal it receives. The prototype has variants the skeleton does not show. Some run several children in parallel, signal a child directly, use a child that ignores the stop, or hang the cleanup. Others change the kill bound, the start options, or the exit status of a tool failure, or inject a fault. So a row can describe a variant rather than the skeleton as printed. + +| Stop | Reaches | App result | Child | +| --- | --- | --- | --- | +| SIGINT to the app | App | Died by SIGINT after cleanup | One SIGINT, own session | +| SIGINT to the process group | App only, child detached | Died by SIGINT | One SIGINT | +| SIGINT to the process group, child not detached | App and child | Died by SIGINT | Two SIGINT | +| Ctrl-C typed at a pty, two children | App only | Died by SIGINT | One SIGINT each | +| SIGTERM, SIGHUP to the app | App | Died by that signal | One SIGINT | +| Child ignores SIGINT, bound 3 s | App | Died by SIGINT at 3 s | Killed at the bound | +| Second SIGINT after 1 s, bound 30 s | App | Died by SIGINT at once | Killed at the second | +| Third SIGINT while cleanup hangs | App | Died by SIGINT with no flush | Already killed | +| SIGKILL to the app, `KillOnParentExit` set | App | Killed | None left | +| SIGKILL to the app, not set | App | Killed | Left running | +| SIGQUIT to the app | App | Died by SIGQUIT, core | None left | +| Exception on a pool thread | n/a | Logged, flushed, died by SIGABRT | None left | +| Fault from a callback | n/a | Exit 1 after cleanup | One SIGINT | +| SIGINT to the child only | Child | Tool failure, exit 2 | Exit 130 | +| Calling `bash` loop, SIGINT to the group | App | Loop stopped | One SIGINT | +| `docker stop`, app as PID 1 | PID 1 | Exit 143 in 1.3 s | One SIGINT | +| `docker kill --signal INT` and `HUP`, PID 1 | PID 1 | Exit 130 and 129 | One SIGINT | +| `docker stop` under `--init` | App | Exit 143 | One SIGINT | +| `docker stop`, child ignores SIGINT, PID 1 | PID 1 | Exit 143 in 5.2 s | Killed at the bound | +| Third SIGINT while cleanup hangs, PID 1 | PID 1 | Exit 130 | Already killed | +| Exception on a pool thread, PID 1 | n/a | Logged, flushed, exit 139 | None left | +| Ctrl-C typed at `docker run -it` | PID 1 | Exit 130 | One SIGINT each | + +No run covers Windows, so its console close, shutdown, Ctrl-C, and job object handling come from the .NET sources alone. macOS has no `KillOnParentExit`, so a child there outlives an app that is killed. diff --git a/.github/skills/dotnet-codestyle/references/conventions.md b/.github/skills/dotnet-codestyle/references/conventions.md index b0caf08..7a3dd5c 100644 --- a/.github/skills/dotnet-codestyle/references/conventions.md +++ b/.github/skills/dotnet-codestyle/references/conventions.md @@ -13,13 +13,21 @@ project. 2. **Nullable reference types**: enabled (`enable`), use nullable annotations appropriately, use `required` for mandatory properties. -3. **Modern C# features**: prefer modern language constructs. Prefer primary constructors when - appropriate, top-level statements for console apps, pattern matching over traditional checks. - Prefer collection expressions when types loosely match. Prefer extension methods (the classic - `this`-parameter form or an `extension() { ... }` block on C# 14+). Prefer implicit - object creation when the type is apparent. Prefer range and index operators. -4. **Expression-bodied members**: use for applicable methods, properties, accessors, operators, - lambdas, local functions. +3. **Modern C# features**: prefer modern language constructs. Each construct below is required + wherever its IDE rule matches, since the gate reports each rule at warning: + - a primary constructor (IDE0290), + - top-level statements in place of a `Program.Main` (IDE0210), + - pattern matching over traditional checks (IDE0019, IDE0020, IDE0038, IDE0078, IDE0083, + IDE0260), + - a collection expression when types loosely match (IDE0028, IDE0300 to IDE0306), + - implicit object creation when the type is apparent (IDE0090), + - range and index operators (IDE0056, IDE0057). + + Prefer extension methods (the classic `this`-parameter form or an `extension() { ... }` + block on C# 14+). +4. **Expression-bodied members**: each is required wherever its IDE rule matches (IDE0021 to + IDE0027, IDE0053, IDE0061). That covers constructors, methods, operators, properties, + indexers, accessors, lambdas, and local functions. 5. **`var` keyword**: do NOT use `var`, always use explicit types: ```csharp @@ -91,15 +99,18 @@ project. 5. **Line endings**: not specified here, governed per repo by `.editorconfig` / `.gitattributes` per GOVERNANCE.md's "Line Endings" section. 6. **`#region`**: do not use regions, prefer logical file/folder/namespace organization. -7. **Member ordering (StyleCop SA1201)**: const -> static readonly -> static fields -> instance - readonly fields -> instance fields -> constructors -> public. Public members are ordered events -> properties -> indexers - -> methods -> operators. Non-public follows in same order, then nested types. +7. **Member ordering (StyleCop SA1201, SA1202)**: order by kind first, across every access level + (SA1201). The kinds run fields, constructors, finalizers, delegates, events, enums, interfaces, + extension blocks, properties, indexers, conversion operators, operators, methods, nested + structs, and nested classes. Within one kind, order by access: public -> internal -> protected + internal -> protected -> private protected -> private (SA1202). Within one kind and access, + const precedes static, which precedes instance, and readonly precedes mutable (SA1203, SA1204, + SA1214). ## Comments and documentation -XML documentation is on: `true`, and -missing XML comments for public APIs are suppressed in `.editorconfig`. Every public surface must -still be documented: a single-line summary, additional details in remarks, documented input +XML documentation is on: `true`. Every +public surface must be documented: a single-line summary, additional details in remarks, documented input parameters, return values, exceptions, and crefs. ```csharp diff --git a/.github/skills/dotnet-codestyle/references/project-config.md b/.github/skills/dotnet-codestyle/references/project-config.md index 0171c99..177c93a 100644 --- a/.github/skills/dotnet-codestyle/references/project-config.md +++ b/.github/skills/dotnet-codestyle/references/project-config.md @@ -1,12 +1,14 @@ # .NET Project Configuration -1. **Target framework and SDK line**: .NET 10.0 (`net10.0`). +1. **Target framework and SDK line**: the repository's own line, .NET 10.0 for the fleet default (`net10.0`). The root `global.json` `sdk` block selects the same line (`"version": "10.0.100"`, `"rollForward": "latestFeature"`, `"allowPrerelease": false`). See `SKILL.md`'s "Central build and package configuration". `LangVersion` stays unset, so the C# version follows the TFM. A `netstandard` analyzer or source-generator project is the exception, and that section says what - it sets. The TFM, the `sdk` major, and that project's fixed `LangVersion` move together. They move only once the hub's - `setup-dotnet` steps and devcontainer image provide the new line beside the old one. + it sets. The TFM, the `sdk` major, the devcontainer image tag, and that project's fixed + `LangVersion` move together. The line is the repository's own, so it may lead or lag the hub's + `global.json` baseline, and a resync never changes the repository's `sdk.version`. The hub's + `setup-dotnet` steps install whatever line the repo's own `global.json` selects. 2. **AOT compatibility**: `true` unconditionally, and `true` only in a ``. That group is placed in the `.csproj` after diff --git a/.github/skills/dotnet-codestyle/references/testing.md b/.github/skills/dotnet-codestyle/references/testing.md index 265e096..be92e6e 100644 --- a/.github/skills/dotnet-codestyle/references/testing.md +++ b/.github/skills/dotnet-codestyle/references/testing.md @@ -16,10 +16,12 @@ int actual = GetValue(); // Assert - actual.Should().Be(expected); + _ = actual.Should().Be(expected); } ``` + The `_ =` discard is what IDE0058 requires of an assertion whose result goes unused. + 2. **Organization**: Arrange-Act-Assert pattern. 3. **Naming**: descriptive names with underscores. 4. **Theory tests**: use `[Theory]` with `[InlineData]`. diff --git a/.github/skills/drive-pr/SKILL.md b/.github/skills/drive-pr/SKILL.md index c68a088..e2b12c9 100644 --- a/.github/skills/drive-pr/SKILL.md +++ b/.github/skills/drive-pr/SKILL.md @@ -61,10 +61,13 @@ this skill exists to prevent. So is forgetting to loop back to the promotion PR - Naming this skill, and answering its how-far question, is the maintainer's explicit, current go-ahead. It covers every feature -> develop squash merge the drive performs to reach that target. + It also covers opening each pull request the drive needs. And it covers the whole post-merge + `cleanup` after each feature -> develop merge, a peer's merge included. - A dispatched drive answers no such question. So what stands in its place is the go-ahead the - dispatching seat holds, per "How Far to Drive" above. The drive performs the same merges on it. + dispatching seat holds, per "How Far to Drive" above. The drive performs the same writes on it. Reading this bullet list is not how such a drive establishes that. That is because a worker - cannot verify a grant made in a seat it has no access to. + cannot verify a grant made in a seat it has no access to. Its brief can also withhold one of + those writes. A `backlog-burndown` worker's brief withholds the post-merge `cleanup`, for one. - It is never authorization to merge the develop -> main promotion PR, or to dispatch a release. Those stay in merge-and-release, invoked on its own so the maintainer keeps a checkpoint before the harder-to-reverse step. @@ -75,7 +78,12 @@ this skill exists to prevent. So is forgetting to loop back to the promotion PR ## The Drive Loop 1. Isolate into a worktree per repo-worktree before the first edit. Base it on the branch that skill's base rule names, develop unless the task is explicitly about main-only content. -2. Commit the work, then run `local-strict-review` and record its pass in the order that skill +2. Before any commit that first writes a code or config comment line, check + `gh label list --search comments`. Where the label is missing, `comment-and-doc-style` says the + escape is not yet available there. So delete the comment line before committing. Where a rule + requires the comment, report the missing label to whoever dispatched the drive, or to the + maintainer, and do not push. + Commit the work, then run `local-strict-review` and record its pass in the order that skill gives, its diff receipt following the commit. Where the change also carries the canonical ledger, that skill's carried-content records instead precede the commit, because that ledger is tracked. A driver that cannot dispatch a subagent follows that skill's "Running It". @@ -88,10 +96,17 @@ this skill exists to prevent. So is forgetting to loop back to the promotion PR finding still open into the pull request's body with its class, per `local-strict-review` "Disposing of Findings". A later push adds its own to any list already there. Step 3 gives each one an outcome under the Merge Gate's item 3. Where the - change writes a code or config comment line, add the `comments` label after creating the PR, or - the prose gate refuses it. Where a public repository's lint log says "Read the pull - request's labels live", a rerun of the failed job picks the label up. Otherwise it applies to - the next push. + change writes a code or config comment line, create the PR with `gh pr create --label comments`, + or the prose gate refuses it. A repository lacking the label can refuse that create, which is + why the check above comes first. A label added after the create is missing from the + opened event's payload. Where the lint log lacks "Read the pull request's labels live", that + payload decides. A private repository's log always lacks it until the lint job holds + `pull-requests: read`. A label given at the create is still missed there now and then, so read + the first lint run. Where a later push first writes a comment line, add the label with + `gh pr edit` before that push, so the push's event carries it. Where the log reads the labels + live, a rerun of the failed job picks up a label added late. Otherwise a rerun replays the + payload. So the label then reaches the gate only through a fresh event, such as the next push + or a close and reopen. A push refused by a `.husky/pre-push` hook is that gate working rather than an obstacle to route around. The hub carries such a hook, and a repository has one only if it adds one. That skill's refusal table says what each refusal means and what clears it. @@ -103,16 +118,20 @@ this skill exists to prevent. So is forgetting to loop back to the promotion PR one per "Disposing of Every Finding" and wait again. Read `state=` in every digest `wait` or `status` prints. A peer can merge or close the pull request mid-drive. A digest carrying `state=MERGED` on a feature PR into develop means the merge has landed. Skip the merge in step 4 and go on to its post-merge path. + A finding still open there keeps its outcome owed. That covers an unresolved thread and every finding step 4 names, whether or not `merge` would refuse on it. + Give each one per "Disposing of Every Finding" before that path's cleanup, a fix landing as a fresh feature -> develop pass. On a promotion PR it means the drive's end state is passed, so stop and report it merged. A digest carrying `state=CLOSED` is a stop to report, with its `closed_at=`. On such a PR `state=` decides the next step over any exit code `wait` or `status` returns. A promotion re-reviews content its feature PRs already carried. So under the hub's default review policy, the hosted review runs once per change, at the promotion in step 6. `wait` sends each request the repository's review policy asks for, so the drive never asks whether a reviewer starts on its own. -4. Merge the feature PR into - develop with `uv run --no-project --script scripts/pr_review.py merge --repo / --cleanup --checkout `, - run from a hub checkout outside the task's worktree, `` being the repository's - primary clone. It reads the Merge Gate's mechanically readable items in code, through `wait`'s +4. Run this step's merge and post-merge `cleanup` only on the go-ahead "What Invoking This Skill + Authorizes" states. Merge the feature PR into + develop with `uv run --no-project --script scripts/pr_review.py merge "" --repo "/" --cleanup --checkout ~/repos/""`, + run from a hub checkout outside the task's worktree, `~/repos/` being the repository's + primary clone. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. Spell every `scripts/pr_review.py` call this skill prints as `pr-review-conduct` + "Expected review loop" says. `merge` reads the Merge Gate's mechanically readable items in code, through `wait`'s own decision and a fresh read after it. It merges nothing while one reads unmet. The items no code reads stay this seat's per pr-review-conduct's Merge Gate. A finding the pull request's body lists is one. A no-thread finding on an earlier round is one too, since `FINDINGS WITH NO @@ -121,8 +140,8 @@ this skill exists to prevent. So is forgetting to loop back to the promotion PR `--ack` record pr-review-conduct "Answering a suppressed finding" states. A `qodo_open` finding refuses it the same way, even where Qodo also opened a thread for it, since resolving that thread answers nothing. For a disproved one, that comment's body mentions the Qodo login - the digest's remedy line names. It asks Qodo to dismiss the finding by the number the remedy - line gives, with the reason. That answer is the redrive an `UNTHREADED_FINDINGS` line naming + the digest's remedy line names. It asks Qodo to dismiss the finding by its title and file + location, with the reason. That answer is the redrive an `UNTHREADED_FINDINGS` line naming `qodo_open` owes, rather than a blocked merge for the maintainer. It squash-merges only an open pull request into `develop`, headed in that same repository on a branch that is not permanent. The merge is pinned to the head the gate read and confirmed by reading it back. @@ -130,18 +149,25 @@ this skill exists to prevent. So is forgetting to loop back to the promotion PR line's route here. The hub's `scripts/README.md` "`pr_merge.py`" gives each route in full. - `next=done` is merged and cleaned up. - - `next=cleanup` is a merge that landed with its cleanup still owed. Run the `cleanup` command - below. Report a pull request another hand merged as a merge this run cannot vouch for. The - head that merged may be one the gate never read. - - `next=readback` is a merge that may have landed. Read it back with `gh pr view --repo - / --json state`. `MERGED` means run `cleanup`, and `OPEN` means treat it as + - `next=cleanup` is a merge that landed with its cleanup still owed. Give its open findings the + outcome step 3 owes after a peer merge, then run the `cleanup` command below. Report a pull + request another hand merged as a merge this run cannot vouch for. The head that merged may be + one the gate never read. + - `next=readback` is a merge that may have landed. Read it back with `gh pr view "" --repo + "/" --json state`. `MERGED` means run `cleanup`, and `OPEN` means treat it as `redrive`. Only a read that still cannot answer is reported, saying the merge may have landed. - `next=redrive` is a refusal that merged nothing and that this seat can clear. Do what its `status=` lines name, per step 3 and pr-review-conduct, giving each finding they count an outcome per "Disposing of Every Finding". A check still running clears by waiting for it, - with `timeout 1800 gh pr checks --repo / --watch`. A hosted + with `timeout 1800 gh pr checks "" --repo "/" --watch`. A hosted reviewer's review still running on the head is such a check, refused as `CHECKS_PENDING`. - Then run `merge` once more. + An open registration grace is refused as `CHECKS_PENDING` too, on a line naming when it + ends. The watch above can return before then, so it does not clear the grace alone. On a + held head, `wait` holds until the grace ends. On any other head, run the watch above + first, since a check settling restarts the grace. Then wait in a background process until + the later of the named end and 90 seconds after the watch returned. Then run `merge` once + more. A rerun that still refuses on a grace is the blocked merge reported below, naming the + end it gives. - `next=retry` is a read that did not answer, or a merge `gh` refused on an unchanged head. Run `merge` once more as it is. - `next=maintainer` is a line no action of this seat can change, or a merge whose `cleanup` @@ -154,27 +180,28 @@ this skill exists to prevent. So is forgetting to loop back to the promotion PR around, and it hands the maintainer no command to run instead. A harness refusing the `merge` call itself is a refused write rather than a gate refusal. That happens on a machine with no allow rule for it, or under - another provider. Raise it as a blocked decision per `GOVERNANCE.md` "Repository Boundaries and - Write Safety". Name the maintainer's routes, adding the permission rule or running the command - themselves. Once the merge is + another provider. It also happens on Claude Code for a call the rule does not match, per + `pr-review-conduct` "Expected review loop". Raise it as a blocked decision per `GOVERNANCE.md` + "Repository Boundaries and Write Safety". Name the maintainer's routes. One is adding the + permission rule where it is missing. Another is the change that paragraph names, a hub checkout + inside the session's working directories or a writable uv cache. The last is running the + command themselves. Once the merge is confirmed, `--cleanup` runs repo-worktree's post-merge cleanup, - `uv run --no-project --script scripts/pr_review.py cleanup --repo / --checkout `, - and its exit is the command's. It deletes the remote branch, then removes the task's worktree and local branch. + `uv run --no-project --script scripts/pr_review.py cleanup "" --repo "/" --checkout ~/repos/""`, + and its exit is the command's. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. It deletes the remote branch, then removes the task's worktree and local branch. It decides its local refusals before the remote delete. `repo-worktree` "Listing and Cleanup" says what a refusal after the remote delete and a `base=kept` line each leave to do. It takes the pull request rather than a branch name and does the verify-then-delete in - code. It refuses unless the pull request merged into `develop` from a head in that same - repository. It also refuses a permanent branch or one any ruleset or branch protection covers. It + code. It refuses unless the pull request merged into `develop`, or is a conflicted promotion + merged into `main`, from a head in that same repository. It also refuses a permanent branch or one any ruleset or branch protection covers. It checks the tip is still at the pull request's `headRefOid` before deleting, and reads the ref back to confirm. These exits are `cleanup`'s, read once a `status=MERGED` line printed or a standalone `cleanup` ran. Exit `0` is done, the branch deleted or already gone. Any other exit stops and reports rather than deleting by hand. `1` is a refusal, a moved tip among them. `2` is a read that did not answer or a delete it could not confirm. `64` is a target under an owner other than the hub - checkout's own `origin`, or that `origin` unreadable. A registry refusal is a `1`. It runs - under the host-safety installer's `Bash(uv run --no-project --script scripts/pr_review.py:*)` allow rule, - which is what lets auto mode complete it. - It also refuses while another open pull request in the repository has the branch as its head or base. + checkout's own `origin`, or that `origin` unreadable. A registry refusal is a `1`. + `cleanup` also refuses while another open pull request in the repository has the branch as its head or base. It names each, since the delete would close or retarget it. Where this seat cannot run `cleanup`, report the delete to the maintainer instead of deleting by hand. Name the pull request number and `--repo` so the maintainer runs the same command. @@ -184,16 +211,29 @@ this skill exists to prevent. So is forgetting to loop back to the promotion PR repo's auto-delete-head-branches setting is kept off fleet-wide (to protect `develop` and `main` from it, GitHub has no per-branch exception). So nothing deletes an ordinary feature branch automatically. Stop here and report the merged PR when the target is develop only. -5. Open the develop -> main promotion PR if it does not exist yet, or find the existing one. +5. Open the develop -> main promotion PR if it does not exist yet, or find the existing one. Its + body carries the closing keywords, checked as `branching-and-release-model`'s closing-keyword + bullets state. A promotion reading `DIRTY`, or failed by the `Check promotion history step`, + lands from a conflicted-promotion cut instead. That skill's + `references/branch-protection-and-promotion.md` states the cut, its label and closing-set carry, + and its tree-equality check. 6. Drive its review loop the same way. A finding that needs a code change never gets pushed to the promotion PR directly, since its head is develop. So land the fix as a fresh pass through steps 1 to 4 in its own worktree and branch. Then return here. -7. The fix landing on develop updates the promotion PR's diff and head SHA on its own. Re-request + The promotion's head can read `coverage=none` where a Copilot round covers it and none + covering it carries a file table. Then run the local strict review at the `frontier` tier from + a clean checkout of that head, `main...develop`. Its target is `main` in every command that + skill runs, the `status` and `record` calls included. Then run `pr_review.py attest` from that + checkout on the promotion pull request. Merge Gate item 2 in + pr-review-conduct then reads `coverage=local`, on the further terms that item states. Each new + head owes its own pass and attestation. +7. The fix landing on develop updates the promotion PR's diff and head SHA on its own. A cut's + head does not move with develop, so merge each fix into the cut as that reference states. Re-request a review on the new head and continue the loop. 8. Repeat 6 and 7 until the promotion PR meets every pr-review-conduct Merge Gate item except the maintainer's explicit permission to merge. 9. Report the promotion PR number, its ready state, and its full head SHA, read as `gh pr view - --repo / --json headRefOid --jq .headRefOid`, the one `merge-and-release` + "" --repo "/" --json headRefOid --jq .headRefOid`, the one `merge-and-release` compares against before merging. Do not merge it. ## Disposing of Every Finding @@ -207,7 +247,10 @@ maintainer when". A finding that committed text holds observed data takes outcome 4's observed-data bullet, whatever its class, ahead of every other outcome. That applies once the data is confirmed as -observed. A value the repository constructed is disproved under outcome 2 instead. +observed. A value the repository constructed is disproved under outcome 2 instead. So is a +value outside the rule's scope, such as a date, an amount, a balance, or a private-range IP +address. `GOVERNANCE.md` "Representative Data in Agent-Authored Text" bounds only what its first +bullet calls identifying data. 1. **Real, so fix it, and fix the class rather than the instance.** A reviewer samples rather than enumerates, so sweep for the finding's siblings before replying. Fix each one sitting @@ -264,7 +307,11 @@ observed. A value the repository constructed is disproved under outcome 2 instea that one too. The pull request holding the record takes the `history-data` label, and so does the one whose review raised it. Where the repository lacks that label, the maintainer is told. A thread raising a recorded finding is answered with a pointer to its body line and - resolved. + resolved. Every observed secret also goes to the maintainer for revocation, whatever else its + case requires, naming only the repository and the kind of data. A seat that cannot reach the + maintainer hands that notice to whoever dispatched it. The notice is not an escalation, so it + stops nothing, and its case's own route continues. A seat with no dispatcher lists it in its + final report, never in a handoff issue. - A local pass before the push that opens the pull request can raise a `pre-existing` correctness defect in a file the diff already touches. That defect is fixed here under outcome 1. That covers wrong behavior and a false or unfollowable instruction, and not a @@ -339,8 +386,9 @@ instance's outcome is context for the new one, never a standing answer to reuse ## Mechanics Live Elsewhere - Review loop mechanics, the Merge Gate, and `scripts/pr_review.py`: pr-review-conduct. -- Branch rules, never delete develop, the EOL-only conflict, issue-closing keywords belonging on - the promotion PR: branching-and-release-model. +- Branch rules, never delete develop, the EOL-only conflict, the conflicted-promotion cut, the + squash recovery, issue-closing keywords belonging on the promotion PR: + branching-and-release-model. - Worktree isolation and post-merge cleanup: repo-worktree. ## Stop and Ask, Beyond the How-Far Question diff --git a/.github/skills/fleet-code-review/SKILL.md b/.github/skills/fleet-code-review/SKILL.md index e8523b6..167a727 100644 --- a/.github/skills/fleet-code-review/SKILL.md +++ b/.github/skills/fleet-code-review/SKILL.md @@ -62,6 +62,7 @@ A change is cheapest to shape before it is written. Hardening nothing calls for, - **Reuse before building.** Search this repository and the hub for a primitive that already does the job. Start from the list of consolidated primitives this repository's `OPERATIONS.md` keeps under `Configuration Layout` once it has consolidated any. Extend one that exists rather than adding a sibling that does almost the same thing. A near-duplicate splits every later fix between two copies. - **A defect class seen a second time gets one primitive, and every site in a file the change touches moves onto it.** A check written at each site repeats its own platform and edge-case defects at every site. A read that can block on a named pipe, for one, meets a new platform difference at each site that guards it alone. One reader that opens without blocking and judges the open descriptor closes that class everywhere. Every other site takes the outcome the class-sweep bullet of "Verification Discipline" gives it. - **Complexity is a cost that needs a reason.** Code that answers no requirement and no realistic threat is removed rather than maintained, since each later review and each later change reads it again. +- **A one-off is detected and reported, never corrected by code.** A one-off is a defect that occurs once on a host or a repository, and that correcting it once removes. A tool installed by the wrong method is one, and so is a wrong path the user can fix by hand. The tooling detects it and tells the user how to correct it by hand. It writes no code that performs the correction. Such code runs once and then never again, yet it is reviewed, tested, and maintained for as long as it exists. The detection stays automated, because a check that runs every time is what keeps the one-off from going unnoticed. `GOVERNANCE.md` "Design Before Code" keeps the full rules. The `fleet-code-review` Skill at `.agents/skills/fleet-code-review/SKILL.md` in the hub carries it whole as a generated include and surfaces it wherever a change is reviewed. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. diff --git a/.github/skills/git-commit-conventions/SKILL.md b/.github/skills/git-commit-conventions/SKILL.md index 8a705e5..c6802c7 100644 --- a/.github/skills/git-commit-conventions/SKILL.md +++ b/.github/skills/git-commit-conventions/SKILL.md @@ -157,19 +157,16 @@ Each line names a setting, whether the target matches the probe, and the scope a ## Never force push -Do not run `git push --force` or `git push --force-with-lease` under any circumstances. Force +In a fleet repository, do not run `git push --force` or `git push --force-with-lease` under any circumstances. Force pushing rewrites shared history and can cause data loss. This holds regardless of how confident the rewrite looks, a rejected push is recoverable, a force-pushed one is not. +The maintainer's fork of a third-party repository is not a fleet repository. There `upstream-contribution-workflow` names the branches that may take `--force-with-lease`, and each push still waits for his explicit, current go-ahead. + ## History rewrites re-identify only what changed -**Do not rewrite a commit that does not need to change.** A history rewrite (e.g. `git filter-repo` -to strip PII) re-signs every touched commit with the rewriter's key. If that commit is still -committed by a bot (`dependabot[bot]`, `github-actions[bot]`) or GitHub's own web-flow, the signature will not match the committer. The require-signed-commits rule then rejects it. Scope the -rewrite to only the commits that must change. Set `committer` (and `author`) to the rewriter's -identity on any non-own commit that must be modified. Verify with `git log --show-signature` after -any rewrite. See `references/history-rewrite.md` for the full rule. +**Do not rewrite history unless a commit must change, and re-sign every commit the rewrite reaches.** A rewrite cascades, since a commit's hash covers its parents' hashes, so it reaches every descendant of the earliest commit it changes. `git filter-repo` (for example, to strip PII) strips the signature from every commit it processes and signs nothing. So the rewritten history lands unsigned, which the require-signed-commits rule rejects. State each branch's reach before rewriting, and re-sign in a pass that signs each commit. GitHub verifies a signature against the commit's `committer`. So in that pass set `committer` to the rewriter's signing identity on every commit another identity committed, such as a bot's. Keep its `author`, since verification reads only the committer. Verify through GitHub's API (`commit.verification.verified` and `reason`), since `git log --show-signature` cannot see GitHub's committer match. See `references/history-rewrite.md` for the full rule. ## Never run destructive git commands without being asked -`git reset --hard`, `git checkout .`, `git restore .`, `git clean -f`, and other commands that discard work require explicit developer instruction. Never use them as a convenience inside a larger task. One narrow cleanup exception applies to `git branch -D ` after a squash merge. It requires live proof, per `repo-worktree`, that the pull request for that exact branch merged. The same proof must show that the worktree is clean and the branch is at the verified head SHA or behind it. The exception never applies to `develop`, an unmerged branch, an unresolved pull request, or a branch with uncommitted work. A `backlog-burndown` orchestrator has that instruction for the linked worktree of a worker it told to abandon, once that worker has ended. That skill's "Cleanup Is the Orchestrator's" states it. The orchestrator runs `git reset --hard` and then `git clean -fd` in that worktree, and nowhere else. +`git reset --hard`, `git checkout .`, `git restore .`, `git clean -f`, and other commands that discard work require explicit developer instruction. Never use them as a convenience inside a larger task. One narrow cleanup exception applies to `git branch -D ""` after a squash merge. It requires live proof, per `repo-worktree`, that the pull request for that exact branch merged. The same proof must show that the worktree is clean and the branch is at the verified head SHA or behind it. The exception never applies to `develop`, an unmerged branch, an unresolved pull request, or a branch with uncommitted work. A `backlog-burndown` orchestrator has that instruction for the linked worktree of a worker it told to abandon, once that worker has ended. That skill's "Cleanup Is the Orchestrator's" states it. The orchestrator runs `git reset --hard` and then `git clean -fd` in that worktree, and nowhere else. diff --git a/.github/skills/git-commit-conventions/references/history-rewrite.md b/.github/skills/git-commit-conventions/references/history-rewrite.md index 81d26c5..c2dff00 100644 --- a/.github/skills/git-commit-conventions/references/history-rewrite.md +++ b/.github/skills/git-commit-conventions/references/history-rewrite.md @@ -1,20 +1,39 @@ # History Rewrites: Re-identification Rules -**A history rewrite includes only the commits that must change, and re-identifies any commit it -rewrites that is not the agent's own.** Filtering history (`git filter-repo` or an equivalent, for -example to strip PII) re-signs every commit it touches with the rewriter's own key. Meanwhile, the tooling preserves each commit's original `author`/`committer` unless told otherwise. GitHub verifies a signature against the commit's `committer` identity. So a rewriter's signature over a commit still committed by a bot (`dependabot[bot]`, `github-actions[bot]`) or GitHub's own web-flow does not match its committer. That signature lands `unknown_key`/unverified, which a -require-signed-commits rule then rejects. +**Every commit a history rewrite reaches needs a valid signature again. The pass that re-signs it re-identifies the committer of each commit that another identity committed.** The facts below about the tooling drive every rule after them. + +- **A rewrite cascades to every descendant.** A commit's hash covers its parents' hashes. So changing one commit changes the hash of every commit below it, on every branch that holds it. Rewriting a commit near the root rewrites nearly the whole branch, however few commits the edit itself changes. +- **`git filter-repo` strips signatures and signs nothing.** Its documentation says a rewritten commit's signature "cannot continue to work" and is removed. A run strips the signature from every commit it processes, including one whose content it leaves alone. By default it processes every ref. So every commit it emits lands unsigned, which a require-signed-commits rule rejects. +- **GitHub verifies a signature against the commit's `committer`, not its `author`.** The REST API's `verification.reason` values `no_user`, `unverified_email`, and `bad_email` are each defined by the committer email. So a rewriter's valid signature over a commit still committed by a bot (`dependabot[bot]`, `github-actions[bot]`) or GitHub's own web-flow lands unverified. These gates keep committer and signature aligned: -1. **Scope the rewrite to only the commits that must be modified.** By default those are the - rewriter's own, whose committer already matches. So a commit that needs no change stays out of - the rewrite entirely and its identity and signature are never touched. -2. **If a commit that must change is not the rewriter's own, set its `committer` to the rewriter's - own signing identity before re-signing**. For such a commit, set its `author` the same way, since a rewrite that alters - content should not keep attributing it to the bot. The original bot attribution is deliberately - given up as the cost of having to rewrite it. - -Never leave a signature over a commit committed by another identity. Verify after any rewrite that -every rewritten commit is signed and committed under the correct identity -(`git log --show-signature`). +1. **State the reach before rewriting anything.** Rewrite only when a commit must change, since no scoping stops the cascade to every descendant of the earliest commit that changes. A default `git filter-repo` run reaches every commit on every ref. Also list what is anchored to the old hashes, from "Collateral" below. Record which tags are signed, since a rewrite can strip a tag's signature: + + ```sh + git for-each-ref --format='%(if)%(contents:signature)%(then)%(refname:short)%(end)' refs/tags + ``` + +2. **Re-sign every rewritten commit in a signing pass that also sets the committer.** A tool that creates each commit through `git commit-tree -S` signs it. The command below re-signs every commit on every local branch and moves each tag with it, which fits a default `git filter-repo` run. It keeps merge commits, authors, and both dates. Before running it, record each branch's `git rev-list --count ""` and `git log --format=%T ""` output. Replace the placeholders with the rewriter's own signing identity: + + ```sh + git filter-branch --tag-name-filter cat --commit-filter 'GIT_COMMITTER_NAME="" GIT_COMMITTER_EMAIL="" git commit-tree -S "$@"' -- --branches --tags + ``` + +3. **Re-identify the committer, and keep the author.** The command above sets the committer on every commit, the rewriter's own included. Leave `author` as the rewrite left it, an identity correction included, since verification reads only the committer. +4. **Verify against GitHub, not the local checkout.** `git log --show-signature` checks a signature against the local keyring or allowed-signers file. It knows nothing of the account GitHub matches the committer to, so a commit can read good locally and still land unverified. Before the push, confirm the signing pass changed metadata only. Each branch's commit count and its `git log --format=%T` tree hashes match the values recorded before the signing pass. Publishing the rewrite is a force push, so an agent stops here and hands the push to the maintainer. After the maintainer's push, read every commit on each rewritten branch through the REST API and require `verified: true` with `reason: valid` on all of them. A single output line ending `true valid` is a pass, and any other line names a failing reason: + + ```sh + out=$(gh api --paginate "repos///commits?sha=&per_page=100" --jq '.[].commit.verification | "\(.verified) \(.reason)"') && printf '%s\n' "$out" | sort | uniq -c + ``` + +Never leave a signature over a commit committed by another identity, and never leave a rewritten commit unsigned. + +## Collateral + +What is anchored to an old hash goes stale when the rewrite lands, including the following: + +- **Tags** move to the re-signed commits through `--tag-name-filter cat` above. A signed tag's signature no longer verifies after the rewrite, so re-create each tag gate 1 recorded as signed with `git tag -f -s "" '^{commit}'`. +- **Remote tags and pull request refs** keep the old commits readable on GitHub. Each moved tag is pushed again, and GitHub keeps every pull request's commits until GitHub Support purges them. +- **Other clones** diverge from the rewritten branch, so each one is re-cloned rather than pulled. +- **Published artifacts** that record a commit hash keep naming a hash the branch no longer holds, and no rewrite reaches them. diff --git a/.github/skills/local-strict-review/SKILL.md b/.github/skills/local-strict-review/SKILL.md index 786a5f9..50d7ba3 100644 --- a/.github/skills/local-strict-review/SKILL.md +++ b/.github/skills/local-strict-review/SKILL.md @@ -22,7 +22,7 @@ A coding agent that finishes a unit of work, judges it ready, and opens the pull ## What It Does -Dispatches one subagent against this branch's full diff since it forked from its target branch. The subagent is read-only apart from the one report file it writes, so it needs an agent type that can write a file. Resolve `` once, `develop` unless `repo-worktree`'s base-branch rule put this branch on `main` instead. Then fetch it, `git fetch origin `, and diff against the merge-base, `git diff "$(git merge-base refs/remotes/origin/ HEAD)"`. The target is named by its full remote-tracking ref because git resolves the short `origin/` against local branches first. So a local branch of that name would define the diff the reviewer reads. In that case the engine, which resolves the full ref, would key its receipt on another diff. Stop and report a failed fetch rather than running the merge-base or diff commands anyway. That is because an existing `refs/remotes/origin/` ref can still resolve after a failed fetch. Reviewing against it silently trades the current target for a stale one. Use the same resolved `` in every command below, never a literal `develop` alongside it. Naming the target branch explicitly matters. The branch's own `@{u}` tracking ref points at the branch's own remote once it has been pushed, not at the branch it targets. So anchoring there silently narrows a later run to only the diff since the last push instead of the full accumulated diff. That merge-base diff covers every commit already on the branch plus whatever is currently staged or unstaged. So it never reviews only the latest increment, at any of the moments this skill is invoked from. An empty diff is not the same as nothing to review, and it is never the signal to stop. That is because it reports no untracked file at all. It also reports nothing for content a commit carries that the working tree has since put back. The untracked-file list below covers the first of those. The second is why the diff pass commits before reviewing. That is because a removal or a restore that is committed leaves no net content to miss. The sweep's own passes below run against uncommitted content instead, on the change that carries their ledger. The second is also why the engine reads HEAD rather than this diff. Its change set comes from the merge base against HEAD, the index and the working tree, so the two answer different questions. A fresh review of the full accumulated diff is what catches what per-push review misses, the exact evidence this skill exists to act on. +Dispatches one subagent against this branch's full diff since it forked from its target branch. The subagent is read-only apart from the one report file it writes, so it needs an agent type that can write a file. Resolve `` once, `develop` unless `repo-worktree`'s base-branch rule put this branch on `main` instead. Then fetch it, `git fetch origin ""`, and diff against the merge-base, `git diff "$(git merge-base "refs/remotes/origin/" HEAD)"`. The target is named by its full remote-tracking ref because git resolves the short `origin/` against local branches first. So a local branch of that name would define the diff the reviewer reads. In that case the engine, which resolves the full ref, would key its receipt on another diff. Stop and report a failed fetch rather than running the merge-base or diff commands anyway. That is because an existing `refs/remotes/origin/` ref can still resolve after a failed fetch. Reviewing against it silently trades the current target for a stale one. Use the same resolved `` in every command below, never a literal `develop` alongside it. Naming the target branch explicitly matters. The branch's own `@{u}` tracking ref points at the branch's own remote once it has been pushed, not at the branch it targets. So anchoring there silently narrows a later run to only the diff since the last push instead of the full accumulated diff. That merge-base diff covers every commit already on the branch plus whatever is currently staged or unstaged. So it never reviews only the latest increment, at any of the moments this skill is invoked from. An empty diff is not the same as nothing to review, and it is never the signal to stop. That is because it reports no untracked file at all. It also reports nothing for content a commit carries that the working tree has since put back. The untracked-file list below covers the first of those. The second is why the diff pass commits before reviewing. That is because a removal or a restore that is committed leaves no net content to miss. The sweep's own passes below run against uncommitted content instead, on the change that carries their ledger. The second is also why the engine reads HEAD rather than this diff. Its change set comes from the merge base against HEAD, the index and the working tree, so the two answer different questions. A fresh review of the full accumulated diff is what catches what per-push review misses, the exact evidence this skill exists to act on. `git diff` never reports a path `git add` has not touched, so a newly created file sitting untracked would otherwise go unread. List it explicitly, `git ls-files --others --exclude-standard`, and read each result in full alongside the diff, the same as any other file the diff touches. @@ -80,7 +80,7 @@ Before dispatching, grep the tree for other statements of each rule the diff add **Model tier:** `frontier`, the tier "Model Tiers" below names for adversarial review, which this pass is. Where `frontier` is not reachable, run the pass on the strongest tier below it that is, even the one that authored the change. A second, adversarially-prompted look still catches what the authoring pass's own "looks ready" judgment did not. -Reachable means the tier this session can name when it dispatches the reviewer, rather than the tier this session is itself running on. A worker dispatched by an orchestrator is the ordinary case of a session deliberately tiered down for execution work. Such a session names `frontier` for the reviewer where its harness lets it. That is because tiering down the author is the reason the reviewer must not follow it down. What a given harness and account actually permit varies, so treat this as the tier to ask for rather than one to assume. Where a dispatch exposes no way to name a tier, take what it gives and run the pass, for the reason the fallback above states. A seat that cannot dispatch a subagent hands the pass to whoever dispatched it. The seat commits and runs `python3 /scripts/local_review.py status --target ` in its worktree. It then hands back its worktree path, target, and `contentDigest`. The dispatcher runs that same `status` command in that worktree for its `reportPath`. It stops where the `contentDigest` printed there differs from the one handed back. The dispatcher fills the brief's ``, ``, and `` slots and runs the reviewer. Once the reviewer's completion notification arrives, it runs the record command from "Recording the Pass" in that worktree, with `--reviewer agent-skill --target --expect-digest --report `. It returns the findings. Each fix commit repeats this cycle, and the seat pushes only when a record matches its content. The brief dispatching the seat states whether the dispatcher can continue that seat. Where the dispatcher cannot, the seat stops, reports, and does not push. Where nobody dispatched the seat, it reports to the maintainer that it could not run the pass, and does not push. Either way the push waits rather than the pass being quietly skipped. The headless `run --backend` route under "Recording the Pass" is not the substitute. That is because it runs a vendor CLI against its own review, which never carries the brief above. So it satisfies the rule this section states only where that separate route is what a capture point asked for. +Reachable means the tier this session can name when it dispatches the reviewer, rather than the tier this session is itself running on. A worker dispatched by an orchestrator is the ordinary case of a session deliberately tiered down for execution work. Such a session names `frontier` for the reviewer where its harness lets it. That is because tiering down the author is the reason the reviewer must not follow it down. What a given harness and account actually permit varies, so treat this as the tier to ask for rather than one to assume. Where a dispatch exposes no way to name a tier, take what it gives and run the pass, for the reason the fallback above states. A seat that cannot dispatch a subagent hands the pass to whoever dispatched it. The seat commits and runs `python3 ""/scripts/local_review.py status --target ""` in its worktree. It then hands back its worktree path, target, and `contentDigest`. The dispatcher runs that same `status` command in that worktree for its `reportPath`. It stops where the `contentDigest` printed there differs from the one handed back. The dispatcher fills the brief's ``, ``, and `` slots and runs the reviewer. Once the reviewer's completion notification arrives, it runs the record command from "Recording the Pass" in that worktree, with `--reviewer agent-skill --target "" --expect-digest "" --report ""`. It returns the findings. Each fix commit repeats this cycle, and the seat pushes only when a record matches its content. The brief dispatching the seat states whether the dispatcher can continue that seat. Where the dispatcher cannot, the seat stops, reports, and does not push. Where nobody dispatched the seat, it reports to the maintainer that it could not run the pass, and does not push. Either way the push waits rather than the pass being quietly skipped. The headless `run --backend` route under "Recording the Pass" is not the substitute. That is because it runs a vendor CLI against its own review, which never carries the brief above. So it satisfies the rule this section states only where that separate route is what a capture point asked for. ## Recording the Pass @@ -115,29 +115,38 @@ A second pass under the same rule, run in the repository that authors canonical **The unit is what a reviewer reads whole.** `spec/files.json` rather than the document decides which, down to which files carry units at all. `canonical_review.py list` names the whole set and is the authority on it. So the rules are not paraphrased here, where a paraphrase can only drift from them. In the ordinary case a unit is one level-two section of a carried Markdown canonical. `sweep` names each unit it wants exactly as `record` takes it. The pass reads that unit's whole current text rather than the diff that moved it, because reproducing the carrier's read is the entire point. It also does so because a diff with surrounding context is a different read the pass above has already done. -Run it at the same model tier and in the same delegation shape as the pass above. The brief, the engine, and its flags each differ, and each is below. +Run it at the same model tier and in the same delegation shape as the pass above, one reviewer per unit. The brief, the engine, and its flags each differ, and each is below. The report contract is the same one, so the reviewer again needs an agent type that can write a file. ```text Task: adversarial review of one canonical unit, read as a repository carrying it for the first time reads it, whole, knowing nothing about what this branch changed in it. -Paths: , read in full out of the file that key names. +Worktree: , the checkout holding the sweep's branch and the below. + Start every command with `cd &&`, since a harness can reset the working directory between calls. +Paths: , read in full out of the file that key names, at its path under ``. Read the whole unit, never a diff of it. Rules that bind this task: , and judge the text as a reader who has only this unit: a claim it makes about a tool, a path, a command, or another rule is a defect wherever that claim is false, stale, or unverifiable from the unit itself, and an instruction it gives is a defect wherever following it literally fails. Return: one finding per line, the sentence quoted, and what is wrong with it. No severity theater. -Bounds: read-only. Report a rule that looks incomplete rather than guessing at what it meant. + Write the same finding lines to before returning, under a first line reading + `contentDigest: `. Nothing else goes in the file. A pass with no findings writes that + first line alone. +Bounds: read-only apart from that one report file. Report a rule that looks incomplete rather + than guessing at what it meant. ``` ```sh uv run --no-project --script scripts/canonical_review.py sweep # the units it asks for this round, with their digests # exit 1 where it named any, which is the sweep working rather than the command failing -# run the pass above over each unit it named, then, per unit: -uv run --no-project --script scripts/canonical_review.py record --reviewer agent-skill --target develop --findings '' --unit '=' +# per unit it named: take the unit's , run the pass above, wait for its completion notification, then record it +uv run --no-project --script scripts/canonical_review.py report-path --unit '=' # JSON, the unit's report path +uv run --no-project --script scripts/canonical_review.py record --reviewer agent-skill --target develop --unit '=' ``` +`` is the checkout these commands run in. `` is the one `sweep` printed beside the unit, and `` is what `report-path` names for it. That path sits in the git directory, keyed by the unit and its digest, so `record` finds each unit's report without being told where. `record` reads each report with the same reader the pass above uses. It refuses a unit whose report is absent or names another digest. While any unit it was given is refused, it records none of them. It derives each unit's count from its report's lines and stores the report's sha256. So the record-only-on-completion rule above binds here too, and a driver never writes a report for its reviewer. + These run in the authoring repository itself, the only repository this pass ever runs in. So the engine path is the plain one, and no downstream side needs the `/` form the pass above shows for its own reach. Each resolves the repository from the working directory rather than from where the script sits. So the directory a command runs in is what decides which tree it measures. The unit model and the manifest reader come from the checkout the script itself lives in. Running one checkout's copy against another's tree therefore measures the second tree by the first's rules. So run them in the tree being measured. `record` additionally stamps each pass with the merge-base against `--target`, which is provenance rather than coverage. The line above names it rather than leaning on the default, since a sweep's own branch is based on `develop`. A `main`-based branch passes `--target main` instead. The digest is bound to the read for the same reason `--expect-digest` is above. Recording a unit by name alone would stamp whatever the file holds at record time. So an edit between the review and the record would be attested to by a reviewer who never saw it. Record each unit whatever the pass found, including nothing. Fixing a finding is itself such an edit, so `record` then refuses the digest you were holding. That refusal is the content having moved rather than a fault in the record. The answer is a read of the unit's new text, which is what a carrier will actually receive, recorded at its new digest. @@ -164,7 +173,7 @@ Each bullet is a rule down to its `Why:` line, which is rationale rather than ru ## When to Run It - Before the first push toward a pull request, the push that opens it in `drive-pr` "The Drive Loop" and in `pr-review-conduct` "Expected review loop". -- Before pushing a fix for a reviewer finding, because the same self-review blind spot applies to a fix as to the original diff. Such a fix is the fix outcome of `pr-review-conduct` "Every finding ends in a listed outcome", which `drive-pr` "Disposing of Every Finding" carries. +- Before every push after that one, whatever finding it answers, per `pr-review-conduct` "Expected review loop", which also says when a recorded pass already covers one. A fix for a reviewer finding is the common case. The same self-review blind spot applies to a fix as to the original diff. Such a fix is the fix outcome of `pr-review-conduct` "Every finding ends in a listed outcome", which `drive-pr` "Disposing of Every Finding" carries. - Whenever `agent-conduct`'s "about to claim work is done, verified, green, or fixed" trigger fires for work that will become, or already is, a pull request. - When the canonical sweep's issue is worked, over each unit it names, per "The Carried-Content Sweep" above. Editing such content is not itself one of these moments, and nothing refuses a push over it. @@ -194,7 +203,7 @@ A rule, a Skill, or a brief names a model tier, never a model. A model release i - **`frontier`** is the fleet's default reasoning tier, for orchestrating, rule text, design, spec logic, and adversarial review. It is not the most capable model available, which is `highest`. - **`standard`** is ordinary implementation and driving a pull request. Judging a review finding is never mechanical, however often it repeats, so it runs at `standard` or above. A `standard` driver's evidence-backed decline of a finding raised on its pull request stands, since that pull request's reviewers and its merge gate check it. - **`bulk`** is the cheapest model that does the work correctly. It is for high fan-out mechanical work, such as an extraction or a status check. -- **`highest`** is the most capable model available, and only the maintainer selects it. The maintainer chooses it for the session itself, or allows it for the session's subagents at launch. The host's agent-safety kit reads that launch setting, `FLEET_ALLOW_HIGHEST=1` on Claude Code. Naming the tier in a prompt does not set it. A maintainer naming it partway through a session restarts the session with it allowed, and an agent never sets it. Without that setting, the kit refuses a dispatch that names it. A dispatch naming no model runs at its agent definition's model where one is set, and otherwise at the session's own. A fork always runs at the session's model, whatever it names. So a session launched on `highest` names a tier on every dispatch meant to run below it, and uses no fork for such work. A session never reaches for it because a task looks hard. +- **`highest`** is the most capable model available, and only the maintainer selects it. The maintainer chooses it for the session itself, or allows it for the session's subagents at launch. The host's agent-safety kit reads that launch setting, `FLEET_ALLOW_HIGHEST=1` on Claude Code. Naming the tier in a prompt does not set it. A maintainer naming it partway through a session restarts the session with it allowed, and an agent never sets it. Without that setting, the kit refuses a dispatch that names it. A dispatch naming no model runs at its agent definition's model where one is set. Otherwise it runs at the default the host's agent-safety kit sets, which is the `frontier` model. On a host without the kit it runs at the session's own. That default does not reach every agent type a tool builds in. On Claude Code the `Explore` and `Plan` types still take the session's model, so the kit refuses a dispatch of either that names no model. A fork always runs at the session's model, whatever it names. So a session launched on `highest` names a tier on every dispatch meant to run below it, and uses no fork for such work. The kit's default is a backstop for a dispatch that forgot its tier, never a reason to leave one out. A session never reaches for it because a task looks hard. | Tool | `highest` | `frontier` | `standard` | `bulk` | | --- | --- | --- | --- | --- | @@ -203,7 +212,7 @@ A rule, a Skill, or a brief names a model tier, never a model. A model release i Each cell is the name that tool's subagent dispatch takes, which follows the latest model of its family. A dispatch on a tool with no row here, or on one that cannot name a model per subagent, names no model. - **A tier resolves only through this table.** A word such as "frontier", "strongest", or "most capable" never resolves to `highest`. The industry's "frontier model" is the opposite of what this tier means here. A session that cannot see this table names no model rather than guessing one. -- **An orchestrating seat runs at `frontier` and names a tier on every dispatch.** It defaults a subagent to `frontier`, and picks `standard` or `bulk` deliberately for execution or mechanical work. +- **An orchestrating seat runs at `frontier`, or at `highest` where the maintainer chose that for the session, and names a tier on every dispatch.** It defaults a subagent to `frontier`, and picks `standard` or `bulk` deliberately for execution or mechanical work. diff --git a/.github/skills/merge-and-release/SKILL.md b/.github/skills/merge-and-release/SKILL.md index e330225..61cd909 100644 --- a/.github/skills/merge-and-release/SKILL.md +++ b/.github/skills/merge-and-release/SKILL.md @@ -59,19 +59,21 @@ skill covers all of it, scoped down by what the maintainer actually asks for. ## The Procedure 1. Identify the open develop -> main promotion PR for this repo, stop and report if none is open. -2. Record the promotion's live head, `gh pr view [number] --repo owner/repo --json headRefOid +2. Record the promotion's live head, `gh pr view "" --repo owner/repo --json headRefOid --jq .headRefOid`. Then, from a hub checkout, `scripts/` is not carried into downstream repos, - run `uv run --no-project --script scripts/pr_review.py status [number] --repo owner/repo` on it and confirm the - pr-review-conduct Merge Gate. Stop and report exactly what is missing rather than merging on a - partial gate. A digest carrying `state=MERGED` is a promotion merged since step 1 found it + run `uv run --no-project --script scripts/pr_review.py status "" --repo owner/repo` on it and confirm the + pr-review-conduct Merge Gate. Spell every `scripts/pr_review.py` call this skill prints as + `pr-review-conduct` "Expected review loop" says. Where the gate is not met, stop and report exactly what is missing rather than + merging on a partial gate. A digest carrying `state=MERGED` is a promotion merged since step 1 found it open, whose `merge=UNKNOWN` never clears, so stop re-reading it. Confirm its `merge_commit=` per step 4, run the ready-report comparison below against its `head=`, and report both. Dispatch nothing on the chosen scope alone, since whoever merged it may have released it already. Where - a release scope was chosen, look, then ask. Read this repo's `releaseTrigger` as step 5 does, - and where it reads `none` report that no release is configured. Otherwise read the publisher's + a release scope was chosen, look, then ask. Confirm the publisher exists as step 5 does. Read it + at `` below rather than at a tip step 4 confirmed, since `main` may have moved past + the merge. Where it is absent report the missing publisher. Otherwise read the publisher's runs on the merge commit, `gh run list --repo owner/repo --workflow publish-release.yml --commit - --json databaseId,event,headBranch,status,conclusion,createdAt`. `` is - the full 40-character SHA, `gh pr view [number] --repo owner/repo --json mergeCommit --jq + "" --json databaseId,event,headBranch,status,conclusion,createdAt`. `` is + the full 40-character SHA, `gh pr view "" --repo owner/repo --json mergeCommit --jq .mergeCommit.oid`, since the digest's 8-character `merge_commit=` matches no run. Report whether a release started, naming each run with its event, status, and conclusion. A read that fails is reported with its output, never taken as no release started. A run found there, whether @@ -91,34 +93,34 @@ skill covers all of it, scoped down by what the maintainer actually asks for. Confirm the digest's `head=` is a prefix of the recorded SHA, re-running both where it is not. That way the SHA step 3 merges is the one the gate verified. Where drive-pr's ready report named a head and it is not a prefix of the recorded one, stop and re-ask with the commits added, - `gh api repos/owner/repo/compare/... --jq '.commits[] | .sha[:8] + " " + + `gh api "repos/owner/repo/compare/..." --jq '.commits[] | .sha[:8] + " " + (.commit.message | split("\n")[0])'`. The reason is that a feature PR squashed into `develop` after the report moves the promotion's head onto content the maintainer never saw. Under an away-mode standing grant this comparison is skipped, even where the worker holds a ready report. Content another session merged meanwhile rides along, as `backlog-burndown` "Away Mode" accepts. Where no report named a head, a promotion made ready by hand, the go-ahead covers the head this step recorded. -3. `gh pr merge [number] --merge --match-head-commit --repo owner/repo`, where `` is + Whichever case set it, run the closing-set check `branching-and-release-model` states in its + negated-keyword bullet on the head step 3 merges. This step runs from a hub checkout, so read + the range's commit messages from the target rather than with a local `git log`: + `gh api --paginate "repos/owner/repo/compare/main..." --jq '.commits[].commit.message' > ""`. + Run that read on its own and stop the merge on a non-zero exit, since a failed read is not a + range with no closure. Then run that bullet's `grep` over ``. Stop and report any closure + it prints that the promotion body does not state, rather than merging. +3. `gh pr merge "" --merge --match-head-commit "" --repo owner/repo`, where `` is the head the go-ahead covers. Attended, that is the head `drive-pr`'s ready report named, or the moved head the maintainer approved after step 2's re-ask. Under an away-mode grant, or where no report named a head, it is the head step 2 recorded. The server then refuses the merge if the head moved past that SHA. Never `--delete-branch`, the promotion PR's head is `develop`. 4. Confirm the merge landed, `mergedAt` set, `main`'s tip matching the merge commit. -5. When the chosen scope includes a release, first bring the hub checkout used for this procedure - current, `git fetch origin main`. Then read this repo's `releaseTrigger` from that fetched tip - rather than a possibly-stale working tree copy. That matters when the target repo is the hub itself - and this exact promotion changed its own registry entry. Select the one matching entry - explicitly, falling back to the registry's own default when that entry sets no - `releaseTrigger` of its own. Stop and report rather than guessing when selection is not - exactly one match. On a non-1 count exit non-zero rather than returning empty with success. An - ambiguous or missing match must fail loud, not read as an empty value still safe to act on: `git - show origin/main:registry/repos.json | jq -r --arg name '' '(.repos | map(select(.name - == $name))) as $m | if ($m | length) == 1 then ($m[0].releaseTrigger // .defaults.releaseTrigger) - else error("expected exactly one registry entry for \($name), got \($m | length)") end'`. Two - cases, `none` versus anything else. When it - reads `none`, report that no - release is configured, dispatch and run-correlation (step 6) do not apply. Otherwise, dispatch +5. When the chosen scope includes a release, confirm the publisher exists on `main`'s tip from + step 4. Every fleet repository releases, so its `releaseTrigger` selects no case here. Read + `gh api "repos/owner/repo/contents/.github/workflows/publish-release.yml?ref=" --jq + .path`, `` being the full SHA step 4 confirmed. An answer naming the path means the + publisher exists. An HTTP 404 means it is absent. That repository owes a publisher the audit + reports as drift, so report it, and dispatch and run-correlation (step 6) do not apply. Any + other failure is reported with its output, never read as either answer. Where it exists, dispatch explicitly, `gh workflow run publish-release.yml --ref main --repo owner/repo`, or `--ref develop` only when the maintainer explicitly asked for a prerelease dispatch instead. 6. Correlate the specific run this dispatch produced rather than assuming the newest one is it. @@ -138,21 +140,21 @@ skill covers all of it, scoped down by what the maintainer actually asks for. id to completion in one further bounded background wait with an explicit, finite timeout. The timeout is 2700 seconds (45 minutes, matching `scripts/pr_review.py`'s own default) unless the maintainer states a different bound for this specific release. Use `timeout 2700 gh run - watch --repo owner/repo --exit-status` on a host with GNU `timeout`, with the maintainer's bound in place of 2700 where they state + watch "" --repo owner/repo --exit-status` on a host with GNU `timeout`, with the maintainer's bound in place of 2700 where they state one. On a host without it (macOS without coreutils, native Windows), use the equivalent bounded-wait mechanism enforcing the same bound. Never pipe `gh run watch` into another command unless the shell running it sets `pipefail`. That is because without it a pipeline reports its last stage's exit status and `gh run watch ... | tail` reports whether `tail` succeeded rather than whether the run did. Read the watch's own exit status, or read the conclusion back with - `gh run view --repo owner/repo --json status,conclusion`. + `gh run view "" --repo owner/repo --json status,conclusion`. Report a timeout separately from a completed run's own conclusion, the tag or version it produced. A run that fails, times out, or never starts is reported, never silently retried. 7. In the hub, when the chosen scope includes a release, refresh this machine's Codex and opencode copy from the promoted `main`. Do it in a detached worktree of its own, never by switching an existing checkout to `main`. The reason is that the checkout Claude Code loads in place would move with it. Run `git fetch origin main`, then `git worktree add --detach - origin/main` at a new path in the fleet worktree layout. From that worktree run + "" origin/main` at a new path in the fleet worktree layout. From that worktree run `python3 scripts/skills_install.py --snapshot-only`, then `python3 scripts/skills_install.py --report`, and confirm its snapshot reads current. A fresh worktree holds nothing uncommitted or ignored under `.agents/skills/` or `.claude-plugin/`, the paths the installer reads, so @@ -169,7 +171,7 @@ skill covers all of it, scoped down by what the maintainer actually asks for. So where that report reads anything other than CURRENT, first rule out a rollback. The report judges payload digests alone, so a kit newer than `main` also reads stale. Read the commit its `This machine:` line names after `hub`. Install only where that commit carries no `-dirty` - suffix and `git merge-base --is-ancestor origin/main` exits 0, or where the report + suffix and `git merge-base --is-ancestor "" origin/main` exits 0, or where the report reads NOT INSTALLED. Any other result, a kit installed from `develop` or from a dirty tree among them, is reported to the maintainer rather than installed over. Where the install is owed, run `python3 host-setup/agent-safety/claude/install.py` with no arguments from the same @@ -189,7 +191,7 @@ skill covers all of it, scoped down by what the maintainer actually asks for. `--report` again. A SHADOWED Codex is reported to the maintainer and not fixed, since the override is theirs. An EDITED file is rewritten after its backup, and that is reported. A failure is reported with its output, never retried. Then remove the worktree with - `git worktree remove `, whatever any report said. Removing it leaves the skills + `git worktree remove ""`, whatever any report said. Removing it leaves the skills snapshot, the installed kit, and their stamps unchanged. A result that does not read current is reported to the maintainer. The skills `--report` exits on the snapshot alone. This step runs whether step 5 or 6 dispatched, skipped, or failed a release. That is because it is gated only on the chosen scope, @@ -200,7 +202,7 @@ skill covers all of it, scoped down by what the maintainer actually asks for. failure, an ambiguous run match, a timeout, a failed run, or a hub refresh all still reach this step. So does step 2 finding the promotion already merged. The merge already landed by then, in step 3 or before step 2 read it. Every part below is required: - - The promotion PR's own worktree, where one exists: fetch and prune, remove the worktree, then bring the base + - A `develop`-headed promotion PR's own worktree, where one exists: fetch and prune, remove the worktree, then bring the base clone to current `develop`. To do so, check `develop` out first only where it sits on another branch, and fast-forward it with `git merge --ff-only origin/develop`. Where that checkout is needed, removing first, not after, matters. The reason is that the base clone cannot check out `develop` @@ -208,6 +210,10 @@ skill covers all of it, scoped down by what the maintainer actually asks for. in two worktrees at once is refused outright. Never delete `develop`: it is the promotion PR's own head. The repo's auto-delete-head-branches setting is kept off fleet-wide for exactly this reason, so nothing does this automatically. + - A conflicted promotion's own branch, where one exists. That promotion's head is a branch cut + from `main` that merges `develop` rather than `develop` itself. Run the `cleanup ` + command the next bullet names on the promotion PR. It removes that branch's worktree, its local + branch, and its remote branch. - A defensive sweep for anything drive-pr's own cleanup should already have removed but might not have. The causes include an interrupted loop, a fix landed by hand outside that skill, or a maintainer merge in the GitHub UI. `git worktree list` for any worktree still registered under this @@ -217,9 +223,9 @@ skill covers all of it, scoped down by what the maintainer actually asks for. than reading an empty answer as safe: `gh pr list --head "" --base develop --state merged --repo owner/repo --json number --jq 'if length == 1 then .[0].number else error("expected exactly one merged PR for this head, got \(length)") end'`. Then run - `uv run --no-project --script scripts/pr_review.py cleanup --repo owner/repo --checkout ` - from a hub checkout outside the worktree it removes, `` being the repository's - primary clone, per `repo-worktree` "Listing and Cleanup". It re-reads that pull request and + `uv run --no-project --script scripts/pr_review.py cleanup "" --repo owner/repo --checkout ~/repos/""` + from a hub checkout outside the worktree it removes, `~/repos/` being the repository's + primary clone. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. See `repo-worktree` "Listing and Cleanup". The `cleanup` command re-reads that pull request and repeats the merged, base, head-repository, and tip checks in code. It refuses a permanent or protected branch, deletes the remote branch, and confirms it by reading the ref back. It treats a remote branch already gone as done, so a prior interrupted attempt finishes rather than @@ -228,17 +234,15 @@ skill covers all of it, scoped down by what the maintainer actually asks for. says what a refusal after it and a `base=kept` line each leave to do. Exit `0` is done, and any other exit stops and reports. `1` is a refusal, and `2` is an unanswered read or an unconfirmed delete. `64` is a target under an owner other than the hub checkout's own `origin`, or an - unreadable `origin`. A registry refusal is a `1`. It runs under the host-safety - installer's `Bash(uv run --no-project --script scripts/pr_review.py:*)` allow rule, which is what lets auto mode - complete it. - It also refuses while another open pull request in the repository has the branch as its head or base, naming each. + unreadable `origin`. A registry refusal is a `1`. + `cleanup` also refuses while another open pull request in the repository has the branch as its head or base, naming each. Where this seat cannot run `cleanup`, report the cleanup to the maintainer instead of running its steps by hand. That report names the pull request number and `--repo`. No direct `git push origin --delete`, ref API delete, `git worktree remove`, or `git branch -D` runs on a feature branch from this skill. That is because `cleanup` is the one place holding the checks. Never apply this sweep to `develop` or `main` themselves, only to feature branches a drive-pr loop created. - What no single pull request names: run - `uv run --no-project --script scripts/pr_review.py cleanup --sweep --repo owner/repo --checkout ` - and report what it lists. It writes nothing but a fetch, and `--apply` runs only on the + `uv run --no-project --script scripts/pr_review.py cleanup --sweep --repo owner/repo --checkout ~/repos/""` + and report what it lists. In that command `~/repos/` is the convention layout, and a machine not yet migrated passes its actual primary clone instead. The sweep writes nothing but a fetch, and `--apply` runs only on the maintainer's go-ahead, since the report reaches other sessions' finished work too. ## Mechanics Live Elsewhere diff --git a/.github/skills/pr-review-conduct/SKILL.md b/.github/skills/pr-review-conduct/SKILL.md index 5cd7d08..89db562 100644 --- a/.github/skills/pr-review-conduct/SKILL.md +++ b/.github/skills/pr-review-conduct/SKILL.md @@ -54,6 +54,8 @@ visible comments, routinely still carries a finding nobody has answered. Treatin whose own file table names exactly the changed files covers it, `coverage=table`. That is the reading a Copilot round at Balanced review effort gives. Where no round covering the head carries a table of its own, the newest round that does stands in as `coverage=carried:table`. Its table has to name exactly the changed files. + The bound is that file set rather than file recency. The carry exists for a later head that + changed those files and drew a round with no table of its own. Either table may leave out an added, modified, renamed, or deleted file with no changed line, such as a binary. That holds while some changed file has one. On a develop -> main promotion, a file that only green Dependabot bumps changed is taken out of that comparison. The head reads @@ -61,6 +63,18 @@ visible comments, routinely still carries a finding nobody has answered. Treatin table names the rest. A table stands in only where no Copilot round on the pull request, on any commit, states partial coverage. So a pull request that ever had a partial round goes to the maintainer. + The review policy owes a Copilot round to some heads, by default those of a pull request into + the default branch, a promotion among them. On such a head a file table stays the first route to + this item. An attested local pass covers it instead, `coverage=local`, only where no Copilot + round covering it states coverage or carries a table of its own. No table above may already + stand in, since a carried table is read first. That pass + runs at the `frontier` tier over the whole diff against the pull request's base, + `main...develop` on a promotion. It holds only where no round on record states partial + coverage and the whole review history is in view. No refusal on the head may stand against it. + A spent cap waives none of these here, since a Copilot round already covers the head. A head + round whose own table names other than exactly the changed files keeps this route closed, + since that table says what Copilot read. So does a head no Copilot round covers yet, since + that round is still owed. `coverage=none` and `coverage=UNKNOWN` leave this item unsatisfied and decide no exit code, so read the field rather than the exit. The coverage this item requires is Copilot's, the attested local pass above, or that green @@ -71,7 +85,16 @@ visible comments, routinely still carries a finding nobody has answered. Treatin or Qodo check on the head has neither passed nor failed, `merge` refuses as `CHECKS_PENDING`, whatever the merge state reads. `wait` holds an attested head then too. A reviewer whose newest output is a rate limit posted since the check began posts no review, so its check holds - nothing. + nothing. The registration grace is not an absence either. A CodeRabbit or Qodo reviewer asked + by comment registers its check only after the ask. The grace runs 90 seconds from the latest + of the head's push, its last check settling, and its newest trusted review ask. A hosted + reviewer's own check, Copilot's included, never counts as that settling. A trusted ask + is one from an owner, member, or collaborator. The grace ends early once a CodeRabbit or Qodo + check that did not conclude `SKIPPED` begins at or after that ask. + Until then `merge` refuses as `CHECKS_PENDING`, on a line naming when the grace ends. `wait` + holds an attested head then too. + A CodeRabbit or Qodo check can read `success` over a rate limit, and a rate limit is not + coverage of the head. `pr_review.py`'s `review_on_head` names Copilot's own coverage specifically, not "no review of any kind covers this head". An advisory reviewer carrying the exact head under `other_reviewed`, with an empty review body and no new threads, is not a missing review. It is @@ -133,7 +156,8 @@ visible comments, routinely still carries a finding nobody has answered. Treatin - `coverage=none` is the only reason `pr_review.py` does not report the promotion ready, read from the digest's lines. A `VERDICT WITH NO COUNTED FINDING` headline, exit `50`, is a second reason until it is answered under item 3, and not after. A `shapes=HELD` hold is another - until its acknowledgment posts under item 4. + until its acknowledgment posts under item 4. A `title=HELD` hold is another until the + title is corrected, and not after. The merge then runs with `--match-head-commit` set to the head those were checked on. The evidence names each constituent pull request and how its coverage was stated. A @@ -158,10 +182,11 @@ visible comments, routinely still carries a finding nobody has answered. Treatin reading the finding, spot-verify against `gh pr diff` rather than trusting it outright. That badge is the only thing that closes a Qodo finding on Qodo's side, and `qodo_open` counts the findings without it. Resolving a thread Qodo opened for the finding, or answering - it in the conversation, adds no badge. Qodo marks a fixed finding `Resolved` itself, and a - disproved one `Dismissed` only when asked. So answer a disproved one with a comment that - mentions the Qodo login the digest's remedy line names. It asks Qodo to dismiss that finding - by the number the remedy line gives, with the reason. + it in the conversation, adds no badge. Qodo marks a fixed finding `Resolved` itself. Whether + it marks a disproved one `Dismissed` when asked has not been measured. So answer a disproved + one with a comment that mentions the Qodo login the digest's remedy line names. It asks Qodo + to dismiss that finding by its title and file location, with the reason, since Qodo cannot + map the finding's number. Posted as the `--ack` comment "Answering a suppressed finding" states, the one write also answers `merge`. A Copilot round states its own count of open findings, which the digest reads as @@ -235,8 +260,8 @@ visible comments, routinely still carries a finding nobody has answered. Treatin - Read each part whole in the review body, since the excerpt only locates it. Give every item in it item 3's outcome: fixed with its SHA, declined with evidence, or listed as pre-existing in the pull request body. - - Post the outcomes with `pr_review.py comment --repo / --fingerprint - --body `. One from an owner, member, or collaborator clears the hold, + - Post the outcomes with + `uv run --no-project --script scripts/pr_review.py comment "" --repo "/" --fingerprint "" --body ""`. One from an owner, member, or collaborator clears the hold, `shapes=ACKNOWLEDGED`. New unplaced text on a new head owes a new acknowledgment. - The spelling is a data edit to the matching `scripts/reviewers/*.json` in the hub plus one fixture. Whoever acknowledged the part makes it in a pull request of its own, never an issue. @@ -278,9 +303,12 @@ must have done. since an advisory reviewer blocks nothing. - **Silence is not evidence, and is never read as one on its own.** A reviewer that has posted nothing may not have started yet, or may not cover this repository at all. Or it may have - reviewed and had nothing to say. That case posts no comment to read, and Merge Gate item 2 - describes it as its own ordinary shape. Read the reviews themselves rather than the comments alone, since the third - case appears only there. + reviewed and had nothing to say. That case opens no thread, and where it leaves its record + differs by reviewer. It can be a review with an empty body, the shape Merge Gate item 2 calls + ordinary. A CodeRabbit clean pass can leave no review object at all. It then shows only in + CodeRabbit's summary comment, as a line saying no actionable comments were generated. That line + counts only where the commit range the summary's review details print ends at the current head. + So read the reviews and the comments both, since either can hold the third case. - **Copilot's absence blocks where no local pass stands in, and is answered elsewhere.** Merge Gate item 2 requires Copilot's own coverage of the current head. Where the review policy hands the head to a local pass, by default off the default branch, an attested local pass stands @@ -313,15 +341,33 @@ that says only "open a PR" is not such an instruction. Run every `scripts/pr_review.py` command below from a hub checkout. The script is hosted there and is never carried into a downstream repository. +On Claude Code, the host-safety installer's allow rule runs a `scripts/pr_review.py` call without +the auto-mode classifier only where the call matches the rule's text. So run each such command as a +call of its own, spelled exactly as the skill prints it. That holds for every +`scripts/pr_review.py` call a fleet skill prints, in this skill or another. Where the hub checkout sits inside the session's working +directories, a `cd "" &&` prefix keeps the match. A `cd` elsewhere may not. A leading +variable assignment leaves the rule unmatched unless Claude Code counts that variable as known-safe. +So does a flag between `uv run` and the script, or a script named by an absolute path or a shell +variable. The classifier then judges the call, and its default rules refuse a merge no human has +approved. So the spelling is owed on the first call. A call refused anyway is a refused write +under `GOVERNANCE.md` "Repository Boundaries and Write Safety", reported rather than re-spelled. +On Claude Code, where the executor restricts uv's cache writes, the cache variable that restriction +needs is such an assignment. So every call there reaches the classifier. A call that merges or +deletes is then reported to the maintainer as a blocked write rather than run. Those calls are +`merge`, `cleanup `, and `cleanup --sweep --apply`. They are the writes the classifier is +known to refuse, a merge even with its gate met and a branch delete on some days. So running one there is a +write fired to see whether it passes, which `GOVERNANCE.md` "Repository Boundaries and Write Safety" forbids. Any other call there runs, and one the classifier refuses is the refused +write above. + Run `local-strict-review` against the branch's current diff before every push this loop makes. The pass is owed before the push that opens the pull request in step 1 and each one after it. It is owed whatever finding a push answers and whether or not the branch was reviewed once already. A push that delivers content no pass has read is the case the rule is about. So a re-push of a tree a recorded pass already covers needs no second pass. That is because the receipt is keyed on the branch's net content rather than on its commit series. A rebase that leaves the tree alone keeps the receipt only while the merge base holds. Rebasing onto a target that has moved retires the receipt although no file changed. That push owes a pass like any other. Follow that skill's own ordering and record each pass, which is what a capture point reads. The hub's own `pre-push` hook is one, and a repository has none until such a hook is carried to it. A push that hook refuses, where one is present, is the gate working rather than an obstacle to route around. That skill's refusal table says what each refusal means and what clears it. 1. Push changes to the PR branch and open the pull request when it does not exist. Once the push - lands, run `uv run --no-project --script scripts/pr_review.py attest --repo / --checkout `. + lands, run `uv run --no-project --script scripts/pr_review.py attest "" --repo "/" --checkout ""`. `attest` refuses unless the checkout is the pushed head and a recorded pass covers that head. Attest after every push a recorded pass covers, the opening push included. The comment `attest` posts is the record Merge Gate item 2's promotion case reads, since the receipt goes when its worktree does. -2. Run `uv run --no-project --script scripts/pr_review.py status --repo /` once in the foreground and read its output. +2. Run `uv run --no-project --script scripts/pr_review.py status "" --repo "/"` once in the foreground and read its output. 3. Send each request the repository's review policy asks for, which step 4's `wait` is what does. Under the hub's default that is one Copilot round, on the head of a pull request into the default branch. A promotion is one such pull request. Auto-trigger is unreliable, so `wait` fills a @@ -335,7 +381,7 @@ Run `local-strict-review` against the branch's current diff before every push th the request set. Something in the request set is the condition the recovery below clears. An error refusal whose run log reads transient is the exception, owed one re-request per Merge Gate item 2. Requesting in the pull request UI is the maintainer's route rather than this loop's. -4. Run a bounded `uv run --no-project --script scripts/pr_review.py wait --repo /` in a background process and read its terminal output. +4. Run a bounded `uv run --no-project --script scripts/pr_review.py wait "" --repo "/"` in a background process and read its terminal output. A completed review raising **no findings** is a valid terminal outcome, so do not re-trigger it or read silence as a missing review. A review whose body says it declined to review is the one exception, and it is terminal the other way. Nothing follows it, and re-requesting the same @@ -357,13 +403,16 @@ is not a stopping condition here, and neither is patience running out. Reporting PR was opened is an early exit unless the maintainer explicitly instructed the agent not to monitor or drive its review. -After an authorized merge, run the `repo-worktree` post-merge cleanup procedure unless the user explicitly asks to retain the checkout or branch. For a merge into `develop` that procedure is `uv run --no-project --script scripts/pr_review.py cleanup --repo / --checkout `, run from a hub checkout. The pull request loop is incomplete while its finished worktree or local task branch remains. A promotion branch merged into `main` is the exception, which `repo-worktree` leaves for its sweep. The loop is also incomplete until the base clone returns to fetched and fast-forwarded `develop`. +After an authorized merge, run the `repo-worktree` post-merge cleanup procedure unless the user explicitly asks to retain the checkout or branch. For a merge into `develop` that procedure is `uv run --no-project --script scripts/pr_review.py cleanup "" --repo "/" --checkout ~/repos/""`, run from a hub checkout. In that command `~/repos/` is the convention layout, and a machine not yet migrated passes its actual primary clone instead. The pull request loop is incomplete while its finished worktree or local task branch remains. A conflicted promotion's branch merged into `main` takes the same command, run on the promotion pull request. The loop is also incomplete until the base clone returns to fetched and fast-forwarded `develop`. ## Every finding ends in a listed outcome A finding that committed text holds observed data takes outcome 4's observed-data bullet, whatever its class, ahead of every other outcome. That applies once the data is confirmed as -observed. A value the repository constructed is disproved under outcome 2 instead. +observed. A value the repository constructed is disproved under outcome 2 instead. So is a +value outside the rule's scope, such as a date, an amount, a balance, or a private-range IP +address. `GOVERNANCE.md` "Representative Data in Agent-Authored Text" bounds only what its first +bullet calls identifying data. 1. **Real, so fix it, and fix the class rather than the instance.** A reviewer samples rather than enumerates, so sweep for the finding's siblings before replying. Fix each one sitting @@ -420,7 +469,11 @@ observed. A value the repository constructed is disproved under outcome 2 instea that one too. The pull request holding the record takes the `history-data` label, and so does the one whose review raised it. Where the repository lacks that label, the maintainer is told. A thread raising a recorded finding is answered with a pointer to its body line and - resolved. + resolved. Every observed secret also goes to the maintainer for revocation, whatever else its + case requires, naming only the repository and the kind of data. A seat that cannot reach the + maintainer hands that notice to whoever dispatched it. The notice is not an escalation, so it + stops nothing, and its case's own route continues. A seat with no dispatcher lists it in its + final report, never in a handoff issue. - A local pass before the push that opens the pull request can raise a `pre-existing` correctness defect in a file the diff already touches. That defect is fixed here under outcome 1. That covers wrong behavior and a false or unfollowable instruction, and not a @@ -536,7 +589,7 @@ item 4's lead bullet covers takes no `--ack` until the maintainer answers, per M collaborator. Code checks that each item carries an outcome, never that the outcome is right, which stays this section's. **Read every round, not only the head.** A suppressed finding does not retire when a later push -supersedes it, it just stops showing up in a head-scoped query while still unanswered. Post the answer with `uv run --no-project --script scripts/pr_review.py comment --repo / --ack = --body ` +supersedes it, it just stops showing up in a head-scoped query while still unanswered. Post the answer with `uv run --no-project --script scripts/pr_review.py comment "" --repo "/" --ack "=" --body ""` from a hub checkout. Do not use a provider connector or reconstruct the GitHub mutation. ## Escalate to the maintainer when diff --git a/.github/skills/python-codestyle/SKILL.md b/.github/skills/python-codestyle/SKILL.md index cd46358..f356299 100644 --- a/.github/skills/python-codestyle/SKILL.md +++ b/.github/skills/python-codestyle/SKILL.md @@ -92,6 +92,21 @@ its strict flags. Pylance's pyright diagnostics are then advisory, since CI neve pyright-only repo is the lightest and is inherently consistent, since the editor and CI run one engine. +**The Python line comes from the root `.python-version`.** It names `X.Y`, and uv, setup-python, +and pyenv each read it, so uv fetches that interpreter on a developer host. The line is the +repository's own choice, per `CODESTYLE.md` "Toolchain Versions", so a repository may lead or lag +the hub's fallback line. The hub's validator runs its legs and its lint job on that line, unless the +caller's `python-versions` input names others. That input then names this line first, or the lint +job refuses it. The hub's PyPI build runs on the line too, and lets uv choose where the repository +carries none. A caller +carrying no `.python-version` gets the hub's fallback line and a warning. A file naming no `X.Y` +line fails the validator rather than fall back. A directory whose `pyproject.toml` has a `[project]` table sets its `requires-python` floor to +that line. It leaves ruff `target-version`, mypy `python_version`, and pyright `pythonVersion` +unset. Then ruff reads its target from `requires-python`, and each checker reads its target from +the interpreter it runs under. A directory with no `[project]` table has nothing to read, so it +sets each of the three it configures to that line. A move edits `.python-version`, those settings, the devcontainer image tag, and any +explicit `python-versions` entry together. + ## Local development loop From inside a **build**-profile Python project directory in its uv form. A pip-form directory runs @@ -99,43 +114,49 @@ neither `uv sync` nor `uv run`, since either writes a `uv.lock` that, once commi directory the uv form. A pip-form directory builds its environment as the pip-form block below shows. A **lint-only** Scripts profile has no `uv.lock` to sync and no pytest to run. For it, substitute -`uvx` per tool and `unittest` per the Two Profiles section above: +`uvx` per tool and `unittest` per the Two profiles section above: ```sh uv sync # creates .venv, installs deps + dev group -uv run ruff format # auto-format -uv run ruff check --fix # auto-fix lint -uv run ruff check # verify lint clean -uv run ruff format --check # verify format clean +uv run ruff format --extend-exclude ./hub_fetch_run.py --force-exclude # auto-format +uv run ruff check --fix --extend-exclude ./hub_fetch_run.py --force-exclude # auto-fix lint +uv run ruff check --extend-exclude ./hub_fetch_run.py --force-exclude # verify lint clean +uv run ruff format --check --extend-exclude ./hub_fetch_run.py --force-exclude # verify format clean uv run pyright # verify types uv run pytest # run tests uv build # produce wheel + sdist in ./dist (published packages only) ``` +A downstream repo keeps the carried `hub_fetch_run.py` at its root. So each ruff command this skill and its references name carries +`--extend-exclude ./hub_fetch_run.py --force-exclude`, whatever form runs it. The repo's own ruff config may be stricter than the hub's. +The flags keep ruff from reporting or rewriting the helper, which stays byte-identical to the hub's copy. + The **build**-profile Python clean-compile, in its uv form, is `uv run ruff format` + `uv run ruff check` + the repo's type checker. That checker is `uv run pyright`, or `uv run mypy` -where mypy is the CI checker, or both where the repo runs both (see Type checking above). Where the -config sits in the project directory, CI passes the checker no path, so the config's own target +where mypy is the CI checker, or both where the repo enforces pyright beside mypy (see Toolchain +above). Where the config sits in the project directory, CI passes the checker no path, so the config's own target settings decide what is checked. mypy left with no target that way exits with an error. A declared subdirectory with no config of its own uses the repository root's instead. CI then runs the checker -from the root with the directory as its path, `uv run --project `, so run it +from the root with the directory as its path, `uv run --project "" "" ""`, so run it the same way. Run the clean-compile, plus `uv run pytest`, before committing. A **build**-profile directory in its pip form builds its environment the way CI does, through uv's pip interface, which writes no `uv.lock`. It installs every `requirements*.txt` in one command, since separate installs let one file's pins downgrade what another resolved. Where its `pyproject.toml` carries a `[project]` table it then installs the directory itself as editable. Without that, a -`src`-layout package is not importable and pytest fails locally where CI passes: +`src`-layout package is not importable and pytest fails locally where CI passes. Both installs pass +`--python .venv/bin/python`, since `uv pip install` targets an active `VIRTUAL_ENV` ahead of +`./.venv`: ```sh uv venv --clear # creates .venv, replacing an existing one -uv pip install -r requirements.txt -r requirements-dev.txt # one -r per requirements*.txt -uv pip install -e . # only where pyproject.toml has a [project] table +uv pip install --python .venv/bin/python -r requirements.txt -r requirements-dev.txt # one -r per requirements*.txt +uv pip install --python .venv/bin/python -e . # only where pyproject.toml has a [project] table # in a declared directory whose .venv installs ruff, .venv/bin/python -m ruff replaces uvx ruff@latest -uvx ruff@latest format # auto-format -uvx ruff@latest check --fix # auto-fix lint -uvx ruff@latest check # verify lint clean -uvx ruff@latest format --check # verify format clean +uvx ruff@latest format --extend-exclude ./hub_fetch_run.py --force-exclude # auto-format +uvx ruff@latest check --fix --extend-exclude ./hub_fetch_run.py --force-exclude # auto-fix lint +uvx ruff@latest check --extend-exclude ./hub_fetch_run.py --force-exclude # verify lint clean +uvx ruff@latest format --check --extend-exclude ./hub_fetch_run.py --force-exclude # verify format clean .venv/bin/python -m pytest # run tests ``` @@ -155,20 +176,21 @@ way, as in `/.venv/bin/python -m mypy `. On Windows each interpreter p clean-compile, run with pytest before committing. A **lint-only** profile's clean-compile substitutes its `uvx` and `unittest` equivalents, per Two -Profiles above, and has no such command to run before committing beyond those. These are documented +profiles above, and it runs only those before committing. These are documented commands. The hub's `vscode-tasks-python.json` snippet carries the VS Code tasks mirror of the uv form that the fleet baseline expects. Its header names the pip-form and lint-only adaptations. Every command-executing task in it is `type: process`, and every aggregator is `dependsOn`-only. Neither chains with `&&`, so the mirror runs the same on any task shell. CI runs these same commands as the authoritative backstop in every directory the hub validator's -`python-directories` input declares. Its `uvx` ruff runs at the version the hub's `python-tool-pins` -action pins rather than at `@latest`. So a ruff release can make a local run and CI disagree until +`python-directories` input declares. It runs one type checker there, mypy where both are configured. +A repo enforcing pyright beside mypy backstops pyright from its own validate hook, per Toolchain above. +CI's `uvx` ruff runs at the version the hub's `python-tool-pins` action pins rather than at `@latest`. So a ruff release can make a local run and CI disagree until the caller's hub pin moves to a release carrying the new version. A repo declaring none has its root gated only where it tracks a root `pyproject.toml`, per `WORKFLOW.md` D1.2. That undeclared root is gated more loosely. CI reads its type-checker configuration only from the `[tool.mypy]` or `[tool.pyright]` section of its `pyproject.toml`. It skips the type check where neither is there, whatever the form. In its pip form CI installs nothing for that check and runs a bare -`uvx @latest`. So the local check against the environment is the stricter one. And CI runs +`uvx "@latest"`. So the local check against the environment is the stricter one. And CI runs its tests only where a pytest suite in `tests/` sits beside a `uv.lock` or `requirements*.txt`. A repo that keeps no .NET tool manifest declaring Husky.Net wires its local hook from the canonical @@ -185,7 +207,8 @@ what the hook must cover, its audit treatment, and the per-clone enablement step A restricted executor gives each task a cache directory under a writable temporary root. Point `UV_CACHE_DIR`, `RUFF_CACHE_DIR`, `MYPY_CACHE_DIR`, and `COVERAGE_FILE` into that directory before -running the applicable tools. This keeps their generated state outside both the home directory +running the applicable tools. The exception is `UV_CACHE_DIR`, a download cache uv locks for +concurrent use, which a session's tasks and subagents share. This keeps their generated state outside both the home directory and the checkout. Do not change `HOME` or an agent configuration directory. A denied network request means the tool did not run, so preserve the denial and rerun through the executor's scoped approval mechanism. @@ -244,7 +267,7 @@ build-profile conventions, and `references/profiles.md` for the lint-only `unitt - **A test lives in a `tests/` directory, never inside the production file it tests.** A deployed script may keep a `--selftest` that runs a small smoke check in seconds, and the case matrix lives in `tests/`. A self-test shipped inside the file it tests grows the file every reviewer reads, and its cases can come to outweigh the code they test. -- **A hub-hosted standalone script that needs a third-party library declares it in PEP 723 inline script metadata, and runs as `uv run --no-project --script `.** The block opens on `# /// script`, closes on `# ///`, and carries `dependencies` and `requires-python`. The fleet already installs uv on hosts and in CI. `--no-project` keeps uv from syncing the project around a script that has no block yet, where it would write a lockfile and a virtual environment. A script with no such block runs under `python3` and uv alike. A hook an agent harness runs on every tool call stays standard-library only, since it runs before any toolchain is guaranteed. +- **A hub-hosted standalone script that needs a third-party library declares it in PEP 723 inline script metadata, and runs as `uv run --no-project --script ""`.** The block opens on `# /// script`, closes on `# ///`, and carries `dependencies` and `requires-python`. The fleet already installs uv on hosts and in CI. `--no-project` keeps uv from syncing the project around a script that has no block yet, where it would write a lockfile and a virtual environment. A script with no such block runs under `python3` and uv alike. A hook an agent harness runs on every tool call stays standard-library only, since it runs before any toolchain is guaranteed. @@ -252,7 +275,8 @@ build-profile conventions, and `references/profiles.md` for the lint-only `unitt Published packages use `_version.py` with `__version__ = "0.0.0"` as a placeholder. Wire `hatch-vcs` or equivalent to increment, publish with `skip-existing: true`. Source-only repos use -a static `version` in `[project]` with no `_version.py`. See `references/profiles.md` for details. +a static `version` in `[project]` with no `_version.py`, and NBGV plus `version.json` own their +release tag. See `references/profiles.md` for details. ## Linter cleanliness @@ -286,7 +310,8 @@ Before pushing or opening a PR: A command-line script is one a person or an agent runs by name. A hook its host runs, taking its input from that host rather than from a command line, is not one. - **Every command-line script answers `--help` and `-h`** with the same text on stdout, then exits 0, changing nothing. That text opens on a usage line naming the script. An agent learns a script's interface by asking it, so a script that reads `--help` as an input acts in a way nobody predicted. A PowerShell script declaring its own parameters answers `-Help` and `-h` instead, from a `-Help` switch carrying an `h` alias. That form follows PowerShell's own parameter convention, so such a script owes no answer to a literal `--help`. A wrapper that forwards its arguments to another script answers whatever that script answers. -- **An argument the script does not recognize is refused**, with a non-zero exit before any read or write. The refusal names it as an unknown or unrecognized option, argument, flag, or parameter, and PowerShell's own refusal of a parameter it cannot bind counts. So a PowerShell script declaring its own parameters refuses a literal `--help` like any other unrecognized argument. Where no parameter takes the remaining arguments, the binder's refusal does that. A script with such a parameter refuses a dash-prefixed leftover itself. An unrecognized first argument is never taken as a default mode or as a target. +- **An argument the script does not recognize is refused**, with a non-zero exit before any read or write. The refusal names it as an unknown or unrecognized option, argument, flag, or parameter, and PowerShell's own refusal of a parameter it cannot bind counts. That refusal comes from the binder only in an advanced script, one carrying `[CmdletBinding()]` or a `[Parameter()]` attribute. Without either, a plain `param()` block binds an unknown parameter into `$args` and runs on. Such a script refuses a non-empty `$args` itself, before any work. So a PowerShell script declaring its own parameters refuses a literal `--help` like any other unrecognized argument. A script with a parameter taking the remaining arguments refuses a dash-prefixed leftover itself. An unrecognized first argument is never taken as a default mode or as a target. +- **A shell script that gives a refused argument an exit status of its own uses 64, `EX_USAGE` from `sysexits.h`, and reserves it.** A caller can then tell a refusal, which changed nothing, from a run that started and failed, without reading the message. Every refusal exits through one function that exits 64. Under `set -e` a failed command's own status becomes the script's, so an `EXIT` trap turns any other exit carrying 64 into 1. A program the script `exec`s replaces that trap. So the script `exec`s only a program whose own 64, if it exits 64 at all, means a refused argument. An argument the script passes on, which that program refuses, keeps the program's status. The script's `--help` names the status, so a caller reads it as a contract. @@ -294,13 +319,14 @@ A command-line script is one a person or an agent runs by name. A hook its host -This applies to every Bash and Python script. `CODESTYLE.md` "Interrupts in Python" and "Interrupts in Shell" state each language's mechanics. +This applies to every shell and Python script and to every .NET console app, which the bullets below also call a script. `CODESTYLE.md` "Interrupts in Python", "Interrupts in Shell", and "Interrupts in .NET" state each language's mechanics. -- **On SIGINT or SIGTERM, a script releases what it holds before it exits.** It removes the temporary paths it created, releases the locks it took, and stops the child processes it started. A path, lock, or child left behind can stop the next run from starting, or feed it a half-written input. +- **On SIGINT or SIGTERM, a script releases what it holds before it exits.** It removes the temporary paths it created, releases the locks it took, and stops the child processes it started. A path, lock, or child left behind can stop the next run from starting, or feed it a half-written input. A script started with SIGINT ignored keeps it ignored, so a stop meant to reach it sends SIGTERM. A non-interactive shell starts a background child that way. - **A write to persistent state goes to a temporary path beside the target, then is renamed over it.** An interrupt then leaves the old content or the new, never a mix of both. A store with transactions of its own, such as an SQLite database, is written through those instead. A rename over an open database can corrupt it. -- **An interrupted script prints one line naming the signal, with no traceback, and exits 130 for SIGINT or 143 for SIGTERM.** Each status is 128 plus the signal number, the status a shell reports for a process that signal ended. +- **An interrupted script prints one line naming the signal, with no traceback, and ends by re-raising the signal.** The signal then ends the process, so a shell reports 130 for SIGINT or 143 for SIGTERM, 128 plus the signal number. At Ctrl-C, a calling shell's loop then stops rather than starting its next iteration. A script calling `exit 130` has not died by the signal, so that loop reads an ordinary non-zero exit and runs on. A launcher between them, such as `uv run`, exits with the status rather than dying by the signal, so that loop runs on there too. - **A script takes this rule when it is created or next edited.** An existing script is not edited for this rule alone. -- **A script that holds a lock, temporary state, or a child process owes a test that signals it mid-run.** The test sends SIGINT or SIGTERM, then asserts the matching exit status and that nothing the script held remains. It is skipped on Windows, which cannot deliver either signal for a script to handle. A script holding none of these owes no such test. +- **A script that holds a lock, temporary state, or a child process owes a test that signals it mid-run.** The test sends SIGINT or SIGTERM, then asserts that the script died by that signal and that nothing it held remains. It starts the script with its interpreter directly, since a launcher such as `uv run` hides the signal death. It is skipped on Windows, where a test has no way to send SIGINT or SIGTERM to the process it started. A script holding none of these owes no such test. +- **A script that ends by `exec`-ing its long-running process owes no interrupt handling for that process.** The `exec` replaces the script, so a signal reaches the process directly. A background child the script starts to outlive the `exec` is handed across it, and the script neither stops it nor waits for it. Such a child is handed across only where something else stops it, such as a container's teardown of its whole process tree. Anything else the script holds is released before the `exec`. A script that holds nothing else at any point before the `exec` owes no trap and no signal test. As PID 1, such as a container's entrypoint, it ignores a SIGTERM that arrives before the `exec`, so a stop waits for its timeout. @@ -308,9 +334,9 @@ This applies to every Bash and Python script. `CODESTYLE.md` "Interrupts in Pyth -- **SIGINT and SIGTERM take one path.** Python raises `KeyboardInterrupt` on SIGINT. The entry point installs a SIGTERM handler with `signal.signal` that records the signal and raises `KeyboardInterrupt`. -- **The entry point catches `KeyboardInterrupt` once, and any handler below it that catches the exception re-raises it.** It prints the line `CODESTYLE.md` "Interrupts" requires, then exits 143 where the SIGTERM handler recorded a signal and 130 otherwise. -- **What the script holds is released by `with` blocks and `finally` clauses as the exception unwinds.** A `subprocess.Popen` child is stopped in a `finally` clause with `terminate()`, then `wait()`, since leaving its `with` block does not stop it. That child runs without `shell=True`, so `terminate()` reaches the command rather than a shell around it. +- **SIGINT and SIGTERM take one path.** The entry point installs one handler with `signal.signal` for both signals. The handler records the first signal and raises `KeyboardInterrupt`, and returns at once on any later one. A later signal would cut the cleanup short, such as the SIGTERM that `uv run` forwards to a process group a Ctrl-C already reached. Python can run the later signal's handler at the first instruction of the first one's, before it records anything. So the handler also returns at once when the frame it interrupted is its own: `if received or (frame is not None and frame.f_code is on_signal.__code__): return`. A test of the handler calls it from a `sys.setprofile` hook inside its own first call, and expects the first signal recorded. The handler takes SIGINT only where `signal.getsignal(signal.SIGINT)` is still `signal.default_int_handler`, so a SIGINT inherited as ignored stays ignored. +- **The entry point catches `KeyboardInterrupt` once, and any handler below it that catches the exception re-raises it.** It prints the line `CODESTYLE.md` "Interrupts" requires, then re-raises the signal the handler recorded. To re-raise, it flushes standard output and standard error inside `contextlib.suppress(OSError)`, restores the default handler with `signal.signal(signum, signal.SIG_DFL)`, then re-sends the signal with `os.kill(os.getpid(), signum)`. The suppression covers a pipe whose reader the same Ctrl-C ended. The default action ends the process without Python's own exit handling. So the flush comes first, and no cleanup on this path relies on an `atexit` handler or a finalizer. The re-raise runs outside every `with` block and `finally` clause, such as at the `__main__` call site, since none of them runs after it. A process the re-sent signal does not end, such as PID 1 in a container, then exits 128 plus the signal number. On Windows, `os.kill` ends the process with the signal number as its status, so there the entry point skips it and exits 130. +- **What the script holds is released by `with` blocks and `finally` clauses as the exception unwinds.** A `subprocess.Popen` child is stopped in a `finally` clause, since leaving its `with` block does not stop it. The clause calls `terminate()`, then `wait(timeout=...)`, such as 10 seconds. On `subprocess.TimeoutExpired`, it calls `kill()`, then `wait()`. The handler passes over a second Ctrl-C, so a child that ignores SIGTERM would otherwise hold the script. That child runs without `shell=True`, so `terminate()` reaches the command rather than a shell around it. Where that child is a launcher, such as `uv run`, `kill()` reaches the launcher alone, so a script it started that outlasts SIGTERM keeps running. - **The rename over persistent state uses `os.replace`.** `os.rename` and `Path.rename` fail on Windows when the target exists. diff --git a/.github/skills/python-codestyle/references/code-style.md b/.github/skills/python-codestyle/references/code-style.md index 54e438b..fc22427 100644 --- a/.github/skills/python-codestyle/references/code-style.md +++ b/.github/skills/python-codestyle/references/code-style.md @@ -45,8 +45,8 @@ - **Use modern syntax**: `list[int]` not `List[int]`, `dict[str, X]` not `Dict[str, X]`, `X | None` not `Optional[X]`, `from __future__ import annotations` only when needed for forward references. -- **Don't hedge that syntax for an older interpreter.** `pyproject.toml` pins `target-version` / - `python_version` to 3.13 for every Python profile in this repo. `spec/host-tools.json` +- **Don't hedge that syntax for an older interpreter.** In the hub, the lint-only `pyproject.toml` pins + `target-version` / `python_version` to 3.13, the line its root `.python-version` selects. `spec/host-tools.json` carries that as the host floor `scripts/host_gate.py` enforces. As a result of both, 3.10+-only syntax (`X | None`, `match`, etc.) needs no quoting and no `typing.Union` fallback on that account alone. It also needs no `from __future__ import annotations` guard on that account alone. Add that import only when a real forward reference @@ -100,7 +100,11 @@ rejects non-ASCII output from a child writing UTF-8. No static check in the ruff, pyright, or mypy toolchain looks for the omission in a subprocess call. Naming the encoding settles how the bytes are translated, not what a byte or character outside that encoding is worth. Each call - decides that with its own `errors` argument, and the strict default decides it by raising. + decides that with its own `errors` argument, and the strict default decides it by raising. A + call whose child is a Python interpreter also owes that child the matching encoder. Below + Python 3.15 the child's own streams take the locale encoding too. Pass `PYTHONIOENCODING=utf-8` + in the child's environment. A child run with `-I` or `-E` ignores that variable, so give it + `-X utf8` on its command line instead. diff --git a/.github/skills/python-codestyle/references/profiles.md b/.github/skills/python-codestyle/references/profiles.md index 6fe393d..fe4add4 100644 --- a/.github/skills/python-codestyle/references/profiles.md +++ b/.github/skills/python-codestyle/references/profiles.md @@ -16,12 +16,13 @@ review. The axes that commonly vary: installs. CI's `uv sync --all-groups --frozen` installs that group too, since the command takes every group and no extra. PEP 621 - `[project.optional-dependencies]` (installed with `uv sync --extra `) suits only a tool CI + `[project.optional-dependencies]` (installed with `uv sync --extra ""`) suits only a tool CI does not run. The pip form declares its dependencies in `requirements*.txt` files, installed together in one resolve, per `SKILL.md` "Local development loop". - **Versioning / publishing**: a published package or a source-only repo (see Versioning below). A published package has `_version.py` plus a version source, `uv build`, and a PyPI publish step. - A source-only repo has a static `version` and no publish step. + A source-only repo has a static `version` and no PyPI publish step, and NBGV plus `version.json` + own its release tag. ## Two profiles: full specification @@ -39,7 +40,7 @@ Tool configuration alone marks the lint-only one: with `dependencies`, a `[build-system]`, and a committed `uv.lock`. Its dev tools sit in `[dependency-groups]`, per the dependency-declaration axis above. The `uv.lock` is pinned LF, per GOVERNANCE.md's "Line Endings" section. CI runs `uv sync --all-groups --frozen` + - `uv run `, so the lockfile pins tool versions. That sync installs every `[dependency-groups]` group and no + `uv run ""`, so the lockfile pins tool versions. That sync installs every `[dependency-groups]` group and no `[project.optional-dependencies]` extra. The pip form is a `pyproject.toml` beside a `requirements*.txt`, installed with pip, whether or not it carries a `[project]` table. A committed `uv.lock` makes a directory the uv form even where a `requirements*.txt` sits beside it. @@ -48,7 +49,7 @@ Tool configuration alone marks the lint-only one: `python-directories` input runs ruff and the type checker from that environment where it installs them. It otherwise runs them through `uvx`, with the checker pointed at that environment. The undeclared default root runs ruff through `uvx` at the pinned version the - lint-only profile below names, and a bare `uvx @latest`, with nothing installed. + lint-only profile below names, and a bare `uvx "@latest"`, with nothing installed. - **Scripts** (the `lint-only` profile): stdlib-only utility scripts (e.g. a Python tooling subtree of a `csharp` app). Run the tools with `uvx` (no project install, no lockfile). The `pyproject.toml` carries only tool config (`[tool.ruff]`, `[tool.mypy]`, and @@ -56,7 +57,7 @@ Tool configuration alone marks the lint-only one: `uv.lock` (that metadata would misrepresent it as a shippable package). mypy is the type-check gate (there is no first-party package for pyright strict to anchor on). A `[tool.pyright]` block in standard mode keeps Pylance quiet in the editor, the same mypy-gate/pyright-editor - split the build profile uses. There is no lockfile, and a `uvx @` literal in a `run:` + split the build profile uses. There is no lockfile, and a `uvx "@"` literal in a `run:` step is not something Dependabot tracks. The fleet rule is to pin only what Dependabot auto-updates (SHA-pinned actions, package deps) and otherwise run latest. A manual pin would silently go stale. So CI runs ruff at the version the hub validator's @@ -76,13 +77,20 @@ Tool configuration alone marks the lint-only one: owes the same gates whatever its profile: lint, format, a type check, a test suite, and a coverage report to Codecov. The hub validator runs them in each directory the caller declares in its `python-directories` input, which the registry's `pythonDirectories` mirrors. From inside - a lint-only directory it runs `uvx ruff@ check`, `uvx ruff@ format --check`, + a lint-only directory it runs `uvx "ruff@" check`, `uvx "ruff@" format --check`, `uvx mypy@latest`, and `uvx coverage@latest run -m unittest discover -s tests`. It adds `--with-requirements tests/requirements.txt` to that last where the directory carries one. It then writes `coverage.xml` and uploads it best-effort per `WORKFLOW.md` D1.6, with no threshold adopted. A declared directory with no `tests/` fails that job. +In either profile, the mypy configuration names its target with `files`, `packages`, or +`modules`. That holds for a `[tool.mypy]` section and for a `mypy.ini`, `.mypy.ini`, or `setup.cfg` +`[mypy]` section alike. A `[tool.mypy]` section in a project usually names `files = ["src"]`, and +one in a lint-only directory `files = ["."]`. An INI file writes the list bare, as `files = src`. +CI passes mypy no path where that config sits in the directory it checks. +Without a target, mypy then exits 2 with "Missing target module, package, files, or command". + A profile belongs to a declared directory, not to the repository. A repository declaring none has its root gated only where it tracks a root `pyproject.toml`, as `WORKFLOW.md` D1.2 states. Each deliverable takes one build-profile directory of @@ -105,7 +113,7 @@ you wire `_version.py` to something that increments (the usual options are `hatc version.json bridge, or manual bumps), no new PyPI versions land. Publishing with `skip-existing: true` keeps a stuck placeholder version from failing the run. -**Source-only repos** (no PyPI publish, with a source-release on dispatch or no release at all) do -not need `_version.py`. Keep a static `version` in `pyproject.toml` `[project]`, or let the -release pipeline's version source (e.g. NBGV plus `version.json`) own the tag. There is no publish +**Source-only repos** (no PyPI publish, with a source release on dispatch) do +not need `_version.py`. The release pipeline's version source, NBGV plus `version.json`, owns the +tag. A static `version` in `pyproject.toml` `[project]` does not replace it. There is no publish step to guard, so `skip-existing` does not apply. diff --git a/.github/skills/repo-worktree/SKILL.md b/.github/skills/repo-worktree/SKILL.md index 049edac..cd35f24 100644 --- a/.github/skills/repo-worktree/SKILL.md +++ b/.github/skills/repo-worktree/SKILL.md @@ -140,8 +140,10 @@ system may reap it as temporary data. State the absolute path as soon as the fal and again in the handoff. Do not present work there as ordinarily reviewable from the primary workspace. +The `~/repos/""` path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. + ```sh -TASK_ORIGIN="$(git -C "" remote get-url origin)" +TASK_ORIGIN="$(git -C ~/repos/"" remote get-url origin)" git clone --no-checkout "$TASK_ORIGIN" "/-" git -C "/-" fetch origin develop git -C "/-" switch -c "" origin/develop @@ -165,15 +167,15 @@ no separate branch setup. Git refuses to attach a branch that is already checked tree is the hazard the continuation rule exists for. `git worktree list` names the checkout holding it and prints the base clone first, and what to do there depends on which checkout that is. -The base clone holding it is the case "The Base Branch" excepts. Return it to its own working -branch when its tree is clean, `git -C ~/repos/ checkout develop`, and then create the -worktree. Stop when it is not clean, because a dirty shared checkout is the signal that another +The base clone holding it is the case "The Base Branch" excepts. Judge its tree by the +hand-removal read in "Listing and Cleanup". When it is clean, return it to its own working +branch, `git -C ~/repos/"" checkout develop`, and then create the worktree. Stop when it is not clean, because a dirty shared checkout is the signal that another task may be live there. A previous session's own worktree holding it is retired rather than switched. It normally sits at the very `~/repos/worktrees/-` path the command above wants, so `worktree add` -aborts on the existing directory whatever its branch is. Remove it when it is clean, and stop when -it is not, because a dirty tree there may be uncommitted work. `backlog-burndown` calls this +aborts on the existing directory whatever its branch is. Remove it when it is clean by the +hand-removal read in "Listing and Cleanup". Stop when it is not, because a dirty tree there may be uncommitted work. `backlog-burndown` calls this retire-then-dispatch and cites this skill for it. A machine not yet migrated to this layout still isolates exactly the same way, since the mandate is the isolation rather than the path. Create the worktree beside whatever layout the machine @@ -209,8 +211,10 @@ in the new tree. own, run the same commands there whatever the setting reads. - **Python pre-commit:** When `.pre-commit-config.yaml` exists, check for the hook the new tree will run before installing anything, from the worktree root, with - `test -x "$(git rev-parse --git-path hooks)/pre-commit"`. In a linked worktree with no - `core.hooksPath` set, that path is the base clone's shared hooks directory. So a hook already there is the one every checkout runs, and the step is done. Where none is present in a linked + `h="$(git rev-parse --git-path hooks)/pre-commit"; test -x "$h" && grep -q '^# File generated by pre-commit' "$h"`. + It passes only on an executable hook carrying the framework's own header. Any other executable + there is not the gate this bullet is about. In a linked worktree with no + `core.hooksPath` set, that path is the base clone's shared hooks directory. So such a hook already there is the one every checkout runs, and the step is done. Where none is present in a linked worktree, the bullet below applies. In a standalone clone the hooks directory is the clone's own, so run `uv tool install pre-commit` once per host if not already installed, then `pre-commit install` there. `pre-commit` is never a project dependency, so this is the same @@ -222,15 +226,22 @@ in the new tree. checkout of the repository, the maintainer's own included. Rewriting a setting to the value it already holds, as the Husky.Net step above does, changes nothing and is not this case. Switching installers is the same act, since `prek install` over a pre-commit framework hook moves the original aside and chains to it. That chaining has left every commit in every checkout failing on the - chained script. A missing or wrong shared hook is reported to the maintainer, not repaired from - the worktree. -- **Repository override:** Follow a repository's explicit hook-setup instructions when they differ from these standard cases. The exception is that none of them may change a shared hook or setting - from a linked worktree, per the bullet above. Do not infer a replacement command from + chained script. A missing or wrong shared hook is put to the maintainer per `GOVERNANCE.md` + "Communicating with the User", not repaired from the worktree. A dispatched worker hands it to + its dispatcher in its report. An away run lists it in its end-of-run report under what needs + the maintainer, per `backlog-burndown` "Ending an Away Run". The task does not wait for the + repair, and CI stays the gate meanwhile. A wrong hook that refuses every commit + stops the task at its first commit, reported the same way, since it is never bypassed. No agent repairs it by running an installer against + the shared hooks directory or its setting, from any checkout. The maintainer repairs it by hand. +- **Repository override:** Follow a repository's explicit hook-setup instructions when they differ from these standard cases. The exceptions are the bullet above's. None of them + may change a shared hook or setting from a linked worktree. None may repair a missing or wrong + one from any checkout. Do not infer a replacement command from the language alone. Treat hook preparation as worktree setup, not as recovery after a rejected commit. If setup -fails, report that boundary and fix the setup. Never bypass the hook to make the commit succeed. -A commit-time `core.hooksPath` override, `git -c core.hooksPath= commit`, is a bypass too, +fails, report that boundary and fix the setup this tree owns, routing a shared hook as the +bullet above says. Never bypass the hook to make the commit succeed. +A commit-time `core.hooksPath` override, `git -c core.hooksPath="" commit`, is a bypass too, since git then runs whatever that directory holds, and nothing where it holds nothing. ## Listing and Cleanup @@ -244,41 +255,40 @@ since git then runs whatever that directory holds, and nothing where it holds no helper worktree needs no pull request, but its commit must be contained in the branch whose completed operation created it. - **A pull request merged into `develop` is cleaned up by one command.** Run - `uv run --no-project --script scripts/pr_review.py cleanup --repo / --checkout ` - from a hub checkout outside the worktree it removes, `` being the repository's - primary clone. It reads the branch from the pull request and deletes the remote branch. It then + `uv run --no-project --script scripts/pr_review.py cleanup "" --repo "/" --checkout ~/repos/""` + from a hub checkout outside the worktree it removes, `~/repos/` being the repository's + primary clone. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. It reads the branch from the pull request and deletes the remote branch. It then removes every worktree holding the branch without force, deletes the local branch, and fast-forwards the base clone's `develop`. Its local refusals are decided before the remote delete. So a dirty worktree, an operation in progress, or a local tip the merge did not carry leaves everything in place. A re-check after the delete can still refuse where a concurrent session changed a tree in between. The refusal's output then names what was already deleted. Any exit - other than `0` stops and is reported as it stands rather than finished by hand. The raw - `git worktree remove`, `git branch -D`, and remote delete it replaces are not on the host-safety - permission allowlist, and the command is. It forwards to `scripts/pr_cleanup.py`, and - `scripts/README.md` "`pr_cleanup.py`" in the hub holds the full contract. -- **What no merged pull request into `develop` covers is removed by hand.** That is a promotion's - worktree, a detached helper worktree, and a temporary standalone clone. Confirm the tree is - clean, and read `git status --porcelain --ignored` for the ignored files the removal deletes. Then remove the exact path with `git worktree remove `, or delete the exact - `/-` directory. A named branch such a tree held, a promotion - branch merged into `main` by a merge commit for one, is left for the sweep below. The sweep reads it as finished once `origin/main` or `origin/develop` contains it. `git branch -d` is no substitute, since it judges a branch with no upstream against `HEAD`. So it refuses one merged only into + other than `0` stops and is reported as it stands rather than finished by hand. The one exception is the submodule refusal the bullet below lets this task clear. The `git branch -D` and the remote delete have no auto-mode rule, so they go through `cleanup`. A worktree that git keeps because it holds a submodule's repository is removed by `cleanup` only once it proves nothing in it is lost. Each submodule must be clean, untracked files included. Every commit its refs and its `HEAD` reflog reach must also be in its own remote after a fetch. Otherwise `cleanup` keeps it and reports the submodule and why it is kept. For an unpushed commit that names the commit and what reaches it. Deleting the submodule's repository by hand can discard that commit, so the bullet below says what to do instead. Spell every `scripts/pr_review.py` call this skill prints as `pr-review-conduct` "Expected review loop" says. `cleanup` forwards to `scripts/pr_cleanup.py`, and + `scripts/README.md` "`pr_cleanup.py`" in the hub holds the full contract. A conflicted + promotion's branch, cut from `main` and merging `develop`, takes the same command, run on its + pull request into `main`. +- **What no pull request `cleanup` takes covers is removed by hand.** That is a `develop`-headed + promotion's worktree, a detached helper worktree, and a temporary standalone clone. Read + `git -C "" status --porcelain --ignored --untracked-files=normal`. Any line not starting `!!` means the tree is not clean, so stop. Each `!!` line names an ignored file the removal deletes. Then remove the exact path with `git worktree remove ""`. Claude Code's agent-safety auto-mode rule allows that command without `--force` or `-f`. It covers a tree the session or its dispatching run added, and never one `cleanup` refused. Build a comparison baseline or head tree as `git worktree add` over the clone the task already has. Prefer that to a second full clone. Remove it by this same read and command. A temporary standalone clone is instead deleted as the exact + `/-` directory. A named branch such a tree held is left for the + sweep below. The sweep reads it as finished once `origin/main` or `origin/develop` contains it. `git branch -d` is no substitute, since it judges a branch with no upstream against `HEAD`. So it refuses one merged only into `main` while the base clone is on `develop`. Where that branch was pushed, its remote branch is - reported to the maintainer for deletion, since `cleanup` reads only a pull request merged into - `develop`. Never delete `develop` after a promotion, since it is the permanent integration + reported to the maintainer for deletion, since no pull request `cleanup` takes covers it. Never delete `develop` after a promotion, since it is the permanent integration branch. - **Return the base clone to current `develop`.** `cleanup` does this itself where the base clone is on `develop` or on the merged branch with no tracked changes. A base clone on the merged branch that it cannot switch is one of its refusals. One on another branch, or on `develop` with tracked changes or no fast-forward, exits `0` with `base=kept` on its `status=CLEANED` line. - That line, and every hand removal, leaves this step to run. The step is to fetch and prune `origin`, confirm the base clone is clean, switch it to `develop` when - needed, and fast-forward it with `git merge --ff-only origin/develop`. A completed promotion or + That line, and every hand removal, leaves this step to run. The step fetches and prunes `origin` and confirms the base clone is clean by the hand-removal read above. + It then switches the base clone to `develop` when needed, and fast-forwards it with `git merge --ff-only origin/develop`. A completed promotion or release does not leave the base clone on `main`. Stop and report a dirty base clone or a non-fast-forward instead of switching or reconciling it. - **What an interrupted or abandoned session left behind is swept.** Run - `uv run --no-project --script scripts/pr_review.py cleanup --sweep --repo / --checkout ` - from a hub checkout. It fetches and prunes `origin` and writes nothing else. It reports each worktree and branch that is clean, idle past `--min-age-hours` (default 24), and provably + `uv run --no-project --script scripts/pr_review.py cleanup --sweep --repo "/" --checkout ~/repos/""` + from a hub checkout. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. It fetches and prunes `origin` and writes nothing else. It reports each worktree and branch that is clean, idle past `--min-age-hours` (default 24), and provably finished. Adding `--apply` removes what the report lists through the same checks, the remote branch of a merged `develop` pull request included. The report reaches other sessions' finished work as well as this task's, so `--apply` runs on the maintainer's go-ahead. -- **Prove the cleanup.** Finish with `git status --short --branch` in the base clone and `git worktree list`. The expected result is a clean base clone at `origin/develop` and no worktree belonging only to the completed task. -- A worktree that refuses removal is dirty, and force is not the fix. Look at what is - uncommitted in it first, since discarding uncommitted work runs only on explicit instruction, - per the `git-commit-conventions` skill. +- **Prove the cleanup.** Finish with `git status --short --branch --untracked-files=normal` in the base clone and `git worktree list`. The expected result is a clean base clone at `origin/develop` and no worktree belonging only to the completed task. +- A worktree that refuses removal is dirty or holds a submodule's repository, and force is not the fix. Look at what is + uncommitted in it first, by the hand-removal read above. Discarding uncommitted work runs only on explicit instruction, + per the `git-commit-conventions` skill. Where it holds a submodule's repository, `cleanup` for the pull request that merged it names the submodule and what holds it. `cleanup --sweep` only lists such a worktree as `keep submodules`. So run that `cleanup` where a pull request merged the worktree's branch, and report the worktree to the maintainer otherwise. One refusal can be this task's own to clear: uncommitted changes in a submodule's tree. Commit that work on a new branch of the submodule's and push that branch only where the work is this task's. Its remote must also be under this repository's owner, and otherwise the refusal goes to the maintainer. The merged pull request still pins the submodule's old commit, so report the pushed branch and its repository to the maintainer as well. Never push to a permanent branch such as `develop` or `main`, or to a branch already merged upstream. Then return every submodule to the commit the worktree records, with `git -C "" submodule update --checkout --recursive` run at the worktree's root, and run `cleanup` again. Report every other refusal to the maintainer with what it names. That covers a commit reached from a branch, from `HEAD`, or only from its reflog, and a tag. A branch's commit is often one a squash merge already landed upstream. It also covers a shallow submodule, a stash, a paused operation, and an embedded repository. It also covers a git directory named in place of a tree path, and the hand step a failed clear prints for the maintainer. diff --git a/.github/skills/resync-a-repo/SKILL.md b/.github/skills/resync-a-repo/SKILL.md index 28d6494..4afe197 100644 --- a/.github/skills/resync-a-repo/SKILL.md +++ b/.github/skills/resync-a-repo/SKILL.md @@ -31,33 +31,40 @@ change from one resync to the next. Read RESYNC.md section 0. A repo with no instruction set at all, or a partial one, is not this skill's job. It is STANDUP.md sections 1A and 2 instead, since an absent carried file is a -baseline that never arrived rather than drift to converge. Run `uv run --no-project --script spec/audit.py `, +baseline that never arrived rather than drift to converge. First create the hub and target +worktrees and verify the host, as the next section says, since no hub tool runs before the host gate. +A stale tool answers `--version`, looks healthy, and produces a wrong answer. Then run +`uv run --no-project --script spec/audit.py ""`, the target's `registry/repos.json` `name` field rather than an `owner/repo` slug or a checkout -path. Then read whether the findings are letters (absent) or drift (present but stale). Do both before doing +path. Then read whether the findings are letters (absent) or drift (present but stale). Do all of this before doing anything else. The finding kind names the procedure the repo is owed. ## Reach the hub and measure before changing anything Fetch a hub checkout of your own immediately before reading it, since a stale clone -answers confidently instead of failing. This follows section 1 of the hub-only `RESYNC.md`. +answers confidently instead of failing. Check out `main`, or `develop` while the target's registry entry has +merged there but not yet reached `main`. This follows section 1 of the hub-only `RESYNC.md`. That file is fetched with the hub rather than present in a carrier. Never do the resync's own work in a checkout another task may be using, the maintainer's own primary checkout included, even one that looks current. For the hub and for the target repo alike, create a worktree of your own off that base clone and work there, per `repo-worktree`. Remove each one when the run ends, per that skill's "Listing and Cleanup". A merged pull request's worktree goes through -`uv run --no-project --script scripts/pr_review.py cleanup --repo / --checkout `. A +`uv run --no-project --script scripts/pr_review.py cleanup "" --repo "/" --checkout ~/repos/""`, +`~/repos/` being that repository's primary clone. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. Spell every `scripts/pr_review.py` call this skill prints as +`pr-review-conduct` "Expected review loop" says. A hub worktree that only read the hub is removed by hand once it is clean, its branch with it. On a machine carrying the hub's agent-safety install, Claude Code also refuses a mutating git command run directly in a primary checkout. However, its rules classify git and gh commands only. So a plain file write is never denied, and the re-vendoring this skill exists to govern goes uncaught. A compound command is judged whole, so a copy chained to a denied git write does not run either. Prose is the enforcement here, and following it is not optional. Verify -the host with `python3 scripts/host_gate.py --repo `, run from your hub +the host with `python3 scripts/host_gate.py --repo ""`, run from your hub worktree, since `scripts/` is hub-hosted and no carrier holds it. Then run the audit end to end, -`RESYNC.md` section 2. `uv run --no-project --script spec/audit.py ` measures the target's ground-truth +`RESYNC.md` section 2. `uv run --no-project --script spec/audit.py ""` measures the target's ground-truth branch, which the registry's `groundTruthBranch` names and which is `main` for every cataloged -repo today, never `develop`. That is the invocation "Confirm the procedure before starting" -already ran, run again here. Convergence lands on a ref `main` does not hold yet, so a run that -previews in-flight work names that ref: `uv run --no-project --script spec/audit.py --branch `. Use it +repo today, never `develop`. "Confirm the procedure before starting" already ran that +invocation after this host gate, so read its findings here. A re-run is still owed before +acting on one, as below. Convergence lands on a ref `main` does not hold yet, so a run that +previews in-flight work names that ref: `uv run --no-project --script spec/audit.py --branch "" ""`. Use it to check whether a fix landed, since a run against `main` still reports what the in-flight ref already fixed. Section 2 carries two further commands that neither of these replaces. A finding is a snapshot. So quote the run stamp in anything derived from it, and re-run before acting on a @@ -79,20 +86,25 @@ conversion waits on a re-level of `develop` where an audit `branch:` finding nam covers a finding too large to classify and a path changed on both branches. Use the squash pull request `RESYNC.md` section 3 describes. -1. **The instruction set first.** `CLAUDE.md`, then `AGENTS.md` and `GOVERNANCE.md` verbatim sections, then `CODESTYLE.md` and `WORKFLOW.md`. Include the `AGENTS.md` skill-dependency pointer paragraph in this same step, as one more verbatim unit and not a separate pass. The paragraph names `scripts/skills_install.py` and where the fleet's Skills live. `CLAUDE.md` is the single `@AGENTS.md`-import file that gets `AGENTS.md` into a Claude Code session's context at all. It is a separate baseline entry from `AGENTS.md` itself, so carrying one without the other still leaves that provider unconfigured. **Before touching `AGENTS.md`, `GOVERNANCE.md`, `CODESTYLE.md`, or `WORKFLOW.md` in this step, run the `carried-instruction-file-guard` skill's distinctive-phrase probe against the target file, every time, without exception.** **This holds regardless of whether the update is a verbatim re-vendor or an intent-fidelity edit.** This is not advisory language to weigh against how routine the diff looks. A diff that looks routine is exactly the shape the AGENTS.md-overwrite incident took. Do not proceed to the re-vendor until the probe has run and any local addition it finds has a destination. That gate follows that skill's own procedure. `CLAUDE.md` is outside that guard's scope. It carries no mixed or repo-specific content by design, so its re-vendor is an ordinary verbatim-fidelity copy, no probe needed. +1. **The instruction set first.** `AGENTS.md` and `GOVERNANCE.md` verbatim sections, then `CODESTYLE.md` and `WORKFLOW.md`. Include the `AGENTS.md` skill-dependency pointer paragraph in this same step, as one more verbatim unit and not a separate pass. The paragraph names `scripts/skills_install.py` and where the fleet's Skills live. **Before touching `AGENTS.md`, `GOVERNANCE.md`, `CODESTYLE.md`, or `WORKFLOW.md` in this step, run the `carried-instruction-file-guard` skill's distinctive-phrase probe against the target file, every time, without exception.** **This holds regardless of whether the update is a verbatim re-vendor or an intent-fidelity edit.** This is not advisory language to weigh against how routine the diff looks. A diff that looks routine is exactly the shape the AGENTS.md-overwrite incident took. Do not proceed to the re-vendor until the probe has run and any local addition it finds has a destination. That gate follows that skill's own procedure. 2. **Deletions second, before any re-vendor**, other than step 3's re-vendor of the manifest-owned trees, which "Ship it" below moves into step 1's pull request. Only a `retire` disposition in - `spec/divergences.json` authorizes removing a file. The removal is swept tree-wide, per - RESYNC.md section 4, before the deletion counts as done. -3. **Verbatim re-vendors** for `CLAUDE.md` and everything else the probe in step 1 cleared. A - finding classified modified rather than stale gets its diff read before being overwritten. + `spec/divergences.json` authorizes removing a file. A retired `CLAUDE.md` is one, since Claude + Code reads `AGENTS.md` itself. The audit's finding says whether the copy matches one of the + hub's past versions. Delete it only where it does, and report any other copy to the maintainer + rather than deleting it. The removal is swept tree-wide, per RESYNC.md section 4, + before the deletion counts as done. +3. **Verbatim re-vendors** for every verbatim finding, the four instruction files only once step 1's + probe cleared them. A finding classified modified rather than stale gets its diff read before being overwritten. The reason is that it may be an improvement the hub should adopt instead of a mistake to erase. -4. **Interface workflows.** Honor the named contract, required jobs, the ruleset-bound check name, - the artifact-name handoff, rather than copying bytes. -5. **Settings, rulesets, and secrets.** Run +4. **Interface workflows.** Honor the named contract rather than copying bytes. `AUDIT.md` + section 0 lists the checks that contract covers. +5. **Settings, rulesets, and secrets.** Set the first public-interaction limit by hand on one `collaborators` pilot repository, since `apply` sets none until a committed record says a pilot verified one. Verify there that Copilot, CodeRabbit, Qodo, and Dependabot still work under it. Then commit that record, `repo-config/interaction-verification.json`, through a hub pull request carrying the evidence. + This is `RESYNC.md` step 5. Run `repo-config/configure.sh check "/" release` (substitute `operational` for an - operational repo) from the hub at `main`, then `apply` for what it reports, never from a - carried copy. Run `uv run --no-project --script spec/audit.py ` from the same checkout for secrets. + operational repo), then `apply` for what it reports, never from a carried copy. Both run from + the hub checkout this run fetched, at `main` or at `develop` for a registry entry not yet + promoted. Run `uv run --no-project --script spec/audit.py ""` from the same checkout for secrets. 6. **Intent files last, and by hand,** since nothing mechanical judges these. Reconcile the registry entry (`status`, `types`, `releaseTrigger`, `workflowModel`, @@ -115,7 +127,11 @@ Where `RESYNC.md` section 4 requires a pin bump before a retirement, the bump la deletions pull request. A pull request is never a direct push to a protected branch and never a hand edit outside a pull request. Close the review loop, per the `pr-review-conduct` skill, before asking the maintainer for merge permission. The -maintainer merges, the agent drives to green and stops. Re-run the audit after the merge. +agent drives each fix pull request into the target's `develop` to green. Once the maintainer +merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one, +and drives it to green. The maintainer merges that too. On an operational repository, the agent +confirms that a promotion is wanted before opening one, per `drive-pr`. +Re-run the audit once the fix is on `main`. From the hub checkout, commit the report under the hub's own `reports/` once authorized, per `AUDIT.md` section 8 and `git-commit-conventions`. A session resyncing its own repository leaves the report to a hub-side audit instead. Done means measured, not applied. diff --git a/.github/skills/session-handoff/SKILL.md b/.github/skills/session-handoff/SKILL.md index 563a7d5..786c489 100644 --- a/.github/skills/session-handoff/SKILL.md +++ b/.github/skills/session-handoff/SKILL.md @@ -159,7 +159,7 @@ per-section rule broke several sections earlier. Neither is the rule. Sections 7 and 8 are what the chain exists for, and they are also the most likely to be padded. A handoff issue outlives the session that wrote it, and is readable by everyone who can read the -repository. On a public one that is everyone. So it quotes no data observed in the maintainer's +repository. On a public one that is everyone. So it quotes no identifying data observed in the maintainer's environment, per `GOVERNANCE.md` "Representative Data in Agent-Authored Text". That rule binds on a private repository exactly as it does on a public one, and the visibility only changes who the audience is. The routine case here is an absolute home path, since a handoff naturally wants to @@ -212,16 +212,17 @@ A maintainer resuming work says little, often only "resume the handoff", and tha the whole procedure below. Run every step without being reminded of any of them. 0. **Clone a hub checkout of the session's own, as the first command.** Clone the hub's `main` - into a new directory under ``, the fleet worktree directory `repo-worktree` names, - before any `git` or `$handoff` command. `` is a name no directory under `` - already holds, so the clone never takes a path a task worktree wants: + into a new directory under `~/repos/worktrees`, the fleet worktree directory `repo-worktree` + names, before any `git` or `$handoff` command. `` is a name no directory under + `~/repos/worktrees` already holds, so the clone never takes a path a task worktree wants: ```sh - git clone --branch main https://github.com/ptr727/ProjectTemplate.git /ProjectTemplate-hub- + git clone --branch main https://github.com/ptr727/ProjectTemplate.git ~/repos/worktrees/ProjectTemplate-hub-"" ``` That clone is the hub checkout "Running the Chain" sets `$handoff` from, so every later step - runs the chain's script there. Bring it up to date with `git -C pull --ff-only` before + runs the chain's script there. Bring it up to date with + `git -C ~/repos/worktrees/ProjectTemplate-hub-"" pull --ff-only` before step 6 writes, since a clone is whatever it last fetched. Wherever this skill was loaded from is never this session's hub checkout, whatever checkout or snapshot holds it. So no step reads that location as the hub checkout or runs `$handoff` from it. A task worktree `repo-worktree` creates @@ -265,8 +266,8 @@ the whole procedure below. Run every step without being reminded of any of them. with `new`, presents the parked decision queue, and saves memories last. Where the issue carries the `blocked` label left on in step 3, take it off once the next round is written and the queue presented. Remove it with `gh issue edit "" --repo OWNER/NAME --remove-label blocked`, since - the round it marked is archived. Leave it on instead where a `decision` issue this session filed - on this link's work is still unanswered then. The lane waits on that decision now, and an + the round it marked is archived. Leave it on instead where a `decision` issue on this link's work + is still unanswered then, whichever session filed it. The lane waits on that decision now, and an away-mode run taking it could only park it again. Name that issue in a comment on the handoff, as a parking comment does, so a reader reads the question the lane now waits on. An `auto-*` lane differs in one way, since it holds one piece of work. Where that work is done, end the @@ -296,10 +297,12 @@ it. written, comment those answers onto its issue, with the queue's count and list after them. That is because the body keeps the count it was written with, and a resume reads the issue's comments. 4. **Remove the hub clone** "The Attended Session" step 0 made, where it made one, once no step - above still needs `$handoff`. No other step or sweep reaches that clone. From outside it, confirm - `git -C status --porcelain` prints nothing, then delete that exact directory. Ignored - files there are tool caches, so the removal takes them too. A clone - holding uncommitted work is left in place and named in the session's closing message. + above still needs `$handoff`. No other step or sweep reaches that clone. From outside it, read + `git -C ~/repos/worktrees/ProjectTemplate-hub-"" status --porcelain --ignored --untracked-files=normal`. + Any line not starting `!!` is uncommitted work, so the clone is left in place and named in the session's closing + message. Otherwise name each `!!` entry in that message, since the removal deletes them, and + delete that exact directory. `--porcelain` alone never lists ignored entries. The explicit + untracked mode keeps a `status.showUntrackedFiles=no` setting from hiding untracked ones too. 5. **Save memories last.** Where the host keeps a per-user memory, what goes there is the environment-specific nuance "Durable Knowledge and Self-Improvement" leaves to memory. A quirk of this machine or this account is one such nuance. What goes there is saved as the session's final @@ -329,7 +332,9 @@ The numbered list also serves a turn asking for a command run at the session's i - **Reference every pull request as a clickable link.** When you mention a PR on a surface that renders Markdown (chat, a summary, a report), render it as a Markdown link to the PR. Write it as `[#N](https://github.com/OWNER/REPO/pull/N)`, never a bare `#N`. The same applies to issues and commits. **The form follows the surface.** Some surfaces link neither a Markdown link nor a bare URL, an interactive prompt's question and option text among them. Pasting a full URL into one of those does not rescue it, since the reader gets a string to copy. That is the outcome this rule exists to prevent. There the reference is a bare `#N`. The clickable link goes in the message that comes **before** the prompt rather than merely alongside it. That is because the prompt blocks on an answer, and a message emitted after it is read once that answer is already given. That is the one moment the link is no longer any use. The test is whether the reader can click it where it is read, not whether it was written in the syntax that works elsewhere. - **Put a command the user must run where the user can run it.** This session's input line is where the user types to the agent. A command runs outside this session where this session's input line cannot run it or cannot hold its effect. One waiting on typed input, such as a password or a confirmation, is such a command. So is one meant for another host, or one setting a variable the session reads at launch. Every other one runs at this session's input line, where that line can run a command, and outside the session otherwise. **A command the user runs outside this session goes in the question's own text.** Where a question asks the user to run one, the question carries the exact command, complete and ready to paste. A message before the prompt may repeat the command, but the question never points at that message. A question pointing at it can leave the reader to find the command among a long run of earlier output. Such a command stays in the prompt, where the turn opens one, although the clickable-link bullet above moves a link out of one. The command needs no rendering, since the prompt shows it as plain text the reader can copy. **A command the user runs at this session's input line never goes in an interactive prompt.** On Claude Code such a command is a `!` line, typed at the session's input line so its output lands in the session. While an interactive prompt is open, the user cannot type at the session's input line. So a command placed in one sits in the one surface that blocks running it. It goes in a plain message instead, as a fenced block holding the `!` line itself, complete and ready to paste. Several commands join on that one line with `&&`, which runs them in order and stops at the first that fails. The block opens the message. Any question the same turn owes follows it as a numbered list, and any report comes after both. The message asks the user to reply once the command has run, and the turn ends with no interactive prompt open. The agent then checks the result on the user's next message. It reads back the state the command was meant to change, or the output it left in the session. An answer saying the command ran is not that check. -- **Ask every question through the interface's prompt, never in prose.** When you need the user to decide, answer, or approve anything, put it to them through the interface's own prompt mechanism. Do so whether or not work is blocked on it. An offer to do more work ("want me to file that?") is a question like any other. A question written into a message is lost in the report around it, however short it is. One closing a long report sits where the reader is least likely to reach it. Where no prompt mechanism is available, the questions go as a numbered list opening the message rather than closing it. The user can then reply per number. A turn asking for a command the user runs at this session's input line is an exception, per the command bullet above. It puts every question it owes in that message, since a prompt open beside the command would block the place it runs. This bullet settles how a question is put once it is asked. Whether a question is asked now or recorded for later is the parking bullet's to settle. That is the one opening "A question filed as an issue is parked rather than asked". +- **Ask when the user can cheaply confirm.** An assumption that saves one question and is wrong costs the rework plus the trust. So a genuine ambiguity in intent, scope, or authorization is raised, not resolved by picking the likelier reading. Rules that already answer the question (the committed instruction set) are not ambiguity, so read them first rather than asking what they state. +- **The irreversible step (merging, publishing, releasing, force-pushing, deleting, changing branch protection) stays the maintainer's.** **A grant given in a past session or for a different task authorizes nothing now.** Whether a credential's reach or a tool that happens to work authorizes anything is answered by `GOVERNANCE.md` "Repository Boundaries and Write Safety" rather than here. +- **Ask every question through the interface's prompt, never in prose.** When you need the user to decide, answer, or approve anything, put it to them through the interface's own prompt mechanism. Do so whether or not work is blocked on it. An offer to do more work ("want me to file that?") is a question like any other. A question written into a message is lost in the report around it, however short it is. One closing a long report sits where the reader is least likely to reach it. **Each question reads whole from its own text.** It states the problem, why it is being asked, and what each option does, in plain words. It may cite an issue or a pull request by number. The question and its options still read fully without opening it. A question leaning on an issue for its meaning is often answered without reading that issue, so the answer misses its point. Where no prompt mechanism is available, the questions go as a numbered list opening the message rather than closing it. The user can then reply per number. A turn asking for a command the user runs at this session's input line is an exception, per the command bullet above. It puts every question it owes in that message, since a prompt open beside the command would block the place it runs. This bullet settles how a question is put once it is asked. Whether a question is asked now or recorded for later is the parking bullet's to settle. That is the one opening "A question filed as an issue is parked rather than asked". - **Raise work blocked on the user as a direct interactive prompt.** When progress needs a decision, an authorization, or an answer only the user can give, ask for it at the point the work stops. Ask through the interface's own prompt mechanism. Never leave it as prose in a summary. A handoff buried in a paragraph is a handoff that did not happen. That is because a summary reads as a report of finished work. It is also because the one line still waiting on the user is the easiest in a summary to skim past. The blocked item is the message, not a closing remark on a message about something else. **The options offered are the actions themselves.** The one that unblocks the work names the action it authorizes ("squash and merge it"). Selecting it is then the go-ahead rather than a note to act on later. Offering only ways to wait is the same failure in interactive clothing. That is because a prompt whose every choice is inaction reports the block rather than clearing it. Where the agent may not perform the authorized action itself, the option says who does it. Where no interactive prompt is available, the numbered list the bullet above names is the fallback. In a turn asking for a command the user runs at this session's input line, the command bullet above replaces the interactive prompt. - **Lead every choice with a recommendation and its reason.** Wherever the user is asked to choose, in a prompt or in a numbered list, the option the agent recommends comes first. It is marked as the recommendation, and every option states the reason for it. A user who takes the recommendation then reads one line, and one who does not sees what the other options trade away. A question with no defensible recommendation says so rather than inventing one. Where an open question has no options and the agent does have an answer, that answer and its reason go in the question's text. They never go in as an invented option. - **A question filed as an issue is parked rather than asked, and it stays owed.** Where the work cannot continue without the answer, the interactive-prompt bullet governs and the question is asked at the point the work stops. Wherever the question is recorded rather than asked, recording it is the right thing to do, and recording it is still not asking it. That holds whether the work can continue without the answer or the question was asked once and deferred. So the issue carries the fleet's `decision` label. When the filing session knows the choices the question is between, the issue states them. The label and the stated choices are what let a later session, one that was not there when the issue was filed, find the question. That session can then put the question to the user without inventing its answers. **The parked queue is the failure, not the parking.** An issue holding a question the user has never seen reads to every later session as tracked work rather than as a block. So each session files correctly and moves on. Presenting the accumulation is the step nobody owns. @@ -383,7 +388,7 @@ python3 "$handoff" chain --repo OWNER/NAME --track "" --grep "an escaped python3 "$handoff" new --repo OWNER/NAME --track "" --title "" \ --body-file "" --dry-run python3 "$handoff" close --repo OWNER/NAME --track "" --body-file "" --dry-run -python3 "$handoff" tracks --repo OWNER/NAME [--json] +python3 "$handoff" tracks --repo OWNER/NAME # add --json for JSON output ``` Read `--dry-run` output before the first real `new` of a session, since the run replaces a body. It diff --git a/.github/skills/shell-codestyle/SKILL.md b/.github/skills/shell-codestyle/SKILL.md index b9fb0ab..88c9bca 100644 --- a/.github/skills/shell-codestyle/SKILL.md +++ b/.github/skills/shell-codestyle/SKILL.md @@ -2,7 +2,7 @@ name: shell-codestyle description: >- Governs Bash/shell script style for ptr727/ProjectTemplate fleet repos: when a bootstrap or - host-tool script may be shell instead of Python, the mandatory set -Eeuo pipefail header, the + host-tool script may be shell instead of Python, the mandatory set -Eeuo pipefail line, the pipefail-versus-early-reader pitfall, self-recursive command shims, self-locating scripts, the shellcheck-plus-shfmt clean-compile, the --help and unknown-argument rule, the SIGINT/SIGTERM rule, and the why-not-what comment rule. Use this whenever writing, reviewing, or editing a shell @@ -19,16 +19,15 @@ description: >- ## Why this exists This is the shell-specific half of the fleet's code style guide, kept in one place instead of -re-derived per repo or per session. Shell is the fleet's exception language, reached for only -where Python cannot run yet. So its rules exist to keep that narrow surface safe rather than to -cover general scripting style. +re-derived per repo or per session. Shell is the fleet's exception language, so its rules exist to +keep that narrow surface safe rather than to cover general scripting style. ## When shell, not Python -Bash, and only where a program cannot be Python: a bootstrap that installs the interpreter cannot -be written in it. Nor can a host tool that must run before a development toolchain exists depend on -Python. Everything else is Python, with a test under its own scripts tree's -`tests/` directory. +A bootstrap, a program that must run before the interpreter or a development toolchain exists, is +written in the platform's native shell. That is Bash on Linux and PowerShell on Windows. Logic that +needs its failure cases tested is Python, with a test under its own scripts tree's `tests/` +directory. The pattern is a platform-native entry point over shared Python logic. ## Rules @@ -38,14 +37,19 @@ Python. Everything else is Python, with a test under its own scripts tree's section, and the hub's `scripts/docker_lint.py` runs the same pair headless. Neither is scoped to the `*.sh` glob alone. A tracked, extension-less script whose shebang names bash or sh joins the target list too. That is the shape a script meant to run as a bare command takes. -- **`set -Eeuo pipefail`, before the first command the script runs.** A header comment sits above - it, as the hub's own `repo-config/configure.sh` and `host-setup/` scripts do. That works because - what matters is that nothing executes unguarded rather than which line number it lands on. +- **`set -Eeuo pipefail`, before the first command the script runs.** No header comment is + required, so the `set` line may follow the shebang directly. A comment above it is allowed + where it carries a specific non-obvious point. The no-summary rule in + `comment-and-doc-style` still forbids one restating what the script contains. What matters is + that nothing executes unguarded rather than which line number the `set` lands on. Without `-e` a failed command in the middle of a sequence lets the rest run against a state nobody checked. Without `pipefail` a pipeline reports the exit of its last stage. So a fetch that failed reads as an answer when a parser downstream succeeds on an empty input. `-E` carries an `ERR` trap into functions and command substitutions. So a script that later adds one is not - surprised by where it does not fire. + surprised by where it does not fire. A deliberately POSIX `#!/bin/sh` script, in practice a git + hook that must run before any toolchain exists, takes `set -eu` instead. The bash form + aborts such a hook wherever `/bin/sh` is a dash that predates its `pipefail` option, which + rejects `set -o pipefail`. Dash reads `-E` as its emacs editing option. - **A reader that stops early needs its producer read first.** Under `pipefail`, a producer writing to a closed pipe exits non-zero. So `curl ... | grep -q` reports a successful fetch as a failure whenever the match is found early enough. Capture the output, then search it. @@ -89,7 +93,8 @@ Python. Everything else is Python, with a test under its own scripts tree's A command-line script is one a person or an agent runs by name. A hook its host runs, taking its input from that host rather than from a command line, is not one. - **Every command-line script answers `--help` and `-h`** with the same text on stdout, then exits 0, changing nothing. That text opens on a usage line naming the script. An agent learns a script's interface by asking it, so a script that reads `--help` as an input acts in a way nobody predicted. A PowerShell script declaring its own parameters answers `-Help` and `-h` instead, from a `-Help` switch carrying an `h` alias. That form follows PowerShell's own parameter convention, so such a script owes no answer to a literal `--help`. A wrapper that forwards its arguments to another script answers whatever that script answers. -- **An argument the script does not recognize is refused**, with a non-zero exit before any read or write. The refusal names it as an unknown or unrecognized option, argument, flag, or parameter, and PowerShell's own refusal of a parameter it cannot bind counts. So a PowerShell script declaring its own parameters refuses a literal `--help` like any other unrecognized argument. Where no parameter takes the remaining arguments, the binder's refusal does that. A script with such a parameter refuses a dash-prefixed leftover itself. An unrecognized first argument is never taken as a default mode or as a target. +- **An argument the script does not recognize is refused**, with a non-zero exit before any read or write. The refusal names it as an unknown or unrecognized option, argument, flag, or parameter, and PowerShell's own refusal of a parameter it cannot bind counts. That refusal comes from the binder only in an advanced script, one carrying `[CmdletBinding()]` or a `[Parameter()]` attribute. Without either, a plain `param()` block binds an unknown parameter into `$args` and runs on. Such a script refuses a non-empty `$args` itself, before any work. So a PowerShell script declaring its own parameters refuses a literal `--help` like any other unrecognized argument. A script with a parameter taking the remaining arguments refuses a dash-prefixed leftover itself. An unrecognized first argument is never taken as a default mode or as a target. +- **A shell script that gives a refused argument an exit status of its own uses 64, `EX_USAGE` from `sysexits.h`, and reserves it.** A caller can then tell a refusal, which changed nothing, from a run that started and failed, without reading the message. Every refusal exits through one function that exits 64. Under `set -e` a failed command's own status becomes the script's, so an `EXIT` trap turns any other exit carrying 64 into 1. A program the script `exec`s replaces that trap. So the script `exec`s only a program whose own 64, if it exits 64 at all, means a refused argument. An argument the script passes on, which that program refuses, keeps the program's status. The script's `--help` names the status, so a caller reads it as a contract. @@ -97,13 +102,14 @@ A command-line script is one a person or an agent runs by name. A hook its host -This applies to every Bash and Python script. `CODESTYLE.md` "Interrupts in Python" and "Interrupts in Shell" state each language's mechanics. +This applies to every shell and Python script and to every .NET console app, which the bullets below also call a script. `CODESTYLE.md` "Interrupts in Python", "Interrupts in Shell", and "Interrupts in .NET" state each language's mechanics. -- **On SIGINT or SIGTERM, a script releases what it holds before it exits.** It removes the temporary paths it created, releases the locks it took, and stops the child processes it started. A path, lock, or child left behind can stop the next run from starting, or feed it a half-written input. +- **On SIGINT or SIGTERM, a script releases what it holds before it exits.** It removes the temporary paths it created, releases the locks it took, and stops the child processes it started. A path, lock, or child left behind can stop the next run from starting, or feed it a half-written input. A script started with SIGINT ignored keeps it ignored, so a stop meant to reach it sends SIGTERM. A non-interactive shell starts a background child that way. - **A write to persistent state goes to a temporary path beside the target, then is renamed over it.** An interrupt then leaves the old content or the new, never a mix of both. A store with transactions of its own, such as an SQLite database, is written through those instead. A rename over an open database can corrupt it. -- **An interrupted script prints one line naming the signal, with no traceback, and exits 130 for SIGINT or 143 for SIGTERM.** Each status is 128 plus the signal number, the status a shell reports for a process that signal ended. +- **An interrupted script prints one line naming the signal, with no traceback, and ends by re-raising the signal.** The signal then ends the process, so a shell reports 130 for SIGINT or 143 for SIGTERM, 128 plus the signal number. At Ctrl-C, a calling shell's loop then stops rather than starting its next iteration. A script calling `exit 130` has not died by the signal, so that loop reads an ordinary non-zero exit and runs on. A launcher between them, such as `uv run`, exits with the status rather than dying by the signal, so that loop runs on there too. - **A script takes this rule when it is created or next edited.** An existing script is not edited for this rule alone. -- **A script that holds a lock, temporary state, or a child process owes a test that signals it mid-run.** The test sends SIGINT or SIGTERM, then asserts the matching exit status and that nothing the script held remains. It is skipped on Windows, which cannot deliver either signal for a script to handle. A script holding none of these owes no such test. +- **A script that holds a lock, temporary state, or a child process owes a test that signals it mid-run.** The test sends SIGINT or SIGTERM, then asserts that the script died by that signal and that nothing it held remains. It starts the script with its interpreter directly, since a launcher such as `uv run` hides the signal death. It is skipped on Windows, where a test has no way to send SIGINT or SIGTERM to the process it started. A script holding none of these owes no such test. +- **A script that ends by `exec`-ing its long-running process owes no interrupt handling for that process.** The `exec` replaces the script, so a signal reaches the process directly. A background child the script starts to outlive the `exec` is handed across it, and the script neither stops it nor waits for it. Such a child is handed across only where something else stops it, such as a container's teardown of its whole process tree. Anything else the script holds is released before the `exec`. A script that holds nothing else at any point before the `exec` owes no trap and no signal test. As PID 1, such as a container's entrypoint, it ignores a SIGTERM that arrives before the `exec`, so a stop waits for its timeout. @@ -111,8 +117,9 @@ This applies to every Bash and Python script. `CODESTYLE.md` "Interrupts in Pyth -- **Cleanup of temporary paths and locks runs in the script's `EXIT` trap.** Bash runs that trap when SIGINT or SIGTERM ends the script, as well as on a normal exit. -- **Every script sets an `INT` trap and a `TERM` trap, which stop its children and keep the status.** Each one sends SIGTERM with `kill` to the children the script started, then waits for them with `wait`. It then prints the line `CODESTYLE.md` "Interrupts" requires and exits 130 or 143. The children's process IDs are held in an array, such as `pids`, set to `()` before the traps are set. A trap skips the `kill` and the `wait` while `${#pids[@]}` is 0, a test `set -u` allows on an empty array in every Bash version. Under `set -u`, an unset one would end the trap before the line prints. The `kill` takes `2>/dev/null`, since a child that already exited makes it print an error. Both take `|| :`, since under `set -e` a non-zero status from either ends the trap before the line prints. SIGTERM is the signal sent because a background child ignores SIGINT. Other cleanup stays in the `EXIT` trap. -- **A long-running external command runs in the background, and the script waits for it with `wait "$pid"`, so its exit status reaches `set -e`.** Bash runs a trap only after a foreground command returns, while a trapped signal ends a `wait` at once. Only the script's own shell starts such a child. One that a subshell or a pipeline element starts never reaches the script's array or its `wait`. A background child that reads standard input takes `<&0`, since bash otherwise gives it `/dev/null`. The trap's `kill` reaches only the process `$!` names. So a function, a group, a subshell, a pipeline, or `sh -c` runs in the foreground instead. There the trap runs once the command it interrupted returns, so nothing the script started is orphaned. +- **Cleanup of temporary paths and locks runs in the script's `EXIT` trap, set before the `INT` and `TERM` traps.** Bash runs that trap when SIGINT or SIGTERM ends the script, as well as on a normal exit. Set after the `TERM` trap, it does not run when that trap's re-sent SIGTERM ends the script. +- **Every script sets an `INT` trap and a `TERM` trap, which stop its children and re-raise the signal.** Each one sends SIGTERM with `kill` to the children the script started, then waits for them for at most a bound, such as 10 seconds. A child that ignores SIGTERM would otherwise hold the trap, so at Ctrl-C the script would hang. It polls them with `kill -0`, which succeeds while any of them still runs, and runs `sleep 0.1` between polls. Where one still runs at the bound, it sends SIGKILL to them with `kill -s KILL`. Then `wait "${pids[@]}"` reaps them. A bare `wait` would also wait on every process substitution, which the bound never reaches. It then prints the line `CODESTYLE.md` "Interrupts" requires. Last, it clears its own trap with `trap - INT` or `trap - TERM` and re-sends the signal to the script with `kill -s INT "$$"` or `kill -s TERM "$$"`. It ends with `exit 130` or `exit 143`, which runs only where the re-sent signal does not end the script, such as PID 1 in a container. The children's process IDs are held in an array, such as `pids`, set to `()` before the traps are set. Each child's ID is stored at an index that only increases, as `pids[n]=$!` then `n=$((n + 1))`, with `n` starting at 0. Once the script's own `wait` on that child returns, `unset 'pids[i]'` removes its ID, `i` being the index it was stored at. The array's length cannot stand in for `n`, since an `unset` leaves the array sparse. A trap then never signals a process ID the system may have reused. A trap skips stopping the children while `${#pids[@]}` is 0, a test `set -u` allows on an empty array in every Bash version. Under `set -u`, an unset one would end the trap before the line prints. Each `kill` sent to the children takes `2>/dev/null`, since a child that already exited makes it print an error. Each `kill` but the polling one takes `|| :`, and so do the `sleep` and the `wait`. Under `set -e`, a non-zero status from any of them would end the trap before the line prints. A second Ctrl-C ends the `sleep` with one. The polling `kill -0` is the loop's condition, which `set -e` does not read. SIGTERM is the signal sent because a background child ignores SIGINT. Other cleanup stays in the `EXIT` trap. A script that the `exec` case in `CODESTYLE.md` "Interrupts" frees from owing a trap sets neither trap. +- **A long-running external command runs in the background, and the script waits for it with `wait "$pid"`, so its exit status reaches `set -e`.** Bash runs a trap only after a foreground command returns, while a trapped signal ends a `wait` at once. Only the script's own shell starts such a child. One that a subshell or a pipeline element starts never reaches the script's array or its `wait`. A background child that reads standard input takes `<&0`, since bash otherwise gives it `/dev/null`. The trap's `kill` reaches only the process `$!` names. So a function, a group, a subshell, a pipeline, or `sh -c` runs in the foreground instead. There the trap runs once the command it interrupted returns, so nothing the script started is orphaned. A launcher, such as `uvx`, `uv run`, `uv pip install`, `dotnet`, or `xargs`, may run in the foreground too. One that does not stop the tool it starts on SIGTERM must run in the foreground. `uv pip install` is one when it builds an editable install or an sdist through a build backend that outlives uv on SIGTERM. A background child starts with SIGINT ignored, and the tool a launcher starts inherits that. So at Ctrl-C the tool runs on until the trap's SIGTERM reaches it through the launcher. In the foreground, Ctrl-C reaches the whole process group, the tool included. A SIGTERM sent to the script alone runs its `TERM` trap only once that foreground command returns. So a stop that must be prompt signals the process group. That group holds only the script and its command where the script leads it, as `setsid` starts one. The `exec` case in `CODESTYLE.md` "Interrupts" is the exception. The process a script `exec`s into replaces it, and a child handed across that `exec` is not waited for. +- **A deliberately POSIX `#!/bin/sh` script, such as a git hook, adapts the bullets above to what dash lacks.** Dash runs no `EXIT` trap when the re-sent signal ends the script. So the `INT` and `TERM` traps release the temporary paths and locks themselves, and the `EXIT` trap still covers an ordinary exit. A `/bin/sh` that is bash runs the `EXIT` trap after the signal trap too. So a release that cannot run twice, such as a lock's, sets its variable back to `""`. POSIX sh has no arrays, so the script runs one background child at a time. It holds that child's process ID in a scalar, such as `child`, set to `""` again after its `wait`. Every variable a trap reads, `child` and each temporary path included, is set to `""` before the traps are set. Under `set -u`, an unset one would end the trap before the signal is re-sent. A trap skips the child's `kill` and `wait` while `[ -n "$child" ]` fails, and skips the removal of a path still empty. diff --git a/.github/skills/standup-a-repo/SKILL.md b/.github/skills/standup-a-repo/SKILL.md index 0bfa9e3..323ec16 100644 --- a/.github/skills/standup-a-repo/SKILL.md +++ b/.github/skills/standup-a-repo/SKILL.md @@ -28,10 +28,11 @@ cold-start self-test. ## Before starting -Read STANDUP.md section 0A first. Nothing in this procedure creates the GitHub repository, its -App, or its secrets. Each is an outward-facing write that needs the maintainer's explicit permission -and inputs. So hand that checklist over before step 1 rather than discovering the gap partway -through. A repo with no remote is not partially stood up, it is not started, and only the +Read STANDUP.md section 0A first. Nothing in this procedure creates the GitHub repository or +installs its App. Each is an outward-facing write that needs the maintainer's explicit permission +and inputs. Only the maintainer can supply a repository-scoped secret's value file, which section +4 reads to set both secret stores. So hand that checklist over before step 1 rather than +discovering the gap partway through. A repo with no remote is not partially stood up, it is not started, and only the maintainer can supply what section 0A lists. ## Apply, in order @@ -42,14 +43,25 @@ maintainer can supply what section 0A lists. under the wrong identity or unsigned cannot be cleanly repaired afterward. 2. **Branches, before the first standup commit.** STANDUP.md section 0B: create `main` and - `develop` empty, off one signed empty root commit, then run every step below on a feature + `develop` empty, off one signed empty root commit. Then run each later target-repository step on a feature branch off `develop`. Never commit standup work directly onto `develop`. `non_fast_forward` on both branch payloads, or the missing blocking rule on an operational repo's `develop` ruleset, - makes that mistake either unrecoverable or silently unprotected. + makes that mistake either unrecoverable or silently unprotected. Point `origin` at the + repository once it exists. Push `main` and `develop` before step 6, since `scripts/carry.py` + needs `origin/develop`. The fleet's agent-safety kit refuses a commit, a push, and a + `git checkout -b` in the primary checkout a fresh `git init` makes. So in a session running + it, the branch block and the seed push are the maintainer's hand-over. Once the repository + exists, hand the maintainer section 0B's block through `git branch develop`. Read its + identity and signing output per step 1 before anything is pushed. Then hand over + `git remote add origin ""` and `git push -u origin main develop`. Wait for the push to + land. Then create the feature branch as a linked worktree with + `git worktree add -b "" "" develop`. Later work on the target repository runs there. Hub commands run from a clean hub checkout. 3. **Classify and catalog.** STANDUP.md section 1: resolve the repo's type(s) against `AUDIT.md` section 2, then write or repair its `registry/repos.json` entry and confirm it with - `spec/validate.py`. + `spec/validate.py`. The entry and its `SHORT_NAME_PINS` pin are hub edits, so they land + through a hub pull request into `develop`. Step 6 waits for it to merge, since `scripts/carry.py` + refuses a repository the fetched hub's registry does not hold. 4. **The instruction set, before authoring anything.** STANDUP.md section 1A. An existing repository that `docs/eol-lf-rollout.md` "Per-Repo Conversion" says needs a line-ending @@ -58,13 +70,13 @@ maintainer can supply what section 0A lists. audit finding naming paths `develop` is behind on calls for a re-level of `develop` before the conversion, per STANDUP.md section 1A. So does a hand comparison showing `main` content `develop` lacks, for a finding too large to classify or a path changed - on both branches. Then carry `CLAUDE.md`, + on both branches. Then carry `AGENTS.md`, `GOVERNANCE.md`, `CODESTYLE.md`, `WORKFLOW.md` and `AUDIT.md`, adapted rather than cloned for the ones that describe a repo, plus `.markdownlint-cli2.jsonc` and `cspell.json`. A downstream `AUDIT.md` is the short, repository-scoped form that says how the - repository reaches the hub for its audit and configuration check. `CLAUDE.md` is the fixed, verbatim `@AGENTS.md`-import file that gets - `AGENTS.md` into a Claude Code session's context at all. It is a separate baseline entry from - `AGENTS.md` itself, so carrying one without the other still leaves that provider unconfigured. + repository reaches the hub for its audit and configuration check. Write it from + `catalog/snippets/configs/AUDIT.md`, filling each placeholder `spec/files.json` declares for it. + No `CLAUDE.md` is carried, since Claude Code reads `AGENTS.md` itself. Read `CODESTYLE.md` and the `GOVERNANCE.md` documentation-style rules before writing any repo content of your own, the same window-closes shape as signing in step 1. @@ -87,16 +99,17 @@ maintainer can supply what section 0A lists. 8. **Settings, rulesets, and secrets.** STANDUP.md section 4: confirm the remote and the GitHub repository agree before running anything else here. Then run - `repo-config/configure.sh check owner/repo release` (substitute `operational` for an + `repo-config/configure.sh check "/" release` (substitute `operational` for an operational repo) from the hub at `main`. Use the hub at `develop` instead while the repo's registry entry has merged there but not yet reached `main`. A non-zero exit there means drift - was found, not a command failure. Review what it reports. Then run the same command's `apply` subcommand, never from a hand-built or carried copy. It + was found, not a command failure. Review what it reports. Where the repo is public, the first public-interaction limit follows `STANDUP.md` section 4's pilot-first rule. Then run the same command's `apply` subcommand, never from a hand-built or carried copy. It idempotently reconciles the repo to the full committed configuration regardless of what `check` reported. 9. **Verify with the audit.** STANDUP.md section 5: run `AUDIT.md` end to end. The repo is stood up only when it passes for its type, or a hub-committed `reports//audit.md` - plus an issue tracks its residual deltas. `` there is the repository name in lowercase. + plus an issue tracks its residual deltas. `AUDIT.md` section 8 defines `` there. + The report lands through a hub pull request of its own into `develop`. ## Onboarding a new repo type @@ -109,8 +122,9 @@ context-free agent, not just by the one that wrote it. ## Ship it -One pull request per standup, branched from `develop` per step 2 above, into `develop`, never a -direct push to a protected branch. While its instruction set is partial, a partly +One target-repository pull request per standup, beside the hub pull requests steps 3 and 9 name. +It is branched from `develop` per step 2 above, into `develop`, never a direct push to a +protected branch. While its instruction set is partial, a partly stood-up repository takes this same shape. That is any re-level and conversion pull requests, then one standup pull request. `RESYNC.md` section 6 applies once the set is whole. Close the review loop, per the `pr-review-conduct` skill, diff --git a/.github/skills/update-host/SKILL.md b/.github/skills/update-host/SKILL.md index a0ddfe9..25b1055 100644 --- a/.github/skills/update-host/SKILL.md +++ b/.github/skills/update-host/SKILL.md @@ -39,14 +39,14 @@ Each Windows command stops on a failed download, so a stale earlier copy of the ## What the Setup Does -1. Upgrades the coding-agent tools already installed, and adds none. +1. Upgrades the coding-agent tools already installed, and adds none. A failed upgrade does not stop the later steps. Once they finish, the setup names the tools as not current and exits non-zero. 2. Installs the fleet skills for Codex, opencode, and Claude Code, from a tree the bootstrap keeps. 3. Installs the Claude Code safety kit where Claude Code is present, and skips it with a line saying so where it is not. 4. Writes the host-wide rules to the global instruction file of each of Codex and opencode that is installed. A Codex `AGENTS.override.md` that is not blank takes precedence over that file, so the status reports it as SHADOWED and the setup warns. Neither touches the override. ## Report It -Report each step's status as the output states it, in the order above, and name every step the status run lists as not current. Then say plainly: +Report each step's status as the output states it, in the order above, and name every step the status run lists as not current. The status lists the agent tools without judging them, so also name each tool the setup run reported as failed or skipped, with its reason. Then say plainly: - Restart agent sessions to load the new hooks and rules. A running session keeps what it started with. - Codex and opencode get the rules but no hooks yet. No hook guards their sessions yet, so those sessions are not mechanically guarded. diff --git a/.github/skills/upstream-contribution-workflow/SKILL.md b/.github/skills/upstream-contribution-workflow/SKILL.md index 642a2ba..d222020 100644 --- a/.github/skills/upstream-contribution-workflow/SKILL.md +++ b/.github/skills/upstream-contribution-workflow/SKILL.md @@ -2,16 +2,16 @@ name: upstream-contribution-workflow description: >- Governs how the maintainer contributes to a third-party repository he does not control, distinct - from the fleet's own branching model: a dirty work branch on his fork for the work and review - iteration, its fork-internal PR kept open and never merged, squashed once clean to a second branch - carrying only the intended history, that clean branch opened as the upstream PR, and reviewer - feedback applied to the dirty branch first, then re-squashed. Use this whenever about to open a + from the fleet's own branching model: a dirty work branch on his fork for the iteration, its + fork-internal PR kept open and never merged, squashed once clean to a second branch carrying only + the intended history, that clean branch opened as the upstream PR, and reviewer feedback applied + to the dirty branch first. Use this whenever about to open a pull request against a repository outside the ptr727 fleet, whenever forking a third-party project to contribute, whenever an upstream reviewer requests changes on a PR opened this way, whenever a fork-internal iteration PR looks ready to merge or close, whenever the upstream base branch moves - under a contribution in flight, and whenever choosing an issue or PR template for such a - repository. Triggers regardless of the target repo's own type or workflow model, whose conventions - this skill never assumes match the fleet's. + under a contribution, whenever an upstream's CI rejects merge commits or it forbids + rewriting a published PR, and whenever choosing such a repository's issue or PR template. + Triggers regardless of the target repo's type or workflow model, never assumed to match the fleet's. --- # Upstream Contribution Workflow @@ -56,10 +56,10 @@ fleet's internal model so the two are never conflated. required-check history a rewrite would orphan. That rule stays absolute there, with no exception. It has no jurisdiction here**. That is because this clean presentation branch lives on the maintainer's own fork, outside the fleet entirely, and carries nobody's work but this squash. Force-with-lease - is scoped just as tightly regardless. It applies only to this one branch, only on the maintainer's own fork, - and never to the dirty work branch. That branch is the append-only iteration log this whole workflow exists - to preserve. If force-with-lease is ever refused or unavailable, open a fresh PR from a newly - named clean branch rather than fighting the push. + is scoped just as tightly regardless. It applies only to this one branch, only on the maintainer's own fork. The dirty work branch takes it only in the one case "The iteration PR is never merged" below names. That branch is the append-only iteration log this whole workflow exists to preserve. **Each force-with-lease push still waits for the maintainer's explicit, current go-ahead.** Force-pushing is an irreversible step that stays his, per `GOVERNANCE.md` "Communicating with the User", and this skill decides only where one may happen. If the clean branch's force-with-lease push is refused or unavailable, open a fresh PR from a newly + named clean branch rather than fighting the push. A dirty-branch lease push that is refused or unavailable never takes this route. "The iteration PR is never merged" below says what it takes instead. + + **Where the upstream forbids rewriting a published pull request branch, keep the clean branch append-only instead.** Its contribution guidelines or its reviewers say so. Commit each round's change on top of the clean branch as a new commit, and push it without force. The squash then happens through the upstream's own squash merge, never as a rewrite of the published branch. Where the upstream does not squash on merge and wants one commit, stop and ask the maintainer for an approved route. On every other upstream, the re-squash above is unchanged. **The dirty branch is always the working copy. The clean branch is always the presentation copy.** Never reverse this: never iterate directly on the branch that's open against upstream, and never @@ -75,17 +75,49 @@ iteration PR is the place where upstream drift is absorbed and its fallout fixed upstream PR has to absorb that drift. So merging or closing the iteration PR removes that place. When the upstream base moves, sync the mirror branch from upstream and merge the mirror branch into -the dirty branch. In that case, also fix whatever breaks in the iteration PR. Bringing the mirror branch in is a merge rather than a rebase, -since the dirty branch is append-only and is never force-pushed. Then re-squash onto the new mirror -tip whenever the clean branch needs to follow, per step 5. +the dirty branch. In that case, also fix whatever breaks in the iteration PR. Bringing the mirror branch in is a merge rather than a rebase, since the dirty branch is append-only. A dirty branch stacked on another takes the lower branch's changes the same way. Then re-squash onto the new mirror tip whenever the clean branch needs to follow, per step 5. An append-only clean branch, per step 5, has no recorded way to follow a moved base. So stop and ask the maintainer before it follows one. Stop too before it takes a round from a dirty branch that has merged the moved mirror, since that round carries upstream's code. + +**Where the upstream's own CI rejects merge commits, rebase the dirty branch instead.** Such a check fails any pull request whose commits include a merge, and stops the rest of the upstream's checks from running. So a merge there costs the iteration PR the CI coverage it exists to provide. The rebase applies only in that case, and only to the dirty branch on the maintainer's own fork. Rebase it onto the mirror branch. On a stack, rebase the lower branch first. Then move the upper branch with `git rebase --onto "" "" ""`, its old head read from the lower branch's backup. Before each rebase, push the branch's old head to a named backup branch on the fork, and confirm the fork holds it. That backup keeps the replaced iteration log readable. A rebase also drops every merge commit, and with it any manual edit or conflict resolution the merge held. The chain below stops after the rebase where the old head carried one. Read each with `git show --remerge-diff ""` and reapply what it holds beyond the sync, or stop and ask the maintainer. Then run only the lease push. Otherwise push the rebased branch with `--force-with-lease`, pinned to that old head, under the go-ahead step 5 requires: + +```sh +old=$(git rev-parse --verify work/x) && bak=refs/heads/backup/work-x-1 && + git push origin "$old:$bak" && + { [ "$(git ls-remote origin "$bak" | cut -f1)" = "$old" ] || { echo "backup not confirmed: $bak" >&2; false; }; } && + git rebase "$mirror" work/x && + { merges=$(git rev-list --merges "$mirror..$old") && [ -z "$merges" ] || { echo "merge scan failed or the rebase dropped merge commits, read each with git show --remerge-diff" >&2; false; }; } && + git push --force-with-lease="work/x:$old" origin work/x +``` + +PowerShell equivalent: + +```powershell +if (-not $mirror) { throw 'set $mirror to the mirror branch first' } +$old = git rev-parse --verify work/x +if ($LASTEXITCODE -ne 0) { throw 'branch not found: work/x' } +$bak = 'refs/heads/backup/work-x-1' +git push origin "${old}:$bak" +if ($LASTEXITCODE -ne 0) { throw "backup push failed: $bak" } +if ("$(git ls-remote origin $bak)".Split("`t")[0] -ne $old) { throw "backup not confirmed: $bak" } +git rebase $mirror work/x +if ($LASTEXITCODE -ne 0) { throw 'rebase stopped, resolve it before pushing' } +$merges = git rev-list --merges "$mirror..$old" +if ($LASTEXITCODE -ne 0) { throw 'merge scan failed, so the check did not run' } +if ($merges) { throw 'the rebase dropped merge commits, read each with git show --remerge-diff' } +git push --force-with-lease="work/x:$old" origin work/x +if ($LASTEXITCODE -ne 0) { throw 'lease push refused: work/x' } +``` + +Set `mirror` to the mirror branch's name first. Number the backup branch per rebase, raising the suffix each time, so a later rebase never overwrites an earlier backup. Stop where the confirmation fails, since the force-push would then leave the old head on no remote branch. Where the rebase stops on a conflict, resolve it and run `git rebase --continue`. Then read the old head back from the backup branch with `git ls-remote origin ""`. The merge check did not run in that case, so run `git rev-list --merges "$mirror.."` with that value. A scan that exits non-zero checked nothing, so fix its cause and rerun it before anything else. Read any merge it names, as above. Where the merge check stops the chain instead, first fix a failed scan's cause and rerun it. Then read and reapply any merge it names. Run only the lease push, pinned to the old head. + +A lease push that fails, or that the fork does not allow, stops the chain. Re-fetch with `git fetch origin`. A fetch that fails leaves `origin/work/x` stale, so stop and report that rather than comparing against it. Then list the fork's branch against the old head with `git log --oneline --left-right "...origin/work/x"`. Read the old head back from the backup branch as above. A `>` entry is a commit the fork gained that the rebase never saw, so the fork moved under you. `<` entries alone are old-head commits the fork's branch lacks now, such as ones never pushed or ones a reset dropped. An empty list means the push failed for another reason, such as a fork refusing force pushes or a failed connection. Whatever the list shows, stop and ask the maintainer, showing it. Never push the branch again in the meantime. A repeat of the pinned push is refused again. An unpinned `--force-with-lease` after that fetch, or a bare `--force`, overwrites whatever the fork gained. Never open a fresh pull request from a new dirty branch either, since that drops the iteration log this workflow keeps. The rebased local branch and the backup branch both stay as they are until he answers. For example, the fork's mirror branch and upstream both sit at commit `A`, with the iteration PR from `work/x` into the mirror branch green. Upstream advances to `B`. The fork syncs its mirror branch to `B`, merges `B` into `work/x`, and fixes the breakage in the iteration PR. Had `work/x` been merged into the mirror branch at `A`, the mirror branch could not have fast-forwarded to `B`. -The contribution ends when upstream merges or declines the upstream PR. Only then close the -iteration PR, unmerged, and delete the dirty and clean branches. A merged change then reaches the +The contribution ends once the PR of every clean branch the dirty branch feeds is merged or +closed, with no slice left to cut. Only then close the iteration PR, unmerged, and delete the dirty and clean branches. Leave each backup branch for the maintainer to delete. A merged change then reaches the mirror branch through the next sync from upstream, the same way anyone else's change does. ## Use the upstream repo's own conventions, not the fleet's diff --git a/.github/skills/workflow-ci-contract/SKILL.md b/.github/skills/workflow-ci-contract/SKILL.md index 40a9d59..2875f29 100644 --- a/.github/skills/workflow-ci-contract/SKILL.md +++ b/.github/skills/workflow-ci-contract/SKILL.md @@ -42,6 +42,6 @@ A workflow-only change is not smoke-built, and actionlint still runs on it in CI **actionlint discovers `.github/workflows/` recursively, both extensions, and opens no action file on its own.** It reaches a local action's `action.yml` only through a workflow's `uses: ./`, wherever in the tree that path leads. It reports everything it finds there against the calling workflow. That covers the caller's `with:` block against the action's declared inputs and the caller's `steps..outputs.` against its declared outputs. It covers the action's own `name`, top-level `description` and `runs.using` too. A missing per-input `description` and an unexpected top-level key are the metadata it does not reach that way. Pointing it at an action file directly makes it parse the file as a workflow and report several syntax-check errors. Widening its file list is therefore not available. **Where no workflow in the repository names the action, actionlint reaches it not at all**. That is the ordinary shape for a repository whose hooks are invoked from a hub reusable workflow rather than from a workflow of its own. -**A schema check covers the action file itself.** It is `check-jsonschema`'s `vendor.github-actions` builtin, run by the repo gate's `composite-actions` check as `uvx check-jsonschema@latest --builtin-schema vendor.github-actions -- `. It reads every tracked `action.yml` and `action.yaml` under `.github/actions/`, whether or not a workflow references it. It reaches the structure and the keys rather than the caller's contract. The schema and actionlint disagree on some keys. The schema accepts `runs.using: node16`, which actionlint rejects as an invalid runner. A green schema run therefore says nothing about what GitHub currently accepts. An action file outside `.github/actions/` keeps actionlint's caller check and gets no schema check at all. +**A schema check covers the action file itself.** It is `check-jsonschema`'s `vendor.github-actions` builtin, run by the repo gate's `composite-actions` check as `uvx check-jsonschema@latest --builtin-schema vendor.github-actions -- ""`, with every tracked action file passed as its own argument. It reads every tracked `action.yml` and `action.yaml` under `.github/actions/`, whether or not a workflow references it. It reaches the structure and the keys rather than the caller's contract. The schema and actionlint disagree on some keys. The schema accepts `runs.using: node16`, which actionlint rejects as an invalid runner. A green schema run therefore says nothing about what GitHub currently accepts. An action file outside `.github/actions/` keeps actionlint's caller check and gets no schema check at all. **Neither of those reads a composite action's `run:` bodies or its `if:` expressions.** Measured on a referenced action with a malformed `if:` and an unterminated shell `if` in a `run:` block, both pass it. The `composite-actions` check therefore also runs shellcheck over each bash or sh `run:` body. It replaces every `${{ }}` expression with a placeholder first. A broken `if:` expression still surfaces only when a run executes it. diff --git a/.github/skills/workflow-ci-contract/references/architecture.md b/.github/skills/workflow-ci-contract/references/architecture.md index d3575a6..d887558 100644 --- a/.github/skills/workflow-ci-contract/references/architecture.md +++ b/.github/skills/workflow-ci-contract/references/architecture.md @@ -22,13 +22,13 @@ flowchart LR ```mermaid flowchart LR edit[direct signed commit] -->|advisory CI| develop - pr[pull request] -->|lint CI, reported not required| develop - develop -->|merge commit, enforced lint CI| main + pr[pull request] -->|validation CI, reported not required| develop + develop -->|merge commit, enforced validation CI| main ``` The direct commit is an **allowance, not a substitute for review**. The ruleset drops the pull-request *requirement*, which permits a direct push without withdrawing the pull request. So a change worth reviewing still takes one, and both paths reach `develop` legally. Which changes those are is stated as a shape rather than a line count in `GOVERNANCE.md` "Operational Repositories". That section owns the test and is the one place it is written, since nothing in a ruleset can apply it. What differs is when validation lands. On the direct-commit path the commit is already on the branch, so CI can only be advisory after the fact. That is the accepted cost of the model. On the pull-request path the change has not landed, so validation is pre-merge and actionable, the moment it is worth the most. The lint workflow's `pull_request` trigger therefore filters no base branch (`WORKFLOW.md` section 6). That is what makes **D1.2** hold here, since its input is *any* PR and the operational model is no exception. The check is reported on a `develop` PR rather than required. That is because a required status check on `develop` binds the direct push too, and would dissolve the allowance the model is built on. -Their CI is lint/validation only: editorconfig/EOL plus domain linters such as Home Assistant or ESPHome config validation or a firmware build, but **no unit tests**. So the D-guarantees in `WORKFLOW.md` section 4 that assume a build/test pipeline are **N/A** exactly as for `source-only` (`WORKFLOW.md` section 6). What binds is the promotion gate and the source-only release on manual dispatch (`releaseTrigger: dispatch-only`, tag + source zip). At the promotion gate, the `develop -> main` PR must pass the required `Check pull request workflow status job`. Branch-model rulesets are specified in `GOVERNANCE.md` "Branching Model" rather than in `WORKFLOW.md`. +Their CI is lint/validation: editorconfig/EOL plus domain linters such as Home Assistant or ESPHome config validation or a firmware build. It runs **no unit tests** unless the repo carries a .NET test project or a Python suite the validator runs. Tests that its own validate hook or a replacement validator runs count too. A suite in a directory the validate call names in `python-directories` is one it runs. The declaration decides what the validator gates, per D1.2. With no tests for a type, the build/test D-guarantees in `WORKFLOW.md` section 4 are **N/A** for it, as for `source-only` (`WORKFLOW.md` section 6). Where it has tests, the `csharp` or `python` guarantees they bring apply as in any other repo, D1.6 included. That holds whether or not it declares `python-directories`. What binds either way is the promotion gate and the source-only release on manual dispatch (`releaseTrigger: dispatch-only`, tag + source zip). At the promotion gate, the `develop -> main` PR must pass the required `Check pull request workflow status job`. Branch-model rulesets are specified in `GOVERNANCE.md` "Branching Model" rather than in `WORKFLOW.md`. ### Two Layers: Orchestration vs Build @@ -44,9 +44,10 @@ A target contributes a file to the GitHub release by uploading a workflow artifa flowchart LR dotnet[dotnet-publish] -->|release-asset-BRANCH-dotnet-publish| store[(run artifacts)] nuget[build-nuget] -->|release-asset-BRANCH-nuget| store + pypi[build-pypi] -->|release-asset-BRANCH-pypi| store store -->|pattern + merge-multiple| rel["github-release job (D6)"] nuget -->|nuget-build-BRANCH| pub["publish-TARGET job in the repo's own publisher"] - pypi[build-pypi] -->|pypi-build-BRANCH| pub + pypi -->|pypi-build-BRANCH| pub pub -->|push| registries[(registries)] docker[build-docker] -->|push| registries ``` @@ -86,7 +87,7 @@ flowchart TD ### Release Model -Each publish builds a **single branch**, the trigger ref (`main` a release, `develop` a prerelease). So there is no branch matrix, and `github.ref` always names the built branch. A **human merge never auto-publishes**. A `plan` job (`publish-plan-task.yml`) decides once, and a job downstream of it either gates on its outputs or inherits the skip through `needs:`. A run publishes on a **code-affecting bot push to `main`**. The App merges every Dependabot/codegen PR, so `github.actor` gates that push. The publisher's own `on.push.paths` list also drops a non-substantive change like an Actions bump. A run also publishes on a **manual dispatch** of `main`/`develop`, or on a **main-only weekly schedule** (Docker, to refresh the base image). The `push` is main-only, so a develop bot merge publishes nothing (its prerelease comes via dispatch). A **source-only** repo publishes on **dispatch only**. Every release is a tag on the built commit plus a source archive, README, and LICENSE. Targets amend it with `release-asset-*` files. A registry push contributes none, and is made by the Docker leaf for an image and by the separate `publish-` job for a package. An unchanged version cuts no second release on a schedule or push trigger, while a dispatch refreshes it (D4.4). Docker re-pushes by design. +Each publish builds a **single branch**, the trigger ref (`main` a release, `develop` a prerelease). So there is no branch matrix, and `github.ref` always names the built branch. A **human merge never auto-publishes**. A `plan` job (`publish-plan-task.yml`) decides once, and a job downstream of it either gates on its outputs or inherits the skip through `needs:`. A run publishes on a **code-affecting bot push to `main`**. The App merges every Dependabot/codegen PR, so `github.actor` gates that push. The publisher's own `on.push.paths` list also drops a non-substantive change like an Actions bump. A run also publishes on a **manual dispatch** of `main`/`develop`, or on a **main-only weekly schedule** (Docker, to refresh the base image). The `push` is main-only, so a develop bot merge publishes nothing (its prerelease comes via dispatch). A **source-only** repo publishes on **dispatch only**. **Every repository whose registry `status` is `cataloged` releases**, whatever its types. Every release is a tag on the built commit plus a source archive, README, and LICENSE. Targets amend it with `release-asset-*` files. A registry push contributes none, and is made by the Docker leaf for an image and by the separate `publish-` job for a package. An unchanged version cuts no second release on a schedule or push trigger, while a dispatch refreshes it (D4.4). Docker re-pushes by design. ```mermaid flowchart TD @@ -102,10 +103,10 @@ flowchart TD Pick each output's path by **where the artifact goes**: - **File on the GitHub release** (zip, binary, packaged library): one leaf per output uploading `release-asset--`. For a repo calling the hub-hosted task, the path is instead the files its `build-release-asset` hook writes, which the task uploads as one such artifact. The repo keeps `expect_release_assets: true` (its default). -- **Package-registry push** (NuGet, PyPI): the leaf builds and uploads a build artifact (`nuget-build-` / `pypi-build-`). A separate `publish-` job in the **publishing repository's own** publisher consumes it and pushes. Each registry publishes through OIDC Trusted Publishing, never a stored API key, and that push sits outside the leaf for the reasons that follow. Trusted publishing validates the OIDC token's `job_workflow_ref` claim, which names the workflow the job actually ran from. So a push made from a reusable workflow a *different* repository hosts is rejected at the token exchange. There NuGet.org answers `HTTP 401` with `does not start with //.github/workflows/`. That alone rules out a leaf another repository hosts. A leaf this repository hosts clears the claim, and the split still applies to it. That is because a called job declaring no `permissions:` runs under the calling job's whole grant. So a push anywhere inside the release task would put `id-token: write` on every job in it, rather than at the one entry point D7.2 requires. The registered trusted-publishing policy therefore names the publisher, `publish-release.yml`. PyPI additionally gates its publish job behind an environment. NuGet.org binds its policy to the workflow file rather than to an environment and needs none. NuGet's leaf also uploads a `release-asset-*` carrying the package, and PyPI contributes none. +- **Package-registry push** (NuGet, PyPI): the leaf builds and uploads a build artifact (`nuget-build-` / `pypi-build-`). A separate `publish-` job in the **publishing repository's own** publisher consumes it and pushes. Each registry publishes through OIDC Trusted Publishing, never a stored API key, and that push sits outside the leaf for the reasons that follow. Trusted publishing validates the OIDC token's `job_workflow_ref` claim, which names the workflow the job actually ran from. So a push made from a reusable workflow a *different* repository hosts is rejected at the token exchange. There NuGet.org answers `HTTP 401` with `does not start with //.github/workflows/`. That alone rules out a leaf another repository hosts. A leaf this repository hosts clears the claim, and the split still applies to it. That is because a called job declaring no `permissions:` runs under the calling job's whole grant. So a push anywhere inside the release task would put `id-token: write` on every job in it, rather than at the one entry point D7.2 requires. The registered trusted-publishing policy therefore names the publisher, `publish-release.yml`. PyPI additionally gates its publish job behind an environment. NuGet.org binds its policy to the workflow file rather than to an environment and needs none. NuGet's and PyPI's default leaves also upload a `release-asset-*` carrying the package files. - **Image-registry push** (Docker): the leaf pushes the default branch multi-arch (amd64+arm64) and any other branch `amd64`-only, and contributes no `release-asset-*`. The arm64 emulation is reserved for the released image. - **Filesystem on a host the project owns** (a static site, a config tree): the leaf builds the tree and ships it to the host. It contributes no `release-asset-*`. The transport is the repo's own. The contract fixes the rest. The deploy is a **separate `workflow_dispatch`** from the release, so a redeploy of an unchanged commit mints no tag. A host rebuild, a rollback, or proving a branch on a non-production environment then costs nothing. Its credentials come from a **per-environment GitHub Environment** rather than the repository secret store. The deploy also ends by asserting **what the host serves** rather than the transport's exit status (D4.6). Retention at the destination is bounded by a declared count, with one side recorded as owning the prune. That side is the deploy where its credential can observe the destination, and the host where that credential is deliberately write-only (D5.6). -- **No file target via the release task** (Docker-only, PyPI-only, source-only): the release is tag + source zip + README + LICENSE. The caller **MUST pass `expect_release_assets: false`** to the release task. A publisher with file targets retains the default `true`. This setting is caller-specific. The default `true` fails on `fail_on_unmatched_files` when no assets exist. A **source-only** repo also passes every `enable_*` input as false because it has no build leaf (see `WORKFLOW.md` section 6). +- **No file target** (Docker-only, source-only, or PyPI-only with a no-asset hook): the release is tag + source zip + README + LICENSE. The caller **MUST pass `expect_release_assets: false`** to the release task. A publisher with file targets retains the default `true`. This setting is caller-specific. The default `true` fails on `fail_on_unmatched_files` when no assets exist. A **source-only** repo also passes every `enable_*` input as false because it has no build leaf (see `WORKFLOW.md` section 6). `WORKFLOW.md` section 3 keeps the architecture. The `workflow-ci-contract` Skill carries this section whole as a generated include, at `.agents/skills/workflow-ci-contract/references/architecture.md` in the hub. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. diff --git a/.github/skills/workflow-ci-contract/references/d-guarantees.md b/.github/skills/workflow-ci-contract/references/d-guarantees.md index ee54e96..7496f7a 100644 --- a/.github/skills/workflow-ci-contract/references/d-guarantees.md +++ b/.github/skills/workflow-ci-contract/references/d-guarantees.md @@ -11,11 +11,14 @@ The required behaviors, organized by domain. Each is a **MUST**, and its `Output ### D1 - PR Fast-Feedback (Smoke) - **D1.1 Only changed targets build.** Input: a PR touching some targets. Output: the paths-filter marks exactly those targets and only their smoke builds run. Unchanged targets skip. A repo's own targets MUST each have a filter entry, so a touched target is never silently skipped. That entry lists paths rather than negating them, so a change matching no entry marks nothing and every smoke build skips. *Prevents: rebuilding everything, and a changed target slipping through unbuilt.* -- **D1.2 A validation job always runs.** Input: any PR. Output: a validation job runs unconditionally and the aggregator `needs:` it. That job is the caller's own job reaching the reusable validator, named `validate` in every shipped stub. That name is what the aggregator's `needs:` carries. The validator's internal jobs (`test-matrix`, `lint`, `unit-test` and `validate` in the hub's `validate-task.yml`) are not addressable from a caller. So a `validate` in a caller's `needs:` list always names the caller's own job, never the validator's internal one. The validator detects the tree rather than the repo's language, so a non-.NET repo calls the same one rather than replacing it. It runs the doc and repo gates everywhere, and the `dotnet test` path only where a `*Tests*.csproj` project exists. It runs the Python path in each directory the caller declares in its `python-directories` input. Where the caller declares none and a root `pyproject.toml` is tracked, it runs that path at the root instead. At that undeclared root the test leg runs only where a `tests/` suite sits beside a `uv.lock` or `requirements*.txt`. A declared directory without `tests/`, by contrast, fails (D1.6). The declaration rather than discovery decides what is gated, since a stray or vendored `.py` file would otherwise change the gate silently. The validator warns about a tracked `.py` file no declared directory covers. It checks out the triggering commit, `github.sha`, with no `ref` input. It needs none, because a reusable workflow reads its caller's `github` context, so a publisher's call validates the same commit its publish job pins. A repo whose tests take another shape can run them from its own `.github/actions/validate/action.yml` hook, which the validator runs where that file exists. That hook receives no secret, so a repo whose other-shape tests owe D1.6's coverage upload is one whose validation the validator cannot express. A repo whose validation it cannot express **replaces** the call (not deletes it) with its own validator and re-points the aggregator's `needs:` to the replacement. `smoke-build` `needs:` the `changes` job rather than the validation job, so no second `needs:` moves with it. *Prevents: a PR merging with no validation, or a dangling `needs:` that stops the whole workflow from loading.* +- **D1.2 A validation job always runs.** Input: any PR. Output: a validation job runs unconditionally and the aggregator `needs:` it. That job is the caller's own job reaching the reusable validator, named `validate` in every shipped stub. That name is what the aggregator's `needs:` carries. The validator's internal jobs (`test-matrix`, `lint`, `unit-test`, `unit-test-dotnet` and `validate` in the hub's `validate-task.yml`) are not addressable from a caller. So a `validate` in a caller's `needs:` list always names the caller's own job, never the validator's internal one. The validator detects the tree rather than the repo's language, so a non-.NET repo calls the same one rather than replacing it. It runs the doc and repo gates everywhere, and the `dotnet test` path only where a `*Tests*.csproj` project exists. It runs the Python path in each directory the caller declares in its `python-directories` input. Where the caller declares none and a root `pyproject.toml` is tracked, it runs that path at the root instead. At that undeclared root the test leg runs only where a `tests/` suite sits beside a `uv.lock` or `requirements*.txt`. A declared directory without `tests/`, by contrast, fails (D1.6). The declaration rather than discovery decides what is gated, since a stray or vendored `.py` file would otherwise change the gate silently. The validator warns about a tracked `.py` file no declared directory covers. It checks out the triggering commit, `github.sha`, with no `ref` input. It needs none, because a reusable workflow reads its caller's `github` context, so a publisher's call validates the same commit its publish job pins. A repo whose tests take another shape can run them from its own `.github/actions/validate/action.yml` hook, which the validator runs where that file exists. That hook receives no secret, so a repo whose other-shape tests owe D1.6's coverage upload is one whose validation the validator cannot express. A repo whose validation it cannot express **replaces** the call (not deletes it) with its own validator and re-points the aggregator's `needs:` to the replacement. `smoke-build` `needs:` the `changes` job rather than the validation job, so no second `needs:` moves with it. *Prevents: a PR merging with no validation, or a dangling `needs:` that stops the whole workflow from loading.* - **D1.3 Smoke never publishes and never uploads.** Input: `smoke: true`. Output: full compile/lint/test, but no registry/image push, no release, and **no** artifact uploads. Every `upload-artifact`, including any aggregation job, is gated on smoke being false. That gate is written `!inputs.smoke` at the workflow layer and `inputs.smoke != 'true'` in a composite action, whose inputs are strings. *Prevents: a PR publishing, and orphaned artifacts churning the storage quota.* - **D1.4 Workflow-file changes are not smoke-built.** Input: a PR changing only `.github/workflows/**`. Output: the paths-filter marks no target, so smoke-build skips. An inclusion list satisfying D1.1 reaches this by leaving workflow paths out of every target's entry. *Implication: a workflow-only change is not smoke-built, but actionlint still validates it in CI.* - **D1.5 One required aggregator gates merge.** Input: any PR. Output: a single aggregator job must **succeed**. It must run under `if: always()`, so a failed or skipped dependency cannot skip the gate itself. It must also `needs:` the validation job, and the `changes` and `smoke-build` jobs too wherever the repo has a smoke build. It must treat a **skipped** smoke build as pass, and **block** on `failure`/`cancelled`. Its name is ruleset-bound: the job `name:` and the ruleset `context:` are the same string and MUST be renamed together, never independently. The workflow holding it MUST trigger on `pull_request`. A gate without a `pull_request` trigger never runs the validator's pull-request-only steps, the prose gate among them. A workflow any other event also triggers yields that name only when `github.event_name == 'pull_request'`, through an expression `name:`. Otherwise a dispatch or push run on a PR's head posts the required context without the PR run's gates. *Prevents: a paths-filter error letting a target-changing PR merge unbuilt.* -- **D1.6 Coverage is reported to Codecov (C# and Python).** Input: a C# or Python repo that has tests for that type. Output: the validation job runs those tests under coverage collection, and a `codecov/codecov-action` step uploads the report. The collection is `dotnet test --coverage --coverage-output-format cobertura --results-directory ./coverage`, leaving `--coverage-output` unset so each test project writes its own report rather than overwriting a shared one. A bare call resolves one workspace from the working directory, so it fails at a root holding none or more than one. Unless the repository root holds exactly one solution or project, the hub's validator therefore runs the collection once per tracked `*Tests*.csproj` with `--project`. It names no solution in that case, since a solution holding no test project fails the run. Or it is `pytest --cov-report=xml` in a Python directory with its own `uv.lock` or `requirements*.txt`, whose own `pyproject.toml` selects what to measure. Or it is `coverage run -m unittest discover -s tests` then `coverage xml` in a `lint-only` one. The upload is **best-effort** (`continue-on-error` and/or `fail_ci_if_error: false`), so a Codecov outage or an absent token never reds the gate. Each leg **fails its test step when the run wrote no report**. The reason is that the best-effort upload reads a missing report exactly as it reads a healthy run. A second reason is that, on the Python leg, `--cov-report=xml` alone selects nothing to measure. The C# leg renames each report to `coverage-.cobertura.xml` before the upload step reads the directory, since `codecov-cli`'s own finder does not match the default name. A repo owning its validator rather than calling the hub's owes that rename itself. `CODECOV_TOKEN` lives in the repo's **actions** and **dependabot** secret stores. The token is in the second because a run triggered by a Dependabot pull request reads the Dependabot store. Without the token there, the upload would otherwise skip silently on every bot pull request. A caller reaching the reusable validator across repositories names the secret it passes (`secrets:` with `CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}`). It does so on its pull request path and its publisher path alike. That is because `secrets: inherit` is documented for a caller in the same organization or enterprise, which a personal account is not. A call by local path stays inside one repository, where the caller's own store is the one the callee reads. So `secrets: inherit` is available there instead of naming each secret. The repo ships a **`.codecov.yml`** at the repository root. It sets the project and patch statuses to **`informational: true`**, so a coverage delta never gates a pull request. A repo whose quality bar requires a threshold may turn that off. The same file excludes intentionally-untested, non-shipped code (an example or benchmark project) from the denominator via `ignore`. Codecov reads its configuration under several names, but `.codecov.yml` is the only one the fleet accepts. So a copy under any other name is drift to rename. Coverage output is a build artifact, so `.gitignore` excludes it. The C# invocation runs under **Microsoft.Testing.Platform**, and the runner declaration, package references, and version floor an MTP-based test project needs are `CODESTYLE.md`'s .NET side. The Python invocation needs **`pytest-cov`** and a coverage selector, which are `CODESTYLE.md`'s Python side. A Python directory declared in the validator's `python-directories` input owes a `tests/` suite whatever its profile, so the validator fails one that has none. N/A for a repo carrying no tests for that type. *Prevents: coverage silently going unreported, and a coverage regression blocking an unrelated pull request.* +- **D1.6 Coverage is reported to Codecov (C# and Python).** Input: a C# or Python repo that has tests for that type. Output: the validation job runs those tests under coverage collection, and a `codecov/codecov-action` step uploads the report. The collection is `dotnet test --coverage --coverage-output-format cobertura --results-directory ./coverage`, leaving `--coverage-output` unset so each test project writes its own report rather than overwriting a shared one. A bare call resolves one workspace from the working directory, so it fails at a root holding none or more than one. The hub's validator therefore runs the collection once per tracked `*Tests*.csproj` that declares the leg's line, with `--project`, whatever the root holds. A test project left out of a root solution, or a library whose name matches the glob, is therefore a test project here. It names no solution, since a solution holding no test project fails the run. Or it is `pytest --cov-report=xml` in a Python directory with its own `uv.lock` or `requirements*.txt`, whose own `pyproject.toml` selects what to measure. Or it is `coverage run -m unittest discover -s tests` then `coverage xml` in a `lint-only` one. The upload is **best-effort** (`continue-on-error` and/or `fail_ci_if_error: false`), so a Codecov outage or an absent token never reds the gate. Each leg **fails its test step when the run wrote no report**. The reason is that the best-effort upload reads a missing report exactly as it reads a healthy run. A second reason is that, on the Python leg, `--cov-report=xml` alone selects nothing to measure. The C# leg renames each report to `coverage-.cobertura.xml` before the upload step reads the directory, since `codecov-cli`'s own finder does not match the default name. A repo owning its validator rather than calling the hub's owes that rename itself. `CODECOV_TOKEN` lives in the repo's **actions** and **dependabot** secret stores. The token is in the second because a run triggered by a Dependabot pull request reads the Dependabot store. Without the token there, the upload would otherwise skip silently on every bot pull request. A caller reaching the reusable validator across repositories names the secret it passes (`secrets:` with `CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}`). It does so on its pull request path and its publisher path alike. That is because `secrets: inherit` is documented for a caller in the same organization or enterprise, which a personal account is not. A call by local path stays inside one repository, where the caller's own store is the one the callee reads. So `secrets: inherit` is available there instead of naming each secret. The repo ships a **`.codecov.yml`** at the repository root. It sets the project and patch statuses to **`informational: true`**, so a coverage delta never gates a pull request. A repo whose quality bar requires a threshold may turn that off. The same file excludes intentionally-untested, non-shipped code (an example or benchmark project) from the denominator via `ignore`. Codecov reads its configuration under several names, but `.codecov.yml` is the only one the fleet accepts. So a copy under any other name is drift to rename. Coverage output is a build artifact, so `.gitignore` excludes it. The C# invocation runs under **Microsoft.Testing.Platform**, and the runner declaration, package references, and version floor an MTP-based test project needs are `CODESTYLE.md`'s .NET side. The Python invocation needs **`pytest-cov`** and a coverage selector, which are `CODESTYLE.md`'s Python side. A Python directory declared in the validator's `python-directories` input owes a `tests/` suite whatever its profile, so the validator fails one that has none. N/A for a repo carrying no tests for that type. *Prevents: coverage silently going unreported, and a coverage regression blocking an unrelated pull request.* +- **D1.7 A built NuGet package is consumed before it publishes.** Input: a repo whose `build-nuget` job runs the hub's default leaf, in a smoke run or a publish run alike. Output: after the leaf packs, the job restores, builds, and runs a throwaway console project against that exact `.nupkg`. It does so once per target framework the project declares. Each consumer lives outside the checkout, so the caller's `global.json` and `Directory.Build.props` do not apply. Its `nuget.config` resolves the package ID, and the ID of each sibling package in the folder holding the build output, only from that folder. Every other ID resolves from nuget.org. Its package cache is its own, so neither a cached nor a published copy can stand in for the artifact under test. The consumer loads the package assembly and calls `GetExportedTypes()`. The check asserts from `obj/project.assets.json` that the package resolved from the `lib//` folder of the consumer's own framework. It also asserts that the loaded assembly's `TargetFrameworkAttribute` matches that folder. A `netstandard` framework is consumed under the SDK line `global.json` selects, or the newest declared line where there is none. It is asserted against the folder it resolved. A framework the check does not consume is reported skipped. Examples are .NET Framework, `netcoreapp3.1`, and a platform-specific `netX.Y-windows`. The attribute row of a `netstandard` consumer resolving such a folder is skipped too. Four static assertions join them. The package's `lib//` folders equal the declared frameworks. The nuspec `` equals the build version. The nuspec holds a dependency group per framework. A symbol package exists where the project enables symbols. Every declared `netX.Y` and `netstandard` framework is consumed and reported with one summary row per assertion. A failed step ends that framework's rows rather than the run. The job fails at the end if any failed. The check covers a library package, whose assemblies sit under `lib//`. The check uploads nothing, so it honors D1.3. It runs inside the build job, so a failure blocks the publish job that `needs:` that build. A caller's own `build-nuget` hook replaces the whole leaf and is outside the check. A caller's own `.github/actions/package-consume/action.yml` runs once after the default check. It receives the declared frameworks as JSON beside the package ID, version, and package folder. *Prevents: a defect that exists only in the packed form shipping. One example is one target framework's assembly packed under every `lib//` folder while the tests, which reach the library through a project reference, stay green.* +- **D1.8 A built PyPI package is consumed before it publishes.** Input: a repo whose `build-pypi` job runs the hub's default leaf, in a smoke run or a publish run alike. Output: after the leaf builds, the job installs the wheel and, separately, the sdist into a fresh `uv venv`. It does so for each line of the `python-versions` input of `build-release-task.yml`. Empty runs the one line the root `.python-version` selects. Where there is none it runs the hub's fallback line. A caller that sets `python-versions` for both `validate-task.yml` and `build-release-task.yml` passes the same value to each. So the lines its tests run under are the lines its artifact is consumed under. Each environment lives outside the checkout. It installs the artifact, then the project's locked dependency groups from `uv.lock` without the project itself. The check asserts that `importlib.metadata` reports the version the leaf computed. It also asserts that every top-level name the installed distribution provides imports from the environment's site-packages, not the source tree. A distribution providing none, such as one of scripts only, reports that row skipped. It then runs the caller's `tests/` folder against the installed copy with pytest in `importlib` import mode. That run has the source tree off `sys.path` and the project's `pythonpath` setting cleared. Its working directory is outside the project. So the caller's suite must not read a path relative to the project root, or a tool setting read from the working directory. It must import a sibling helper as part of a package. The project directory holds its own `uv.lock`. A project with no `tests/` folder, or a run collecting no tests, is reported skipped rather than passed. Every line and artifact reports one summary row per assertion. A failed environment, install, or metadata read ends that artifact's rows rather than the run. The job fails at the end if any failed. The check uploads nothing, so it honors D1.3. It runs inside the build job, so a failure blocks the publish job that `needs:` that build. A caller's own `build-pypi` hook replaces the whole leaf and is outside the check. *Prevents: a defect that exists only in the built form shipping. One example is a module left out of the wheel while the tests, which import it from the source tree, stay green.* +- **D1.9 Each declared test line runs as its own named unit-test leg.** Input: a repo declaring .NET lines in `dotnet-versions` of `validate-task.yml`, Python lines in `python-versions`, or both. Output: each declared .NET line runs as a `Unit test job (.NET X.Y)` leg running `dotnet test --framework netX.Y` under that line's runtime. A leg runs only the tracked `*Tests*.csproj` projects declaring `netX.Y` in their `TargetFramework` or `TargetFrameworks`, read with `dotnet msbuild`, and skips and names the rest. A leg where no test project declares its line fails, so a declared line never passes by running nothing. Each declared Python line runs as a `Unit test job (Python X.Y)` leg, or as the caller's named `test-matrix` legs where it sets one. A caller declaring neither runs the one line each of `global.json` and `.python-version` selects. The hub's fallback line stands in where a file is absent. The .NET legs run only where a `*Tests*.csproj` exists. The Python legs run only where a Python directory resolves. So a repo holding one kind reports no leg of the other. Each leg uploads its own coverage report, and the .NET upload carries a per-line flag beside `dotnet`. A failing leg does not cancel its siblings. *Prevents: a failing target framework or interpreter hiding inside a combined run naming none of them. A .NET-only repo reporting a Python line it never ran is the other.* ### D2 - Input/State Validation at Entry @@ -37,7 +40,7 @@ The required behaviors, organized by domain. Each is a **MUST**, and its `Output - **D4.1 Gated single-branch publish.** Output: PRs smoke-test and publish nothing. A **human merge never auto-publishes**. A `plan` job (`publish-plan-task.yml`) decides once. A job downstream of it either gates on the plan's outputs or inherits the skip through `needs:`. A gate on an output compares it against `'true'` rather than testing it bare, since a job output is always a string. A publish runs on a **code-affecting bot push to `main`**, gated to the codegen App / Dependabot `github.actor`. On that trigger, an Actions-only bump matches no release path and publishes nothing. A publish also runs on a **dispatch** of `main`/`develop`, or on a **main-only weekly schedule** (Docker). A source-only repo publishes on dispatch only. The plan reports every `schedule` as a publish, so a publisher with no `push` trigger whose schedule retests and never publishes gates its release itself. Each of its jobs calling `build-release-task.yml` carries `github.event_name == 'workflow_dispatch'` as an `&&` term of its job-level `if:` holding no `||` or negated group. Each run builds one branch. The D4.7 supersede dispatch has one accepted, bounded window that publishes without the allowlist check. - **D4.2 Tag the built commit.** Output: the release `target_commitish` is the built commit's SHA (NBGV's `GitCommitId`), never a branch name or a separately re-resolved ref. *Prevents: the tag landing on the default branch instead of the built tree.* -- **D4.3 Release contents.** Output: every release contains a tag on the built commit plus the auto source zip, README, and LICENSE. File targets attach `release-asset-*`. The `prerelease` value equals `branch != default`. A no-file-target caller sets `expect_release_assets: false` to reach the no-asset shape. This applies to Docker-only, PyPI-only, and source-only repos. A NuGet target is not among them, since its leaf uploads a `release-asset-*` carrying the package, so a NuGet-only caller keeps the default `true`. The setting relaxes `fail_on_unmatched_files` and skips the asset download. The release-create step fails when no assets exist and the setting retains its default `true`. A source-only caller also sets every `enable_*` input false. +- **D4.3 Release contents.** Output: every release contains a tag on the built commit plus the auto source zip, README, and LICENSE. File targets attach `release-asset-*`. The `prerelease` value equals `branch != default`. A no-file-target caller sets `expect_release_assets: false` to reach the no-asset shape. This applies to Docker-only and source-only repos, and to a PyPI-only caller whose own `build-pypi` hook uploads none. A NuGet or PyPI target on the hub default leaf is not among them. That leaf uploads a `release-asset-*` carrying the package files, so such a caller keeps the default `true`. The setting relaxes `fail_on_unmatched_files` and skips the asset download. The release-create step fails when no assets exist and the setting retains its default `true`. A source-only caller also sets every `enable_*` input false. - **D4.4 No-op republish.** Input: a re-run whose version is unchanged, on a schedule or push trigger. Output: no second release is cut, because the release-create step is skipped when `gh release view` finds a release for the tag. The paired asset-delete is skipped with it. A **dispatch** re-run refreshes the release instead and runs that delete with it. That is why a dispatch-only publisher records this item's skip leg as unreachable rather than failed. Package-registry pushes are no-ops. The NuGet/PyPI publish steps are **not** statically gated on existence. They run and the **server** dedupes (`dotnet nuget push --skip-duplicate` turns a 409 into success, and PyPI does the same under `skip-existing: true`). **Docker always re-pushes** the image (base-image refresh), independently of the release-create skip, within the same run. *Prevents: duplicate releases and wasted pushes.* - **D4.5 A build failure blocks every publish target, within the Docker limit below.** Input: a real publish where one enabled build fails. Output: nothing publishes. The limit applies where a Docker target builds a shared base or more than one image. Its task then pushes the base and each image leg as it builds. So a leg failing after the base or a sibling leg pushed leaves those images in the registry with no release. `github-release` needs every build and carries the same `!failure() && !cancelled()` guard the terminal registry pusher (Docker) does. Without that guard, the implicit `success()` would skip both on every run that disables a target, rather than only on a failed one. A failed build therefore skips the release (no tag, no release). Docker, which needs every other build, skips with it (no image push). By contrast, a **disabled** target, skipped rather than failed, still lets docker push. A package target's separate publish job needs its own gate for the same reason, since it sits outside the `github-release` and Docker `needs:` chains. That gate is that it `needs:` the release-task call, so a failed build skips it with the rest. The push itself is what no gate can cover, because it runs after the whole release task and therefore after `github-release`. It runs there for the trusted-publishing reason `WORKFLOW.md` section 3's "Output Seam by Destination" package-registry bullet gives. So a rejected token exchange, a registry outage, or a trusted-publishing policy naming the wrong workflow file leaves a published release and tag. That release and tag are for a version that never reached the registry. The recovery is a re-dispatch or a full re-run rather than a cleanup. **A full re-run is always available inside its window and is the only route once the branch tip has moved.** The `Re-run failed jobs` shortcut is not a third route here, D5.2's delete having already removed the artifact it would download. `GOVERNANCE.md` "Release Model", and the skill it routes to, carry the mechanics of each route, how to choose, and the window. *Prevents: a partial publish, e.g. a Docker image pushed while .NET publish failed and no release was cut.* - **D4.6 Deploy verification names the release.** Input: a deploy to a filesystem on a host the project owns that completes without error. Output: a check against the running host asserts **which release is answering**, not merely that it answers. The artifact stamps its own version into the configuration it ships, and the check compares that against the version just installed. The check **waits for convergence to a bounded timeout** rather than sampling once. That is because content goes live the instant a pointer moves, while server rules wait on an asynchronous reload. The same check asserts **which environment** answered. That is because several environments serve a byte-identical artifact, and a proxy rule aimed at the wrong one answers healthily under the right hostname. An unreachable host is reported distinctly from an HTTP status. *Prevents: a green deploy over a host still serving the previous release's configuration, and a URL contract checked against the wrong environment. It also prevents a dead config watcher read as a routing fault.* @@ -54,7 +57,7 @@ The required behaviors, organized by domain. Each is a **MUST**, and its `Output ### D6 - Seam / Architecture Conformance -- **D6.1 Pattern handoff.** Output: the release job downloads by `pattern:`/`merge-multiple:`, not `artifact-ids:`. **File** targets upload `release-asset--`. A file target the hub-hosted task builds through the `build-release-asset` hook fills `` with `build-release-asset`. A target contributing no file to the release (Docker, PyPI) uploads no `release-asset-*` of its own, per D4.3, whatever other transfer artifact it uploads. The `pattern:` download is canonical for a single-target repo too, which does not special-case itself to `artifact-ids:`. +- **D6.1 Pattern handoff.** Output: the release job downloads by `pattern:`/`merge-multiple:`, not `artifact-ids:`. **File** targets upload `release-asset--`. A file target the hub-hosted task builds through the `build-release-asset` hook fills `` with `build-release-asset`. A target contributing no file to the release (Docker) uploads no `release-asset-*` of its own, per D4.3, whatever other transfer artifact it uploads. The `pattern:` download is canonical for a single-target repo too, which does not special-case itself to `artifact-ids:`. - **D6.2 Branch drives config.** Output: a called workflow's branch-derived config reads `inputs.branch`, never `github.ref_name`. - **D6.3 Branch-named artifacts.** Output: every artifact name carries the branch, so a branch's artifacts do not collide with another branch's. - **D6.4 Target add/drop is consistent.** Output: adding or dropping a target updates **all** of the following. The list is the `enable_` value the publisher passes to the release task, and the publisher's `on.push.paths` entries where it carries a `push` trigger. The list continues with the `changes` paths-filter entry + output and the `smoke-build` enable-forward. The list includes `expect_release_assets` where the change adds the first file target or drops the last (D4.3). For a package target, the list also includes the separate `publish-` job. A repo owning its release task also updates the target's build job there, `build-` or `dotnet-publish` for the .NET target. It also updates the target's `github-release` and `build-docker` `needs:` entries. Everything in the `github-release` job **except its `needs:` list** stays verbatim, and so does the version and publish-plan logic. "Verbatim" never reaches the surfaces this item requires editing, that `needs:` list, the release task's job list, and the paths-filter among them. *Prevents: a partial subset that startup-fails on a missing leaf or never smoke-builds a target.* @@ -68,7 +71,7 @@ The required behaviors, organized by domain. Each is a **MUST**, and its `Output ### D8 - Bots / Automation -- **D8.1 Merge-bot.** Output: the merge-bot enables auto-merge on `opened`/`reopened` for **every** Dependabot tier including semver-major. The required checks are the gate, not the bump magnitude. The merge-bot dispatches `--squash`/`--merge` by the PR's base ref, and disables on a maintainer-pushed `synchronize`. Its concurrency is keyed on the **PR number**, not `github.ref`. On `closed` it deletes a merged in-repo bot head when the caller opts in. The push leases the branch tip to the merged head, so a moved branch survives. *Prevents: two PRs colliding in auto-merge.* +- **D8.1 Merge-bot.** Output: the merge-bot merges **every** Dependabot tier including semver-major on `opened`/`reopened`, by auto-merge where required checks gate the base. The required checks are the gate, not the bump magnitude. The merge-bot arms auto-merge on a base whose rules require status checks, since those checks then gate the merge. On a base whose rules require none, it instead waits for every check run and commit status on the pinned head. It leaves out its own jobs, and it waits for at most twenty minutes, then merges the pull request directly. A failed check, a moved head, or the bound fails the job instead. A head on which no check but the merge-bot's own has posted never counts as passing. So a bot pull request that nothing else checks fails at the bound rather than merging. The merge-bot dispatches `--squash`/`--merge` by the PR's base ref, and disables on a maintainer-pushed `synchronize`. GitHub can disable an armed auto-merge with every check green, as for a merge that would write workflow content the App may not write. So the caller also triggers on `auto_merge_disabled`. A short job then answers a disable recorded under the App on a pull request the merge-bot arms. It waits for the base branch to settle, for at most five minutes, then re-arms once, pinned to the head it read. Where every check is already green, `gh` merges at once rather than arming, so a refused merge fails that job. That is visibility, not recovery. A second such disable on the same head fails the job too. A disable a person made stays in place. So does the maintainer-push disable, since the head is then not the bot's own push. So unless a person pushed to it or disabled its auto-merge, a pull request the merge-bot armed either merges or fails visibly. Its concurrency is keyed on the **PR number**, not `github.ref`. On `closed` it deletes a merged in-repo bot head when the caller opts in. The push leases the branch tip to the merged head, so a moved branch survives. *Prevents: two PRs colliding in auto-merge, and a bot pull request sitting open and green after GitHub disabled its auto-merge.* - **D8.2 CodeGen and Dependabot.** Output: codegen runs as a matrix over both branches and is deterministic from an external source. `.github/dependabot.yml` targets both branches, and security PRs go to the default branch. - **D8.3 Upstream-version tracker.** Output: a scheduled resolver prints a JSON `name -> version` object to a committed state file. It opens a rolling per-branch bump PR naming only the moved keys, and the merge-bot auto-merges it. The `main` pin push the merge-bot makes publishes via the release gate, while a `develop` pin does not auto-publish. It ships via a `develop` dispatch (prerelease) or the next promotion to `main`. The tracker's `bump-branch-prefix` + `branches` MUST match a merge-bot rule, or auto-merge silently never fires. That rule is one of the built-in `-` head/base pairs or a `rules` entry the caller passes. A tracker whose bump needs a human decision instead sets `auto-merge: false`, which prefixes the head so no merge-bot rule matches it, whatever `bump-branch-prefix` names. A `main` pin it carries then lands by a human merge, which never auto-publishes (D4.1), so it ships on the next publish. - **D8.4 An identity allowlist used as a gate fails loud.** Where a gate compares `github.actor` (or a PR author) against hard-coded bot identities, the non-matching branch **emits a `::warning::`** on an otherwise-legitimate trigger. There it does not fall through silently. Output: a run that declines to act on an unrecognized identity is visibly annotated. *Prevents: the App being renamed, replaced, or reinstalled under a new slug, after which the comparison quietly evaluates false and the gate stops firing. The result is a green and silent run that looks identical to a healthy one.* The masking matters most where a second path hides the loss. One such path is a weekly schedule that keeps publishing, so the only symptom is release *timeliness*, easily missed for months. Where the failure is self-announcing instead (the merge-bot simply stops merging, so bot PRs visibly pile up) an annotation is optional. The delete job compares the same `user.login` as the merge jobs, so a renamed App already shows as piled-up bot PRs. Resolving the identity at run time (mint an App token, read `GET /app`) removes the hard-coded string entirely. Run-time resolution is the escalation if an allowlist proves fragile in practice. diff --git a/.github/skills/workflow-ci-contract/references/test-methodology.md b/.github/skills/workflow-ci-contract/references/test-methodology.md index 804d841..4136c0f 100644 --- a/.github/skills/workflow-ci-contract/references/test-methodology.md +++ b/.github/skills/workflow-ci-contract/references/test-methodology.md @@ -14,11 +14,17 @@ Assert the structural fact each *applicable* D-guarantee implies, and record **p Most of the evidence is in the workflow files and the composite actions they reach. Where a guarantee's evidence lies outside them, in practice it lies in one of these places. They are the repo's branch ruleset, its Actions and Dependabot secret names, a workflow the repo only calls, or a project or dependency file. They also include a committed file such as `version.json`, `.github/dependabot.yml`, `global.json`, `.codecov.yml`, `.gitignore`, or `.editorconfig`. +D1.7 is read in the build job. A step after the default leaf plans the declared frameworks, then the `dotnet-sdk` action installs those runtime lines, then the consume check runs. None of them uploads. + +D1.8 is read in the build job. A step after the default leaf runs the consume check. It receives the build's computed version and the `python-versions` list. Empty becomes the one line the root `.python-version` selects, or the hub's fallback line where there is none. It uploads nothing. + +D1.9 is read in the validate task's job list. The `Build test matrix job` outputs one matrix per kind, and each unit-test job's `matrix` reads its output. The .NET job's `dotnet test` carries `--framework` for its matrix line, and the Python job holds no .NET step. Each job's `if:` reads the output that says its kind exists. + Cite what each verdict rests on. That is `file:line` for a file in the audited repo. It is the evidence's own name where a setting, a ruleset, or a secret name rather than a file is the evidence. Where the guarantee binds a workflow or composite action the audited repo only reaches, it is `/@` plus the `file:line` in that repo. The callee is read at the SHA the caller pins. An **N/A** verdict names the absent construct instead, there being no line to cite. ### 5B. End-to-End Trace Scenarios (No Execution, Deterministic from the YAML) -For each *applicable* scenario, evaluate every job's `if:`/`needs:` against the inputs. Emit the predicted **run/skip + version + release + artifact-end-state** table, then compare to the expected. A scenario governing a construct the repo does not contain is N/A, per `WORKFLOW.md` section 1, and an absent trigger is such a construct. Each scenario's trigger belongs to one workflow, so read that workflow's own `on:` block rather than the repo's type. For S1 to S4 the block is the pull request workflow's, and for S5 to S10 and S14 the publisher's. For S11 the block is the upstream tracker's, and for S12 and S13 the deploy workflow's. A publisher carrying only `workflow_dispatch` therefore records S5, S6 and S9 N/A, their push and schedule paths never firing there. A repo with no publisher at all records S5 to S10 and S14 N/A together. A publisher whose schedule never publishes, per D4.1, records the schedule paths of S7 and S9 N/A as well. Where a scenario's path runs through a workflow or composite action the repo only **calls**, trace that callee as the repo reaches it. Read it at the SHA the caller pins rather than at the callee's current default branch, which is the same evidence rule 5A states. Predicting from the callee's `main` predicts a table for YAML the audited repo never runs. A self-repository (`$/`) call or a job-level local (`./`) reusable-workflow call carries no pin of its own. It resolves at the calling workflow file's commit, so it is traced at that file's own commit. That commit is the SHA fixed by the pin that reached that file. Where that file is one of the audited repository's own workflows, it is the audited commit instead. A local (`./`) action reference carries no pin either, but it resolves against whatever the job checked out. So it is traced at that checkout's commit. That is the caller's commit where a reusable workflow called from another repository checks out its caller. Minimum set: +For each *applicable* scenario, evaluate every job's `if:`/`needs:` against the inputs. Emit the predicted **run/skip + version + release + artifact-end-state** table, then compare to the expected. A scenario governing a construct the repo does not contain is N/A, per `WORKFLOW.md` section 1, and an absent trigger is such a construct. Each scenario's trigger belongs to one workflow, so read that workflow's own `on:` block rather than the repo's type. For S1 to S4 the block is the pull request workflow's. For S5 to S10 and S14 it is the publisher's. For S15 it is whichever workflow reaches the `build-nuget` job, and for S16 the one reaching `build-pypi`. For S11 the block is the upstream tracker's, and for S12 and S13 the deploy workflow's. A publisher carrying only `workflow_dispatch` therefore records S5, S6 and S9 N/A, their push and schedule paths never firing there. A repo with no publisher lacks a construct every repo owes. So S7, S8, S10 and S14 fail there, and none is excluded from the verdict. S5, S6 and S9 turn on the `on:` block that publisher has yet to state, so each is judged once it lands. A publisher whose schedule never publishes, per D4.1, records the schedule paths of S7 and S9 N/A as well. Where a scenario's path runs through a workflow or composite action the repo only **calls**, trace that callee as the repo reaches it. Read it at the SHA the caller pins rather than at the callee's current default branch, which is the same evidence rule 5A states. Predicting from the callee's `main` predicts a table for YAML the audited repo never runs. A self-repository (`$/`) call or a job-level local (`./`) reusable-workflow call carries no pin of its own. It resolves at the calling workflow file's commit, so it is traced at that file's own commit. That commit is the SHA fixed by the pin that reached that file. Where that file is one of the audited repository's own workflows, it is the audited commit instead. A local (`./`) action reference carries no pin either, but it resolves against whatever the job checked out. So it is traced at that checkout's commit. That is the caller's commit where a reusable workflow called from another repository checks out its caller. Minimum set: | # | Input | Expected output | Exercises | | --- | --- | --- | --- | @@ -36,6 +42,8 @@ For each *applicable* scenario, evaluate every job's `if:`/`needs:` against the | S12 | deploy dispatch naming an environment | the ref gate runs **first**, allowing production from the default branch only and any ref to a non-production environment. Validation runs, and the callee re-asserts the environment name. A release installs under its own id, and the pointer flips as a separate step. Retention is bounded by whichever of the D5.6 shapes the repo uses. So a deploy whose credential can observe the destination asserts the count converged, and one confined write-only leaves it to the host. The live check asserts the environment and the release id, waiting out the reload, then the URL contract. **No tag and no release are created** | D2.1, D4.6, D5.6 | | S13 | deploy dispatch of a production environment from a non-default ref | **fails fast**, before anything is installed or written | D2.1 | | S14 | publish whose branch head gained different `.github/workflows` content after the build began | every update since a release bot's push or merge: release-create **skipped** and the publisher dispatched on the branch. In that case this run ends **cancelled** with its package publish jobs skipped (a Docker image already pushed). The dispatched run releases the head, queueing behind this run only where the head's publisher evaluates this run's group for a dispatch. A push landing after the branch is confirmed unmoved and before the dispatch is released as if it were such an update. That is an accepted, bounded limit per D4.7. Any other update: the step **fails**, nothing is released or dispatched | D4.1, D4.2, D4.5, D4.7 | +| S15 | a smoke or publish run whose `build-nuget` job runs the hub default leaf, for a project declaring `net10.0;net11.0`. The package holds one framework's assembly under both `lib/` folders | the job plans both runtime lines, installs them, and consumes the package once per framework. It **fails** on the `TargetFrameworkAttribute` of the `lib/` folder holding the other framework's assembly, after reporting every other row. A correct package **passes**. The check uploads nothing in either run. A publish run's leaf has uploaded its artifacts already, and a failure leaves them to their retention and the dependent publish job **skipped** | D1.3, D1.7 | +| S16 | a smoke or publish run whose `build-pypi` job runs the hub default leaf, for a project with a `tests/` folder and a `python-versions` of `["3.13", "3.14"]`. Its wheel leaves out a module the tests import | the job builds, then consumes the wheel and the sdist under each line. It **fails** on the tests row of each artifact lacking the module, after reporting every other row. A correct package **passes** under both lines. The check uploads nothing in either run. A publish run's leaf has uploaded its artifacts already. A failure leaves them to their retention, and the dependent publish job is **skipped** | D1.3, D1.8 | ### 5C. Live Probe (Where Warranted) diff --git a/AGENTS.md b/AGENTS.md index 311c9c9..2993d28 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,16 +43,16 @@ An agent session is billed on the context it carries, not the work it does. Ever ### Reading -- **Map a large file, then read one range.** For anything over about 200 lines, list the headings with `grep -n '^## '` first and read only the range the task needs. Read the section, not the file that contains it. +- **Map a large file, then read one range.** For anything over about 200 lines, list the headings with `grep -nE '^#+ ' ""` first and read only the range the task needs. Read the section, not the file that contains it. - **Prefer an in-place edit to a whole-file rewrite.** Rewriting a file bills its full content again on top of what the read already cost. ### Commands -- **Bound output at the source.** Write every command so its output is the answer, not the haystack. A `--jq` projection on an API call does that. So do a count or files-only flag on a search, a summary flag on a diff, and an explicit cap on anything unbounded. A command whose output you then skim is a command that should have been narrower. +- **Bound output at the source.** Write every command so its output is the answer, not the haystack. A `--jq` projection on a `gh` API call does that. So do a count or files-only flag on a search, a summary flag on a diff, and an explicit cap on anything unbounded. A command whose output you then skim is a command that should have been narrower. - **Keep a long query in a file, not in the command.** A heredoc re-typed on every call costs its own length in context each time, often more than the answer it retrieves. -- **Keep generated caches outside the checkout when the executor restricts writes.** Give each task a cache directory under a writable temporary root. Point tools such as uv and ruff there through their own cache variables. Never repurpose `HOME` or an agent's configuration directory to make a tool run. +- **Keep generated caches outside the checkout when the executor restricts writes.** Give each task a cache directory under a writable temporary root. A package or download cache the tool locks for concurrent use, such as `UV_CACHE_DIR`, is the exception. One such cache is shared by the session's tasks and its subagents, since a cache per task stores the same downloads again for each. Every other cache or state file, such as `COVERAGE_FILE` or a tool's per-project lint cache, stays per task. Point tools such as uv and ruff at those directories through their own cache variables. Never repurpose `HOME` or an agent's configuration directory to make a tool run. - **Report an execution boundary separately from a check finding.** A denied path, network request, or Docker socket says the check did not run. Preserve that failure, then use the executor's approval mechanism for the required rerun. Request the narrowest reusable command prefix the executor supports. Report the rerun's result as the verification evidence. -- **Bound every probe, and prove it ended.** A throwaway probe or test harness runs under `timeout`, and one that can recurse or fan out also runs under a task and memory cap. Start it in a process group of its own, as `setsid --wait timeout ` on Linux, and end it by that group with `kill -- -`. Without `--wait`, `setsid` returns at once when its caller leads a process group, and the probe runs on detached. A `pkill -f` pattern that matches nothing exits 1 and kills nothing. Then confirm with `pgrep` that nothing from any earlier run survives, since a later clean run proves nothing about an earlier one. Never suppress a cleanup command's output or exit status. A command the harness moved to the background, where no background job was intended, is stopped and confirmed gone before work continues. +- **Bound every probe, and prove it ended.** A throwaway probe or test harness runs under `timeout`, and one that can recurse or fan out also runs under a task and memory cap. Start it in a process group of its own, as `setsid --wait timeout "" ""` on Linux. `` stands for the probe's command and its own arguments, which replace its quotes so each stays a word of its own. End it by that group with `kill -- "-"`. Without `--wait`, `setsid` returns at once when its caller leads a process group, and the probe runs on detached. A `pkill -f` pattern that matches nothing exits 1 and kills nothing. Then confirm with `pgrep` that nothing from any earlier run survives, since a later clean run proves nothing about an earlier one. Never suppress a cleanup command's output or exit status. A command the harness moved to the background, where no background job was intended, is stopped and confirmed gone before work continues. ### Model Tiers @@ -61,7 +61,7 @@ A rule, a Skill, or a brief names a model tier, never a model. A model release i - **`frontier`** is the fleet's default reasoning tier, for orchestrating, rule text, design, spec logic, and adversarial review. It is not the most capable model available, which is `highest`. - **`standard`** is ordinary implementation and driving a pull request. Judging a review finding is never mechanical, however often it repeats, so it runs at `standard` or above. A `standard` driver's evidence-backed decline of a finding raised on its pull request stands, since that pull request's reviewers and its merge gate check it. - **`bulk`** is the cheapest model that does the work correctly. It is for high fan-out mechanical work, such as an extraction or a status check. -- **`highest`** is the most capable model available, and only the maintainer selects it. The maintainer chooses it for the session itself, or allows it for the session's subagents at launch. The host's agent-safety kit reads that launch setting, `FLEET_ALLOW_HIGHEST=1` on Claude Code. Naming the tier in a prompt does not set it. A maintainer naming it partway through a session restarts the session with it allowed, and an agent never sets it. Without that setting, the kit refuses a dispatch that names it. A dispatch naming no model runs at its agent definition's model where one is set, and otherwise at the session's own. A fork always runs at the session's model, whatever it names. So a session launched on `highest` names a tier on every dispatch meant to run below it, and uses no fork for such work. A session never reaches for it because a task looks hard. +- **`highest`** is the most capable model available, and only the maintainer selects it. The maintainer chooses it for the session itself, or allows it for the session's subagents at launch. The host's agent-safety kit reads that launch setting, `FLEET_ALLOW_HIGHEST=1` on Claude Code. Naming the tier in a prompt does not set it. A maintainer naming it partway through a session restarts the session with it allowed, and an agent never sets it. Without that setting, the kit refuses a dispatch that names it. A dispatch naming no model runs at its agent definition's model where one is set. Otherwise it runs at the default the host's agent-safety kit sets, which is the `frontier` model. On a host without the kit it runs at the session's own. That default does not reach every agent type a tool builds in. On Claude Code the `Explore` and `Plan` types still take the session's model, so the kit refuses a dispatch of either that names no model. A fork always runs at the session's model, whatever it names. So a session launched on `highest` names a tier on every dispatch meant to run below it, and uses no fork for such work. The kit's default is a backstop for a dispatch that forgot its tier, never a reason to leave one out. A session never reaches for it because a task looks hard. | Tool | `highest` | `frontier` | `standard` | `bulk` | | --- | --- | --- | --- | --- | @@ -70,26 +70,28 @@ A rule, a Skill, or a brief names a model tier, never a model. A model release i Each cell is the name that tool's subagent dispatch takes, which follows the latest model of its family. A dispatch on a tool with no row here, or on one that cannot name a model per subagent, names no model. - **A tier resolves only through this table.** A word such as "frontier", "strongest", or "most capable" never resolves to `highest`. The industry's "frontier model" is the opposite of what this tier means here. A session that cannot see this table names no model rather than guessing one. -- **An orchestrating seat runs at `frontier` and names a tier on every dispatch.** It defaults a subagent to `frontier`, and picks `standard` or `bulk` deliberately for execution or mechanical work. +- **An orchestrating seat runs at `frontier`, or at `highest` where the maintainer chose that for the session, and names a tier on every dispatch.** It defaults a subagent to `frontier`, and picks `standard` or `bulk` deliberately for execution or mechanical work. ### Delegation - **Delegate exploration, keep judgment.** A subagent starts from an empty context and returns only its conclusion. So a wide search, a multi-file audit, or a "which of these is affected" question costs a fraction of the same work inline. Delegate when the finding compresses to a short answer, and stay inline when the intermediate detail drives the next edit. - **Match the model tier to the judgment, not to the diff size.** Mechanical work (a known-shape edit repeated across files, an extraction, a status check, a lint fix) runs at `bulk`, at the lowest effort that holds. State the tier in the delegation itself rather than accepting the default. A change to a gate, a ruleset, a release condition, or a carried governance section is a design change however small it looks. - **Never tier down the seat holding the judgment.** Governance wording, spec logic, rulesets, and repository visibility are fleet-wide and durable when wrong. Tier the subagents, not the main thread. +- **A session above the tier its work calls for keeps the judgment and dispatches the execution.** A session the maintainer launched on `highest` is the ordinary case, and so is a `frontier` session handed implementation. Such a session spends its own turns on what its tier is for. It decides the design, the seams, and the rulings, and it solves what a cheaper seat could not. It writes those decisions into the brief, so the worker executes a decision rather than making one. Everything else it dispatches at the tier "Model Tiers" names for that work, a Skill's own procedure included. So a `highest` session asked to drive one pull request dispatches the drive at `standard`, and does not sit in the review loop itself. Asking the maintainer stays with the session, since a dispatched seat can prompt no one. The brief tells the worker to hand a problem back once its own attempts stop converging, with what it tried. Solving it one seat up costs less than another round of the worker looping. Work that costs less to do than to brief stays inline. None of this dispatches judgment downward, which the bullet above still forbids. - **Brief a subagent so it never needs a governance file.** A subagent inherits no context, so anything it must honor has to be in its prompt. Reading `GOVERNANCE.md` to find out costs it the same tokens the main thread would have paid. Brief on this shape: ```text Task: -Paths: +Paths: Rules that bind this task: Return: Bounds: +If your own attempts at a problem stop converging, stop and hand it back with what you tried. If a rule you were given does not cover what you find, stop and report it. Do not guess, and do not read a governance file to resolve it. ``` - **Wait in a background process, not in a poll loop.** A review or CI wait is a sequence of near-identical requests, each billed for whatever context it happens to carry. Run the wait as one backgrounded command rather than as a sequence of turns. -- **A wait separates its outcomes, and says which one it reached.** The condition was met, it has not been met yet, and the wait cannot reach it at all are different results. A backgrounded wait that emits nothing renders them identically. Run the command once in the foreground and read its output before backgrounding it. That is because a wait is only as good as the command inside it. It is also because an unsupported flag on the installed tool version exits non-zero with an empty stdout that every naive test reads as "nothing yet". Never let a fallback stand in for a failed command, since `|| echo '[]'`, `|| true`, and `2>/dev/null` convert an error into that same reading. That conversion is the suppression the write-safety rules already forbid on a mutation. Make the wait emit on failure as loudly as on success, so silence means "still running" and nothing else. Bound it too, so a condition that is never coming ends in a report rather than in another wait. +- **A wait separates its outcomes, and says which one it reached.** The condition was met, it has not been met yet, and the wait cannot reach it at all are different results. A backgrounded wait that emits nothing renders them identically. Run the command once in the foreground and read its output before backgrounding it. That is because a wait is only as good as the command inside it. It is also because an unsupported flag on the installed tool version exits non-zero with an empty stdout that every naive test reads as "nothing yet". Never let a fallback stand in for a failed command, since `|| echo '[]'` and `|| true` convert an error into that same reading. That conversion is the suppression `GOVERNANCE.md` "Repository Boundaries and Write Safety" already forbids on a mutation. Make the wait emit on failure as loudly as on success. Bound it too, so a condition that is never coming ends in a report rather than in another wait. - **Never write a wait as an unbounded shell loop.** This is a prohibition rather than a preference. A loop that waits for something, with no bound anywhere in the command that runs it, is forbidden. That holds in a tool call, in a script, and in a brief handed to a subagent. The bound goes inside that command. The wait then says which of these it found: the condition met, the bound reached, or the check itself failing. **Prefer the mechanism that already signals.** Where the dispatch mechanism reports a subagent's completion itself, polling that subagent's output file is a second channel. The answer is already on its way. **The agent that starts a wait owns the process it leaves.** A process a tool call leaves running survives the turn, the subagent, and the run that dispatched it. So a run that dispatched workers does not report itself done while it cannot say what it left running. ## Where the Rules Live @@ -100,7 +102,7 @@ Every rule below is a level-two section of [`GOVERNANCE.md`](./GOVERNANCE.md) un | --- | --- | | Why the rules are shaped this way | `Foundational Principles` | | Recording a durable lesson, updating governance, or work here waiting on a fix in another repository | `Durable Knowledge and Self-Improvement`, surfaced at its decision moments by the `agent-conduct` Skill, and the section keeps the full rules | -| Any push, API mutation, comment, label, or merge, or which checkout the work happens in | `Repository Boundaries and Write Safety`, its task-isolation rule surfaced at the task-start moment by the `repo-worktree` Skill, and the section keeps the full rules | +| Any push, API mutation, comment, label, or merge, or which checkout the work happens in | `Repository Boundaries and Write Safety`, its task-isolation rule surfaced at the task-start moment by the `repo-worktree` Skill, and the section keeps the full rules. Who takes a merge or another irreversible step is `Communicating with the User` | | Quoting data into a comment, commit, test, or doc | `Representative Data in Agent-Authored Text` | | Committing, signing, rebasing, force-pushing | `Git and Commit Rules`, packaged as the `git-commit-conventions` Skill | | Branch choice, promotion, keeping branches in sync | `Branching Model`, packaged as the `branching-and-release-model` Skill | @@ -131,7 +133,7 @@ A row above naming no Skill, or naming one only for part of its section, is doc- Some of the rules above are also packaged as Claude Code / opencode / Codex Skills, hand-authored at `.agents/skills/` in the hub. That path is not a repo-relative link here, since it is hub-local and not carried into every fleet repo. Packaging them means they surface automatically instead of needing to be re-read every session. `scripts/` is hub-hosted and reached rather than carried, per "Hub-Hosted Tooling", so run the installer from a hub checkout. `python3 scripts/skills_install.py` (or the `.sh`/`.ps1` wrapper), run once per machine from `github.com/ptr727/ProjectTemplate`, installs them for every repo touched from that machine. `python3 scripts/skills_install.py --report`, also from a hub checkout, says whether this machine is current. A rule that keeps needing to be restated is a sign the install is missing or stale, not that the rule does not exist. Keeping a repo's own carried `.github/copilot-instructions.md` in sync with the hub, without losing that repo's own "Disproved Claims" ledger entries in the process, is `copilot-instructions-keeper`. It is a skill about maintaining that file rather than a rule extracted from it. That is because the file itself is read directly by the Copilot bot and stays fully intact everywhere it is carried. Checking, from inside this repo's own session with no operator watching, whether this repo and this machine are actually current against the hub is `check-this-repo`. It is new content rather than a rule extracted from a section. It is the counterpart to `resync-a-repo` that needs no standing hub checkout or named target beyond the repo the session is already in. That holds even though its own check fetches a hub checkout to reach `scripts/skills_install.py`. Opening a pull request against a repository outside this fleet, one the maintainer does not control, follows a different workflow entirely. That workflow is new content rather than a rule extracted from a section, packaged as `upstream-contribution-workflow`. It is independent of the target repo's own type or workflow model. Isolating a task into its own worktree before its first file edit, with the base-branch choice, the layout convention, and the cleanup mechanics, is `repo-worktree`. It is the task-start surface of the `Repository Boundaries and Write Safety` law, which keeps the rule. Writing the handoff that "Session Scope" above requires, and resuming from one, is `session-handoff`, new content rather than a rule extracted from a section. It is new content because deciding what actually earns a place in each of the sections that rule names is judgment rather than a shape. It carries `GOVERNANCE.md` "Communicating with the User" whole as a generated include, that being the parked-decision account the rule owes. It also names the hub's `scripts/handoff.py` for the chain's mechanics. Its widest trigger is the one that earns it, about to re-attempt something a previous round may already have tried. That trigger earns it because a session that does not know a chain exists never goes looking for one. Creating, changing, or retiring one of these skills is itself packaged as `skill-lifecycle`. It is hub-context only, since `.agents/skills/` exists only in the hub and the generated plugin tree is never hand-edited. -Adding or changing a managed host tool is packaged as `add-host-tool`. It keeps the cross-platform contract, installer, documentation, test, and native-verification surfaces together. +Adding or changing a managed host tool is packaged as `add-host-tool`. It keeps the cross-platform contract, installer, documentation, test, and native-verification surfaces together. It is hub-context only, since the installers and `spec/host-tools.json` it edits exist only in the hub. Bringing a machine's coding agents fully current is packaged as `update-host`, new content rather than a rule extracted from a section. It runs the hub's bootstrap `--agent-setup` action from any session and reports each step with `--agent-status`. The steps are the agent tools, the fleet skills, the Claude Code safety kit, and the host-wide rules for Codex and opencode. It changes the machine, where `check-this-repo` reads one repository and `resync-a-repo` converges one. diff --git a/CODESTYLE.md b/CODESTYLE.md index 14cfcdf..c26f582 100644 --- a/CODESTYLE.md +++ b/CODESTYLE.md @@ -1,6 +1,6 @@ # Code Style and Formatting Rules -This is the single code-style guide for the fleet. The **General** section applies to every language. Each **language section** (.NET, Python, Shell) is self-contained: a repo follows only the section(s) for the languages it ships and ignores the rest. A repo keeps the whole file rather than trimming it. An unused-language section costs nothing, the same whole-file model as [`.editorconfig`][root], whose inert `[*.cs]` block a non-.NET repo keeps. +This is the single code-style guide for the fleet. The **General** section applies to every language. Each **language section** (.NET, Python, Shell, PowerShell) is self-contained: a repo follows only the section(s) for the languages it ships and ignores the rest. A repo keeps the whole file rather than trimming it. An unused-language section costs nothing, the same whole-file model as [`.editorconfig`][root], whose inert `[*.cs]` block a non-.NET repo keeps. Cross-cutting *process* rules live in [GOVERNANCE.md][governance] and are not repeated here. They cover PR titles, branching, US English, Markdown style, comments philosophy, workflow YAML, and PR review etiquette. They also cover the verification discipline that defines the pre-push lint gate. @@ -12,22 +12,33 @@ These rules apply to every language in the repo. Use each tool's official casing in task labels, docs, and prose, per the `comment-and-doc-style` Skill at `.agents/skills/comment-and-doc-style/SKILL.md` in the hub. That is not a repo-relative link, since the path is hub-local and not carried into every fleet repo. +### Toolchain Versions + +Where the hub carries a baseline file that selects a language's toolchain line, that file sets the fleet's default line once. Each repository selects its own line in its own copy of that file. That copy is the repository's source of truth, and the hub's workflows install the line it selects. They fall back to the hub's default only where a repository carries no selector. + +- **A repository may lead or lag the default.** One repository can move to a newer major while the fleet stays, or hold an older line while the fleet moves. +- **A move edits the selector and every setting that names the same line, together.** These include a target framework, a devcontainer image tag, and any fixed language version. +- **A multi-targeted repository still has one selector.** The selector names the line its release builds on. Each other line it supports appears only where the toolchain needs it. That is the target framework list and the inputs it passes the hub's `validate-task.yml`. Those are `python-versions` or `dotnet-versions`, which names the selector's line first, and a `test-matrix` leg's own `python-version`. It is also the repository's own `host-tools.json`, where the host gate needs that line's runtime or SDK on a developer host. For Python the selector is the lowest line, the `requires-python` floor. For .NET it is the highest, since that line's SDK builds every target framework. +- **The language level follows the selected line.** It is left unset wherever the toolchain derives it from the line, and set by hand only where it does not. +- **A resync never changes the line a repository selects.** It carries the baseline file's fleet-owned settings and leaves the repository's own choice of line in place. +- **The audit checks that a repository agrees with itself.** Its settings must name one selected line between them, and any other line only where the bullet above allows. That line need not be the hub's default. + ### Clean-Compile Verification -Each language defines a **clean-compile** verification: the combination of build, formatter, linter, and code-analysis tools that must report clean before a commit. It is exposed as one or more **named** VS Code tasks (or, where a language ships no tasks, documented commands). Those definitions are the same across the fleet. The concrete names live in each language section below. +Each language defines a **clean-compile** verification: the combination of build, formatter, linter, and code-analysis tools that must report clean before a commit. It is exposed as one or more **named** VS Code tasks (or, where a language ships no tasks, documented commands). Those definitions are the same across the fleet. Each language's definition is in its section below or in the Skill that section names. - **Run it after every code change, and it is not the whole gate.** The relevant language's clean-compile must pass before you commit. CI runs those same language checks as a backstop **plus everything else its validation workflow runs**. All of it reports into the one required status. A green clean-compile therefore does not predict a green CI. That remainder is at least the doc-lint set (markdownlint, cspell, actionlint, `editorconfig-checker`) and whatever spec, config, and script gates the repo carries. So read the workflow for the full list rather than assuming the previous sentence enumerates it. What has to pass before a push is the repo's **whole** lint gate, per [GOVERNANCE.md "Verification Discipline"][governance-verification-discipline]. Each linter's known-working invocation is in `GOVERNANCE.md` "Running the Linters Locally (Known-Working Invocations)", a hub-only section read in a hub checkout rather than carried into every fleet repo. - **The named task definition is the canonical spec** - its exact command sequence, arguments, and strictness. You may run it through the VS Code task **or** by invoking the equivalent native commands directly. Either is fine **only if the sequence, arguments, and strictness match exactly**. No shortcuts and no more-lenient options (for example, never drop `--verify-no-changes` or loosen a `--severity`). -- **A working local commit/pre-commit gate is strongly suggested, not the repo's free choice to skip.** The *mechanism* is bounded by the toolchain the repo already keeps rather than by which languages its checks cover, and canonical shapes carry it. Husky.Net runs from a .NET tool manifest declaring it, so a repo that keeps no such manifest uses the `pre-commit` framework instead. Any repo may also wire an equivalent hook of its own at `.husky/pre-commit`, enabled with `core.hooksPath` and sourcing nothing. Canonical shapes for Husky.Net and the `pre-commit` framework live in `catalog/snippets/` in the hub. That is not a repo-relative path, since it is hub-local and not carried into every fleet repo. What that gate must cover, its per-clone enablement steps, and what its absence means for the audit are not restated here. They are in `GOVERNANCE.md` "Running the Linters Locally (Known-Working Invocations)", the same hub-only section. Keeping a working gate is not drift. +- **A working local commit/pre-commit gate is strongly suggested fleet-wide, and its absence is a measured audit finding.** The *mechanism* is bounded by the toolchain the repo already keeps rather than by which languages its checks cover, and canonical shapes carry it. Husky.Net runs from a .NET tool manifest declaring it, so a repo that keeps no such manifest uses the `pre-commit` framework instead. Any repo may also wire an equivalent hook of its own at `.husky/pre-commit`, enabled with `core.hooksPath` and sourcing nothing. Canonical shapes for Husky.Net and the `pre-commit` framework live in `catalog/snippets/` in the hub. That is not a repo-relative path, since it is hub-local and not carried into every fleet repo. What that gate must cover and its per-clone enablement steps are not restated here. They are in `GOVERNANCE.md` "Running the Linters Locally (Known-Working Invocations)", the same hub-only section. ### Analyzer Diagnostics and Suppressions -- **A new port is not a license to silence diagnostics.** Brownfield / just-ported status never justifies relaxing analyzer or linter severities or muting newly surfaced warnings. Fix them. (The only brownfield allowance is the one-time git-signing / line-ending migration described in [GOVERNANCE.md][governance] and [README.md][readme], which has nothing to do with code analysis.) +- **A new port is not a license to silence diagnostics.** Brownfield / just-ported status never justifies relaxing analyzer or linter severities or muting newly surfaced warnings. Fix them. - **Suppress only genuine false-positives or deliberate, documented exceptions**, always at the **narrowest scope that fits**, in this order of preference: 1. An **in-code annotation on the specific symbol**, with a justification, in the language's attribute/comment form, never a blanket pragma spanning a region. 2. The **owning project's local config** when the exception is project-wide for one project (e.g. a test project's own `.editorconfig` / `pyproject.toml`). 3. The **root / shared config** only when the suppression is genuinely applicable to **every** project in the repo. -- **Never blanket-relax a batch of rules project-wide** to get a port to build. The per-language mechanics (which attribute, which config key) are in each language section. +- **Never blanket-relax a batch of rules project-wide** to get a port to build. The per-language mechanics (which attribute, which config key) are in the Skill a language section names, where it names one. ### Operations and Failure Messages @@ -37,13 +48,14 @@ Each language defines a **clean-compile** verification: the combination of build ### Interrupts -This applies to every Bash and Python script. `CODESTYLE.md` "Interrupts in Python" and "Interrupts in Shell" state each language's mechanics. +This applies to every shell and Python script and to every .NET console app, which the bullets below also call a script. `CODESTYLE.md` "Interrupts in Python", "Interrupts in Shell", and "Interrupts in .NET" state each language's mechanics. -- **On SIGINT or SIGTERM, a script releases what it holds before it exits.** It removes the temporary paths it created, releases the locks it took, and stops the child processes it started. A path, lock, or child left behind can stop the next run from starting, or feed it a half-written input. +- **On SIGINT or SIGTERM, a script releases what it holds before it exits.** It removes the temporary paths it created, releases the locks it took, and stops the child processes it started. A path, lock, or child left behind can stop the next run from starting, or feed it a half-written input. A script started with SIGINT ignored keeps it ignored, so a stop meant to reach it sends SIGTERM. A non-interactive shell starts a background child that way. - **A write to persistent state goes to a temporary path beside the target, then is renamed over it.** An interrupt then leaves the old content or the new, never a mix of both. A store with transactions of its own, such as an SQLite database, is written through those instead. A rename over an open database can corrupt it. -- **An interrupted script prints one line naming the signal, with no traceback, and exits 130 for SIGINT or 143 for SIGTERM.** Each status is 128 plus the signal number, the status a shell reports for a process that signal ended. +- **An interrupted script prints one line naming the signal, with no traceback, and ends by re-raising the signal.** The signal then ends the process, so a shell reports 130 for SIGINT or 143 for SIGTERM, 128 plus the signal number. At Ctrl-C, a calling shell's loop then stops rather than starting its next iteration. A script calling `exit 130` has not died by the signal, so that loop reads an ordinary non-zero exit and runs on. A launcher between them, such as `uv run`, exits with the status rather than dying by the signal, so that loop runs on there too. - **A script takes this rule when it is created or next edited.** An existing script is not edited for this rule alone. -- **A script that holds a lock, temporary state, or a child process owes a test that signals it mid-run.** The test sends SIGINT or SIGTERM, then asserts the matching exit status and that nothing the script held remains. It is skipped on Windows, which cannot deliver either signal for a script to handle. A script holding none of these owes no such test. +- **A script that holds a lock, temporary state, or a child process owes a test that signals it mid-run.** The test sends SIGINT or SIGTERM, then asserts that the script died by that signal and that nothing it held remains. It starts the script with its interpreter directly, since a launcher such as `uv run` hides the signal death. It is skipped on Windows, where a test has no way to send SIGINT or SIGTERM to the process it started. A script holding none of these owes no such test. +- **A script that ends by `exec`-ing its long-running process owes no interrupt handling for that process.** The `exec` replaces the script, so a signal reaches the process directly. A background child the script starts to outlive the `exec` is handed across it, and the script neither stops it nor waits for it. Such a child is handed across only where something else stops it, such as a container's teardown of its whole process tree. Anything else the script holds is released before the `exec`. A script that holds nothing else at any point before the `exec` owes no trap and no signal test. As PID 1, such as a container's entrypoint, it ignores a SIGTERM that arrives before the `exec`, so a stop waits for its timeout. ### Parsing Structured Formats @@ -54,7 +66,8 @@ This applies to every Bash and Python script. `CODESTYLE.md` "Interrupts in Pyth A command-line script is one a person or an agent runs by name. A hook its host runs, taking its input from that host rather than from a command line, is not one. - **Every command-line script answers `--help` and `-h`** with the same text on stdout, then exits 0, changing nothing. That text opens on a usage line naming the script. An agent learns a script's interface by asking it, so a script that reads `--help` as an input acts in a way nobody predicted. A PowerShell script declaring its own parameters answers `-Help` and `-h` instead, from a `-Help` switch carrying an `h` alias. That form follows PowerShell's own parameter convention, so such a script owes no answer to a literal `--help`. A wrapper that forwards its arguments to another script answers whatever that script answers. -- **An argument the script does not recognize is refused**, with a non-zero exit before any read or write. The refusal names it as an unknown or unrecognized option, argument, flag, or parameter, and PowerShell's own refusal of a parameter it cannot bind counts. So a PowerShell script declaring its own parameters refuses a literal `--help` like any other unrecognized argument. Where no parameter takes the remaining arguments, the binder's refusal does that. A script with such a parameter refuses a dash-prefixed leftover itself. An unrecognized first argument is never taken as a default mode or as a target. +- **An argument the script does not recognize is refused**, with a non-zero exit before any read or write. The refusal names it as an unknown or unrecognized option, argument, flag, or parameter, and PowerShell's own refusal of a parameter it cannot bind counts. That refusal comes from the binder only in an advanced script, one carrying `[CmdletBinding()]` or a `[Parameter()]` attribute. Without either, a plain `param()` block binds an unknown parameter into `$args` and runs on. Such a script refuses a non-empty `$args` itself, before any work. So a PowerShell script declaring its own parameters refuses a literal `--help` like any other unrecognized argument. A script with a parameter taking the remaining arguments refuses a dash-prefixed leftover itself. An unrecognized first argument is never taken as a default mode or as a target. +- **A shell script that gives a refused argument an exit status of its own uses 64, `EX_USAGE` from `sysexits.h`, and reserves it.** A caller can then tell a refusal, which changed nothing, from a run that started and failed, without reading the message. Every refusal exits through one function that exits 64. Under `set -e` a failed command's own status becomes the script's, so an `EXIT` trap turns any other exit carrying 64 into 1. A program the script `exec`s replaces that trap. So the script `exec`s only a program whose own 64, if it exits 64 at all, means a refused argument. An argument the script passes on, which that program refuses, keeps the program's status. The script's `--help` names the status, so a caller reads it as a contract. ### Script and Utility File Names @@ -89,15 +102,38 @@ These rules apply repo-wide, in every directory. Markdown lints clean via `markd *This section applies only to the .NET side. A repo with no .NET projects still carries it (the file is carried whole) and ignores it.* -The style guide for any .NET projects in this repo covers the zero-warnings build policy and its clean-compile task chain. It covers central `Directory.Build.props`/`Directory.Packages.props` configuration and the root `global.json` that selects the SDK line, with `LangVersion` left unset so the C# version follows the TFM. It covers C# language and naming conventions, XML documentation, and analyzer suppression scope. It covers the library-versus-application logging split, async and error-handling patterns, and xUnit v3 + AwesomeAssertions testing conventions. It covers the runner declaration, package references and version floor that an MTP-based test project needs under `WORKFLOW.md` D1.6. With them it covers the local diagnostic for a run that reports no tests. It also covers AOT-compatible project configuration. +The style guide for any .NET projects in this repo covers the zero-warnings build policy and its clean-compile task chain. It covers central `Directory.Build.props`/`Directory.Packages.props` configuration and the root `global.json` that selects the SDK line, with `LangVersion` left unset so the C# version follows the TFM. That `global.json` is the repository's selector under "Toolchain Versions" above. A multi-targeted repository's `global.json` names its highest target framework's line. It covers C# language and naming conventions, XML documentation, and analyzer suppression scope. It covers the library-versus-application logging split, async and error-handling patterns, and xUnit v3 + AwesomeAssertions testing conventions. It covers the runner declaration, package references and version floor that an MTP-based test project needs under `WORKFLOW.md` D1.6. With them it covers the local diagnostic for a run that reports no tests. It also covers AOT-compatible project configuration. A console app's stop signals and its unhandled exceptions are stated in full in "Interrupts in .NET" and "Unhandled Exceptions in .NET" below. This is packaged as the `dotnet-codestyle` Skill at `.agents/skills/dotnet-codestyle/SKILL.md` in the hub. That is not a repo-relative link, since the path is hub-local and not carried into every fleet repo. The summary above sketches the scope. Read the skill for the full rules, code examples, and mechanics. +### Interrupts in .NET + +- **One lifetime owner handles every stop, and an asynchronous `Main` creates it before it parses arguments or creates the logger.** The owner registers `PosixSignalRegistration` for SIGINT, SIGTERM, and SIGHUP. A signal that lands before then takes its default action, and no summary is logged. SIGQUIT stays unhandled, so it remains the immediate exit. The owner holds a graceful stop token, a forceful kill token, and the recorded stop reason. Its token sources are never disposed, since a handler can still run after its registration is disposed. +- **Stop requests escalate.** The first records the signal and sets `context.Cancel`. It cancels the stop token with `CancelAsync()` and arms the kill token with `CancelAfter` at the kill bound. The second cancels the kill token and sets `context.Cancel` too, so cleanup and the log flush still run. The third cancels the kill token synchronously and leaves `context.Cancel` unset, so the signal's default action ends the process. The handler does nothing else but log one line, and its body sits inside a catch-all. `Cancel()` runs a token's callbacks on the calling thread, which here is the signal thread. An exception that escapes a signal handler ends the process. +- **The kill bound sits below the container stop grace, at a value such as 5 seconds.** That grace is 10 seconds by default. A bound below it leaves time for cleanup and the log flush before the container is killed. +- **On Windows, the console close and shutdown handlers wait for cleanup, since the process ends when each handler returns.** A console close reaches the app as SIGHUP, and a system shutdown reaches it as SIGTERM. The SIGHUP handler and the SIGTERM handler there each cancel the stop token and the kill token. Each then waits, for less than 5 seconds, until `Main` signals that cleanup finished. +- **System.CommandLine handles neither signals nor exceptions.** The app sets `ProcessTerminationTimeout` to null and `EnableDefaultExceptionHandler` to false. Each action takes `(ParseResult, CancellationToken)`, and `InvokeAsync` receives the stop token. `Main` holds one `try`, and its `finally` flushes the log. The library's own handler exists only for an asynchronous action. It returns after its timeout while the action still runs, and it reports a cooperative cancel as exit 1. +- **Cancellation is a parameter end to end.** Every call that can wait takes the token it honors as a parameter. No static accessor reads a token, and no call blocks on a task. A static accessor hides which token a call honors, and a blocked thread cannot see the stop. +- **A fault is its own stop reason.** A callback off the main flow, such as a file watcher or a timer, catches its exception and reports a fault to the owner. An exception that escapes such a callback is unhandled, so the process aborts instead of cleaning up. Any stop, a fault included, arms the kill bound once, and a later stop does not move it. The exit follows the recorded reason: a fault first, then a signal, then the result. A fault exits with the app's error status, never 0 and never a signal status. +- **One function runs every child tool.** On Unix it starts the child in a session of its own with `ProcessStartInfo.StartDetached`, and every standard stream is redirected. A terminal's signal then reaches only the app, which stops the child once. A child left in the app's process group receives the signal twice, the terminal's and the app's. `KillOnParentExit` is set where the platform supports it, so a child does not outlive an app that is killed. The stop token is the graceful stop, and the kill token is the forceful one. Where a stop was requested, the tool run is cancelled, and any other signal death is a tool failure. These start options need the .NET 11 line, so an app that runs child tools selects that line or a later one. On Windows `StartDetached` stays unset, since the graceful stop attaches to the child's console. +- **What a child starts and leaves behind, such as a container, is named and removed in the stop path.** Stopping the child does not stop what it started outside its own process tree. The removal runs under a short bound of its own and takes neither token. It runs after the tools stop, so its bound and the kill bound together fit inside the container stop grace. With a 10-second grace and a 5-second kill bound, a removal bound such as 3 seconds fits. A stop can cancel the stop token and the kill token before the removal starts. A third stop or a kill of the app abandons the removal. +- **A child inherits an ignored SIGINT, so the kill bound is what ends it there.** A non-interactive shell starts a background job with SIGINT ignored, and the app's children inherit that. The app's SIGINT registration then never fires, and a SIGTERM still stops the app. +- **One exit decision ends the app, and a signal stop ends it by re-sending the signal.** This is the .NET form of the re-raise in `CODESTYLE.md` "Interrupts". After the log is flushed, the app disposes its registrations and restores the signal's default action with libc `signal`. It then re-sends the signal to itself with libc `kill`, so a calling shell loop stops. Where that cannot end the process, as PID 1 in a container or on Windows, `Main` returns 128 plus the signal number. Nothing relies on `ProcessExit` or a finalizer, since the default action ends the process without running either. +- **The rename over persistent state uses `File.Move` with overwrite.** The temporary file sits beside the target and is flushed to disk with `Flush(true)` before the move replaces the target. A rename of content that was never flushed can survive a power loss as an empty file. +- **For an app that holds a lock or temporary state or runs children, the signal test in `CODESTYLE.md` "Interrupts" signals the built app mid-run.** It starts the app with default signal dispositions, as `env --default-signal=INT,QUIT` does. It signals the app alone and asserts death by the signal and that nothing the app held remains. An app that runs children is also signaled on its process group, and its test asserts that no child remains. A calling shell loop that stops after SIGINT to its process group proves death by SIGINT, since an exit status alone cannot. An app that ships a container image runs the PID 1 path in that image. The test asserts the logged line naming the signal, which `CODESTYLE.md` "Interrupts" requires. It is skipped on Windows. + +### Unhandled Exceptions in .NET + +- **The lifetime owner subscribes `AppDomain.CurrentDomain.UnhandledException` first in `Main`, and its handler logs the exception without surviving it.** The handler writes the exception to standard error and cancels the kill token synchronously, so the tools end. It flushes the log on another thread under a bound, such as 3 seconds, and then returns. The runtime then aborts, so the abort status and any crash dump remain. The handler does not call `Environment.Exit`, and the app does not use `ExceptionHandling.SetUnhandledExceptionHandler` to continue. Continuing would run on with whatever state the exception left broken. +- **`TaskScheduler.UnobservedTaskException` is logged as an error.** A faulted task that nothing awaited raises it only when the task is collected, so the log is the one place its exception shows. +- **A fatal runtime error is not a managed exception and reaches no handler, so a crash dump is its only capture.** The `DOTNET_DbgEnableMiniDump` setting enables that dump. +- **As PID 1 the abort surfaces as another status, so after a logged unhandled exception a caller reads any status above 128 as the abort.** Outside PID 1 on Linux the process dies by SIGABRT. The kernel drops the abort signal's default action for PID 1, and the status measured there on x86-64 is 139. + ## Python *This section applies only to the Python side. A repo with no Python projects still carries it (the file is carried whole) and ignores it.* -The style guide for any Python project(s) in this repo covers the build-versus-lint-only profile split, the uv/ruff/pyright/mypy/pytest toolchain, and `src` layout. It covers formatting and linting, comment and docstring conventions, type hints, naming, imports, and patterns to avoid. It covers test conventions, including the `pytest-cov` dependency and coverage selector a Python directory running pytest owes under `WORKFLOW.md` D1.6. It also covers versioning. +The style guide for any Python project(s) in this repo covers the build-versus-lint-only profile split, the uv/ruff/pyright/mypy/pytest toolchain, and `src` layout. It covers the root `.python-version` that selects the Python line, and the settings that derive from it. The hub's PyPI release build runs on that line, and lets uv choose where a repository carries no selector. It covers formatting and linting, comment and docstring conventions, type hints, naming, imports, and patterns to avoid. It covers test conventions, including the `pytest-cov` dependency and coverage selector a Python directory running pytest owes under `WORKFLOW.md` D1.6. It also covers versioning. A profile belongs to a declared directory, not to the repository. Each deliverable takes one build-profile directory of its own, except that a uv workspace is declared once, by its root. A repository declaring no Python directory has its root gated only where it tracks a root `pyproject.toml`, as `WORKFLOW.md` D1.2 states. Lint-only Python may sit beside the component it serves. Only a split by purpose alone, within one place, is forbidden, since the file name carries the purpose. One place means directories serving the same component, or serving none. @@ -106,30 +142,45 @@ This is packaged as the `python-codestyle` Skill at `.agents/skills/python-codes ### Tests and Script Dependencies - **A test lives in a `tests/` directory, never inside the production file it tests.** A deployed script may keep a `--selftest` that runs a small smoke check in seconds, and the case matrix lives in `tests/`. A self-test shipped inside the file it tests grows the file every reviewer reads, and its cases can come to outweigh the code they test. -- **A hub-hosted standalone script that needs a third-party library declares it in PEP 723 inline script metadata, and runs as `uv run --no-project --script `.** The block opens on `# /// script`, closes on `# ///`, and carries `dependencies` and `requires-python`. The fleet already installs uv on hosts and in CI. `--no-project` keeps uv from syncing the project around a script that has no block yet, where it would write a lockfile and a virtual environment. A script with no such block runs under `python3` and uv alike. A hook an agent harness runs on every tool call stays standard-library only, since it runs before any toolchain is guaranteed. +- **A hub-hosted standalone script that needs a third-party library declares it in PEP 723 inline script metadata, and runs as `uv run --no-project --script ""`.** The block opens on `# /// script`, closes on `# ///`, and carries `dependencies` and `requires-python`. The fleet already installs uv on hosts and in CI. `--no-project` keeps uv from syncing the project around a script that has no block yet, where it would write a lockfile and a virtual environment. A script with no such block runs under `python3` and uv alike. A hook an agent harness runs on every tool call stays standard-library only, since it runs before any toolchain is guaranteed. ### Interrupts in Python -- **SIGINT and SIGTERM take one path.** Python raises `KeyboardInterrupt` on SIGINT. The entry point installs a SIGTERM handler with `signal.signal` that records the signal and raises `KeyboardInterrupt`. -- **The entry point catches `KeyboardInterrupt` once, and any handler below it that catches the exception re-raises it.** It prints the line `CODESTYLE.md` "Interrupts" requires, then exits 143 where the SIGTERM handler recorded a signal and 130 otherwise. -- **What the script holds is released by `with` blocks and `finally` clauses as the exception unwinds.** A `subprocess.Popen` child is stopped in a `finally` clause with `terminate()`, then `wait()`, since leaving its `with` block does not stop it. That child runs without `shell=True`, so `terminate()` reaches the command rather than a shell around it. +- **SIGINT and SIGTERM take one path.** The entry point installs one handler with `signal.signal` for both signals. The handler records the first signal and raises `KeyboardInterrupt`, and returns at once on any later one. A later signal would cut the cleanup short, such as the SIGTERM that `uv run` forwards to a process group a Ctrl-C already reached. Python can run the later signal's handler at the first instruction of the first one's, before it records anything. So the handler also returns at once when the frame it interrupted is its own: `if received or (frame is not None and frame.f_code is on_signal.__code__): return`. A test of the handler calls it from a `sys.setprofile` hook inside its own first call, and expects the first signal recorded. The handler takes SIGINT only where `signal.getsignal(signal.SIGINT)` is still `signal.default_int_handler`, so a SIGINT inherited as ignored stays ignored. +- **The entry point catches `KeyboardInterrupt` once, and any handler below it that catches the exception re-raises it.** It prints the line `CODESTYLE.md` "Interrupts" requires, then re-raises the signal the handler recorded. To re-raise, it flushes standard output and standard error inside `contextlib.suppress(OSError)`, restores the default handler with `signal.signal(signum, signal.SIG_DFL)`, then re-sends the signal with `os.kill(os.getpid(), signum)`. The suppression covers a pipe whose reader the same Ctrl-C ended. The default action ends the process without Python's own exit handling. So the flush comes first, and no cleanup on this path relies on an `atexit` handler or a finalizer. The re-raise runs outside every `with` block and `finally` clause, such as at the `__main__` call site, since none of them runs after it. A process the re-sent signal does not end, such as PID 1 in a container, then exits 128 plus the signal number. On Windows, `os.kill` ends the process with the signal number as its status, so there the entry point skips it and exits 130. +- **What the script holds is released by `with` blocks and `finally` clauses as the exception unwinds.** A `subprocess.Popen` child is stopped in a `finally` clause, since leaving its `with` block does not stop it. The clause calls `terminate()`, then `wait(timeout=...)`, such as 10 seconds. On `subprocess.TimeoutExpired`, it calls `kill()`, then `wait()`. The handler passes over a second Ctrl-C, so a child that ignores SIGTERM would otherwise hold the script. That child runs without `shell=True`, so `terminate()` reaches the command rather than a shell around it. Where that child is a launcher, such as `uv run`, `kill()` reaches the launcher alone, so a script it started that outlasts SIGTERM keeps running. - **The rename over persistent state uses `os.replace`.** `os.rename` and `Path.rename` fail on Windows when the target exists. ## Shell -Bash, and only where a program cannot be Python: a bootstrap that installs the interpreter cannot be written in it. Nor can a host tool that must run before a development toolchain exists depend on Python. Everything else is Python, with a test under its own scripts tree's `tests/` directory. The `shell-codestyle` Skill packages the mandatory `set -Eeuo pipefail` header, the pipefail-versus-early-reader pitfall, and self-recursive command shims. It also packages self-locating scripts, the `shellcheck`-plus-`shfmt` clean-compile, and the why-not-what comment rule. It is at `.agents/skills/shell-codestyle/SKILL.md` in the hub, not a repo-relative link since that path is hub-local and not carried into every fleet repo. Read the skill for the full rules. A script's own arguments follow "Command-Line Arguments" under General, which the Skill carries whole. Run the clean-compile check itself per `GOVERNANCE.md` "Running the Linters Locally (Known-Working Invocations)", not by probing `command -v shellcheck`. That section is hub-only, read in a hub checkout rather than carried into every fleet repo. +*This section applies only to Bash and POSIX `sh` scripts. A repo with none still carries it (the file is carried whole) and ignores it.* + +A bootstrap, a program that must run before the interpreter or a development toolchain exists, is written in the platform's native shell. That is Bash on Linux and PowerShell on Windows. Logic that needs its failure cases tested is Python, with a test under its own scripts tree's `tests/` directory. The pattern is a platform-native entry point over shared Python logic. The `shell-codestyle` Skill packages the mandatory `set -Eeuo pipefail` header, the pipefail-versus-early-reader pitfall, and self-recursive command shims. It also packages self-locating scripts, the `shellcheck`-plus-`shfmt` clean-compile, and the why-not-what comment rule. It is at `.agents/skills/shell-codestyle/SKILL.md` in the hub, not a repo-relative link since that path is hub-local and not carried into every fleet repo. Read the skill for the full rules. A script's own arguments follow "Command-Line Arguments" under General, which the Skill carries whole. Run the clean-compile check itself per `GOVERNANCE.md` "Running the Linters Locally (Known-Working Invocations)", not by probing `command -v shellcheck`. That section is hub-only, read in a hub checkout rather than carried into every fleet repo. ### Interrupts in Shell -- **Cleanup of temporary paths and locks runs in the script's `EXIT` trap.** Bash runs that trap when SIGINT or SIGTERM ends the script, as well as on a normal exit. -- **Every script sets an `INT` trap and a `TERM` trap, which stop its children and keep the status.** Each one sends SIGTERM with `kill` to the children the script started, then waits for them with `wait`. It then prints the line `CODESTYLE.md` "Interrupts" requires and exits 130 or 143. The children's process IDs are held in an array, such as `pids`, set to `()` before the traps are set. A trap skips the `kill` and the `wait` while `${#pids[@]}` is 0, a test `set -u` allows on an empty array in every Bash version. Under `set -u`, an unset one would end the trap before the line prints. The `kill` takes `2>/dev/null`, since a child that already exited makes it print an error. Both take `|| :`, since under `set -e` a non-zero status from either ends the trap before the line prints. SIGTERM is the signal sent because a background child ignores SIGINT. Other cleanup stays in the `EXIT` trap. -- **A long-running external command runs in the background, and the script waits for it with `wait "$pid"`, so its exit status reaches `set -e`.** Bash runs a trap only after a foreground command returns, while a trapped signal ends a `wait` at once. Only the script's own shell starts such a child. One that a subshell or a pipeline element starts never reaches the script's array or its `wait`. A background child that reads standard input takes `<&0`, since bash otherwise gives it `/dev/null`. The trap's `kill` reaches only the process `$!` names. So a function, a group, a subshell, a pipeline, or `sh -c` runs in the foreground instead. There the trap runs once the command it interrupted returns, so nothing the script started is orphaned. +- **Cleanup of temporary paths and locks runs in the script's `EXIT` trap, set before the `INT` and `TERM` traps.** Bash runs that trap when SIGINT or SIGTERM ends the script, as well as on a normal exit. Set after the `TERM` trap, it does not run when that trap's re-sent SIGTERM ends the script. +- **Every script sets an `INT` trap and a `TERM` trap, which stop its children and re-raise the signal.** Each one sends SIGTERM with `kill` to the children the script started, then waits for them for at most a bound, such as 10 seconds. A child that ignores SIGTERM would otherwise hold the trap, so at Ctrl-C the script would hang. It polls them with `kill -0`, which succeeds while any of them still runs, and runs `sleep 0.1` between polls. Where one still runs at the bound, it sends SIGKILL to them with `kill -s KILL`. Then `wait "${pids[@]}"` reaps them. A bare `wait` would also wait on every process substitution, which the bound never reaches. It then prints the line `CODESTYLE.md` "Interrupts" requires. Last, it clears its own trap with `trap - INT` or `trap - TERM` and re-sends the signal to the script with `kill -s INT "$$"` or `kill -s TERM "$$"`. It ends with `exit 130` or `exit 143`, which runs only where the re-sent signal does not end the script, such as PID 1 in a container. The children's process IDs are held in an array, such as `pids`, set to `()` before the traps are set. Each child's ID is stored at an index that only increases, as `pids[n]=$!` then `n=$((n + 1))`, with `n` starting at 0. Once the script's own `wait` on that child returns, `unset 'pids[i]'` removes its ID, `i` being the index it was stored at. The array's length cannot stand in for `n`, since an `unset` leaves the array sparse. A trap then never signals a process ID the system may have reused. A trap skips stopping the children while `${#pids[@]}` is 0, a test `set -u` allows on an empty array in every Bash version. Under `set -u`, an unset one would end the trap before the line prints. Each `kill` sent to the children takes `2>/dev/null`, since a child that already exited makes it print an error. Each `kill` but the polling one takes `|| :`, and so do the `sleep` and the `wait`. Under `set -e`, a non-zero status from any of them would end the trap before the line prints. A second Ctrl-C ends the `sleep` with one. The polling `kill -0` is the loop's condition, which `set -e` does not read. SIGTERM is the signal sent because a background child ignores SIGINT. Other cleanup stays in the `EXIT` trap. A script that the `exec` case in `CODESTYLE.md` "Interrupts" frees from owing a trap sets neither trap. +- **A long-running external command runs in the background, and the script waits for it with `wait "$pid"`, so its exit status reaches `set -e`.** Bash runs a trap only after a foreground command returns, while a trapped signal ends a `wait` at once. Only the script's own shell starts such a child. One that a subshell or a pipeline element starts never reaches the script's array or its `wait`. A background child that reads standard input takes `<&0`, since bash otherwise gives it `/dev/null`. The trap's `kill` reaches only the process `$!` names. So a function, a group, a subshell, a pipeline, or `sh -c` runs in the foreground instead. There the trap runs once the command it interrupted returns, so nothing the script started is orphaned. A launcher, such as `uvx`, `uv run`, `uv pip install`, `dotnet`, or `xargs`, may run in the foreground too. One that does not stop the tool it starts on SIGTERM must run in the foreground. `uv pip install` is one when it builds an editable install or an sdist through a build backend that outlives uv on SIGTERM. A background child starts with SIGINT ignored, and the tool a launcher starts inherits that. So at Ctrl-C the tool runs on until the trap's SIGTERM reaches it through the launcher. In the foreground, Ctrl-C reaches the whole process group, the tool included. A SIGTERM sent to the script alone runs its `TERM` trap only once that foreground command returns. So a stop that must be prompt signals the process group. That group holds only the script and its command where the script leads it, as `setsid` starts one. The `exec` case in `CODESTYLE.md` "Interrupts" is the exception. The process a script `exec`s into replaces it, and a child handed across that `exec` is not waited for. +- **A deliberately POSIX `#!/bin/sh` script, such as a git hook, adapts the bullets above to what dash lacks.** Dash runs no `EXIT` trap when the re-sent signal ends the script. So the `INT` and `TERM` traps release the temporary paths and locks themselves, and the `EXIT` trap still covers an ordinary exit. A `/bin/sh` that is bash runs the `EXIT` trap after the signal trap too. So a release that cannot run twice, such as a lock's, sets its variable back to `""`. POSIX sh has no arrays, so the script runs one background child at a time. It holds that child's process ID in a scalar, such as `child`, set to `""` again after its `wait`. Every variable a trap reads, `child` and each temporary path included, is set to `""` before the traps are set. Under `set -u`, an unset one would end the trap before the signal is re-sent. A trap skips the child's `kill` and `wait` while `[ -n "$child" ]` fails, and skips the removal of a path still empty. + +## PowerShell + +*This section applies only to PowerShell scripts. A repo with no `.ps1` files still carries it (the file is carried whole) and ignores it.* + +PowerShell is the native shell on Windows, so a Windows bootstrap and a Windows entry point over shared Python logic are written in it. Logic that needs its failure cases tested is Python on Windows too. PSScriptAnalyzer is the analyzer, and it runs every default rule through a `PSScriptAnalyzerSettings.psd1` at the repo root, which CI reads. A repo with `.ps1` files keeps its own copy. It excludes a rule below only where its own scripts meet that rule's reason, and states the reason there. + +- **`PSAvoidUsingWriteHost`.** A script whose purpose is a console report writes it with `Write-Host`. Its functions return exit codes through the pipeline, so text sent with `Write-Output` would reach the caller as a return value. +- **`PSUseShouldProcessForStateChangingFunctions`.** A script that already carries its own preview and consent step, such as a dry-run switch and a confirm prompt, keeps them. Supporting `ShouldProcess` would add `-WhatIf` and `-Confirm` beside them, a second spelling of each. + +PowerShell's in-code suppression, the narrowest scope "Analyzer Diagnostics and Suppressions" above prefers, is `[Diagnostics.CodeAnalysis.SuppressMessageAttribute('', '', Justification = '')]` on the `param()` block of the function holding the finding. A finding outside any function takes the script's own `param()` block. + +The check is clean when `Invoke-ScriptAnalyzer -Path "" -Settings ./PSScriptAnalyzerSettings.psd1` reports no finding for any tracked `.ps1` file, as CI requires. Run the check per `GOVERNANCE.md` "Running the Linters Locally (Known-Working Invocations)", not by probing `command -v pwsh`. That section is hub-only, read in a hub checkout rather than carried into every fleet repo. Windows batch (`.cmd` and `.bat`) appears only as a shim that puts a command on `PATH`, by decision, so it has no section here. [governance]: ./GOVERNANCE.md [governance-verification-discipline]: ./GOVERNANCE.md#verification-discipline -[readme]: ./README.md [root]: ./.editorconfig diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 811db23..849a048 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -16,11 +16,11 @@ The specific rules in this file implement a few governing principles. Read these ## Durable Knowledge and Self-Improvement - **Durable knowledge lives in the committed docs, not in agent memory.** Anything a future agent must honor belongs in a committed governance file. That covers a rule, a contract, a hard-won gotcha, and a pattern worth repeating or one to avoid. The file is `GOVERNANCE.md` for a cross-cutting rule, or `AGENTS.md`, `CODESTYLE.md`, `WORKFLOW.md`, or a committed backlog the repository already keeps. Agent memory does not survive a new session, a new machine, or a new environment. So it holds only environment-specific nuance and in-flight session state, never anything whose loss on reset would matter. A durable lesson left only in memory is lost to the next agent. -- **Keep the governance current as you work.** When work surfaces something durable, record it in the governance docs as part of that change. Something durable includes a rule worth enforcing, a recurring gotcha, a positive pattern to repeat, or a negative one to design out. Record it rather than leaving it in a local note or routing around it with a one-off workaround. Where the governing doc is carried from a template this repo cannot edit directly, propose the change upstream rather than patching the local copy. A local patch leaves every sibling repo with the same trap. Governance is not static: it improves by agents folding good patterns in and designing bad ones out. +- **Keep the governance current as you work.** When work surfaces something durable, record it in the governance docs as part of that change. Something durable includes a rule worth enforcing, a recurring gotcha, a positive pattern to repeat, or a negative one to design out. Record it rather than leaving it in a local note or routing around it with a one-off workaround. Where the rule text is carried from the hub, file the change as an issue in the hub rather than patching the local copy. A local patch leaves every sibling repo with the same trap. Governance is not static: it improves by agents folding good patterns in and designing bad ones out. - **A blocker filed in another repository is recorded in the repository whose work it blocks.** The binding moment is when the upstream issue is filed or, where it already exists, found. That is because the session filing or finding it is the one that knows what stopped and why. It owes a second issue in the repository that is waiting rather than only the first. Where the upstream issue already exists, the local issue names that one and no second upstream issue is filed. The local issue states what this repository cannot do and why, in its own terms rather than as a pointer to read elsewhere. That is because a reader who has to open the upstream issue to learn whether it affects them opens every one of them. The local issue names the upstream one as its blocker, carries the `blocked` label, and carries whatever labels its own work would carry anyway. A comment on the upstream issue then names the local one in return. It is a comment rather than an edit to the body because a second repository may join the same blocker later. It is also because the body is often not this session's to rewrite. That order is the upstream issue, then the local issue, then the backlink comment. It leaves a partial failure as a record naming its blocker rather than as a blocker naming a record nobody wrote. **A handoff does not do this job.** It carries the blockers a round met, but it belongs to one track and closes when that track's work is done. The wait can outlive that track, so it belongs in the backlog the whole repository reads. - **The blocker record is written under the ordinary write rules, and the label on it is taken off deliberately.** Filing an issue and commenting on another are state-changing calls. So "Repository Boundaries and Write Safety" binds each of them exactly as it binds any other write. That keeps the upstream issue inside this owner. That binding also makes a blocker under a different owner a matter of explicit permission rather than of this rule. The `blocked` label is what every reader of this record selects on. So a repository not carrying it cannot host one until the fleet label set is applied there. That is a change to that repository's configuration rather than anything this rule writes. A session that finds it missing reports that. The label comes off when the blocker clears. The session closing the upstream issue is best placed to take it off. That is because the backlink comments naming every waiting repository are on the issue it is closing. Any later session that finds it cleared takes it off instead. A fix can land well before either of those, so the label lags the fix rather than tracking it. That is why a session meeting a `blocked` issue reads the state of the issue that issue's body names rather than the label. The local issue stays open when the label comes off. That is because the work it records still has to be done and is ordinary backlog from that moment on. -- **A handoff parked on a maintainer decision carries the `blocked` label too.** Its blocker is a `decision` issue in this same repository rather than an issue elsewhere, and the parking comment on the handoff names it. A reader reads the named issue rather than the label, and the blocker clears when that issue loses its `decision` label. Unlike a cross-repository blocker, a session finding it cleared does not take the label off. It comes off only once a session writes the next round and leaves no `decision` issue it filed on that work unanswered. So a running loop never takes a handoff a present maintainer is still working, or one it could only park again. -- **A durable rule earns a mechanical hook only where a hook can actually decide it, otherwise it stays prose.** The conditions below must hold together, not any one alone. The failure recurs even after the governing prose was demonstrably read and understood. So it is not a discovery or loading problem that a structural fix would already solve. A structural fix here means getting the rule into context at all. The triggering shape is decidable from the tool call's own text, arguments, and working directory alone, with no semantic or contextual judgment required. And the failure is destructive or hard to reverse rather than a quality miss. A worktree-isolation lapse met all of them, so it was promoted to a `gh-write-guard` hook rule. It recurred under prose the agent had already read. The question "is this command's target a primary checkout" is a plain directory comparison. And the harm is another task's swept or reverted work. A skill's own trigger going unread by the session at all, by contrast, is a loading problem. It is fixed by getting the rule into context (the `CLAUDE.md` importing `AGENTS.md`), not by a hook. And "was this review finding actually evidence-backed" fails the second condition outright. A hook sees only the command text, never the judgment call itself, so it can only ever nag, not decide. That class of rule stays prose and a chained Skill trigger. Those conditions gate promotion to a **host** hook. That is the involuntary layer that fires in every session under the maintainer's own credentials, and only the maintainer can grant an exemption from it. That is why the bar there is destructive harm. A **committed** hook in the repository's own tree is a third layer between prose and that one, and it is earned on weaker grounds. It is opt-in per clone, visible in the tree, and bypassable by design. It therefore fits a rule whose harm is a quality miss rather than a destruction. The second condition still binds it, since a hook that cannot decide its own trigger is a hook that nags. So what earns the layer is finding the decidable half of a rule whose other half is judgment. The local-review rule under `GOVERNANCE.md` "Verification Discipline" is the worked example. Whether a review's findings were rightly disposed of is judgment no hook can decide, and it stays prose. Whether a review pass ran over exactly the content being pushed is a receipt comparison, which the hub's own `.husky/pre-push` decides. +- **A handoff parked on a maintainer decision carries the `blocked` label too.** Its blocker is a `decision` issue in this same repository rather than an issue elsewhere, and the parking comment on the handoff names it. A reader reads the named issue rather than the label, and the blocker clears when that issue loses its `decision` label. Unlike a cross-repository blocker, a session finding it cleared does not take the label off. It comes off only once a session writes the next round and leaves no `decision` issue on that work unanswered, whichever session filed it. So a running loop never takes a handoff a present maintainer is still working, or one it could only park again. +- **A durable rule earns a mechanical hook only where a hook can actually decide it, otherwise it stays prose.** The conditions below must hold together, not any one alone. The failure recurs even after the governing prose was demonstrably read and understood. So it is not a discovery or loading problem that a structural fix would already solve. A structural fix here means getting the rule into context at all. The triggering shape is decidable from the tool call's own text, arguments, and working directory alone, with no semantic or contextual judgment required. And the failure is destructive or hard to reverse rather than a quality miss. One check within the worktree-isolation rule met all of them. The rule's lapses recurred under prose the agent had already read, and the harm is another task's swept or reverted work. Whether a mutating git command targets a primary checkout is a plain directory comparison. So that check was promoted to a `gh-write-guard` hook rule, requirement 6 of `host-setup/agent-safety/README.md` in the hub, and the rest of the rule stays prose. A skill's own trigger going unread by the session at all, by contrast, is a loading problem. It is fixed by getting the rule into context (the session loading `AGENTS.md` at start), not by a hook. And "was this review finding actually evidence-backed" fails the second condition outright. A hook sees only the command text, never the judgment call itself, so it can only ever nag, not decide. That class of rule stays prose and a chained Skill trigger. Those conditions gate promotion to a **host** hook. That is the involuntary layer that fires in every session under the maintainer's own credentials, and only the maintainer can grant an exemption from it. That is why the bar there is destructive harm. A **committed** hook in the repository's own tree is a third layer between prose and that one, and it is earned on weaker grounds. It is opt-in per clone, visible in the tree, and bypassable by design. It therefore fits a rule whose harm is a quality miss rather than a destruction. The second condition still binds it, since a hook that cannot decide its own trigger is a hook that nags. So what earns the layer is finding the decidable half of a rule whose other half is judgment. The local-review rule under `GOVERNANCE.md` "Verification Discipline" is the worked example. Whether a review's findings were rightly disposed of is judgment no hook can decide, and it stays prose. Whether a review pass ran over exactly the content being pushed is a receipt comparison, which the hub's own `.husky/pre-push` decides. `GOVERNANCE.md` "Durable Knowledge and Self-Improvement" keeps the full rules. The `agent-conduct` Skill at `.agents/skills/agent-conduct/SKILL.md` in the hub carries it whole as a generated include and surfaces it at its decision moments. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. @@ -31,7 +31,7 @@ A state-changing GitHub call is the highest-blast-radius thing an agent does her - **Write only within the owner of the current project's repository.** Every state-changing call targets this project's `origin` or another repository under the same owner, which is the fleet the maintainer already administers. A broad or logged-in identity is capability, not permission: a token that *can* reach another owner's repository does not authorize writing to it. Writing under a **different owner** needs explicit human permission naming that repository, granted deliberately rather than assumed from a token's reach. A "harmless test" write is still a write, so there is no probe exception. That boundary is where the harm sits. That is because the incident this rule exists for was a stray comment on a stranger's repository, not work across the maintainer's own projects. Reads from anywhere are fine. - **Provider connectors are read-only for fleet work.** Use a provider's GitHub connector for reads where it helps. Perform each GitHub mutation through the documented hub tool, or through authenticated `gh` where no tool owns the operation. This gives Codex, Claude, opencode, and a terminal session one write path with the same checks. It also avoids a connector mutation that predictably lacks repository authorization while the verified `gh` session already has it. A provider-specific instruction may explain how to reach the common path. It never replaces that path with its own mutation surface. - **Never fabricate, guess, or reuse an identifier passed to a write.** Capture every identifier a state-changing call consumes from a live query in the **same** session. This includes node, numeric, thread, and comment ids. Pass the captured value directly. Do not hand-type an id, recall it from another session, or copy it from documentation or an example. Ids commonly resolve **globally**, so a wrong-but-valid id does not fail. It writes to the wrong target, in someone else's repository. Apply the same rule to an identifier embedded in outward-facing text. Read the complete URL from the live object. Never construct a plausible link from an unverified id. If a query returns no id or URL, stop rather than invent one to proceed. -- **A write is never a probe, and a write's output is never suppressed.** Never fire a state-changing call to see whether it works: decide it should happen, make it happen, and read the result. Never append output-discarding redirection or a force-success tail to a mutation (for example `>/dev/null`, `2>/dev/null`, `&>/dev/null`, `|| true`, `|| :`, `|| echo`). The reason is that the write's output is exactly what must be read. A write that appears to fail is **verified, not assumed harmless**. That is because the operation may have succeeded on the server while the client reported an error. So confirm the actual state before retrying or moving on. The ban targets hiding a *failure*. An ad-hoc call's response is the only signal you get. So `>/dev/null 2>&1`, `|| true`, and `|| echo`, which swallow the error stream or force success, are never acceptable on one. A committed script under `set -e` is a narrow exception. It may send a write's *stdout* to `/dev/null` to drop the success-response noise, because stderr stays visible and a failed write still aborts loudly. The hub's own `repo-config/configure.sh` does exactly this, and a repository reaches it there rather than carrying a copy. The exception is stdout-only suppression inside a reviewed, fail-loud script, never `2>&1` or a force-success tail, and never an ad-hoc command. +- **A write is never a probe, and a write's output is never suppressed.** Never fire a state-changing call to see whether it works: decide it should happen, make it happen, and read the result. A test, probe, or verification run never makes a call that would change state outside its own disposable workspace if it succeeded, `sudo` included. It stubs or dry-runs that call instead. That workspace is a temporary directory, a tool cache, a container and the images it runs, and its checkout's working tree and local git state. Remotes, services, installed software, system or account configuration, and an operational repository's tracked live files stay outside it. A refusal this time never makes a live run acceptable, since the next run may hold the credential the refusal lacked. Never append output-discarding redirection or a force-success tail to a mutation (for example `>/dev/null`, `2>/dev/null`, `&>/dev/null`, `|| true`, `|| :`, `|| echo`). The reason is that the write's output is exactly what must be read. A write that appears to fail is **verified, not assumed harmless**. That is because the operation may have succeeded on the server while the client reported an error. So confirm the actual state before retrying or moving on. The ban targets hiding a *failure*. An ad-hoc call's response is the only signal you get. So `>/dev/null 2>&1`, `|| true`, and `|| echo`, which swallow the error stream or force success, are never acceptable on one. A committed script under `set -e` is a narrow exception. It may send a write's *stdout* to `/dev/null` to drop the success-response noise, because stderr stays visible and a failed write still aborts loudly. The hub's own `repo-config/configure.sh` does exactly this, and a repository reaches it there rather than carrying a copy. The exception is stdout-only suppression inside a reviewed, fail-loud script, never `2>&1` or a force-success tail, and never an ad-hoc command. - **A refused write is reported, never re-shaped, and the maintainer's say-so does not lift a refusal by the harness.** These are two different permissions and only one of them is the maintainer's to give. When the agent harness refuses a write, the maintainer authorizing it in conversation does not change the outcome. The identical call is refused again, so a second attempt is not worth making. Reading the second refusal as a flake is how an agent starts hunting for another shape of the same request. **That hunt is the failure this rule exists to stop.** Re-expressing a refused `gh` command as a raw `gh api -X POST` reaches the same endpoint with the same identity and the same blast radius. It has defeated the one control that stopped it. And it is the more dangerous version because the agent believes it has permission. So a refused write is never re-attempted through a different API surface, a different tool, or a rephrasing. It is also never routed around by the agent writing itself a permission rule, which is self-authorization whatever the maintainer said. The routes that remain are the maintainer's: they add the permission rule themselves, or they run the command themselves. Raise it as a blocked decision naming those routes (see "Communicating with the User"). Where the work needs the result rather than the call, say what the agent will verify once the maintainer has run it. A gate-checked subcommand that the maintainer's own installer allows, such as `pr_review.py merge`, is a shape of call the maintainer sanctions in advance. It sanctions how the write is made, never whether it is, so the write still needs the maintainer's go-ahead as before. A skill prescribes it as the first call for its write. It is not among the routes left after a refusal. So it is never reached for once a hand-typed form of the same write was refused. **A refusal is also a fact about the contract, not just about the session.** Where a required verification needs a write the agent is refused, the document requiring it says so and names who runs it. That is because a check that is mandatory and unperformable is quietly dropped and then reported as done. - **Each task runs in its own checkout, in its own directory, on its own feature branch.** The unit is the task rather than the agent. That is because one agent moving between two repositories meets the same hazard as two agents sharing one tree. It is also because a rule written per agent permits exactly the case that goes wrong. The commands that cross the boundary are the ordinary ones rather than the reckless ones, and each is correct in isolation. A blanket `git add -A` sweeps another task's uncommitted work into the commit, and a `git reset --hard` deletes it. A branch switch carries it into an unrelated change. And a `git stash pop` can pop another task's entry, since the stash is one list per repository shared by every worktree. The mechanical habit that holds the rule up: a mutating command takes an absolute path, or a `cd` to one in the same invocation. It does not take the working directory it inherited. That is because a read in the wrong directory is a wasted call and a write there is damage. No working directory scopes the shared stash list, so a task leaves the stash alone. - **A task isolates into its own worktree before its first file edit, and a continuation re-isolates.** All new work begins by creating a unique git worktree (or clone) on its own feature branch. Its base is the branch work starts on for the repository's model per "Branching Model", which is `develop` unless the task is explicitly about `main`-only content. The primary checkout is the maintainer's own surface, so a session launched there isolates before writing rather than after noticing contention. An operational repository's live checkout on `develop` is the one exception, since it takes a direct commit in place per "Operational Repositories". A session resuming a prior task creates a fresh worktree rather than resuming wherever its branch happens to be checked out. That is because a branch sitting checked out in a shared tree is exactly how two sessions end up in one checkout. The moment this rule binds is the first file edit. That is because the commit-time and review-time checks all run after another task's uncommitted work can already be swept. The worktree mechanics, the layout convention, and the cleanup are packaged as the `repo-worktree` Skill at `.agents/skills/repo-worktree/SKILL.md` in the hub. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. This section keeps the rule. For Claude Code sessions, the `gh-write-guard` hook now backstops a mechanical subset of this rule directly. It denies a mutating git operation run against a primary checkout rather than a worktree. That covers `reset`, `add`, `commit`, and most of the rest, a documented handful of exemptions such as a fast-forward-only pull kept aside. An operational repository's in-place commit is one of them. The hook allows it only where the repository's `.github/agent-policy.json` on `main` lists the checked-out branch. Every other agent, and everything about isolation a hook cannot see, still relies on this prose alone. What a hook cannot see includes which checkout a read happens in and whether another task is live in the tree. The parenthetical "(or clone)" above names `repo-worktree`'s own standalone-clone fallback, used when a linked worktree is unavailable. That fallback is itself structurally a primary checkout to the hook's own primary-vs-worktree test. So a session using it on Claude Code sets the hook's `GH_WRITE_GUARD_ALLOW_PRIMARY_CHECKOUT` grant for that session, per `repo-worktree`'s own instructions. That keeps it from being silently denied the commits the fallback exists to make. @@ -39,12 +39,13 @@ A state-changing GitHub call is the highest-blast-radius thing an agent does her ## Representative Data in Agent-Authored Text -Agent-authored text illustrates with data the agent constructed, never with data it observed in the maintainer's environment. This binds every surface an agent writes: pull request and issue comments, review replies, commit messages, code, tests, fixtures, and docs. Reading real data is unrestricted, and what is bounded is what an agent copies out of the environment into text that is committed or posted. The rule holds for a private repository as much as a public one. That is because a repository's audience changes with one settings toggle while the text stays exactly where it was written. It also holds where the data is the maintainer's own, since the exposure happens on their behalf before they can weigh it. +Agent-authored text illustrates with data the agent constructed, never with identifying data it observed in the maintainer's environment. The first bullet below defines identifying data, and everywhere else in this section observed data means identifying data observed there. This binds every surface an agent writes: pull request and issue comments, review replies, commit messages, code, tests, fixtures, and docs. Reading real data is unrestricted, and what is bounded is what an agent copies out of the environment into text that is committed or posted. The rule holds for a private repository as much as a public one. That is because a repository's audience changes with one settings toggle while the text stays exactly where it was written. It also holds where the data is the maintainer's own, since the exposure happens on their behalf before they can weigh it. +- **The rule bounds identifying data, and nothing else.** Identifying data is people's names and other personal details, account identifiers, secrets, and host names. A personal detail is anything that points at a person. Examples are an email address, a phone number, a street address, and a username, the one a home path carries included. An account identifier is an account number, a masked account suffix, or a reference or transfer id. A secret, such as a credential, a token, or a key, identifies the account it unlocks. A host name is the name of a machine on the maintainer's own network. A date, an amount, a balance, or a private-range IP address identifies nobody, so it is out of scope even where it was observed. A date beside a named person is still out of scope, because the name is what identifies. A private-range address is reused on every private network, so it points at none of them. A review finding that raises one as observed data is answered by citing this bullet, and it owes no replacement and no record. - **Synthetic evidence is the better evidence, not a weaker substitute.** A case constructed to carry the defect demonstrates it exactly, and any reader can re-run it. Observed data proves the same thing and can never be reproduced by anyone else. A filename built to contain a newline is a complete proof of a newline-handling defect. The real directory it was found in adds nothing the proof needed. Reaching for observed data to make a finding more convincing inverts which of the two is the stronger evidence. Where observed data is what revealed the defect, name its shape, meaning the property that triggers the fault. Then construct a case that carries that property. - **The exposure is one-way.** A public comment is fetched, cached, and indexed the moment it posts, so editing it afterwards is mitigation rather than a fix. The edit leaves the original readable in the comment's edit history to anyone who can read the repository. Text that has already landed is reported to the maintainer rather than quietly rewritten. That is because the decision on what to do about it, deletion included, is theirs. Observed data a review finds in a repository's committed text takes the set route in the next bullet. Do not quote the exposed data again while reporting or investigating it. That is because a transcript, an issue, or a commit message written about the exposure reproduces it somewhere new. -- **Observed data a review finds in committed text is routed by where it sits and who can read it.** A sweep for the finding's siblings is owed, reaching as far as any real finding's class sweep does. For the finding and each sibling, the first case that fits decides. Data no pushed commit holds is removed from the unpushed commits before the push, and needs no record. Two kinds of data are escalated to the maintainer, and the work on them stops. One is data in a public repository's pushed history, the hub's included. The other is data in a carrying repository's copy of hub-authored text. It is already exposed, or it is the hub's to fix, and a history rewrite is the maintainer's call. The escalation names the repository and the kind of data. It and any issue, comment, or answer it writes never name the commit, the file, the line, or the value, or quote the reviewer's words. Data in a private repository's pushed history is replaced in the current text, even in a file the change does not otherwise touch. Where the current text no longer holds it, nothing is replaced, and the record below is still owed. The pull request body records it under an `Observed data recorded` heading, naming the location and kind, never the value. Where another pull request's review raised it, that line names the raising pull request too. Both carry the `history-data` label. That heading and label are the record a later decision reads, since no scanner finds a name. Where the repository lacks the label, the heading is the record, and the maintainer is told the label is missing. Read the visibility live, with `gh repo view --json visibility`, at the moment of the finding, since one toggle changes it. -- **A repository becoming public first answers for its history.** Before its visibility changes, list its pull requests carrying `history-data` or an `Observed data recorded` heading, and each pull request such a heading names. Replacing the current text is not enough, and neither is a history rewrite alone, since GitHub keeps every pull request's commits after a force push. The history is rewritten, and any review comment showing the data is deleted. The maintainer then asks GitHub Support to purge the cached pull request refs. That request also names any submitted review body showing it, since no one can delete one. Only after all of these does the toggle change. +- **Observed data a review finds in committed text is routed by where it sits and who can read it.** A sweep for the finding's siblings is owed, reaching as far as any real finding's class sweep does. For the finding and each sibling, the first case that fits decides. Data no pushed commit holds is removed from the unpushed commits before the push, and needs no record. Two kinds of data are escalated to the maintainer, and the work on them stops. One is data in a public repository's pushed history, the hub's included. The other is data in a carrying repository's copy of hub-authored text. It is already exposed, or it is the hub's to fix, and a history rewrite is the maintainer's call. The escalation names the repository and the kind of data. It and any issue, comment, or answer it writes never name the commit, the file, the line, or the value, or quote the reviewer's words. Data in a private repository's pushed history is replaced in the current text, even in a file the change does not otherwise touch. Where the current text no longer holds it, nothing is replaced, and the record below is still owed. The pull request body records it under an `Observed data recorded` heading, naming the location and kind, never the value. Where another pull request's review raised it, that line names the raising pull request too. Both carry the `history-data` label. That heading and label are the record a later decision reads, since no scanner finds a name. Where the repository lacks the label, the heading is the record, and the maintainer is told the label is missing. Read the visibility live, with `gh repo view --json visibility`, at the moment of the finding, since one toggle changes it. Every observed secret also goes to the maintainer for revocation, whatever else its case requires, naming only the repository and the kind of data. +- **A repository becoming public first answers for its history.** Before its visibility changes, list its pull requests and issues carrying `history-data` or an `Observed data recorded` heading, and each pull request such a heading names. The maintainer labels an issue `history-data` on being told of an exposure in its title, its body, or one of its comments. A pull request's title, body, conversation comment, or review is labeled on that pull request the same way. Where the repository lacks the label, the record follows the kind of exposure. A git history exposure keeps its pull request body's heading, as the bullet above states. An exposure in an issue's or a pull request's text is recorded in a comment on it under an `Observed data recorded` heading. The maintainer is told the label is missing. An empty listing owes none of the steps below. Each listed item owes the steps for its kind. For a git history exposure, or one in a pull request's commits, replacing the current text is not enough. Neither is a history rewrite alone, since GitHub keeps every pull request's commits after a force push. The history is rewritten, and any review comment showing the data is deleted. The maintainer then asks GitHub Support to purge the cached pull request refs. That request also names any submitted review body showing it, since no one can delete one. An exposure only in a review's own text owes no rewrite and no ref purge. The review comment is deleted, and the Support request names any submitted review body. An exposure in an issue, or in a pull request's title, body, or conversation comment, owes no history rewrite. The comment is deleted or the title or body is edited. A merged pull request's title can also sit in its squash or merge commit, so that exposure owes the git history steps as well. An edited body or comment keeps the original in its edit history. The maintainer deletes each revision showing the data himself, which write access allows. Only what cannot be deleted that way goes to GitHub Support. That is the title-change event, which shows the old title, and any revision the edit-history menu does not offer to delete. Where a request was made, the maintainer then waits for GitHub Support's reply confirming that everything the request named is purged. Only after all of these does the toggle change, though the maintainer may decide not to wait for the reply. A pending request leaves the cached refs, any named review body, and anything else the request named readable. A toggle made on the request alone publishes what the purge exists to remove. - **No checker closes this.** A pattern finds an absolute home path or a drive letter, and gating that subset is worth doing as a floor. The exposure this rule exists for was name-shaped, and a name is not pattern-detectable. So a search of the offending text for path-shaped strings returns nothing while the names sit in plain sight. A gate here catches the easy half, and mistaking it for the answer is what stops anyone looking at the other half. That is why this is a judgment an agent applies rather than a check it waits for. ## Git and Commit Rules @@ -63,6 +64,7 @@ Two workflow models, set per repo by the registry `workflowModel` field. Most re promotions, and forward-only with no back-merges. That model has promotion traps worth knowing before the first one (never delete `develop`, resolve an EOL-only conflict by taking `develop`'s side). **GitHub's own "default branch" repository setting reads `main`, but `develop` is where work starts and where in-flight content lives.** So a worktree or clone that defaults to "the default branch" lands on `main`. It can silently miss content already merged to `develop` but not yet promoted. Branch from `develop`, on either workflow model, unless the task is explicitly about `main`-only content. +Issue-closing keywords go only in a promotion pull request's body. A squash setting can copy a pull request's body into its commit. Then a keyword in a feature pull request's body closes its issue once the promotion reaches `main`. A direct-push commit message does the same. So neither carries a keyword. Where either names the issues it fixes, it uses the inert `Closes on promotion:` line. A keyword fires even inside a sentence that negates it. **Operational** repos differ substantially (direct-to-`develop`, advisory CI, dispatch-only release), covered as a delta rather than a separate model. @@ -94,11 +96,18 @@ already cut, and wrapper-repo upstream-version tracking. The registry `workflowModel` field is `release` (the default) or `operational`. **Operational** repos track a live service's running state rather than shipping versioned units of delivery. They hold live-service config such as Home Assistant, ESPHome, Vantage, and home automation. Commits go -directly to `develop`, and CI runs on the push as advisory feedback only. The maintainer and an agent alike commit in place, in the live checkout the running service reads. A worktree or a pull request into `develop` stays available to an agent and is never required. The host write guard allows that in-place commit only once the repository's `.github/agent-policy.json` on `main` lists `develop` in its `guard` section. The maintainer's merge to `main` is therefore what grants it, and until then the guard denies it. A direct push names -the issues it fixes in one `Closes on promotion:` line in its commit message, such as -`Closes on promotion: #N, #M`. The promotion pull request carrying that push takes a closing -keyword in its body for each issue the line names. Its body takes no closing keyword for a push -without that line. A PR still exists for a +directly to `develop`, and CI runs on the push as advisory feedback only. The maintainer and an agent alike commit in place, in the live checkout the running service reads. A worktree or a pull request into `develop` stays available to an agent and is never required. The host write guard allows that in-place commit only once the repository's `.github/agent-policy.json` on `main` lists `develop` in its `guard` section. The maintainer's merge to `main` is therefore what grants it, and until then the guard denies it. A change reaching +`develop` names the issues it fixes in one `Closes on promotion:` line, such as +`Closes on promotion: #N, #M`. A direct push writes the line in its commit message. A pull request +into `develop` writes it in its body. The promotion reads a merged pull request's line from its +body, never from its commits. The +promotion pull request carrying the change takes a closing keyword in its body for each issue the +line names. Its body takes no closing keyword for a change without that line. A change that undoes a +fix not yet on `main` names that fix's issues in one `Reopens on promotion:` line, written where a +`Closes on promotion:` line would go. A rollback committed as an ordinary change is one. The line is +required because a rollback often carries no revert marker for the range to show. The promotion body +takes no closing keyword for an issue that line names. Where the range names one issue on both +lines, the line of the latest change naming it decides. A PR still exists for a change worth reviewing, and the `main` promotion gate is unchanged. Release happens only by manual dispatch. @@ -115,11 +124,11 @@ Line-ending governance for an operational repo is in [Line Endings](#line-ending A repo whose own stacks or scripts read local runtime credentials from disk keeps them in a dotted `.secrets/` directory at the repo root. The most common case is an operational repo's Docker Compose stack. This is the repo-scoped counterpart to the host-scoped `~/.secrets/` convention a repo's own `OPERATIONS.md` may document. It is a different thing from `spec/secrets.json`, the CI/GitHub Actions secret-name registry `spec/audit.py` cross-checks. `spec/secrets.json` governs what a workflow reads from GitHub Actions. This convention governs what a repo's own process reads from its own checkout. - **The directory is named `.secrets/`, dotted, never a bare `secrets/`.** -- **A secret file's name is lowercase fields joined by `_`** (`homeassistant_db_password`, `mail_relay.env`), per [`CODESTYLE.md` "Script and Utility File Names"](./CODESTYLE.md#script-and-utility-file-names). +- **A secret file's name is lowercase fields joined by `_`** (`widget_db_password`, `widget_mail_relay.env`), per [`CODESTYLE.md` "Script and Utility File Names"](./CODESTYLE.md#script-and-utility-file-names). - **A host secret file a repository installs in `~/.secrets/` is named `_[_]`**, `` being its registry `shortName`, and the `github_` provisioning namespace is unchanged. -- **A single opaque credential file carries no extension** (`homeassistant_db_password`, not `homeassistant_db_password.txt`), the same reason `README` and `LICENSE` carry none. It is a security property, read but never sourced, not a formatting preference. +- **A single opaque credential file carries no extension** (`widget_db_password`, not `widget_db_password.txt`), the same reason `README` and `LICENSE` carry none. It is a security property, read but never sourced, not a formatting preference. - **A structured credential keeps its format's extension** (`.json` for structured config). -- **The shared env file is named for what it configures**, not a bare `.env` (`docker.env` for a repo whose stacks are Docker Compose). A second env-shaped file added later then stays unambiguous. +- **The shared env file is named for what it configures**, not a bare `.env` (`widget_docker.env` for a repo whose stacks are Docker Compose). A second env-shaped file added later then stays unambiguous. - **Every real secret file has a tracked `.example` beside it**, and only the `.example` files plus a `README.md` catalog are un-ignored: ```gitignore @@ -128,7 +137,7 @@ A repo whose own stacks or scripts read local runtime credentials from disk keep !**/.secrets/README.md ``` - A fresh checkout then documents its own required shape without ever exposing a real value. This negation keeps a real secret file out of a **new** commit. It does not remove one already tracked: `.gitignore` has no effect on a path git already follows. A real secret file found tracked is removed from the index (`git rm --cached `) and its credential is rotated, not just added to `.gitignore` going forward. + A fresh checkout then documents its own required shape without ever exposing a real value. This negation keeps a real secret file out of a **new** commit. It does not remove one already tracked: `.gitignore` has no effect on a path git already follows. A real secret file found tracked is removed from the index (`git rm --cached ""`) and its credential is rotated, not just added to `.gitignore` going forward. - **`.secrets/README.md` is a catalog**, one row per file naming what it holds and what consumes it. It adds a short note on how the directory relates to `~/.secrets/` where the repo also touches that. - **A repository whose shell scripts read a credential from disk declares the `host-secrets` type, and reads each one through the carried readers.** A credential is a secret file or an env file holding one, in `.secrets/` or in the host-scoped `~/.secrets/`, and this bullet reaches both. A single inline read counts, since it is the read a bare existence check and a sourced file get wrong. A script sources its carried `lib/fleet/sh/secrets.sh`, per "Hub-Hosted Tooling", and checks the file before reading it. A private file takes `require_secret` or `secret_set_verdict`, and one a container reads as a Docker secret takes `secret_verdict` with `shared`. It reads one value from an env file with `read_env_value` rather than sourcing the file into its own shell. @@ -140,7 +149,7 @@ The fleet's tooling lives in the hub once and a repository runs it from there ra **Code a repository's own runtime executes is the exception, and it is carried.** Such a library runs on a host the project owns, often unattended and sometimes as root. Fetched from the hub at run time, it would let a GitHub outage or a bad `main` commit stop a scheduled host job. It would also run code the repository never reviewed against its own secrets. So offline operation and review in the repository that runs it outweigh the staleness of a copy. A gate differs, since "the tool did not run" is an acceptable answer there and CI is the backstop. The hub hosts the library once. A repository whose declared types select it carries it byte-for-byte, as a tree the hub's `spec/files.json` declares. The hub owns the carried directory whole. The repository extends the library in a file of its own outside it that sources it, never by editing the copy. The staleness is made visible rather than accepted. The repository gate compares each carried tree with the hub tree its pinned action holds. It reports a difference as a warning that never fails the gate. A failure would break every downstream pull request on each hub fix. The audit reports a stale copy, and the resync refreshes it. -**Reaching it is a checkout of the hub rather than a copy of one file.** A tool reads the payloads, tables, and sibling modules beside it. So a single file lifted out of the tree runs against whatever the caller happens to have. That is the copy problem again in a shorter loop. Read `main`, the promoted and gated state, and fetch immediately before running. That is because a clone is whatever it last fetched rather than the branch it names, and a stale clone answers confidently instead of failing. For a repository whose registry entry has merged to `develop` but not yet reached `main`, run `repo-config/configure.sh` and `spec/audit.py` from `develop`. Name the tool by its path in that checkout and name the target explicitly. That is because a tool that defaults to the current directory or the current repository resolves somewhere either way. It is also because a result computed against the wrong repository is well-formed. Which directory the command runs in is the tool's own contract rather than a rule here. So a gate reading a working tree runs in the repository under test. Likewise, a tool taking its target as an argument runs anywhere and is given one. What the rule forbids is letting a default decide which repository the answer is about. +**Reaching it is a checkout of the hub rather than a copy of one file.** A tool reads the payloads, tables, and sibling modules beside it. So a single file lifted out of the tree runs against whatever the caller happens to have. That is the copy problem again in a shorter loop. Read `main`, the promoted and gated state, and fetch immediately before running. That is because a clone is whatever it last fetched rather than the branch it names, and a stale clone answers confidently instead of failing. For a repository whose registry entry has merged to `develop` but not yet reached `main`, run `repo-config/configure.sh`, `scripts/carry.py`, and `spec/audit.py` from `develop`. That run is an exception to the `AGENTS.md` "Fleet Bootstrap" rule that the hub's `main` is ground truth. It exists because these tools resolve a repository through its registry entry, which `main` does not hold yet. Name the tool by its path in the hub checkout holding it, and name the target explicitly. That is because a tool that defaults to the current directory or the current repository resolves somewhere either way. It is also because a result computed against the wrong repository is well-formed. Which directory the command runs in is the tool's own contract rather than a rule here. So a gate reading a working tree runs in the repository under test. Likewise, a tool taking its target as an argument runs anywhere and is given one. What the rule forbids is letting a default decide which repository the answer is about. **A loader is outside this section rather than exempt from it.** The rule above governs a tool that reads hub content, because a tool reads the payloads, tables, and sibling modules beside it. A loader reads none of them. It obtains a tree and hands control to a tool inside that tree, on a host that cannot yet obtain one. The bound is what it may contain rather than who runs it, and it is one line. A loader references no path inside the tree it fetches except the single entry point it hands control to. Everything else it touches is the machine or the network. A loader that grows a second path into that tree has become a tool and is governed above. @@ -152,13 +161,13 @@ The fleet's tooling lives in the hub once and a repository runs it from there ra ## Pull Request Title and Commit Message Conventions -A PR title and a commit message share one contract. The subject is imperative, 72 characters or fewer, and has no trailing period. Vague titles like `update stuff` or `wip` are out, while Dependabot's `Bump X from Y to Z` is fine as-is. Unsolicited `Co-Authored-By:` lines are out. So is any release-bump magnitude in the title, since Nerdbank.GitVersioning computes the next version from `version.json` and git history. +A PR title and a commit message share one contract. The subject is imperative, 72 characters or fewer, and has no trailing period. The 72 measures the authored title or subject, and the `(#N)` suffix a squash merge appends sits outside it. Title case lowercases only the bind words the skill lists, and that list is exhaustive. Vague titles like `update stuff` or `wip` are out, while Dependabot's `Bump X from Y to Z` is fine as-is. An agent may add a `Co-Authored-By:` line unless the user disallows it, and a repository's own rules may change that default. A link to the agent's session, such as a `Claude-Session:` trailer, is never allowed in a commit message or a pull request. Neither the user nor a repository's rules can allow one. Also out is any release-bump magnitude in the title, since Nerdbank.GitVersioning computes the next version from `version.json` and git history. This is packaged as the `comment-and-doc-style` Skill at `.agents/skills/comment-and-doc-style/SKILL.md` in the hub. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. The summary above sketches the contract. Read the skill for the full format, rules, and examples. ## Documentation Style Conventions -The fleet's prose and formatting contract, applied to docs and code/workflow comments alike. It governs what a carried file may reference, Markdown link, heading, and tense structure, and the comment philosophy. It also holds the ASCII character-set tiers, the line-ending policy, and the sentence-structure house style. It bans naming an issue, a pull request, or a commit in a comment, a docstring, or an instruction document. And it holds the rules keeping a quantitative claim honest and an incidental count out of the text. +The fleet's prose and formatting contract, applied to docs and code/workflow comments alike. It governs what a carried file may reference, Markdown link, heading, and tense structure, and the comment philosophy. It also holds the ASCII character-set tiers, the line-ending policy, and the sentence-structure house style. It bans naming an issue, a pull request, or a commit in a comment, a docstring, or an instruction document. And it holds the rules keeping a quantitative claim honest and an incidental count out of the text. It also keeps a command a reader copies and runs safe to paste. This is packaged as the `comment-and-doc-style` Skill at `.agents/skills/comment-and-doc-style/SKILL.md` in the hub. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. The summary above sketches the contract. Read the skill for the full rules. @@ -186,20 +195,25 @@ ASD-STE100's structural half is the adopted house style: short sentences, one in Text refers to an enumeration rather than stating its size, so it writes "the following checks", "each case", or "the rows below". This holds in every fleet repository, for docs, code and workflow comments, and docstrings alike. A stated count is a second copy of what the list or table already shows, and nothing keeps the two copies in sync. Every later edit to the enumeration then owes an edit to the sentence, and a missed one surfaces as a review finding. A word such as "both" or "all three" is a count too, where the list it counts can grow. A count is written only where the number is what the reader needs, such as a limit, a threshold, or a measured result. Such a count names its source, such as the constant or the measurement, so a reader can re-derive it. A wrong incidental count is fixed by removing it rather than by correcting it, since a corrected number goes stale the same way. +### Copy-and-Run Commands + +A command in Markdown is text a reader copies and runs, so it has to run as written once pasted. That covers a code span opening with a command and every line of a shell fence. Such a command holds no bare ``, since the shell reads `<` as a redirection and the paste dies before the command runs. It holds no bracketed `[Placeholder]` either, since the shell reads that as a glob. The glob expands silently to any one-character file it matches. And it holds no bare `a|b` alternation, since the shell reads that as a pipe. The left-hand side then still runs, a live write included, while its own output vanishes behind an error from the right-hand side. A real pipe is spaced, so it never reads as an alternation. A placeholder is quoted instead, as in `git branch -d ""`, so the shell reads it as one word rather than as syntax. The quotes wrap the placeholder alone where its value may need the shell to expand it, such as a path opening `~`. The reader fills the value in inside the quotes. A value that is several arguments, such as a command and its own arguments, or one the shell must expand, replaces the quotes too. A single argument holding spaces keeps them. Inside a string handed to a second shell, such as the one `sh -c` runs, the placeholder is quoted within that string. A choice between values is written as the common value, with the other named in a parenthetical after the command. So `repo-config/configure.sh check "/" release` is followed by "(substitute `operational` for an operational repo)". In a shell fence that parenthetical is a trailing comment instead. An optional flag is not written in brackets, since that is a glob too. It is left out of the command and named in the parenthetical. The rule holds for every such command, one naming a single argument in prose included. That is because whether a reader pastes a span whole is a judgment no check can make. The prose gate's `paste-safe` rule enforces it for the commands its data file names. It also reads a string handed to a second shell, as `su -c`, `sh -c`, `bash -c`, and `ssh` take one, as the command that shell runs. + ## Verification Discipline The checks that separate work actually done from work that merely reports success. A pattern that matches less still exits zero, and a gate that stops gating still reports success. - **Locate every check a change owes before running any of them, and CI's coverage is not that list.** The checks are read from what the repository declares, rather than inferred from whatever the pipeline happens to run. What it declares means its `OPERATIONS.md` "Local Verification" section alongside the workflows. Part of a repository's contract is routinely unreachable from a runner. Examples are a redirect no build serves, a deploy no pull request performs, and hardware no runner holds. So the check covering that part lives in a document rather than in a workflow. It is run by hand before the pull request opens. Green is then the precise signal that it was skipped. That is because the pipeline reports success over the half it reaches while saying nothing about the half it cannot. Reading a document's own description of itself is not how such a check is found. That is because a topical document is named for its most visible function, usually a post-merge one. It is also because an accurate description of that function routes a pre-merge task away from the file holding the gate. The destination is declared fleet-wide for that reason, rather than left to how well each repository worded a pointer to it. A repository whose `OPERATIONS.md` carries no such heading, or carries no such file, is missing content it owes. In that case, read that file whole where it exists, and the workflows beside it either way. Report what is absent rather than reading its absence as an answer that no local check applies. - **A test runner failing to spawn is not evidence that no test coverage applies here.** `uv run pytest` failing to spawn in a lint-only Python Scripts profile is that profile working as intended, not a missing dependency. The `python-codestyle` Skill's Two Profiles section states this. Read the actual invocation from the same `OPERATIONS.md` "Local Verification" section the bullet above names, rather than guessing a generic test-runner command. Report that document's own command result, not the guessed command's failure. -- **A test must assert the mechanism it names, and a gate has to be watched failing.** Label each case by the behavior it proves, then write the case that reintroduces the fault and confirm the gate objects to it. A case that passes for an incidental reason, the right answer reached by the wrong path, is worse than no case. That is because it is later cited as evidence. A proof that restates the gated data instead of reading it proves only that the function works. So drive the real table or the real config. And a gate that finds nothing is indistinguishable from a gate with nothing to find, so assert a floor on what a healthy run covers. +- **A test must assert the mechanism it names, and a gate has to be watched failing.** Label each case by the behavior it proves, then write the case that reintroduces the fault and confirm the gate objects to it. A case that passes for an incidental reason, the right answer reached by the wrong path, is worse than no case. That is because it is later cited as evidence. A proof that restates the gated data instead of reading it proves only that the function works. So drive the real table or the real config, read as data. A call that would change state as "Repository Boundaries and Write Safety" bounds it is still stubbed or dry-run. And a gate that finds nothing is indistinguishable from a gate with nothing to find, so assert a floor on what a healthy run covers. - **Gates, filters, and gate-like watchers fail loud, never narrow quietly.** A pattern that silently matches less, an allowlist that silently stops matching, or a gate that silently stops gating all report success while doing nothing. When a construct exists to notice something, make the not-noticing case produce an error or an annotation. An identity allowlist used as a gate, for one, must raise an error when its list stops matching, not silently pass everything through. - **Config with a uniqueness rule is validated on read, and its consumers assert what it promised.** A repeated key in a lookup table is not a precedence question to settle quietly. It is two answers to one question. Keeping whichever came last picks one of them where the reader sees no choice being made. Fail on the duplicate at the point the config is read, so the code downstream can rely on the invariant instead of re-deriving it. - **Validate and read on the same normalized key.** A guard that compares stripped names while the join looks up the raw one passes a padded key and then matches nothing. So the exact fault the guard exists to stop is sitting inside the guard. Normalize once at the boundary and use that one value for both the check and the lookup. -- **Every push toward a pull request is preceded by a local adversarial review of the branch's whole diff, and the pass is recorded.** The rule binds every push rather than the first one. So a fix push answering a reviewer's finding owes a pass exactly as the branch's first push did. That is the round it is actually skipped on. The fix looks small, the branch was reviewed once already, and what goes up is content no review has read. Skipping it does not save the round. It moves it into the fix-commit and review-comment cycle, which spends wall-clock, Actions runtime, and agent tokens finding what a local pass would have. The pass itself, its delegation shape, and its model tier are the `local-strict-review` Skill's. `scripts/local_review.py` records it keyed on the content the reviewer actually saw. So a capture point can ask whether a receipt still covers what is about to be pushed. It need not trust the rule to have been remembered. The pass is mandatory and its findings are advisory, which are opposite claims worth keeping apart. A pass is recorded whether it raised ten findings or none. Disposing of each one is judgment, per `GOVERNANCE.md` "PR Review Etiquette". -- **Canonical content one repo authors and others carry is read the way a carrier reads it, whole, in the repo that can fix it. That read is swept periodically rather than owed by a push.** Such content is written and merged against a diff of a few lines. It reaches a reviewer as a new file, in full, only when a repo carries it for the first time. So the first real read of a rule happens where nothing can be done about the result. That is because the tree is manifest-owned, and the copy is compared against the authoring repo's, byte for byte wherever the declared fidelity is verbatim. It is also because a local edit there is drift on the next fidelity check. Where the fidelity is intent the carrier may adapt its own copy. The defect still has to be fixed at the source, since every other carrier holds it too. Every carrier after that re-discovers the same defect. The finding arrives in a session holding no checkout of the authoring repo and no standing to test the claim. The unit is what a reviewer reads whole. The carry manifest, `spec/files.json` in the hub, rather than the document decides what is a unit, down to which files carry units at all. So the engine that reads that manifest is the authority on the set rather than any restatement of its rules. In the ordinary case a unit is one level-two section of a carried Markdown canonical, which is the fidelity unit `spec/section-model.md` declares. The read is of the unit's whole current text rather than of the diff that moved it. The pass itself, its delegation shape, and its model tier are the `local-strict-review` Skill's, exactly as they are for the pass above. **The read is swept because owing it at every push cost too much to keep owing it there.** Measured across this fleet's review rounds, the passes a push owed were a large share of what a pull request spent. What they returned was never measured against that. So the read moves to a schedule on the cost alone, rather than being owed by whichever change happens to touch a unit. A change that moves a unit is no longer refused over one. No capture point asks a change for a pass of this kind. The diff pass the bullet above requires is owed by every push exactly as before. What replaces the per-push read is a schedule in the authoring repo. It gathers the work into one piece and files it where an agent session can run the passes and fix what they find. That work is every unit whose text has moved past the pass that read it. That work also covers a bounded slice of the units nothing has read there at all, taken newest-committed first. The slice is what keeps a newly authored unit from waiting on a volunteer. That is because such a unit has no earlier pass to move past. It is also because such a unit would otherwise reach a carrier with nothing having asked to read it. That is the case this whole rule is about. A unit newly carried by widening the manifest alone is not reached that way. The order reads the unit's own file rather than the manifest. So such a unit joins the backlog at that file's age. There a section written and declared in one commit leads like any other newly authored one. Bounding it is what keeps a long backlog from arriving as one week's work. `scripts/canonical_review.py` records each pass keyed on the content the reviewer saw, and names both sets. So the sweep's list is read off that record rather than remembered. Its ledger is tracked content the change carrying it commits like any other. Like the pass above, a pass the sweep asks for is mandatory and its findings are advisory. +- **Every push toward a pull request is preceded by a local adversarial review of the branch's whole diff, and the pass is recorded.** The rule binds every push rather than the first one. So a fix push answering a reviewer's finding owes a pass exactly as the branch's first push did. That is the round it is actually skipped on. The fix looks small, the branch was reviewed once already, and what goes up is content no review has read. Skipping it does not save the round. It moves it into the fix-commit and review-comment cycle, which spends wall-clock, Actions runtime, and agent tokens finding what a local pass would have. The pass itself, its delegation shape, and its model tier are the `local-strict-review` Skill's. The hub-hosted `scripts/local_review.py` records it keyed on the content the reviewer actually saw. So a capture point can ask whether a receipt still covers what is about to be pushed. It need not trust the rule to have been remembered. The pass is mandatory and its findings are advisory, which are opposite claims worth keeping apart. A pass is recorded whether it raised ten findings or none. Disposing of each one is judgment, per `GOVERNANCE.md` "PR Review Etiquette". +- **Canonical content one repo authors and others carry is read the way a carrier reads it, whole, in the repo that can fix it. That read is swept periodically rather than owed by a push.** Such content is written and merged against a diff of a few lines. It reaches a reviewer as a new file, in full, only when a repo carries it for the first time. So the first real read of a rule happens where nothing can be done about the result. That is because the tree is manifest-owned, and the copy is compared against the authoring repo's, byte for byte wherever the declared fidelity is verbatim. It is also because a local edit there is drift on the next fidelity check. Where the fidelity is intent the carrier may adapt its own copy. The defect still has to be fixed at the source, since every other carrier holds it too. Every carrier after that re-discovers the same defect. The finding arrives in a session holding no checkout of the authoring repo and no standing to test the claim. The unit is what a reviewer reads whole. The carry manifest, `spec/files.json` in the hub, rather than the document decides what is a unit, down to which files carry units at all. So the engine that reads that manifest is the authority on the set rather than any restatement of its rules. In the ordinary case a unit is one level-two section of a carried Markdown canonical, which is the fidelity unit `spec/section-model.md` declares. The read is of the unit's whole current text rather than of the diff that moved it. The pass itself, its delegation shape, and its model tier are the `local-strict-review` Skill's, exactly as they are for the pass above. **The read is swept because owing it at every push cost too much to keep owing it there.** Measured across this fleet's review rounds, the passes a push owed were a large share of what a pull request spent. What they returned was never measured against that. So the read moves to a schedule on the cost alone, rather than being owed by whichever change happens to touch a unit. A change that moves a unit is no longer refused over one. No capture point asks a change for a pass of this kind. The diff pass the bullet above requires is owed by every push exactly as before. What replaces the per-push read is a schedule in the authoring repo. It gathers the work into one piece and files it where an agent session can run the passes and fix what they find. That work is every unit whose text has moved past the pass that read it. That work also covers a bounded slice of the units nothing has read there at all, taken newest-committed first. The slice is what keeps a newly authored unit from waiting on a volunteer. That is because such a unit has no earlier pass to move past. It is also because such a unit would otherwise reach a carrier with nothing having asked to read it. That is the case this whole rule is about. A unit newly carried by widening the manifest alone is not reached that way. The order reads the unit's own file rather than the manifest. So such a unit joins the backlog at that file's age. There a section written and declared in one commit leads like any other newly authored one. Bounding it is what keeps a long backlog from arriving as one week's work. The hub-hosted `scripts/canonical_review.py` records each pass keyed on the content the reviewer saw, and names both sets. So the sweep's list is read off that record rather than remembered. Its ledger is tracked content the change carrying it commits like any other. Like the pass above, a pass the sweep asks for is mandatory and its findings are advisory. - **Another round of edits after either pass is owed only while a defect this change introduced or fixes in place is open.** A finding count never owes one. Which findings count as introduced, what each class owes, and how many rounds a push may spend are the `local-strict-review` Skill's. - **Run the repo's whole lint gate before every push, not the parts that look relevant.** CI runs all of them, so a partial local run only defers the failure. The tool most likely to catch a given change is often the one it seems least about. An edit that manipulates line endings is exactly when `editorconfig-checker` matters. The repo documents each linter's known-working invocation, and this rule is that **all** of them run. +- **Run the repo's whole test suite before every push, not the modules a change touches.** Run it in the invocation `OPERATIONS.md` "Local Verification" declares, as the bullets above require. CI runs every case a runner can reach, so a partial local run only defers the failure, as it does for the lint gate. A suite can hold tests that judge every file in the tree, so a change can fail a module it never touched. - **Editing CRLF files programmatically: `.` matches `\r` in a regex**, so a captured line keeps its carriage return and rejoining with `\r\n` yields `CRCRLF`. Prefer literal replacement over regex reassembly. In Python the *default* path is a text-mode rewrite, which has the mirror failure. `Path.read_text()` decodes through universal newlines and `write_text()` translates each `\n` back to `os.linesep`. So a read-edit-write round trip rewrites every line ending in the file to the host's own while the edit itself looks correct. Work in bytes, or open the file explicitly with `newline=''` on both the read and the write. That is because a read that preserves the endings still hands them to a write that translates them. Use `open()` rather than `Path.read_text()`, which accepts that argument only on Python 3.13 and newer and raises `TypeError` below it. The corruption is worth naming because it is invisible in a rendered diff. - **Scope a check by what the project declares, not by the file that prompted it.** A check written while editing one file tends to cover that file's language and stop. It then reports success on every other surface the rule governs. Read the declared types, or the config that enumerates them, and cover each one. Then assert a floor per surface, so a table that narrows fails loudly instead of passing quietly. A rule about comments means every comment syntax the project ships. A format that carries comments in practice counts even where its specification says otherwise. - **Never write source text carrying backslash escapes through a shell construct that interprets them.** A `printf` format string, a `printf` argument consumed by `%b`, `echo -e`, POSIX `sh`'s builtin `echo`, and `$'...'` each consume the escape. Each writes an invisible control character in its place. So a `\b` inside a regex becomes a backspace, and the pattern silently matches nothing while every test still passes. A quoted heredoc, `<<"EOF"`, is not one of those constructs and writes every backslash literally. An unquoted `< main promotion whose head round states no coverage has further ways to be covered, which the `pr-review-conduct` Skill's Merge Gate states. Triage every finding, including low-confidence findings collapsed into the review body rather than threads. Reply to and resolve every addressed finding. Repeat after every fix until the checks are green, the current head is covered, and no finding is left open. Only an explicit maintainer instruction may stop, defer, or alter this default. Silence or a request that says only "open a PR" is not such an instruction. Never merge on a green or CLEAN merge state alone. That state does not prove the review covered the current head SHA and full diff. It also does not expose unanswered low-confidence findings that opened no thread. +The provider-agnostic review-loop contract every fleet repo follows starts when a pull request opens. Open every fleet-owned pull request ready for review. Draft state is reserved for the separately documented upstream contribution workflow while a third-party contribution is still being prepared. Creating the pull request is not a terminal handoff. Run the review status once in the foreground. Then start the bounded review wait in a background process. Which bots review which pull requests, when, and how often is the repository's review policy. That policy is the `review` section of `.github/agent-policy.json`, or the hub's `spec/agent-policy.default.json` where the repository states none. The review wait reads that policy from the pull request's base branch. It sends each request the policy asks it to send. A bot the policy marks automatic is left to start on its own, except a gated Copilot, whose missed start it fills. So the loop below runs the same whether a repository's reviews arrive automatically or on request, and nothing here names which. Under the hub default, a Copilot review is requested at one defined moment rather than on every push. That moment is the head of a pull request into the default branch, a promotion among them. The review wait also requests one on any other pull request where a partial round or a truncated review history is on record. On a pull request into any other branch, every head is covered instead by the recorded local pass the push already owes. That pass is published to the pull request so the review status can read it. The `pr-review-conduct` Skill's Merge Gate states when that published pass counts as coverage. Confirm that the current head SHA is covered by a review or, on such a pull request, by that published pass. Also confirm that a review covers the full diff rather than only part of it. Where no round covering the head states coverage, a round covering it whose own file table names exactly the changed files covers it. That is the reading a Copilot round at Balanced review effort gives. Where no round covering the head carries its own table, the newest round that does stands in where its table names exactly the changed files. The bound is that file set rather than file recency. The carry exists for a later head that changed those files and drew a round with no table of its own. Either table may leave out an added, modified, renamed, or deleted file with no changed line, such as a binary. That holds while some changed file has one. A table stands in only where no Copilot round on the pull request, on any commit, states partial coverage. So a pull request that ever had a partial round goes to the maintainer. A pull request into the default branch, a promotion among them, can have further ways to be covered where its head round states no coverage. The `pr-review-conduct` Skill's Merge Gate states them. Triage every finding, including low-confidence findings collapsed into the review body rather than threads. Reply to and resolve every addressed finding. Repeat after every fix until the checks are green, the current head is covered, and no finding is left open. Only an explicit maintainer instruction may stop, defer, or alter this default. Silence or a request that says only "open a PR" is not such an instruction. Never merge on a green or CLEAN merge state alone. That state does not prove the review covered the current head SHA and full diff. It also does not expose unanswered low-confidence findings that opened no thread. This is packaged as the `pr-review-conduct` Skill at `.agents/skills/pr-review-conduct/SKILL.md` in the hub. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. The summary above sketches the contract. Read the skill for the merge gate, the expected loop, and how a finding is closed. @@ -253,7 +268,9 @@ The hub's `scripts/pr_review.py` implements the provider-specific mechanics this - **Reference every pull request as a clickable link.** When you mention a PR on a surface that renders Markdown (chat, a summary, a report), render it as a Markdown link to the PR. Write it as `[#N](https://github.com/OWNER/REPO/pull/N)`, never a bare `#N`. The same applies to issues and commits. **The form follows the surface.** Some surfaces link neither a Markdown link nor a bare URL, an interactive prompt's question and option text among them. Pasting a full URL into one of those does not rescue it, since the reader gets a string to copy. That is the outcome this rule exists to prevent. There the reference is a bare `#N`. The clickable link goes in the message that comes **before** the prompt rather than merely alongside it. That is because the prompt blocks on an answer, and a message emitted after it is read once that answer is already given. That is the one moment the link is no longer any use. The test is whether the reader can click it where it is read, not whether it was written in the syntax that works elsewhere. - **Put a command the user must run where the user can run it.** This session's input line is where the user types to the agent. A command runs outside this session where this session's input line cannot run it or cannot hold its effect. One waiting on typed input, such as a password or a confirmation, is such a command. So is one meant for another host, or one setting a variable the session reads at launch. Every other one runs at this session's input line, where that line can run a command, and outside the session otherwise. **A command the user runs outside this session goes in the question's own text.** Where a question asks the user to run one, the question carries the exact command, complete and ready to paste. A message before the prompt may repeat the command, but the question never points at that message. A question pointing at it can leave the reader to find the command among a long run of earlier output. Such a command stays in the prompt, where the turn opens one, although the clickable-link bullet above moves a link out of one. The command needs no rendering, since the prompt shows it as plain text the reader can copy. **A command the user runs at this session's input line never goes in an interactive prompt.** On Claude Code such a command is a `!` line, typed at the session's input line so its output lands in the session. While an interactive prompt is open, the user cannot type at the session's input line. So a command placed in one sits in the one surface that blocks running it. It goes in a plain message instead, as a fenced block holding the `!` line itself, complete and ready to paste. Several commands join on that one line with `&&`, which runs them in order and stops at the first that fails. The block opens the message. Any question the same turn owes follows it as a numbered list, and any report comes after both. The message asks the user to reply once the command has run, and the turn ends with no interactive prompt open. The agent then checks the result on the user's next message. It reads back the state the command was meant to change, or the output it left in the session. An answer saying the command ran is not that check. -- **Ask every question through the interface's prompt, never in prose.** When you need the user to decide, answer, or approve anything, put it to them through the interface's own prompt mechanism. Do so whether or not work is blocked on it. An offer to do more work ("want me to file that?") is a question like any other. A question written into a message is lost in the report around it, however short it is. One closing a long report sits where the reader is least likely to reach it. Where no prompt mechanism is available, the questions go as a numbered list opening the message rather than closing it. The user can then reply per number. A turn asking for a command the user runs at this session's input line is an exception, per the command bullet above. It puts every question it owes in that message, since a prompt open beside the command would block the place it runs. This bullet settles how a question is put once it is asked. Whether a question is asked now or recorded for later is the parking bullet's to settle. That is the one opening "A question filed as an issue is parked rather than asked". +- **Ask when the user can cheaply confirm.** An assumption that saves one question and is wrong costs the rework plus the trust. So a genuine ambiguity in intent, scope, or authorization is raised, not resolved by picking the likelier reading. Rules that already answer the question (the committed instruction set) are not ambiguity, so read them first rather than asking what they state. +- **The irreversible step (merging, publishing, releasing, force-pushing, deleting, changing branch protection) stays the maintainer's.** **A grant given in a past session or for a different task authorizes nothing now.** Whether a credential's reach or a tool that happens to work authorizes anything is answered by `GOVERNANCE.md` "Repository Boundaries and Write Safety" rather than here. +- **Ask every question through the interface's prompt, never in prose.** When you need the user to decide, answer, or approve anything, put it to them through the interface's own prompt mechanism. Do so whether or not work is blocked on it. An offer to do more work ("want me to file that?") is a question like any other. A question written into a message is lost in the report around it, however short it is. One closing a long report sits where the reader is least likely to reach it. **Each question reads whole from its own text.** It states the problem, why it is being asked, and what each option does, in plain words. It may cite an issue or a pull request by number. The question and its options still read fully without opening it. A question leaning on an issue for its meaning is often answered without reading that issue, so the answer misses its point. Where no prompt mechanism is available, the questions go as a numbered list opening the message rather than closing it. The user can then reply per number. A turn asking for a command the user runs at this session's input line is an exception, per the command bullet above. It puts every question it owes in that message, since a prompt open beside the command would block the place it runs. This bullet settles how a question is put once it is asked. Whether a question is asked now or recorded for later is the parking bullet's to settle. That is the one opening "A question filed as an issue is parked rather than asked". - **Raise work blocked on the user as a direct interactive prompt.** When progress needs a decision, an authorization, or an answer only the user can give, ask for it at the point the work stops. Ask through the interface's own prompt mechanism. Never leave it as prose in a summary. A handoff buried in a paragraph is a handoff that did not happen. That is because a summary reads as a report of finished work. It is also because the one line still waiting on the user is the easiest in a summary to skim past. The blocked item is the message, not a closing remark on a message about something else. **The options offered are the actions themselves.** The one that unblocks the work names the action it authorizes ("squash and merge it"). Selecting it is then the go-ahead rather than a note to act on later. Offering only ways to wait is the same failure in interactive clothing. That is because a prompt whose every choice is inaction reports the block rather than clearing it. Where the agent may not perform the authorized action itself, the option says who does it. Where no interactive prompt is available, the numbered list the bullet above names is the fallback. In a turn asking for a command the user runs at this session's input line, the command bullet above replaces the interactive prompt. - **Lead every choice with a recommendation and its reason.** Wherever the user is asked to choose, in a prompt or in a numbered list, the option the agent recommends comes first. It is marked as the recommendation, and every option states the reason for it. A user who takes the recommendation then reads one line, and one who does not sees what the other options trade away. A question with no defensible recommendation says so rather than inventing one. Where an open question has no options and the agent does have an answer, that answer and its reason go in the question's text. They never go in as an invented option. - **A question filed as an issue is parked rather than asked, and it stays owed.** Where the work cannot continue without the answer, the interactive-prompt bullet governs and the question is asked at the point the work stops. Wherever the question is recorded rather than asked, recording it is the right thing to do, and recording it is still not asking it. That holds whether the work can continue without the answer or the question was asked once and deferred. So the issue carries the fleet's `decision` label. When the filing session knows the choices the question is between, the issue states them. The label and the stated choices are what let a later session, one that was not there when the issue was filed, find the question. That session can then put the question to the user without inventing its answers. **The parked queue is the failure, not the parking.** An issue holding a question the user has never seen reads to every later session as tracked work rather than as a block. So each session files correctly and moves on. Presenting the accumulation is the step nobody owns. @@ -268,11 +285,12 @@ These conventions bind every workflow. [`WORKFLOW.md`](./WORKFLOW.md) section 4 An overlap with `WORKFLOW.md` resolves **by subject**, never by blanket precedence. This section keeps the full style rules and wins on them, stating each in more detail than the guarantee that carries it. `WORKFLOW.md` wins on the architecture, the contract, and the test methodology. `WORKFLOW.md` section 2 points at this section rather than restating it. Throughout, a job is named by its id and a step by its `name:`. The `workflow-ci-contract` Skill at `.agents/skills/workflow-ci-contract/SKILL.md` in the hub surfaces it. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. - **Action pinning**: pin **every** action, first-party (`actions/*`) and third-party alike, to a commit SHA with a trailing comment naming the release tag at that SHA. Renovate / Dependabot can then still bump it, but a tag swap can't change the executed code. The comment spells the tag exactly as the referenced repository publishes it. That is `# vX.Y.Z` where its tags carry a `v`, and the bare tag, `# X.Y.Z`, where they do not. So the comment never names a tag that does not exist. This binds a `uses:` wherever it appears, in a workflow and in a composite action under `.github/actions/**` alike. The exception is a local (`./`) reference or a self-repository (`$/`) one, which names no ref to pin. In a workflow file, `$/` is GitHub's syntax for a path in the repository holding that file, resolved at that file's own commit. Use a major-only comment, `# vX` or the bare `# X` by the same spelling rule, only where a condition holds. That condition is that the upstream's floating major tag doesn't correspond to a specific patch/minor release SHA. That is because pinning to the floating-tag SHA still gives the SHA guarantee, and the version comment just records the major line. Documented exception (no SHA pin at all): `dotnet/nbgv` is consumed via `@master`. That is because the upstream tag stream lags `master` substantially and Dependabot's tag-tracking would propose a downgrade. **This applies to repo-owned build-layer leaves too**, since a leaf owning its build specifics is not a reason to use floating tags. It is also because Dependabot still bumps SHA pins (updating the SHA + version comment). +- **Checkout credentials**: every `actions/checkout` step sets `persist-credentials: false`. Left at its default, the action writes the token it checked out with into the checkout's git configuration. Every later step in that job, and anything such a step runs, can then read a credential it was never handed. The action still authenticates its own fetch through its `token` input either way. A job whose later step runs an authenticated git command against the remote, such as a push or a fetch, keeps the credential instead. Its checkout step then sets `persist-credentials: true`, with a comment above that line naming the step that needs it. An action that configures its own git credential from its own `token` input, such as `peter-evans/create-pull-request`, is not such a step. - **Filename**: a workflow declaring `on: workflow_call` ends in `-task.yml`, **whatever else it is also triggered by**, since that is the half the suffix is about. A workflow without `workflow_call` is an entry point (`push`, `pull_request`, `pull_request_target`, `schedule`, `workflow_dispatch`) and takes no `-task` suffix. It ends instead with what it does: `-pull-request.yml`, `-release.yml`. The suffix says the file is meant to be `uses:`-d, which stays true of a file that is also dispatchable. Composite actions are named by their path (`.github/actions//action.yml`), so these suffix rules do not reach them. - **Workflow `name:`** (the top-level `name:` field): a workflow declaring `workflow_call` takes a name ending in **"task"** (e.g. `Build project release task`). That matches the filename rule above and covers a file that is also dispatchable. Every other workflow takes one ending in **"action"** (e.g. `Publish project release action`, `Test pull request action`). The suffix tells an orchestrator from a callee while reading the source tree, and on the runs list for an entry point. It does not do that in the Actions UI for a callee. A called reusable workflow's jobs appear nested inside the caller's run as ` / `. And the runs list shows the caller's workflow name rather than the callee's own. - **Job and step `name:` suffixes**: every job's `name:` ends in **"job"** and every step's `name:` ends in **"step"**. That includes the PR-gate aggregator. The name its `pull_request` run posts is a required-status-check `context:` in a branch ruleset (`Check pull request workflow status job` in `test-pull-request.yml`). Where another event also triggers the workflow, the `name:` is the expression form `WORKFLOW.md` D1.5 requires. Each string that expression yields ends in "job" too. A trailing parenthetical qualifier after the suffix is allowed and is the only exception (`Upload coverage to Codecov step (Python)`), and nothing enforces the rule mechanically. A ruleset-bound job's `pull_request` name and its ruleset `context:` are the **same string**: rename them **together**, or required-status-check enforcement silently breaks. Every surface whose staleness breaks that enforcement moves in the same change, never one without the others. In a repository the surfaces are the live ruleset and its own workflow. A rename of the fleet-wide string additionally moves the hub's `repo-config/` payloads and its `spec/files.json` `requiredCheckName`. It also moves each adopter-facing stub in its `catalog/` and `docs/reusable-workflows.md`. Those surfaces exist only in the hub. Prose naming the old string goes stale rather than breaking, and follows behind. - **Concurrency**: top-level workflows declare `concurrency: { group: '${{ github.workflow }}-${{ github.ref }}', cancel-in-progress: true }` so a fresh push supersedes an in-flight run on the same ref. `cancel-in-progress: false` queues instead of cancelling, and queuing is not ordering. GitHub holds at most one pending run per group, and cancels the previously pending one when a newer run queues. So the guarantee it buys is that a **running** job finishes, rather than that every event runs in arrival order. **Documented exceptions** follow, each cited by number, never restated, in the comment above its implementing workflow's `concurrency:` key. (1) A merge-bot workflow keys the group on the **PR number** (`-${{ github.event.pull_request.number }}`) rather than on `-${{ github.ref }}`. Under `pull_request_target` the ref is the base branch, and keying on it would serialize every bot PR against it. The workflow takes `cancel-in-progress: false`, because cancelling mid-flight would leave auto-merge enabled or disabled inconsistently (`.github/workflows/merge-bot-pull-request.yml`). (2) A publisher keeps the ref-scoped group with `cancel-in-progress: false`. Cancelling a run can leave a partially pushed tag set or a half-created release. A newer run replaces the group's one pending run. So a push the publish plan does not publish appends `github.run_id` to the group, per `WORKFLOW.md` D7.1 (`catalog/snippets/workflows/publish-release.yml`). A `schedule` run on a publisher whose schedule never publishes does the same. The hub's own publisher is dispatch-only and omits the suffix. (3) A deploy workflow keys the group on the **environment** it deploys, with `cancel-in-progress: false`. That is because a cancelled deploy leaves a release uploaded and the pointer unflipped. (4) A workflow whose only write is one repository-scoped issue keys on the **workflow alone** with `cancel-in-progress: false`. That is because nothing it writes varies by ref. So a ref-scoped group would separate a scheduled run, which always runs on the default branch, from a dispatch made anywhere else. Each would then read no open issue and each would file one. A further reason is that a cancel between two writes can leave the first landed and the second unmade. (5) A workflow whose writes go to fixed branches regardless of the triggering ref keys on the **workflow alone** with `cancel-in-progress: true`. A ref-scoped group would let a dispatch from one ref and the scheduled run race on the same branches. Each run regenerates the whole branch and its pull request, so a newer run rewrites whatever a cancelled run left (`catalog/snippets/workflows/run-periodic-codegen-pull-request.yml`). -- **Shells**: every bash surface, a multi-line `run:` block and every committed bash script alike, starts with `set -Eeuo pipefail`. That means fail fast, fail on undefined vars, and fail on a failed pipe segment. It also lets an `ERR` trap inherit into functions, subshells, and command substitutions (`-E`). A shebang naming bash makes a script one whatever its extension. A single-line `run:` block is outside the rule. A one-liner that pipes or chains commands takes a multi-line block instead, since without `pipefail` a failed producer reads as success. The `-E` is defense in depth. The fleet ships no `ERR` trap today, so a script that later adds one inherits the behavior instead of silently losing it. A deliberately POSIX `#!/bin/sh` surface is not a bash surface. In practice that is a git hook that must run before any toolchain exists. It takes `set -eu`, dropping `-E` and `pipefail`, which `sh` does not carry. +- **Shells**: every bash surface, a multi-line `run:` block and every committed bash script alike, starts with `set -Eeuo pipefail`. That means fail fast, fail on undefined vars, and fail on a failed pipe segment. It also lets an `ERR` trap inherit into functions, subshells, and command substitutions (`-E`). A shebang naming bash makes a script one whatever its extension. A single-line `run:` block is outside the rule. A one-liner that pipes or chains commands takes a multi-line block instead, since without `pipefail` a failed producer reads as success. The `-E` is defense in depth. The fleet ships no `ERR` trap today, so a script that later adds one inherits the behavior instead of silently losing it. A deliberately POSIX `#!/bin/sh` surface is not a bash surface. In practice that is a git hook that must run before any toolchain exists. It takes `set -eu`. POSIX sh defines no `ERR` trap for `-E` to carry, and dash reads `-E` as its emacs editing option instead. A dash that predates its `pipefail` option rejects `set -o pipefail`, so the bash form aborts such a hook there. - **Conditionals**: multi-line `if:` uses the folded scalar `if: >-`, which joins the wrapped source lines back into one line. `WORKFLOW.md` D9.3 requires it. A literal block (`if: |`) evaluates the same, the expression lexer skipping newlines along with other whitespace. So this is a legibility rule rather than a correctness one, and it binds as a guarantee regardless. - **Boolean inputs**: a workflow triggered both via `workflow_call` and `workflow_dispatch` declares each boolean input in *both* trigger blocks. That is because one declaration does not propagate to the other. Which context reads it then decides the comparison, and the two are not the same. The `inputs` context **preserves the declared boolean** on both paths, so `if: ${{ inputs.foo }}` is read directly. The `github.event.inputs` context delivers **every** input as a string whatever its declared type, so a read through it is compared against `'true'`. Comparing a `github.event.inputs` read against the boolean `true` as well is dead rather than defensive. An operand-type mismatch casts each side to a number, and a non-numeric string casts to `NaN`. `NaN` compares equal to nothing, so `github.event.inputs.foo == true` is false even on the run where the input arrived as `true`. A both-forms comparison on an `inputs` read is merely redundant. `WORKFLOW.md` D7.3 is the contract this bullet's rationale serves, and wins on any disagreement. - **Validate input/state consistency at entry, fail fast**: this applies when a workflow's inputs must satisfy a cross-input or input-versus-derived-state invariant. Examples are the release branch having to match the computed version's prerelease status, or two inputs being mutually exclusive. Assert the invariant **once** at entry, before any expensive build or publish work, rather than as partial checks scattered deep in later jobs. One gate that fails fast with a clear `::error::` beats a late or one-directional check. Where later **jobs** depend on the assertion, it is a job of its own that they `needs:`. That is because `needs:` takes job ids and cannot name a step. Where the work it guards is in the same job, an entry step in that job is enough. Examples: `build-release-task.yml`'s `validate-release` job (branch-versus-prerelease, both directions), and the input-validating entry step in `publish-docker-readme-task.yml`'s own first job. That job also resolves the repository list, so a consumer of it depends on that job rather than on the validation alone. @@ -285,6 +303,7 @@ An overlap with `WORKFLOW.md` resolves **by subject**, never by blanket preceden ## Supported Development Platforms - **Cross-platform by default: Windows + macOS + Linux.** Linux runs natively (a Linux desktop, or SSH/remote into a Linux host), through a devcontainer on Windows or macOS, or through WSL2 on Windows. The devcontainer and WSL routes carry their own nuances (mounts, path translation, SSH-agent forwarding) but deliver the same toolchain. Editing is cross-platform through the GUI regardless of where code runs. Assume this default. +- **Within that default, Linux is the primary platform, Windows is fully supported, and macOS is best-effort.** A minimum tool version is never held down to what macOS ships. A macOS host may need extra installs to meet one instead, such as Homebrew's bash where code needs bash 4.4 and macOS ships 3.2. No CI runs on macOS. - **A repo's platform ceiling is set by its dependencies, not by tooling effort, so decide it per repo before writing dev tooling.** Narrow below the default only for a hard runtime ceiling, where the code can only execute or test on one platform. For example, a Home Assistant integration is Linux-only. HA Core has POSIX-only dependencies and will not run natively on Windows, so even maximal tooling yields only lint-only there. The narrowing axis is where code *executes* for dev and testing (native, SSH-remote, container, or CI), never where editing happens. - **Record a narrowed platform and its reason in the repo** (README/AGENTS) so the restriction reads as a deliberate dependency ceiling, not an omission. @@ -296,14 +315,14 @@ This repo ships no devcontainer. Development is native .NET SDK tooling on any o - **VS Code is the primary IDE, and the experience favors it.** Prefer VS Code tasks and launch configurations for building, running, and testing over ad-hoc shell scripts. A script is the fallback, not the default. - The `.code-workspace` file carries the shared editor settings and the recommended-extension set. **All VS Code settings and extension recommendations live only here, never in a standalone `settings.json` or `extensions.json` under `.vscode/`.** The tracked files there are only `tasks.json` and `launch.json`. A repository shipping Python lists that folder's `settings.json` in `.gitignore`, because the Python extension installs the Python Environments extension, which writes settings there. Settings live only in the `.code-workspace` file all the same, and the entry keeps git from adding the generated file. A **standard set** of extensions applies to every repo (markdownlint, cspell, editorconfig, markdown-all-in-one, better-todo-tree), kept to extensions that work without a separately installed tool. A repo shipping a language adds that language's **defaults** (.NET: csdevkit, csharpier. Python: python, pylance, ruff, mypy. Docker: the Docker extension). **Any repo can add further extensions** of its own on top of them. -- The Table of Contents is maintained by the Markdown All in One extension. `markdown.extension.toc.levels` in the workspace sets which heading levels it includes. See the Markdown rules for the authoring convention and the `` exclusion marker. +- The Table of Contents is generated by the Markdown All in One extension on save. An agent runs the hub-hosted `scripts/toc_lint.py --fix` instead, which writes the same list. So the workspace recommends `yzhang.markdown-all-in-one` and sets `markdown.extension.toc.levels` to `"2..3"`, the heading levels the list includes. The audit holds the workspace to the hub's `catalog/snippets/vscode/` base fragment and to each per-type fragment its types apply, and allows its own additions. The hub's `spec/readme-structure.md` item 4 holds where the `` marker goes. The prose gate skips a Table of Contents list line only where it is exactly the generated entry. The `toc` and `home-path` rules still read every line. - **Agents: editing a `.code-workspace` a VS Code window has loaded as its workspace can reload that window and drop an agent session running in it.** "Verification Discipline" holds the rule. An agent leaves that edit to the maintainer while it knows a window with the file loaded hosts an agent session, the agent's own included. It treats any window but its own as hosting no session unless it knows otherwise. That is because another window's session state is normally unobservable, so assuming a live one would hand every such edit back to the maintainer. Where it still cannot tell whether the rule binds it, it asks the maintainer. An agent the rule does not bind edits the file directly. Opening the folder rather than the workspace, in every window holding the checkout, keeps a checkout's own file editable. ## Repository Details Every repo's GitHub repository details (the About panel) follow a fixed convention so the fleet stays consistent and self-describing. -- **Description** is one canonical sentence that carries to the README, the About panel, and (for a Docker repo) the Docker Hub short description alike. It is at most **100 characters**, Docker Hub's short-description cap and the tightest surface it feeds. Once a repo declares `registry/repos.json`'s optional `description` field, that field is the source, itself link-free plain text on one line for the same reason. `repo-config/configure.sh apply` writes it to the About panel directly. The README's **tagline** (its first non-empty line after the `#` H1 heading) follows it rather than the other way around. A repo that has not adopted the field yet keeps the pre-existing convention. There the README tagline is the source of truth, and the About panel is set from it by hand (`gh api -X PATCH repos// -f description=...`). `spec/audit_markdown.py`'s `description_findings()`, which the audit runs, reports drift either way, falling back to the tagline when no field is declared. It is that one line and not the paragraph it opens: a README may carry further paragraphs below the tagline, and no mirror reads them. When the current description is *more specific* than the declared source (a chip revision or variant it omits), surface the drift to the maintainer. Do not silently discard the detail. The fix there is to sharpen the declared source so the other mirrors follow it. Docker Hub receives it from the About panel, which the docker-readme task reads at publish time. So an About panel left diverged from the canonical value is carried onward rather than corrected there. +- **Description** is one canonical sentence that carries to the README, the About panel, and (for a Docker repo) the Docker Hub short description alike. It is at most **100 characters**, Docker Hub's short-description cap and the tightest surface it feeds. Once a repo declares `registry/repos.json`'s optional `description` field, that field is the source, itself link-free plain text on one line for the same reason. `repo-config/configure.sh apply` writes it to the About panel directly. The README's **tagline** (its first non-empty line after the `#` H1 heading) follows it rather than the other way around. A repo that has not adopted the field yet keeps the pre-existing convention. There the README tagline is the source of truth, and the About panel is set from it by hand (`gh api -X PATCH "repos//" -f description=...`). `spec/audit_markdown.py`'s `description_findings()`, which the audit runs, reports drift either way, falling back to the tagline when no field is declared. It is that one line and not the paragraph it opens: a README may carry further paragraphs below the tagline, and no mirror reads them. When the current description is *more specific* than the declared source (a chip revision or variant it omits), surface the drift to the maintainer. Do not silently discard the detail. The fix there is to sharpen the declared source so the other mirrors follow it. Docker Hub receives it from the About panel, which the docker-readme task reads at publish time. So an About panel left diverged from the canonical value is carried onward rather than corrected there. - **Topics** are optional, and any that are present match the repo's actual content. Do not invent topics to fill the field. - **Include in the home page**: Releases on, Deployments off, Packages off. These toggles are UI-only, since the REST and GraphQL APIs neither read nor write them. So they are set by hand and cannot be audited through `gh`. diff --git a/WORKFLOW.md b/WORKFLOW.md index ddbd1cd..e42103b 100644 --- a/WORKFLOW.md +++ b/WORKFLOW.md @@ -17,7 +17,7 @@ The guarantees are distilled from failures observed in practice. Section 4's pre ## 1. Purpose and How to Use This Document - **Contract, not implementation.** Conform to the *outcomes* in section 4. Shape, job names, and file layout may differ between repos wherever no guarantee names them. Where one does, as D9.2 does for the ruleset-bound job `name:`, that name is itself the outcome. -- **Applicability.** A guarantee, or a 5B scenario, is **applicable** only if the repo contains the construct it governs. Such a construct is, for example, a given target, a transfer artifact, a registry push, or a wrapper-version source. An item that governs an absent construct is **N/A**: record it as N/A and **exclude it from the verdict**. N/A is never a defect. Section 6 names which constructs each project type adds. Start from the constructs every repo has, its pull request workflow among them, and **union what every declared type adds**. Record an item N/A only where nothing in that union supplies its construct. Which triggers a construct carries is read from the workflow itself rather than from the type, per section 6. Owning the release task rather than calling the hub-hosted copy changes where a construct's evidence is cited, per 5A, never whether it is applicable. A near-empty pipeline (source-only) is mostly N/A and that is fine. +- **Applicability.** A guarantee, or a 5B scenario, is **applicable** only if the repo contains the construct it governs. Such a construct is, for example, a given target, a transfer artifact, a registry push, or a wrapper-version source. An item that governs an absent construct is **N/A**: record it as N/A and **exclude it from the verdict**. N/A is never a defect. Section 6 names which constructs each project type adds. Start from the constructs every repo owes, its pull request workflow and its publisher among them. Then **union what every declared type adds**. A missing one of those is a defect the verdict counts, never an N/A item. Record an item N/A only where nothing in that union supplies its construct. Which triggers a construct carries is read from the workflow itself rather than from the type, per section 6. Owning the release task rather than calling the hub-hosted copy changes where a construct's evidence is cited, per 5A, never whether it is applicable. A near-empty pipeline (source-only) is mostly N/A and that is fine. - **Operational is binary.** A workflow is operational only where section 5's Assessment records every one of its conjuncts met. A single applicable failure is a defect and makes the workflow **not operational**, regardless of how clean the YAML looks. That holds whether the failure is an input/output mismatch or a static property of the committed source such as an unpinned action SHA. - **Default branch.** Guarantees say "default branch" portably. It is implemented as the literal `main` in several places (the validate gate, the `prerelease` expression, and `version.json`'s `publicReleaseRefSpec`). These MUST all reference the repo's *actual* default branch. A divergence is a defect (D3.2). - **Two layers when auditing.** The pipeline splits into an **orchestrator** layer and a **build-leaf** layer. The orchestrator layer is the PR entry workflow, the publisher, and the version and release jobs. The build-leaf layer is the `build-` tasks, whether separate files or jobs inside the release task. Inputs like `github`/`dockerhub`/`expect_release_assets` live on the orchestrator. A leaf receives `ref`/`branch`/`smoke` and whatever else its own target needs, a derived `push` among them where that leaf pushes. A package target declares no push input on either layer. The reason is that section 3's `Output Seam by Destination` puts its push in a `publish-` job in the publisher, gated by `needs:` rather than by a flag. Assert an input a guarantee names in the layer that declares it. @@ -45,13 +45,13 @@ flowchart LR ```mermaid flowchart LR edit[direct signed commit] -->|advisory CI| develop - pr[pull request] -->|lint CI, reported not required| develop - develop -->|merge commit, enforced lint CI| main + pr[pull request] -->|validation CI, reported not required| develop + develop -->|merge commit, enforced validation CI| main ``` The direct commit is an **allowance, not a substitute for review**. The ruleset drops the pull-request *requirement*, which permits a direct push without withdrawing the pull request. So a change worth reviewing still takes one, and both paths reach `develop` legally. Which changes those are is stated as a shape rather than a line count in `GOVERNANCE.md` "Operational Repositories". That section owns the test and is the one place it is written, since nothing in a ruleset can apply it. What differs is when validation lands. On the direct-commit path the commit is already on the branch, so CI can only be advisory after the fact. That is the accepted cost of the model. On the pull-request path the change has not landed, so validation is pre-merge and actionable, the moment it is worth the most. The lint workflow's `pull_request` trigger therefore filters no base branch (`WORKFLOW.md` section 6). That is what makes **D1.2** hold here, since its input is *any* PR and the operational model is no exception. The check is reported on a `develop` PR rather than required. That is because a required status check on `develop` binds the direct push too, and would dissolve the allowance the model is built on. -Their CI is lint/validation only: editorconfig/EOL plus domain linters such as Home Assistant or ESPHome config validation or a firmware build, but **no unit tests**. So the D-guarantees in `WORKFLOW.md` section 4 that assume a build/test pipeline are **N/A** exactly as for `source-only` (`WORKFLOW.md` section 6). What binds is the promotion gate and the source-only release on manual dispatch (`releaseTrigger: dispatch-only`, tag + source zip). At the promotion gate, the `develop -> main` PR must pass the required `Check pull request workflow status job`. Branch-model rulesets are specified in `GOVERNANCE.md` "Branching Model" rather than in `WORKFLOW.md`. +Their CI is lint/validation: editorconfig/EOL plus domain linters such as Home Assistant or ESPHome config validation or a firmware build. It runs **no unit tests** unless the repo carries a .NET test project or a Python suite the validator runs. Tests that its own validate hook or a replacement validator runs count too. A suite in a directory the validate call names in `python-directories` is one it runs. The declaration decides what the validator gates, per D1.2. With no tests for a type, the build/test D-guarantees in `WORKFLOW.md` section 4 are **N/A** for it, as for `source-only` (`WORKFLOW.md` section 6). Where it has tests, the `csharp` or `python` guarantees they bring apply as in any other repo, D1.6 included. That holds whether or not it declares `python-directories`. What binds either way is the promotion gate and the source-only release on manual dispatch (`releaseTrigger: dispatch-only`, tag + source zip). At the promotion gate, the `develop -> main` PR must pass the required `Check pull request workflow status job`. Branch-model rulesets are specified in `GOVERNANCE.md` "Branching Model" rather than in `WORKFLOW.md`. ### Two Layers: Orchestration vs Build @@ -67,9 +67,10 @@ A target contributes a file to the GitHub release by uploading a workflow artifa flowchart LR dotnet[dotnet-publish] -->|release-asset-BRANCH-dotnet-publish| store[(run artifacts)] nuget[build-nuget] -->|release-asset-BRANCH-nuget| store + pypi[build-pypi] -->|release-asset-BRANCH-pypi| store store -->|pattern + merge-multiple| rel["github-release job (D6)"] nuget -->|nuget-build-BRANCH| pub["publish-TARGET job in the repo's own publisher"] - pypi[build-pypi] -->|pypi-build-BRANCH| pub + pypi -->|pypi-build-BRANCH| pub pub -->|push| registries[(registries)] docker[build-docker] -->|push| registries ``` @@ -109,7 +110,7 @@ flowchart TD ### Release Model -Each publish builds a **single branch**, the trigger ref (`main` a release, `develop` a prerelease). So there is no branch matrix, and `github.ref` always names the built branch. A **human merge never auto-publishes**. A `plan` job (`publish-plan-task.yml`) decides once, and a job downstream of it either gates on its outputs or inherits the skip through `needs:`. A run publishes on a **code-affecting bot push to `main`**. The App merges every Dependabot/codegen PR, so `github.actor` gates that push. The publisher's own `on.push.paths` list also drops a non-substantive change like an Actions bump. A run also publishes on a **manual dispatch** of `main`/`develop`, or on a **main-only weekly schedule** (Docker, to refresh the base image). The `push` is main-only, so a develop bot merge publishes nothing (its prerelease comes via dispatch). A **source-only** repo publishes on **dispatch only**. Every release is a tag on the built commit plus a source archive, README, and LICENSE. Targets amend it with `release-asset-*` files. A registry push contributes none, and is made by the Docker leaf for an image and by the separate `publish-` job for a package. An unchanged version cuts no second release on a schedule or push trigger, while a dispatch refreshes it (D4.4). Docker re-pushes by design. +Each publish builds a **single branch**, the trigger ref (`main` a release, `develop` a prerelease). So there is no branch matrix, and `github.ref` always names the built branch. A **human merge never auto-publishes**. A `plan` job (`publish-plan-task.yml`) decides once, and a job downstream of it either gates on its outputs or inherits the skip through `needs:`. A run publishes on a **code-affecting bot push to `main`**. The App merges every Dependabot/codegen PR, so `github.actor` gates that push. The publisher's own `on.push.paths` list also drops a non-substantive change like an Actions bump. A run also publishes on a **manual dispatch** of `main`/`develop`, or on a **main-only weekly schedule** (Docker, to refresh the base image). The `push` is main-only, so a develop bot merge publishes nothing (its prerelease comes via dispatch). A **source-only** repo publishes on **dispatch only**. **Every repository whose registry `status` is `cataloged` releases**, whatever its types. Every release is a tag on the built commit plus a source archive, README, and LICENSE. Targets amend it with `release-asset-*` files. A registry push contributes none, and is made by the Docker leaf for an image and by the separate `publish-` job for a package. An unchanged version cuts no second release on a schedule or push trigger, while a dispatch refreshes it (D4.4). Docker re-pushes by design. ```mermaid flowchart TD @@ -125,10 +126,10 @@ flowchart TD Pick each output's path by **where the artifact goes**: - **File on the GitHub release** (zip, binary, packaged library): one leaf per output uploading `release-asset--`. For a repo calling the hub-hosted task, the path is instead the files its `build-release-asset` hook writes, which the task uploads as one such artifact. The repo keeps `expect_release_assets: true` (its default). -- **Package-registry push** (NuGet, PyPI): the leaf builds and uploads a build artifact (`nuget-build-` / `pypi-build-`). A separate `publish-` job in the **publishing repository's own** publisher consumes it and pushes. Each registry publishes through OIDC Trusted Publishing, never a stored API key, and that push sits outside the leaf for the reasons that follow. Trusted publishing validates the OIDC token's `job_workflow_ref` claim, which names the workflow the job actually ran from. So a push made from a reusable workflow a *different* repository hosts is rejected at the token exchange. There NuGet.org answers `HTTP 401` with `does not start with //.github/workflows/`. That alone rules out a leaf another repository hosts. A leaf this repository hosts clears the claim, and the split still applies to it. That is because a called job declaring no `permissions:` runs under the calling job's whole grant. So a push anywhere inside the release task would put `id-token: write` on every job in it, rather than at the one entry point D7.2 requires. The registered trusted-publishing policy therefore names the publisher, `publish-release.yml`. PyPI additionally gates its publish job behind an environment. NuGet.org binds its policy to the workflow file rather than to an environment and needs none. NuGet's leaf also uploads a `release-asset-*` carrying the package, and PyPI contributes none. +- **Package-registry push** (NuGet, PyPI): the leaf builds and uploads a build artifact (`nuget-build-` / `pypi-build-`). A separate `publish-` job in the **publishing repository's own** publisher consumes it and pushes. Each registry publishes through OIDC Trusted Publishing, never a stored API key, and that push sits outside the leaf for the reasons that follow. Trusted publishing validates the OIDC token's `job_workflow_ref` claim, which names the workflow the job actually ran from. So a push made from a reusable workflow a *different* repository hosts is rejected at the token exchange. There NuGet.org answers `HTTP 401` with `does not start with //.github/workflows/`. That alone rules out a leaf another repository hosts. A leaf this repository hosts clears the claim, and the split still applies to it. That is because a called job declaring no `permissions:` runs under the calling job's whole grant. So a push anywhere inside the release task would put `id-token: write` on every job in it, rather than at the one entry point D7.2 requires. The registered trusted-publishing policy therefore names the publisher, `publish-release.yml`. PyPI additionally gates its publish job behind an environment. NuGet.org binds its policy to the workflow file rather than to an environment and needs none. NuGet's and PyPI's default leaves also upload a `release-asset-*` carrying the package files. - **Image-registry push** (Docker): the leaf pushes the default branch multi-arch (amd64+arm64) and any other branch `amd64`-only, and contributes no `release-asset-*`. The arm64 emulation is reserved for the released image. - **Filesystem on a host the project owns** (a static site, a config tree): the leaf builds the tree and ships it to the host. It contributes no `release-asset-*`. The transport is the repo's own. The contract fixes the rest. The deploy is a **separate `workflow_dispatch`** from the release, so a redeploy of an unchanged commit mints no tag. A host rebuild, a rollback, or proving a branch on a non-production environment then costs nothing. Its credentials come from a **per-environment GitHub Environment** rather than the repository secret store. The deploy also ends by asserting **what the host serves** rather than the transport's exit status (D4.6). Retention at the destination is bounded by a declared count, with one side recorded as owning the prune. That side is the deploy where its credential can observe the destination, and the host where that credential is deliberately write-only (D5.6). -- **No file target via the release task** (Docker-only, PyPI-only, source-only): the release is tag + source zip + README + LICENSE. The caller **MUST pass `expect_release_assets: false`** to the release task. A publisher with file targets retains the default `true`. This setting is caller-specific. The default `true` fails on `fail_on_unmatched_files` when no assets exist. A **source-only** repo also passes every `enable_*` input as false because it has no build leaf (see `WORKFLOW.md` section 6). +- **No file target** (Docker-only, source-only, or PyPI-only with a no-asset hook): the release is tag + source zip + README + LICENSE. The caller **MUST pass `expect_release_assets: false`** to the release task. A publisher with file targets retains the default `true`. This setting is caller-specific. The default `true` fails on `fail_on_unmatched_files` when no assets exist. A **source-only** repo also passes every `enable_*` input as false because it has no build leaf (see `WORKFLOW.md` section 6). `WORKFLOW.md` section 3 keeps the architecture. The `workflow-ci-contract` Skill carries this section whole as a generated include, at `.agents/skills/workflow-ci-contract/references/architecture.md` in the hub. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo. @@ -139,11 +140,14 @@ The required behaviors, organized by domain. Each is a **MUST**, and its `Output ### D1 - PR Fast-Feedback (Smoke) - **D1.1 Only changed targets build.** Input: a PR touching some targets. Output: the paths-filter marks exactly those targets and only their smoke builds run. Unchanged targets skip. A repo's own targets MUST each have a filter entry, so a touched target is never silently skipped. That entry lists paths rather than negating them, so a change matching no entry marks nothing and every smoke build skips. *Prevents: rebuilding everything, and a changed target slipping through unbuilt.* -- **D1.2 A validation job always runs.** Input: any PR. Output: a validation job runs unconditionally and the aggregator `needs:` it. That job is the caller's own job reaching the reusable validator, named `validate` in every shipped stub. That name is what the aggregator's `needs:` carries. The validator's internal jobs (`test-matrix`, `lint`, `unit-test` and `validate` in the hub's `validate-task.yml`) are not addressable from a caller. So a `validate` in a caller's `needs:` list always names the caller's own job, never the validator's internal one. The validator detects the tree rather than the repo's language, so a non-.NET repo calls the same one rather than replacing it. It runs the doc and repo gates everywhere, and the `dotnet test` path only where a `*Tests*.csproj` project exists. It runs the Python path in each directory the caller declares in its `python-directories` input. Where the caller declares none and a root `pyproject.toml` is tracked, it runs that path at the root instead. At that undeclared root the test leg runs only where a `tests/` suite sits beside a `uv.lock` or `requirements*.txt`. A declared directory without `tests/`, by contrast, fails (D1.6). The declaration rather than discovery decides what is gated, since a stray or vendored `.py` file would otherwise change the gate silently. The validator warns about a tracked `.py` file no declared directory covers. It checks out the triggering commit, `github.sha`, with no `ref` input. It needs none, because a reusable workflow reads its caller's `github` context, so a publisher's call validates the same commit its publish job pins. A repo whose tests take another shape can run them from its own `.github/actions/validate/action.yml` hook, which the validator runs where that file exists. That hook receives no secret, so a repo whose other-shape tests owe D1.6's coverage upload is one whose validation the validator cannot express. A repo whose validation it cannot express **replaces** the call (not deletes it) with its own validator and re-points the aggregator's `needs:` to the replacement. `smoke-build` `needs:` the `changes` job rather than the validation job, so no second `needs:` moves with it. *Prevents: a PR merging with no validation, or a dangling `needs:` that stops the whole workflow from loading.* +- **D1.2 A validation job always runs.** Input: any PR. Output: a validation job runs unconditionally and the aggregator `needs:` it. That job is the caller's own job reaching the reusable validator, named `validate` in every shipped stub. That name is what the aggregator's `needs:` carries. The validator's internal jobs (`test-matrix`, `lint`, `unit-test`, `unit-test-dotnet` and `validate` in the hub's `validate-task.yml`) are not addressable from a caller. So a `validate` in a caller's `needs:` list always names the caller's own job, never the validator's internal one. The validator detects the tree rather than the repo's language, so a non-.NET repo calls the same one rather than replacing it. It runs the doc and repo gates everywhere, and the `dotnet test` path only where a `*Tests*.csproj` project exists. It runs the Python path in each directory the caller declares in its `python-directories` input. Where the caller declares none and a root `pyproject.toml` is tracked, it runs that path at the root instead. At that undeclared root the test leg runs only where a `tests/` suite sits beside a `uv.lock` or `requirements*.txt`. A declared directory without `tests/`, by contrast, fails (D1.6). The declaration rather than discovery decides what is gated, since a stray or vendored `.py` file would otherwise change the gate silently. The validator warns about a tracked `.py` file no declared directory covers. It checks out the triggering commit, `github.sha`, with no `ref` input. It needs none, because a reusable workflow reads its caller's `github` context, so a publisher's call validates the same commit its publish job pins. A repo whose tests take another shape can run them from its own `.github/actions/validate/action.yml` hook, which the validator runs where that file exists. That hook receives no secret, so a repo whose other-shape tests owe D1.6's coverage upload is one whose validation the validator cannot express. A repo whose validation it cannot express **replaces** the call (not deletes it) with its own validator and re-points the aggregator's `needs:` to the replacement. `smoke-build` `needs:` the `changes` job rather than the validation job, so no second `needs:` moves with it. *Prevents: a PR merging with no validation, or a dangling `needs:` that stops the whole workflow from loading.* - **D1.3 Smoke never publishes and never uploads.** Input: `smoke: true`. Output: full compile/lint/test, but no registry/image push, no release, and **no** artifact uploads. Every `upload-artifact`, including any aggregation job, is gated on smoke being false. That gate is written `!inputs.smoke` at the workflow layer and `inputs.smoke != 'true'` in a composite action, whose inputs are strings. *Prevents: a PR publishing, and orphaned artifacts churning the storage quota.* - **D1.4 Workflow-file changes are not smoke-built.** Input: a PR changing only `.github/workflows/**`. Output: the paths-filter marks no target, so smoke-build skips. An inclusion list satisfying D1.1 reaches this by leaving workflow paths out of every target's entry. *Implication: a workflow-only change is not smoke-built, but actionlint still validates it in CI.* - **D1.5 One required aggregator gates merge.** Input: any PR. Output: a single aggregator job must **succeed**. It must run under `if: always()`, so a failed or skipped dependency cannot skip the gate itself. It must also `needs:` the validation job, and the `changes` and `smoke-build` jobs too wherever the repo has a smoke build. It must treat a **skipped** smoke build as pass, and **block** on `failure`/`cancelled`. Its name is ruleset-bound: the job `name:` and the ruleset `context:` are the same string and MUST be renamed together, never independently. The workflow holding it MUST trigger on `pull_request`. A gate without a `pull_request` trigger never runs the validator's pull-request-only steps, the prose gate among them. A workflow any other event also triggers yields that name only when `github.event_name == 'pull_request'`, through an expression `name:`. Otherwise a dispatch or push run on a PR's head posts the required context without the PR run's gates. *Prevents: a paths-filter error letting a target-changing PR merge unbuilt.* -- **D1.6 Coverage is reported to Codecov (C# and Python).** Input: a C# or Python repo that has tests for that type. Output: the validation job runs those tests under coverage collection, and a `codecov/codecov-action` step uploads the report. The collection is `dotnet test --coverage --coverage-output-format cobertura --results-directory ./coverage`, leaving `--coverage-output` unset so each test project writes its own report rather than overwriting a shared one. A bare call resolves one workspace from the working directory, so it fails at a root holding none or more than one. Unless the repository root holds exactly one solution or project, the hub's validator therefore runs the collection once per tracked `*Tests*.csproj` with `--project`. It names no solution in that case, since a solution holding no test project fails the run. Or it is `pytest --cov-report=xml` in a Python directory with its own `uv.lock` or `requirements*.txt`, whose own `pyproject.toml` selects what to measure. Or it is `coverage run -m unittest discover -s tests` then `coverage xml` in a `lint-only` one. The upload is **best-effort** (`continue-on-error` and/or `fail_ci_if_error: false`), so a Codecov outage or an absent token never reds the gate. Each leg **fails its test step when the run wrote no report**. The reason is that the best-effort upload reads a missing report exactly as it reads a healthy run. A second reason is that, on the Python leg, `--cov-report=xml` alone selects nothing to measure. The C# leg renames each report to `coverage-.cobertura.xml` before the upload step reads the directory, since `codecov-cli`'s own finder does not match the default name. A repo owning its validator rather than calling the hub's owes that rename itself. `CODECOV_TOKEN` lives in the repo's **actions** and **dependabot** secret stores. The token is in the second because a run triggered by a Dependabot pull request reads the Dependabot store. Without the token there, the upload would otherwise skip silently on every bot pull request. A caller reaching the reusable validator across repositories names the secret it passes (`secrets:` with `CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}`). It does so on its pull request path and its publisher path alike. That is because `secrets: inherit` is documented for a caller in the same organization or enterprise, which a personal account is not. A call by local path stays inside one repository, where the caller's own store is the one the callee reads. So `secrets: inherit` is available there instead of naming each secret. The repo ships a **`.codecov.yml`** at the repository root. It sets the project and patch statuses to **`informational: true`**, so a coverage delta never gates a pull request. A repo whose quality bar requires a threshold may turn that off. The same file excludes intentionally-untested, non-shipped code (an example or benchmark project) from the denominator via `ignore`. Codecov reads its configuration under several names, but `.codecov.yml` is the only one the fleet accepts. So a copy under any other name is drift to rename. Coverage output is a build artifact, so `.gitignore` excludes it. The C# invocation runs under **Microsoft.Testing.Platform**, and the runner declaration, package references, and version floor an MTP-based test project needs are `CODESTYLE.md`'s .NET side. The Python invocation needs **`pytest-cov`** and a coverage selector, which are `CODESTYLE.md`'s Python side. A Python directory declared in the validator's `python-directories` input owes a `tests/` suite whatever its profile, so the validator fails one that has none. N/A for a repo carrying no tests for that type. *Prevents: coverage silently going unreported, and a coverage regression blocking an unrelated pull request.* +- **D1.6 Coverage is reported to Codecov (C# and Python).** Input: a C# or Python repo that has tests for that type. Output: the validation job runs those tests under coverage collection, and a `codecov/codecov-action` step uploads the report. The collection is `dotnet test --coverage --coverage-output-format cobertura --results-directory ./coverage`, leaving `--coverage-output` unset so each test project writes its own report rather than overwriting a shared one. A bare call resolves one workspace from the working directory, so it fails at a root holding none or more than one. The hub's validator therefore runs the collection once per tracked `*Tests*.csproj` that declares the leg's line, with `--project`, whatever the root holds. A test project left out of a root solution, or a library whose name matches the glob, is therefore a test project here. It names no solution, since a solution holding no test project fails the run. Or it is `pytest --cov-report=xml` in a Python directory with its own `uv.lock` or `requirements*.txt`, whose own `pyproject.toml` selects what to measure. Or it is `coverage run -m unittest discover -s tests` then `coverage xml` in a `lint-only` one. The upload is **best-effort** (`continue-on-error` and/or `fail_ci_if_error: false`), so a Codecov outage or an absent token never reds the gate. Each leg **fails its test step when the run wrote no report**. The reason is that the best-effort upload reads a missing report exactly as it reads a healthy run. A second reason is that, on the Python leg, `--cov-report=xml` alone selects nothing to measure. The C# leg renames each report to `coverage-.cobertura.xml` before the upload step reads the directory, since `codecov-cli`'s own finder does not match the default name. A repo owning its validator rather than calling the hub's owes that rename itself. `CODECOV_TOKEN` lives in the repo's **actions** and **dependabot** secret stores. The token is in the second because a run triggered by a Dependabot pull request reads the Dependabot store. Without the token there, the upload would otherwise skip silently on every bot pull request. A caller reaching the reusable validator across repositories names the secret it passes (`secrets:` with `CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}`). It does so on its pull request path and its publisher path alike. That is because `secrets: inherit` is documented for a caller in the same organization or enterprise, which a personal account is not. A call by local path stays inside one repository, where the caller's own store is the one the callee reads. So `secrets: inherit` is available there instead of naming each secret. The repo ships a **`.codecov.yml`** at the repository root. It sets the project and patch statuses to **`informational: true`**, so a coverage delta never gates a pull request. A repo whose quality bar requires a threshold may turn that off. The same file excludes intentionally-untested, non-shipped code (an example or benchmark project) from the denominator via `ignore`. Codecov reads its configuration under several names, but `.codecov.yml` is the only one the fleet accepts. So a copy under any other name is drift to rename. Coverage output is a build artifact, so `.gitignore` excludes it. The C# invocation runs under **Microsoft.Testing.Platform**, and the runner declaration, package references, and version floor an MTP-based test project needs are `CODESTYLE.md`'s .NET side. The Python invocation needs **`pytest-cov`** and a coverage selector, which are `CODESTYLE.md`'s Python side. A Python directory declared in the validator's `python-directories` input owes a `tests/` suite whatever its profile, so the validator fails one that has none. N/A for a repo carrying no tests for that type. *Prevents: coverage silently going unreported, and a coverage regression blocking an unrelated pull request.* +- **D1.7 A built NuGet package is consumed before it publishes.** Input: a repo whose `build-nuget` job runs the hub's default leaf, in a smoke run or a publish run alike. Output: after the leaf packs, the job restores, builds, and runs a throwaway console project against that exact `.nupkg`. It does so once per target framework the project declares. Each consumer lives outside the checkout, so the caller's `global.json` and `Directory.Build.props` do not apply. Its `nuget.config` resolves the package ID, and the ID of each sibling package in the folder holding the build output, only from that folder. Every other ID resolves from nuget.org. Its package cache is its own, so neither a cached nor a published copy can stand in for the artifact under test. The consumer loads the package assembly and calls `GetExportedTypes()`. The check asserts from `obj/project.assets.json` that the package resolved from the `lib//` folder of the consumer's own framework. It also asserts that the loaded assembly's `TargetFrameworkAttribute` matches that folder. A `netstandard` framework is consumed under the SDK line `global.json` selects, or the newest declared line where there is none. It is asserted against the folder it resolved. A framework the check does not consume is reported skipped. Examples are .NET Framework, `netcoreapp3.1`, and a platform-specific `netX.Y-windows`. The attribute row of a `netstandard` consumer resolving such a folder is skipped too. Four static assertions join them. The package's `lib//` folders equal the declared frameworks. The nuspec `` equals the build version. The nuspec holds a dependency group per framework. A symbol package exists where the project enables symbols. Every declared `netX.Y` and `netstandard` framework is consumed and reported with one summary row per assertion. A failed step ends that framework's rows rather than the run. The job fails at the end if any failed. The check covers a library package, whose assemblies sit under `lib//`. The check uploads nothing, so it honors D1.3. It runs inside the build job, so a failure blocks the publish job that `needs:` that build. A caller's own `build-nuget` hook replaces the whole leaf and is outside the check. A caller's own `.github/actions/package-consume/action.yml` runs once after the default check. It receives the declared frameworks as JSON beside the package ID, version, and package folder. *Prevents: a defect that exists only in the packed form shipping. One example is one target framework's assembly packed under every `lib//` folder while the tests, which reach the library through a project reference, stay green.* +- **D1.8 A built PyPI package is consumed before it publishes.** Input: a repo whose `build-pypi` job runs the hub's default leaf, in a smoke run or a publish run alike. Output: after the leaf builds, the job installs the wheel and, separately, the sdist into a fresh `uv venv`. It does so for each line of the `python-versions` input of `build-release-task.yml`. Empty runs the one line the root `.python-version` selects. Where there is none it runs the hub's fallback line. A caller that sets `python-versions` for both `validate-task.yml` and `build-release-task.yml` passes the same value to each. So the lines its tests run under are the lines its artifact is consumed under. Each environment lives outside the checkout. It installs the artifact, then the project's locked dependency groups from `uv.lock` without the project itself. The check asserts that `importlib.metadata` reports the version the leaf computed. It also asserts that every top-level name the installed distribution provides imports from the environment's site-packages, not the source tree. A distribution providing none, such as one of scripts only, reports that row skipped. It then runs the caller's `tests/` folder against the installed copy with pytest in `importlib` import mode. That run has the source tree off `sys.path` and the project's `pythonpath` setting cleared. Its working directory is outside the project. So the caller's suite must not read a path relative to the project root, or a tool setting read from the working directory. It must import a sibling helper as part of a package. The project directory holds its own `uv.lock`. A project with no `tests/` folder, or a run collecting no tests, is reported skipped rather than passed. Every line and artifact reports one summary row per assertion. A failed environment, install, or metadata read ends that artifact's rows rather than the run. The job fails at the end if any failed. The check uploads nothing, so it honors D1.3. It runs inside the build job, so a failure blocks the publish job that `needs:` that build. A caller's own `build-pypi` hook replaces the whole leaf and is outside the check. *Prevents: a defect that exists only in the built form shipping. One example is a module left out of the wheel while the tests, which import it from the source tree, stay green.* +- **D1.9 Each declared test line runs as its own named unit-test leg.** Input: a repo declaring .NET lines in `dotnet-versions` of `validate-task.yml`, Python lines in `python-versions`, or both. Output: each declared .NET line runs as a `Unit test job (.NET X.Y)` leg running `dotnet test --framework netX.Y` under that line's runtime. A leg runs only the tracked `*Tests*.csproj` projects declaring `netX.Y` in their `TargetFramework` or `TargetFrameworks`, read with `dotnet msbuild`, and skips and names the rest. A leg where no test project declares its line fails, so a declared line never passes by running nothing. Each declared Python line runs as a `Unit test job (Python X.Y)` leg, or as the caller's named `test-matrix` legs where it sets one. A caller declaring neither runs the one line each of `global.json` and `.python-version` selects. The hub's fallback line stands in where a file is absent. The .NET legs run only where a `*Tests*.csproj` exists. The Python legs run only where a Python directory resolves. So a repo holding one kind reports no leg of the other. Each leg uploads its own coverage report, and the .NET upload carries a per-line flag beside `dotnet`. A failing leg does not cancel its siblings. *Prevents: a failing target framework or interpreter hiding inside a combined run naming none of them. A .NET-only repo reporting a Python line it never ran is the other.* ### D2 - Input/State Validation at Entry @@ -165,7 +169,7 @@ The required behaviors, organized by domain. Each is a **MUST**, and its `Output - **D4.1 Gated single-branch publish.** Output: PRs smoke-test and publish nothing. A **human merge never auto-publishes**. A `plan` job (`publish-plan-task.yml`) decides once. A job downstream of it either gates on the plan's outputs or inherits the skip through `needs:`. A gate on an output compares it against `'true'` rather than testing it bare, since a job output is always a string. A publish runs on a **code-affecting bot push to `main`**, gated to the codegen App / Dependabot `github.actor`. On that trigger, an Actions-only bump matches no release path and publishes nothing. A publish also runs on a **dispatch** of `main`/`develop`, or on a **main-only weekly schedule** (Docker). A source-only repo publishes on dispatch only. The plan reports every `schedule` as a publish, so a publisher with no `push` trigger whose schedule retests and never publishes gates its release itself. Each of its jobs calling `build-release-task.yml` carries `github.event_name == 'workflow_dispatch'` as an `&&` term of its job-level `if:` holding no `||` or negated group. Each run builds one branch. The D4.7 supersede dispatch has one accepted, bounded window that publishes without the allowlist check. - **D4.2 Tag the built commit.** Output: the release `target_commitish` is the built commit's SHA (NBGV's `GitCommitId`), never a branch name or a separately re-resolved ref. *Prevents: the tag landing on the default branch instead of the built tree.* -- **D4.3 Release contents.** Output: every release contains a tag on the built commit plus the auto source zip, README, and LICENSE. File targets attach `release-asset-*`. The `prerelease` value equals `branch != default`. A no-file-target caller sets `expect_release_assets: false` to reach the no-asset shape. This applies to Docker-only, PyPI-only, and source-only repos. A NuGet target is not among them, since its leaf uploads a `release-asset-*` carrying the package, so a NuGet-only caller keeps the default `true`. The setting relaxes `fail_on_unmatched_files` and skips the asset download. The release-create step fails when no assets exist and the setting retains its default `true`. A source-only caller also sets every `enable_*` input false. +- **D4.3 Release contents.** Output: every release contains a tag on the built commit plus the auto source zip, README, and LICENSE. File targets attach `release-asset-*`. The `prerelease` value equals `branch != default`. A no-file-target caller sets `expect_release_assets: false` to reach the no-asset shape. This applies to Docker-only and source-only repos, and to a PyPI-only caller whose own `build-pypi` hook uploads none. A NuGet or PyPI target on the hub default leaf is not among them. That leaf uploads a `release-asset-*` carrying the package files, so such a caller keeps the default `true`. The setting relaxes `fail_on_unmatched_files` and skips the asset download. The release-create step fails when no assets exist and the setting retains its default `true`. A source-only caller also sets every `enable_*` input false. - **D4.4 No-op republish.** Input: a re-run whose version is unchanged, on a schedule or push trigger. Output: no second release is cut, because the release-create step is skipped when `gh release view` finds a release for the tag. The paired asset-delete is skipped with it. A **dispatch** re-run refreshes the release instead and runs that delete with it. That is why a dispatch-only publisher records this item's skip leg as unreachable rather than failed. Package-registry pushes are no-ops. The NuGet/PyPI publish steps are **not** statically gated on existence. They run and the **server** dedupes (`dotnet nuget push --skip-duplicate` turns a 409 into success, and PyPI does the same under `skip-existing: true`). **Docker always re-pushes** the image (base-image refresh), independently of the release-create skip, within the same run. *Prevents: duplicate releases and wasted pushes.* - **D4.5 A build failure blocks every publish target, within the Docker limit below.** Input: a real publish where one enabled build fails. Output: nothing publishes. The limit applies where a Docker target builds a shared base or more than one image. Its task then pushes the base and each image leg as it builds. So a leg failing after the base or a sibling leg pushed leaves those images in the registry with no release. `github-release` needs every build and carries the same `!failure() && !cancelled()` guard the terminal registry pusher (Docker) does. Without that guard, the implicit `success()` would skip both on every run that disables a target, rather than only on a failed one. A failed build therefore skips the release (no tag, no release). Docker, which needs every other build, skips with it (no image push). By contrast, a **disabled** target, skipped rather than failed, still lets docker push. A package target's separate publish job needs its own gate for the same reason, since it sits outside the `github-release` and Docker `needs:` chains. That gate is that it `needs:` the release-task call, so a failed build skips it with the rest. The push itself is what no gate can cover, because it runs after the whole release task and therefore after `github-release`. It runs there for the trusted-publishing reason `WORKFLOW.md` section 3's "Output Seam by Destination" package-registry bullet gives. So a rejected token exchange, a registry outage, or a trusted-publishing policy naming the wrong workflow file leaves a published release and tag. That release and tag are for a version that never reached the registry. The recovery is a re-dispatch or a full re-run rather than a cleanup. **A full re-run is always available inside its window and is the only route once the branch tip has moved.** The `Re-run failed jobs` shortcut is not a third route here, D5.2's delete having already removed the artifact it would download. `GOVERNANCE.md` "Release Model", and the skill it routes to, carry the mechanics of each route, how to choose, and the window. *Prevents: a partial publish, e.g. a Docker image pushed while .NET publish failed and no release was cut.* - **D4.6 Deploy verification names the release.** Input: a deploy to a filesystem on a host the project owns that completes without error. Output: a check against the running host asserts **which release is answering**, not merely that it answers. The artifact stamps its own version into the configuration it ships, and the check compares that against the version just installed. The check **waits for convergence to a bounded timeout** rather than sampling once. That is because content goes live the instant a pointer moves, while server rules wait on an asynchronous reload. The same check asserts **which environment** answered. That is because several environments serve a byte-identical artifact, and a proxy rule aimed at the wrong one answers healthily under the right hostname. An unreachable host is reported distinctly from an HTTP status. *Prevents: a green deploy over a host still serving the previous release's configuration, and a URL contract checked against the wrong environment. It also prevents a dead config watcher read as a routing fault.* @@ -182,7 +186,7 @@ The required behaviors, organized by domain. Each is a **MUST**, and its `Output ### D6 - Seam / Architecture Conformance -- **D6.1 Pattern handoff.** Output: the release job downloads by `pattern:`/`merge-multiple:`, not `artifact-ids:`. **File** targets upload `release-asset--`. A file target the hub-hosted task builds through the `build-release-asset` hook fills `` with `build-release-asset`. A target contributing no file to the release (Docker, PyPI) uploads no `release-asset-*` of its own, per D4.3, whatever other transfer artifact it uploads. The `pattern:` download is canonical for a single-target repo too, which does not special-case itself to `artifact-ids:`. +- **D6.1 Pattern handoff.** Output: the release job downloads by `pattern:`/`merge-multiple:`, not `artifact-ids:`. **File** targets upload `release-asset--`. A file target the hub-hosted task builds through the `build-release-asset` hook fills `` with `build-release-asset`. A target contributing no file to the release (Docker) uploads no `release-asset-*` of its own, per D4.3, whatever other transfer artifact it uploads. The `pattern:` download is canonical for a single-target repo too, which does not special-case itself to `artifact-ids:`. - **D6.2 Branch drives config.** Output: a called workflow's branch-derived config reads `inputs.branch`, never `github.ref_name`. - **D6.3 Branch-named artifacts.** Output: every artifact name carries the branch, so a branch's artifacts do not collide with another branch's. - **D6.4 Target add/drop is consistent.** Output: adding or dropping a target updates **all** of the following. The list is the `enable_` value the publisher passes to the release task, and the publisher's `on.push.paths` entries where it carries a `push` trigger. The list continues with the `changes` paths-filter entry + output and the `smoke-build` enable-forward. The list includes `expect_release_assets` where the change adds the first file target or drops the last (D4.3). For a package target, the list also includes the separate `publish-` job. A repo owning its release task also updates the target's build job there, `build-` or `dotnet-publish` for the .NET target. It also updates the target's `github-release` and `build-docker` `needs:` entries. Everything in the `github-release` job **except its `needs:` list** stays verbatim, and so does the version and publish-plan logic. "Verbatim" never reaches the surfaces this item requires editing, that `needs:` list, the release task's job list, and the paths-filter among them. *Prevents: a partial subset that startup-fails on a missing leaf or never smoke-builds a target.* @@ -196,7 +200,7 @@ The required behaviors, organized by domain. Each is a **MUST**, and its `Output ### D8 - Bots / Automation -- **D8.1 Merge-bot.** Output: the merge-bot enables auto-merge on `opened`/`reopened` for **every** Dependabot tier including semver-major. The required checks are the gate, not the bump magnitude. The merge-bot dispatches `--squash`/`--merge` by the PR's base ref, and disables on a maintainer-pushed `synchronize`. Its concurrency is keyed on the **PR number**, not `github.ref`. On `closed` it deletes a merged in-repo bot head when the caller opts in. The push leases the branch tip to the merged head, so a moved branch survives. *Prevents: two PRs colliding in auto-merge.* +- **D8.1 Merge-bot.** Output: the merge-bot merges **every** Dependabot tier including semver-major on `opened`/`reopened`, by auto-merge where required checks gate the base. The required checks are the gate, not the bump magnitude. The merge-bot arms auto-merge on a base whose rules require status checks, since those checks then gate the merge. On a base whose rules require none, it instead waits for every check run and commit status on the pinned head. It leaves out its own jobs, and it waits for at most twenty minutes, then merges the pull request directly. A failed check, a moved head, or the bound fails the job instead. A head on which no check but the merge-bot's own has posted never counts as passing. So a bot pull request that nothing else checks fails at the bound rather than merging. The merge-bot dispatches `--squash`/`--merge` by the PR's base ref, and disables on a maintainer-pushed `synchronize`. GitHub can disable an armed auto-merge with every check green, as for a merge that would write workflow content the App may not write. So the caller also triggers on `auto_merge_disabled`. A short job then answers a disable recorded under the App on a pull request the merge-bot arms. It waits for the base branch to settle, for at most five minutes, then re-arms once, pinned to the head it read. Where every check is already green, `gh` merges at once rather than arming, so a refused merge fails that job. That is visibility, not recovery. A second such disable on the same head fails the job too. A disable a person made stays in place. So does the maintainer-push disable, since the head is then not the bot's own push. So unless a person pushed to it or disabled its auto-merge, a pull request the merge-bot armed either merges or fails visibly. Its concurrency is keyed on the **PR number**, not `github.ref`. On `closed` it deletes a merged in-repo bot head when the caller opts in. The push leases the branch tip to the merged head, so a moved branch survives. *Prevents: two PRs colliding in auto-merge, and a bot pull request sitting open and green after GitHub disabled its auto-merge.* - **D8.2 CodeGen and Dependabot.** Output: codegen runs as a matrix over both branches and is deterministic from an external source. `.github/dependabot.yml` targets both branches, and security PRs go to the default branch. - **D8.3 Upstream-version tracker.** Output: a scheduled resolver prints a JSON `name -> version` object to a committed state file. It opens a rolling per-branch bump PR naming only the moved keys, and the merge-bot auto-merges it. The `main` pin push the merge-bot makes publishes via the release gate, while a `develop` pin does not auto-publish. It ships via a `develop` dispatch (prerelease) or the next promotion to `main`. The tracker's `bump-branch-prefix` + `branches` MUST match a merge-bot rule, or auto-merge silently never fires. That rule is one of the built-in `-` head/base pairs or a `rules` entry the caller passes. A tracker whose bump needs a human decision instead sets `auto-merge: false`, which prefixes the head so no merge-bot rule matches it, whatever `bump-branch-prefix` names. A `main` pin it carries then lands by a human merge, which never auto-publishes (D4.1), so it ships on the next publish. - **D8.4 An identity allowlist used as a gate fails loud.** Where a gate compares `github.actor` (or a PR author) against hard-coded bot identities, the non-matching branch **emits a `::warning::`** on an otherwise-legitimate trigger. There it does not fall through silently. Output: a run that declines to act on an unrecognized identity is visibly annotated. *Prevents: the App being renamed, replaced, or reinstalled under a new slug, after which the comparison quietly evaluates false and the gate stops firing. The result is a green and silent run that looks identical to a healthy one.* The masking matters most where a second path hides the loss. One such path is a weekly schedule that keeps publishing, so the only symptom is release *timeliness*, easily missed for months. Where the failure is self-announcing instead (the merge-bot simply stops merging, so bot PRs visibly pile up) an annotation is optional. The delete job compares the same `user.login` as the merge jobs, so a renamed App already shows as piled-up bot PRs. Resolving the identity at run time (mint an App token, read `GET /app`) removes the hard-coded string entirely. Run-time resolution is the escalation if an allowlist proves fragile in practice. @@ -223,11 +227,17 @@ Assert the structural fact each *applicable* D-guarantee implies, and record **p Most of the evidence is in the workflow files and the composite actions they reach. Where a guarantee's evidence lies outside them, in practice it lies in one of these places. They are the repo's branch ruleset, its Actions and Dependabot secret names, a workflow the repo only calls, or a project or dependency file. They also include a committed file such as `version.json`, `.github/dependabot.yml`, `global.json`, `.codecov.yml`, `.gitignore`, or `.editorconfig`. +D1.7 is read in the build job. A step after the default leaf plans the declared frameworks, then the `dotnet-sdk` action installs those runtime lines, then the consume check runs. None of them uploads. + +D1.8 is read in the build job. A step after the default leaf runs the consume check. It receives the build's computed version and the `python-versions` list. Empty becomes the one line the root `.python-version` selects, or the hub's fallback line where there is none. It uploads nothing. + +D1.9 is read in the validate task's job list. The `Build test matrix job` outputs one matrix per kind, and each unit-test job's `matrix` reads its output. The .NET job's `dotnet test` carries `--framework` for its matrix line, and the Python job holds no .NET step. Each job's `if:` reads the output that says its kind exists. + Cite what each verdict rests on. That is `file:line` for a file in the audited repo. It is the evidence's own name where a setting, a ruleset, or a secret name rather than a file is the evidence. Where the guarantee binds a workflow or composite action the audited repo only reaches, it is `/@` plus the `file:line` in that repo. The callee is read at the SHA the caller pins. An **N/A** verdict names the absent construct instead, there being no line to cite. ### 5B. End-to-End Trace Scenarios (No Execution, Deterministic from the YAML) -For each *applicable* scenario, evaluate every job's `if:`/`needs:` against the inputs. Emit the predicted **run/skip + version + release + artifact-end-state** table, then compare to the expected. A scenario governing a construct the repo does not contain is N/A, per `WORKFLOW.md` section 1, and an absent trigger is such a construct. Each scenario's trigger belongs to one workflow, so read that workflow's own `on:` block rather than the repo's type. For S1 to S4 the block is the pull request workflow's, and for S5 to S10 and S14 the publisher's. For S11 the block is the upstream tracker's, and for S12 and S13 the deploy workflow's. A publisher carrying only `workflow_dispatch` therefore records S5, S6 and S9 N/A, their push and schedule paths never firing there. A repo with no publisher at all records S5 to S10 and S14 N/A together. A publisher whose schedule never publishes, per D4.1, records the schedule paths of S7 and S9 N/A as well. Where a scenario's path runs through a workflow or composite action the repo only **calls**, trace that callee as the repo reaches it. Read it at the SHA the caller pins rather than at the callee's current default branch, which is the same evidence rule 5A states. Predicting from the callee's `main` predicts a table for YAML the audited repo never runs. A self-repository (`$/`) call or a job-level local (`./`) reusable-workflow call carries no pin of its own. It resolves at the calling workflow file's commit, so it is traced at that file's own commit. That commit is the SHA fixed by the pin that reached that file. Where that file is one of the audited repository's own workflows, it is the audited commit instead. A local (`./`) action reference carries no pin either, but it resolves against whatever the job checked out. So it is traced at that checkout's commit. That is the caller's commit where a reusable workflow called from another repository checks out its caller. Minimum set: +For each *applicable* scenario, evaluate every job's `if:`/`needs:` against the inputs. Emit the predicted **run/skip + version + release + artifact-end-state** table, then compare to the expected. A scenario governing a construct the repo does not contain is N/A, per `WORKFLOW.md` section 1, and an absent trigger is such a construct. Each scenario's trigger belongs to one workflow, so read that workflow's own `on:` block rather than the repo's type. For S1 to S4 the block is the pull request workflow's. For S5 to S10 and S14 it is the publisher's. For S15 it is whichever workflow reaches the `build-nuget` job, and for S16 the one reaching `build-pypi`. For S11 the block is the upstream tracker's, and for S12 and S13 the deploy workflow's. A publisher carrying only `workflow_dispatch` therefore records S5, S6 and S9 N/A, their push and schedule paths never firing there. A repo with no publisher lacks a construct every repo owes. So S7, S8, S10 and S14 fail there, and none is excluded from the verdict. S5, S6 and S9 turn on the `on:` block that publisher has yet to state, so each is judged once it lands. A publisher whose schedule never publishes, per D4.1, records the schedule paths of S7 and S9 N/A as well. Where a scenario's path runs through a workflow or composite action the repo only **calls**, trace that callee as the repo reaches it. Read it at the SHA the caller pins rather than at the callee's current default branch, which is the same evidence rule 5A states. Predicting from the callee's `main` predicts a table for YAML the audited repo never runs. A self-repository (`$/`) call or a job-level local (`./`) reusable-workflow call carries no pin of its own. It resolves at the calling workflow file's commit, so it is traced at that file's own commit. That commit is the SHA fixed by the pin that reached that file. Where that file is one of the audited repository's own workflows, it is the audited commit instead. A local (`./`) action reference carries no pin either, but it resolves against whatever the job checked out. So it is traced at that checkout's commit. That is the caller's commit where a reusable workflow called from another repository checks out its caller. Minimum set: | # | Input | Expected output | Exercises | | --- | --- | --- | --- | @@ -245,6 +255,8 @@ For each *applicable* scenario, evaluate every job's `if:`/`needs:` against the | S12 | deploy dispatch naming an environment | the ref gate runs **first**, allowing production from the default branch only and any ref to a non-production environment. Validation runs, and the callee re-asserts the environment name. A release installs under its own id, and the pointer flips as a separate step. Retention is bounded by whichever of the D5.6 shapes the repo uses. So a deploy whose credential can observe the destination asserts the count converged, and one confined write-only leaves it to the host. The live check asserts the environment and the release id, waiting out the reload, then the URL contract. **No tag and no release are created** | D2.1, D4.6, D5.6 | | S13 | deploy dispatch of a production environment from a non-default ref | **fails fast**, before anything is installed or written | D2.1 | | S14 | publish whose branch head gained different `.github/workflows` content after the build began | every update since a release bot's push or merge: release-create **skipped** and the publisher dispatched on the branch. In that case this run ends **cancelled** with its package publish jobs skipped (a Docker image already pushed). The dispatched run releases the head, queueing behind this run only where the head's publisher evaluates this run's group for a dispatch. A push landing after the branch is confirmed unmoved and before the dispatch is released as if it were such an update. That is an accepted, bounded limit per D4.7. Any other update: the step **fails**, nothing is released or dispatched | D4.1, D4.2, D4.5, D4.7 | +| S15 | a smoke or publish run whose `build-nuget` job runs the hub default leaf, for a project declaring `net10.0;net11.0`. The package holds one framework's assembly under both `lib/` folders | the job plans both runtime lines, installs them, and consumes the package once per framework. It **fails** on the `TargetFrameworkAttribute` of the `lib/` folder holding the other framework's assembly, after reporting every other row. A correct package **passes**. The check uploads nothing in either run. A publish run's leaf has uploaded its artifacts already, and a failure leaves them to their retention and the dependent publish job **skipped** | D1.3, D1.7 | +| S16 | a smoke or publish run whose `build-pypi` job runs the hub default leaf, for a project with a `tests/` folder and a `python-versions` of `["3.13", "3.14"]`. Its wheel leaves out a module the tests import | the job builds, then consumes the wheel and the sdist under each line. It **fails** on the tests row of each artifact lacking the module, after reporting every other row. A correct package **passes** under both lines. The check uploads nothing in either run. A publish run's leaf has uploaded its artifacts already. A failure leaves them to their retention, and the dependent publish job is **skipped** | D1.3, D1.8 | ### 5C. Live Probe (Where Warranted) @@ -281,28 +293,28 @@ The table files each scenario in section 5B's table under exactly one row, which | Construct the repo contains | Scenarios it reaches | | --- | --- | | A pull request workflow with a validation job and the required aggregator | S2, S3 | -| A build target: a `changes` filter entry, a smoke build, and a leaf that builds it | S1, S4 | +| A build target: a `changes` filter entry, a smoke build, and a leaf that builds it | S1, S4, S15 for the hub default NuGet leaf, and S16 for the hub default PyPI leaf | | A publisher, meaning a workflow that cuts the release | S7, S8, S10, S14, plus S5 and S6 wherever its own `on:` admits a push, and S9 wherever it admits a push or a schedule | | An upstream-version tracker and its merge-bot | S11 | | A deploy workflow targeting a filesystem on a host the project owns | S12, S13 | -The rows below say which constructs a type brings with it. Read the repository for the rest. NBGV, `version.json` and the classification gate are reached on the smoke path too, so a repo with no publisher can still contain them. And a repo whose `releaseTrigger` is `none` has no publisher whatever its types say. +The rows below say which constructs a type brings with it. Read the repository for the rest. NBGV, `version.json` and the classification gate are reached on the smoke path too, not only through the publisher. Every repo whose registry `status` is `cataloged` owes a publisher whatever its types say, and a missing one is a defect, never an N/A item. Each releases at least its tag and source archive, per section 3's "Release Model". What each type adds beyond that, and how its leaf behaves, is below. -- **`dotnet-publish`.** The target runs a sequential `dotnet publish` runtime loop inside one composite-action job. Configuration is Release on the default branch and Debug otherwise. A non-smoke run builds the full runtime set, archives the combined output as a `.7z`, and uploads it as `release-asset--dotnet-publish`. The archive is named from the project file stem unless `dotnet_publish_asset_name` overrides it. A smoke run builds a **strict, non-empty subset** of that runtime set and skips the archive and upload steps, so it uploads nothing. S1 smoke-builds that subset after a .NET project change. Where the repo has a publisher, S7 attaches the 7z from a non-smoke run. The non-default leg sets `prerelease=true`, and the default leg sets `prerelease=false`. GitHub marks the stable default release "Latest" automatically. -- **`nuget`.** The leaf uploads both `release-asset--nuget` and `nuget-build-` on a non-smoke run and pushes nothing. A separate `publish-nuget` job in the repo's own publisher consumes the second and runs `dotnet nuget push *.nupkg --skip-duplicate`. It then deletes that artifact under the download step's own success (D5.2). Section 3's `Output Seam by Destination` says why the push sits there rather than in the leaf. Configuration is Release on the default branch, Debug otherwise. Where symbols are enabled (`snupkg`), the push auto-carries the paired `.snupkg` to NuGet.org's symbol server and the release-asset `.7z` also contains it, a triple surface. NuGet.org derives `isPrerelease` from the SemVer2 `-g` suffix (the workflow sets no such flag). Test: S7 non-default leg publishes a prerelease package + asset, default a stable. S9 re-run is a server-side `--skip-duplicate` no-op. 5C: query NuGet.org for both versions and the symbol package. -- **`pypi`.** The leaf builds and uploads `pypi-build-`. A **separate** `publish-pypi` job (with `environment: pypi`, `id-token: write`, `actions: write`) does the OIDC Trusted-Publishing upload with `skip-existing: true`. It then **consume-then-deletes** the build artifact under the download step's own success (D5.2). So on S9 the build artifact is deleted even though the `release-asset-*` delete is skipped. The version is the `X.Y.Z` core of `SemVer2` with `.dev0` appended on `develop` only, per D3.4. PyPI contributes no `release-asset-*`. A PyPI-only repo sets `expect_release_assets: false` at the caller. Test: S7 default leg publishes a release, non-default a `.dev0`. S9 is a `skip-existing` no-op. 5C inspects the `dist/*` filenames and the compute-version log. +- **`dotnet-publish`.** The target runs a sequential `dotnet publish` runtime loop inside one composite-action job. Configuration is Release on the default branch and Debug otherwise. A non-smoke run builds the full runtime set, archives the combined output as a `.7z`, and uploads it as `release-asset--dotnet-publish`. The archive is named from the project file stem unless `dotnet_publish_asset_name` overrides it. A smoke run builds a **strict, non-empty subset** of that runtime set and skips the archive and upload steps, so it uploads nothing. S1 smoke-builds that subset after a .NET project change. S7 attaches the 7z from a non-smoke run. The non-default leg sets `prerelease=true`, and the default leg sets `prerelease=false`. GitHub marks the stable default release "Latest" automatically. +- **`nuget`.** The leaf uploads both `release-asset--nuget` and `nuget-build-` on a non-smoke run and pushes nothing. A separate `publish-nuget` job in the repo's own publisher consumes the second and runs `dotnet nuget push *.nupkg --skip-duplicate`. It then deletes that artifact under the download step's own success (D5.2). Section 3's `Output Seam by Destination` says why the push sits there rather than in the leaf. Configuration is Release on the default branch, Debug otherwise. The default leaf is followed by the D1.7 package consume check in smoke and publish runs alike. A caller's own `build-nuget` hook is outside it. The release-asset `.7z` carries the packages alone, never the loose build output, since each package already holds every target framework's build under its own `lib//`. Where symbols are enabled (`snupkg`), the push auto-carries the paired `.snupkg` to NuGet.org's symbol server and the release-asset `.7z` also contains it, a triple surface. NuGet.org derives `isPrerelease` from the SemVer2 `-g` suffix (the workflow sets no such flag). Test: S15 consumes the package per framework. S7 non-default leg publishes a prerelease package + asset, default a stable. S9 re-run is a server-side `--skip-duplicate` no-op. 5C: query NuGet.org for both versions and the symbol package. +- **`pypi`.** The leaf uploads `release-asset--pypi` and `pypi-build-` on a non-smoke run. The first carries the wheel and sdist as bare files, so the release attaches them directly. A **separate** `publish-pypi` job (with `environment: pypi`, `id-token: write`, `actions: write`) does the OIDC Trusted-Publishing upload with `skip-existing: true`. It then **consume-then-deletes** the build artifact under the download step's own success (D5.2). So on S9 the build artifact is deleted even though the `release-asset-*` delete is skipped. The version is the `X.Y.Z` core of `SemVer2` with `.dev0` appended on `develop` only, per D3.4. The default leaf is followed by the D1.8 package consume check in smoke and publish runs alike. A caller's own `build-pypi` hook is outside it. A PyPI-only repo on the default leaf keeps `expect_release_assets` true, and one whose own `build-pypi` hook uploads no `release-asset-*` sets it false. Test: S16 consumes the wheel and the sdist per Python line. S7 default leg publishes a release, non-default a `.dev0`, and the release carries the wheel and the sdist. S9 is a `skip-existing` no-op. 5C inspects the `dist/*` filenames and the compute-version log. - **`docker`.** The leaf pushes the default branch multi-arch (amd64+arm64) and any other branch `amd64`-only, with a per-branch registry buildcache. A single-image repo caches to `:buildcache-`. A multi-image repo varies the cache **repository** rather than the tag, `:buildcache-` for each image, since the tag alone cannot distinguish two images. `cache-to` writes only the built branch and only on push, and `cache-from` reads both branches. It contributes no `release-asset-*`, so a Docker-only repo's caller passes `expect_release_assets: false`. The readme job (`peter-evans/dockerhub-description`, `DOCKER_HUB_ACCESS_TOKEN`) runs **only** when the default branch publishes, whether called directly or reached through the hub-hosted `publish-docker-readme-task.yml`. Where the Docker Hub overview differs from the project README, the repo publishes a `Docker/README.md` through that task, the Hub description being size-limited. The docker-readme task validates its two mutually-exclusive input sources, `repositories` against `manifest`+`manifest-jq`. It defaults to the calling repository where neither is supplied. A multi-image repo derives its publish matrix from the manifest. Docker **always re-pushes** the image, independently of a skipped release-create (S9). The tests that follow assume the default tag matrix, which a caller-supplied `matrix` or `docker-prepare` hook replaces. Test: S7 default leg pushes `latest` + the version tag and updates the readme. Non-default pushes `develop` + the version tag (amd64 only). S9 still re-pushes. 5C Docker probe needs `DOCKER_HUB_*` secrets and same-repo (not fork) runs. - **`library` (a worked example, not a fleet type).** No such leaf ships, so this row walks D6.4's add-a-target procedure rather than an existing shape. The target is a single new leaf that validates, zips, and uploads `release-asset--library` (`retention-days: 1` per D5.4, upload gated on smoke being false per D1.3). Adding it means a new `enable_library` input, and a `build-library` job and its `github-release` and `build-docker` `needs:` entries, in the release task. In the PR workflow it means a `library` paths-filter entry, `changes` output, and `smoke-build` enable-forward. Without that last one, D1.1 never smoke-builds the library. In the publisher, it means the `enable_library` value the publisher passes, and the library's paths in its `on.push.paths` where it carries a `push` trigger. **Only a repo that owns its release task can make the release-task half of that edit.** The hub-hosted release task declares a closed input set, and a call passing an input it does not declare fails. So a repo calling it sets `enable_release_asset` instead and carries the leaf as its `build-release-asset` hook. The hook writes the zip, and the task uploads it under `release-asset--build-release-asset`, skipping the upload on a smoke run. Keep `expect_release_assets: true` (it has a file target, unlike Docker). The caller's own validation job is replaced by a type-appropriate validator only where the reusable one cannot express this repo's validation. The aggregator is then re-pointed to the replacement (D1.2). `smoke-build` keeps `needs: [changes]`, as D1.2 has it. `version.json` and the NBGV `get-version` **job** are retained (they own the tag). Test: S1 smoke runs validate+zip and uploads nothing. S7 attaches the zip, prerelease on the non-default leg. S9 on a push re-run skips release-create and the asset-delete (the existing zip is untouched, no registry push). A `workflow_dispatch` re-run, by contrast, is D4.4's refresh case rather than S9's, re-uploading then re-deleting the asset. - **`upstream-wrapper`.** The repo tracks an upstream project's releases rather than versioning its own code. A scheduled resolver writes a `name -> version` state file and opens a per-branch bump pull request. The merge-bot auto-merges it, or leaves it for the maintainer where the tracker sets `auto-merge: false` (D8.3). The build leaf MUST read that state file for its build or image version instead of `SemVer2`, while NBGV still tags the release (D3.5). That is because the tracker ships without this consumer wiring. Test: S11 traces the bump from resolver to the publish that ships it, which for a merge-bot-merged `main` pin is D8.3's gated publish. Nothing in this row depends on which build-target types the wrapper also declares. -- **`homeassistant`.** Adds a **file target**: distribution is a GitHub release that HACS installs from, so the release carries the integration zip. The contract's seam for that is D6.1's `release-asset--` upload collected by `pattern:`. A repo owning its release task supplies it itself, and a repo calling the hub-hosted task supplies it through its `build-release-asset` hook. A repo reaching the same tag-plus-asset outcome through a differently-named artifact diverges from D4.3 and D6.1 alike. That is a defect against the seam rather than against the release it produces. Its Python side follows home-assistant/core conventions rather than this fleet's defaults: pip with `requirements*.txt`, a `custom_components/` layout, and standalone `.ruff.toml` and `pyrightconfig.json`. That is expected rather than drift. And `mypy --strict` runs in CI. Test: S1 smoke-builds the zip, and S7 attaches it where the repo has a publisher. -- **`eda`.** Adds a **file target**: distribution is a GitHub release data zip that a local EDA install pulls, supplied the way the `homeassistant` row gives. It also adds design-data validation to the pull request gate, the analogue of the code linters, `kicad-cli` ERC/DRC or library linting in practice. Where the repo generates build-time artifacts (gerbers, drill files, a BOM), that generation is deterministic from the design inputs. A data-only repo not yet building artifacts owes that only once it starts. Test: S1 smoke-builds the zip, S2 and S3 cover the validation gate, and S7 attaches it where the repo has a publisher. +- **`homeassistant`.** Adds a **file target**: distribution is a GitHub release that HACS installs from, so the release carries the integration zip. The contract's seam for that is D6.1's `release-asset--` upload collected by `pattern:`. A repo owning its release task supplies it itself, and a repo calling the hub-hosted task supplies it through its `build-release-asset` hook. A repo reaching the same tag-plus-asset outcome through a differently-named artifact diverges from D4.3 and D6.1 alike. That is a defect against the seam rather than against the release it produces. Its Python side follows home-assistant/core conventions rather than this fleet's defaults: pip with `requirements*.txt`, a `custom_components/` layout, and standalone `.ruff.toml` and `pyrightconfig.json`. That is expected rather than drift. And `mypy --strict` runs in CI. Test: S1 smoke-builds the zip, and S7 attaches it. +- **`eda`.** Adds a **file target** for a part library, and for a board once its pipeline generates fabrication outputs, supplied the way the `homeassistant` row gives. A repository is a part library where it distributes symbols or footprints for other designs to use. It is a board where it holds a design it exists to fabricate. One repository can be both, and then owes each target on that target's own terms. A part library's target is a GitHub release data zip that a local EDA install pulls. A board's target is the fabrication outputs its pipeline generates, such as gerbers, drill files, and a BOM. The type also adds design-data validation to the pull request gate, the analogue of the code linters, `kicad-cli` ERC/DRC or library linting in practice. Where the repo generates build-time artifacts, such as a part library's zip or a board's fabrication outputs, that generation is deterministic. Its inputs are the design inputs and the version D3 computes. Test: S1 smoke-builds the file target, S7 attaches it, and S2 and S3 cover the validation gate. - **`codegen`.** Adds a generation workflow that runs as a matrix over both branches and is deterministic from an external source (D8.2). That workflow carries no per-run timestamp or GUID. It contributes no build target and no publish scenario of its own, so it changes no row of the table above. - **`csharp`, `python`, `cpp`, `docs`.** Add no pipeline construct. They decide what the validation job runs and what the repo's project configuration must hold. For `csharp` that is the analyzer and central-MSBuild rules and D1.6's C# coverage leg, and for `python` the profile split and D1.6's Python one. For `cpp` it is a shared `clang-format` feeding the lint gate, and for `docs` a lint-only CI with no build or test. A repo declaring one of these and nothing else reaches only the scenarios its publisher and its pull request workflow already supply. -- **`source-only`.** Adds no build leaf of its own. In a repo declaring no build-target type beside it, the publish job reaches the reusable release task with `github: true`, every `enable_*` input false, and `expect_release_assets: false`. That produces tag + source zip + README + LICENSE with no asset download. In such a repo, the paths-filter matches nothing, so a retained `smoke-build` job is **structurally always skipped**, and the repo may drop that never-running job. A repo declaring a build-target type as well enables that target instead, this row taking nothing away from it. NBGV and `version.json` own the tag. Validation remains the caller's own job reaching the reusable validator. The aggregator `needs:` that validation job (D1.2), and a retained `smoke-build` job `needs:` the `changes` job rather than the validation job. The publish job depends on the same reusable validation task the PR workflow runs, which prevents a dispatch from releasing a ref that fails validation. The release task carries the D6.1 `pattern:` download and the `release-asset-*` cleanup step (D5.1 to D5.3 and D5.5). So a repo contains them whether it owns that task or calls the hub-hosted copy, and is checked on them either way. **Owning it changes only where the evidence is cited**, in the repo's own file or at the SHA it pins, per section 5A's citation rule. Test, where the repo has a publisher: S7 covers the release, S8 the dispatch guard, and S10 the classification gate. -- **`hugo` (a static site deployed to a host the project owns).** Two independent surfaces, and keeping them apart is the point. The **release** is the `source-only` shape above, unchanged. The **deploy** is its own `workflow_dispatch` carrying an `environment` choice input, so redeploying an unchanged commit mints no tag, which matters because redeploying is routine. It runs a ref gate **first**, before anything is installed or written. The gate admits production from the default branch only. Any ref may reach a non-production environment, since proving a branch before it merges is what that environment is for. The deploy then runs the **same** reusable validation task the PR gate runs, so a dispatch cannot deploy a ref that fails validation. Then the deploy calls the hub-hosted `deploy-site-task.yml`. That task declares the `environment:` inside itself rather than on the calling job, since GitHub rejects a job carrying both `uses:` and `environment:`. The caller still maps the crossing secrets explicitly under `secrets:`. It maps `DEPLOY_SSH_PRIVATE_KEY` because the task declares it required. It maps the `SITE_AUTH_TOKEN_ID`/`SITE_AUTH_TOKEN` pair, or the `SITE_EXTRA_AUTH_TOKEN_ID`/`SITE_EXTRA_AUTH_TOKEN` pair for a second site, only where a token-gated live check needs it. The mapping is explicit because `secrets: inherit` is not used on a cross-repository call. For a secret the environment defines, the value the task's job reads is resolved by the task's own `environment:` binding. It comes from the caller's environment store, not from that mapping. That task hard-asserts the interfaces that follow. It requires the environment to carry `SITE_BASE_URL`, `DEPLOY_SSH_USER`, `DEPLOY_SSH_HOST` and `DEPLOY_SSH_KNOWN_HOSTS` as variables and `DEPLOY_SSH_PRIVATE_KEY` as a secret, each non-empty. It fails fast naming every missing one. It requires `SITE_AUTH_TOKEN_ID` and `SITE_AUTH_TOKEN` to be mapped together or not at all, and the same of `SITE_EXTRA_AUTH_TOKEN_ID` and `SITE_EXTRA_AUTH_TOKEN`. That second pair also needs a non-empty `SITE_EXTRA_BASE_URL` variable. And it requires a **deploy hook** at `.github/actions/deploy/action.yml`, one composite action the caller owns, run once for each `mode` input value, `build`, `prune` and `verify`. The hook declares every input the task passes across those runs, `mode`, `bundle-path`, `release-id` and `environment`. Its `build` run leaves `releases//` and `current` under `bundle-path`, each of which the task asserts. The task re-asserts the environment *name*, `production` or `staging`, in a job of its own. It does so because the `environment:` binding resolves before any step runs. Another reason is that a `workflow_call` caller is not bound by the dispatch choice list a human sees. The ref gate gets no counterpart re-assertion, so a caller reaching the task directly is trusted for the ref and not for the environment. That is a deliberate asymmetry rather than an omission. Its environment-bound job then does the following. It checks out full history (a shallow clone silently changes page metadata). It derives the release id **once** and exports it. Deriving it twice yields ids seconds apart, and the live check then asserts a version nothing installed. It runs the hook's `build` invocation, and installs the deploy credential from the environment. It uploads into a per-release directory hard-linked against the current release. The upload carries **no** delete flag (at an environment root a delete removes the rollback targets). It flips the pointer as a separate atomic step, so a failed transfer cannot half-publish. Then it runs the hook's `prune` and `verify` invocations. The second checks the running host (D4.6) against the site's own URL contract. Retention (D5.6) is bounded by a declared count with one side recorded as owning it. A deploy whose credential can observe the destination prunes and asserts the count in the `prune` hook. A credential confined **write-only**, by contrast, can neither delete nor read back. So that repo's `prune` hook is a no-op, the prune is a host-side timer, and the repo's runbook records that ownership. Widening the credential to bring the prune in-pipeline would trade a real confinement boundary for a check, and is the wrong trade. What the guarantee rejects is neither side owning it. There is one thing the pipeline cannot assert and the server config must. A non-public environment serving a byte-identical copy must not be indexed. That default belongs on the side that is harmless in production. That is because a non-public container missing the value is still behind its gate, while a production container inheriting it deindexes the site silently. -- **Operational (a `workflowModel`, not a type).** A `workflowModel: operational` repo layers direct commits to `develop` onto the `source-only` release shape above. It has the following workflows. The first is a **lint/validation** PR workflow that feeds the required `Check pull request workflow status job`. It uses the generic linters (editorconfig/EOL, markdownlint, cspell, actionlint) plus a domain validator, with **no unit tests**. Examples include Home Assistant `hass --script check_config`, `esphome config`, or a firmware build. Its triggers differ from the `release` model. It runs on pushes to `develop`, on every pull request, and on `workflow_dispatch`. Push validation is advisory. Pull request validation is enforced on `main` and reported but not required on `develop`. The second workflow is the standard `source-only` publisher. NBGV and `version.json` own the tag. The reusable release task creates tag + source zip + README + LICENSE. **The PR trigger filters no base branch.** A filter naming `main` alone starts no validation when a PR opens against `develop`. The aggregator then never reports, and the PR appears clean with an empty check list. D1.2 forbids that output. A filter naming both branches still starts none for a stacked PR, one opened against another feature branch. The trigger keeps the default activity types, so a retarget starts no run. The head keeps the check its last run posted against the old base. So a retargeted PR is pushed to, or closed and reopened, before it merges, which validates it against its new base. The push trigger causes a duplicate run after a PR merge. The change validates on the PR and again on the resulting push, regardless of merge method. The operational `develop` ruleset prescribes no merge method. The concurrency group uses the workflow name plus `${{ github.ref }}` (`GOVERNANCE.md` "Workflow YAML Conventions"). A pull request uses `refs/pull//merge`, while its push uses `refs/heads/develop`. The runs occupy different groups and neither cancels the other. Pay that cost. The lint-only gate costs only a few runner-minutes. Suppressing the push requires distinguishing a merge commit from a direct commit, which restores the ambiguity the trigger set removes. Having no build target, such a repo never reaches S1, whose input is a target change, on any pull request. That includes promotion and `develop` pull requests. See the branch-model note in Section 3 and [GOVERNANCE.md "Branching Model"][governance-branching-model]. +- **`source-only`.** Adds no build leaf of its own. In a repo declaring no build-target type beside it, the publish job reaches the reusable release task with `github: true`, every `enable_*` input false, and `expect_release_assets: false`. That produces tag + source zip + README + LICENSE with no asset download. In such a repo, the paths-filter matches nothing, so a retained `smoke-build` job is **structurally always skipped**, and the repo may drop that never-running job. A repo declaring a build-target type as well enables that target instead, this row taking nothing away from it. NBGV and `version.json` own the tag. Validation remains the caller's own job reaching the reusable validator. The aggregator `needs:` that validation job (D1.2), and a retained `smoke-build` job `needs:` the `changes` job rather than the validation job. The publish job depends on the same reusable validation task the PR workflow runs, which prevents a dispatch from releasing a ref that fails validation. The release task carries the D6.1 `pattern:` download and the `release-asset-*` cleanup step (D5.1 to D5.3 and D5.5). So a repo contains them whether it owns that task or calls the hub-hosted copy, and is checked on them either way. **Owning it changes only where the evidence is cited**, in the repo's own file or at the SHA it pins, per section 5A's citation rule. Test: S7 covers the release, S8 the dispatch guard, and S10 the classification gate. +- **`hugo` (a static site deployed to a host the project owns).** Two independent surfaces, and keeping them apart is the point. The **release** is the `source-only` shape above, unchanged. The **deploy** is its own `workflow_dispatch` carrying an `environment` choice input, so redeploying an unchanged commit mints no tag, which matters because redeploying is routine. It runs a ref gate **first**, before anything is installed or written. The gate admits production from the default branch only. Any ref may reach a non-production environment, since proving a branch before it merges is what that environment is for. The deploy then runs the **same** reusable validation task the PR gate runs, so a dispatch cannot deploy a ref that fails validation. Then the deploy calls the hub-hosted `deploy-site-task.yml`. That task declares the `environment:` inside itself rather than on the calling job, since GitHub rejects a job carrying both `uses:` and `environment:`. The caller still maps the crossing secrets explicitly under `secrets:`. It maps `DEPLOY_SSH_PRIVATE_KEY` because the task declares it required. It maps the `SITE_AUTH_TOKEN_ID`/`SITE_AUTH_TOKEN` pair, or the `SITE_EXTRA_AUTH_TOKEN_ID`/`SITE_EXTRA_AUTH_TOKEN` pair for a second site, only where a token-gated live check needs it. The mapping is explicit because `secrets: inherit` is not used on a cross-repository call. For a secret the environment defines, the value the task's job reads is resolved by the task's own `environment:` binding. It comes from the caller's environment store, not from that mapping. That task hard-asserts the interfaces that follow. It requires the environment to carry `SITE_BASE_URL`, `DEPLOY_SSH_USER`, `DEPLOY_SSH_HOST` and `DEPLOY_SSH_KNOWN_HOSTS` as variables, each non-empty, and `DEPLOY_SSH_PRIVATE_KEY` to reach its job non-empty. It fails fast naming every missing one. It requires `SITE_AUTH_TOKEN_ID` and `SITE_AUTH_TOKEN` to be mapped together or not at all, and the same of `SITE_EXTRA_AUTH_TOKEN_ID` and `SITE_EXTRA_AUTH_TOKEN`. That second pair also needs a non-empty `SITE_EXTRA_BASE_URL` variable. And it requires a **deploy hook** at `.github/actions/deploy/action.yml`, one composite action the caller owns, run once for each `mode` input value, `build`, `prune` and `verify`. The hook declares every input the task passes across those runs, `mode`, `bundle-path`, `release-id` and `environment`. Its `build` run leaves `releases//` and `current` under `bundle-path`, each of which the task asserts. The task re-asserts the environment *name*, `production` or `staging`, in a job of its own. It does so because the `environment:` binding resolves before any step runs. Another reason is that a `workflow_call` caller is not bound by the dispatch choice list a human sees. The ref gate gets no counterpart re-assertion, so a caller reaching the task directly is trusted for the ref and not for the environment. That is a deliberate asymmetry rather than an omission. Its environment-bound job then does the following. It checks out full history (a shallow clone silently changes page metadata). It derives the release id **once** and exports it. Deriving it twice yields ids seconds apart, and the live check then asserts a version nothing installed. It runs the hook's `build` invocation, and installs the deploy credential. It uploads into a per-release directory hard-linked against the current release. The upload carries **no** delete flag (at an environment root a delete removes the rollback targets). It flips the pointer as a separate atomic step, so a failed transfer cannot half-publish. Then it runs the hook's `prune` and `verify` invocations. The second checks the running host (D4.6) against the site's own URL contract. Retention (D5.6) is bounded by a declared count with one side recorded as owning it. A deploy whose credential can observe the destination prunes and asserts the count in the `prune` hook. A credential confined **write-only**, by contrast, can neither delete nor read back. So that repo's `prune` hook is a no-op, the prune is a host-side timer, and the repo's runbook records that ownership. Widening the credential to bring the prune in-pipeline would trade a real confinement boundary for a check, and is the wrong trade. What the guarantee rejects is neither side owning it. There is one thing the pipeline cannot assert and the server config must. A non-public environment serving a byte-identical copy must not be indexed. That default belongs on the side that is harmless in production. That is because a non-public container missing the value is still behind its gate, while a production container inheriting it deindexes the site silently. +- **Operational (a `workflowModel`, not a type).** A `workflowModel: operational` repo layers direct commits to `develop` onto the `source-only` release shape above. It has the following workflows. The first is a **lint/validation** PR workflow that feeds the required `Check pull request workflow status job`. It uses the generic linters (editorconfig/EOL, markdownlint, cspell, actionlint) plus a domain validator. It runs **no unit tests** unless the repo carries a .NET test project or a Python suite the validator runs. Tests that its own validate hook or a replacement validator runs count too. D1.6 then covers a .NET or Python suite as in any other repo. Examples include Home Assistant `hass --script check_config`, `esphome config`, or a firmware build. Its triggers differ from the `release` model. It runs on pushes to `develop`, on every pull request, and on `workflow_dispatch`. Push validation is advisory. Pull request validation is enforced on `main` and reported but not required on `develop`. The second workflow is the standard `source-only` publisher. NBGV and `version.json` own the tag. The reusable release task creates tag + source zip + README + LICENSE. **The PR trigger filters no base branch.** A filter naming `main` alone starts no validation when a PR opens against `develop`. The aggregator then never reports, and the PR appears clean with an empty check list. D1.2 forbids that output. A filter naming both branches still starts none for a stacked PR, one opened against another feature branch. The trigger keeps the default activity types, so a retarget starts no run. The head keeps the check its last run posted against the old base. So a retargeted PR is pushed to, or closed and reopened, before it merges, which validates it against its new base. The push trigger causes a duplicate run after a PR merge. The change validates on the PR and again on the resulting push, regardless of merge method. The operational `develop` ruleset prescribes no merge method. The concurrency group uses the workflow name plus `${{ github.ref }}` (`GOVERNANCE.md` "Workflow YAML Conventions"). A pull request uses `refs/pull//merge`, while its push uses `refs/heads/develop`. The runs occupy different groups and neither cancels the other. Pay that cost. The validation gate costs only a few runner-minutes. Suppressing the push requires distinguishing a merge commit from a direct commit, which restores the ambiguity the trigger set removes. Having no build target, such a repo never reaches S1, whose input is a target change, on any pull request. That includes promotion and `develop` pull requests. See the branch-model note in Section 3 and [GOVERNANCE.md "Branching Model"][governance-branching-model]. From 6517ce5a82b4a735c29f54221b08d1aa44e5d6f1 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 6 Dec 2026 10:57:55 -0800 Subject: [PATCH 23/25] Retire CLAUDE.md and Bump the Hub Pins to 2.0.1682 (#552) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Second pull request of the hub 2.0.1682 resync, per `RESYNC.md` step 2 (deletions), branched from `develop` after #551 merged. ## Changes - **CLAUDE.md retired.** `spec/divergences.json` gives it a `retire` disposition, since Claude Code reads `AGENTS.md` itself. This copy matched a past hub version, so it is deleted rather than re-vendored. The `AGENTS.md` intro sentence and the `GOVERNANCE.md` "Repository Layout" entry that named it go with it. The tree-wide sweep `RESYNC.md` section 4 requires finds no other reference outside the carried Skills tree, whose mentions are hub-authored text about the fleet's own handling of the file. - **Hub pins to 2.0.1682.** Every reusable-workflow pin to `ptr727/ProjectTemplate` moves from 2.0.1625 to 2.0.1682, the release #551 resynced to. The retirement does not depend on it: the `prose-gate.json` exemption list at the 2.0.1625 pin already holds `CLAUDE.md`, checked per `RESYNC.md` section 4. - **OPERATIONS.md** now states how the carried CI contract selects test projects: `Unit test job (.NET X.Y)` runs `dotnet test --framework` over each tracked `*Tests*.csproj`, so a local root run predicts it only while each is in `LanguageTags.slnx`. This answers a finding on #551's review. ## Verification - Two `local-strict-review` passes at the `frontier` tier. The first raised 1 finding (the OPERATIONS.md sentence overstated CI parity), fixed in 72e4547, and the second raised none. - The pin bump adds only optional inputs with empty defaults, so the callers need no change. Follow-ups: merge-bot caller trigger and checkout credentials (next), then the intent files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/run-periodic-codegen-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- AGENTS.md | 2 +- CLAUDE.md | 5 ----- GOVERNANCE.md | 1 - OPERATIONS.md | 2 +- 8 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 CLAUDE.md diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index ca2ae9f..57039bf 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -18,7 +18,7 @@ jobs: merge-bot: name: Merge bot pull request job - uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 + uses: ptr727/ProjectTemplate/.github/workflows/merge-bot-task.yml@ac58eecb52e99e5bf7d3aef6ba18862bdf745a60 # 2.0.1682 # The repository-wide auto-delete stays off, so the task deletes each merged bot head branch instead. with: delete-branch: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index b3e14e3..0cfdb29 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,7 +41,7 @@ jobs: # Single source of the release-gate decision, publish or not and stable or not, reused by every job below. plan: name: Plan release job - uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 + uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@ac58eecb52e99e5bf7d3aef6ba18862bdf745a60 # 2.0.1682 with: event_name: ${{ github.event_name }} actor: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: name: Validate job needs: [plan] if: ${{ needs.plan.outputs.publish == 'true' }} - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@ac58eecb52e99e5bf7d3aef6ba18862bdf745a60 # 2.0.1682 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} permissions: @@ -67,7 +67,7 @@ jobs: name: Publish project release job needs: [plan, validate] if: ${{ needs.plan.outputs.publish == 'true' && needs.validate.result == 'success' }} - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@ac58eecb52e99e5bf7d3aef6ba18862bdf745a60 # 2.0.1682 permissions: contents: write actions: write diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index c2d90ef..0d28b78 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -22,7 +22,7 @@ jobs: run-codegen: name: Run codegen and pull request job - uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 + uses: ptr727/ProjectTemplate/.github/workflows/run-codegen-pull-request-task.yml@ac58eecb52e99e5bf7d3aef6ba18862bdf745a60 # 2.0.1682 secrets: CODEGEN_APP_CLIENT_ID: ${{ secrets.CODEGEN_APP_CLIENT_ID }} CODEGEN_APP_PRIVATE_KEY: ${{ secrets.CODEGEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 460d3ad..7ec5adb 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -58,7 +58,7 @@ jobs: validate: name: Validate job - uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 + uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@ac58eecb52e99e5bf7d3aef6ba18862bdf745a60 # 2.0.1682 permissions: contents: read # Mapped explicitly rather than inherited, since this is a cross-repository call and secrets: inherit would hand the callee every secret this repository holds. @@ -75,7 +75,7 @@ jobs: name: Smoke build job needs: [changes] if: needs.changes.outputs.release == 'true' || github.event_name == 'workflow_dispatch' - uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@77a5e2d1a2424428c9962ed494f624a19264cb93 # 2.0.1625 + uses: ptr727/ProjectTemplate/.github/workflows/build-release-task.yml@ac58eecb52e99e5bf7d3aef6ba18862bdf745a60 # 2.0.1682 permissions: contents: read with: diff --git a/AGENTS.md b/AGENTS.md index 2993d28..982cc33 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ **LanguageTags** is a C# .NET library for handling ISO 639-2, ISO 639-3, and RFC 5646 / BCP 47 language tags. The library ships as the NuGet package `ptr727.LanguageTags` and is consumed directly from `main`. The repo also contains a CLI codegen tool (`LanguageTagsCreate/`) that refreshes embedded language data from upstream registries, and an xUnit test project (`LanguageTagsTests/`). -This file is the entry point every coding agent reads first (Claude Code reads [`CLAUDE.md`](./CLAUDE.md), which imports this file). Past that description, the sections below are the only three things this file holds: the bootstrap that says where the canonical rules live and which procedure to follow for the state this repository is actually in, the rules for managing context and delegation, which apply to every task, and a map of where every other rule lives. The fleet-wide rule text itself is in [`GOVERNANCE.md`](./GOVERNANCE.md), one section per topic. Code style lives in [`CODESTYLE.md`](./CODESTYLE.md), the CI/CD workflow contract in [`WORKFLOW.md`](./WORKFLOW.md), the library's design and public-API contracts in [`ARCHITECTURE.md`](./ARCHITECTURE.md), and how this repository is run day to day in [`OPERATIONS.md`](./OPERATIONS.md). +This file is the entry point every coding agent reads first. Past the description above, it holds three things. The first is the bootstrap that says where the canonical rules live and which procedure fits the state this repository is in. The second is the rules for managing context and delegation, which apply to every task. The third is a map of where every other rule lives. The fleet-wide rule text itself is in [`GOVERNANCE.md`](./GOVERNANCE.md), one section per topic. Code style lives in [`CODESTYLE.md`](./CODESTYLE.md) and the CI/CD workflow contract in [`WORKFLOW.md`](./WORKFLOW.md). The library's design and public-API contracts live in [`ARCHITECTURE.md`](./ARCHITECTURE.md). How this repository is run day to day lives in [`OPERATIONS.md`](./OPERATIONS.md). Treat this file and `GOVERNANCE.md` as authoritative for cross-cutting rules, and do not restate their rules elsewhere. This project's own public-API and behavioral contracts live in [`ARCHITECTURE.md`](./ARCHITECTURE.md), which the paragraph above routes to, and never in [`.github/copilot-instructions.md`](./.github/copilot-instructions.md), because that file targets GitHub Copilot and VS Code specifically while the docs this file routes to are the agent-agnostic ones every coding agent reads. diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index a2c84a1..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -# Claude Code Entry Point - -@AGENTS.md - -Claude Code reads `CLAUDE.md`, not `AGENTS.md`, so the import line above is what gets this repository's rules into a Claude Code session at all. See `AGENTS.md` for what is authoritative and why. This file carries no rule of its own, and adds none beyond the import line. diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 849a048..3bd09f0 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -329,7 +329,6 @@ Every repo's GitHub repository details (the About panel) follow a fixed conventi ## Repository Layout - [`AGENTS.md`](./AGENTS.md): the agent entry point, carrying context and delegation rules plus the map to the sections below. -- [`CLAUDE.md`](./CLAUDE.md): imports `AGENTS.md`, since Claude Code reads `CLAUDE.md` and never `AGENTS.md` on its own. Carries no rule of its own. - [`GOVERNANCE.md`](./GOVERNANCE.md), [`CODESTYLE.md`](./CODESTYLE.md), [`WORKFLOW.md`](./WORKFLOW.md): the governance docs. This file is the cross-cutting-rules authority. - [`ARCHITECTURE.md`](./ARCHITECTURE.md): how the library is laid out, and the public-API and behavioral contracts a consumer is entitled to assume. - [`OPERATIONS.md`](./OPERATIONS.md): how this repo is run, day to day, beyond what CI covers. diff --git a/OPERATIONS.md b/OPERATIONS.md index da61997..abb5e65 100644 --- a/OPERATIONS.md +++ b/OPERATIONS.md @@ -7,7 +7,7 @@ How this repo is run, day to day, beyond what CI covers. [`AGENTS.md`](./AGENTS. What verifying a change in this repo requires, and which part of the repo's contract CI structurally cannot exercise. - **Clean-compile.** Run the `.NET Format` VS Code task (chains `CSharpier Format` -> `.NET Build` -> `dotnet format style --verify-no-changes`) after every code change; see [`.vscode/tasks.json`](./.vscode/tasks.json) for the exact command sequence, and [`CODESTYLE.md`](./CODESTYLE.md) "Clean-Compile Verification" for why it must match exactly. -- **Tests.** `dotnet test --coverage --coverage-output-format cobertura --results-directory ./coverage` (native Microsoft.Testing.Platform mode, per `global.json`, driving `Microsoft.Testing.Extensions.CodeCoverage`). This is also the invocation CI's `Validate job / Unit test job` runs, so a local pass predicts the CI result. +- **Tests.** `dotnet test --coverage --coverage-output-format cobertura --results-directory ./coverage` (native Microsoft.Testing.Platform mode, per `global.json`, driving `Microsoft.Testing.Extensions.CodeCoverage`). CI's .NET unit-test leg, `Validate job / Unit test job (.NET X.Y)`, instead runs `dotnet test --framework` over each tracked `*Tests*.csproj`. A local pass predicts it only while every such project is in `LanguageTags.slnx`. - **Codegen drift.** `dotnet run --project ./LanguageTagsCreate/LanguageTagsCreate.csproj -- --codepath . --skip-download` then `dotnet tool restore && dotnet csharpier format .` regenerates the embedded language data offline from the committed `LanguageData/` (no network) and reformats it. CI runs exactly this as `Validate job / Validate repository job`, which invokes this repository's own hook at [`.github/actions/validate/action.yml`](./.github/actions/validate/action.yml), and fails if the tree drifts from what is committed. Run this whenever you change a codegen emitter (`SaveCodeAsync` / `SaveJsonAsync` / `GetCodeGenString` in `LanguageTags/*Data.cs` or `LanguageTags/LanguageSchema.cs`) or the committed `LanguageData/` source, and commit the regenerated `LanguageTags/*DataGen.cs` and `LanguageData/*.json` in the **same PR**. `--skip-download` never fetches upstream. A full refresh from the official ISO 639-2/3, RFC 5646, and UN M.49 registries is the scheduled codegen workflow's job, not something to run in a feature PR. - **Linters.** See "Tool Usage" below for the known-working invocations; CI is the authoritative run, a local run is only for fast feedback. - **Workflow changes.** [`WORKFLOW.md`](./WORKFLOW.md) is a machine-followable rulebook, not just documentation: it defines a static audit (5A), end-to-end trace scenarios (5B), a live probe (5C), and a repository-configuration audit (5D) that together yield a binary **operational / not-operational** verdict. When asked to check, change, or troubleshoot the CI/CD workflows, drive that methodology, audit the workflow files and repository configuration against the section-4 contract, trace the affected scenarios, and report the verdict with `file:line` citations, rather than reasoning about the YAML ad hoc. A workflow change is not done until it has been re-validated this way (probe without publishing). From f605f853c8cb1a6a80ade25dfa3741c8a323d2cf Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 6 Dec 2026 11:03:49 -0800 Subject: [PATCH 24/25] Add auto_merge_disabled to the Merge Bot and Drop Checkout Credentials (#553) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Third pull request of the hub 2.0.1682 resync, per `RESYNC.md` step 4 (interface workflows), branched from `develop` after #552 merged. ## Changes - **Merge-bot caller** subscribes to `auto_merge_disabled`, the event type `AUDIT.md` section 0's merge-bot contract requires. The hub's `rearm-auto-merge` job then re-arms a bot pull request whose auto-merge GitHub disabled, instead of leaving it open and green. The caller's `permissions: {}` still holds, since the called jobs write with the App token alone. - **test-pull-request.yml** sets `persist-credentials: false` on its one `actions/checkout`, per the carried "Checkout credentials" rule. The job's only later steps read through the API, so nothing needs the stored token. This answers the interface-workflow finding in audit run `2026-12-06T18:30:21Z`, hub `ac58eecb`. ## Verification A `local-strict-review` pass at the `frontier` tier raised no findings. Follow-up: the intent files, in the next pull request. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .github/workflows/merge-bot-pull-request.yml | 2 +- .github/workflows/test-pull-request.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 57039bf..152cecc 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -4,7 +4,7 @@ name: Merge bot pull request action # The trigger is pull_request_target so the called workflow resolves from the trusted base rather than the PR head, and no job checks out PR code. on: pull_request_target: - types: [opened, reopened, synchronize, closed] + types: [opened, reopened, synchronize, closed, auto_merge_disabled] # GOVERNANCE.md "Workflow YAML Conventions" Concurrency exception (1). concurrency: diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 7ec5adb..ce8ffe0 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -41,6 +41,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 + persist-credentials: false - name: Filter changed paths step id: filter uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 From 804966163eb854bcdc16d6595caaf126fbf44f75 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 6 Dec 2026 11:09:11 -0800 Subject: [PATCH 25/25] Carry the Hub's Intent Files at 2.0.1682 (#554) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Last pull request of the hub 2.0.1682 resync, per `RESYNC.md` step 6 (intent files, by hand), branched from `develop` after #552. ## Changes - **.editorconfig** adopts the hub's analyzer severities, which replace the local `suggestion` severities on the three naming rules with `warning`. The repo's own `[LanguageData/**]` block stays where it was. `dotnet build -c Release` reports 0 warnings and 0 errors, and `dotnet format style --verify-no-changes --severity=info` is clean. - **cspell.json** gains the hub's words, the hub's `ignorePaths` entries, and its `ignoreRegExpList`. The repo's own words and ignore paths stay, and the word list is sorted case-insensitively without duplicates. - **AUDIT.md** was a hand-adapted copy. It becomes the hub's self-audit snippet rendered for `ptr727/LanguageTags` and the `release` model. - **.github/copilot-instructions.md** carries the hub's current rule text. The ledger keeps this repository's "no entry yet" line, and none of the hub's own "Disproved Claims" entries come with it. - **README.md** gains a Codecov coverage shield in Build Status, in the existing badge and reference style. Coverage is uploaded by `publish-release.yml` and `test-pull-request.yml`. ## Not changed - **version.json** is flagged by the intent-staleness advisory only because the hub's `WORKFLOW.md` changed after it. Its `version` and ref spec still match D3, so there is nothing to adopt. The major.minor floor stays the maintainer's call. - **global.json** and **.vscode/tasks.json** already match the catalog snippets for the .NET type. ## Verification Two `local-strict-review` passes at the `frontier` tier. The first raised 3 findings and the second none. One was fixed here: the coverage link moved into the README's External group. One is not a defect: the hub's `reports/*/**` cspell ignore path is dead config in this repo, kept as the hub's value. The third was a request to show `dotnet format style` clean under the new severities, which it now is. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .editorconfig | 99 ++++++++++++++++++++- .github/copilot-instructions.md | 4 +- AUDIT.md | 10 +-- README.md | 3 + cspell.json | 148 +++++++++++++++++++++++++++++--- 5 files changed, 244 insertions(+), 20 deletions(-) diff --git a/.editorconfig b/.editorconfig index 1fa2f54..97b5c97 100644 --- a/.editorconfig +++ b/.editorconfig @@ -56,6 +56,99 @@ trim_trailing_whitespace = false # Prefer a [SuppressMessage] attribute, or the owning project's .editorconfig. # Relax a rule repo-wide here only when it applies to every project, never for a brownfield batch. dotnet_diagnostic.IDE0055.severity = none +dotnet_diagnostic.IDE0003.severity = warning +dotnet_diagnostic.IDE0007.severity = warning +dotnet_diagnostic.IDE0008.severity = warning +dotnet_diagnostic.IDE0009.severity = warning +dotnet_diagnostic.IDE0011.severity = warning +dotnet_diagnostic.IDE0016.severity = warning +dotnet_diagnostic.IDE0017.severity = warning +dotnet_diagnostic.IDE0018.severity = warning +dotnet_diagnostic.IDE0019.severity = warning +dotnet_diagnostic.IDE0020.severity = warning +dotnet_diagnostic.IDE0021.severity = warning +dotnet_diagnostic.IDE0022.severity = warning +dotnet_diagnostic.IDE0023.severity = warning +dotnet_diagnostic.IDE0024.severity = warning +dotnet_diagnostic.IDE0025.severity = warning +dotnet_diagnostic.IDE0026.severity = warning +dotnet_diagnostic.IDE0027.severity = warning +dotnet_diagnostic.IDE0028.severity = warning +dotnet_diagnostic.IDE0029.severity = warning +dotnet_diagnostic.IDE0030.severity = warning +dotnet_diagnostic.IDE0031.severity = warning +dotnet_diagnostic.IDE0032.severity = warning +dotnet_diagnostic.IDE0033.severity = warning +dotnet_diagnostic.IDE0034.severity = warning +dotnet_diagnostic.IDE0036.severity = warning +dotnet_diagnostic.IDE0037.severity = warning +dotnet_diagnostic.IDE0038.severity = warning +dotnet_diagnostic.IDE0039.severity = warning +dotnet_diagnostic.IDE0040.severity = warning +dotnet_diagnostic.IDE0041.severity = warning +dotnet_diagnostic.IDE0042.severity = warning +dotnet_diagnostic.IDE0044.severity = warning +dotnet_diagnostic.IDE0045.severity = warning +dotnet_diagnostic.IDE0046.severity = warning +dotnet_diagnostic.IDE0047.severity = warning +dotnet_diagnostic.IDE0048.severity = warning +dotnet_diagnostic.IDE0049.severity = warning +dotnet_diagnostic.IDE0053.severity = warning +dotnet_diagnostic.IDE0054.severity = warning +dotnet_diagnostic.IDE0056.severity = warning +dotnet_diagnostic.IDE0057.severity = warning +dotnet_diagnostic.IDE0058.severity = warning +dotnet_diagnostic.IDE0059.severity = warning +dotnet_diagnostic.IDE0060.severity = warning +dotnet_diagnostic.IDE0061.severity = warning +dotnet_diagnostic.IDE0062.severity = warning +dotnet_diagnostic.IDE0063.severity = warning +dotnet_diagnostic.IDE0065.severity = warning +dotnet_diagnostic.IDE0066.severity = warning +dotnet_diagnostic.IDE0070.severity = warning +dotnet_diagnostic.IDE0071.severity = warning +dotnet_diagnostic.IDE0074.severity = warning +dotnet_diagnostic.IDE0075.severity = warning +dotnet_diagnostic.IDE0078.severity = warning +dotnet_diagnostic.IDE0079.severity = warning +dotnet_diagnostic.IDE0083.severity = warning +dotnet_diagnostic.IDE0090.severity = warning +dotnet_diagnostic.IDE0130.severity = warning +dotnet_diagnostic.IDE0150.severity = warning +dotnet_diagnostic.IDE0160.severity = warning +dotnet_diagnostic.IDE0161.severity = warning +dotnet_diagnostic.IDE0170.severity = warning +dotnet_diagnostic.IDE0180.severity = warning +dotnet_diagnostic.IDE0200.severity = warning +dotnet_diagnostic.IDE0210.severity = warning +dotnet_diagnostic.IDE0211.severity = warning +dotnet_diagnostic.IDE0220.severity = warning +dotnet_diagnostic.IDE0230.severity = warning +dotnet_diagnostic.IDE0250.severity = warning +dotnet_diagnostic.IDE0251.severity = warning +dotnet_diagnostic.IDE0260.severity = warning +dotnet_diagnostic.IDE0270.severity = warning +dotnet_diagnostic.IDE0290.severity = warning +dotnet_diagnostic.IDE0300.severity = warning +dotnet_diagnostic.IDE0301.severity = warning +dotnet_diagnostic.IDE0302.severity = warning +dotnet_diagnostic.IDE0303.severity = warning +dotnet_diagnostic.IDE0304.severity = warning +dotnet_diagnostic.IDE0305.severity = warning +dotnet_diagnostic.IDE0306.severity = warning +dotnet_diagnostic.IDE0320.severity = warning +dotnet_diagnostic.IDE0330.severity = warning +dotnet_diagnostic.IDE0340.severity = warning +dotnet_diagnostic.IDE0350.severity = warning +dotnet_diagnostic.IDE1005.severity = warning +dotnet_diagnostic.IDE1006.severity = warning +dotnet_diagnostic.IDE2000.severity = warning +dotnet_diagnostic.IDE2001.severity = warning +dotnet_diagnostic.IDE2002.severity = warning +dotnet_diagnostic.IDE2003.severity = warning +dotnet_diagnostic.IDE2004.severity = warning +dotnet_diagnostic.IDE2005.severity = warning +dotnet_diagnostic.IDE2006.severity = warning csharp_indent_block_contents = true csharp_indent_braces = false csharp_indent_case_contents = true @@ -147,13 +240,13 @@ csharp_using_directive_placement = outside_namespace dotnet_code_quality_unused_parameters = all dotnet_hide_advanced_members = false dotnet_member_insertion_location = with_other_members_of_the_same_kind -dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields -dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields -dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion +dotnet_naming_rule.static_fields_should_have_prefix.severity = warning dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index fc8da01..7c21738 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -8,7 +8,7 @@ Do not duplicate rules from `AGENTS.md`, `GOVERNANCE.md`, `CODESTYLE.md`, or `WO ## Commit Messages and Pull Request Titles -Use an imperative subject of at most 72 characters with no trailing period. Use US English and title case with lowercase short bind words. Do not add `Co-Authored-By:` unless requested. Do not put a release-bump magnitude in the title. The full contract is in [GOVERNANCE.md "Pull Request Title and Commit Message Conventions"](../GOVERNANCE.md#pull-request-title-and-commit-message-conventions). +Use an imperative subject of at most 72 characters with no trailing period. The limit measures the authored title, and the `(#N)` suffix a squash merge appends sits outside it. Use US English and title case, lowercasing only the short bind words `.github/skills/comment-and-doc-style/SKILL.md` lists, a list that is exhaustive. A `Co-Authored-By:` line is allowed unless the user disallows it or the repository's rules say otherwise. Never include a link to the agent's session, such as a `Claude-Session:` trailer, which nothing overrides. Do not put a release-bump magnitude in the title. The full contract is in [GOVERNANCE.md "Pull Request Title and Commit Message Conventions"](../GOVERNANCE.md#pull-request-title-and-commit-message-conventions). ## Reviewing Carried Fleet Content @@ -27,7 +27,7 @@ For every review: The review automation is `scripts/pr_review.py`, run from a hub checkout. Use its `status`, `wait`, `attest`, `comment`, and `reply --resolve` commands instead of reconstructing GraphQL queries or copying review identifiers by hand. Use `comment` for a suppressed-finding answer in the pull request conversation. Its status gate verifies the current head, diff coverage, output shape, inline threads, body-only findings, and required checks. -A formal review with no findings is complete only when it covers the current head. It also needs full diff coverage of the change set that head has, stated or read from a file table as below. A round covering the head states it. Where none does, a round covering the head whose own file table names exactly the changed files covers it. That is the reading a round at Balanced review effort gives. Where no round covering the head carries its own table, the newest round that does stands in where its table names exactly the changed files. Either table may leave out an added, modified, renamed, or deleted file with no changed line, such as a binary. That holds while some changed file has one. A table stands in only where no Copilot round on the pull request, on any commit, states partial coverage. So a pull request that ever had a partial round goes to the maintainer. A round reporting partial coverage of the diff blocks the merge, and so does a refusal. So does a head that no coverage statement, file table, or attested local pass covers. So does an output shape the digest notes and nobody has read by hand, an unresolved thread, or a body-only finding. The `pr-review-conduct` Skill's Merge Gate states the promotion cases outside these. Where the review policy hands the head to a local pass, an attested local pass covers it, `coverage=local` in the digest. By default that is a pull request into a branch other than the default. A partial round, a truncated review history, or a refusal on the head still blocks that reading. A refusal saying every changed file is in Copilot's default review exclusions is the exception. So is a policy that waits on no Copilot round, Copilot being off, ungated, or past its cap. There none of them blocks the reading, since no round is coming to settle them. Under the hub's default review policy, a pull request into the default branch, a promotion among them, always carries a Copilot round on its head. A repository's own `.github/agent-policy.json` can move or cap that round, and the digest reports what it decided. Re-run the loop after every fix push. Never infer review completion from `mergeStateStatus: CLEAN`. +[GOVERNANCE.md "PR Review Etiquette"](../GOVERNANCE.md#pr-review-etiquette) states when a review covers the current head and its full diff, and when to re-run the loop. A round reporting partial coverage of the diff blocks the merge, and so does a refusal. So does a head that no coverage statement, file table, or attested local pass covers. The `pr-review-conduct` Skill's Merge Gate states every case that blocks the merge, and the exceptions to the cases named here. Review effort is user-controlled. The automation observes `Lite`, `Balanced`, or `Max`, including an inherited `Default ()`, and never selects or changes the setting. Effort does not determine coverage or completion. A request can complete without a `copilot_work_started` event, so absence of that event is not a stalled-review verdict. When `wait` returns `PENDING` with `requested=yes`, report the state and rerun `wait` for another bounded interval by default. Read that field as acceptance of the request rather than as delivery of a round. Do not clear the request on that first timeout, because it may still be active. Where a second bounded wait times out as well, read the pending set. In that case, clear it only where no human or team reviewer is requested alongside the bot, and rerun `wait`. That rerun then has nothing outstanding to defer to and requests afresh. Where it finds no reviewer node id to request with, it polls instead and says so on its own auto-request line. The clear replaces that set rather than adding to it, and nothing restores a request it drops. So a stall on a pull request that has a human or team reviewer requested goes to the maintainer. So does one still pending after the wait that follows a clear. That clear is a recovery step the script does not implement, and `docs/pr-reviewer-reference.md`, in the hub checkout the script is run from, carries it. This recovery replaces only the review request and never changes the effort setting. A `wait` ending `REQUEST_NOT_RECORDED`, exit 40, is a different state and takes none of this recovery. The request returned success and left neither a pending reviewer nor a review-request event. That is how an exhausted Copilot allowance has shown itself. So clearing and requesting again does not clear this state, and it goes to the maintainer. diff --git a/AUDIT.md b/AUDIT.md index 67ae163..6450fb6 100644 --- a/AUDIT.md +++ b/AUDIT.md @@ -1,26 +1,26 @@ # AUDIT.md -How this repository audits itself against its committed baseline and reports drift. This is the repo-scoped adaptation of the fleet-wide AUDIT.md kept at the fleet hub. The hub's fleet-wide audit remains authoritative. General settings, rulesets, and secret names are hub-hosted ground truth in `repo-config/` and `spec/secrets.json`. They are checked from a hub checkout rather than carried here, per [GOVERNANCE.md "Hub-Hosted Tooling"][governance-hub-hosted-tooling]. The prose authorities are [`GOVERNANCE.md`][governance], [`CODESTYLE.md`][codestyle], and [`WORKFLOW.md`][workflow]. +How this repository audits itself against its committed baseline and reports drift. General settings, rulesets, and secret names are hub-hosted ground truth in `repo-config/` and `spec/secrets.json`. They are checked from a hub checkout rather than carried here, per [GOVERNANCE.md "Hub-Hosted Tooling"][governance-hub-hosted-tooling]. The prose authorities are [`GOVERNANCE.md`][governance], [`CODESTYLE.md`][codestyle], and [`WORKFLOW.md`][workflow]. The audit is read-only. It diffs live state against the committed baseline and reports findings, and it never applies changes. The verdict vocabulary is [`WORKFLOW.md`][workflow]'s: **operational / not operational**, **N/A**, **defect**, and the applicable/absent rule. ## Scope -This is a release-model repo: the self-audit covers the `main` and `develop` rulesets, general repository settings, and secret names. Code-project conformance (analyzers, tests, coverage, codegen, and NuGet publishing) is the job of CI and of the hub's fleet-wide audit, not of this self-audit. See [GOVERNANCE.md "Branching Model"][governance-branching-model] for the model this baseline encodes. +This is a `release`-model repository. The self-audit covers the `main` and `develop` rulesets, general repository settings, and secret names. Code-project conformance is the job of CI, not of this self-audit. See [GOVERNANCE.md "Branching Model"][governance-branching-model] for the model this baseline encodes. ## General Settings and Rulesets -Fetch the hub and check out `main`, or `develop` while this repository's registry entry has not yet reached `main`. Run `repo-config/configure.sh check ptr727/LanguageTags release` from that checkout. The command checks the shared settings and the state-dependent ones (`has_discussions` follows visibility, `default_branch` is `main`). It checks Dependabot security features, the fleet label set, and the link to the fleet project. It checks any deployment environment the registry declares, and both the `develop` and `main` rulesets against the hub payloads. It preserves and reports `bypass_actors` without asserting them, since who may bypass a ruleset is a human decision no payload declares. Both modes need project access on the token as well as admin on the repository. That is because the project link is read and written through GraphQL. +Fetch the hub and check out `main`. Check out `develop` instead while this repository's registry entry has not yet reached `main`. Run `repo-config/configure.sh check "ptr727/LanguageTags" "release"` from that checkout. The command checks what `repo-config/configure.sh apply` writes, and the deployment environments the registry declares. It reports each ruleset's `bypass_actors` without asserting them, since who may bypass a ruleset is a human decision no payload declares. The token needs project access as well as admin on the repository, since the command reads the fleet project link through GraphQL. The result must be exactly two rulesets named `develop` and `main`. A missing ruleset or a divergent payload is a **defect**, and a duplicate or stray ruleset is a **drift finding**. ## Secrets -From the same hub checkout, run `uv run --no-project --script spec/audit.py LanguageTags` and read its secret findings. It resolves the required set from the hub's `spec/secrets.json` plus this repo's registry entry (`publish[]`/`types[]`/`requiredSecrets[]`). It confirms each required name exists (name only, not values) in the stores its mechanism claims. For LanguageTags that is the baseline App pair, `NUGET_USERNAME` for the NuGet OIDC push, and `CODECOV_TOKEN`, all in both the Actions and Dependabot stores. A workflow run triggered by a Dependabot pull request reads the Dependabot store, so a `CODECOV_TOKEN` missing there silently skips the coverage upload. `repo-config/configure.sh check ptr727/LanguageTags release` asserts the same names per store. `repo-config/configure.sh apply ptr727/LanguageTags release` writes each one from the host's `~/.secrets/` directory. +From the same hub checkout, run `uv run --no-project --script spec/audit.py "LanguageTags"` and read its secret findings. It resolves the required set from the hub's `spec/secrets.json` plus this repository's registry entry. It confirms each required name exists in the stores its mechanism claims, by name only and never by value. `repo-config/configure.sh check "ptr727/LanguageTags" "release"` asserts the same names per store. `repo-config/configure.sh apply "ptr727/LanguageTags" "release"` writes each one from the host's `~/.secrets/` directory. ## Verdict and Follow-Up -A missing required item or a divergent payload is a **defect** (not operational). An equivalent outcome in a non-standard form is a **drift finding**. N/A items are excluded, never counted as failures. Surface findings as repository issues, and land fixes as a pull request to `develop` per [GOVERNANCE.md "Branching Model"][governance-branching-model]. To re-apply the whole baseline, run `repo-config/configure.sh apply ptr727/LanguageTags release` from a hub checkout. +A missing required item or a divergent payload is a **defect** (not operational). An equivalent outcome in a non-standard form is a **drift finding**. N/A items are excluded, never counted as failures. Surface findings as repository issues, each naming the hub commit its run read. diff --git a/README.md b/README.md index b3dffa1..85d1cdf 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ C# .NET library for ISO 639-2, ISO 639-3, RFC 5646 / BCP 47 language tags. ### Build Status [![Release Status][releasebuildstatus-shield]][actions-link]\ +[![Coverage][coverage-shield]][coverage-link]\ [![Last Commit][lastcommit-shield]][commits-link] ### Releases @@ -594,6 +595,7 @@ Licensed under the [MIT License][license]\ +[coverage-shield]: https://img.shields.io/codecov/c/github/ptr727/LanguageTags?logo=codecov&label=Coverage [lastcommit-shield]: https://img.shields.io/github/last-commit/ptr727/LanguageTags?logo=github&label=Last%20Commit [license-shield]: https://img.shields.io/github/license/ptr727/LanguageTags?label=License [nugetreleaseversion-shield]: https://img.shields.io/nuget/v/ptr727.LanguageTags?logo=nuget&label=NuGet%20Release @@ -646,6 +648,7 @@ Licensed under the [MIT License][license]\ [codecov-link]: https://about.codecov.io/ [coderabbit-link]: https://www.coderabbit.ai/ [contentlanguage-link]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-language +[coverage-link]: https://app.codecov.io/gh/ptr727/LanguageTags [csharpier-link]: https://csharpier.com/ [cspell-link]: https://cspell.org [dansmithlanguagetagssharp-link]: https://github.com/DanSmith/languagetags-sharp diff --git a/cspell.json b/cspell.json index bc32b53..c75b94a 100644 --- a/cspell.json +++ b/cspell.json @@ -1,53 +1,140 @@ { "version": "0.2", "language": "en-US", + "ignorePaths": [ + ".git/**", + "reports/*/**", + "**/*.min.*", + "LanguageData/**", + "**/*Data.cs", + "**/*DataGen.cs", + "**/bin/**", + "**/obj/**", + ".artifacts/**" + ], + "ignoreRegExpList": [ + "/```mermaid[\\s\\S]*?```/g" + ], "words": [ "ABNF", + "accessibilities", "acrolanguage", "Allman", "alphanum", "ANTLR", + "apikey", "arevela", + "astral", + "autoremove", "boont", + "buildcache", "buildmetadata", + "buildtransitive", + "Buildx", + "bumpable", "chamí", + "charliermarsh", + "chowned", + "chowns", "CLDR", "codegen", "commitish", + "conftest", + "CONIN", + "CONOUT", + "contentfiles", "cref", "crefs", "csdevkit", "datebadge", "davidanson", + "debuglevel", "derbend", + "desync", + "devcontainer", "diffable", + "distros", + "dnsmasq", + "dockerbuild", + "Dockerfiles", + "dockerhub", + "Docstrings", + "dogfoods", + "dorny", "dotnettools", + "downstreams", + "dpkg", + "dryrun", "Emberá", + "Emby", + "envsubst", + "esac", + "esphome", + "extensionless", "extlang", + "fanaticpythoner", + "fchmod", + "fchown", "finalizers", "followable", + "followlinks", + "fstat", + "Genericize", + "geteuid", + "getpid", "gpgsign", + "gpgv", + "HACS", + "hass", + "hatchling", + "heredocs", + "homeassistant", + "idempotent", "idempotently", + "isort", "istorical", "iving", + "Jellyfin", "Jernej", "jkporter", + "Keychain", + "keyring", + "keyrings", + "kicad", + "koalaman", "langcodes", "langtag", "languagedata", "languagetags", + "lastbuild", + "libsecret", "LINQ", + "logfile", "lojban", "macrolanguage", "Matroska", "mattcg", + "miscased", + "mktemp", + "mypy", + "nameof", "nbgv", "ncient", "ndividual", "nedis", + "nektos", "Nerdbank", + "noninteractive", + "noqa", + "NTFS", + "nuget", "nupkg", + "onCreateCommand", "onstructed", + "opencode", + "opencontainers", + "Optix", + "othercommand", "oxendict", "oxigraph", "oxilangtag", @@ -55,45 +142,86 @@ "pecial", "Pieter", "pipefail", + "postCreateCommand", + "prerelease", "privateuse", + "ProjectTemplate", + "purpleair", + "pydantic", "pyfisch", + "pygments", + "pypa", + "pypi", + "pyproject", + "pyright", + "pyrightconfig", + "pytest", "Qaaa", "Qabx", "Qodo", + "quoteoftheday", + "regen", "reimplementation", "reparsed", + "resharper", + "resync", + "resynced", + "retag", + "retagged", "rhysd", "rspeer", + "ruamel", + "Rubba", + "ruff", "rulebook", + "sdist", + "selftest", + "semver", "Serilog", + "settingsfile", "shellcheck", "shellchecks", + "shfmt", "signingkey", + "signum", "Simoncic", + "slnx", "snupkg", "softprops", + "somecommand", + "sshconfig", + "stdlib", "stefanzweifel", + "strerror", + "subsetting", "subtag", "Subtags", "templating", "terminologic", + "tomlkit", "Triaging", "triggerbuild", + "tzdata", "unbuilt", "uncoded", + "unconfigured", + "unheld", + "unlistable", + "unmodeled", "unprobeable", + "untriaged", + "unvalidated", + "urandom", + "usermod", + "USERPROFILE", + "uvx", + "venv", "Viljoen", "winget", + "worktree", + "Xsession", "xtinct", - "xunit" - ], - "ignorePaths": [ - "LanguageData/**", - "**/*Data.cs", - "**/*DataGen.cs", - "**/bin/**", - "**/obj/**", - ".artifacts/**", - ".git/**" + "xunit", + "yzhang" ] }