From 1d8eb305c40a1183a0cb05ef5b75164cac1c32ef Mon Sep 17 00:00:00 2001 From: sneak Date: Sun, 22 Feb 2026 15:56:52 +0100 Subject: [PATCH] Add directory structure and docs prettier policies - Prettier config required for documentation/writing repos - Migrations must live in internal/db/migrations/ and be embedded - Avoid cluttering repo root; canonical subdirectory names listed --- REPO_POLICIES.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/REPO_POLICIES.md b/REPO_POLICIES.md index ea8a294..3538823 100644 --- a/REPO_POLICIES.md +++ b/REPO_POLICIES.md @@ -18,8 +18,10 @@ `make check` (the build should fail if the branch is not green). - Use platform-standard formatters: `black` for Python, `prettier` for - JS/CSS, `go fmt` for Go. Always use default configuration with one - exception: set four-space indents for everything except Go. + JS/CSS/Markdown/HTML, `go fmt` for Go. Always use default configuration + with one exception: set four-space indents for everything except Go. + Documentation and writing repos (Markdown, HTML, CSS) should also have + `.prettierrc` and `.prettierignore`. - Pre-commit hook: `make check` if local testing is possible, otherwise `make lint && make fmt-check`. The Makefile should provide a @@ -80,12 +82,30 @@ - Use SemVer. -- Pre-1.0.0: modify existing migrations (no installed base assumed). - Post-1.0.0: add new migration files. +- Database migrations live in `internal/db/migrations/` and must be + embedded in the binary. Pre-1.0.0: modify existing migrations (no + installed base assumed). Post-1.0.0: add new migration files. - All repos should have an `.editorconfig` enforcing the project's indentation settings. +- Avoid putting files in the repo root unless necessary. Root should + contain only project-level config files (`README.md`, `Makefile`, + `Dockerfile`, `LICENSE`, `.gitignore`, `.editorconfig`, + `REPO_POLICIES.md`, and language-specific config). Everything else + goes in a subdirectory. Canonical subdirectory names: + - `bin/` — executable scripts and tools + - `cmd/` — Go command entrypoints + - `configs/` — configuration templates and examples + - `deploy/` — deployment manifests (k8s, compose, terraform) + - `docs/` — documentation and markdown (README.md stays in root) + - `internal/` — Go internal packages + - `internal/db/migrations/` — database migrations + - `pkg/` — Go library packages + - `share/` — systemd units, data files + - `static/` — static assets (images, fonts, etc.) + - `web/` — web frontend source + - New repos must contain at minimum: - `README.md`, `.git`, `.gitignore`, `.editorconfig` - `REPO_POLICIES.md` (copy from the `prompts` repo)