Skip to content

Mirror the representative-data rule into the host-wide rules - #532

Merged
ptr727 merged 3 commits into
developfrom
host-representative-data
Aug 3, 2026
Merged

ptr727 merged 3 commits into
developfrom
host-representative-data

Conversation

@ptr727

@ptr727 ptr727 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Follow-on to #531, which stated the representative-data rule in GOVERNANCE.md. That file reaches a fleet repo and nothing else, so a session working outside any project writes comments, commits, and docs under the same identity with the rule nowhere in context. Closing that gap for the write rules is what this kit already exists to do.

What lands

  • claude-md-safety.md gains a Data in Agent-Authored Text section, the short form of the carried rule. It keeps the three points that carry the reasoning rather than the prohibition alone: synthetic evidence is the stronger evidence and not a concession, the exposure is one-way so text that has already landed is reported rather than quietly rewritten, and no pattern closes it, since the leak that motivated the rule was name-shaped. It is a restriction, which is the only kind of rule this block is permitted to carry.
  • The kit README described the installed block as one section of write rules. That stopped being true when the authorization-scope section landed, so it now names each of the three sections, what each mirrors, and which of them a hook backs, since two are prose only and no hook can see what a line of text means.

Deployment

The installed copy on each machine is a snapshot, so the block only changes on a host after install.sh is re-run there. This host is refreshed once this merges. #365 tracks the per-machine rollout.

Verification

prose_lint.py (diff-scoped and whole-file on both changed files), markdownlint-cli2, editorconfig-checker, and spec/validate.py all pass. No hook or installer code changes, so the marker regex already matches the block and the installer replaces it in place.

The rule that agent-authored text illustrates with constructed data reaches
a fleet repo through its carried `GOVERNANCE.md`, and reaches nothing else.
An ad-hoc session outside any project writes comments, commits, and docs
under the same identity with none of that loaded, which is the gap this
kit exists to close for the write rules already.

The `CLAUDE.md` block gains a short form of the rule, keeping the three
points that carry the reasoning: synthetic evidence is the stronger
evidence, the exposure is one-way so text that has landed is reported
rather than quietly rewritten, and no pattern closes it, since the data
that leaked was name-shaped. It is a restriction, which is what this block
is permitted to carry.

The kit README described the block as one section of write rules, which it
has not been since the authorization-scope section landed. It now names
each section, what it mirrors, and which of them a hook backs, since two of
the three are prose only and no hook can see what a line of text means.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings August 3, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR mirrors the repo’s “Representative Data in Agent-Authored Text” rule into the host-wide CLAUDE.md safety block, ensuring the same restriction applies in ad-hoc sessions outside fleet repos. It also updates the kit README to accurately describe the now-multi-section installed rule block and which parts are hook-enforced vs prose-only.

Changes:

  • Add a new Data in Agent-Authored Text section to claude-md-safety.md, mirroring the carried governance rule in a host-wide form.
  • Update the agent-safety kit README to describe the installed CLAUDE.md block as three mirrored sections (write safety, representative data, authorization/memory hygiene) and clarify enforcement coverage.

Reviewed changes

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

File Description
host-setup/agent-safety/claude-md-safety.md Adds the mirrored “Data in Agent-Authored Text” host-wide rule section.
host-setup/agent-safety/README.md Updates documentation to reflect the three-section host-wide rules block and enforcement split.
Suppressed comments (1)

host-setup/agent-safety/claude-md-safety.md:15

  • This sentence uses “his call”, which is ambiguous in a section that refers to both the agent and the maintainer with gendered pronouns. Consider naming the subject explicitly (e.g., “the maintainer’s call”) to avoid misreading.
- **The exposure is one-way.** A public comment is fetched, cached, and indexed the moment it posts, so an edit afterwards is mitigation rather than a fix, and it leaves the original readable in the comment's edit history. Report text that has already landed rather than quietly rewriting it, since what to do about it, deletion included, is his call. Do not quote the exposed data again while reporting or investigating it.

The section refers to both the agent and the maintainer, so "his environment"
and "his call" have no antecedent inside it and read as either party.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings August 3, 2026 14:56
@ptr727

ptr727 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

Suppressed findings (1), review 4845452508 on head e8ec6cc

host-setup/agent-safety/claude-md-safety.md:15
This sentence uses "his call", which is ambiguous in a section that refers to both the agent and the maintainer with gendered pronouns. Consider naming the subject explicitly (e.g., "the maintainer's call") to avoid misreading.

Fixed in d092dcb. The bullet now reads "is the maintainer's call". Correct and the same class as the threaded finding on line 12, so both are fixed in one commit rather than one at a time: the new section names both the agent and the maintainer, so a bare pronoun in it has no antecedent and resolves to either party.

The pre-existing "Authorization Scope and Memory Hygiene" section keeps its pronouns deliberately. Its opening sentence binds them ("A permission the maintainer grants is bounded by what he said"), so the antecedent that the new section lacked is present there. A sweep of the file for the remaining uses returns only that section's lines.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

host-setup/agent-safety/claude-md-safety.md:12

  • The opening sentence is grammatically awkward (“Text an agent writes illustrates…”) and reads like a missing modal (“must/should”). Rewording improves clarity and keeps the rule phrased as an explicit requirement.
Text an agent writes illustrates with data the agent constructed, never with data it observed in the maintainer's environment. This binds every surface the agent authors, meaning pull request and issue comments, commit messages, code, tests, fixtures, and docs, and it holds in every session on this machine, including ad-hoc work outside any project. Reading real data is unrestricted, and what is bounded is copying it out of the environment into text that is committed or posted. A committed repo's `GOVERNANCE.md` "Representative Data in Agent-Authored Text" states the same rule for its fleet, and the two are kept in sync deliberately, because this file also covers sessions that `AGENTS.md` never reaches.

"Text an agent writes illustrates" reads as a missing modal, and the carried
GOVERNANCE.md rule this section mirrors already opens on the same subject
without the garden path. The two sentences now match.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings August 3, 2026 14:59
@ptr727

ptr727 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

Suppressed findings (1), review 4845484293 on head d092dcb

host-setup/agent-safety/claude-md-safety.md:12
The opening sentence is grammatically awkward ("Text an agent writes illustrates...") and reads like a missing modal ("must/should"). Rewording improves clarity and keeps the rule phrased as an explicit requirement.

Fixed in 12e6bca, on the awkwardness. The sentence now opens "Agent-authored text illustrates with data the agent constructed", which is the carried GOVERNANCE.md rule's own opener. "Text an agent writes illustrates" is a reduced relative clause, so the reader reaches "illustrates" still parsing "writes" as the main verb, and the rewrite removes that. Matching the carried sentence is the better fix than a fresh rewording here, since this section exists to mirror that rule and the two are kept in sync deliberately.

The modal half is declined. Both files state rules in the declarative present ("Every state-changing call targets this checkout's origin", "A permission the maintainer grants is bounded by what he said"), so "must" here would read as a stronger rule than its neighbours rather than as the same kind of requirement. The requirement is carried by "never with data it observed in the maintainer's environment" in the same sentence.

The earlier round's finding on line 15 is answered above and fixed in d092dcb. It reappears here because a suppressed finding has no resolved state, not because it stands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 2 out of 2 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit c2019e3 into develop Aug 3, 2026
7 checks passed
@ptr727
ptr727 deleted the host-representative-data branch August 3, 2026 15:07
ptr727 added a commit that referenced this pull request Aug 3, 2026
Promotes two commits. Forward merge, no back-merge, and this pull
request merges as a **merge commit** rather than a squash, since its
head is `develop` itself.

- [#531](#531) states the
representative-data rule as a new carried `GOVERNANCE.md` section,
**Representative Data in Agent-Authored Text**, declared `verbatim` in
`spec/files.json`, classified in `spec/section-model.md`, and mapped
from `AGENTS.md`. Agent-authored text illustrates with data the agent
constructed, never with data it observed in the maintainer's
environment.
- [#532](#532) mirrors the
rule into the host-wide `CLAUDE.md` block the agent-safety kit installs,
so a session outside a fleet repo carries it too, and corrects the kit
README, which still described that block as one section of write rules.

`TODO.md` trades the answered entry for the follow-on `prose_lint.py`
floor gate, and the re-vendor entry now names the new section, which
downstream audits report as a missing section rather than as drift.

Both pull requests were reviewed to green on their own heads. The new
section makes every downstream repo non-conformant until the re-vendor
sweep, which is the audit working rather than a regression.
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