Compare commits
2
Commits
4a0d49b8e0
...
bffb2fbbfd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bffb2fbbfd | ||
|
|
3c1b435990 |
@@ -21,6 +21,17 @@ fmt-check, and commit.
|
|||||||
|
|
||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
|
- 2026-10-04: `REPO_POLICIES.md` now states that guidance for coding agents
|
||||||
|
lives in one `AGENTS.md` at the repository root, never under a file or
|
||||||
|
directory named after one agent tool and never in separate memory files (issue
|
||||||
|
31). This retires the rule, still present in older vendored copies, that kept
|
||||||
|
agent memory as committed files under `.claude/memory/`. `AGENTS.md` joins the
|
||||||
|
list of files allowed in the root, and both checklists say so.
|
||||||
|
- 2026-10-04: The Makefile examples in the Go styleguide and the HTTP server
|
||||||
|
conventions now fall back to `dev` when `git describe` prints nothing (outside
|
||||||
|
a git checkout, or where git is missing or refuses the checkout), instead of
|
||||||
|
stamping an empty version (issue 74). The canonical `Dockerfile` already fails
|
||||||
|
on a `dev` version when `.git` is in the build context.
|
||||||
- 2026-10-04: The canonical `.dockerignore` now also keeps out each submodule's
|
- 2026-10-04: The canonical `.dockerignore` now also keeps out each submodule's
|
||||||
`config` (issue 75). A submodule's git directory lives under `.git/modules/`,
|
`config` (issue 75). A submodule's git directory lives under `.git/modules/`,
|
||||||
nested again for its own submodules, and its `config` can hold a credential
|
nested again for its own submodules, and its `config` can hold a credential
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Code Styleguide — Go
|
title: Code Styleguide — Go
|
||||||
last_modified: 2026-10-02
|
last_modified: 2026-10-04
|
||||||
---
|
---
|
||||||
|
|
||||||
1. Try to hard wrap long lines at 77 characters or less.
|
1. Try to hard wrap long lines at 77 characters or less.
|
||||||
@@ -51,8 +51,10 @@ last_modified: 2026-10-02
|
|||||||
# ?= rather than := so that a `VERSION` build argument takes precedence:
|
# ?= rather than := so that a `VERSION` build argument takes precedence:
|
||||||
# where a build stage invokes make, `ARG VERSION` puts it in the
|
# where a build stage invokes make, `ARG VERSION` puts it in the
|
||||||
# environment and `?=` defers to it. Otherwise `git describe` runs, in a
|
# environment and `?=` defers to it. Otherwise `git describe` runs, in a
|
||||||
# build stage on the `.git` the build context carries.
|
# build stage on the `.git` the build context carries. When it prints
|
||||||
VERSION ?= $(shell git describe --tags --always)
|
# nothing (outside a git checkout, or where git is missing or refuses the
|
||||||
|
# checkout), the version falls back to `dev`.
|
||||||
|
VERSION ?= $(or $(shell git describe --tags --always 2>/dev/null),dev)
|
||||||
|
|
||||||
GOLDFLAGS += -X main.Version=$(VERSION)
|
GOLDFLAGS += -X main.Version=$(VERSION)
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ with your task.
|
|||||||
- [ ] `LICENSE` file exists and matches the README
|
- [ ] `LICENSE` file exists and matches the README
|
||||||
- [ ] `REPO_POLICIES.md` exists and version date is current — fetch from
|
- [ ] `REPO_POLICIES.md` exists and version date is current — fetch from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/REPO_POLICIES.md`
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/REPO_POLICIES.md`
|
||||||
|
- [ ] Guidance for coding agents, if the repo has any, is one `AGENTS.md` at the
|
||||||
|
root — never a file or directory named after one agent tool, such as
|
||||||
|
`CLAUDE.md` or `.claude/`, and never separate memory files. Move what any
|
||||||
|
such committed file says into `AGENTS.md` and delete it.
|
||||||
- [ ] `.gitignore` is comprehensive (OS, editor, agent scratch, language
|
- [ ] `.gitignore` is comprehensive (OS, editor, agent scratch, language
|
||||||
artifacts, secrets) — fetch from
|
artifacts, secrets) — fetch from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitignore` if missing.
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitignore` if missing.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Go HTTP Server Conventions
|
title: Go HTTP Server Conventions
|
||||||
last_modified: 2026-10-02
|
last_modified: 2026-10-04
|
||||||
---
|
---
|
||||||
|
|
||||||
This document defines the architectural patterns, design decisions, and
|
This document defines the architectural patterns, design decisions, and
|
||||||
@@ -987,8 +987,10 @@ Use ldflags to inject version information at build time:
|
|||||||
# ?= rather than := so that a `VERSION` build argument takes precedence:
|
# ?= rather than := so that a `VERSION` build argument takes precedence:
|
||||||
# where a build stage invokes make, `ARG VERSION` puts it in the
|
# where a build stage invokes make, `ARG VERSION` puts it in the
|
||||||
# environment and `?=` defers to it. Otherwise `git describe` runs, in a
|
# environment and `?=` defers to it. Otherwise `git describe` runs, in a
|
||||||
# build stage on the `.git` the build context carries.
|
# build stage on the `.git` the build context carries. When it prints
|
||||||
VERSION ?= $(shell git describe --tags --always)
|
# nothing (outside a git checkout, or where git is missing or refuses the
|
||||||
|
# checkout), the version falls back to `dev`.
|
||||||
|
VERSION ?= $(or $(shell git describe --tags --always 2>/dev/null),dev)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -ldflags "-X main.Version=$(VERSION)" ./cmd/httpd
|
go build -ldflags "-X main.Version=$(VERSION)" ./cmd/httpd
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ Template files can be fetched from:
|
|||||||
- [ ] `LICENSE` file matching the chosen license
|
- [ ] `LICENSE` file matching the chosen license
|
||||||
- [ ] `REPO_POLICIES.md` — fetch from
|
- [ ] `REPO_POLICIES.md` — fetch from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/REPO_POLICIES.md`
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/REPO_POLICIES.md`
|
||||||
|
- [ ] Guidance for coding agents, if the repo has any, is one `AGENTS.md` at the
|
||||||
|
root — never a file or directory named after one agent tool, such as
|
||||||
|
`CLAUDE.md` or `.claude/`, and never separate memory files
|
||||||
- [ ] `Dockerfile` and `.dockerignore` — fetch `.dockerignore` from
|
- [ ] `Dockerfile` and `.dockerignore` — fetch `.dockerignore` from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.dockerignore`
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.dockerignore`
|
||||||
- Extend `.dockerignore` with the repo's own host-built artifacts, giving
|
- Extend `.dockerignore` with the repo's own host-built artifacts, giving
|
||||||
|
|||||||
@@ -605,10 +605,10 @@ style conventions are in separate documents:
|
|||||||
settings.
|
settings.
|
||||||
|
|
||||||
- Avoid putting files in the repo root unless necessary. Root should contain
|
- Avoid putting files in the repo root unless necessary. Root should contain
|
||||||
only project-level config files (`README.md`, `Makefile`, `Dockerfile`,
|
only project-level config files (`README.md`, `AGENTS.md`, `Makefile`,
|
||||||
`LICENSE`, `.gitignore`, `.editorconfig`, `REPO_POLICIES.md`, and
|
`Dockerfile`, `LICENSE`, `.gitignore`, `.editorconfig`, `REPO_POLICIES.md`,
|
||||||
language-specific config). Everything else goes in a subdirectory. Canonical
|
and language-specific config). Everything else goes in a subdirectory.
|
||||||
subdirectory names:
|
Canonical subdirectory names:
|
||||||
- `bin/` — executable scripts and tools
|
- `bin/` — executable scripts and tools
|
||||||
- `cmd/` — Go command entrypoints; thin only: one `main.go` per binary whose
|
- `cmd/` — Go command entrypoints; thin only: one `main.go` per binary whose
|
||||||
body is a single call into `internal/` or `pkg/`, no project logic in
|
body is a single call into `internal/` or `pkg/`, no project logic in
|
||||||
@@ -639,3 +639,9 @@ style conventions are in separate documents:
|
|||||||
- Go: `go.mod`, `go.sum`, `.golangci.yml`
|
- Go: `go.mod`, `go.sum`, `.golangci.yml`
|
||||||
- JS: `package.json`, `yarn.lock`, `.prettierrc`, `.prettierignore`
|
- JS: `package.json`, `yarn.lock`, `.prettierrc`, `.prettierignore`
|
||||||
- Python: `pyproject.toml`
|
- Python: `pyproject.toml`
|
||||||
|
|
||||||
|
- Guidance for coding agents lives in one `AGENTS.md` at the repository root,
|
||||||
|
including anything an agent should remember about the repo from one session to
|
||||||
|
the next. It is never committed under a file or directory named after one
|
||||||
|
agent tool, such as `CLAUDE.md` or `.claude/`, and never split into separate
|
||||||
|
memory files.
|
||||||
|
|||||||
Reference in New Issue
Block a user