Add API_POLICIES.md (closes #137) #138

Merged
clawbot merged 1 commits from issue-137-api-policies into next 2026-10-27 18:49:49 +01:00
4 changed files with 33 additions and 7 deletions
+6 -6
View File
@@ -37,9 +37,9 @@ new repo file added, etc.)."
**Code style and conventions:** **Code style and conventions:**
```bash ```bash
claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever other
language-specific styleguides in $TD/prompts/ apply to this repo documents in $TD/prompts/ apply to this repo (API_POLICIES.md,
(CODE_STYLEGUIDE_GO.md, CODE_STYLEGUIDE_JS.md, CODE_STYLEGUIDE_PYTHON.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 GO_HTTP_SERVER_CONVENTIONS.md). Then review the application code in this
repo and bring it into compliance with those coding standards. Your scope repo and bring it into compliance with those coding standards. Your scope
is application code structure and style: naming, patterns, error 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:** **Code style and conventions:**
```bash ```bash
claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever other
language-specific styleguides in $TD/prompts/ apply to this repo documents in $TD/prompts/ apply to this repo (API_POLICIES.md,
(CODE_STYLEGUIDE_GO.md, CODE_STYLEGUIDE_JS.md, CODE_STYLEGUIDE_PYTHON.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 GO_HTTP_SERVER_CONVENTIONS.md). Then review the application code in this
repo and bring it into compliance with those coding standards. Your scope repo and bring it into compliance with those coding standards. Your scope
is application code structure and style: naming, patterns, error is application code structure and style: naming, patterns, error
+5
View File
@@ -21,6 +21,11 @@ fmt-check, and commit.
# Completed Steps # 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 - 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 installs from `Pipfile.lock` (issue 133), on sneak's ruling in
https://git.eeqj.de/sneak/rfscan/issues/80#issuecomment-153437. The install https://git.eeqj.de/sneak/rfscan/issues/80#issuecomment-153437. The install
+20
View File
@@ -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 }
```
+2 -1
View File
@@ -1,6 +1,6 @@
--- ---
title: Repository Policies title: Repository Policies
last_modified: 2026-10-26 last_modified: 2026-10-27
--- ---
This document covers repository structure, tooling, and workflow standards. Code 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) - [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) - [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) - [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)
--- ---