@stigmer/coding-agent-plugin 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: stigmer-operate
3
+ description: >
4
+ Runs the person's own Stigmer server and administers their organization:
5
+ docker run or Compose or the Stigmer operator, their own Kubernetes, turning on login
6
+ with Keycloak, Okta, Entra or Auth0, a runner on a bigger machine, tracing
7
+ to Langfuse, upgrades and backups, who can use or edit which agent, a key
8
+ for CI, service accounts, the access history for an auditor, and agent
9
+ hours, plan limits and the model bill. Use when the person says "docker
10
+ run or compose", "our own Kubernetes", "turn on login", "a runner on a
11
+ separate machine", "nothing shows up in Langfuse", "upgrade", "back up",
12
+ "only Priya can edit it", "a key for CI", "the auditor wants" or "how
13
+ many hours have we used". To set Stigmer up in this project, use
14
+ stigmer-setup; for their product's users' sign-in and their customers'
15
+ keys, stigmer-integrate; for questions about how a piece works, the
16
+ stigmer skill.
17
+ ---
18
+
19
+ # Running their own Stigmer and administering their organization
20
+
21
+ The person operates Stigmer: on their own machines, or as the admin of
22
+ their organization on Stigmer Cloud. Your job is to say which piece of
23
+ Stigmer answers the question, read that piece's page, and answer or act the
24
+ way the page shows it, for the edition and shape they run. This skill is
25
+ the map and the method; the settings, commands and limits are on the pages
26
+ it names. Read the page before answering, cite it as a full
27
+ `https://stigmer.ai/docs/...` URL, and never write a setting, flag or
28
+ command the page doesn't show.
29
+
30
+ ## First, three facts
31
+
32
+ Find these before you answer or write anything.
33
+
34
+ 1. **Which server the CLI talks to, and what it is.** `stigmer auth whoami`
35
+ names the server's version and edition on its `Server` line and, on a
36
+ newer CLI, its address on `Endpoint`. On an older CLI,
37
+ `stigmer config backend status` gives the address; there, `stigmer
38
+ status` speaks only of a stack `stigmer up` runs on this machine.
39
+ 2. **Which edition the person says they run.** When it isn't what the CLI
40
+ reaches (they say "Stigmer Cloud", the CLI reaches a self-hosted or
41
+ local open-source server), nothing the CLI reads is theirs: never report
42
+ its hours, keys, members or history as their standing. Answer from the
43
+ docs, and give them the command to run where they are signed in to
44
+ their own.
45
+ 3. **Which shape they run**, when it's their own server: the laptop
46
+ (`stigmer up`), the single image (`docker run`), Docker Compose, or the
47
+ Stigmer operator on Kubernetes. Settings, upgrades and backups differ by shape, and each
48
+ page has a tab or a section per shape.
49
+
50
+ ## Which piece does what
51
+
52
+ Most wrong answers here invent a setting or a role. Pick the piece from
53
+ this table, then read its page.
54
+
55
+ | The person needs | The piece | Never | Page |
56
+ | --- | --- | --- | --- |
57
+ | Stigmer on their own machines | The single image for evaluation; Docker Compose for a team on one machine; the Stigmer operator and one `Stigmer` resource on a cluster | the single image for a team's daily use; hand-written Kubernetes manifests; editing the objects the operator creates | https://stigmer.ai/docs/guides/self-hosting/overview |
58
+ | People signing in | Their own OIDC provider, set with the four `STIGMER_OIDC_` settings on Compose or `spec.identity.oidc` on the operator; or the operator's bundled sign-in | Stigmer's hosted login on their server; editing `docker-compose.yml` or the objects the operator creates | https://stigmer.ai/docs/guides/self-hosting/authentication |
59
+ | A machine calling Stigmer (CI, a script) | A service account's API key, with the smallest role | a person's key | https://stigmer.ai/docs/guides/authentication/service-accounts |
60
+ | Who may run or change what | The Organization's roles; one Agent's Editor on Enterprise and Cloud only | a per-Agent permission on open source; Viewers running Agents | https://stigmer.ai/docs/concepts/sharing-and-access |
61
+ | More room for the agents' work | The runner (one shared runner per stack), or a runner per Session through a provisioner | registering a runner; a second shared runner; a runner on another host while files are on the local store | https://stigmer.ai/docs/guides/self-hosting/runners, https://stigmer.ai/docs/concepts/runners |
62
+ | Runs in their tracing tool | The runner's `OTEL_` variables, the login from a Secret | a server setting; a `Stigmer` field that turns it on | https://stigmer.ai/docs/guides/self-hosting/tracing |
63
+ | A newer release, a backup | The version pin, a backup first; back is a restore | downgrading; editing the objects the operator creates | https://stigmer.ai/docs/guides/self-hosting/operations |
64
+ | Who gave whom access, and when | The access history and its export | calling it a log of everything people did | https://stigmer.ai/docs/guides/authentication/access-history |
65
+ | Hours used, the plan's limits | Agent hours against the plan's allowance | a model bill from Stigmer | https://stigmer.ai/docs/concepts/billing |
66
+
67
+ ## Their own server
68
+
69
+ ### Choose the shape
70
+
71
+ The single image (`docker run`) is for evaluation only, and the page says
72
+ why: it has no sign-in, so it trusts every caller and can't be given one,
73
+ and an upgrade ends runs in flight. A team on one machine runs the Docker Compose stack; a team with a
74
+ cluster installs the Stigmer operator and declares one `Stigmer` resource. Page:
75
+ https://stigmer.ai/docs/guides/self-hosting/overview, then the shape's own
76
+ page (https://stigmer.ai/docs/guides/self-hosting/all-in-one,
77
+ https://stigmer.ai/docs/guides/self-hosting/docker-compose,
78
+ https://stigmer.ai/docs/guides/self-hosting/kubernetes).
79
+
80
+ - A fresh stack trusts every caller who can reach it: keep it private
81
+ (`kubectl port-forward`, a private network) until sign-in is on, and say
82
+ so before the steps.
83
+ - On Compose every setting is a line in `.env`; never edit
84
+ `docker-compose.yml`. On Kubernetes, settings are fields of the `Stigmer`
85
+ resource, applied with `kubectl apply`; the operator mints the stack's own
86
+ keys, and the person creates only the Secrets the page names (the model
87
+ key, an external database's password).
88
+ - Never name a setting or a `Stigmer` field the page doesn't show; the
89
+ resource's reference page lists every field.
90
+
91
+ ### Turn sign-in on
92
+
93
+ Register the clients in their provider (the console's, and the one for
94
+ installed apps so the CLI and desktop app sign in), set the issuer,
95
+ audience and client ids (in `.env`, or `spec.identity.oidc`), restart, sign
96
+ in, then make keys. On Kubernetes a hostname under `spec.ingress` turns sign-in
97
+ on through the operator's bundled sign-in unless they name their own issuer. Page:
98
+ https://stigmer.ai/docs/guides/self-hosting/authentication.
99
+
100
+ - Keys are made after sign-in is on: one made while the server trusted
101
+ everyone is refused afterwards.
102
+ - The runner gets its own key: `STIGMER_TOKEN` on Compose; on Kubernetes the
103
+ operator mints it, with no step.
104
+ - Their CLI: add the server as a backend
105
+ (`stigmer config backend add <name> --endpoint <host:port>`), use it, and
106
+ `stigmer auth login` once the installed-apps client is registered.
107
+ - CI: a service account's key, kept as a CI secret the job reads as
108
+ `STIGMER_API_KEY`. Never a person's key.
109
+
110
+ ### More room for the agents' work
111
+
112
+ Tell the person first how a runner works, since it decides the answer: a
113
+ runner takes runs from a Temporal task queue; it is not a resource,
114
+ nothing registers it, and the server never picks or calls it. Then answer
115
+ each part from the self-hosting runner page:
116
+
117
+ - **The shared runner on another machine**: "What the runner is given" says
118
+ when it can: with files on the local store the server and the runner share
119
+ one disk (one volume on Compose, one pod on the operator); with a bucket,
120
+ the runner reads and writes through the server's file lane and can run
121
+ anywhere.
122
+ - **Several runners**: "One runner, one replica" says why the operator runs
123
+ one, and that a second shared runner isn't something the guides teach.
124
+ - **Work off the server's machine**: "A runner per Session" is the
125
+ mechanism (a sandbox provisioner), and says what the shipped stacks can't
126
+ exercise of it yet.
127
+
128
+ The runner page is longer than one tool answer holds. When a read comes
129
+ back as a saved file you can't open, save the page and read it in parts:
130
+ `stigmer docs read guides/self-hosting/runners > "$TMPDIR/runners.md"`,
131
+ then read that file through to its end. Pages:
132
+ https://stigmer.ai/docs/guides/self-hosting/runners,
133
+ https://stigmer.ai/docs/concepts/runners.
134
+
135
+ - Present only what the page presents as working on their shape.
136
+
137
+ ### Send runs to their tracing tool
138
+
139
+ Whatever release they name, have them confirm the one their server runs
140
+ with the tracing page's command for their shape (on Kubernetes,
141
+ the Version column of `kubectl -n stigmer get stigmer`; operator `vX` runs
142
+ Stigmer `vX`), never
143
+ the CLI's own version, and say which releases have tracing, from the same
144
+ page. The variables go on the runner: on Kubernetes in
145
+ the `Stigmer` resource's `spec.runner.extraEnv`, the login read from a Secret; on a laptop, in the shell
146
+ `stigmer up` starts from. Langfuse takes its OTLP address and a Basic-auth
147
+ header built from its public and secret keys. Page:
148
+ https://stigmer.ai/docs/guides/self-hosting/tracing.
149
+
150
+ - On Docker Compose the runner can't take these settings today; the page
151
+ says so and links the issue. Never offer an edit to `docker-compose.yml`
152
+ or an override file as the fix.
153
+ - Never state which release added something without reading it from the
154
+ docs or the release notes.
155
+
156
+ ### Upgrade and back up
157
+
158
+ A backup first, then the version pin moved (`STIGMER_VERSION` in `.env`,
159
+ or `helm upgrade stigmer-operator --version`, where the operator takes the
160
+ backup itself when a bucket is declared); the server migrates forward on
161
+ start, and the only way back is a restore. Page:
162
+ https://stigmer.ai/docs/guides/self-hosting/operations.
163
+
164
+ ## Their organization
165
+
166
+ ### Who may do what
167
+
168
+ The Organization's roles: **Member** starts conversations with the Agents
169
+ shared with them and changes only their own; **Viewer** sees and starts no
170
+ conversation; **Admin** manages every Agent, people and settings. Granting
171
+ **Editor** on one Agent is Enterprise and Cloud; open source grants roles
172
+ on the Organization only. Read the page and say which edition each step
173
+ needs. Page: https://stigmer.ai/docs/concepts/sharing-and-access.
174
+
175
+ - When their edition can't do what they asked, say so, and give the
176
+ choices the page leaves (a wider role, or the edition that has it).
177
+
178
+ ### A key for a job
179
+
180
+ A service account with the smallest role the job needs, and an API key
181
+ for that service account, saved to a file and kept as the job's secret.
182
+ Tell the person why that role: Member starts conversations with the
183
+ Agents shared with the Organization and changes none it didn't make; a
184
+ Viewer can't start a conversation; an Admin manages every Agent, so it
185
+ could change them. Pages:
186
+ https://stigmer.ai/docs/guides/authentication/service-accounts,
187
+ https://stigmer.ai/docs/cli/commands/service-account,
188
+ https://stigmer.ai/docs/cli/commands/apikey.
189
+
190
+ - Never a person's key (`stigmer apikey create` without
191
+ `--service-account`), never `--scope` or `--permissions`: neither exists.
192
+
193
+ ### The access history
194
+
195
+ Every time someone was given or lost a role, with who made the change and
196
+ when; not what people did with it. The page says who reads it, how to
197
+ export it as JSON Lines, how to filter one role since a date, where it
198
+ begins, and which plans read it. Page:
199
+ https://stigmer.ai/docs/guides/authentication/access-history.
200
+
201
+ - `stigmer access-history export` takes `--after` alone; filter its lines
202
+ as the page shows.
203
+
204
+ ### Usage and the bill
205
+
206
+ Agent hours against the plan's allowance, what happens at it, and where to
207
+ see both (`stigmer usage hours` on Stigmer Cloud, or **Settings >
208
+ Billing**). Model calls run on the Organization's own provider keys:
209
+ Stigmer never bills or prices them, so their spend is on their provider's
210
+ account. Page: https://stigmer.ai/docs/concepts/billing,
211
+ https://stigmer.ai/docs/cli/commands/usage.
212
+
213
+ - Say what happens at the allowance on their plan, in the page's words:
214
+ Free pauses new work until the reset date the page names and bills
215
+ nothing past it; a plan that prices hours bills them.
216
+ - Never give a model-spend figure from Stigmer.
217
+
218
+ ### Their customers' sign-in and keys
219
+
220
+ Their product's users signing in without a Stigmer login, and each
221
+ customer's keys kept apart, are the stigmer-integrate skill's job: load
222
+ it.
223
+
224
+ ## Acting for the person
225
+
226
+ When the person asks you to make the change, not only to explain it:
227
+
228
+ - A key, a role, someone's access, and anything that costs money follow
229
+ the stigmer skill's safety rules: propose it first, naming what would be
230
+ made or changed (the service account's name and role, which key), and
231
+ act on their yes in this conversation.
232
+ - Make a service account's key with `--save-to-env <file>` so the key goes
233
+ to the file the CLI names, never to this chat; say where it went and
234
+ that the job reads it as `STIGMER_API_KEY` from its secret store.
235
+ - Read back what you made (`stigmer service-account list`,
236
+ `stigmer service-account keys <name>`) and say what is left for them to
237
+ do (the CI secret, a provider's client).
238
+ - An access job touches no Agent: never change, push or delete one while
239
+ doing it.
@@ -0,0 +1,258 @@
1
+ ---
2
+ name: stigmer-run
3
+ description: >
4
+ Runs the person's Stigmer agents and reads what their runs did: runs an
5
+ agent on a file in this project and hands back what it made, finds an
6
+ agent's last run, saves a run's output files, says why a run failed,
7
+ answers a run waiting for approval, sends a follow-up into the same
8
+ conversation, and reads how a run was graded. Also how to check an
9
+ agent before and after a change: scores, evals, and turning a bad
10
+ conversation into a test. Use when the person says "run X on this
11
+ file", "what did X find last time", "pull the report X made", "why did
12
+ the run fail", "it's stuck waiting for approval", "ask it a follow-up",
13
+ "how was it graded", "turn this into a test" or "make sure the new
14
+ instructions aren't worse". For questions about Stigmer itself, use the
15
+ stigmer skill; to set Stigmer up, the stigmer-setup skill.
16
+ ---
17
+
18
+ # Running Stigmer agents and reading their runs
19
+
20
+ The person has agents on Stigmer and wants work done with them, or wants to
21
+ know what a run did. Work from what the run itself recorded: its record,
22
+ its events, the files it saved and its scores. Never answer from the agent's
23
+ definition, a guess, or a new run when they asked about an old one.
24
+
25
+ Every job below names the command line first, the path every edition and
26
+ every shell has, then the Stigmer tool that does the same where there is
27
+ one (the plugin's tools, when they are connected). Use either. Before a
28
+ flag you have not used in this session, check it with `stigmer <command>
29
+ --help`: the installed CLI wins for syntax.
30
+
31
+ Every job ends with its docs pages. When your answer tells the person how
32
+ to do something (rather than handing back what a run did), read the job's
33
+ page first (`stigmer docs read <page>`, or `read_doc`) and cite it as a
34
+ full URL, as the job's Docs line gives it.
35
+
36
+ ## The rules that hold for every job
37
+
38
+ - Reading runs, their events, their files and their scores is free: do it
39
+ without asking.
40
+ - Starting a run spends the person's model tokens. Start one only when they
41
+ asked for a run, never to answer a question about a run that already
42
+ happened.
43
+ - A run's approval is the person's to give: answer `allow` or `allow-all`
44
+ only when they said so, for that call. Cancelling a run can't be undone:
45
+ propose it first.
46
+ - A key never passes through you or this chat. When a run failed on a key,
47
+ say which key and where the person fixes it; they enter the new one
48
+ themselves.
49
+ - Never put `--auto-approve` or `--approve-default allow` on a run the person
50
+ did not ask to run unattended, and when you suggest either, say what it
51
+ skips: every question the agent would have asked them.
52
+
53
+ ## Run an agent on a file and hand back what it made
54
+
55
+ The person says "run invoice-checker on samples/march.csv and give me what it
56
+ made".
57
+
58
+ ```bash
59
+ stigmer run invoice-checker --attach samples/march.csv -m "Check these invoices" --download outputs
60
+ ```
61
+
62
+ - `--attach <path>` sends the file with the message (repeat it for more, at
63
+ most 20); the agent finds it under `.stigmer/uploads/`. A folder given to
64
+ `--attach` joins the conversation file by file.
65
+ - Off a terminal the command streams the turn and returns when it ends.
66
+ `--download <dir>` saves what the turn made as it ends.
67
+ - Then read what it made and give the person the content itself, its
68
+ findings in their words, not a description of where the file is. Read
69
+ the saved file, or the run's outputs (below).
70
+
71
+ With the Stigmer tools: `run_agent` with `agent`, `message` and `files`
72
+ (paths in this project), then poll `get_run` until its phase is completed or
73
+ failed, then `get_run_outputs`. The tools take a project file only when the
74
+ tool server runs on this machine (`stigmer mcp-server`) and the file is
75
+ inside a folder you have open; when `run_agent` refuses a file, use the
76
+ command line above.
77
+
78
+ Docs: https://stigmer.ai/docs/cli/commands/run, https://stigmer.ai/docs/concepts/files.
79
+
80
+ ## Find an agent's last run
81
+
82
+ "What did invoice-checker find last time?" is about a run that already
83
+ happened. Find it; don't start a new one.
84
+
85
+ ```bash
86
+ stigmer list runs --agent invoice-checker --limit 5
87
+ ```
88
+
89
+ It lists the agent's runs, newest first, across all its conversations, with
90
+ each run's id, phase and start. The first finished one is "the last run".
91
+ `stigmer get run <run-id>` reads one whole.
92
+
93
+ With the Stigmer tools: `list_runs` with `agent` (each run with its phase and
94
+ its error in one line), then `get_run` for one of them.
95
+
96
+ Docs: https://stigmer.ai/docs/cli/commands/list, https://stigmer.ai/docs/concepts/sessions.
97
+
98
+ ## Read what a run made, and save it
99
+
100
+ A run's files are what its agent saved in its outputs folder (a report, a
101
+ CSV). To answer "what did it find", read the file and report what it says.
102
+
103
+ ```bash
104
+ stigmer download run <run-id> --output-dir reports
105
+ ```
106
+
107
+ It saves every file the run made into `reports/`, each at its place in the
108
+ outputs folder, and prints the paths. Then read the file you saved and quote
109
+ what the person asked for (its first line, the flagged rows) word for word,
110
+ as the file has it: don't offer a shorter or reworded version unless they
111
+ ask for one. Say where the file now is.
112
+
113
+ With the Stigmer tools: `get_run_outputs` with `run_id` returns each output's
114
+ path and, for text, its content (at most 512 KB a file). It never writes to
115
+ disk: to save the files, run the download command above.
116
+
117
+ The run's answer in the chat (what the agent said, not a file) is in
118
+ `stigmer runs logs <run-id>`, or `get_run`'s `turn.answer`.
119
+
120
+ Docs: https://stigmer.ai/docs/cli/commands/download, https://stigmer.ai/docs/concepts/files.
121
+
122
+ ## Why a run failed
123
+
124
+ 1. **Read the run first.** `stigmer runs logs <run-id>` prints its events,
125
+ the error among them (a `session.error` line, in the provider's own
126
+ words); `stigmer get run <run-id>` shows its record, whose
127
+ `status.error` holds the failure. With the tools: `get_run`
128
+ (`run.status.error`, and `turn.error`). Find the run with
129
+ `stigmer list runs --agent <agent>` when the person has no id.
130
+ 2. **Give the cause the run gives, in plain words, before any fix.** Quote
131
+ the error's own words. Never guess a cause from the agent's
132
+ instructions, its inputs or the person's plan when the run names
133
+ another.
134
+ 3. **Then the fix for that cause**, from the page that covers it.
135
+
136
+ The failures people meet most:
137
+
138
+ - **The model provider refused the call** ("credit balance is too low",
139
+ "invalid x-api-key", "model not found", rate limits). The refusal is about
140
+ the provider account behind the key the run used: the organization's own
141
+ provider key in **Models & providers** (`stigmer provider-key list`), or,
142
+ on Stigmer running on the person's own machine, the runner's key that
143
+ `stigmer setup` saved. It is not the agent, its input or Stigmer's plan.
144
+ The fix is in that provider account (add credit, fix billing, grant the
145
+ model) or a replacement key the person enters themselves
146
+ (`stigmer provider-key set anthropic` prompts for it), then the run again.
147
+ Docs: `guides/integrations/model-provider-keys`.
148
+ - **A tool call was denied or never answered**: the run's events show the
149
+ ask and the answer. See "A run waiting for approval".
150
+ - **Stopped by the platform** (terminated: stalled, or out of its tool-call
151
+ budget): the error says which; a follow-up in the same conversation
152
+ carries on.
153
+
154
+ Docs: https://stigmer.ai/docs/cli/commands/runs, https://stigmer.ai/docs/cli/commands/logs, https://stigmer.ai/docs/concepts/scores.
155
+
156
+ ## A run waiting for approval
157
+
158
+ A run that waits for approval is not stuck and does not time out: it waits
159
+ for a person's answer, as long as it takes.
160
+
161
+ - **See what it wants to do**: `stigmer runs logs <run-id>` shows the tool
162
+ call it waits on and its `tool_use_id`. Or re-attach with
163
+ `stigmer resume <session-id>`, which shows the ask and takes the answer.
164
+ With the tools: `get_run`'s `turn.asks`.
165
+ - **Let it carry on, on the person's word**: `stigmer runs approve <run-id>`
166
+ allows the one call it waits on. Name a call with `--tool-call <id>`;
167
+ `--action deny --comment "<why>"` refuses it and the agent adapts;
168
+ `--action allow-all` allows it and every waiting call of its kind for the
169
+ rest of the turn. With the tools: `submit_run_approval`. The
170
+ conversation's owner (who started it) answers, from the CLI, the console
171
+ or the tools alike; someone it is only shared with cannot.
172
+ - **For a scripted run that must not park itself**: start it with
173
+ `stigmer run <agent> --approve-default allow -m "<message>"` (or
174
+ `allow-all`), which answers every ask without a person; unset, a run off
175
+ a terminal denies each ask and carries on. `--auto-approve` approves every
176
+ tool call before it asks. Say what either skips: the agent will act
177
+ without asking anyone.
178
+
179
+ Docs: https://stigmer.ai/docs/concepts/approval-flows, https://stigmer.ai/docs/cli/commands/runs, https://stigmer.ai/docs/cli/commands/run.
180
+
181
+ ## A follow-up in the same conversation
182
+
183
+ A run is one turn of a conversation (a Session). A follow-up goes into that
184
+ same Session, where the agent sees everything said and done so far, so
185
+ nothing starts fresh. `stigmer run <agent>` again starts a new conversation.
186
+
187
+ - **From a terminal**: `stigmer resume <session-id>` opens the conversation,
188
+ shows it, and takes the next message. The session id is on the run
189
+ (`stigmer get run <run-id>` shows `spec.session_id`), in
190
+ `stigmer list sessions`, or in the picker a bare `stigmer resume` opens;
191
+ `stigmer resume "<words from its subject>"` searches. The id is given in
192
+ full.
193
+ - **From a script or an agent, with no one typing**: `stigmer resume` is
194
+ interactive and takes no message argument. Send the follow-up with the
195
+ Stigmer tools' `run_agent` and its `session_id`, or with the SDK's
196
+ `run.sendMessage`.
197
+ - `stigmer runs resume <run-id>` is something else: it continues a paused
198
+ run.
199
+
200
+ Docs: https://stigmer.ai/docs/cli/commands/resume, https://stigmer.ai/docs/concepts/sessions.
201
+
202
+ ## How a run was graded
203
+
204
+ ```bash
205
+ stigmer runs scores <run-id>
206
+ ```
207
+
208
+ It lists every score the run carries: the platform's run-health check, a
209
+ person's thumbs, an AI judge's verdict, and an eval's checks on one of its
210
+ tries, each with its verdict and reason. With the tools: `get_run_scores`.
211
+
212
+ - Report what the scores say, and name where you read them: the command
213
+ (`stigmer runs scores <run-id>`) or the tool (`get_run_scores`), and the
214
+ run's id. When there is no
215
+ judge score, say plainly the run was **not graded** by an AI judge (AI
216
+ grading is off until someone turns it on for the agent), and give the
217
+ reason the read gives; never grade it yourself in its place.
218
+ - To let the person judge the grade, read what the run made too (above) and
219
+ put its findings beside the scores.
220
+ - How the agent does over many runs: `stigmer agent quality <agent>`.
221
+ - Never switch AI grading on, create a scoring rule or rate a run for the
222
+ person unless they asked: grading spends their model tokens.
223
+
224
+ Docs: https://stigmer.ai/docs/concepts/scores, https://stigmer.ai/docs/cli/commands/runs, https://stigmer.ai/docs/cli/commands/agent.
225
+
226
+ ## Turn a bad conversation into a test
227
+
228
+ ```bash
229
+ stigmer runs to-eval-case <run-id>
230
+ ```
231
+
232
+ It writes a test case from the run under `evals/`: the request it answered,
233
+ the conversation before it, every answer an MCP tool gave the run as a mock
234
+ (so a failed call is replayed, never made again for real), and an `llm`
235
+ grader whose FAIL line names what went wrong. The person writes its PASS
236
+ line: only they know what a right reply holds. `--eval <eval>` adds the case
237
+ to an eval instead. Then run it on the agent:
238
+ `stigmer eval run --agent <agent> --eval <eval>`.
239
+
240
+ Docs: https://stigmer.ai/docs/guides/evals/test-with-evals, https://stigmer.ai/docs/cli/commands/runs.
241
+
242
+ ## Check a change before shipping it
243
+
244
+ Evals are the way to know a new version of an agent (new instructions, a new
245
+ skill) is not worse than the one customers use now.
246
+
247
+ 1. Write test cases in Claude Code's plugin-eval format, a folder per case
248
+ with its request and graders, or turn real runs into cases (above), and
249
+ push them as an eval: `stigmer push eval evals --name <eval>`.
250
+ 2. Run the eval on the agent as it is now, as the baseline:
251
+ `stigmer eval run --agent <agent> --eval <eval>`.
252
+ 3. Change the agent (a new version), run the same eval again, and compare
253
+ the two eval runs case by case; each is stamped with the agent's and the
254
+ eval's version.
255
+
256
+ Eval tries are runs: they spend model tokens. Say so before running one.
257
+
258
+ Docs: https://stigmer.ai/docs/guides/evals/test-with-evals, https://stigmer.ai/docs/cli/commands/eval.