State the cross-repo rule by intent, not mechanism - #362
Merged
Conversation
Downstream review over-applied the rule: Copilot required removing a
README link to a genuinely related project, reading "adds no link to
another fleet repo" as absolute. Two defects made that reading
reasonable.
The rule led with the mechanism and buried the carve-out ("unless that
repo is the subject") at the end, so the banned thing looked like
cross-repo links in general rather than coordination references.
It also listed README.md among files "carried verbatim". It is not:
spec/files.json gives README.md neither whole nor sections, so it is a
per-repo file governed only by readme-structure. A repo's own README is
its own content, and the rule never should have reached it.
Restated by intent. Banned: any reference to the template repo, and a
sibling fleet repo named as an illustrative example of a rule or
adoption. Explicitly allowed: a contextually relevant link to a related
project - the image that consumes this config, the builder that
generates this hardware, a library this depends on - with the test being
whether the link serves a reader of this repo's content rather than
whether the target happens to be in the fleet.
The mechanical check is unaffected: it greps only for the template name,
never for sibling links.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Clarifies the “no cross-repo references” governance rule by stating the intent (avoid coordination/template references in carried files) rather than an overly broad mechanism-based ban, and corrects the scope so it does not overreach into per-repo README.md content.
Changes:
- Restates the carried-file cross-repo guidance in
AGENTS.mdto explicitly ban coordination references (template repo + sibling “example” repos) while permitting contextually relevant links. - Updates
spec/project-types.json(recurring.norepoxref) to match the clarified rule and scope.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
AGENTS.md |
Rewords the documentation-style rule to emphasize intent and explicitly allow relevant cross-project links when they serve the repo’s subject matter. |
spec/project-types.json |
Updates the corresponding audit/assertion text (recurring.norepoxref) to align with the clarified rule and corrected README scope. |
I stripped apostrophes while assembling the JSON string, which left "carrying repo readers" and "A repo own README.md" ungrammatical in what is a normative rule statement. Apostrophes need no escaping in JSON. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
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.
Comments suppressed due to low confidence (1)
spec/project-types.json:147
- Minor grammar in the assertion text: "in prose or link" reads like it's missing an article. For a normative rule statement, "in prose or a link" is clearer and matches the phrasing used in AGENTS.md.
{ "id": "recurring.norepoxref", "verdict": "intent", "assert": "A carried file (AGENTS.md, CODESTYLE.md, WORKFLOW.md, .github/copilot-instructions.md, repo-config/README.md, repo-config/develop.json, repo-config/main.json, spec/secrets.json, the carried AUDIT.md) carries no coordination reference: no reference to the template repo in prose or link (private, so it 404s for the carrying repo's readers, and the coordination flow is machinery a consumer should not see - state the behavior, not the destination), and no sibling fleet repo named as an illustrative example of a rule or adoption. A contextually relevant link to a related project is NOT a coordination reference and is expected (the image that consumes this config, a library this depends on) - the test is whether the link serves a reader of this repo's content. The rule governs carried template content. A repo's own README.md and topical docs are its own content. spec/audit.py mechanically checks the two agent-instruction files for the template name.", "intentRef": "AGENTS.md#documentation-style-conventions" }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported from a downstream session: Copilot insisted on removing a
README.mdlink pointing to a related device-builder repo, citing the no-cross-repo-link rule. That link was legitimate content. The rule I wrote in #344/#359 made that misreading reasonable, so this fixes the rule rather than the reviewer.Two defects in the rule as written
1. It led with the mechanism and buried the carve-out. The sentence opened with "adds no link (inline URL or reference definition) to another fleet repo" and only qualified it fifteen lines later with "unless that repo is the subject". Read top-down, the ban looks absolute.
2. It claimed
README.mdis carried verbatim. It is not.spec/files.jsongivesREADME.mdneitherwhole: truenorsections, so it is a per-repo file governed only byreadme-structure.md. A repo's own README is its own content. The rule never should have reached it, which is exactly where the over-application landed.Restated by intent
Two things banned in carried files:
And explicitly permitted:
Plus the scope correction: the rule governs carried template content, and a repo's own
README.mdand topical docs are outside it.spec/project-types.json'srecurring.norepoxrefis reworded to match.The mechanical check needed no change
spec/audit.pygreps only for the template name in the two agent-instruction files. It never looked for sibling links, so it was not the source of the over-application and its behavior is unchanged - re-verified against PlexCleaner (flags) and Vantage-Config (clean).spec/validate.py, markdownlint, editorconfig-checker: clean.Downstream note: ESPHome-NonRoot is amending its local AGENTS.md for the same reason. Once this lands, its next carry converges on this wording.
🤖 Generated with Claude Code