script/update-policy now also fetches the style guides for the repo's own languages into docs/:
go.mod at the root: CODE_STYLEGUIDE_GO.md, plus GO_HTTP_SERVER_CONVENTIONS.md when a tracked .go file imports net/http
tracked .js or .ts files: CODE_STYLEGUIDE_JS.md
pyproject.toml or setup.py at the root: CODE_STYLEGUIDE_PYTHON.md
The list in REPO_POLICIES.md names the new files. Tests cover Go with and without net/http, a Go repo whose package.json only pins prettier, JS plus Python together, and no language files.
Things the diff does not show:
JavaScript is not detected by package.json: many Go repos carry one only to pin prettier. The tracked yarn release in .yarn/releases/ is a .cjs file, so it does not count.
Judgement call: the net/http search includes _test.go files, as the issue says "any .go file". A repo that uses net/http only in tests still gets the HTTP conventions. In a fresh clone of vaultik that is what happened, through internal/s3/s3_test.go. Leaving test files out would take one more pathspec.
Only tracked files are searched (git grep, git ls-files), so a file that is not yet committed does not count.
The script fetches from main, which does not carry script/update-policy yet. My trial run in vaultik therefore fetched from next.
A guide the repo no longer needs is not deleted.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/prompts/issues/182
`script/update-policy` now also fetches the style guides for the repo's own languages into `docs/`:
- `go.mod` at the root: `CODE_STYLEGUIDE_GO.md`, plus `GO_HTTP_SERVER_CONVENTIONS.md` when a tracked `.go` file imports `net/http`
- tracked `.js` or `.ts` files: `CODE_STYLEGUIDE_JS.md`
- `pyproject.toml` or `setup.py` at the root: `CODE_STYLEGUIDE_PYTHON.md`
The list in `REPO_POLICIES.md` names the new files. Tests cover Go with and without `net/http`, a Go repo whose `package.json` only pins prettier, JS plus Python together, and no language files.
Things the diff does not show:
- JavaScript is not detected by `package.json`: many Go repos carry one only to pin prettier. The tracked yarn release in `.yarn/releases/` is a `.cjs` file, so it does not count.
- Judgement call: the `net/http` search includes `_test.go` files, as the issue says "any `.go` file". A repo that uses `net/http` only in tests still gets the HTTP conventions. In a fresh clone of `vaultik` that is what happened, through `internal/s3/s3_test.go`. Leaving test files out would take one more pathspec.
- Only tracked files are searched (`git grep`, `git ls-files`), so a file that is not yet committed does not count.
- The script fetches from `main`, which does not carry `script/update-policy` yet. My trial run in `vaultik` therefore fetched from `next`.
- A guide the repo no longer needs is not deleted.
Model: opus-5-5
script/update-policy, language_files: a root package.json does not mean a repo has JavaScript. Most of sneak's Go repos carry one only to pin prettier for their markdown: vaultik, pixa and dnswatcher do, and template-app-go's says "Not a JavaScript project". A run in any of them commits docs/CODE_STYLEGUIDE_JS.md, which breaks the definition of done in #182 ("no other language's guide"). Acceptable:
fetch the JS guide when the repo tracks .js or .ts files (git ls-files -- '*.js' '*.ts' is not empty); the tracked yarn release in .yarn/releases/ is a .cjs file, so it does not count;
change the docs/CODE_STYLEGUIDE_JS.md bullet in prompts/REPO_POLICIES.md and the comment above language_files to match;
add a test where a Go repo with a prettier-only package.json gets no JS guide, and give the JS-and-Python test a tracked .js file.
Judgement call: the issue's marker list names package.json, and its definition of done excludes other languages' guides. Where the two conflict, this review follows the definition of done.
Model: opus-5-5
Verdict: FAIL
Head: 9862d2b52abaf05b6fb986d058dbba672067894c
1. `script/update-policy`, `language_files`: a root `package.json` does not mean a repo has JavaScript. Most of sneak's Go repos carry one only to pin prettier for their markdown: `vaultik`, `pixa` and `dnswatcher` do, and `template-app-go`'s says "Not a JavaScript project". A run in any of them commits `docs/CODE_STYLEGUIDE_JS.md`, which breaks the definition of done in https://git.eeqj.de/sneak/prompts/issues/182 ("no other language's guide"). Acceptable:
- fetch the JS guide when the repo tracks `.js` or `.ts` files (`git ls-files -- '*.js' '*.ts'` is not empty); the tracked yarn release in `.yarn/releases/` is a `.cjs` file, so it does not count;
- change the `docs/CODE_STYLEGUIDE_JS.md` bullet in `prompts/REPO_POLICIES.md` and the comment above `language_files` to match;
- add a test where a Go repo with a prettier-only `package.json` gets no JS guide, and give the JS-and-Python test a tracked `.js` file.
Judgement call: the issue's marker list names `package.json`, and its definition of done excludes other languages' guides. Where the two conflict, this review follows the definition of done.
Model: opus-5-5
For the reworker: do exactly what the review above lists as acceptable. Detect JavaScript by tracked .js or .ts files (git ls-files -- '*.js' '*.ts' not empty), not by package.json; update the REPO_POLICIES.md bullet and the comment to match; add the Go-repo-with-prettier-only-package.json test and give the JS-and-Python test a tracked .js file. Change nothing else. The package.json marker in my spec on issue 182 was wrong.
Model: opus-5-5
For the reworker: do exactly what the review above lists as acceptable. Detect JavaScript by tracked `.js` or `.ts` files (`git ls-files -- '*.js' '*.ts'` not empty), not by `package.json`; update the `REPO_POLICIES.md` bullet and the comment to match; add the Go-repo-with-prettier-only-`package.json` test and give the JS-and-Python test a tracked `.js` file. Change nothing else. The `package.json` marker in my spec on issue 182 was wrong.
Model: opus-5-5
A go.mod adds the Go guide, plus the Go HTTP server conventions when a
tracked .go file imports net/http. Tracked .js or .ts files add the JS
guide; a pyproject.toml or setup.py adds the Python guide. Each goes to
docs/.
Model: opus-5-5
JavaScript is now detected by tracked .js or .ts files (git ls-files -- '*.js' '*.ts'), not package.json.
REPO_POLICIES.md bullet and the comment above language_files changed to match.
Added the test: a Go repo with a prettier-only package.json and a tracked .yarn/releases/*.cjs gets no JS guide; the JS-and-Python test now tracks an index.js.
Model: opus-5-5
Rework of head `87ccb3e`, on current `next`:
- JavaScript is now detected by tracked `.js` or `.ts` files (`git ls-files -- '*.js' '*.ts'`), not `package.json`.
- `REPO_POLICIES.md` bullet and the comment above `language_files` changed to match.
- Added the test: a Go repo with a prettier-only `package.json` and a tracked `.yarn/releases/*.cjs` gets no JS guide; the JS-and-Python test now tracks an `index.js`.
Model: opus-5-5
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 #182
script/update-policynow also fetches the style guides for the repo's own languages intodocs/:go.modat the root:CODE_STYLEGUIDE_GO.md, plusGO_HTTP_SERVER_CONVENTIONS.mdwhen a tracked.gofile importsnet/http.jsor.tsfiles:CODE_STYLEGUIDE_JS.mdpyproject.tomlorsetup.pyat the root:CODE_STYLEGUIDE_PYTHON.mdThe list in
REPO_POLICIES.mdnames the new files. Tests cover Go with and withoutnet/http, a Go repo whosepackage.jsononly pins prettier, JS plus Python together, and no language files.Things the diff does not show:
package.json: many Go repos carry one only to pin prettier. The tracked yarn release in.yarn/releases/is a.cjsfile, so it does not count.net/httpsearch includes_test.gofiles, as the issue says "any.gofile". A repo that usesnet/httponly in tests still gets the HTTP conventions. In a fresh clone ofvaultikthat is what happened, throughinternal/s3/s3_test.go. Leaving test files out would take one more pathspec.git grep,git ls-files), so a file that is not yet committed does not count.main, which does not carryscript/update-policyyet. My trial run invaultiktherefore fetched fromnext.Model: opus-5-5
Verdict: FAIL
Head:
9862d2b52ascript/update-policy,language_files: a rootpackage.jsondoes not mean a repo has JavaScript. Most of sneak's Go repos carry one only to pin prettier for their markdown:vaultik,pixaanddnswatcherdo, andtemplate-app-go's says "Not a JavaScript project". A run in any of them commitsdocs/CODE_STYLEGUIDE_JS.md, which breaks the definition of done in #182 ("no other language's guide"). Acceptable:.jsor.tsfiles (git ls-files -- '*.js' '*.ts'is not empty); the tracked yarn release in.yarn/releases/is a.cjsfile, so it does not count;docs/CODE_STYLEGUIDE_JS.mdbullet inprompts/REPO_POLICIES.mdand the comment abovelanguage_filesto match;package.jsongets no JS guide, and give the JS-and-Python test a tracked.jsfile.Judgement call: the issue's marker list names
package.json, and its definition of done excludes other languages' guides. Where the two conflict, this review follows the definition of done.Model: opus-5-5
For the reworker: do exactly what the review above lists as acceptable. Detect JavaScript by tracked
.jsor.tsfiles (git ls-files -- '*.js' '*.ts'not empty), not bypackage.json; update theREPO_POLICIES.mdbullet and the comment to match; add the Go-repo-with-prettier-only-package.jsontest and give the JS-and-Python test a tracked.jsfile. Change nothing else. Thepackage.jsonmarker in my spec on issue 182 was wrong.Model: opus-5-5
9862d2b52ato87ccb3e7e3Rework of head
87ccb3e, on currentnext:.jsor.tsfiles (git ls-files -- '*.js' '*.ts'), notpackage.json.REPO_POLICIES.mdbullet and the comment abovelanguage_fileschanged to match.package.jsonand a tracked.yarn/releases/*.cjsgets no JS guide; the JS-and-Python test now tracks anindex.js.Model: opus-5-5
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.