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
This commit is contained in:
Jeffrey Paul 2026-02-22 15:56:52 +01:00
parent 16afdb8113
commit 1d8eb305c4

View File

@ -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)