check / check (push) Waiting to run
A Python `test` phase that installs its packages from `Pipfile.lock` now does so above `ARG CACHEBUST`, through `script/bootstrap`, in a layer of its own. Check builds keep that layer as they keep Go's modules, and the tests still run after the line on every build. In that step `script/bootstrap` installs only system packages, pipenv and its dependencies by hash, and the lockfile's packages. The policy, both checklists and the README list the steps above the line the same way; the policy has a short example. This writes down sneak's ruling at sneak/rfscan#80 (comment). rfscan installs pipenv by version, not by hash, so its `script/bootstrap` does not meet this rule yet. Model: opus-5-5
213 lines
8.9 KiB
Markdown
213 lines
8.9 KiB
Markdown
# prompts
|
|
|
|
prompts is an MIT-licensed collection of LLM prompts by
|
|
[@sneak](https://sneak.berlin), including development policy prompts and other
|
|
useful prompts for working with large language models.
|
|
|
|
## Quick Start
|
|
|
|
### Existing Repo
|
|
|
|
Run from within the repo you want to bring up to standards. Clone the prompts
|
|
repo once, then run both commands in order.
|
|
|
|
```bash
|
|
export TD="$(mktemp -d)"
|
|
git clone --depth 1 https://git.eeqj.de/sneak/prompts.git "$TD"
|
|
```
|
|
|
|
**Repository structure and policies:**
|
|
|
|
```bash
|
|
claude "Read $TD/prompts/REPO_POLICIES.md and
|
|
$TD/prompts/EXISTING_REPO_CHECKLIST.md, then bring this repo up to those
|
|
standards. Your scope is repo scaffolding and policy compliance:
|
|
Makefile, Dockerfile, .dockerignore, .gitignore, .editorconfig, CI
|
|
workflow, README sections, LICENSE, REPO_POLICIES.md, and any
|
|
language-specific config files (.golangci.yml, .prettierrc, etc.).
|
|
You must also run the formatter (make fmt) and fix any linter errors
|
|
(make lint) so that make check passes — this will touch source code,
|
|
but do not restructure, refactor, or rewrite any application logic.
|
|
Follow the policies yourself: work on a feature branch, never git add -A,
|
|
and make each logical change a separate commit (e.g. one commit for
|
|
formatting, one for linter fixes, one for README updates, one for each
|
|
new repo file added, etc.)."
|
|
```
|
|
|
|
**Code style and conventions:**
|
|
|
|
```bash
|
|
claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever
|
|
language-specific styleguides in $TD/prompts/ apply to this repo
|
|
(CODE_STYLEGUIDE_GO.md, CODE_STYLEGUIDE_JS.md, CODE_STYLEGUIDE_PYTHON.md,
|
|
GO_HTTP_SERVER_CONVENTIONS.md). Then review the application code in this
|
|
repo and bring it into compliance with those coding standards. Your scope
|
|
is application code structure and style: naming, patterns, error
|
|
handling, project layout, and conventions described in the styleguides.
|
|
Do not modify repo scaffolding (Makefile, Dockerfile, CI workflow,
|
|
.gitignore, .editorconfig, etc.) — only application code. Work on a
|
|
feature branch, never git add -A, and make each logical change a
|
|
separate commit."
|
|
```
|
|
|
|
### New Repo
|
|
|
|
Run from inside the directory where you want to create a new repo. Clone the
|
|
prompts repo once, then run both commands in order.
|
|
|
|
```bash
|
|
export TD="$(mktemp -d)"
|
|
git clone --depth 1 https://git.eeqj.de/sneak/prompts.git "$TD"
|
|
```
|
|
|
|
**Repository scaffolding:**
|
|
|
|
```bash
|
|
claude "Read $TD/prompts/REPO_POLICIES.md and
|
|
$TD/prompts/NEW_REPO_CHECKLIST.md, then set up this new repo according
|
|
to those standards. Your scope is repo structure and required files:
|
|
README.md, LICENSE, REPO_POLICIES.md, Makefile, Dockerfile, .dockerignore,
|
|
.gitignore, .editorconfig, CI workflow, and language-specific config.
|
|
Run the formatter (make fmt) and fix any linter errors (make lint) so
|
|
that make check passes — this will touch source code, but do not
|
|
restructure, refactor, or rewrite any application logic. Follow the
|
|
policies yourself: work on a feature branch, never git add -A, and make
|
|
each logical change a separate commit (e.g. one commit for formatting,
|
|
one for linter fixes, one for README, one for each new repo file, etc.)."
|
|
```
|
|
|
|
**Code style and conventions:**
|
|
|
|
```bash
|
|
claude "Read $TD/prompts/CODE_STYLEGUIDE.md and whichever
|
|
language-specific styleguides in $TD/prompts/ apply to this repo
|
|
(CODE_STYLEGUIDE_GO.md, CODE_STYLEGUIDE_JS.md, CODE_STYLEGUIDE_PYTHON.md,
|
|
GO_HTTP_SERVER_CONVENTIONS.md). Then review the application code in this
|
|
repo and bring it into compliance with those coding standards. Your scope
|
|
is application code structure and style: naming, patterns, error
|
|
handling, project layout, and conventions described in the styleguides.
|
|
Do not modify repo scaffolding (Makefile, Dockerfile, CI workflow,
|
|
.gitignore, .editorconfig, etc.) — only application code. Work on a
|
|
feature branch, never git add -A, and make each logical change a
|
|
separate commit."
|
|
```
|
|
|
|
## Getting Started
|
|
|
|
```bash
|
|
git clone https://git.eeqj.de/sneak/prompts.git
|
|
cd prompts
|
|
```
|
|
|
|
Prompts are stored as Markdown files in `prompts/`. Copy or reference them as
|
|
needed in your projects.
|
|
|
|
## Entrypoints
|
|
|
|
This repository adheres to the
|
|
[Scripts to Rule Them All](https://github.com/github/scripts-to-rule-them-all)
|
|
standard: normalized scripts in `script/` are the entrypoints for the
|
|
development workflow, and the Makefile targets are thin shims that call them.
|
|
The scripts are POSIX sh (not bash) so they run in minimal containers such as
|
|
alpine. We provide:
|
|
|
|
- `script/bootstrap` — install all dependencies (yarn install)
|
|
- `script/setup` — set up the repo for development after a fresh clone: runs
|
|
`script/bootstrap`, then `script/install-precommit`
|
|
- `script/projectname` — output the project name (our own extension); used by
|
|
`script/docker` for the image tag
|
|
- `script/test` —
|
|
`docker build --build-arg CACHEBUST="$(date +%s)-$$" --target test --output type=cacheonly .`,
|
|
building the `test` phase of the `Dockerfile` without writing an image (no
|
|
tests defined here)
|
|
- `script/lint` —
|
|
`docker build --build-arg CACHEBUST="$(date +%s)-$$" --target lint --output type=cacheonly .`,
|
|
building the `lint` phase, which runs prettier over the markdown files,
|
|
without writing an image
|
|
- `script/fmt` — format all markdown files with prettier (writes; native, not in
|
|
a container)
|
|
- `script/fmt-check` — check formatting (read-only; native)
|
|
- `script/check` — run all checks: `test`, `lint`, `fmt-check` (our own
|
|
extension); builds no image of its own
|
|
- `script/docker` —
|
|
`docker build --build-arg CACHEBUST="$(date +%s)-$$" --build-arg VERSION="$version" -t prompts .`,
|
|
the tag coming from `script/projectname` (byte-identical across repos)
|
|
- `script/cibuild` — cd to the repo root, run `script/bootstrap`, run
|
|
`script/check`, compute `version` from `git describe`, then
|
|
`docker build --build-arg CACHEBUST="$(date +%s)-$$" --build-arg VERSION="$version" -t prompts .`
|
|
(what CI runs; it bootstraps because CI checks out and runs this alone while
|
|
`script/fmt-check` is native)
|
|
- `script/precommit` — run by the git pre-commit hook (our own extension); calls
|
|
`script/check`
|
|
- `script/install-precommit` — installs the git pre-commit hook (our own
|
|
extension); `make hooks` shims to it
|
|
|
|
`make hooks` installs the pre-commit hook that runs `script/precommit`.
|
|
|
|
In every stage of a `Dockerfile`, every step that lints, tests or compiles comes
|
|
after `ARG CACHEBUST`. `ARG CACHEBUST` comes right after these steps:
|
|
|
|
- the steps that install system packages
|
|
- the steps that download Go's modules
|
|
- the step that runs `script/bootstrap` to install a Python `test` phase's
|
|
packages from `Pipfile.lock`
|
|
|
|
A stage with none of these steps declares `ARG CACHEBUST` right after `FROM`.
|
|
The `script/` builds pass a new `CACHEBUST` value on every build, which reruns
|
|
every `RUN` step after that line and leaves the layers above it and the cache
|
|
mounts in place; `--no-cache` would build those layers again and empty the
|
|
mounts. This repo's own `Dockerfile` declares `ARG CACHEBUST` right after `FROM`
|
|
in every stage: each stage installs system packages and node packages together
|
|
in one `script/bootstrap` step, and check builds may keep system packages but
|
|
not node packages.
|
|
|
|
## Rationale
|
|
|
|
LLM prompts, especially development policies, benefit from version control and a
|
|
single authoritative source. This repo provides a central place to maintain,
|
|
share, and evolve prompts across projects.
|
|
|
|
## Design
|
|
|
|
The repository is a collection of Markdown files organized in the `prompts/`
|
|
subdirectory. Each file contains one or more related prompts or policy
|
|
documents. There is no build step or runtime component; the prompts are consumed
|
|
by copying them into other projects or referencing them directly.
|
|
|
|
## Template Repos
|
|
|
|
These template repositories implement the policies defined in this repo and
|
|
serve as starting points for new projects. They must be kept in sync when
|
|
policies change.
|
|
|
|
- **[template-app-go](https://git.eeqj.de/sneak/template-app-go)** — Go HTTP
|
|
server template (Uber fx, chi, SQLite, session auth, Prometheus metrics)
|
|
- **[template-app-js](https://git.eeqj.de/sneak/template-app-js)** — JavaScript
|
|
SPA template (Vite, Tailwind CSS v4, nginx Docker deployment)
|
|
- **[template-app-python](https://git.eeqj.de/sneak/template-app-python)** —
|
|
Python web application template (FastAPI, uvicorn, pytest, black, ruff)
|
|
|
|
When updating policies in this repo, also update the template repos to match
|
|
(Makefile targets, Dockerfile conventions, CI workflows, required files, etc.).
|
|
|
|
## See Also
|
|
|
|
- **[clawpub](https://git.eeqj.de/sneak/clawpub)** — Real-world examples,
|
|
rationale, and operational lessons from applying these policies with an
|
|
[OpenClaw](https://github.com/openclaw/openclaw) AI agent. Includes detailed
|
|
documentation on how the interlocking check system (CI → Docker → Makefile →
|
|
tests/lint/fmt) works in practice, why checklists complement prose policies,
|
|
and failure stories from production use.
|
|
|
|
## TODO
|
|
|
|
- Add more prompt templates for common development tasks
|
|
|
|
## License
|
|
|
|
MIT. See [LICENSE](LICENSE).
|
|
|
|
## Author
|
|
|
|
[@sneak](https://sneak.berlin)
|