Compare commits
2 Commits
improve-qu
...
8fc81c3774
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fc81c3774 | ||
| 189e54862e |
16
README.md
16
README.md
@@ -115,6 +115,22 @@ subdirectory. Each file contains one or more related prompts or policy
|
|||||||
documents. There is no build step or runtime component; the prompts are consumed
|
documents. There is no build step or runtime component; the prompts are consumed
|
||||||
by copying them into other projects or referencing them directly.
|
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.).
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- Add more prompt templates for common development tasks
|
- Add more prompt templates for common development tasks
|
||||||
|
|||||||
@@ -423,6 +423,29 @@ last_modified: 2026-02-22
|
|||||||
[github.com/bcicen/go-units](https://github.com/bcicen/go-units) for
|
[github.com/bcicen/go-units](https://github.com/bcicen/go-units) for
|
||||||
temperatures (and others). The type system is your friend, use it.
|
temperatures (and others). The type system is your friend, use it.
|
||||||
|
|
||||||
|
1. When defining custom string-based wrapper types (e.g. `type ImageID string`,
|
||||||
|
`type ContainerID string`), always implement the `fmt.Stringer` interface.
|
||||||
|
At SDK and library boundaries, use `.String()` instead of `string(v)` to
|
||||||
|
convert the value to a plain string. This makes the conversion explicit,
|
||||||
|
grep-able, and ensures a consistent pattern across the codebase.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```go
|
||||||
|
type ImageID string
|
||||||
|
|
||||||
|
func (id ImageID) String() string {
|
||||||
|
return string(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// At SDK/library boundaries:
|
||||||
|
// Good:
|
||||||
|
client.PullImage(ctx, imageID.String())
|
||||||
|
|
||||||
|
// Bad:
|
||||||
|
client.PullImage(ctx, string(imageID))
|
||||||
|
```
|
||||||
|
|
||||||
1. Once you have a working program, run `go mod tidy` to clean up your `go.mod`
|
1. Once you have a working program, run `go mod tidy` to clean up your `go.mod`
|
||||||
and `go.sum` files. Tag a v0.0.1 or v1.0.0. Push your `main` branch and
|
and `go.sum` files. Tag a v0.0.1 or v1.0.0. Push your `main` branch and
|
||||||
tag(s). Subsequent work should happen on branches so that `main` is "always
|
tag(s). Subsequent work should happen on branches so that `main` is "always
|
||||||
|
|||||||
Reference in New Issue
Block a user