You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/rsh-docs/SKILL.md
+35-9Lines changed: 35 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,8 +77,29 @@ Use examples that look like real work:
77
77
- Explain intentional placeholders when they might look accidental.
78
78
- Prefer JSONC for config examples when comments clarify fields.
79
79
80
+
### Command Example Style
81
+
82
+
These apply to every command example in docs, guides, recipes, and blog posts:
83
+
84
+
- Prefer shorthand in examples over `jq` or plain JSON when possible.
85
+
- Do not use `get` or `post` in examples when the auto mode is clear (e.g.,
86
+
`restish api.rest.sh/example` instead of `restish get api.rest.sh/example`).
87
+
- Do not add options for no reason. E.g. `--rsh-no-paginate` when not talking
88
+
explicitly about pagination, or `--rsh-columns` when the default output is
89
+
fine. Extra flags complicate commands and make examples harder to read.
90
+
Avoid `-o lines` unless it significantly improves output readability.
91
+
80
92
### Shorthand Examples
81
93
94
+
`restish-example` shortcode commands are extracted and validated by
95
+
`scripts/check-doc-examples.rb`: CI enforces that each one is a single direct
96
+
`restish` invocation (no pipes, redirects, `;`, `&&`, command substitution, or
97
+
backticks) that parses cleanly with shell word-splitting, and a weekly job
98
+
executes every one live against `api.rest.sh` and fails on non-zero exit.
99
+
Write shortcode examples as commands that actually succeed against the public
100
+
API; use plain fenced code blocks for pipelines, local-only setup, or
101
+
illustrative failures.
102
+
82
103
Restish shorthand examples should be shell-safe and match how the docs display
83
104
them:
84
105
@@ -170,14 +191,11 @@ post reveals a gap.
170
191
171
192
### Blog Improvement
172
193
173
-
Whenever you write a new blog post or modify an existing one, spin off a sub-agent to do a review of the changes and suggest improvements, which you should then apply. The review should check for:
194
+
Whenever you write a new blog post or modify an existing one, do a separate review pass of the changes (use a sub-agent if available) and apply the resulting improvements. The review should check for:
174
195
175
196
1. Clarity: Is the post easy to understand? Are there any ambiguous statements or jargon that could be clarified?
176
197
2. Engagement: Does the post have a compelling hook? Does it maintain the reader's interest throughout?
177
-
3. Accuracy: Are all technical details correct? Are there any factual errors or misleading statements?
178
-
1. Commands should prefer shorthand in examples over jq or plain JSON when possible.
179
-
2. Do not use `get` or `post` in examples when the auto mode is clear (e.g., `restish api.rest.sh/example` instead of `restish get api.rest.sh/example`).
180
-
3. Do not add options for no reason. E.g. `--rsh-no-paginate` when not talking explicitly about pagination, or `--rsh-columns` when the default output is fine. This complicates commands and makes it harder for readers. Another good example is `-o lines` unless it significantly improves readability of the output.
198
+
3. Accuracy: Are all technical details correct? Are there any factual errors or misleading statements? Do all examples follow the Command Example Style rules above?
181
199
4. Structure: Is the post well-organized? Does it have a logical flow from introduction to conclusion? Do the headings make sense (and are they short enough to not wrap for common screen widths)?
182
200
5. Do all the command examples actually make sense? Are they good examples, or could they be improved to better illustrate the point? Are the examples in the right place in the post or should they be moved?
183
201
@@ -217,13 +235,21 @@ When migrating older docs, track whether material was retired, already migrated,
217
235
218
236
## Validation
219
237
220
-
After meaningful site changes, run:
238
+
After meaningful site changes, run what CI runs:
221
239
222
240
```bash
223
-
hugo --source site --quiet
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
go run ./cmd/restish-docgen --check # generated regions are not stale
224
246
```
225
247
226
-
For blog changes that affect social cards, run `npm run social-images` from
227
-
`site/` or `npm run build` if dependencies are available.
248
+
`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
+
252
+
When touching site JavaScript or interactive examples (playground, query
253
+
runner, docs interactions), also run `npm --prefix site test`.
228
254
229
255
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.
Copy file name to clipboardExpand all lines: .agents/skills/rsh-product/SKILL.md
+4-19Lines changed: 4 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,28 +37,13 @@ For source-backed rationale and examples from product/UX references and popular
37
37
38
38
### 1. Frame The Opportunity
39
39
40
-
Write the smallest useful product frame before designing commands:
40
+
Before designing commands, write the smallest useful product frame: who the user is (first-time user, daily CLI user, API integrator, plugin operator, plugin author, or maintainer), the job they are doing outside Restish, their current workaround, the pain, the intended outcome, and the evidence (issue text, failing example, repeated support question, code/test signal). If evidence is thin, propose the lightest validation instead of inventing a large feature.
41
41
42
-
-**User**: Who is this for? First-time user, daily CLI user, API integrator, plugin operator, plugin author, or maintainer?
43
-
-**Job**: What is the user trying to get done outside Restish?
44
-
-**Current workaround**: What command sequence, script, config edit, docs lookup, or mental model do they use today?
45
-
-**Pain**: Is the problem failure, slowness, repeated typing, poor discoverability, unsafe behavior, bad output, weak automation, or missing capability?
46
-
-**Outcome**: What should be easier, safer, faster, or more understandable after the change?
47
-
-**Evidence**: Point to issue text, user report, failing example, design-doc gap, docs search, repeated support question, or code/test signal.
48
-
49
-
If evidence is thin, propose the lightest validation instead of inventing a large feature.
42
+
Concrete evidence sources for Restish: the v1 issue tracker (`rest-sh/restish` on GitHub — dozens of open issues and PRs represent real user demand), `docs/design/000-restish-v1-baseline.md` for v1 behavior, `docs/design/031-compatibility-and-migration.md` for compatibility promises, and `docs/design/037-v2-command-surface-review.md` for prior command-surface decisions.
50
43
51
44
### 2. Classify The Investment
52
45
53
-
Classify the work so scope and validation match risk:
54
-
55
-
-**Reliability**: Makes existing behavior more correct, predictable, secure, or recoverable.
56
-
-**Usability**: Makes existing behavior easier to discover, understand, compose, or debug.
57
-
-**Feature**: Adds a new user-visible capability.
58
-
-**Compatibility**: Preserves or improves v1, plugin, OpenAPI, shell, or documented behavior.
59
-
-**Platform**: Improves internal architecture only when it unlocks user-facing reliability, velocity, or simplicity.
60
-
61
-
Favor reliability and usability improvements when a new feature would deepen existing confusion.
46
+
Classify the work — reliability, usability, feature, compatibility, or platform — so scope and validation match risk. Favor reliability and usability improvements when a new feature would deepen existing confusion. Platform work counts only when it unlocks user-facing reliability, velocity, or simplicity.
62
47
63
48
### 3. Shape The Product Bet
64
49
@@ -141,7 +126,7 @@ Use validation proportional to risk:
141
126
-**Product validation**: Compare against user jobs, known feedback, current docs, and one or two realistic command transcripts.
142
127
-**Usability review**: Run a heuristic pass for status visibility, vocabulary, control/escape, consistency, error prevention, recognition over recall, efficiency, minimal output, error recovery, and help.
143
128
-**CLI contract tests**: Cover TTY vs non-TTY when behavior differs, `stdout`/`stderr`, exit codes, help text, output formats, malformed input, cancellation, auth/config precedence, and shell composition.
144
-
-**Golden output tests**: Use for intentional formatter/help changes; do not accept drift casually.
129
+
-**Output regression tests**: Use for intentional formatter/help changes; do not accept drift casually.
145
130
-**Docs checks**: Update `site/` for user behavior and `docs/design/` for significant subsystem behavior; link guides and reference pages both ways.
146
131
-**Compatibility checks**: Test v1-style workflows, generated OpenAPI command shape, plugin boundaries, and scripting behavior when touched.
Copy file name to clipboardExpand all lines: .agents/skills/rsh-review/SKILL.md
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,13 +60,13 @@ Review code changes with a bug-finding mindset. Prioritize correctness, regressi
60
60
61
61
## Restish-Specific Watchlist
62
62
63
-
These are high-value repo-specific checks, not an exhaustive checklist. Use them when relevant; do not force them into unrelated reviews.
63
+
These are high-value repo-specific checks, not an exhaustive checklist. Use them when relevant; do not force them into unrelated reviews. For the full catalog of historical bug classes found in past releases, see `../rsh-release-qa/references/findings-mining.md`. When a changed subsystem has a design doc (`docs/design/README.md`), check the diff against its stated invariants.
-`internal/plugin/` and `cmd/restish-*`: plugin protocol, subprocess lifecycle, wire compatibility
72
72
-`cmd/restish` and `site/`: user-facing CLI behavior, examples, docs impact
@@ -99,27 +99,42 @@ Config fields should not be added unless their behavior is implemented. Otherwis
99
99
100
100
Spec-loading or command-generation changes can break existing workflows indirectly. Check for backward compatibility in generated command shape, naming, argument expectations, and operation discovery.
101
101
102
-
### Output formatting and golden tests
102
+
### Spec and operation cache invalidation
103
103
104
-
Intentional formatter changes should usually come with targeted regression coverage or golden updates. Unintentional output drift is a common source of user-visible regressions.
104
+
A recurring source of fixes: stale generated commands after config or spec changes. Caches are keyed by base URL, operation base, server variables, and raw spec hash. Changes to `api edit`/`api connect`, profiles, base URLs, or spec loading must invalidate or refresh the relevant caches, and concurrent `api connect` runs must not clobber each other's entries.
105
+
106
+
### OAuth and auth concurrency
107
+
108
+
Token refreshes must stay serialized; discovery transports and OAuth state are shared across generated commands. Changes to `internal/auth` should be checked for refresh races, cache-key reuse across profiles/issuers, and browser-launch behavior (`$BROWSER` handling, Linux flows).
109
+
110
+
### v1 → v2 migration of persisted state
111
+
112
+
Changing config schema, cache key formats, or credential storage breaks existing user state unless migrated. Past fixes migrated legacy token cache keys, legacy `tls.cert`/`tls.key` fields, and added migration warnings. New formats need a mapping from the old one or an explicit, tested migration error.
113
+
114
+
### Command surface and help contracts
115
+
116
+
`internal/cli/command_surface_test.go` locks the built-in command tree, help grouping, error-message UX, and removed pre-release names. Adding, renaming, or regrouping commands should update it deliberately — treat unexplained churn there as a regression signal.
117
+
118
+
### Output formatting
119
+
120
+
Intentional formatter changes should usually come with targeted regression coverage. Unintentional output drift is a common source of user-visible regressions.
105
121
106
122
### Auth, pagination, filtering, and caching flows
107
123
108
124
Changes in these areas often regress behavior only in realistic end-to-end paths. Review interactions, not just isolated helpers.
109
125
110
126
For auth, redaction, and cache metadata changes, check both positive behavior and negative leakage boundaries: where credentials are applied, where they must not be applied, what gets persisted, and what appears in errors or traces. Keep findings tied to the PR's changed paths.
111
127
128
+
`internal/secrets` holds the central allow-lists for recognizing credential-like fields; new secret-ish field names belong there, not in ad-hoc checks. Past fixes covered suffixed fields (`confirm_password`), URL userinfo and query credentials in network errors, and avoiding false positives on ordinary fields like `max_tokens`.
129
+
112
130
### Test buffer races
113
131
114
132
Tests that share a `bytes.Buffer` across concurrent writers can hide data races, especially when subprocess stderr/stdout is wired into test buffers.
115
133
116
134
## Verification Hints
117
135
118
-
- Prefer the narrowest meaningful test first: `go test ./internal/cli/...`, `go test ./internal/request/...`, `go test ./internal/output/...`, or another touched package.
119
-
- Run `go test ./...` for broad or shared changes.
120
-
- Run `go test -tags=integration ./...` before approving CLI or plugin behavior changes with integration risk.
121
-
- Update golden files only when behavior intentionally changed.
122
-
- Consider `go test -race ./...` when concurrency, subprocess handling, or shared buffers are touched.
136
+
- Run the AGENTS.md verification ladder: narrowest touched package first, then `go test ./...`, then `-tags=integration` for CLI/plugin behavior changes, and `-race` when concurrency, subprocess handling, or shared buffers are touched.
137
+
- Run `go run ./cmd/restish-docgen --check` when CLI surface or help text changed; CI fails on stale generated docs regions.
0 commit comments