Re-vendor REPO_POLICIES.md from the canonical copy (closes #20) #41
Reference in New Issue
Block a user
Delete Branch "refresh-repo-policies"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces the vendored
REPO_POLICIES.mdwith a byte-identical copy of the canonical file. One file, one commit, no hand-editing.Verification
b632c46d4ccd7fe4bd11f714fec2d3b2098d8f697d9d2022795a15a97749831a117dde7f148ed3cd693b333312f6345a0a0ee84fadbbe5cca559ca6fed4a1775117dde7f148ed3cd693b333312f6345a0a0ee84fadbbe5cca559ca6fed4a1775diffbetween the canonical file and the new vendored copy produces no output, and the two sha256 values are equal.git diff --stat main..HEADshowsREPO_POLICIES.mdas the only changed path, 60 insertions and 20 deletions.make checkis green.make fmtwas run first and changed nothing —script/fmtis Go-only today (that is #19), so the formatter cannot have perturbed the vendored bytes. This is deliberate as well as incidental: a vendored copy has to match upstream byte for byte, so if the repo formatter ever disagrees with upstream that is a matter for thepromptsrepo, not a local edit here.make checkneeded a freshGOLANGCI_LINT_CACHEon the first attempt: the shared cache attributed 10 findings to/tmp/sfdupes-readme-entrypoints/, a worktree that no longer exists. That is #36, not a defect in this branch. With a fresh cache the run is0 issues.; the only remaining output is thegomodguarddeprecation warning, which is #26.make dockerwas not run — this is a docs-only change and the host BuildKit cache was recently wiped.What comes back
check,precommit,install-precommit,projectname), and the rule that repo-type-specific pre-commit extras live inscript/precommitrather than the hook.bootstrap,setupandhooksin the required Makefile target list.script/precommitparagraph and the wiring of the hook throughscript/install-precommit.script/cibuildin the Gitea Actions bullet.script/entrypoints in the new-repo minimum contents list.Two things a reviewer should look at deliberately
The drift was bidirectional, and this change removes text as well as restoring it. The old vendored copy was not simply an older prefix of the canonical file: it carried an 11-line bullet on versioned repo memory (
.claude/memory/<memory>.mdfiles@-imported from.claude/CLAUDE.md) that the current canonical file does not contain. Copying the canonical file wholesale drops that bullet. That is the correct outcome under the issue's definition of done — the vendored copy's job is to match upstream, and re-adding a paragraph upstream does not have would recreate exactly the drift this issue exists to remove. If that bullet ought to survive, it belongs back in the canonical file in thepromptsrepo and will arrive here on the next re-vendor. Flagging it because it is the one part of this diff that is not a pure restoration.No
TODO.mdentry accompanies the commit. The repo's Workflow section saysTODO.mdchanges go in the same commit as the work. This issue's definition of done restricts the change toREPO_POLICIES.mdalone, and that scope discipline is the reason a docs-only change is allowed to skip adversarial review, so the issue wins over the convention here. Noting the departure rather than making it silently.Out of scope, filed nowhere yet
Restoring the text makes one requirement newly visible that this repo does not meet, left untouched here: the Dockerfile installs its build prerequisite inline (
apk add --no-cache makein the build stage) and never runsscript/bootstrap, nor does itCOPY script/alongside the dependency manifests. The restored bullet requires the opposite. Reported for separate filing rather than fixed drive-by. Everything else in the restored text checks out: all nine required Makefile targets exist, all twelvescript/entrypoints exist, the workflow already runsscript/cibuild, and the README has every required section including Entrypoints.What was built
cpof~/dev/prompts/prompts/REPO_POLICIES.mdover the repo'sREPO_POLICIES.md, committed as99d757c. Nothing else — no merge, no hand-edit, no local adaptation. The copy is what makes the guarantee checkable: the new file's sha256 equals the canonical file's exactly, which a hand-merge could not have promised.How it was verified
diffbetween the canonical file and the working-tree copy exits 0 with no output. sha256 before:b632c46d4ccd7fe4bd11f714fec2d3b2098d8f697d9d2022795a15a97749831a(368 lines). sha256 after:117dde7f148ed3cd693b333312f6345a0a0ee84fadbbe5cca559ca6fed4a1775(408 lines), equal to the canonical file's.117dde7f...both times. It has not drifted since the issue was written, and it was not modified in either direction.git status --porcelainshowed a singleM REPO_POLICIES.md, andgit diff --stat main..HEADshows one file, 60 insertions, 20 deletions.make fmtwas run before committing and changed nothing, so no formatter touched the vendored bytes.make checkexits 0: testsokat 88.5% coverage, lint0 issues.The first run reported 10 findings against/tmp/sfdupes-readme-entrypoints/, a deleted worktree — the #36 linter-cache artifact. Re-run under a freshGOLANGCI_LINT_CACHEit is clean, which confirms the findings were cache residue and not this branch. Thegomodguarddeprecation warning remains and is #26.Worth a reviewer's attention
The old vendored copy had drifted in both directions. Alongside the 40 lines it was missing, it carried an 11-line bullet on versioned repo memory that the current canonical file does not have, so this change deletes it. That is the right call under "byte-identical copy" — restoring it would reintroduce drift — but it is the only part of the diff that is not a pure restoration, so it should be a conscious decision rather than something noticed after merge. If upstream should still carry that bullet, the fix belongs in the
promptsrepo.Two deliberate departures, both argued in the PR body rather than made silently: no
TODO.mdentry (the issue's definition of done restricts the change to one file), and nomake dockerrun (docs-only change, cold BuildKit cache).One newly-visible policy violation was found and deliberately not fixed here: the
Dockerfileinstalls its build prerequisite inline rather than runningscript/bootstrap. Out of scope for this issue; reported for separate filing.