Drop the private-repo premise, and stop auditing the hub against itself - #505
Conversation
The template-reference check justified itself with "the template is private, so a reference 404s for this repo's readers". This repository has been public since 2026-07-26, so that reason is false. The rule survives on its second justification, that the coordination flow is machinery a consumer should not see, so the wording keeps that and drops the dead half. Corrected in both places that stated it, the audit finding and the recurring.norepoxref check. The check also fired on the hub itself, reporting its own AGENTS.md as drift for naming the repository it lives in. That is a false positive: the hub's carried files are the source, and naming itself is correct there. The section check at the same layer already excludes the hub, so this reuses that guard. Verified against the live audit rather than the offline self-test, since the check reads the repo over the API. Before: two findings on ProjectTemplate, one of them this false DRIFT. After: only the real has_discussions defect. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the hub’s live-audit “carried files must not reference the template repo” rule to (1) remove the now-false “template is private” premise and (2) avoid falsely flagging the hub repository when it audits itself.
Changes:
- Updates the
recurring.norepoxrefintent assertion to remove the “private repo / 404” justification. - Adjusts
spec/audit.pyto skip the template-reference check when auditing the hub itself, preventing a self-audit false positive. - Refines the drift message/commentary to focus on “coordination machinery” as the reason.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| spec/project-types.json | Updates the documented intent for the “no coordination references in carried files” rule. |
| spec/audit.py | Changes the carried-file template-reference check to skip the hub itself while continuing to flag downstream repos. |
Uh oh!
There was an error while loading. Please reload this page.
The assertion said `spec/audit.py` checks "the two agent-instruction files", while the check reads three: AGENTS.md, GOVERNANCE.md and .github/copilot-instructions.md. GOVERNANCE.md is rule text rather than an agent-instruction file, which is likely how the count drifted. The doc now names all three rather than counting them, so adding a path cannot silently re-open the gap, and records the hub exemption this PR added. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
spec/audit.py:626
- The comment says this check targets the "agent-instruction files", but the path list includes GOVERNANCE.md, which is primarily rule text. Consider rewording to something like "carried guidance docs" (or explicitly listing the files) to avoid misleading future maintainers about what’s being scanned.
# The coordination flow is machinery a consumer should not see, so a carried file states the behavior rather than the destination.
# This checks the agent-instruction files, where a stale "report drift upstream" paragraph once spread.
# Skip the hub itself, whose own carried files are the source, where naming the repo they live in is correct.
The previous commit named the three paths in the spec assertion but left the code comment calling them "the agent-instruction files", which GOVERNANCE.md is not: it is rule text. That is the same mismatch, half-fixed. Found as a suppressed finding in the Copilot round, verified against the path tuple before accepting it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ptr727
commented
Aug 1, 2026
Closing the loop on the suppressed finding from the second round, since a suppressed finding gets verified rather than skipped. Real, and fixed in forpathin ("AGENTS.md", "GOVERNANCE.md", ".github/copilot-instructions.md"):This is the same mismatch the previous round raised against Worth noting the two rounds found the identical defect in two places. Naming the files rather than characterizing them is what stops it recurring. |
Uh oh!
There was an error while loading. Please reload this page.
… the carried-file corrections to main (#517) Promotes twelve commits to `main`. Three of them change **carried** files, so downstream repos read the stale text until this lands, which is what makes the promotion the delivery step rather than bookkeeping. ## What this delivers to the fleet **Carried-file corrections**, picked up by every repo on its next re-vendor: | PR | File | Correction | | --- | --- | --- | | #514 | `.github/copilot-instructions.md` | Described the pre-split `AGENTS.md`, wrong in both halves. `GOVERNANCE.md` holds the rule sections and the two `intent` ones; `AGENTS.md` carries two verbatim sections and none repo-specific | | #514 | `CODESTYLE.md` | Said MD033 flags HTML elements while the config allows `details` and `summary`; also gains the `HISTORY.md` mirror rule, moved from a hub-only spec file so a repo can read the rule it is graded against | | #514 | `WORKFLOW.md` | D2.2 "skipped on smoke" read as the job rather than the validation, and a review acting on it proposed a change that would have coupled the release to smoke | | #503 | `.editorconfig`, `.gitattributes` | 36 comment findings in the files a new repo copies first | | #501 (earlier) | `repo-config/configure.sh` | Already on `main` | **Spec and requirement changes**: - **#507** makes `OPERATIONS.md` `appliesTo: "*"`, keyed to the need rather than to `workflowModel`. Measured: 3 of 21 repos carry it, so **17 will report a new `LETTER file:` finding**. Intended, and a headed stub satisfies it. - **#512** declares `.github/workflows/merge-bot-pull-request.yml` at `interface` fidelity, closing a graded contract (`WORKFLOW.md` D8.1) that no spec required. 15 of 21 already carry it, so this ratifies a de facto standard; the other **6 report a new `DRIFT`**, and those six have Dependabot pull requests piling up with nothing to merge them. - **#505** stops the audit flagging the hub against itself and drops a premise that was false since this repo went public. - **#511** fixes the README shape across repository visibility. - **#515** puts audit-report authorship with the hub and names the base branch, after a downstream conformance PR targeted `main` and I merged it without checking. - **#513** forward-ports that PR's content, restoring the forward-only invariant. **Backlog and reports**: #504, #506, #510, #516 record the README shape rework, the branch-bootstrap step, the declared-description design, and why the audit is on demand. ## Fleet consequence, stated before it lands Two owed follow-ups this promotion creates or carries: 1. **Re-vendor `repo-config/configure.sh`**, already owed from #501, since it is `verbatim` with `appliesTo: "*"` and every repo holding a copy is byte-mismatched. 2. **The next fleet audit reads noisier**, by 17 `OPERATIONS.md` letters and 6 merge-bot drifts. Both are new requirements rather than repo regressions. ## Verification Run on `develop` at `e4c76bc`: ``` python3 scripts/test_prose_lint.py 144 tests, OK python3 scripts/test_repo_gate.py 23 tests, OK python3 scripts/test_pr_review.py 27 tests, OK python3 spec/audit.py --selftest SELFTEST PASS python3 scripts/repo_gate.py eol 0, sha-pin 0 python3 spec/validate.py OK, 21 cataloged prose_lint --check charset --check dupword --check spelling clean editorconfig-checker (docker, canonical) clean ``` Every one of the twelve was merged green with a Copilot review covering its head SHA. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Found by running the live audit against the hub itself while checking that the tooling handles the shape
Blogis about to become. Two defects in one check, both inspec/audit.py's carried-file template-reference rule.1. The stated reason is false
The check justified itself this way, in the code comment, the finding text, and the
recurring.norepoxrefassertion inspec/project-types.json:This repository has been public since 2026-07-26, confirmed live:
So a reference does not 404, and that half of the justification is dead.
The rule itself survives, on the second reason
project-types.jsonalready gave: the coordination flow is machinery a consumer should not see, so a carried file states the behavior rather than the destination. The wording now rests on that alone, corrected in all three places that carried the dead premise.This matters beyond tidiness. A rule whose stated reason is checkably false is a rule the next agent argues with, and a downstream repo carrying the assertion inherits the false claim.
2. It fired on the hub itself
Auditing
ProjectTemplatereported its ownAGENTS.mdas drift for naming the repository it lives in:That is a false positive. The hub's carried files are the source, and naming itself there is correct and unavoidable. A downstream repo naming it is still flagged, which is the actual point of the rule.
The fix reuses the guard the section check at the same layer already uses (
entry.get("name") != HUB_NAME), whose comment states the same rationale: "Skip the hub itself: its copies are the source." The idiom existed; this check had simply omitted it.Verification
The check reads the repo over the API, so it is not reachable from the offline
--selftest. The evidence is the live audit before and after, not a unit test.Before:
After:
The false DRIFT is gone and the real defect is untouched.
spec/audit.pycarries a large pre-existing comment backlog. This PR does not sweep it, but the rewritten block leaves the file slightly better rather than worse: 105 -> 103.A separate finding this surfaced, for the maintainer
has_discussionsisfalseon this repository whilerepo-config/settings.jsonandconfigure.shexpecttruefor a public repo. It is a real settings drift, not a tooling bug, andrepo-config/configure.sh applywould set it. Enabling Discussions is a visible change to the repository, so it is left for the maintainer rather than applied here.🤖 Generated with Claude Code