Skip to content

Promote develop to main: the representative-data rule - #533

Merged
ptr727 merged 3 commits into
mainfrom
develop
Aug 3, 2026
Merged

ptr727 merged 3 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

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 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 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.

ptr727 and others added 2 commits August 3, 2026 07:52
Answers the first `TODO.md` entry, which recorded that agent-authored
text quoting the maintainer's own data was left to judgment rather than
stated as a rule. An agent proving a review finding on a downstream pull
request quoted real paths from the maintainer's filesystem, carrying
family members' names, into a comment on a public repository. The
finding needed none of them.

## What lands

A new `GOVERNANCE.md` section, **Representative Data in Agent-Authored
Text**, placed next to `Repository Boundaries and Write Safety` because
both bound an outward-facing act. It binds every surface an agent writes
(pull request and issue comments, review replies, commit messages, code,
tests, fixtures, docs), leaves reading unrestricted, and bounds what an
agent copies out of the environment into text that is committed or
posted. It holds in a private repository too, since the audience changes
with one settings toggle while the text stays where it was written.

Three points carry the reasoning, since a bare prohibition invites the
exception that caused this:

- **Synthetic evidence is the better evidence, not a weaker
substitute.** A constructed case demonstrates the defect exactly and any
reader can re-run it, where observed data proves the same thing and can
never be reproduced. Where observed data is what revealed the defect,
name the property that triggers the fault and construct a case that
carries it.
- **The exposure is one-way.** A public comment is fetched, cached, and
indexed the moment it posts, so an edit afterwards is mitigation and
leaves the original in the edit history. Text that has landed is
reported to the maintainer rather than quietly rewritten, and the
exposed data is not quoted again while reporting it.
- **No checker closes this.** A pattern finds an absolute home path or a
drive letter, and that floor is worth gating. The data that leaked was
name-shaped, and a name is not pattern-detectable, so a search of the
offending text for path-shaped strings returns nothing while the names
sit in plain sight.

## Registration

The section is declared `verbatim` in `spec/files.json`, classified in
the `spec/section-model.md` table, and given a row in the `AGENTS.md`
map, so the audit checks every downstream copy and `validate.py` fails
if the heading is ever renamed out from under the declaration.

## Backlog

The answered entry is replaced by the follow-on gate in `prose_lint.py`,
recorded with the three things that need settling: the exemption carries
the whole burden because the rule's own wording quotes path shapes to
describe them, no committed-file linter reads a pull request comment
which is where the leak happened, and an operator's literal path in a
runbook is the repo's own content rather than an agent quoting the
environment. The re-vendor entry now names the new section, which
downstream audits report as a missing section rather than as drift.

## Verification

`spec/validate.py`, `prose_lint.py` (diff-scoped and whole-file on every
changed doc), markdownlint-cli2, cspell, editorconfig-checker,
actionlint, and the 153 `test_prose_lint.py` cases all pass.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Follow-on to [#531](#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](#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.

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings August 3, 2026 15:10

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

Promotes the “representative-data rule” governance changes from develop to main, ensuring the new carried GOVERNANCE.md section is registered in the spec and mirrored into the host-wide agent-safety kit documentation.

Changes:

  • Adds the new Representative Data in Agent-Authored Text section to GOVERNANCE.md and wires it into AGENTS.md.
  • Registers the new carried section in spec/files.json and spec/section-model.md so audits/validation treat it as verbatim fleet law.
  • Updates the agent-safety kit docs (host-setup/agent-safety/*) and refreshes the repo backlog entry in TODO.md.

Reviewed changes

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

Show a summary per file
File Description
TODO.md Replaces the completed backlog item with a follow-on item to gate the pattern-detectable subset in prose_lint.py.
spec/section-model.md Adds the new governance section to the section classification table.
spec/files.json Adds the new governance section to the baseline verbatim section list for GOVERNANCE.md.
host-setup/agent-safety/README.md Updates the kit description to reflect the expanded host-wide CLAUDE.md rules block.
host-setup/agent-safety/claude-md-safety.md Adds the “Data in Agent-Authored Text” host-wide rules section mirroring the new governance rule.
GOVERNANCE.md Introduces the new carried governance section defining the representative-data rule and rationale.
AGENTS.md Adds a mapping row so tasks involving quoting data route to the new governance section.

Comment thread TODO.md Resolved
Answers a finding on the promotion pull request
[#533](#533). The
promotion's head is `develop`, which is protected, so the fix takes a
feature branch and the promotion picks it up.

The `prose_lint.py` gating entry lists the surfaces the check would read
as "committed prose, a comment, or a fixture", and names a pull request
comment two sentences later as the surface no committed-file linter
reaches. A bare "comment" in the scope list therefore reads as the one
the entry just said is out of reach. It now says **a code comment**.

Scope only, no change to what the entry asks for.

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

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

@ptr727
ptr727 merged commit a9cd154 into main Aug 3, 2026
7 checks passed
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