@testmuai/rook-skill 0.1.0 → 0.1.7
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 +0 -1
- package/package.json +1 -1
- package/skills/SKILL.md +18 -3
- package/skills/references/ci.md +6 -4
- package/skills/references/headless-contract.md +13 -4
- package/skills/references/profiles.md +12 -6
- package/skills/references/scenarios.md +20 -12
- package/skills/references/troubleshooting.md +35 -27
- package/skills/references/verdicts.md +10 -0
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@ Install the Rook skill for Claude Code, Codex and Gemini CLI. Requires Node.js
|
|
|
4
4
|
22+ and npm. Install the [Rook CLI](https://github.com/LambdaTest/rook#install)
|
|
5
5
|
separately. The skill supports compatible CLI releases and has its own package
|
|
6
6
|
version; a CLI version bump alone does not require a skill-package release.
|
|
7
|
-
The npm commands below work after maintainers publish the first package.
|
|
8
7
|
|
|
9
8
|
```bash
|
|
10
9
|
npx @testmuai/rook-skill
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -11,6 +11,19 @@ Use Rook to derive scenarios, invoke the target and grade the evidence. Respect
|
|
|
11
11
|
requests to use another tool. For saved-result requests, read the supplied files
|
|
12
12
|
without starting setup, a new run or paid analysis.
|
|
13
13
|
|
|
14
|
+
## Your role
|
|
15
|
+
|
|
16
|
+
You are the orchestrator: you choose and run Rook commands, and Rook does the
|
|
17
|
+
testing work. Discovery is `rook explore`, test design is `rook generate`, and
|
|
18
|
+
invocation and grading are `rook run` and `rook report`. When the user asks to
|
|
19
|
+
explore, understand, plan tests for or test an agent, run the matching command.
|
|
20
|
+
Do not read the target's code to describe the agent, or write your own test
|
|
21
|
+
plan or verdicts, in its place. Answer from Rook's agents, scenarios and
|
|
22
|
+
verdicts. Read the target's source only for a step Rook needs from you, such as
|
|
23
|
+
a profile's transport and command, or to explain a Rook result. If credits or
|
|
24
|
+
authorization block the next command, name it and what it needs; manual
|
|
25
|
+
analysis is not a substitute.
|
|
26
|
+
|
|
14
27
|
## Setup and execution
|
|
15
28
|
|
|
16
29
|
Check `rook --version` and use `rook help <command>` for the installed CLI's
|
|
@@ -32,7 +45,7 @@ Use the next command needed by the current state:
|
|
|
32
45
|
|
|
33
46
|
| Need | Command |
|
|
34
47
|
| --- | --- |
|
|
35
|
-
| Sign in | `rook login
|
|
48
|
+
| Sign in | `rook login`; in CI, export `LT_USERNAME` and `LT_ACCESS_KEY` (no login step) |
|
|
36
49
|
| Select a project | `rook project use <id>` or `rook project create <name>` |
|
|
37
50
|
| Discover agents | `rook explore . --json` |
|
|
38
51
|
| Select an agent | `rook agent use <id>` |
|
|
@@ -44,7 +57,9 @@ Use the next command needed by the current state:
|
|
|
44
57
|
Choose the profile's transport and command from the target's source or the
|
|
45
58
|
user's invocation details; ask when unknown. See [profiles](references/profiles.md).
|
|
46
59
|
Use `rook help <command>` for flags and [scenarios](references/scenarios.md) to
|
|
47
|
-
scope a run with `--only`, classes, categories or tags.
|
|
60
|
+
scope a run with `--only`, classes, categories or tags. When an agent has more
|
|
61
|
+
than one profile, check the active profile with `rook profile` or pass
|
|
62
|
+
`rook run --profile <id>` to select the intended target.
|
|
48
63
|
|
|
49
64
|
## Authorization and credits
|
|
50
65
|
|
|
@@ -57,7 +72,7 @@ concluding that an effect is unverifiable. Keep secrets as `${VAR}` references t
|
|
|
57
72
|
`rook env set`, outside profiles and transcripts.
|
|
58
73
|
|
|
59
74
|
Announce spending before `explore`, `generate`, `run`, `profile add|fix`, `ask`
|
|
60
|
-
and `report --rca`. `profile test` invokes the target without Rook model credits.
|
|
75
|
+
and `run|report --rca`. `profile test` invokes the target without Rook model credits.
|
|
61
76
|
Use paid RCA only with user authorization. Track the user's budget across
|
|
62
77
|
commands; do not assume the CLI enforces an aggregate task cap. Check its help
|
|
63
78
|
for available limits. A null balance means unknown.
|
package/skills/references/ci.md
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Requires bash, jq, the Rook CLI, a committed `.testmuai/rook/` tree containing
|
|
4
4
|
`ROOK_AGENT_ID` and a selected, configured profile. Supply the profile's declared
|
|
5
5
|
environment variables through CI secrets, alongside `LT_USERNAME`, `LT_ACCESS_KEY`
|
|
6
|
-
and `ROOK_PROJECT_ID`.
|
|
6
|
+
and `ROOK_PROJECT_ID`. Rook signs in from `LT_USERNAME`/`LT_ACCESS_KEY` directly, ahead
|
|
7
|
+
of any stored sign-in, so the recipe needs no `rook login` step and the key never
|
|
8
|
+
appears on a command line. Set `GITHUB_RUN_ID` to a job label outside GitHub Actions.
|
|
7
9
|
A person must review the target, its real writes, credit spend and tool grants
|
|
8
10
|
before enabling this workflow. Install the CLI before this recipe; pin its
|
|
9
11
|
version in your own CI for reproducibility. Compatibility is checked through required output fields, not
|
|
@@ -12,7 +14,6 @@ an exact version string. Recheck changed commands with `rook help <command>`.
|
|
|
12
14
|
```bash
|
|
13
15
|
set -euo pipefail
|
|
14
16
|
printf 'Rook CLI: %s\n' "$(rook --version)" >&2
|
|
15
|
-
rook login --username "$LT_USERNAME" --access-key "$LT_ACCESS_KEY"
|
|
16
17
|
rook project use "$ROOK_PROJECT_ID"
|
|
17
18
|
rook agent use "$ROOK_AGENT_ID"
|
|
18
19
|
rook explore . --yes
|
|
@@ -69,5 +70,6 @@ same flags and result checks. Do not silently switch between these policies.
|
|
|
69
70
|
|
|
70
71
|
Cache the project `.testmuai/rook/` for history and comparisons. Never cache or
|
|
71
72
|
commit `~/.testmuai/rook/`. `--yes` supplies broad command-scoped tool consent;
|
|
72
|
-
existing deny policy still applies. Rook uses headless mode when
|
|
73
|
-
TTY or
|
|
73
|
+
existing deny policy still applies. Rook uses headless mode when `--yes` is passed,
|
|
74
|
+
stdin is not a TTY, or any of `CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, `BUILDKITE` or
|
|
75
|
+
`JENKINS_URL` is set (to any value, including `false`).
|
|
@@ -20,7 +20,7 @@ Commands that emit JSON write one document to stdout and prose to stderr.
|
|
|
20
20
|
| `plan` | `{ username, user_id, org_name, org_id, subscription, credits }`; null credits means the balance could not be read |
|
|
21
21
|
| `run` | `{ ok, error?, run_id?, halted, reason?, discarded?, unrunnable?, flag_problems?, credits, report? }` |
|
|
22
22
|
| `report` | `{ run_id, name?, dir, report }`; `dir` is the evidence folder |
|
|
23
|
-
| `scenarios list` | `{ agent_id, profile_id, total, runnable, scenarios: [{ scenario_id, title, feature_id, class, category?, state, excluded, unrunnable, multi_turn,
|
|
23
|
+
| `scenarios list` | `{ agent_id, profile_id, total, runnable, scenarios: [{ scenario_id, title, feature_id, class, category?, state, excluded, unrunnable, multi_turn, criteria }] }` |
|
|
24
24
|
| `scenarios exclude/include/delete` | `{ ok: true, verb, ... }` |
|
|
25
25
|
| `status` | `{ project_id, offline, agents: [{ local_id, name, tree, offline, features, scenarios, profiles, unfinished_runs, owed_runs }], runs? }` |
|
|
26
26
|
| `mcp list` | `{ errors, servers: [{ name, origin, transport, state, source, changed_since_approval, shadowed_by }] }` |
|
|
@@ -65,13 +65,22 @@ still use the network, change state or invoke the target.
|
|
|
65
65
|
|
|
66
66
|
## On disk
|
|
67
67
|
|
|
68
|
-
`.testmuai/rook/settings.json`
|
|
69
|
-
`.
|
|
68
|
+
In 0.1.6, `.testmuai/rook/settings.json` keeps a project selection per
|
|
69
|
+
environment in `selections[environment]`. After a switch, rook
|
|
70
|
+
uses the new environment's selection, which may be empty even when another
|
|
71
|
+
environment has one. Run `rook doctor` to see the active environment and
|
|
72
|
+
`rook status --json` to read its `project_id`; if it is missing or wrong, run
|
|
73
|
+
`rook project use <id>`.
|
|
74
|
+
|
|
75
|
+
New project directories usually use
|
|
76
|
+
`.testmuai/rook/projects/<project-slug>--<project-id>/`; existing `<project-id>`
|
|
77
|
+
directories are reused. Find the directory by its project ID rather than
|
|
78
|
+
assuming either form. Under its `agents/<agent-id>/` directory:
|
|
70
79
|
|
|
71
80
|
| Path | Contents |
|
|
72
81
|
| --- | --- |
|
|
73
82
|
| `agent.yaml`, `features/`, `findings.yaml` | Agent specification, capabilities and findings |
|
|
74
|
-
| `profiles/`, `scenarios/` | Invocation profiles and current scenarios |
|
|
83
|
+
| `profiles/`, `scenarios/` | Invocation profiles, generated profile READMEs and current scenarios |
|
|
75
84
|
| `runs/<run-id>/run.yaml` | Run manifest and pinned profile revision |
|
|
76
85
|
| `runs/<run-id>/` | Snapshots: `agent.yaml`, `features.yaml`, `profile.yaml` |
|
|
77
86
|
| `runs/<run-id>/report.yaml` | Report returned by `report --json` |
|
|
@@ -24,11 +24,14 @@ rook profile use <id>
|
|
|
24
24
|
rook profile show <id>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
`profile add` writes the script, runs it
|
|
28
|
-
|
|
29
|
-
may emit text despite `--json
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
`profile add` writes the script, runs it against the agent to verify it, and
|
|
28
|
+
corrects it. It may make several real target calls and costs Rook credits. It
|
|
29
|
+
may emit text despite `--json`; `--yes` (or `--allow` rules) permits its test
|
|
30
|
+
calls without a prompt. With neither `--from` nor `--command`, it reads the
|
|
31
|
+
material from stdin. If authoring stops after saving a profile but before
|
|
32
|
+
verification, the CLI keeps it as **unverified**. Inspect the saved script and
|
|
33
|
+
generated profile README, then use `rook profile test <id>` or
|
|
34
|
+
`rook profile fix <id>` as appropriate; do not treat the draft as ready to run.
|
|
32
35
|
|
|
33
36
|
`profile test` calls the agent once with `--goal` and says what came back.
|
|
34
37
|
Run it before the first `rook run` and after any change to the agent's URL,
|
|
@@ -49,4 +52,7 @@ rook env rm API_KEY
|
|
|
49
52
|
```
|
|
50
53
|
|
|
51
54
|
Never paste a value into a profile, a scenario, a transcript, or a commit.
|
|
52
|
-
Reference it as `${API_KEY}
|
|
55
|
+
Reference it as `${API_KEY}`. A verified `profile add` can store values it
|
|
56
|
+
actually used during verification; check `rook env list` and set any remaining
|
|
57
|
+
variables with `rook env set`. The shell's value takes precedence over a stored
|
|
58
|
+
value. `rook env show` prints the full secret, so avoid it in logs.
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
`--category` takes, comma-separated:
|
|
9
9
|
|
|
10
|
-
| Class | Categories
|
|
11
|
-
| -------------- |
|
|
12
|
-
| functional | `happy_path`, `negative`, `boundary`, `integration`, `state_context`
|
|
13
|
-
| non_functional | `
|
|
14
|
-
| adversarial | `prompt_injection`, `jailbreak`, `data_exfiltration`, `pii_leakage`, `harmful_content`, `hallucination`, `hijacking`, `policy_violation` |
|
|
10
|
+
| Class | Categories |
|
|
11
|
+
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
12
|
+
| functional | `happy_path`, `negative`, `boundary`, `integration`, `state_context` |
|
|
13
|
+
| non_functional | `token_economy`, `quality` |
|
|
14
|
+
| adversarial | `prompt_injection`, `jailbreak`, `data_exfiltration`, `pii_leakage`, `harmful_content`, `hallucination`, `hijacking`, `policy_violation`, `technical_injection` |
|
|
15
15
|
|
|
16
|
-
`
|
|
16
|
+
`performance` and `reliability` are no longer categories: `generate` refuses
|
|
17
|
+
them, though existing scenario files that use them still load and run.
|
|
17
18
|
|
|
18
19
|
Every scenario also carries free-form tags; `run --tag <names>` selects on them.
|
|
19
20
|
|
|
@@ -29,7 +30,13 @@ rook generate -- focus on the refund limits and the identity check
|
|
|
29
30
|
`generate` derives scenarios per feature and pins them; a second `generate`
|
|
30
31
|
only refreshes features whose pins are stale. `--force` re-derives everything.
|
|
31
32
|
It may emit text despite `--json`; check the exit code, then read
|
|
32
|
-
`rook scenarios list --json`.
|
|
33
|
+
`rook scenarios list --json`. An unknown `--class` or `--category` makes it exit
|
|
34
|
+
1 before analysing anything, listing every valid value.
|
|
35
|
+
|
|
36
|
+
Each scenario's feature is the one it was assigned. If the model named a
|
|
37
|
+
different feature, `generate` warns and saves that scenario excluded; review it
|
|
38
|
+
in `rook scenarios list --json` and bring it back with
|
|
39
|
+
`rook scenarios include <id>` if it belongs in runs.
|
|
33
40
|
|
|
34
41
|
## Listing and curating
|
|
35
42
|
|
|
@@ -44,10 +51,11 @@ IDs are separate arguments here, unlike `run --only SC-004,SC-009`. A
|
|
|
44
51
|
comma-joined string is one unknown ID: nothing changes, and the document still
|
|
45
52
|
says `ok: true` with the string under `unknown`. Check `changed` in the reply.
|
|
46
53
|
|
|
47
|
-
`list` recomputes `unrunnable` against the profile
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
toward Fail.
|
|
54
|
+
`list` recomputes `unrunnable` against the current profile. A scenario needing
|
|
55
|
+
multiple turns without an observed conversation handle, or token-economy
|
|
56
|
+
grading without reported usage, is skipped by `run` and counts toward the
|
|
57
|
+
assurance gap, not toward Fail. File and image requirements are not rejected
|
|
58
|
+
solely by their input kind: inspect what the profile script can actually send.
|
|
51
59
|
|
|
52
60
|
## Scoping a run
|
|
53
61
|
|
|
@@ -64,4 +72,4 @@ rook run --resume <id> --json # carry finished work into
|
|
|
64
72
|
|
|
65
73
|
`--only` takes one comma-separated argument; repeating the flag keeps only
|
|
66
74
|
the last occurrence, and a space-separated second id is read as instruction
|
|
67
|
-
text.
|
|
75
|
+
text. Each scenario runs once; there is no repeat count.
|
|
@@ -10,8 +10,8 @@ rook status --json
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
`doctor` prints version, node, workspace, environment, controller and api
|
|
13
|
-
reachability, identity, auth state, project, mode (`
|
|
14
|
-
|
|
13
|
+
reachability, identity, auth state, project, mode (`cli`, `tui` or `headless`)
|
|
14
|
+
and tty.
|
|
15
15
|
|
|
16
16
|
## Failure documents
|
|
17
17
|
|
|
@@ -21,23 +21,27 @@ Gate refusals on `report`, `status` and `ask`, and parser errors, may have no
|
|
|
21
21
|
JSON document; use the stderr diagnostic. Do not infer successful execution
|
|
22
22
|
from `ok: true` or from an old report on disk.
|
|
23
23
|
|
|
24
|
-
| `error` says
|
|
25
|
-
|
|
|
26
|
-
| `remedy: login`
|
|
27
|
-
| `remedy:
|
|
28
|
-
| `remedy:
|
|
29
|
-
| `remedy:
|
|
30
|
-
| `remedy:
|
|
31
|
-
| `remedy:
|
|
32
|
-
| `remedy:
|
|
33
|
-
| `remedy:
|
|
34
|
-
| `remedy:
|
|
35
|
-
| `remedy:
|
|
36
|
-
| `remedy:
|
|
37
|
-
| `remedy:
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
24
|
+
| `error` says | Do |
|
|
25
|
+
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| `remedy: login` | you are not signed in — `rook login`; in CI, export `LT_USERNAME` and `LT_ACCESS_KEY` |
|
|
27
|
+
| `remedy: repair_auth` | a stored sign-in could not be refreshed or saved — not a sign-out; run `rook login` again and check `~/.testmuai/rook` permissions |
|
|
28
|
+
| `remedy: new_session` | that session has been used up — run the command again |
|
|
29
|
+
| `remedy: retry` | could not reach the service — it may be down, or the network; wait and try again, or `rook doctor` |
|
|
30
|
+
| `remedy: wait` | rate-limited — wait the stated time, then retry |
|
|
31
|
+
| `remedy: server_error` | the service answered with an error — retry later; include the status in a bug report |
|
|
32
|
+
| `remedy: request_access` | you do not have access to this project — ask the org admin for access |
|
|
33
|
+
| `remedy: create_project` | this org has no projects yet — `rook project create <name>` |
|
|
34
|
+
| `remedy: pick_project` | no project selected — `rook project use <id>` |
|
|
35
|
+
| `remedy: agent_missing` | the active agent is gone — `rook agent use <id>` |
|
|
36
|
+
| `remedy: explore_agents` | no agents registered — `rook explore` |
|
|
37
|
+
| `remedy: pick_agent` | no agent selected — `rook agent use <id>` |
|
|
38
|
+
| `remedy: topup` | you are out of credits — check `rook plan` and add credits |
|
|
39
|
+
| `remedy: reconcile` | this agent has diverged from upstream — `rook sync` |
|
|
40
|
+
| `remedy: update` | this version is too old to be served — announce that `rook update` may install a newer version, then recheck skill compatibility |
|
|
41
|
+
| `remedy: report` | a client bug — file an issue with `rook export logs` attached |
|
|
42
|
+
| no active agent | `rook agent use <id>` after `rook explore` |
|
|
43
|
+
| no project selected | `rook project use <id>` or `rook project create <name>` |
|
|
44
|
+
| could not reach the service | check the network; `doctor` shows both endpoints |
|
|
41
45
|
|
|
42
46
|
## Discovery succeeds but registers no agents
|
|
43
47
|
|
|
@@ -59,14 +63,18 @@ are about something rook cannot see (a tool call the agent made off-record,
|
|
|
59
63
|
an image); that is a gap to report, not a failure to fix.
|
|
60
64
|
|
|
61
65
|
Inspect the saved raw response and hook records before concluding that the
|
|
62
|
-
target omitted evidence.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
not
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
target omitted evidence. In 0.1.1, an explicitly empty execute `calls` array
|
|
67
|
+
could be omitted from the hook record. It is not established whether later
|
|
68
|
+
releases still do this. If the saved raw response contains `calls: []` but the
|
|
69
|
+
hook record has no `calls`, report that gap and retain the recorded verdict;
|
|
70
|
+
do not invent calls or change scenario criteria just to obtain a pass.
|
|
71
|
+
|
|
72
|
+
The JSON-string decoding limitation observed in 0.1.1 is fixed in 0.1.6:
|
|
73
|
+
deterministic `json_path` checks can traverse valid JSON saved as a string in
|
|
74
|
+
`raw_response`. Invalid JSON, a raw string over the 8 MiB decode limit, or a
|
|
75
|
+
path that does not resolve yields Unable to Verify; the criterion's `achieved`
|
|
76
|
+
field explains why. Report that explanation and retain the recorded verdict;
|
|
77
|
+
do not invent evidence to fill the path.
|
|
70
78
|
|
|
71
79
|
## A verdict you disagree with
|
|
72
80
|
|
|
@@ -17,6 +17,16 @@ Statuses are **Pass**, **Fail**, and **Unable to Verify**. Unverifiable reasons:
|
|
|
17
17
|
`agent_never_ran`, `not_observable`, or `undecidable`. A scenario that never ran
|
|
18
18
|
has no verdict; do not turn its absence into a failure.
|
|
19
19
|
|
|
20
|
+
## Pass rate
|
|
21
|
+
|
|
22
|
+
In 0.1.6, `totals.pass_rate` is `Pass / (Pass + Fail + Unable to Verify)`.
|
|
23
|
+
`totals.decided` still means `Pass + Fail`. Unable to Verify contributes to the
|
|
24
|
+
pass-rate denominator as a recorded result, but remains a separate verdict;
|
|
25
|
+
never describe it as Fail. If every recorded result is Unable to Verify,
|
|
26
|
+
`pass_rate` is `0`; if there are no recorded Pass, Fail or Unable to Verify
|
|
27
|
+
results, it is `null`, not zero.
|
|
28
|
+
Unjudged, not-run and unrunnable work does not enter this denominator.
|
|
29
|
+
|
|
20
30
|
## Presenting results
|
|
21
31
|
|
|
22
32
|
Use a table like this, populated from the records:
|