57 Commits

Author SHA1 Message Date
41005ecbe5 Add HTTP service hardening policy for 1.0 releases (#17)
All checks were successful
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
eb6b11ee23 policy: no build artifacts in repos (#15)
All checks were successful
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
ee4f9039f2 Merge pull request 'Self-apply checklist to LLM prose tells doc' (#14) from self-apply-checklist into main
All checks were successful
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
All checks were successful
check / check (push) Successful in 11s
2026-03-04 15:28:08 -08:00
68a00dc545 Merge pull request 'Remove unfunny frequency exchange from lol section' (#13) from lol-section-trim into main
All checks were successful
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
All checks were successful
check / check (push) Successful in 11s
2026-03-04 15:23:38 -08:00
492fb85500 Merge pull request 'Fix em-dash examples in checklist + strip frequency persuasion' (#12) from llm-prose-tells-v10 into main
All checks were successful
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
All checks were successful
check / check (push) Successful in 6s
2026-03-04 15:19:25 -08:00
3ce000178f Merge pull request 'LLM prose tells: merge adjacent sentences, add checklist items' (#11) from llm-prose-tells-merge-pass into main
All checks were successful
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
All checks were successful
check / check (push) Successful in 5s
2026-03-04 15:10:26 -08:00
user
720d6ee57c add checklist item: delete redundant paragraph-ending sentences
All checks were successful
check / check (push) Successful in 8s
2026-03-04 15:06:56 -08:00
user
5e15d77d8e checklist 15: lead with removing redundant second clause
All checks were successful
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
All checks were successful
check / check (push) Successful in 11s
2026-03-04 15:00:25 -08:00
7eae7dcc6c Merge pull request 'LLM prose tells: fix first paragraph' (#10) from llm-prose-tells-final into main
All checks were successful
check / check (push) Successful in 5s
Reviewed-on: #10
2026-03-04 23:47:00 +01:00
user
6401aa482f trim first paragraph
All checks were successful
check / check (push) Successful in 11s
2026-03-04 14:45:16 -08:00
user
e45ffacd80 restructure first paragraph
All checks were successful
check / check (push) Successful in 5s
2026-03-04 14:43:16 -08:00
user
c8ad5762ab rewrite first paragraph, add unnecessary elaboration tell
All checks were successful
check / check (push) Successful in 3s
2026-03-04 14:42:15 -08:00
e0e607713e Merge pull request 'LLM prose tells: methodical checklist pass' (#9) from llm-prose-tells-checklist-pass into main
All checks were successful
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
All checks were successful
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
All checks were successful
check / check (push) Successful in 8s
2026-03-04 14:36:18 -08:00
58d564b641 Update LLM prose tells: new patterns + lol section (#8)
All checks were successful
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
a1052b758f Merge pull request 'Add LLM prose tells reference and copyediting checklist' (#7) from add-llm-prose-tells into main
All checks were successful
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
All checks were successful
check / check (push) Successful in 8s
2026-03-04 14:02:09 -08:00
user
f921dee839 add LLM prose tells reference and copyediting checklist
Some checks failed
check / check (push) Failing after 10s
2026-03-04 14:00:45 -08:00
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
Some checks failed
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
1955922857 Merge pull request 'fix: formatting + add clawpub reference' (#4) from clawbot/prompts:fix/formatting-and-readme into main
All checks were successful
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
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
Some checks failed
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
189e54862e Add template repos section to README
All checks were successful
check / check (push) Successful in 7s
2026-02-23 01:38:38 +07:00
05fe766c62 Improve quickstart commands with two-pass workflow
All checks were successful
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
cb5d630158 add note about makefile being authoritative docs
All checks were successful
check / check (push) Successful in 8s
2026-02-23 00:09:13 +07:00
b5575b9f59 Add test requirements to checklists, .dockerignore URLs, root symlink, and Makefile comment
All checks were successful
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
e97b48eea4 Fix review issues: front matter, headings, consistency, typos
All checks were successful
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
3768b8ca02 Add rule: all software repos must have tests
All checks were successful
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
03bf0b8445 Add authoritative URLs to checklists and copy .golangci.yml
All checks were successful
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
3a5ac2d72f Fix typo and match second quickstart example to first
All checks were successful
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
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
f43445caea Add CI policy, strengthen hash-pinning rule, add Gitea Actions workflow
All checks were successful
check / check (push) Successful in 16s
- All Dockerfiles must run make check as a build step
- Every repo needs a Gitea Actions workflow running docker build on push
- Greatly strengthen the hash-pinning rule: explicitly list all reference
  types, ban curl|bash installs, mark as most important rule in document
- Add model .gitea/workflows/check.yml pinned by commit hash
2026-02-22 16:35:42 +01:00
7f4ed7edbd Add quick start one-liners to README
Copy-pasteable commands to bring an existing repo up to standards
or start a new repo from scratch using Claude Code.
2026-02-22 16:29:05 +01:00
d523ff37ae Add code styleguide split into general, Go, JS, and Python files 2026-02-22 16:26:52 +01:00
2ab09985e0 Move prompt markdown files into prompts/ subdirectory
Update all internal URLs to reflect new paths.
2026-02-22 16:20:58 +01:00
5a17686115 Add Go HTTP server conventions 2026-02-22 16:18:52 +01:00
1e6d73e1ea Add formatting-first step to existing repo checklist 2026-02-22 16:13:47 +01:00
d7b8ff30e3 Add prose-wrap policy: hard-wrap markdown at 80 columns
Configure prettier with proseWrap: always. Reformat all markdown
files to conform.
2026-02-22 16:11:49 +01:00
d1a98c2413 Add checklists for existing and new repo setup 2026-02-22 16:10:28 +01:00
06f279fa5b Add security and git policies, make repo a model example
- Never commit secrets; comprehensive .gitignore with fetch URL
- Never force-push to main
- go mod tidy before committing
- make hooks target with Go repo detection
- Add .editorconfig, .prettierrc, .prettierignore
- Template files URL for new repo setup
2026-02-22 16:06:13 +01:00