Skip to content

Route the README by Reader and Document the Cross-Owner Write Grant - #631

Merged
ptr727 merged 1 commit into
developfrom
docs/readme-reader-routing-and-write-grant
Aug 8, 2026
Merged

Route the README by Reader and Document the Cross-Owner Write Grant#631
ptr727 merged 1 commit into
developfrom
docs/readme-reader-routing-and-write-grant

Conversation

@ptr727

Copy link
Copy Markdown
Owner

The README opened straight into prose written for an agent, so a human arriving from GitHub had no path to what they actually ask: how to use this repo, how to deploy the host rules, how to diverge from one, and where to file an issue. It now forks by reader, and it carries the write-grant documentation that TODO.md recorded as ready in #629 without doing.

The README, routed by reader

A Getting Started table above the Table of Contents states the human/agent split outright, an agent starting at AGENTS.md and a human starting at the table, then routes six reader shapes to one destination each. Three new sections fill the gaps, placed in the slots spec/readme-structure.md already orders them in so the redesign does not fight the hub's own spec:

  • Using This Repo (Installation slot), covering the host guardrails, carrying the rules into a repository, and an honest note that the registry does not transfer, so adopting outside this fleet means running your own hub.
  • Diverging From a Rule (Configuration slot), which separates the two kinds of exception that get confused: a repository diverging from a carried unit, where the fidelity level usually already grants the freedom and the rest is recorded in spec/divergences.json, and a write the host guard denies.
  • Questions or Issues, previously absent entirely, saying what an issue needs and that a downstream agent filing here is the normal path rather than an exception.

The cross-owner write grant

The guard denies a gh write whose explicit target sits under another owner and names GH_WRITE_GUARD_ALLOW in the denial, and no document said how to give one. docs/host-setup.md now carries it where the reader already is when the denial arrives:

  • The fork asymmetry that raises it, where origin is your fork and only the half of the work aimed at upstream denies.
  • The channel that works, an env block in the checkout's .claude/settings.local.json, which scopes the grant to that checkout rather than the host, and the session restart that loads it.
  • The value's exact shape: one string and never a JSON array, split on any run of whitespace or commas, with owner/* granting a whole owner and a token carrying no / silently granting nothing. Verified against _granted_targets and _target_permitted.
  • The two forms that fail silently, an inline VAR=x gh ... prefix and an export in a shell call, neither of which reaches a hook running as its own process. That is the property making a grant a deliberate act outside the session rather than something an agent does for itself once blocked.
  • A confirmation that does not involve making the write. Worth recording: feeding the hook a synthetic payload is not a usable probe from inside a session, because the payload text carries the very write shape the guard matches, so the guard denies the probe command itself. Observed twice while writing this.

host-setup/agent-safety/README.md carries the mechanics beside the hook description and links across.

Also here

  • The license shield moves into the closing License section, matching the form PlexCleaner carries. spec/readme-structure.md still states the old placement under Build and Distribution, so this README is deliberately ahead of the spec, and reconciling the two is the decision-state README Structure Rework cluster's edit rather than a loose end here. That cluster's Settled bullet asserting the old placement as fact is rewritten to record it.
  • Proxmox drops out of every supported-platform list, since it is Linux. The two remaining mentions name the actual Proxmox host in the rollout, which is correct.
  • untriaged joins the cspell word list, since the new Diverging section names the literal value the divergence report renders.
  • TODO.md loses the shipped cluster and its orphaned link definitions, and the stale "Refresh the README" chore becomes the open question this change leaves behind: whether these human entry points belong in the spec so fleet repos are measured on them. The per-section index alternative is recorded as declined, with the reason.

Verification

markdownlint, cspell, editorconfig-checker, spec/validate.py, and scripts/prose_lint.py --diff develop all clean locally. CRLF preserved in every Markdown file, LF preserved in install.sh. Every relative link target and every in-file anchor resolves, checked mechanically.

🤖 Generated with Claude Code

The README opened straight into prose written for an agent, so a human arriving from GitHub had no path to the four things they actually ask: how to use this repo, how to deploy the host rules, how to diverge from one, and where to file an issue. It now forks by reader above the Table of Contents, and fills the Installation, Configuration, and Questions or Issues slots that spec/readme-structure.md already orders, the last of which was absent entirely.
The write grant is the concrete gap behind the Configuration half. The guard denies a cross-owner gh write and names GH_WRITE_GUARD_ALLOW in the denial, and no document said how to give one. docs/host-setup.md now carries the worked fork example, the env block in the checkout's .claude/settings.local.json, the per-checkout scope, the required session restart, the two forms that fail silently, and a confirmation that does not involve making the write.
The license shield moves into the closing License section, on the maintainer's instruction, matching the form PlexCleaner carries. spec/readme-structure.md still states the old placement, and reconciling it is the README Structure Rework cluster's edit rather than a loose end here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 8, 2026 20:27

CopilotAI 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

Updates the repository’s human-facing entry points and host write-safety documentation so humans can quickly find “how to use this repo” guidance, while keeping agent routing explicit and documenting the cross-owner write grant mechanics in the place readers will hit them.

Changes:

  • Add a “Getting Started” reader-routing table and new sections (“Using This Repo”, “Diverging From a Rule”, “Questions or Issues”) to the README, and move the license shield into the License section.
  • Document how to grant cross-owner GitHub write targets via GH_WRITE_GUARD_ALLOW (including scope, restart requirements, and confirmation) in docs/host-setup.md, with a corresponding pointer section in the agent-safety kit README.
  • Clean up backlog tracking in TODO.md and add untriaged to the cspell word list.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
TODO.mdRemoves the shipped “cross-owner write grant” cluster and updates README-structure backlog notes and link definitions.
README.mdAdds reader-routing and new guidance sections; relocates the license shield to the License section and adds issue/discussion entry guidance.
host-setup/agent-safety/README.mdAdds a “Granting a Cross-Owner Write” section pointing to the worked example in docs/host-setup.md.
host-setup/agent-safety/install.shUpdates platform list in the wrapper comment (removes Proxmox mention).
docs/host-setup.mdAdds a detailed “Granting a Write the Guard Denies” section and updates platform list (removes Proxmox mention).
cspell.jsonAdds untriaged to the dictionary.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ptr727
ptr727 merged commit 9b73d1a into developAug 8, 2026
7 checks passed
@ptr727
ptr727 deleted the docs/readme-reader-routing-and-write-grant branch August 8, 2026 20:32
ptr727 added a commit that referenced this pull request Aug 9, 2026
…ate (#635)
Promotion of develop at 2082547, six squashes since the last one. Closes#633.
#631 routes the README by reader and documents the GH_WRITE_GUARD_ALLOW grant where a denied cross-owner write puts the reader. #632 moves readme.sections from intent to letter with four checks beside it, backed by spec/readme-sections.json and spec/third-party-tools.json, and settles the tagline rule. #634 adds repo_gate.py --check eol-coverage, reading the line-ending pins against the tree rather than only against .editorconfig.
#636 and #637 repair two readers Copilot found on this pull request, both defects develop already carried: a tool row required both outer table pipes that GitHub's Markdown makes optional, and a retired badge written as an inline image was invisible to a scan that read reference definitions alone. #638 turns the host contract's presence check into a version gate, and retires two gh workarounds that were artifacts of a stale distribution package, re-tested on an upgraded host rather than inferred.
Four carried files owe a downstream re-vendor and none is recorded in the TODO.md entry yet. GOVERNANCE.md Repository Details is verbatim, so the audit reports it, and it propagates a rule: the About description is the tagline alone, and Docker Hub receives it from the About panel rather than from the README. CODESTYLE.md item 4 and .gitattributes are intent, so nothing reports them, and the second couples to the new gate through the forward-declared mark. .github/copilot-instructions.md is intent and propagates a correction rather than a refresh, so a repo left on the old copy is wrong rather than merely stale.
Sign up for freeto 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

@ptr727