Add prose-wrap policy: hard-wrap markdown at 80 columns

Configure prettier with proseWrap: always. Reformat all markdown
files to conform.
This commit is contained in:
Jeffrey Paul 2026-02-22 16:11:49 +01:00
parent d1a98c2413
commit d7b8ff30e3
6 changed files with 100 additions and 112 deletions

View File

@ -1,3 +1,4 @@
{ {
"tabWidth": 4 "tabWidth": 4,
"proseWrap": "always"
} }

View File

@ -7,13 +7,13 @@ test:
lint: lint:
@echo "Linting markdown files..." @echo "Linting markdown files..."
@$(PRETTIER) --check '**/*.md' --tab-width 4 @$(PRETTIER) --check '**/*.md' --tab-width 4 --prose-wrap always
fmt: fmt:
@$(PRETTIER) --write '**/*.md' --tab-width 4 @$(PRETTIER) --write '**/*.md' --tab-width 4 --prose-wrap always
fmt-check: fmt-check:
@$(PRETTIER) --check '**/*.md' --tab-width 4 @$(PRETTIER) --check '**/*.md' --tab-width 4 --prose-wrap always
check: test lint fmt-check check: test lint fmt-check

View File

@ -11,21 +11,21 @@ git clone https://github.com/sneak/prompts.git
cd prompts cd prompts
``` ```
Prompts are stored as Markdown files in the repository root. Copy or Prompts are stored as Markdown files in the repository root. Copy or reference
reference them as needed in your projects. them as needed in your projects.
## Rationale ## Rationale
LLM prompts, especially development policies, benefit from version control LLM prompts, especially development policies, benefit from version control and a
and a single authoritative source. This repo provides a central place to single authoritative source. This repo provides a central place to maintain,
maintain, share, and evolve prompts across projects. share, and evolve prompts across projects.
## Design ## Design
The repository is a flat collection of Markdown files. Each file contains The repository is a flat collection of Markdown files. Each file contains one or
one or more related prompts or policy documents. There is no build step or more related prompts or policy documents. There is no build step or runtime
runtime component; the prompts are consumed by copying them into other component; the prompts are consumed by copying them into other projects or
projects or referencing them directly. referencing them directly.
## TODO ## TODO

View File

@ -3,71 +3,68 @@
Version: 2026-02-22 Version: 2026-02-22
- Cross-project documentation (such as this file) must include a - Cross-project documentation (such as this file) must include a
`Version: YYYY-MM-DD` line near the top so it can be kept in sync `Version: YYYY-MM-DD` line near the top so it can be kept in sync with the
with the authoritative source as policies evolve. authoritative source as policies evolve.
- All references to Docker images, Go modules, and packages must use - All references to Docker images, Go modules, and packages must use
cryptographic hashes. Mutable references (tags, `@latest`, etc.) are cryptographic hashes. Mutable references (tags, `@latest`, etc.) are remote
remote code execution vulnerabilities. code execution vulnerabilities.
- Every repo with software must have a root `Makefile` with these targets: - Every repo with software must have a root `Makefile` with these targets:
`make test`, `make lint`, `make fmt` (writes), `make fmt-check` `make test`, `make lint`, `make fmt` (writes), `make fmt-check` (read-only),
(read-only), `make check` (prereqs: `test`, `lint`, `fmt-check`), `make check` (prereqs: `test`, `lint`, `fmt-check`), `make docker`, and
`make docker`, and `make hooks` (installs pre-commit hook). A model `make hooks` (installs pre-commit hook). A model Makefile is at
Makefile is at
`https://git.eeqj.de/sneak/prompts/raw/branch/main/Makefile`. `https://git.eeqj.de/sneak/prompts/raw/branch/main/Makefile`.
- Always use Makefile targets (`make fmt`, `make test`, `make lint`, etc.) - Always use Makefile targets (`make fmt`, `make test`, `make lint`, etc.)
instead of invoking the underlying tools directly. The Makefile is the instead of invoking the underlying tools directly. The Makefile is the single
single source of truth for how these operations are run. source of truth for how these operations are run.
- Every repo should have a `Dockerfile`. For non-server repos, the - Every repo should have a `Dockerfile`. For non-server repos, the Dockerfile
Dockerfile should bring up a development environment and run should bring up a development environment and run `make check` (the build
`make check` (the build should fail if the branch is not green). should fail if the branch is not green).
- Use platform-standard formatters: `black` for Python, `prettier` for - Use platform-standard formatters: `black` for Python, `prettier` for
JS/CSS/Markdown/HTML, `go fmt` for Go. Always use default configuration JS/CSS/Markdown/HTML, `go fmt` for Go. Always use default configuration with
with one exception: set four-space indents for everything except Go. two exceptions: four-space indents (except Go), and `proseWrap: always` for
Documentation and writing repos (Markdown, HTML, CSS) should also have Markdown (hard-wrap at 80 columns). Documentation and writing repos (Markdown,
`.prettierrc` and `.prettierignore`. HTML, CSS) should also have `.prettierrc` and `.prettierignore`.
- Pre-commit hook: `make check` if local testing is possible, otherwise - Pre-commit hook: `make check` if local testing is possible, otherwise
`make lint && make fmt-check`. The Makefile should provide a `make lint && make fmt-check`. The Makefile should provide a `make hooks`
`make hooks` target to install the pre-commit hook. target to install the pre-commit hook.
- `make test` must complete in under 20 seconds. Add a 30-second timeout - `make test` must complete in under 20 seconds. Add a 30-second timeout in the
in the Makefile. Makefile.
- Docker builds must complete in under 5 minutes. - Docker builds must complete in under 5 minutes.
- `make check` must not modify any files in the repo. Tests may use - `make check` must not modify any files in the repo. Tests may use temporary
temporary directories. directories.
- `main` must always pass `make check`, no exceptions. - `main` must always pass `make check`, no exceptions.
- Never commit secrets. `.env` files, credentials, API keys, and - Never commit secrets. `.env` files, credentials, API keys, and private keys
private keys must be in `.gitignore`. No exceptions. must be in `.gitignore`. No exceptions.
- `.gitignore` should be comprehensive from the start: OS files - `.gitignore` should be comprehensive from the start: OS files (`.DS_Store`),
(`.DS_Store`), editor files (`.swp`, `*~`), language build artifacts, editor files (`.swp`, `*~`), language build artifacts, and `node_modules/`.
and `node_modules/`. Fetch the standard `.gitignore` from Fetch the standard `.gitignore` from
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitignore` `https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitignore` when setting up
when setting up a new repo. a new repo.
- Never use `git add -A` or `git add .`. Always stage files explicitly - Never use `git add -A` or `git add .`. Always stage files explicitly by name.
by name.
- Never force-push to `main`. - Never force-push to `main`.
- Make all changes on a feature branch. You can do whatever you want on - Make all changes on a feature branch. You can do whatever you want on a
a feature branch. feature branch.
- `.golangci.yml` is standardized and must _NEVER_ be modified by an - `.golangci.yml` is standardized and must _NEVER_ be modified by an agent, only
agent, only manually by the user. Copy from manually by the user. Copy from `~/dev/upaas/.golangci.yml` if available.
`~/dev/upaas/.golangci.yml` if available.
- When pinning images or packages by hash, add a comment above the - When pinning images or packages by hash, add a comment above the reference
reference with the version and date (YYYY-MM-DD). with the version and date (YYYY-MM-DD).
- Use `yarn`, not `npm`. - Use `yarn`, not `npm`.
@ -75,45 +72,43 @@ Version: 2026-02-22
- Simple projects should be configured with environment variables. - Simple projects should be configured with environment variables.
- Dockerized web services listen on port 8080 by default, overridable - Dockerized web services listen on port 8080 by default, overridable with
with `PORT`. `PORT`.
- `README.md` is the primary documentation. Required sections: - `README.md` is the primary documentation. Required sections:
- **Description**: First line must include the project name, purpose, - **Description**: First line must include the project name, purpose,
category (web server, SPA, CLI tool, etc.), license, and author. category (web server, SPA, CLI tool, etc.), license, and author. Example:
Example: "µPaaS is an MIT-licensed Go web application by @sneak "µPaaS is an MIT-licensed Go web application by @sneak that receives
that receives git-frontend webhooks and deploys applications via git-frontend webhooks and deploys applications via Docker in realtime."
Docker in realtime."
- **Getting Started**: Copy-pasteable install/usage code block. - **Getting Started**: Copy-pasteable install/usage code block.
- **Rationale**: Why does this exist? - **Rationale**: Why does this exist?
- **Design**: How is the program structured? - **Design**: How is the program structured?
- **TODO**: Update meticulously, even between commits. When - **TODO**: Update meticulously, even between commits. When planning, put
planning, put the todo list in the README so a new agent can pick the todo list in the README so a new agent can pick up where the last one
up where the last one left off. left off.
- **License**: MIT, GPL, or WTFPL. Ask the user for new projects. - **License**: MIT, GPL, or WTFPL. Ask the user for new projects. Include a
Include a `LICENSE` file in the repo root and a License section in `LICENSE` file in the repo root and a License section in the README.
the README.
- **Author**: [@sneak](https://sneak.berlin). - **Author**: [@sneak](https://sneak.berlin).
- First commit of a new repo should contain only `README.md`. - First commit of a new repo should contain only `README.md`.
- Go module root: `sneak.berlin/go/<name>`. Always run `go mod tidy` - Go module root: `sneak.berlin/go/<name>`. Always run `go mod tidy` before
before committing. committing.
- Use SemVer. - Use SemVer.
- Database migrations live in `internal/db/migrations/` and must be - Database migrations live in `internal/db/migrations/` and must be embedded in
embedded in the binary. Pre-1.0.0: modify existing migrations (no the binary. Pre-1.0.0: modify existing migrations (no installed base assumed).
installed base assumed). Post-1.0.0: add new migration files. Post-1.0.0: add new migration files.
- All repos should have an `.editorconfig` enforcing the project's - All repos should have an `.editorconfig` enforcing the project's indentation
indentation settings. settings.
- Avoid putting files in the repo root unless necessary. Root should - Avoid putting files in the repo root unless necessary. Root should contain
contain only project-level config files (`README.md`, `Makefile`, only project-level config files (`README.md`, `Makefile`, `Dockerfile`,
`Dockerfile`, `LICENSE`, `.gitignore`, `.editorconfig`, `LICENSE`, `.gitignore`, `.editorconfig`, `REPO_POLICIES.md`, and
`REPO_POLICIES.md`, and language-specific config). Everything else language-specific config). Everything else goes in a subdirectory. Canonical
goes in a subdirectory. Canonical subdirectory names: subdirectory names:
- `bin/` — executable scripts and tools - `bin/` — executable scripts and tools
- `cmd/` — Go command entrypoints - `cmd/` — Go command entrypoints
- `configs/` — configuration templates and examples - `configs/` — configuration templates and examples
@ -126,8 +121,8 @@ Version: 2026-02-22
- `static/` — static assets (images, fonts, etc.) - `static/` — static assets (images, fonts, etc.)
- `web/` — web frontend source - `web/` — web frontend source
- When setting up a new repo, files from the `prompts` repo may be used - When setting up a new repo, files from the `prompts` repo may be used as
as templates. Fetch them from templates. Fetch them from
`https://git.eeqj.de/sneak/prompts/raw/branch/main/<filename>`. `https://git.eeqj.de/sneak/prompts/raw/branch/main/<filename>`.
- New repos must contain at minimum: - New repos must contain at minimum:

View File

@ -1,29 +1,26 @@
# Existing Repo Checklist # Existing Repo Checklist
Use this checklist when beginning work in a repo that may not yet Use this checklist when beginning work in a repo that may not yet conform to our
conform to our
[development policies](https://git.eeqj.de/sneak/prompts/raw/branch/main/REPO_POLICIES.md). [development policies](https://git.eeqj.de/sneak/prompts/raw/branch/main/REPO_POLICIES.md).
Work on a feature branch. Check each item and fix any gaps before Work on a feature branch. Check each item and fix any gaps before proceeding
proceeding with your task. with your task.
## Required Files ## Required Files
- [ ] `README.md` exists with all required sections (Description, - [ ] `README.md` exists with all required sections (Description, Getting
Getting Started, Rationale, Design, TODO, License, Author) Started, Rationale, Design, TODO, License, Author)
- [ ] `LICENSE` file exists and matches the README - [ ] `LICENSE` file exists and matches the README
- [ ] `REPO_POLICIES.md` exists and version date is current with the - [ ] `REPO_POLICIES.md` exists and version date is current with the
[authoritative source](https://git.eeqj.de/sneak/prompts/raw/branch/main/REPO_POLICIES.md) [authoritative source](https://git.eeqj.de/sneak/prompts/raw/branch/main/REPO_POLICIES.md)
- [ ] `.gitignore` is comprehensive (OS, editor, language artifacts, - [ ] `.gitignore` is comprehensive (OS, editor, language artifacts, secrets) —
secrets) — fetch from fetch from `https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitignore`
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitignore`
if missing if missing
- [ ] `.editorconfig` exists - [ ] `.editorconfig` exists
- [ ] `Dockerfile` and `.dockerignore` exist - [ ] `Dockerfile` and `.dockerignore` exist
- [ ] Language-specific config: - [ ] Language-specific config:
- [ ] Go: `go.mod`, `go.sum`, `.golangci.yml` - [ ] Go: `go.mod`, `go.sum`, `.golangci.yml`
- [ ] JS: `package.json`, `yarn.lock`, `.prettierrc`, - [ ] JS: `package.json`, `yarn.lock`, `.prettierrc`, `.prettierignore`
`.prettierignore`
- [ ] Python: `pyproject.toml` - [ ] Python: `pyproject.toml`
- [ ] Docs/writing: `.prettierrc`, `.prettierignore` - [ ] Docs/writing: `.prettierrc`, `.prettierignore`
@ -31,36 +28,32 @@ proceeding with your task.
- [ ] `Makefile` exists in root — reference the - [ ] `Makefile` exists in root — reference the
[model Makefile](https://git.eeqj.de/sneak/prompts/raw/branch/main/Makefile) [model Makefile](https://git.eeqj.de/sneak/prompts/raw/branch/main/Makefile)
- [ ] Has targets: `test`, `lint`, `fmt`, `fmt-check`, `check`, - [ ] Has targets: `test`, `lint`, `fmt`, `fmt-check`, `check`, `docker`,
`docker`, `hooks` `hooks`
- [ ] `make check` does not modify any files in the repo - [ ] `make check` does not modify any files in the repo
- [ ] `make test` has a 30-second timeout - [ ] `make test` has a 30-second timeout
- [ ] `make check` passes on current branch - [ ] `make check` passes on current branch
## Formatting ## Formatting
- [ ] Platform-standard formatter is configured (`black`, `prettier`, - [ ] Platform-standard formatter is configured (`black`, `prettier`, `go fmt`)
`go fmt`) - [ ] Default formatter config, only exception: four-space indents (except Go)
- [ ] Default formatter config, only exception: four-space indents
(except Go)
- [ ] All files pass `make fmt-check` - [ ] All files pass `make fmt-check`
## Git Hygiene ## Git Hygiene
- [ ] Pre-commit hook is installed (`make hooks`) - [ ] Pre-commit hook is installed (`make hooks`)
- [ ] No secrets in the repo (`.env`, keys, credentials) - [ ] No secrets in the repo (`.env`, keys, credentials)
- [ ] No mutable references in Dockerfiles or scripts (tags, - [ ] No mutable references in Dockerfiles or scripts (tags, `@latest`) — all
`@latest`) — all pinned by cryptographic hash with version/date pinned by cryptographic hash with version/date comment
comment
- [ ] Using `yarn`, not `npm` (JS projects) - [ ] Using `yarn`, not `npm` (JS projects)
## Directory Structure ## Directory Structure
- [ ] No unnecessary files in repo root - [ ] No unnecessary files in repo root
- [ ] Files organized into canonical subdirectories (`bin/`, `cmd/`, - [ ] Files organized into canonical subdirectories (`bin/`, `cmd/`, `docs/`,
`docs/`, `internal/`, `static/`, etc.) `internal/`, `static/`, etc.)
- [ ] Go migrations in `internal/db/migrations/` and embedded in - [ ] Go migrations in `internal/db/migrations/` and embedded in binary
binary
## Final ## Final

View File

@ -1,7 +1,7 @@
# New Repo Checklist # New Repo Checklist
Use this checklist when creating a new repository from scratch. Follow Use this checklist when creating a new repository from scratch. Follow the steps
the steps in order. Full policies are at: in order. Full policies are at:
`https://git.eeqj.de/sneak/prompts/raw/branch/main/REPO_POLICIES.md` `https://git.eeqj.de/sneak/prompts/raw/branch/main/REPO_POLICIES.md`
Template files can be fetched from: Template files can be fetched from:
@ -30,11 +30,11 @@ Template files can be fetched from:
### Fetch Template Files ### Fetch Template Files
- [ ] `.gitignore` — fetch from prompts repo, extend for - [ ] `.gitignore` — fetch from prompts repo, extend for language-specific
language-specific artifacts artifacts
- [ ] `.editorconfig` — fetch from prompts repo - [ ] `.editorconfig` — fetch from prompts repo
- [ ] `Makefile` — fetch from prompts repo, adapt targets for the - [ ] `Makefile` — fetch from prompts repo, adapt targets for the project's
project's language and tools language and tools
- [ ] For JS/docs repos: `.prettierrc`, `.prettierignore` - [ ] For JS/docs repos: `.prettierrc`, `.prettierignore`
### Create Project Files ### Create Project Files
@ -46,8 +46,8 @@ Template files can be fetched from:
- Non-server: brings up dev environment and runs `make check` - Non-server: brings up dev environment and runs `make check`
- Image pinned by sha256 hash with version/date comment - Image pinned by sha256 hash with version/date comment
- [ ] Language-specific: - [ ] Language-specific:
- [ ] Go: `go mod init sneak.berlin/go/<name>`, `.golangci.yml` - [ ] Go: `go mod init sneak.berlin/go/<name>`, `.golangci.yml` (copy from
(copy from `~/dev/upaas/.golangci.yml`) `~/dev/upaas/.golangci.yml`)
- [ ] JS: `yarn init`, `yarn add --dev prettier` - [ ] JS: `yarn init`, `yarn add --dev prettier`
- [ ] Python: `pyproject.toml` - [ ] Python: `pyproject.toml`
@ -57,8 +57,7 @@ Template files can be fetched from:
- [ ] `make lint` — runs linter - [ ] `make lint` — runs linter
- [ ] `make fmt` — formats code (writes) - [ ] `make fmt` — formats code (writes)
- [ ] `make fmt-check` — checks formatting (read-only) - [ ] `make fmt-check` — checks formatting (read-only)
- [ ] `make check` — prereqs: `test`, `lint`, `fmt-check`; must not - [ ] `make check` — prereqs: `test`, `lint`, `fmt-check`; must not modify files
modify files
- [ ] `make docker` — builds Docker image - [ ] `make docker` — builds Docker image
- [ ] `make hooks` — installs pre-commit hook - [ ] `make hooks` — installs pre-commit hook