The canonical scripts-to-rule-them-all templates in the prompts repo run prettier over Markdown:
script/fmt: yarn run prettier --write '**/*.md' --tab-width 4 --prose-wrap always
script/fmt-check: the same with --check
sfdupes replaced both bodies with gofmt only (script/fmt:9 is gofmt -s -w .; script/fmt-check:10-15 is gofmt -s -l .). Markdown formatting was dropped entirely rather than added alongside the Go formatting, and there is no .prettierrc or .prettierignore in the repo.
Consequences: make fmt cannot format this repo's Markdown, make fmt-check cannot catch unformatted Markdown, and make check passes on a README that violates the house 4-space / proseWrap: always / 80-column settings. Every Markdown change in this repo — and there are many, since the README is the authoritative specification — is currently unformatted by policy standards and nothing detects it.
Definition of done
.prettierrc and .prettierignore are copied verbatim from the prompts repo root (.prettierrc sha256 1a709149f32ac4adf4004017cf30d8f5482ccf263f414081ae8c499037691133, .prettierignore sha256 dbe0186431d09e741fe0ccddf3ac97451575ab88f94fe89353dc2e3ecb83d64b).
script/fmt runs gofmt and prettier over Markdown; script/fmt-check checks both, reporting each independently so it is clear which failed.
script/bootstrap installs prettier, pinned by hash per REPO_POLICIES — no curl | bash, no floating tag. Note the canonical template invokes it via yarn; decide and document how it is obtained here given this is a Go repo with no package.json, and keep the pinning rule intact.
The Dockerfile lint stage can still run make fmt-check, or the Markdown check is placed where CI genuinely runs it — do not let the check exist only on developer machines.
All existing Markdown in the repo is reformatted to comply, in this same commit.
make check green (including the new Markdown check) and make docker succeeds.
The canonical scripts-to-rule-them-all templates in the `prompts` repo run prettier over Markdown:
- `script/fmt`: `yarn run prettier --write '**/*.md' --tab-width 4 --prose-wrap always`
- `script/fmt-check`: the same with `--check`
sfdupes replaced both bodies with gofmt only (`script/fmt:9` is `gofmt -s -w .`; `script/fmt-check:10-15` is `gofmt -s -l .`). Markdown formatting was dropped entirely rather than added alongside the Go formatting, and there is no `.prettierrc` or `.prettierignore` in the repo.
Consequences: `make fmt` cannot format this repo's Markdown, `make fmt-check` cannot catch unformatted Markdown, and `make check` passes on a README that violates the house 4-space / `proseWrap: always` / 80-column settings. Every Markdown change in this repo — and there are many, since the README is the authoritative specification — is currently unformatted by policy standards and nothing detects it.
## Definition of done
1. `.prettierrc` and `.prettierignore` are copied verbatim from the `prompts` repo root (`.prettierrc` sha256 `1a709149f32ac4adf4004017cf30d8f5482ccf263f414081ae8c499037691133`, `.prettierignore` sha256 `dbe0186431d09e741fe0ccddf3ac97451575ab88f94fe89353dc2e3ecb83d64b`).
2. `script/fmt` runs gofmt **and** prettier over Markdown; `script/fmt-check` checks both, reporting each independently so it is clear which failed.
3. `script/bootstrap` installs prettier, pinned by hash per REPO_POLICIES — no `curl | bash`, no floating tag. Note the canonical template invokes it via `yarn`; decide and document how it is obtained here given this is a Go repo with no `package.json`, and keep the pinning rule intact.
4. The Dockerfile lint stage can still run `make fmt-check`, or the Markdown check is placed where CI genuinely runs it — do not let the check exist only on developer machines.
5. All existing Markdown in the repo is reformatted to comply, in this same commit.
6. `make check` green (including the new Markdown check) and `make docker` succeeds.
clawbot
added this to the 1.0.0 milestone 2026-08-09 03:46:42 +02:00
Plan (implementer's brief). The pushed branch issue-19-markdown-fmt is stale (written before the containerised lint and the build-stage changes); start fresh from next and reuse from it only what still fits.
Same rule as the linter (#46): prettier runs in a container, never installed on the host. script/fmt and script/fmt-check run it through docker run of a digest-pinned node image with the repo mounted, the way script/lint runs the linter; gofmt stays as it is. Prettier itself is pinned by hash through package.json and yarn.lock (yarn install --frozen-lockfile inside the container), per REPO_POLICIES.md. If another of sneak's Go repos already formats Markdown this way, follow it and name it in the PR.
Item 4: CI must run the Markdown check. A docker build cannot run docker, so the check goes in its own Dockerfile stage on the same pinned node image, ordered like the lint stage; keep the existing gate layers and CHECK_EPOCH behaviour, and keep the build-time gains from #43.
.prettierrc and .prettierignore verbatim from the prompts repo (item 1 hashes).
Item 5: reformat all Markdown in the same commit with make fmt; no hand edits to the reformatted text.
Wrap each Docker build in timeout -s INT 900 inside flock -w 3600 /srv/code/tmp/docker-gate.lock; remove images and containers you create. PR body: a cold and a warm script/cibuild time, one line each.
Model: opus-5-5
Plan (implementer's brief). The pushed branch `issue-19-markdown-fmt` is stale (written before the containerised lint and the build-stage changes); start fresh from `next` and reuse from it only what still fits.
- Same rule as the linter (https://git.eeqj.de/sneak/sfdupes/issues/46): prettier runs in a container, never installed on the host. `script/fmt` and `script/fmt-check` run it through `docker run` of a digest-pinned node image with the repo mounted, the way `script/lint` runs the linter; `gofmt` stays as it is. Prettier itself is pinned by hash through `package.json` and `yarn.lock` (`yarn install --frozen-lockfile` inside the container), per `REPO_POLICIES.md`. If another of sneak's Go repos already formats Markdown this way, follow it and name it in the PR.
- Item 4: CI must run the Markdown check. A `docker build` cannot run `docker`, so the check goes in its own `Dockerfile` stage on the same pinned node image, ordered like the lint stage; keep the existing gate layers and `CHECK_EPOCH` behaviour, and keep the build-time gains from https://git.eeqj.de/sneak/sfdupes/issues/43.
- `.prettierrc` and `.prettierignore` verbatim from the `prompts` repo (item 1 hashes).
- Item 5: reformat all Markdown in the same commit with `make fmt`; no hand edits to the reformatted text.
- Wrap each Docker build in `timeout -s INT 900` inside `flock -w 3600 /srv/code/tmp/docker-gate.lock`; remove images and containers you create. PR body: a cold and a warm `script/cibuild` time, one line each.
Model: opus-5-5
clawbot
self-assigned this 2026-10-04 10:01:51 +02:00
Implemented in #84: prettier runs in Docker from a new Dockerfile stage, for make fmt, make fmt-check and CI alike, and all Markdown is reformatted.
Model: opus-5-5
Implemented in https://git.eeqj.de/sneak/sfdupes/pulls/84: prettier runs in Docker from a new `Dockerfile` stage, for `make fmt`, `make fmt-check` and CI alike, and all Markdown is reformatted.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The canonical scripts-to-rule-them-all templates in the
promptsrepo run prettier over Markdown:script/fmt:yarn run prettier --write '**/*.md' --tab-width 4 --prose-wrap alwaysscript/fmt-check: the same with--checksfdupes replaced both bodies with gofmt only (
script/fmt:9isgofmt -s -w .;script/fmt-check:10-15isgofmt -s -l .). Markdown formatting was dropped entirely rather than added alongside the Go formatting, and there is no.prettierrcor.prettierignorein the repo.Consequences:
make fmtcannot format this repo's Markdown,make fmt-checkcannot catch unformatted Markdown, andmake checkpasses on a README that violates the house 4-space /proseWrap: always/ 80-column settings. Every Markdown change in this repo — and there are many, since the README is the authoritative specification — is currently unformatted by policy standards and nothing detects it.Definition of done
.prettierrcand.prettierignoreare copied verbatim from thepromptsrepo root (.prettierrcsha2561a709149f32ac4adf4004017cf30d8f5482ccf263f414081ae8c499037691133,.prettierignoresha256dbe0186431d09e741fe0ccddf3ac97451575ab88f94fe89353dc2e3ecb83d64b).script/fmtruns gofmt and prettier over Markdown;script/fmt-checkchecks both, reporting each independently so it is clear which failed.script/bootstrapinstalls prettier, pinned by hash per REPO_POLICIES — nocurl | bash, no floating tag. Note the canonical template invokes it viayarn; decide and document how it is obtained here given this is a Go repo with nopackage.json, and keep the pinning rule intact.make fmt-check, or the Markdown check is placed where CI genuinely runs it — do not let the check exist only on developer machines.make checkgreen (including the new Markdown check) andmake dockersucceeds.Plan (implementer's brief). The pushed branch
issue-19-markdown-fmtis stale (written before the containerised lint and the build-stage changes); start fresh fromnextand reuse from it only what still fits.script/fmtandscript/fmt-checkrun it throughdocker runof a digest-pinned node image with the repo mounted, the wayscript/lintruns the linter;gofmtstays as it is. Prettier itself is pinned by hash throughpackage.jsonandyarn.lock(yarn install --frozen-lockfileinside the container), perREPO_POLICIES.md. If another of sneak's Go repos already formats Markdown this way, follow it and name it in the PR.docker buildcannot rundocker, so the check goes in its ownDockerfilestage on the same pinned node image, ordered like the lint stage; keep the existing gate layers andCHECK_EPOCHbehaviour, and keep the build-time gains from #43..prettierrcand.prettierignoreverbatim from thepromptsrepo (item 1 hashes).make fmt; no hand edits to the reformatted text.timeout -s INT 900insideflock -w 3600 /srv/code/tmp/docker-gate.lock; remove images and containers you create. PR body: a cold and a warmscript/cibuildtime, one line each.Model: opus-5-5
Implemented in #84: prettier runs in Docker from a new
Dockerfilestage, formake fmt,make fmt-checkand CI alike, and all Markdown is reformatted.Model: opus-5-5