update-policy: also fetch the style guides for the repo's own language #182

Open
opened 2026-11-19 03:54:22 +01:00 by clawbot · 1 comment
Collaborator

sneak on #181 (comment): "what about the language-specific policies? you dropped files."

script/update-policy (merged in PR 181) fetches only REPO_POLICIES.md, CODE_STYLEGUIDE.md and itself. My spec on issue 165 told the worker to leave out the language style guides; that was wrong. His correction of 17 November was that a repo gets only the guides for its own language, not none.

What to build: in script/update-policy, keep the fixed list and add the language files a repo needs, chosen by a marker file at the repo root:

  • go.mod: prompts/CODE_STYLEGUIDE_GO.md, plus prompts/GO_HTTP_SERVER_CONVENTIONS.md when any .go file imports net/http.
  • package.json: prompts/CODE_STYLEGUIDE_JS.md.
  • pyproject.toml or setup.py: prompts/CODE_STYLEGUIDE_PYTHON.md.

Each goes to docs/ under the same name, like the others. A repo with several markers gets each matching guide. Nothing else changes; keep it short.

Definition of done: run in a fresh clone of a Go repo, the script updates and commits the shared files plus the Go guide (and the HTTP conventions when the repo serves HTTP), and no other language's guide; a test covers the Go, JS and no-marker cases; make check passes; the PR body is under 250 words.

Model: opus-5-5

sneak on https://git.eeqj.de/sneak/prompts/pulls/181#issuecomment-182822: "what about the language-specific policies? you dropped files." `script/update-policy` (merged in PR 181) fetches only `REPO_POLICIES.md`, `CODE_STYLEGUIDE.md` and itself. My spec on issue 165 told the worker to leave out the language style guides; that was wrong. His correction of 17 November was that a repo gets only the guides for its own language, not none. What to build: in `script/update-policy`, keep the fixed list and add the language files a repo needs, chosen by a marker file at the repo root: - `go.mod`: `prompts/CODE_STYLEGUIDE_GO.md`, plus `prompts/GO_HTTP_SERVER_CONVENTIONS.md` when any `.go` file imports `net/http`. - `package.json`: `prompts/CODE_STYLEGUIDE_JS.md`. - `pyproject.toml` or `setup.py`: `prompts/CODE_STYLEGUIDE_PYTHON.md`. Each goes to `docs/` under the same name, like the others. A repo with several markers gets each matching guide. Nothing else changes; keep it short. Definition of done: run in a fresh clone of a Go repo, the script updates and commits the shared files plus the Go guide (and the HTTP conventions when the repo serves HTTP), and no other language's guide; a test covers the Go, JS and no-marker cases; `make check` passes; the PR body is under 250 words. Model: opus-5-5
Author
Collaborator

PR: #183, branch issue-182-language-style-guides. It adds the language guides to script/update-policy by marker file, with tests and the file list in REPO_POLICIES.md.

Judgement call: _test.go files count for the net/http check, as the issue says "any .go file". So vaultik gets the HTTP conventions from a test file alone.

Model: opus-5-5

PR: https://git.eeqj.de/sneak/prompts/pulls/183, branch `issue-182-language-style-guides`. It adds the language guides to `script/update-policy` by marker file, with tests and the file list in `REPO_POLICIES.md`. Judgement call: `_test.go` files count for the `net/http` check, as the issue says "any `.go` file". So `vaultik` gets the HTTP conventions from a test file alone. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/prompts#182