Skip to content

Commit 8567bca

Browse files
Merge pull request #375 from rest-sh/chore/agents-skills-refresh
docs: expand AGENTS.md and refresh agent skills
2 parents 7c7cd96 + 46f8374 commit 8567bca

2 files changed

Lines changed: 19 additions & 14 deletions

File tree

.agents/skills/rsh-docs/SKILL.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,21 +235,24 @@ When migrating older docs, track whether material was retired, already migrated,
235235

236236
## Validation
237237

238-
After meaningful site changes, run what CI runs:
238+
After meaningful site changes, run what the CI docs job runs:
239239

240240
```bash
241-
hugo --source site --quiet # site builds (quick check)
242-
npm --prefix site run build # CI parity: social images + Hugo (npm ci once first)
243-
scripts/check-doc-examples.rb # restish-example shortcodes are valid
244-
scripts/check-doc-links.rb # internal links resolve
245-
go run ./cmd/restish-docgen --check # generated regions are not stale
241+
npm --prefix site ci # once, to install dependencies
242+
go run ./cmd/restish-docgen --check # generated regions are not stale
243+
npm --prefix site run social-images # social preview images build
244+
hugo --source site --quiet --gc --minify --cacheDir /tmp/hugo_cache
245+
scripts/check-doc-links.rb # internal links resolve
246+
scripts/check-doc-examples.rb # restish-example shortcodes are valid
246247
```
247248

249+
A plain `hugo --source site --quiet` is a fine quick check while iterating.
248250
`npm run social-images` parses front matter across `content/en` and can fail
249-
independently of Hugo, so run the npm build for blog and front-matter changes
250-
even when the quick Hugo check passes.
251+
independently of Hugo, so run it for blog and front-matter changes even when
252+
the quick Hugo check passes.
251253

252254
When touching site JavaScript or interactive examples (playground, query
253-
runner, docs interactions), also run `npm --prefix site test`.
255+
runner, docs interactions), also run `npm --prefix site test`; CI does not
256+
run it in the docs job.
254257

255258
Also verify new links, check examples against current CLI behavior, grep touched docs for stale `api.example.com` placeholders and leftover `Source material:` sections, and prefer examples that can later be validated against `api.rest.sh` or promoted into tests.

AGENTS.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ go run ./cmd/restish-docgen --check
2121
# Validate the docs site after changes under site/ (quick check)
2222
hugo --source site --quiet
2323

24-
# Full CI parity for the docs job: social preview images + Hugo
25-
# (npm ci needed once; social-images parses content front matter and can fail independently)
26-
npm --prefix site ci && npm --prefix site run build
24+
# Full CI parity for the docs job (npm ci needed once; social-images parses
25+
# content front matter and can fail independently of Hugo)
26+
npm --prefix site ci
27+
npm --prefix site run social-images
28+
hugo --source site --quiet --gc --minify --cacheDir /tmp/hugo_cache
2729

2830
# Validate docs examples and links (CI runs both)
2931
scripts/check-doc-examples.rb
@@ -44,7 +46,7 @@ go test -race ./... # when touching concurrency, streaming,
4446
# subprocess lifecycle, or shared buffers
4547
```
4648

47-
CI requires all of: `go test ./...`, `go test -tags=integration ./...`, building all five binaries above, `restish-docgen --check`, `scripts/check-doc-links.rb`, `scripts/check-doc-examples.rb`, and the docs-site build (`npm --prefix site ci`, `npm --prefix site run social-images`, then Hugo). A weekly job also executes every docs `restish-example` live against `api.rest.sh`.
49+
CI requires all of: `go test ./...`, `go test -tags=integration ./...`, building all five binaries above, `go run ./cmd/restish-docgen --check`, `scripts/check-doc-links.rb`, `scripts/check-doc-examples.rb`, and the docs-site build (`npm --prefix site ci`, `npm --prefix site run social-images`, then Hugo). A weekly job also executes every docs `restish-example` live against `api.rest.sh`.
4850

4951
### Manual Smoke Test
5052

@@ -72,7 +74,7 @@ The core design is a `CLI` struct in `internal/cli/cli.go` that owns all state
7274
- `internal/auth`, `internal/secrets` — auth schemes; credential-recognition allow-lists
7375
- `internal/config` — config files, profiles, comment-preserving JSONC edits, file locking
7476
- `internal/content`, `internal/input`, `internal/filter`, `internal/hypermedia` — content negotiation, shorthand request bodies, shorthand/jq filtering, link parsing
75-
- `internal/cache`, `internal/history` — size-bounded disk cache; request history
77+
- `internal/cache` — size-bounded disk cache for specs and responses
7678
- `internal/plugin`, `internal/procutil` — plugin discovery/manifests; subprocess lifecycle
7779
- `plugin/` (top level) — public plugin API contract; wire compatibility is a public promise
7880

0 commit comments

Comments
 (0)