Repository navigation
Description
scripts/carry.py propagates manifest-owned trees (#797), and the audit reports a stale
section inside a mixed file precisely enough to name it. Between those two there is nothing.
RESYNC.md section 3 says to re-vendor the verbatim sections, and every resync writes its own
one-off code to do it.
That is the step the AGENTS.md-overwrite incident happened on, and it is the only step in the
apply order with no tested tool behind it.
Evidence, from the 2.0.577 resync pilot on Utilities (PR ptr727/Utilities#466)
audit run 2026-09-07T02:37:02Z | hub f8e7491.
Eight sections were stale across two files. I wrote a throwaway replacer and, separately, a
throwaway verifier asserting the result. The verifier caught a defect in the replacer on its
first run: rebuilding the file as preamble + "\n".join(sections) dropped the single newline
between the preamble and the first heading, silently deleting one blank line from both
AGENTS.md and GOVERNANCE.md.
That defect is invisible in review. It is one blank line in a 563-line diff, it breaks no
Markdown renderer, and no linter in the gate set flags it. It would have shipped, and the next
audit would have reported both files as drift again for a reason nobody could see. The only
thing that caught it was an assertion written before the edit was trusted.
A resync that hand-rolls this each time gets the assertion only when whoever runs it happens to
write one. That is the argument for a hub tool rather than for more care.
What the tool needs to do
A carry.py-shaped subcommand, taking the repository name and a target worktree:
- Read
spec/files.jsonfor the file's declared sections and their fidelity. - Replace only
verbatimsections, in place, leaving the preamble, the section set, the section
order, and everyintentsection byte-identical. - Refuse rather than guess when a declared verbatim section is absent from the target, since that
is a standup question rather than a drift question. - Preserve the target's line endings, which are not the hub's on every repo.
- Assert the postcondition itself and exit non-zero when it fails, the way
carry.py apply
already re-compares digests after writing.
Point 5 is the one that matters. A tool that writes without asserting reproduces the defect above
with more authority.
Interaction with the overwrite guard
This narrows what the carried-instruction-file-guard skill has to catch by hand rather than
replacing it. A tool that can only touch declared verbatim sections cannot delete a repository's
local additions, because a local addition is by definition not one of them. The guard's probe
still owns the intent half, where nothing mechanical can judge.
The two throwaway scripts from the pilot are a starting shape rather than a proposal, and the
postcondition assertions are the part worth keeping. Filed per RESYNC.md section 2, which
directs a missing capability found during a resync here rather than into a chat log.
Activity
Give the Verbatim Section Re-Vendor a Tested Tool (#1423)
Promote develop to main: give the verbatim section re-vendor a tested…