@caveman-ai/cloud 0.1.0-rc.28 → 0.1.0-rc.29
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.
- package/README.md +28 -7
- package/bin/agents.mjs +268 -0
- package/bin/cvm.mjs +10 -113
- package/bin/setup.mjs +315 -0
- package/bin/tui.mjs +168 -0
- package/dist/cloud-client.mjs +1 -1
- package/dist/cloud-mcp.mjs +5 -5
- package/dist/skills/caveman-cloud/SKILL.md +61 -113
- package/dist/skills/caveman-cloud/references/caveman-cloud-compare.md +65 -5
- package/dist/skills/caveman-cloud/references/caveman-cloud-connect.md +83 -47
- package/dist/skills/caveman-cloud/references/caveman-cloud-console.md +81 -0
- package/dist/skills/caveman-cloud/references/caveman-cloud-criteria.md +86 -0
- package/dist/skills/caveman-cloud/references/caveman-cloud-dashboards.md +38 -32
- package/dist/skills/caveman-cloud/references/caveman-cloud-evals.md +84 -162
- package/dist/skills/caveman-cloud/references/caveman-cloud-project.md +12 -2
- package/dist/skills/caveman-cloud/references/caveman-cloud-scenarios.md +3 -11
- package/dist/skills/caveman-cloud/references/caveman-cloud-setup-inventory.md +51 -0
- package/dist/skills/caveman-cloud/references/caveman-cloud-setup-wiring.md +45 -0
- package/dist/skills/caveman-cloud/references/caveman-cloud-setup.md +17 -74
- package/dist/skills/caveman-cloud/references/caveman-cloud-traces.md +73 -6
- package/dist/skills/caveman-cloud/references/caveman-discover.md +76 -114
- package/dist/skills/caveman-cloud/references/caveman-evidence-review.md +9 -4
- package/dist/skills/caveman-cloud/references/caveman-onboard.md +8 -7
- package/dist/skills/caveman-cloud/references/caveman-setup-recipes.md +102 -0
- package/dist/skills/caveman-cloud/references/caveman-setup.md +92 -257
- package/dist/skills/caveman-cloud/references/caveman-sql.md +3 -0
- package/package.json +5 -2
|
@@ -9,47 +9,47 @@ description: >
|
|
|
9
9
|
|
|
10
10
|
# Build dashboards from what the data shows
|
|
11
11
|
|
|
12
|
-
A chart is a JSON spec, not SQL: a `
|
|
13
|
-
|
|
12
|
+
A chart is a JSON spec, not SQL: a `type` (`timeseries`, `toplist` or
|
|
13
|
+
`bignumber`), a `source` (`requests`, `spans`, `tools` or `evals`), 1 to 6
|
|
14
|
+
`measures` (`{field, agg}` or an `expr` such as `count_if(error) / count()`),
|
|
14
15
|
optional `filters.row` / `filters.trace` expressions, and a `group_by` field.
|
|
15
|
-
The server compiles it over a fixed field catalog.
|
|
16
|
-
Cloud MCP (`caveman_describe`, `caveman_read`, `caveman_write`).
|
|
16
|
+
The server compiles it over a fixed field catalog.
|
|
17
17
|
|
|
18
18
|
## 1. Read what exists
|
|
19
19
|
|
|
20
|
-
Run `cvm context show` (or call `caveman_context`) and confirm the project. List dashboards with
|
|
21
|
-
`dashboards.list`; the `builtin:*` ones are read-only, so clone one through
|
|
22
|
-
`dashboards.create` with `source_dashboard_id` instead of rebuilding it.
|
|
23
|
-
|
|
24
20
|
```sh
|
|
25
|
-
cvm dashboards list
|
|
26
|
-
cvm charts catalog
|
|
21
|
+
cvm dashboards list | jq '.data.dashboards[] | {id, name, builtin}'
|
|
22
|
+
cvm charts catalog --range 7d | jq '.data.suggestions'
|
|
27
23
|
```
|
|
28
24
|
|
|
29
|
-
`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
`builtin:*` dashboards are read-only: clone one with `dashboards.create` and
|
|
26
|
+
`source_dashboard_id` instead of rebuilding it. `charts.catalog` returns every
|
|
27
|
+
source's fields (kind, unit, permission), the aggregations, ready presets and
|
|
28
|
+
up to eight suggestions read off the project's traffic, each with a reason.
|
|
29
|
+
Start from a suggestion or preset when one fits. `cvm charts values` without
|
|
30
|
+
`--field` returns ready filter expressions; with `--field model` the top
|
|
31
|
+
values.
|
|
33
32
|
|
|
34
33
|
## 2. Draft and verify each chart
|
|
35
34
|
|
|
36
|
-
Write the spec, then run it before saving:
|
|
37
|
-
|
|
38
35
|
```sh
|
|
39
|
-
cvm charts query --file chart.json
|
|
36
|
+
cvm charts query --file chart.json | jq '.data | {overall, groups_total, warnings, notices}'
|
|
40
37
|
```
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
`cave_chart_invalid` names the `target` and
|
|
44
|
-
only when its series hold data
|
|
45
|
-
|
|
39
|
+
`chart.json` is `{"chart": {...}, "range": {"preset": "7d"}}` (presets `1h` to
|
|
40
|
+
`90d`, or `from`/`to`). A 422 `cave_chart_invalid` names the `target` and
|
|
41
|
+
`position` to fix. Keep a chart only when its series hold data. Read
|
|
42
|
+
`notices` (unpriced requests are left out of cost, never counted as zero) and
|
|
43
|
+
`warnings` (slow shapes). `cvm charts samples --file chart.json` lists the
|
|
44
|
+
traces behind a chart or a point.
|
|
45
|
+
|
|
46
46
|
Fields `member` and `api_key` need billing:read; `tags.*` and `attributes.*`
|
|
47
|
-
need payload:read (request tags also billing:read)
|
|
48
|
-
means pick another field, not a broader credential.
|
|
47
|
+
need payload:read (request tags also billing:read). A 403
|
|
48
|
+
`cave_chart_forbidden` means pick another field, not a broader credential.
|
|
49
49
|
|
|
50
50
|
Filter grammar: `model = 'x'`, `latency > 2`, `status_code in (500, 502)`,
|
|
51
|
-
`tags.branch is not null`, `model contains 'claude'`, joined with and
|
|
52
|
-
Text is single-quoted. Duration is seconds, cost
|
|
51
|
+
`tags.branch is not null`, `model contains 'claude'`, joined with and, or,
|
|
52
|
+
not. Text is single-quoted. Duration is seconds, cost USD, percent 0 to 1.
|
|
53
53
|
|
|
54
54
|
## 3. Save
|
|
55
55
|
|
|
@@ -61,12 +61,18 @@ cvm dashboards add_chart --file add.json
|
|
|
61
61
|
`dashboards.add_chart` takes `{"dashboard_id": ..., "chart": {...}}` and
|
|
62
62
|
appends atomically. `dashboards.update` needs the `version` you read; a 409
|
|
63
63
|
`cave_dashboard_conflict` means re-read and reapply. Name charts for the
|
|
64
|
-
question they answer.
|
|
64
|
+
question they answer. Never save a chart you did not run.
|
|
65
|
+
|
|
66
|
+
## 4. Alerts
|
|
67
|
+
|
|
68
|
+
`alerts.create` watches one `bignumber` query over `window_minutes` against a
|
|
69
|
+
`threshold` with a `comparator`. When it fires or resolves, the
|
|
70
|
+
organization's owners and admins get an Inbox item and an email;
|
|
71
|
+
`webhook_id` also posts to an existing webhook. Run the same query with
|
|
72
|
+
`charts.query` over that window first to pick a threshold that would not fire
|
|
73
|
+
today, and tell the user who it notifies. `cvm alerts list` shows what exists.
|
|
65
74
|
|
|
66
|
-
|
|
75
|
+
Good output: the dashboard id and its console link, each chart's title with
|
|
76
|
+
the `overall` figure it returned, and any alert with its threshold and recipients.
|
|
67
77
|
|
|
68
|
-
|
|
69
|
-
`threshold`. When it fires or resolves, the organization's owners and admins
|
|
70
|
-
get an Inbox item and an email; `webhook_id` (optional) also posts it to an
|
|
71
|
-
existing webhook. Confirm the threshold with `charts.query` over the same
|
|
72
|
-
window first, and say who it notifies.
|
|
78
|
+
Next: **caveman-sql** when the catalog cannot express the question.
|
|
@@ -2,21 +2,19 @@
|
|
|
2
2
|
name: caveman-cloud-evals
|
|
3
3
|
description: >
|
|
4
4
|
Write a Caveman Cloud eval as one file, check it, run it, and gate a change
|
|
5
|
-
on it in CI. Use for eval setup, regression tests,
|
|
6
|
-
|
|
5
|
+
on it in CI. Use for eval setup, regression tests, baselines, comparing two
|
|
6
|
+
runs, or an eval that must run on every pull request.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# An eval is one file: write it, check it, run it
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
A saved file is not a result. The work is done when a Run has a Verdict, or an
|
|
19
|
-
honest statement of why it has none.
|
|
11
|
+
A **Dataset** holds the cases. A **Criterion** is one thing the output must do
|
|
12
|
+
or avoid. A **Run** is the task's outputs on those cases, graded. A
|
|
13
|
+
**Judgment** is one Criterion on one case. A **Verdict** is what comparing two
|
|
14
|
+
Runs says: passed, failed, or need more data. An **Experiment** is the named
|
|
15
|
+
series of Runs; the file's `name` is the Experiment. A saved file is not a
|
|
16
|
+
result: the work is done when a Run has a Verdict, or an honest reason it has
|
|
17
|
+
none.
|
|
20
18
|
|
|
21
19
|
## 1. Write the file
|
|
22
20
|
|
|
@@ -24,98 +22,50 @@ honest statement of why it has none.
|
|
|
24
22
|
cvm evals init evals/support.eval.json
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
This writes three cases, a task, two criteria, a strict gate and a budget.
|
|
28
|
-
from the workload's own contract, tests and entry point:
|
|
29
|
-
|
|
30
|
-
- **`name`**:
|
|
31
|
-
|
|
32
|
-
- **`dataset`**: `cases`
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
and fails a CI job. Use strict until the Dataset is that large. A Run
|
|
58
|
-
stores the policy on the Experiment, and a gate that names none is read by
|
|
59
|
-
the stored one (`statistical` until one is stored), so name it rather than
|
|
60
|
-
rely on a default: an earlier file's `strict` still decides. Leave the gate
|
|
61
|
-
out and the Run is reported and never compared.
|
|
62
|
-
- **`trials`** when an output varies from one call to the next. The case, not
|
|
63
|
-
the trial, is what the statistics count.
|
|
25
|
+
This writes three cases, a task, two criteria, a strict gate and a budget.
|
|
26
|
+
Replace each part from the workload's own contract, tests and entry point:
|
|
27
|
+
|
|
28
|
+
- **`name`**: keep it stable; the same name is the same Experiment and
|
|
29
|
+
Dataset every time, so Runs line up.
|
|
30
|
+
- **`dataset`**: `cases` in the file (`id`, `input`, and `expected` when a
|
|
31
|
+
right answer is known), or `{"name": "...", "version": N}` for a project
|
|
32
|
+
Dataset. Take cases from fixtures, operator data or authorized traces and
|
|
33
|
+
keep their source ids. A made-up edge case is fine when marked; it is not
|
|
34
|
+
production coverage. An output seen in a trace is an observation, not a
|
|
35
|
+
right answer.
|
|
36
|
+
- **`task`**: `{"command": [...]}` runs the customer's code once per case and
|
|
37
|
+
trial (input as JSON on stdin, output from stdout). This is the default: it
|
|
38
|
+
exercises the real code. `{"recorded": "column"}` grades outputs already in
|
|
39
|
+
the Dataset.
|
|
40
|
+
- **`criteria`**, best first: a library criterion by name
|
|
41
|
+
(`cvm criteria list`), so evals and monitors ask the same question; a fixed
|
|
42
|
+
check (`{"type": "contains", ...}`, types and options from
|
|
43
|
+
`cvm criteria catalog`); a judge question
|
|
44
|
+
(`{"judge": {"question", "pass", "fail"}}`) when no check can decide.
|
|
45
|
+
Judges, trust and RAG templates: **caveman-cloud-criteria**.
|
|
46
|
+
- **`gate`**: a full Run is compared with the Experiment's saved baseline.
|
|
47
|
+
`{"policy": "strict"}` fails when any criterion got worse on any case and
|
|
48
|
+
decides on a handful of cases. `statistical` reads a pass only on about 30
|
|
49
|
+
cases or more, else need more data (exit 6, which fails CI). Use strict
|
|
50
|
+
until the Dataset is that large. A Run stores the policy on the
|
|
51
|
+
Experiment, and a gate that names none is read by the stored one
|
|
52
|
+
(`statistical` until one is stored): name it. No gate: reported, never
|
|
53
|
+
compared.
|
|
54
|
+
- **`trials`** when outputs vary; the case, not the trial, is what counts.
|
|
64
55
|
- **`budget_usd`**: the most the Run may spend. Required over one trial and
|
|
65
|
-
whenever a project key runs the file,
|
|
56
|
+
whenever a project key runs the file, as in CI.
|
|
66
57
|
|
|
67
58
|
Keep secrets and captured content out of the file: it is committed.
|
|
68
59
|
|
|
69
|
-
### Answers built on retrieved context (RAG)
|
|
70
|
-
|
|
71
|
-
`cvm criteria catalog` returns four ready-made judge questions under
|
|
72
|
-
`templates`, each with its rubric (`statement`, `pass_def`, `fail_def`,
|
|
73
|
-
`na_def`), what the judge must be shown (`inputs`) and one worked example:
|
|
74
|
-
|
|
75
|
-
| Template | Passes when | The judge must see |
|
|
76
|
-
| --- | --- | --- |
|
|
77
|
-
| `faithfulness` | every claim in the answer is supported by the retrieved context | output, context |
|
|
78
|
-
| `context_relevance` | the retrieved context holds what the question asks for | question, context |
|
|
79
|
-
| `answer_relevance` | the answer addresses the question that was asked | question, output |
|
|
80
|
-
| `cites_sources` | every claim cites a retrieved passage that supports it | output, context |
|
|
81
|
-
|
|
82
|
-
In a Run a judge is shown the task's output and nothing else. So the task
|
|
83
|
-
prints what it retrieved beside what it answered, and repeats the question:
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{"question": "How long do I have to ask for a refund?", "context": ["Annual plans can be refunded within 30 days of purchase."], "answer": "Within 30 days of purchase."}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
and the criterion is a judge question whose text is the template's:
|
|
90
|
-
|
|
91
|
-
```json
|
|
92
|
-
{"name": "Faithful to the context", "judge": {"question": "<statement>", "pass": "<pass_def>", "fail": "<fail_def>"}}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
An output that carries no context cannot be judged on it: fix the task, do
|
|
96
|
-
not reword the question. On live traffic a judge reads the retrieval steps a
|
|
97
|
-
trace recorded, so the same template made a library criterion
|
|
98
|
-
(`cvm criteria create`, kind `question`) needs nothing added.
|
|
99
|
-
|
|
100
|
-
A template is wording, not trust. A criterion made from one is a judge
|
|
101
|
-
question like any other: its judge is unproven for it until it has qualified,
|
|
102
|
-
and until then its answers are reported and decide nothing.
|
|
103
|
-
|
|
104
60
|
## 2. Check it
|
|
105
61
|
|
|
106
62
|
```sh
|
|
107
|
-
cvm evals validate evals/support.eval.json
|
|
63
|
+
cvm evals validate evals/support.eval.json # exit 2 names each error by JSON path
|
|
64
|
+
cvm evals run evals/support.eval.json --dry-run # runs the task, sends nothing
|
|
108
65
|
```
|
|
109
66
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
resolved in the project. Then run the task with nothing sent:
|
|
113
|
-
|
|
114
|
-
```sh
|
|
115
|
-
cvm evals run evals/support.eval.json --dry-run
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Fix a task that errors before spending on grading.
|
|
67
|
+
`--offline` checks the shape alone without sign-in. Fix a task that errors
|
|
68
|
+
before paying for grading.
|
|
119
69
|
|
|
120
70
|
## 3. Run it
|
|
121
71
|
|
|
@@ -123,30 +73,21 @@ Fix a task that errors before spending on grading.
|
|
|
123
73
|
cvm evals run evals/support.eval.json --set-baseline-on-pass
|
|
124
74
|
```
|
|
125
75
|
|
|
126
|
-
The first Run
|
|
127
|
-
|
|
128
|
-
baseline on the server, and the same comparison is what the console shows.
|
|
129
|
-
|
|
130
|
-
Read the result before reporting it:
|
|
131
|
-
|
|
132
|
-
- **Exit 0**: passed, or nothing to gate (no gate, no baseline yet, a partial
|
|
133
|
-
or dry run). Say which.
|
|
134
|
-
- **Exit 5**: the gate failed. Report the regressed cases and the judge's
|
|
135
|
-
reason on each.
|
|
136
|
-
- **Exit 6**: no Verdict. More data is needed (the sentence says about how
|
|
137
|
-
many cases would settle it), the two Runs are not comparable (a case or a
|
|
138
|
-
criterion changed since the baseline; the sentence says which and prints
|
|
139
|
-
the `cvm evals set_baseline` command that saves this Run as the new one),
|
|
140
|
-
or an output could not be graded. None of these is a pass and none is a
|
|
141
|
-
failure. Save a new baseline only when the change was meant.
|
|
142
|
-
- **Exit 2** an invalid file. **Exit 1** the Run crashed.
|
|
76
|
+
The first Run has nothing to compare with: it exits 0 and becomes the
|
|
77
|
+
baseline. Later Runs are compared with it on the server, as the console shows.
|
|
143
78
|
|
|
144
|
-
|
|
145
|
-
|
|
79
|
+
- **0**: passed, or nothing to gate (no gate, no baseline, partial or dry
|
|
80
|
+
run). Say which.
|
|
81
|
+
- **5**: the gate failed. Report the regressed cases and the judge's reason.
|
|
82
|
+
- **6**: no Verdict: more data needed (the sentence says how much), the Runs
|
|
83
|
+
are not comparable (a case or criterion changed; the sentence prints the
|
|
84
|
+
`cvm evals set_baseline` command), or an output could not be graded. Not a
|
|
85
|
+
pass, not a failure. Save a new baseline only when the change was meant.
|
|
86
|
+
- **2** an invalid file, **1** the Run crashed.
|
|
146
87
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
88
|
+
`--first N` or `--sample N --seed S` grade a few cases for a quick look; such
|
|
89
|
+
a Run is never compared or saved as a baseline. Quote a judge's reason, never
|
|
90
|
+
write one; an unproven judge's answer decides nothing.
|
|
150
91
|
|
|
151
92
|
## 4. Gate changes in CI
|
|
152
93
|
|
|
@@ -154,49 +95,30 @@ the criterion; an unproven one is reported as unproven.
|
|
|
154
95
|
cvm evals ci evals/*.eval.json --junit-out caveman-evals.xml
|
|
155
96
|
```
|
|
156
97
|
|
|
157
|
-
The same Run, with
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
`
|
|
183
|
-
|
|
184
|
-
what it received beside what it answered. `cvm criteria create` and
|
|
185
|
-
`cvm criteria edit` write a version; `cvm criteria trust` says whether its
|
|
186
|
-
judge is trusted. Turning a criterion on for live traffic spends on the
|
|
187
|
-
customer's keys: stop and ask.
|
|
188
|
-
|
|
189
|
-
Through the Cloud MCP the same operations are reached by id (`criteria.list`,
|
|
190
|
-
`criteria.catalog`, `datasets.create`, `evals.create`, `evals.run`,
|
|
191
|
-
`evals.compare`): describe one with
|
|
192
|
-
`caveman_describe`, read with `caveman_read`, write with `caveman_write`.
|
|
193
|
-
|
|
194
|
-
## 6. Report
|
|
195
|
-
|
|
196
|
-
Give the file path, the Experiment and Run ids, the Verdict with the server's
|
|
197
|
-
sentence and the baseline it was read against, counts of passed, failed and
|
|
198
|
-
errored Judgments per criterion, the failing case ids with the judge's reason
|
|
199
|
-
(or that it was withheld from a project key's read), cost when it is known,
|
|
200
|
-
and what remains. Keep these apart: a file that
|
|
201
|
-
validates, a dry run, a graded Run, a Run compared with a baseline, a gate in
|
|
202
|
-
CI. Unknown cost stays unknown.
|
|
98
|
+
The same Run, with commit, branch and pull request, and one JUnit case per
|
|
99
|
+
case and criterion. No GitHub needed. `CAVE_TOKEN` is a project key made for
|
|
100
|
+
this (console: New key, "Runs evals from CI", a daily spend limit) and
|
|
101
|
+
`CAVE_PROJECT_ID` its project. `--advisory` reports without failing. On GitHub
|
|
102
|
+
Actions the Caveman action's `files:` input runs this command. That key reads
|
|
103
|
+
no captured content, so:
|
|
104
|
+
|
|
105
|
+
- the file names `budget_usd`, held against the key's daily limit;
|
|
106
|
+
- cases are written in the file, or the task is one Caveman runs (a command
|
|
107
|
+
task on a named Dataset needs rows the key cannot read);
|
|
108
|
+
- its Run holds no judge reasons or error text: report the failing cases and
|
|
109
|
+
point to the Run in the console.
|
|
110
|
+
|
|
111
|
+
Do not create the key, raise its limit or change what gates a merge unless
|
|
112
|
+
asked for exactly that.
|
|
113
|
+
|
|
114
|
+
## 5. Report
|
|
115
|
+
|
|
116
|
+
The file path, Experiment and Run ids, the Verdict with the server's sentence
|
|
117
|
+
and its baseline, passed, failed and errored Judgments per criterion, failing
|
|
118
|
+
case ids with the judge's reason (or that it was withheld), known cost, and
|
|
119
|
+
what remains. Keep apart: a valid file, a dry run, a graded Run, a compared
|
|
120
|
+
Run, a CI gate. Unknown cost stays unknown.
|
|
121
|
+
|
|
122
|
+
MCP: the same ids (`evals.create`, `evals.run`, `evals.compare`,
|
|
123
|
+
`datasets.create`) through `caveman_describe`, `caveman_read`, `caveman_write`.
|
|
124
|
+
Next: **caveman-cloud-compare** to read two Runs side by side.
|
|
@@ -61,7 +61,16 @@ state transitions; use **caveman-cloud-compare** for compatible paired runs.
|
|
|
61
61
|
|
|
62
62
|
## 4. Draft monitors for the same failures
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
```sh
|
|
65
|
+
cvm monitors list | jq '.data.data[] | {id, name, status, sample_rate}'
|
|
66
|
+
cvm quality_setup proposals # criteria, judge and budget drafted per workload
|
|
67
|
+
cvm monitors estimate --file draft.json # last 7 days: matching units, judge cost
|
|
68
|
+
cvm monitors results MONITOR_ID --window 7d
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
A new check is `cvm criteria propose` (proposed until a person turns it on).
|
|
72
|
+
Approving a workload's criteria and budget, and setting a monitor `active`,
|
|
73
|
+
are a person's. For each requested monitor, choose the workflow/filter, grader, threshold,
|
|
65
74
|
required metadata or payload, sampling rate, and collection destination. Explain
|
|
66
75
|
why the check detects a real failure and estimate judge cost from known traffic
|
|
67
76
|
volume; label missing volume or prices unknown. Use the discovered schema's
|
|
@@ -94,4 +103,5 @@ Stop before promotion, monitor activation, live policy changes, or deployment.
|
|
|
94
103
|
Do not create a first experiment, invite teammates, or change budgets merely to
|
|
95
104
|
finish setup. Strict rollout evidence and independent holdout authority remain
|
|
96
105
|
separate from ordinary self-authored evals. Continue work already authorized;
|
|
97
|
-
ask only for a missing decision that blocks the next dependent step.
|
|
106
|
+
ask only for a missing decision that blocks the next dependent step. Criteria
|
|
107
|
+
and judges: **caveman-cloud-criteria**.
|
|
@@ -25,17 +25,9 @@ Authoring/export is not execution. Report the backend's passed, failed, or incom
|
|
|
25
25
|
|
|
26
26
|
## HTTP simulation suites
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
`
|
|
30
|
-
do not send an agent-task manifest
|
|
31
|
-
|
|
32
|
-
```sh
|
|
33
|
-
cvm scenario-connections list
|
|
34
|
-
cvm tools describe scenario-suites.create
|
|
35
|
-
cvm scenario-suites create --file suite.json
|
|
36
|
-
cvm scenario-suites run --file run.json --wait
|
|
37
|
-
cvm scenario-runs wait RUN_UUID
|
|
38
|
-
```
|
|
28
|
+
HTTP simulation suites (conversation tests against a sandbox endpoint) have no
|
|
29
|
+
`cvm` operation yet: `cvm tools list` won't show them. Tell the user they run
|
|
30
|
+
from the console's Scenarios page, and do not send an agent-task manifest there.
|
|
39
31
|
|
|
40
32
|
Use an existing sandbox connection with reset support. Connection creation,
|
|
41
33
|
egress credentials and rollout-gate changes are human-only. Suites freeze cases,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: caveman-cloud-setup-inventory
|
|
3
|
+
description: >
|
|
4
|
+
What a Caveman Cloud setup inventory holds: the item kinds, how names, paths
|
|
5
|
+
and eval cases must look to verify, and which files never to cite. Read from
|
|
6
|
+
caveman-cloud-setup step 2.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# The setup inventory
|
|
10
|
+
|
|
11
|
+
Read **caveman-cloud-setup** first: its rules bind every item here. Then build
|
|
12
|
+
the items for `cvm setup assert` (`cvm tools describe setup.assert` has the
|
|
13
|
+
exact schema).
|
|
14
|
+
|
|
15
|
+
Read the default branch's tracked files. Record one item per finding:
|
|
16
|
+
|
|
17
|
+
| kind | what | name | extra fields |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| workload | a place the app calls a model for one business job | slug: `support-agent` | path of its entrypoint |
|
|
20
|
+
| prompt | a system or task prompt file or string | short token | `workload` |
|
|
21
|
+
| tool | a tool or function schema the model can call | the tool's name exactly | `workload` |
|
|
22
|
+
| model | a model id the code sends | the id exactly, e.g. `claude-sonnet-4-6` | `workload` |
|
|
23
|
+
| eval_case | one case in a test fixture, golden file or documented example | short token | `workload`, `input`, `expected` |
|
|
24
|
+
| gateway_config | a LiteLLM proxy config (`model_list`) or a Kong decK file (`_format_version`) | short token | `vendor`: litellm or kong |
|
|
25
|
+
| telemetry | an OpenTelemetry exporter, Langfuse or Helicone in the code | short token | `vendor`: otel, langfuse or helicone |
|
|
26
|
+
| ci | a CI workflow that runs the app's tests | short token | |
|
|
27
|
+
|
|
28
|
+
- `path` is repository-relative; add `line` when one line carries the item.
|
|
29
|
+
- Names are single tokens of at least 3 characters without spaces. Workload
|
|
30
|
+
names are lowercase slugs. A name verifies only as a whole identifier.
|
|
31
|
+
- Model and tool names shorter than 6 characters (`gpt-5`, `o3`, `fetch`)
|
|
32
|
+
are never checked (`name_too_short`): leave them out; the workload may then
|
|
33
|
+
stay unverified. At most 20 model and tool names per file.
|
|
34
|
+
- Copy each eval case's `input` and `expected` (each at least 8 characters)
|
|
35
|
+
exactly as the fixture or documented example holds them: whole values of
|
|
36
|
+
one record (one JSON object, or one block of lines where each value sits on
|
|
37
|
+
one line, quoted or alone on its line; a value spread over several lines
|
|
38
|
+
does not match). Never invent a case,
|
|
39
|
+
never write an expected answer yourself, never use a model's output as one.
|
|
40
|
+
At most 100 cases; prefer the ones that cover distinct behaviors.
|
|
41
|
+
- Skip vendored code, generated files and other people's examples.
|
|
42
|
+
- Never cite a file that holds secrets (keys, certificates, service-account
|
|
43
|
+
files, token stores, Terraform state or variables, `.aws`, `.ssh`, `.kube`,
|
|
44
|
+
`.docker`): the server refuses the whole assertion. Any path segment
|
|
45
|
+
starting with `secret`, `credentials` or `.env` is refused, so
|
|
46
|
+
`credentials_check.py` and `.envoy/` are too, as are env files by name
|
|
47
|
+
(`env`, `env.local`, `env.production` and other stages, `env.json`,
|
|
48
|
+
`env.yaml`, `env.sh`, `env.toml`, `env.ini`); code such as `env.ts` or
|
|
49
|
+
`env.py` is fine. Cite another file.
|
|
50
|
+
|
|
51
|
+
Next: assert all items in one call, **caveman-cloud-setup** step 3.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: caveman-cloud-setup-wiring
|
|
3
|
+
description: >
|
|
4
|
+
How to prepare each action a Caveman Cloud setup detection names: the held
|
|
5
|
+
wiring change, each workload's slug in its traffic, and history imports the
|
|
6
|
+
person uploads. Read from caveman-cloud-setup step 4.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# The action per detection
|
|
10
|
+
|
|
11
|
+
Read **caveman-cloud-setup** first: its rules bind every action here.
|
|
12
|
+
|
|
13
|
+
The answer's `detections` name one action each:
|
|
14
|
+
|
|
15
|
+
- `keep_litellm`, `keep_kong`, `add_otel_exporter`, or no gateway at all
|
|
16
|
+
(`route_through_caveman`): prepare the wiring following **caveman-setup**
|
|
17
|
+
and **caveman-setup-recipes**, plus caveman-cloud-setup's rules 3 and 4
|
|
18
|
+
(record mode, one revert variable). Create the branch `caveman/setup`
|
|
19
|
+
locally, commit the change there, and send the same edits with
|
|
20
|
+
`cvm setup hold`: `purpose`, `branch`, `revert_variable` `CAVEMAN_SETUP` and
|
|
21
|
+
`files` (a new file as `create`; an edit as exact
|
|
22
|
+
`old` and `new` text with `before_sha256`, the SHA-256 of the file as the
|
|
23
|
+
default branch holds it). The server refuses CI files, secrets, lockfiles,
|
|
24
|
+
manifests, tests and agent instruction or config files; leave those to the
|
|
25
|
+
person. Once published, the draft is a branch of their repository, so their
|
|
26
|
+
CI runs on it; say so in the report.
|
|
27
|
+
- **Name each workload in its traffic.** Caveman files a finding under the
|
|
28
|
+
agent its traffic names, and offers to fix it only for a workload the server
|
|
29
|
+
registered from your inventory. So the wiring sends each workload's slug,
|
|
30
|
+
exactly as you asserted it: direct wiring uses `GATEWAY/w/<workload>` as the
|
|
31
|
+
base URL (caveman-setup's app slug is the workload slug here), or the
|
|
32
|
+
header `x-cave-agent: <workload>` on each call where workloads share one
|
|
33
|
+
client. A LiteLLM or Kong path sends `x-cave-agent: <workload>` on its
|
|
34
|
+
export or forwarded requests only when one workload is behind it; when
|
|
35
|
+
several are, leave it out and report that path's traffic as not yet tied
|
|
36
|
+
to a workload.
|
|
37
|
+
- `import_langfuse_history`, `import_helicone_history`: tell the person to
|
|
38
|
+
export their history and upload it with their gateway key to the gateway's
|
|
39
|
+
`POST /v1/imports/history?format=langfuse` (or `helicone`). Imported
|
|
40
|
+
history counts toward the proving budget as a catalog estimate; it is never
|
|
41
|
+
measured spend, so it does not count as saved requests for Caveman's first
|
|
42
|
+
test, which needs live traffic. LiteLLM history is an OpenTelemetry export
|
|
43
|
+
for the gateway's `/v1/traces`. Uploading is the person's call.
|
|
44
|
+
|
|
45
|
+
Next: report, **caveman-cloud-setup** step 5.
|