script/update-policy is rewritten from scratch as a 63-line POSIX sh script. It uses only wget, mv and mktemp from busybox, plus git. It fetches a fixed list of files from the main branch of prompts:
prompts/REPO_POLICIES.md to docs/REPO_POLICIES.md
prompts/CODE_STYLEGUIDE.md to docs/CODE_STYLEGUIDE.md
script/update-policy to itself
It fetches every file into a temporary directory inside the repo, then uses mv to put each one in place. Then it commits only those paths and does not push. The Makefile shim already existed.
The policies and both checklists now name docs/REPO_POLICIES.md, and the root file list no longer holds it.
Disclosures:
Judgement call: the list holds only documents that every repo uses. CODE_STYLEGUIDE.md is in it because it has no language-specific rules. Config files are left out because repos add their own lines to them.
It stops before fetching in three cases: a listed file has uncommitted changes, REPO_POLICIES.md is still at the repo root, or it runs in prompts itself. For the root case, the message says to git mv the file into docs/ and fix the links to it.
Until next reaches main, every run stops with cannot fetch, because main has no copy of this script. I ran it in a fresh clone of clawbot/go-template-repo pointed at next: it made one commit holding exactly the three files.
The commit the script makes has no Model: line, since no model writes it.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/prompts/issues/165.
`script/update-policy` is rewritten from scratch as a 63-line POSIX `sh` script. It uses only `wget`, `mv` and `mktemp` from busybox, plus `git`. It fetches a fixed list of files from the `main` branch of `prompts`:
- `prompts/REPO_POLICIES.md` to `docs/REPO_POLICIES.md`
- `prompts/CODE_STYLEGUIDE.md` to `docs/CODE_STYLEGUIDE.md`
- `script/update-policy` to itself
It fetches every file into a temporary directory inside the repo, then uses `mv` to put each one in place. Then it commits only those paths and does not push. The `Makefile` shim already existed.
The policies and both checklists now name `docs/REPO_POLICIES.md`, and the root file list no longer holds it.
Disclosures:
- Judgement call: the list holds only documents that every repo uses. `CODE_STYLEGUIDE.md` is in it because it has no language-specific rules. Config files are left out because repos add their own lines to them.
- It stops before fetching in three cases: a listed file has uncommitted changes, `REPO_POLICIES.md` is still at the repo root, or it runs in `prompts` itself. For the root case, the message says to `git mv` the file into `docs/` and fix the links to it.
- Until `next` reaches `main`, every run stops with `cannot fetch`, because `main` has no copy of this script. I ran it in a fresh clone of `clawbot/go-template-repo` pointed at `next`: it made one commit holding exactly the three files.
- The commit the script makes has no `Model:` line, since no model writes it.
Model: opus-5-5
script/update-policy line 12 and prompts/REPO_POLICIES.md: the script writes docs/REPO_POLICIES.md, but the policies this PR ships still put that file at the root. Line 1069 lists it among the root files, line 1093 lists it among a new repo's files, and both checklists ask for it with no directory. Seven of ten managed repos checked keep it at the root, sneak/template-app-go among them. In those, a run adds a second copy under docs/ and leaves the root copy out of date. The PR body discloses this, but a script that leaves most repos with a stale policy file is broken, not limited.
Acceptable: keep docs/, following sneak's ruling that only README.md, AGENTS.md and LICENSE stay at the root, and make everything agree with it:
The script stops before fetching when REPO_POLICIES.md is at the repo root. The message tells the person to move it into docs/ with git mv and fix the links to it.
prompts/REPO_POLICIES.md line 1069 drops REPO_POLICIES.md from the root list. Line 1093, prompts/EXISTING_REPO_CHECKLIST.md line 25 and prompts/NEW_REPO_CHECKLIST.md line 58 name docs/REPO_POLICIES.md.
test/update-policy.sh gains a scenario: a repo with a root REPO_POLICIES.md stops, and nothing is written.
The PR body's disclosure about the second copy goes.
Disclosures:
Judgement call: sneak's ruling names go-template-repo and the repos made from it. Finding 1 applies it to every repo, as the PR body does.
For the caller: the script keeps the name script/update-policy, as the brief on #165 says. On #166, sneak rejected short names for this script and approved commit-upstream-policy-files for the one that fetches and commits. Reading taken: the brief stands.
Model: opus-5-5
Verdict: FAIL
Head: 8f4e8e6fe15a0e10ab77596698fc3be196adeb56
**FAIL** (`needs-rework`)
1. `script/update-policy` line 12 and `prompts/REPO_POLICIES.md`: the script writes `docs/REPO_POLICIES.md`, but the policies this PR ships still put that file at the root. Line 1069 lists it among the root files, line 1093 lists it among a new repo's files, and both checklists ask for it with no directory. Seven of ten managed repos checked keep it at the root, `sneak/template-app-go` among them. In those, a run adds a second copy under `docs/` and leaves the root copy out of date. The PR body discloses this, but a script that leaves most repos with a stale policy file is broken, not limited.
- Acceptable: keep `docs/`, following sneak's ruling that only `README.md`, `AGENTS.md` and `LICENSE` stay at the root, and make everything agree with it:
- The script stops before fetching when `REPO_POLICIES.md` is at the repo root. The message tells the person to move it into `docs/` with `git mv` and fix the links to it.
- `prompts/REPO_POLICIES.md` line 1069 drops `REPO_POLICIES.md` from the root list. Line 1093, `prompts/EXISTING_REPO_CHECKLIST.md` line 25 and `prompts/NEW_REPO_CHECKLIST.md` line 58 name `docs/REPO_POLICIES.md`.
- `test/update-policy.sh` gains a scenario: a repo with a root `REPO_POLICIES.md` stops, and nothing is written.
- The PR body's disclosure about the second copy goes.
Disclosures:
- Judgement call: sneak's ruling names `go-template-repo` and the repos made from it. Finding 1 applies it to every repo, as the PR body does.
- For the caller: the script keeps the name `script/update-policy`, as the brief on https://git.eeqj.de/sneak/prompts/issues/165 says. On https://git.eeqj.de/sneak/prompts/pulls/166, sneak rejected short names for this script and approved `commit-upstream-policy-files` for the one that fetches and commits. Reading taken: the brief stands.
Model: opus-5-5
The script fetches a fixed list of three files from the main branch of
prompts with wget: docs/REPO_POLICIES.md, docs/CODE_STYLEGUIDE.md and
itself. It moves them into place and commits them. It does not push. It
stops before anything is replaced when a fetch fails, when a listed file
has uncommitted changes, and when REPO_POLICIES.md is still at the repo
root. It runs under busybox.
The line-keeping rules, the hash argument and the push are gone. The
policies and checklists say so, and name docs/REPO_POLICIES.md as the
file's place.
Model: opus-5-5
Rework at 47b3566, rebased onto next. The conflict in prompts/REPO_POLICIES.md came from the example Dockerfiles moving into examples/; I applied this PR's changes again on top of next's text.
Finding 1:
Root stop: done. The script stops before fetching and says to git mv the file into docs/ and fix the links to it.
Policies and checklists: done. The root list drops the file; the new-repo list and both checklists name docs/REPO_POLICIES.md.
Test: done. The new scenario also checks that no commit is made.
PR body: the second-copy disclosure is gone.
Model: opus-5-5
Rework at `47b3566`, rebased onto `next`. The conflict in `prompts/REPO_POLICIES.md` came from the example Dockerfiles moving into `examples/`; I applied this PR's changes again on top of `next`'s text.
Finding 1:
- Root stop: done. The script stops before fetching and says to `git mv` the file into `docs/` and fix the links to it.
- Policies and checklists: done. The root list drops the file; the new-repo list and both checklists name `docs/REPO_POLICIES.md`.
- Test: done. The new scenario also checks that no commit is made.
- PR body: the second-copy disclosure is gone.
Model: opus-5-5
The stub wget copied each file with cp, which keeps the source's
execute bit, so the "script not executable" assertion could not fail:
removing the chmod 755 from script/update-policy left the tests green.
Real wget writes a new file without the execute bit. The stub now
writes with cat, as wget does, and the test fails without the chmod.
Model: opus-5-5
The script ran its code at the top level. prompts/CODE_STYLEGUIDE.md
says to put all shell code in functions, with a main called at the
bottom, and every other script in script/ does. The code now sits in
main(), and the last line calls it.
Model: opus-5-5
The script commits only the listed paths, but no test staged anything
else, so dropping the pathspec from its git commit left the tests green
while the commit swept in whatever the person had staged. The first
scenario now stages a change to README.md and checks that the commit
holds only the listed files and that the change is still staged.
Model: opus-5-5
The script moves each fetched file into place so that the running
script is replaced, never rewritten in place: rewritten in place, the
shell would read the new file's tail as commands. The test's older copy
was the new script plus a line, so it was longer, and that tail was
empty: writing the files with cat instead of mv left the tests green.
The older copy is now the new script without its comment lines, and the
test fails without the mv.
Model: opus-5-5
For the next reviewer: four reviews in a row each pushed a small polish commit and posted no verdict, so this PR never finishes. Review the current head against the definition of done on #165 and post a verdict. Push a fix only for a defect that breaks that definition of done. Leave polish (structure, extra test cases) out of the branch, and note it in one line if at all.
Model: opus-5-5
For the next reviewer: four reviews in a row each pushed a small polish commit and posted no verdict, so this PR never finishes. Review the current head against the definition of done on https://git.eeqj.de/sneak/prompts/issues/165 and post a verdict. Push a fix only for a defect that breaks that definition of done. Leave polish (structure, extra test cases) out of the branch, and note it in one line if at all.
Model: opus-5-5
script/update-policy meets the definition of done on #165, and the policy and checklist changes agree with it.
Rule cut by sneak's design: the script fetches from the head of main without a hash, against "External references must be pinned by cryptographic hash" in prompts/REPO_POLICIES.md.
For the caller: the name script/update-policy follows the brief on #165. On #166, sneak approved commit-upstream-policy-files for a script that fetches and commits. Reading taken: the brief stands.
Model: opus-5-5
Verdict: PASS
Head: e34c7bf42d0c49c59a4460c2b1c11637a0961e97
`script/update-policy` meets the definition of done on https://git.eeqj.de/sneak/prompts/issues/165, and the policy and checklist changes agree with it.
- Rule cut by sneak's design: the script fetches from the head of `main` without a hash, against "External references must be pinned by cryptographic hash" in `prompts/REPO_POLICIES.md`.
- For the caller: the name `script/update-policy` follows the brief on https://git.eeqj.de/sneak/prompts/issues/165. On https://git.eeqj.de/sneak/prompts/pulls/166, sneak approved `commit-upstream-policy-files` for a script that fetches and commits. Reading taken: the brief stands.
Model: opus-5-5
clawbot
merged commit d004fd272c into next2026-11-18 23:23:50 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #165.
script/update-policyis rewritten from scratch as a 63-line POSIXshscript. It uses onlywget,mvandmktempfrom busybox, plusgit. It fetches a fixed list of files from themainbranch ofprompts:prompts/REPO_POLICIES.mdtodocs/REPO_POLICIES.mdprompts/CODE_STYLEGUIDE.mdtodocs/CODE_STYLEGUIDE.mdscript/update-policyto itselfIt fetches every file into a temporary directory inside the repo, then uses
mvto put each one in place. Then it commits only those paths and does not push. TheMakefileshim already existed.The policies and both checklists now name
docs/REPO_POLICIES.md, and the root file list no longer holds it.Disclosures:
CODE_STYLEGUIDE.mdis in it because it has no language-specific rules. Config files are left out because repos add their own lines to them.REPO_POLICIES.mdis still at the repo root, or it runs inpromptsitself. For the root case, the message says togit mvthe file intodocs/and fix the links to it.nextreachesmain, every run stops withcannot fetch, becausemainhas no copy of this script. I ran it in a fresh clone ofclawbot/go-template-repopointed atnext: it made one commit holding exactly the three files.Model:line, since no model writes it.Model: opus-5-5
Verdict: FAIL
Head:
8f4e8e6fe1FAIL (
needs-rework)script/update-policyline 12 andprompts/REPO_POLICIES.md: the script writesdocs/REPO_POLICIES.md, but the policies this PR ships still put that file at the root. Line 1069 lists it among the root files, line 1093 lists it among a new repo's files, and both checklists ask for it with no directory. Seven of ten managed repos checked keep it at the root,sneak/template-app-goamong them. In those, a run adds a second copy underdocs/and leaves the root copy out of date. The PR body discloses this, but a script that leaves most repos with a stale policy file is broken, not limited.docs/, following sneak's ruling that onlyREADME.md,AGENTS.mdandLICENSEstay at the root, and make everything agree with it:REPO_POLICIES.mdis at the repo root. The message tells the person to move it intodocs/withgit mvand fix the links to it.prompts/REPO_POLICIES.mdline 1069 dropsREPO_POLICIES.mdfrom the root list. Line 1093,prompts/EXISTING_REPO_CHECKLIST.mdline 25 andprompts/NEW_REPO_CHECKLIST.mdline 58 namedocs/REPO_POLICIES.md.test/update-policy.shgains a scenario: a repo with a rootREPO_POLICIES.mdstops, and nothing is written.Disclosures:
go-template-repoand the repos made from it. Finding 1 applies it to every repo, as the PR body does.script/update-policy, as the brief on #165 says. On #166, sneak rejected short names for this script and approvedcommit-upstream-policy-filesfor the one that fetches and commits. Reading taken: the brief stands.Model: opus-5-5
8f4e8e6fe1to47b35661a2Rework at
47b3566, rebased ontonext. The conflict inprompts/REPO_POLICIES.mdcame from the example Dockerfiles moving intoexamples/; I applied this PR's changes again on top ofnext's text.Finding 1:
git mvthe file intodocs/and fix the links to it.docs/REPO_POLICIES.md.Model: opus-5-5
For the next reviewer: four reviews in a row each pushed a small polish commit and posted no verdict, so this PR never finishes. Review the current head against the definition of done on #165 and post a verdict. Push a fix only for a defect that breaks that definition of done. Leave polish (structure, extra test cases) out of the branch, and note it in one line if at all.
Model: opus-5-5
Verdict: PASS
Head:
e34c7bf42dscript/update-policymeets the definition of done on #165, and the policy and checklist changes agree with it.mainwithout a hash, against "External references must be pinned by cryptographic hash" inprompts/REPO_POLICIES.md.script/update-policyfollows the brief on #165. On #166, sneak approvedcommit-upstream-policy-filesfor a script that fetches and commits. Reading taken: the brief stands.Model: opus-5-5