From 430964ceaca9c32309caf62352a658cd67e336f9 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Tue, 27 Oct 2026 18:49:49 +0100 Subject: [PATCH] Add API_POLICIES.md (closes #137) prompts/API_POLICIES.md states sneak's rule from https://git.eeqj.de/sneak/routewatch/issues/199: a value in an API response is never a string with a label or unit in it. A native value is sent as that type, with its unit in the field name. The list at the top of REPO_POLICIES.md and the two code style commands in the README now name the new file. Model: opus-5-5 --- README.md | 12 ++++++------ TODO.md | 5 +++++ prompts/API_POLICIES.md | 20 ++++++++++++++++++++ prompts/REPO_POLICIES.md | 3 ++- 4 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 prompts/API_POLICIES.md diff --git a/README.md b/README.md index 7479b61..cc9496d 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ new repo file added, etc.)." **Code style and conventions:** ```bash -claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever -language-specific styleguides in $TD/prompts/ apply to this repo -(CODE_STYLEGUIDE_GO.md, CODE_STYLEGUIDE_JS.md, CODE_STYLEGUIDE_PYTHON.md, +claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever other +documents in $TD/prompts/ apply to this repo (API_POLICIES.md, +CODE_STYLEGUIDE_GO.md, CODE_STYLEGUIDE_JS.md, CODE_STYLEGUIDE_PYTHON.md, GO_HTTP_SERVER_CONVENTIONS.md). Then review the application code in this repo and bring it into compliance with those coding standards. Your scope is application code structure and style: naming, patterns, error @@ -79,9 +79,9 @@ one for linter fixes, one for README, one for each new repo file, etc.)." **Code style and conventions:** ```bash -claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever -language-specific styleguides in $TD/prompts/ apply to this repo -(CODE_STYLEGUIDE_GO.md, CODE_STYLEGUIDE_JS.md, CODE_STYLEGUIDE_PYTHON.md, +claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever other +documents in $TD/prompts/ apply to this repo (API_POLICIES.md, +CODE_STYLEGUIDE_GO.md, CODE_STYLEGUIDE_JS.md, CODE_STYLEGUIDE_PYTHON.md, GO_HTTP_SERVER_CONVENTIONS.md). Then review the application code in this repo and bring it into compliance with those coding standards. Your scope is application code structure and style: naming, patterns, error diff --git a/TODO.md b/TODO.md index 4022afa..950d6fc 100644 --- a/TODO.md +++ b/TODO.md @@ -21,6 +21,11 @@ fmt-check, and commit. # Completed Steps +- 2026-10-27: Added `prompts/API_POLICIES.md` + (https://git.eeqj.de/sneak/prompts/issues/137). It holds sneak's rule from + https://git.eeqj.de/sneak/routewatch/issues/199 that a value in an API + response is never a string with a label or unit in it. `REPO_POLICIES.md` and + the code style commands in the README name the new file. - 2026-10-21: Check builds may now also keep the Python packages a `test` phase installs from `Pipfile.lock` (issue 133), on sneak's ruling in https://git.eeqj.de/sneak/rfscan/issues/80#issuecomment-153437. The install diff --git a/prompts/API_POLICIES.md b/prompts/API_POLICIES.md new file mode 100644 index 0000000..6dd6f73 --- /dev/null +++ b/prompts/API_POLICIES.md @@ -0,0 +1,20 @@ +--- +title: API Policies +last_modified: 2026-10-27 +--- + +A value in an API response is never a string with a label or unit in it. A value +of a native type is sent as that type, and its unit goes in the field name, for +example `_ms`. + +Wrong: + +```json +{ "execution_time": "0 ms" } +``` + +Right: + +```json +{ "execution_time_ms": 0 } +``` diff --git a/prompts/REPO_POLICIES.md b/prompts/REPO_POLICIES.md index 4051b5f..3e8c97f 100644 --- a/prompts/REPO_POLICIES.md +++ b/prompts/REPO_POLICIES.md @@ -1,6 +1,6 @@ --- title: Repository Policies -last_modified: 2026-10-26 +last_modified: 2026-10-27 --- This document covers repository structure, tooling, and workflow standards. Code @@ -12,6 +12,7 @@ style conventions are in separate documents: - [JavaScript](https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/CODE_STYLEGUIDE_JS.md) - [Python](https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/CODE_STYLEGUIDE_PYTHON.md) - [Go HTTP Server Conventions](https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/GO_HTTP_SERVER_CONVENTIONS.md) +- [API Policies](https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/API_POLICIES.md) ---