Skip to content

Resync Fleet Governance and Reusable Workflows - #100

Merged
ptr727 merged 5 commits into
developfrom
chore/resync-hub-20260818
Aug 19, 2026
Merged

ptr727 merged 5 commits into
developfrom
chore/resync-hub-20260818

Conversation

@ptr727

@ptr727 ptr727 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Re-vendor the current fleet instruction sections and generated GitHub skills.
  • Adopt the released reusable validation, release, and merge-bot workflows.
  • Preserve ESPHome-specific validation through a local composite-action hook.

Verification

  • actionlint with bundled shellcheck
  • markdownlint-cli2
  • CSpell across the repository's widened documentation set
  • EditorConfig checker
  • hub prose, EOL coverage, SHA-pin, host, and live repository-configuration gates
  • 21 declared verbatim instruction sections compared byte-for-byte with hub 537b183

Copilot AI lite review requested due to automatic review settings August 18, 2026 22:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request resyncs this ESPHome operational repository with the current ptr727 fleet governance and GitHub Actions standards, switching CI entry points to hub-hosted reusable workflows while keeping ESPHome-specific validation via a local composite-action hook.

Changes:

  • Re-vendor governance/contract documents and add a large set of generated GitHub Copilot Skills.
  • Adopt hub reusable workflows for PR validation, release planning/publishing, and merge-bot behavior.
  • Add/update local validation hooks and repo lint tooling configuration (CSpell words, EditorConfig checker exclusions, .gitattributes EOL pins).

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
WORKFLOW.md Updates workflow contract text to match the current fleet CI/CD model and terminology.
GOVERNANCE.md Resyncs write-safety, tooling, and review-loop governance language.
cspell.json Updates repository spelling allowlist terms to match new naming.
AGENTS.md Updates agent workflow pointers and rule map entries.
.github/workflows/test-pull-request.yml Switches PR validation to hub validate-task.yml, keeps repo-specific compile gating and aggregator required check.
.github/workflows/publish-release.yml Switches release publishing to hub publish-plan-task.yml + build-release-task.yml.
.github/workflows/merge-bot-pull-request.yml Converts merge-bot workflow to a thin caller of hub merge-bot-task.yml.
.github/skills/workflow-ci-contract/SKILL.md Adds/updates workflow CI contract skill content.
.github/skills/workflow-ci-contract/references/test-methodology.md Adds/updates workflow test methodology reference.
.github/skills/workflow-ci-contract/references/d-guarantees.md Adds/updates condensed D-guarantees reference.
.github/skills/upstream-contribution-workflow/SKILL.md Adds/updates upstream contribution workflow skill.
.github/skills/standup-a-repo/SKILL.md Adds/updates repo standup procedure skill.
.github/skills/skill-lifecycle/SKILL.md Adds/updates skill lifecycle governance skill.
.github/skills/shell-codestyle/SKILL.md Adds/updates shell scripting codestyle skill.
.github/skills/resync-a-repo/SKILL.md Adds/updates repo resync procedure skill.
.github/skills/repo-worktree/SKILL.md Adds/updates worktree/isolation mechanics skill.
.github/skills/python-codestyle/SKILL.md Adds/updates Python codestyle skill.
.github/skills/python-codestyle/references/testing.md Adds/updates Python testing conventions reference.
.github/skills/python-codestyle/references/profiles.md Adds/updates Python profile definitions reference.
.github/skills/python-codestyle/references/code-style.md Adds/updates Python code style reference.
.github/skills/pr-review-conduct/SKILL.md Adds/updates PR review loop contract skill.
.github/skills/operational-vs-release-workflow/SKILL.md Adds/updates workflow model (operational vs release) skill.
.github/skills/operational-vs-release-workflow/references/release-publish-mechanics.md Adds/updates detailed release/publish mechanics reference.
.github/skills/operational-vs-release-workflow/references/branch-protection-and-promotion.md Adds/updates branch protection/promotion mechanics reference.
.github/skills/git-commit-conventions/SKILL.md Adds/updates git staging/commit/signing rules skill.
.github/skills/git-commit-conventions/references/history-rewrite.md Adds/updates history rewrite rules reference.
.github/skills/fleet-conformance-check/SKILL.md Adds/updates in-repo conformance self-check skill.
.github/skills/dotnet-codestyle/SKILL.md Adds/updates .NET codestyle skill (fleet-wide, even if repo-local usage is limited).
.github/skills/dotnet-codestyle/references/testing.md Adds/updates .NET testing conventions reference.
.github/skills/dotnet-codestyle/references/project-config.md Adds/updates .NET project configuration reference.
.github/skills/dotnet-codestyle/references/conventions.md Adds/updates .NET conventions reference.
.github/skills/copilot-instructions-keeper/SKILL.md Adds/updates Copilot instructions drift/ledger preservation skill.
.github/skills/comment-and-doc-style/SKILL.md Adds/updates documentation/prose style skill.
.github/skills/comment-and-doc-style/references/markdown-links.md Adds/updates Markdown link style reference.
.github/skills/comment-and-doc-style/references/line-endings.md Adds/updates line ending policy reference.
.github/skills/comment-and-doc-style/references/carried-doc-references.md Adds/updates carried-doc reference rules reference.
.github/skills/code-review/SKILL.md Adds/updates code review skill and required review marker contract.
.github/skills/carried-instruction-file-guard/SKILL.md Adds/updates guard skill to prevent destructive overwrites of carried instruction files.
.github/skills/audit-a-repo/SKILL.md Adds/updates audit procedure skill.
.github/skills/agent-conduct/SKILL.md Adds/updates agent conduct/verification discipline skill.
.github/skills/add-host-tool/SKILL.md Adds/updates managed host tool lifecycle skill.
.github/actions/validate/action.yml Adds repo-specific validation hook action for the hub validation workflow to invoke.
.gitattributes Adds explicit LF pins for execution-sensitive files under * -text.
.editorconfig-checker.json Excludes common generated caches/venvs from editorconfig-checker scans.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread WORKFLOW.md Resolved
Comment thread .github/actions/validate/action.yml Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 47 out of 47 changed files in this pull request and generated no new comments.

Suppressed comments (3)

.github/workflows/publish-release.yml:36

  • The plan reusable-workflow job inherits the workflow-level permissions: {} and currently does not declare its own permissions. If publish-plan-task.yml needs to check out the repo or read via the API, it will fail with an under-scoped GITHUB_TOKEN. Grant the minimal read scope at the call site so the plan job can run reliably.
    .github/actions/validate/action.yml:27
  • The Python subtree is a lint-only uvx/ruff setup (no lockfile), and the repo’s own python-codestyle guidance says CI should use uvx ruff@latest because uvx <tool>@<ver> pins are not tracked by Dependabot and silently go stale. This action currently pins ruff to 0.15.22, which contradicts that contract and can drift over time.
        set -Eeuo pipefail
        uvx ruff@0.15.22 check .
        uvx ruff@0.15.22 format --check .

.gitattributes:9

  • The comment claims an extensionless executable “matches no extension rule”, but .editorconfig has a global [*] end_of_line = lf which does match extensionless files. Consider rewording this comment to clarify the real point (git-level LF enforcement on checkout/renormalize) without implying EditorConfig cannot match extensionless names.
# Exception: scripts must stay LF regardless of the `* -text` default, because a CRLF shebang breaks execution.
# `.editorconfig` covers `*.sh`, but an extensionless executable matches no extension rule.
# Pin those here, so git enforces LF on checkout and on `--renormalize`.

@ptr727

ptr727 commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Second-round suppressed-finding triage (3 total):\n\n- publish-release.yml plan permissions: Disproven. The pinned hub plan workflow is a pure shell decision job; it neither checks out content nor calls the GitHub API or token. An empty permission set is therefore deliberate least privilege.\n- validate/action.yml Ruff 0.15.22 pin: Disproven. CODESTYLE.md explicitly records this repo-specific pin as a deliberate fleet divergence, and OPERATIONS.md plus the VS Code task use the same version.\n- .gitattributes explanation: Fixed in 9b0c865. The comment now correctly distinguishes EditorConfig content validation from Git checkout and renormalization behavior.\n\nThe same commit also advances both validation callers to ProjectTemplate 2.0.376 (537b1837fe90e2288f71034ef96cc4e949937712), which contains the self-contained prose-gate fix tracked by ptr727/ProjectTemplate#824.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 47 out of 47 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/publish-release.yml Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 47 out of 47 changed files in this pull request and generated no new comments.

Suppressed comments (2)

.github/workflows/publish-release.yml:36

  • The workflow sets top-level permissions: {}, but the plan job doesn’t grant any permissions to the called publish-plan-task.yml. If that reusable workflow needs to read repository contents (e.g., checkout/read version.json or config), it will run with an effectively permissionless GITHUB_TOKEN and can fail at runtime. This also contradicts WORKFLOW.md D7.2 (“every reusable job declares valid permissions”).

Grant the minimal read permission explicitly on the plan job (and expand only if the reusable workflow proves it needs more).
GOVERNANCE.md:214

  • This bullet links to ./docs/reusable-workflows.md, but this repository doesn’t have a docs/ directory, so the link is broken. Either add the referenced doc or remove/adjust the reference so the guidance remains navigable in this repo.

@ptr727

ptr727 commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Final-round suppressed-finding triage (2 total):\n\n- publish-release.yml plan permissions: Disproven. The pinned publish-plan-task.yml is a pure shell decision workflow. It does not check out repository content, read version.json, call the GitHub API, or consume GITHUB_TOKEN. The caller's empty permission set is therefore valid least privilege; adding contents: read would grant an unused capability.\n- GOVERNANCE.md broken docs/reusable-workflows.md link: Confirmed hub defect. The affected Governance section is byte-locked carried content, so changing it only in this downstream repo would violate the fleet contract. Filed ptr727/ProjectTemplate#829 with acceptance criteria for a downstream-safe canonical link and carry-time coverage.

@ptr727
ptr727 merged commit a21dfd7 into develop Aug 19, 2026
31 checks passed
ptr727 added a commit that referenced this pull request Sep 14, 2026
* Re-vendor the AGENTS.md and GOVERNANCE.md verbatim sections

Carried from hub 4dedf84 via scripts/carry.py apply-sections.
Ten sections were stale against the current canonical and one was modified.

The modified one is GOVERNANCE.md "Workflow YAML Conventions", which held
"Running the Linters Locally (Known-Working Invocations)" nested as a "###"
subsection.
The hub has since declared that section hub-only in spec/section-model.md,
so the re-vendor drops the nested copy rather than re-nesting it, and the
AGENTS.md routing row now names it "(hub only, not carried)".
That settles the disposition ptr727/ProjectTemplate#1572 asks for as
re-vendor, and it is the same content ptr727/ProjectTemplate#1075 tracked.

The repo-specific preamble, "Devcontainer", and "Repository Layout" are
outside the carried set and are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Carry the skills tree and the markdownlint config from the hub

Carried from hub 4dedf84 via scripts/carry.py apply.
Twenty-two skill files were stale and three were absent, and the tree
digest now matches the hub's.
The repository has never hand-edited this tree, so nothing local was at
risk in the prune-authorized carry.

The markdownlint config gains the fleet's "globs" and "ignores" entries.
The "globs" entry is the one that matters here, because the "ignores"
entry only subtracts, so a run with no positive glob lints nothing and
still exits clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Converge the intent-fidelity carried files with the hub

Carried from hub 4dedf84 by hand, since nothing mechanical judges intent.

WORKFLOW.md is replaced with the current canonical.
Every one of the 108 lines it held that the canonical does not appears in
some past hub revision of the same file, so it carried nothing local.

CODESTYLE.md takes the reshaped pre-commit-gate bullet, the nested
markdownlint exclusion seam, and the D1.6 additions to the .NET and Python
scope sentences.
This repository's own widened spelling gate and its C++ section are kept.

AUDIT.md records that configure.sh check now asserts the fleet label set
and the registry's declared deployment environments, of which this
repository declares none.

.github/copilot-instructions.md takes the rule that a defect in a
generated skill mirror is fixed at its source and draws no review comment.
Its Disproved Claims ledger stays entry-free, which is what that section
tells a carrier to hold.

CODESTYLE.md and OPERATIONS.md stop linking "Running the Linters Locally"
as a local anchor, since the section is hub-only and the anchor no longer
resolves here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Name the README build shields section and sort the shield definitions

spec/readme-structure.md names the sub-section under Build and
Distribution "Build Status", and this README called it "Publish Status".
The two shields it holds, workflow status and last commit, are already
the base class the spec asks for, so only the heading changes.

The Shields definition group now sorts by bare reference name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Correct the spelling-gate note, which describes a CI step that is gone

CODESTYLE.md said the widened list of **/README.md, DEVICES.md and
HISTORY.md was "carried identically by the CI workflow and the
Lint: Spelling VS Code task so the two cannot drift".
Neither half of that holds.

CI validation runs through the hub's reusable validate-task.yml, which
spell-checks README.md and HISTORY.md and exposes no input to widen that,
so CI has covered two files since #100 replaced this repository's own
cspell step on 2026-08-18.
The VS Code task still carries the wider list, so the two lists differ and
only the narrower one is enforced.

The note now says what each surface actually checks and which of them
gates a push.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Bump the hub workflow pins from 2.0.587 to 2.0.625

All five reusable-workflow references now sit on one hub release, which
is 4dedf84, the commit this resync was measured against.

The pin decides which gate actually runs, because validate-task.yml
reaches its own composite actions as "$/.github/actions/prose-gate",
resolving to the ref the caller pinned rather than to the hub's main.
So the three prose-gate scope defects fixed in ptr727/ProjectTemplate#1590
reach this repository's CI only once the pin moves, and at 2.0.587 the
gate could still scope to nothing and report a clean run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Say the spelling gate covers two files only, which is the fleet rule

The previous commit corrected which files each surface checks and left
two claims about the rule itself standing, both wrong.

The carried sentence read "by fleet default", implying a floor a
repository may raise. The hub's CODESTYLE.md has read "only" since
ptr727/ProjectTemplate#678 on 2026-08-13 and has never granted an option
to widen, so this repository's earlier note claiming it exercised one was
describing a permission that does not exist.

The local note framed the two file lists as a deliberate split. The
enforced gate is the fleet rule, and the wider Lint: Spelling task is a
local convenience that gates nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Sweep the stale spell-check claim and add Local Verification

A review pass found the corrected spelling-gate claim restated in two
more places, which is the class rather than the instance the earlier
commits fixed.
OPERATIONS.md said the gate is "wider than the fleet default, so a nested
README fails CI like any other", and the Lint: Spelling task comment said
its file list "matches the CI spell-check step exactly".
Both now say CI enforces two files and the task reads wider than that
while gating nothing.

OPERATIONS.md gains a "Local Verification" section.
GOVERNANCE.md "Verification Discipline", re-vendored by this branch,
tells every agent to read the checks a change owes from that heading, and
this repository had no such heading, so the rule arrived pointing at
nothing.
It states what the container gate covers, and that CI compiles one example
device per template and touches no hardware, so a board, pin, or
peripheral claim is unverified until it has run on the board.

spec/section-model.md asks OPERATIONS.md for six headings and this adds
the one with a live pointer into it.
The other five, and the regrouping of 21 existing sections under all six,
are left alone deliberately: that renames every anchor in a 579-line file
and every inbound link to it, which is its own change rather than part of
a resync.

GOVERNANCE.md "Repository Layout", which is this repository's own section,
now lists CLAUDE.md, the carried .github/skills/ tree, and the carried
lint configuration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Correct Local Verification, which overclaimed what CI covers

The section added in the previous commit carried four wrong statements,
which is worse than the stale text it replaced, since GOVERNANCE.md routes
every agent to this heading for the checks a change owes.

It said the doc gates run against the diff. Only the prose gate does, and
only on a pull request. markdownlint globs **/*.md, cspell sets
incremental_files_only false, and editorconfig-checker and actionlint read
the whole checkout, so a diff-scoped local pass proves nothing about four
of the five.

It routed to Repository Tooling Hazards for the container invocations.
That section holds the snapshot recipe and the no-live-mount rule, and the
only concrete invocations are the Lint: tasks in .vscode/tasks.json, which
the section now names. The mount rule is restated as being about the tree
you mount, since those tasks mount the working folder and that is a hazard
in the live /config checkout rather than in a worktree.

It said CI compiles one example device per published template. The compile
job is gated behind the changes job and a skip passes by design, so a
docs-only change goes green having built nothing.

It bundled config and compile as one always-run gate, contradicting
Config and Compile Validation, which reserves a compile for a change that
can reach generated code.

The five sections it names are now links, with their definitions added,
per this file's own reference-style rule.

Repository Layout separates the byte-identical lint configuration from
cspell.json, which is intent fidelity and locally extended, so adding a
word is maintenance rather than drift. It also adds .clang-format,
.github/copilot-instructions.md and .vscode/.

The Lint: Spelling comment no longer calls matching the two lists
impossible, since narrowing this one would do it. Widening CI is what
cannot be done.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Withdraw the Local Verification section from this resync

Two review rounds each put new false statements into it, about which doc
gates are diff-scoped, about which local task runs whole-tree, and about
when the compile job is gated out. The fleet rule caps a push at two
rounds of fixes for that reason, so the section comes out rather than
taking a third.

The GOVERNANCE.md bullet describing .vscode/ comes out with it. It called
the directory the workspace settings, which live in the code-workspace
file instead, and called it the only place the local lint invocations are
written down, which the snapshot recipe in OPERATIONS.md contradicts.

What stays is what the passes verified: the spell-check claim corrected in
OPERATIONS.md and .vscode/tasks.json, and the rest of Repository Layout.

This leaves GOVERNANCE.md "Verification Discipline" routing to an
OPERATIONS.md "Local Verification" section this repository does not have,
which is the state it was already in before this branch. Closing it means
giving OPERATIONS.md all six headings spec/section-model.md asks for, and
that regroups 21 sections and renames every anchor in the file, so it is
its own change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Use the US English "afterward" in the spelling-gate note

Raised by CodeRabbit on #145.

The sweep for the same shape found "afterwards" in AGENTS.md and
WORKFLOW.md and "cancelled" in GOVERNANCE.md and WORKFLOW.md, all of it
carried hub canonical rather than this repository's prose, so editing it
here would manufacture the drift the carry just removed. The Actions
result literal is spelled "cancelled" by the API in any case.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Caption the build shield to match the heading it sits under

Raised as a suppressed finding by CodeRabbit on #145.

Renaming the sub-section to "Build Status" left the badge reading
"Publish Status" under it. The alt text and reference now say
"Release Build", matching the hub's own README, which captions the same
shield "Releases Build" over a "Build Status" heading.

The target is unchanged and stays publish-release.yml, which is what the
hub's shield points at too. spec/readme-structure.md matches a shield by
its shields.io endpoint rather than by its caption, so the endpoint was
never the defect here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

* Rewrap the AUDIT.md settings paragraph the edit had unbalanced

Raised as a suppressed finding by CodeRabbit on #145.

Inserting the label-set and deployment-environment clauses left the rest
of the paragraph on its original line breaks, so one line ran to 118
characters and ended mid-sentence on "The result".

The whole paragraph is rewrapped at 95 characters, with no inline code
span crossing a line break.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFeUPt12pczW76UTwm3u8X

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ptr727
ptr727 deleted the chore/resync-hub-20260818 branch September 20, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants