Skip to content

CODESTYLE.md links to GOVERNANCE.md "Running the Linters Locally", which stopped being a carried section #1075

Closed

Description

@ptr727

Evidence

CODESTYLE.md (carried intent, whole file) links to a GOVERNANCE.md anchor three times,
all via the same reference definition:

[governance-running-the-linters-locally]: ./GOVERNANCE.md#running-the-linters-locally-known-working-invocations
  • ## General > ### Clean-Compile Verification, first bullet ("Each linter's known-working
    invocation is in...")
  • Same subsection, third bullet ("What that gate must cover... is...")
  • ## Shell, closing sentence ("Run the clean-compile check itself per...")

Commit 86783b9 ("Route a Missing Lint Binary to Its Documented Docker Invocation", #1012,
2026-08-25) promoted Running the Linters Locally from a ### subsection of GOVERNANCE.md's
## Workflow YAML Conventions (a section spec/files.json declares verbatim) to its own
top-level ## heading. Neither spec/files.json nor spec/section-model.md was updated in
that commit (or since) to declare the new top-level section as carried:

$ git log --oneline -S"Running the Linters Locally" -- spec/files.json spec/section-model.md
(no output)
$ git show 86783b9 -- spec/files.json spec/section-model.md
(no output)

So the section silently stopped being part of anything downstream carries. It is not verbatim
(absent from files.json's GOVERNANCE.md sections list), and it is not documented as
hub-only either (spec/section-model.md's "Not carried (hub-only)" paragraph names only
Repository Onboarding and Conformance).

Reproduced live during PhotoCleaner's resync against hub b823bc4: re-vendoring
GOVERNANCE.md's declared-verbatim Workflow YAML Conventions section from the current hub
canonical correctly drops Running the Linters Locally from the downstream copy (it matches
Workflow YAML Conventions's current ## -to-## extent, which no longer includes it), which
leaves CODESTYLE.md's three links above resolving to an anchor the downstream GOVERNANCE.md
does not have.

Why this isn't caught automatically

CODESTYLE.md carries at intent fidelity, checked for presence and a staleness advisory only,
never for content (spec/fidelity-model.md). No mechanical check reads whether an anchor a
carried intent file names still resolves in the carrying repo's own tree, so this can drift
silently in every repo that completes a resync after #1012, with nothing short of a human
re-reading the carried text (as this session did) to surface it.

Expected

Either:

  1. Add Running the Linters Locally back to spec/files.json's GOVERNANCE.md sections list
    (it was verbatim before Route a Missing Lint Binary to Its Documented Docker Invocation #1012 by virtue of being nested inside a verbatim section, and
    nothing about Route a Missing Lint Binary to Its Documented Docker Invocation #1012's actual change, routing a missing-lint-binary agent to a Docker
    invocation, argues for un-carrying it), restoring the carry and making the existing
    CODESTYLE.md links resolve again everywhere; or
  2. Deliberately mark it hub-only in spec/section-model.md's "Not carried" paragraph, and fix
    CODESTYLE.md's three references to stop pointing at a repo-relative anchor no downstream
    repo carries (an absolute github.com/ptr727/ProjectTemplate URL, matching the convention
    AGENTS.md's skill-dependency paragraph and others already use for hub-local paths, or a
    pointer to wherever the destination this content now describes actually lives per-repo, e.g.
    each repo's own OPERATIONS.md "Local Verification").

Repo, ref, and run stamp

  • Hub: ptr727/ProjectTemplate at main@b823bc4 (as of this filing)
  • Surfaced during: ptr727/PhotoCleaner resync, audit run 2026-08-29T01:09:26Z | hub b823bc4
  • Worked around locally in that repo (not a hub fix) by repointing the three links at its own
    OPERATIONS.md#local-verification, since that section's content is what was migrated there
    during the same resync.

Activity

  1. ptr727 commented on Aug 29, 2026

    @ptr727
    OwnerAuthor

    Second occurrence of the same root cause, found by Copilot review on ptr727/PhotoCleaner#86:
    AGENTS.md's ## Where the Rules Live table (also declared verbatim in spec/files.json)
    carries the row

    | Running a lint or format check locally, or a lint tool missing from `command -v` | `Running the Linters Locally (Known-Working Invocations)` |
    

    which points at the same now-uncarried GOVERNANCE.md section as the CODESTYLE.md links
    above. Same fix applies: either restore the carry (option 1 in the issue body) or repoint this
    row too if going with option 2.

  2. ptr727 commented on Aug 29, 2026

    @ptr727
    OwnerAuthor

    Third occurrence: .github/skills/shell-codestyle/SKILL.md ("CI enforces both, per GOVERNANCE.md "Running the Linters Locally"") — found while triaging Copilot/Qodo review on ptr727/PhotoCleaner#87 (the wholesale skills-tree carry).

  3. ptr727 commented on Aug 29, 2026

    @ptr727
    OwnerAuthor

    Fourth occurrence, and a new downstream symptom: ptr727/ESPHome-Config#115 (a hub resync
    against 3258284). AGENTS.md's routing row and CODESTYLE.md's links (both already named
    above) plus .github/skills/shell-codestyle/SKILL.md's "CI enforces both, per..." all pointed at
    the uncarried anchor after re-vendoring Workflow YAML Conventions from the current hub
    canonical, same as the prior three. A CodeRabbit review on the PR caught it as a broken-anchor
    finding independently.

    Restored per option 1 (nested ### "Running the Linters Locally" back under ## Workflow YAML Conventions), matching what ptr727/HomeAutomation-Config's current GOVERNANCE.md already
    carries.

    New symptom this produces: spec/audit.py --branch <branch> ESPHome-Config now reports
    DRIFT verbatim: GOVERNANCE.md section 'Workflow YAML Conventions' differs from the canonical and matches no past hub revision - the repo modified fixed content, review it, because the section's
    declared ## -to-## extent in the hub's own GOVERNANCE.md genuinely excludes the nested
    content every downstream repo needs to carry for the anchor to resolve. Until files.json
    declares Running the Linters Locally again (option 1) or the anchors move (option 2), every
    repo that correctly restores the nesting reads as "modified fixed content" on every future audit
    run, a false positive with no way to silence it short of leaving the anchors broken instead.

  4. ptr727 commented on Aug 30, 2026

    @ptr727
    OwnerAuthor

    Confirmed again on a second repo, and there is a half of this that a downstream repo cannot work around at all.

    Reproduced during ptr727/Utilities' resync against hub a378121 (2.0.525), in ptr727/Utilities#451. Carrying GOVERNANCE.md from spec/files.json's declared section list produces the 20 sections and correctly omits Running the Linters Locally (Known-Working Invocations), so all three CODESTYLE.md references land at the top of a file that has no such anchor, exactly as this issue describes.

    The half this issue does not yet cover

    AGENTS.md "Where the Rules Live" carries the same dangling pointer, as a table row:

    | Running a lint or format check locally, or a lint tool missing from `command -v` | `Running the Linters Locally (Known-Working Invocations)` |
    

    The row sits under that section's own preamble, "Every rule below is a level-two section of GOVERNANCE.md", so it asserts the section exists. The neighbouring Repository Onboarding and Conformance row is annotated "(hub only, not carried)"; this one is not.

    That row is worse than the CODESTYLE.md references, because AGENTS.md is verbatim. CODESTYLE.md is intent, so a downstream repo can repoint its references at somewhere real, which is what Utilities did (they now point at its own OPERATIONS.md "Local Verification"). A verbatim section cannot be edited downstream without failing the byte-match check, so every conformant repo must carry a row pointing at a section it does not have, and the agent that follows it is the one who just hit a missing lint binary, which is the case the row exists for.

    Suggested shape

    Whichever way #1075 is settled, the two need settling together, since they have one cause:

    • If the section becomes carried, add it to spec/files.json's GOVERNANCE.md sections and to spec/section-model.md's table, and both pointers resolve with no text change.
    • If it stays hub-only, name it in spec/section-model.md's "Not carried (hub-only)" paragraph beside Repository Onboarding and Conformance, annotate the AGENTS.md row the way that one is annotated, and drop or repoint the three CODESTYLE.md references.
  5. added a commit that references this issue on Sep 1, 2026
    c58e805
  6. added a commit that references this issue on Sep 2, 2026
    a9afa1d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions