@testmuai/rook-skill 0.1.6 → 0.1.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testmuai/rook-skill",
3
- "version": "0.1.6",
3
+ "version": "0.1.11",
4
4
  "description": "Install the Rook agent-testing skill for Claude Code, Codex and Gemini CLI",
5
5
  "type": "module",
6
6
  "bin": {
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`, or `rook login --username <u> --access-key <k>` for CI |
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>` |
@@ -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`. Set `GITHUB_RUN_ID` to a job label outside GitHub Actions.
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 stdin is not a
73
- TTY or a supported CI environment variable is set.
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, repeat, criteria }] }` |
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 }] }` |
@@ -48,6 +48,9 @@ Use `error`, or `reason` when present. Translate remedy tokens with
48
48
  - `halted: true` can retain a report and exit 0. Present it as incomplete.
49
49
  - Gate refusals on `report`, `status` and `ask`, and parser errors, may leave
50
50
  stdout empty. Use the stderr diagnostic rather than inventing an error object.
51
+ - A command that calls the model controller or opens an upstream job refuses
52
+ before anything runs or is charged when its session could not be registered.
53
+ Report it as no run and no spend, using the diagnostic it returns.
51
54
 
52
55
  ## Grants and accounting
53
56
 
@@ -65,8 +68,8 @@ still use the network, change state or invoke the target.
65
68
 
66
69
  ## On disk
67
70
 
68
- In 0.1.6, `.testmuai/rook/settings.json` keeps project selections separately for
69
- `local`, `stage` and `prod` in `selections[environment]`. After a switch, rook
71
+ Since 0.1.6, `.testmuai/rook/settings.json` keeps a project selection per
72
+ environment in `selections[environment]`. After a switch, rook
70
73
  uses the new environment's selection, which may be empty even when another
71
74
  environment has one. Run `rook doctor` to see the active environment and
72
75
  `rook status --json` to read its `project_id`; if it is missing or wrong, run
@@ -87,4 +90,6 @@ assuming either form. Under its `agents/<agent-id>/` directory:
87
90
  | `runs/<run-id>/scenarios/<scenario-id>/` | `snapshot.yaml`, `request.json`, `response.json`, artifacts and `verdict.yaml` |
88
91
 
89
92
  Home state at `~/.testmuai/rook/` includes credentials, grants and session
90
- transcripts. Keep it outside commits and shared evidence.
93
+ transcripts. Each session's `transcript.jsonl` records the raw input and output
94
+ of every role call, including refused, failed and interrupted calls. Keep it
95
+ outside commits and shared evidence.
@@ -7,13 +7,18 @@
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 | `performance`, `token_economy`, `reliability`, `quality` |
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
+
16
+ `performance` and `reliability` are no longer categories: `generate` refuses
17
+ them, though existing scenario files that use them still load and run.
15
18
 
16
19
  Every scenario also carries free-form tags; `run --tag <names>` selects on them.
20
+ Red-team scenarios also carry OWASP LLM, OWASP Agentic (ASI) and MITRE ATLAS
21
+ references.
17
22
 
18
23
  ## Generating
19
24
 
@@ -27,7 +32,18 @@ rook generate -- focus on the refund limits and the identity check
27
32
  `generate` derives scenarios per feature and pins them; a second `generate`
28
33
  only refreshes features whose pins are stale. `--force` re-derives everything.
29
34
  It may emit text despite `--json`; check the exit code, then read
30
- `rook scenarios list --json`.
35
+ `rook scenarios list --json`. An unknown `--class` or `--category` makes it exit
36
+ 1 before analysing anything, listing every valid value.
37
+
38
+ Each scenario's feature is the one it was assigned. If the model named a
39
+ different feature, `generate` warns and saves that scenario excluded; review it
40
+ in `rook scenarios list --json` and bring it back with
41
+ `rook scenarios include <id>` if it belongs in runs.
42
+
43
+ `rook sync` stops before uploading anything when a scenario names a feature its
44
+ agent does not carry, and lists each one with its agent, the missing feature and
45
+ a fix. Apply the listed fix and sync again; do not run against upstream until
46
+ sync succeeds.
31
47
 
32
48
  ## Listing and curating
33
49
 
@@ -47,6 +63,16 @@ multiple turns without an observed conversation handle, or token-economy
47
63
  grading without reported usage, is skipped by `run` and counts toward the
48
64
  assurance gap, not toward Fail. File and image requirements are not rejected
49
65
  solely by their input kind: inspect what the profile script can actually send.
66
+ `generate` keeps a scenario it cannot make runnable instead of dropping it:
67
+ `executable: false` with a `skip_reason` starting `coverage gap:`,
68
+ `invalid scenario:` or `invalid red-team scenario:`. Attack patterns with no
69
+ scenario for a feature are listed in the agent's `coverage-gaps.yaml`. Report
70
+ both as gaps, not as failures.
71
+
72
+ Some attack patterns are skipped until the profile has the hook they need,
73
+ and the skip reason names it: an `open` hook that seeds the fixture in
74
+ `$ROOK_STATE_DIR/attack-fixture.json`, a `collect` hook that reports the
75
+ observed control and outcome, or `open` and `close` hooks for a fresh session.
50
76
 
51
77
  ## Scoping a run
52
78
 
@@ -61,6 +87,10 @@ rook run --run <id> --phases collect,judge --json # collect evidence that la
61
87
  rook run --resume <id> --json # carry finished work into a new run
62
88
  ```
63
89
 
90
+ Without `--only`, a run selects at most two scenarios per attack pattern; the
91
+ rest are skipped as `pattern <id> already has 2 candidates in this run`. Name
92
+ them with `--only` to run more.
93
+
64
94
  `--only` takes one comma-separated argument; repeating the flag keeps only
65
95
  the last occurrence, and a space-separated second id is read as instruction
66
- text.
96
+ text. Each scenario runs once; there is no repeat count.
@@ -10,7 +10,7 @@ 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 (`headless` or `tui`)
13
+ reachability, identity, auth state, project, mode (`cli`, `tui` or `headless`)
14
14
  and tty.
15
15
 
16
16
  ## Failure documents
@@ -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 | Do |
25
- | ------------------------ | ----------------------------------------------------------------------------------------------- |
26
- | `remedy: login` | you are not signed in — `rook login`; in CI, `rook login --username <u> --access-key <k>` |
27
- | `remedy: new_session` | that session has been used up — run the command again |
28
- | `remedy: retry` | could not reach rook-api — it may be down, or the network; wait and try again, or `rook doctor` |
29
- | `remedy: request_access` | you do not have access to this project — ask the org admin for access |
30
- | `remedy: create_project` | this org has no projects yet — `rook project create <name>` |
31
- | `remedy: pick_project` | no project selected — `rook project use <id>` |
32
- | `remedy: agent_missing` | the active agent is gone — `rook agent use <id>` |
33
- | `remedy: explore_agents` | no agents registered — `rook explore` |
34
- | `remedy: pick_agent` | no agent selected — `rook agent use <id>` |
35
- | `remedy: topup` | you are out of credits — check `rook plan` and add credits |
36
- | `remedy: reconcile` | this agent has diverged from upstream — `rook sync` |
37
- | `remedy: update` | this version is too old to be served — announce that `rook update` may install a newer version, then recheck skill compatibility |
38
- | no active agent | `rook agent use <id>` after `rook explore` |
39
- | no project selected | `rook project use <id>` or `rook project create <name>` |
40
- | could not reach rook-api | check the network; `doctor` shows both endpoints |
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
 
@@ -15,11 +15,16 @@ criterion details, read `runs/<run-id>/scenarios/<scenario-id>/verdict.yaml`.
15
15
 
16
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
- has no verdict; do not turn its absence into a failure.
18
+ has no verdict; do not turn its absence into a failure. A grounded partial
19
+ compromise counts as Fail. Reports keep refusals, interrupted runs and coverage
20
+ gaps; carry them into the summary rather than dropping them. `report --json`
21
+ can add `coverage_gaps`, `redteam_coverage` (OWASP coverage of the scenario
22
+ inventory) and `summary_claims`; an unmapped control is unverified, not passed.
23
+ A **Partial** stored by an older run reads as Unable to Verify.
19
24
 
20
25
  ## Pass rate
21
26
 
22
- In 0.1.6, `totals.pass_rate` is `Pass / (Pass + Fail + Unable to Verify)`.
27
+ Since 0.1.6, `totals.pass_rate` is `Pass / (Pass + Fail + Unable to Verify)`.
23
28
  `totals.decided` still means `Pass + Fail`. Unable to Verify contributes to the
24
29
  pass-rate denominator as a recorded result, but remains a separate verdict;
25
30
  never describe it as Fail. If every recorded result is Unable to Verify,