Commit Graph
66 Commits
Author SHA1 Message Date
clawbot 81c1a368d0 golangci: set canonical config to the org-standard v2 file, note v2.12.2
check / check (push) Successful in 7s
2026-08-07 20:56:53 +00:00
sneak 2390c04450 policy: record canonical golangci-lint version v2.12.2 in REPO_POLICIES.md
check / check (push) Successful in 7s
The canonical config now targets golangci-lint v2.12.2 (released
2026-05-06), installed commit-pinned via go install at
c0d3ddc9cf3faa61a4e378e879ece580256d76e5. Record that version next to
the .golangci.yml fetch instructions so consuming repos pin the same
linter the canonical config is written for, and bump last_modified.
2026-08-07 20:44:21 +00:00
clawbot c28b817bd4 golangci: sync canonical config with golangci-lint migrate output for v2.12.2
check / check (push) Successful in 9s
Replace the hand-migrated v2 config with the exact output of
golangci-lint migrate under v2.12.2, applied and verified on
dnswatcher (sha256 8804ff50ebba0e8b4129a03600137040421e43aef9b4054a626abfd13767b28b):

- disable deprecated gomodguard (gomodguard_v2 stays enabled via
  default: all; identical behavior, resolves the deprecation warning)
- add linters.exclusions and formatters.exclusions (generated: lax,
  default path excludes) replicating v1 defaults
- add explicit formatters block (gofmt, gofumpt, goimports); gci is
  intentionally not enabled because its two-group import ordering
  conflicts with the org's stdlib/third-party/local script/fmt style
- drop the explanatory header comment so the file is byte-identical
  with the verified copy consuming repos fetch

Update the TODO.md Completed Steps entry to match.
2026-08-07 20:42:28 +00:00
sneak 3f9640b09e Migrate canonical .golangci.yml to golangci-lint v2 config layout
check / check (push) Successful in 6s
Move linter settings from the broken v1-style top-level linters-settings
key to linters.settings so golangci-lint >= v2 actually applies the
thresholds, and drop issues.exclude-use-default, which no longer exists
in the v2 schema. Add a comment documenting the v2 layout requirement.

Record the change in TODO.md Completed Steps.
2026-08-07 16:44:49 +00:00
sneak 3d8d1c0600 Adopt scripts-to-rule-them-all: script/ entrypoints, Makefile shims, policy update (#23)
check / check (push) Successful in 5s
Reviewed-on: #23
Co-authored-by: sneak <sneak@sneak.berlin>
Co-committed-by: sneak <sneak@sneak.berlin>
2026-07-06 23:53:05 +02:00
sneak cc5d877779 TODO (#22)
check / check (push) Successful in 4s
Reviewed-on: #22
Co-authored-by: sneak <sneak@sneak.berlin>
Co-committed-by: sneak <sneak@sneak.berlin>
2026-07-06 21:36:20 +02:00
4b64c213f8 style: strengthen constructor naming and Params struct rules (#19)
check / check (push) Successful in 5s
Per sneak's instruction:

- Constructors **must** be `New()`, `From<Something>()`, or `NewThing()` (multi-type packages only)
- Strongly discourage creative names (`Create`, `Make`, `Build`, `Init`)
- Constructors **must** use a `Params` struct (or `ThingParams`) for 2+ arguments — no exceptions
- Single obvious argument (`ctx`, bytes) is the only exception
- `context.Context` does not count against the argument limit (already documented)

Co-authored-by: user <user@Mac.lan guest wan>
Co-authored-by: clawbot <clawbot@noreply.git.eeqj.de>
Reviewed-on: #19
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-03-20 07:06:03 +01:00
clawbotandclawbot 777822e50e docs: document conditional -v test rerun pattern in REPO_POLICIES.md (#21)
check / check (push) Successful in 8s
## Summary

Adds the conditional verbose test rerun pattern as a policy recommendation in REPO_POLICIES.md.

Per sneak's request from [sneak/chat PR #82](sneak/chat#82): document the pattern where `make test` runs tests without `-v` first, then automatically reruns with `-v` on failure for full diagnostic output.

## Changes

**`prompts/REPO_POLICIES.md`** (root `REPO_POLICIES.md` is a symlink to this):
- Added new policy bullet after the `make test` timeout rule
- Explains the rationale: clean CI/Docker build logs on success, full verbose output on failure
- Includes a generic shell pattern template
- Includes concrete Go and Python examples
- Documents that `exit 1` ensures the target always fails after a rerun (the rerun is solely for diagnostic output)
- Updated `last_modified` from 2026-03-12 to 2026-03-18

## The Pattern

```makefile
test:
	@go test -timeout 30s -race -cover ./... || \
		{ echo "--- Rerunning with -v for details ---"; \
		  go test -timeout 30s -race -v ./...; exit 1; }
```

- **On success**: concise package summaries only, no per-test noise
- **On failure**: automatic verbose rerun shows every test case and assertion
- **Always fails**: `exit 1` ensures the build fails regardless of second run's exit code

closes #20

Co-authored-by: clawbot <clawbot@noreply.git.eeqj.de>
Reviewed-on: #21
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-03-19 22:53:40 +01:00
clawbotanduser 1c84344978 docs: document fail-fast lint stage pattern for Dockerfiles (#18)
check / check (push) Successful in 5s
Documents the multistage Docker build pattern we now use across repos (chat, pixa, etc.) where a separate `lint` stage runs `make fmt-check` and `make lint` independently from the build stage.

Key additions to REPO_POLICIES.md:
- Full Dockerfile template showing the lint → build → runtime stage pattern
- Explanation of `COPY --from=lint /src/go.sum /dev/null` as the BuildKit dependency trick
- Handling `//go:embed` placeholders in the lint stage
- CGO/system library notes for the lint stage
- Clarification that tests run in the build stage, not the lint stage

Reference implementations: `sneak/chat`, `sneak/pixa`.

Co-authored-by: user <user@Mac.lan guest wan>
Reviewed-on: #18
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-03-18 03:59:02 +01:00
41005ecbe5 Add HTTP service hardening policy for 1.0 releases (#17)
check / check (push) Successful in 8s
Closes #16

Adds a comprehensive HTTP/web service security hardening policy to `REPO_POLICIES.md` that must be satisfied before tagging 1.0. The policy covers all items sneak specified (without limitation):

**Security headers** — HSTS (min 1 year, includeSubDomains), CSP (restrictive `default-src 'self'` baseline), X-Frame-Options / frame-ancestors, X-Content-Type-Options: nosniff, Referrer-Policy, Permissions-Policy.

**Request/response limits** — max request body size on all endpoints, max response size for paginated APIs, ReadTimeout + ReadHeaderTimeout (slowloris defense), WriteTimeout, IdleTimeout, per-handler execution time limits.

**Authentication & session security** — rate limiting on password-based auth (API keys exempt as high-entropy), CSRF tokens on state-mutating forms (header-auth APIs exempt), bcrypt/scrypt/argon2 for passwords, session cookies with HttpOnly + Secure + SameSite.

**Reverse proxy awareness** — true client IP detection via X-Forwarded-For/X-Real-IP with trusted proxy allowlist (never trust unconditionally).

**CORS** — explicit origin allowlist for authenticated endpoints; wildcard only for public unauthenticated read-only APIs.

**Error handling** — no leaking stack traces, SQL queries, file paths, or implementation details to clients.

**TLS** — HSTS and secure cookie flags required regardless of whether the service terminates TLS directly or sits behind a reverse proxy.

The policy is explicitly non-exhaustive (defense-in-depth: "when in doubt, harden").

Also adds corresponding checklist sections to `EXISTING_REPO_CHECKLIST.md` and `NEW_REPO_CHECKLIST.md` so that HTTP hardening is verified during repo setup and 1.0 preparation.

Co-authored-by: user <user@Mac.lan guest wan>
Co-authored-by: clawbot <clawbot@eeqj.de>
Reviewed-on: #17
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-03-11 02:11:32 +01:00
clawbotandclawbot eb6b11ee23 policy: no build artifacts in repos (#15)
check / check (push) Successful in 5s
Add policy rule: build artifacts and code-derived data must not be committed to repos if they can be generated during the build process.

Notable exception: Go protobuf-generated files (`.pb.go`) may be committed because `go get` downloads source but does not execute build steps.

This addresses feedback from sneak/chat PR [#61](sneak/chat#61).

Co-authored-by: clawbot <clawbot@noreply.git.eeqj.de>
Reviewed-on: #15
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-03-10 10:34:57 +01:00
sneak ee4f9039f2 Merge pull request 'Self-apply checklist to LLM prose tells doc' (#14) from self-apply-checklist into main
check / check (push) Successful in 8s
Reviewed-on: #14
2026-03-05 00:33:44 +01:00
user 18173fabc6 self-apply checklist: fix triple, staccato, trailing clause, filler word
check / check (push) Successful in 11s
2026-03-04 15:28:08 -08:00
sneak 68a00dc545 Merge pull request 'Remove unfunny frequency exchange from lol section' (#13) from lol-section-trim into main
check / check (push) Successful in 8s
Reviewed-on: #13
2026-03-05 00:24:36 +01:00
user 533e77ad34 remove unfunny frequency exchange from lol section
check / check (push) Successful in 11s
2026-03-04 15:23:38 -08:00
sneak 492fb85500 Merge pull request 'Fix em-dash examples in checklist + strip frequency persuasion' (#12) from llm-prose-tells-v10 into main
check / check (push) Successful in 8s
Reviewed-on: #12
2026-03-05 00:20:32 +01:00
user 5c02cf8bde use actual em-dashes in checklist examples
check / check (push) Successful in 6s
2026-03-04 15:19:25 -08:00
sneak 3ce000178f Merge pull request 'LLM prose tells: merge adjacent sentences, add checklist items' (#11) from llm-prose-tells-merge-pass into main
check / check (push) Successful in 12s
Reviewed-on: #11
2026-03-05 00:13:49 +01:00
user 771551baed strip all frequency arguments and human comparison persuasion
check / check (push) Successful in 5s
2026-03-04 15:10:26 -08:00
user 720d6ee57c add checklist item: delete redundant paragraph-ending sentences
check / check (push) Successful in 8s
2026-03-04 15:06:56 -08:00
user 5e15d77d8e checklist 15: lead with removing redundant second clause
check / check (push) Successful in 11s
2026-03-04 15:04:42 -08:00
user 2f4f5c9cab merge adjacent sentences, add checklist items 8/9/19 for adjectives, trailing clauses, sentence merging
check / check (push) Successful in 11s
2026-03-04 15:00:25 -08:00
sneak 7eae7dcc6c Merge pull request 'LLM prose tells: fix first paragraph' (#10) from llm-prose-tells-final into main
check / check (push) Successful in 5s
Reviewed-on: #10
2026-03-04 23:47:00 +01:00
user 6401aa482f trim first paragraph
check / check (push) Successful in 11s
2026-03-04 14:45:16 -08:00
user e45ffacd80 restructure first paragraph
check / check (push) Successful in 5s
2026-03-04 14:43:16 -08:00
user c8ad5762ab rewrite first paragraph, add unnecessary elaboration tell
check / check (push) Successful in 3s
2026-03-04 14:42:15 -08:00
sneak e0e607713e Merge pull request 'LLM prose tells: methodical checklist pass' (#9) from llm-prose-tells-checklist-pass into main
check / check (push) Successful in 4s
Reviewed-on: #9
2026-03-04 23:39:14 +01:00
user 3fcc1750ff add unnecessary elaboration tell and checklist item 16
check / check (push) Successful in 5s
2026-03-04 14:37:24 -08:00
user 45b379011d checklist pass: fix staccato bursts, triples, two-clause compounds, hedges
check / check (push) Successful in 8s
2026-03-04 14:36:18 -08:00
clawbotanduser 58d564b641 Update LLM prose tells: new patterns + lol section (#8)
check / check (push) Successful in 3s
Updates LLM_PROSE_TELLS.md with three new patterns (two-clause compound sentence, almost-hedge, unnecessary contrast), the lol section with conversation excerpts, fixes for instances of these patterns throughout, and a bracket escaping fix for prettier idempotency. Checklist is now 24 items.

Co-authored-by: user <user@Mac.lan guest wan>
Reviewed-on: #8
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-03-04 23:29:51 +01:00
sneak a1052b758f Merge pull request 'Add LLM prose tells reference and copyediting checklist' (#7) from add-llm-prose-tells into main
check / check (push) Successful in 4s
Reviewed-on: #7
2026-03-04 23:03:15 +01:00
user a2dd953601 fmt: format REPO_POLICIES.md per prettier
check / check (push) Successful in 8s
2026-03-04 14:02:09 -08:00
user f921dee839 add LLM prose tells reference and copyediting checklist
check / check (push) Failing after 10s
2026-03-04 14:00:45 -08:00
sneak a1ffb1591b Merge pull request 'REPO_POLICIES: expand pre-1.0 schema migration rule (closes #5)' (#6) from clawbot/prompts:pre-1.0-migration-rule into main
check / check (push) Failing after 10s
Reviewed-on: #6
2026-02-28 17:02:14 +01:00
clawbot 699f97d093 REPO_POLICIES: expand pre-1.0 schema migration rule (closes #5) 2026-02-28 07:59:27 -08:00
sneak 1955922857 Merge pull request 'fix: formatting + add clawpub reference' (#4) from clawbot/prompts:fix/formatting-and-readme into main
check / check (push) Successful in 11s
Reviewed-on: #4
2026-02-28 11:45:56 +01:00
clawbot a8cf966df6 docs: add clawpub reference in See Also section 2026-02-28 02:33:50 -08:00
clawbot dcb6ca4339 fmt: fix prettier formatting in CODE_STYLEGUIDE_GO.md 2026-02-28 02:33:50 -08:00
sneak dda0d01faa Merge pull request 'style(go): add rule against type-only packages (per upaas #126 review)' (#2) from clawbot/prompts:add-no-type-only-packages-rule into main
check / check (push) Failing after 6s
Reviewed-on: #2
2026-02-23 22:14:02 +01:00
user 7676ec16c3 style(go): add Stringer rule for custom string-based types 2026-02-23 11:56:16 -08:00
user f9dcef4c9e style(go): add rule against type-only packages
Types should live alongside their implementations, not in separate
'types', 'domain', or 'models' packages. Type-only packages cause
alias imports and indicate poor package design.

Prompted by review feedback on upaas PR #126.
2026-02-23 11:47:50 -08:00
sneak 189e54862e Add template repos section to README
check / check (push) Successful in 7s
2026-02-23 01:38:38 +07:00
sneak 05fe766c62 Improve quickstart commands with two-pass workflow
check / check (push) Successful in 4s
Split quickstart into separate repo-policy and code-style passes, clone
prompts repo once instead of per-command, and make each prompt
self-contained so agents don't need memory of prior runs.
2026-02-23 00:33:15 +07:00
sneak cb5d630158 add note about makefile being authoritative docs
check / check (push) Successful in 8s
2026-02-23 00:09:13 +07:00
sneak b5575b9f59 Add test requirements to checklists, .dockerignore URLs, root symlink, and Makefile comment
check / check (push) Successful in 7s
- Add test requirement item to both checklists (must not be a no-op)
- Add .dockerignore template URL to Dockerfile items in both checklists
- Add REPO_POLICIES.md symlink in repo root pointing to prompts/
- Add comment to Makefile explaining why prettier flags are repeated
2026-02-22 17:21:42 +01:00
sneak e97b48eea4 Fix review issues: front matter, headings, consistency, typos
check / check (push) Successful in 9s
- Move title and last_modified to YAML front matter (all policy docs)
- Make all document sections H1, subsections H2
- Update version rule to reference front matter format
- Fix "our" → "your" typo in Go styleguide
- Fix Python styleguide numbering (2. → 1.)
- Fix README: "flat collection" → accurate description, remove stale TODO
- Remove Makefile items from code styleguides (repo stuff, not code),
  add note linking to Repository Policies
- Change zerolog → slog in Go styleguide
- Fix JS styleguide npm reference: both work, but use make targets
- Drop .json from healthcheck path, add JSON content-type requirement
- Add Author/License to Go HTTP Server Conventions
- Convert hyperlinks to backtick URLs in checklists for consistency
- Add version/front matter to both checklists
2026-02-22 17:15:06 +01:00
sneak 3768b8ca02 Add rule: all software repos must have tests
check / check (push) Successful in 7s
Require at least minimal tests (e.g. import/compile check) using the
platform-standard test framework. make test must never be a no-op.
2026-02-22 16:56:03 +01:00
sneak 03bf0b8445 Add authoritative URLs to checklists and copy .golangci.yml
check / check (push) Successful in 7s
- Add .golangci.yml from upaas as authoritative copy in this repo
- Update REPO_POLICIES.md to reference .golangci.yml by URL
- Add fetch URLs for all template files in both checklists:
  .gitignore, .editorconfig, Makefile, .prettierrc, .prettierignore,
  REPO_POLICIES.md, .golangci.yml, check.yml
2026-02-22 16:52:33 +01:00
sneak 3a5ac2d72f Fix typo and match second quickstart example to first
check / check (push) Successful in 7s
- Fix "do you work" → "do your work"
- Reformat new-repo quickstart to use same multi-line style
2026-02-22 16:47:12 +01:00
sneak 00c21cc5c5 Fix heading, scope, version placement, and consistency across policy docs
- Rename REPO_POLICIES.md heading from "Development Policies" to
  "Repository Policies" to distinguish from code styleguides
- Move version line above heading per convention
- Add scope statement and links to code styleguide documents
- Add missing Makefile and LICENSE to minimum files list
- Add version lines to all cross-project docs (CODE_STYLEGUIDE*.md,
  GO_HTTP_SERVER_CONVENTIONS.md)
- Clean up CODE_STYLEGUIDE.md heading (was old repo name)
- Update EXISTING_REPO_CHECKLIST.md link text to match new heading
2026-02-22 16:40:34 +01:00