Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codex/rook/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rook",
"version": "0.1.4",
"version": "0.1.5",
"description": "Rook by TestMu AI for Codex: test, evaluate, red-team or regression-check an AI agent you own with the Rook CLI, and interpret saved Rook results.",
"author": {
"name": "TestMu AI (formerly LambdaTest)",
Expand Down
26 changes: 18 additions & 8 deletions codex/rook/skills/rook/references/ci.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# In CI

Requires bash, jq, the Rook CLI, a committed `.testmuai/rook/` tree containing
`ROOK_AGENT_ID` and a selected, configured profile. Supply the profile's declared
environment variables through CI secrets, alongside `LT_USERNAME`, `LT_ACCESS_KEY`
and `ROOK_PROJECT_ID`. Rook signs in from `LT_USERNAME`/`LT_ACCESS_KEY` directly, ahead
Requires bash, jq, the Rook CLI, and a committed `.testmuai/rook/` tree with the
agent's scenarios and a selected, configured profile. Supply `ROOK_PROJECT_ID`,
`ROOK_AGENT_ID` (the agent in that tree), `LT_USERNAME`, `LT_ACCESS_KEY` and the
profile's declared environment variables through CI secrets or variables. Rook
signs in from `LT_USERNAME`/`LT_ACCESS_KEY` directly, ahead
of any stored sign-in, so the recipe needs no `rook login` step and the key never
appears on a command line. Set `GITHUB_RUN_ID` to a job label outside GitHub Actions.
A person must review the target, its real writes, credit spend and tool grants
Expand All @@ -16,8 +17,6 @@ set -euo pipefail
printf 'Rook CLI: %s\n' "$(rook --version)" >&2
rook project use "$ROOK_PROJECT_ID"
rook agent use "$ROOK_AGENT_ID"
rook explore . --yes
rook generate --yes --json
# A committed tree is not an upstream record. Publish the profile/scenarios first.
rook sync --yes
run_code=0
Expand All @@ -31,7 +30,11 @@ fi
# A declined or interrupted run can exit 0; neither is a completed suite.
jq -e '.ok == true and .discarded == null and .halted == false
and (.run_id | type == "string" and length > 0)
and (.report | type == "object") and (.credits | type == "number")' run.json >/dev/null
and (.report | type == "object") and (.credits | type == "number")' run.json >/dev/null || {
jq -r '"discarded: \(.discarded // "no"), halted: \(.halted), reason: \(.reason // "none")"' run.json >&2 || true
echo "rook run exited $run_code without a completed suite; inspect stderr" >&2
exit 1
}
run_id=$(jq -er '.run_id' run.json)
rook report "$run_id" --json > report.json
# Missing/malformed counts or a mismatched report must not become a green build.
Expand All @@ -41,7 +44,10 @@ jq -e --arg id "$run_id" '.run_id == $id and .report.run_id == $id
.unjudged, .not_run, .unrunnable] | all(.[]; type == "number" and . >= 0 and floor == .))
and (.report.totals | .planned == (.executed + .not_run)
and .executed == (.passed + .failed + .unverifiable + .unjudged))
and (.report.clusters | type == "array")' report.json >/dev/null
and (.report.clusters | type == "array")' report.json >/dev/null || {
echo "the report for $run_id is missing, malformed or for another run; inspect report.json" >&2
exit 1
}
jq -r '.report.totals | "Pass: \(.passed) · Fail: \(.failed) · Unable to Verify: \(.unverifiable)",
"Unjudged: \(.unjudged) · Not run: \(.not_run) · Unrunnable: \(.unrunnable)"' report.json
jq -r '"Total credits: \(.credits)"' run.json
Expand All @@ -66,6 +72,10 @@ shown in `verdicts.md`. Unrunnable scenarios are printed as an assurance gap;
this recipe does not fail on that gap alone. Optional summary fields are not
required for the gate.

The recipe runs the committed scenarios. `explore` and `generate` spend credits
and change the scenario set, so keep them out of the per-change job: run them
locally or in a manually triggered job, review the result and commit it.

`rook sync --yes` records the scenarios/profile upstream. If the requested CI
result should remain local instead, omit sync and use `rook run --test` with the
same flags and result checks. Do not silently switch between these policies.
Expand Down
19 changes: 13 additions & 6 deletions codex/rook/skills/rook/references/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Three kinds of target:
## Authoring headlessly

```bash
printf '%s\n' "curl http://127.0.0.1:9110/v1/triage -H 'content-type: application/json' -d '{\"input\":\"{{goal}}\"}'" > /tmp/profile.txt
rook profile add triage-http --from /tmp/profile.txt --yes
profile_src=$(mktemp)
printf '%s\n' "curl http://127.0.0.1:9110/v1/triage -H 'content-type: application/json' -d '{\"input\":\"{{goal}}\"}'" > "$profile_src"
rook profile add triage-http --from "$profile_src" --yes
rm -f "$profile_src"
rook profile add refund-cli --command 'claude -p "{{goal}}"' --yes
rook profile test --goal "Say hello and nothing else."
rook profile use <id>
Expand Down Expand Up @@ -52,14 +54,19 @@ should declare `concurrency: 1`.
## Secrets

```bash
rook env set '{"API_KEY":"…","BASE_URL":"https://staging.example.com"}'
rook env set --from .env # every variable in the file
rook env set BASE_URL https://staging.example.com # non-secret values only
rook env list # masked
rook env show API_KEY
rook env rm API_KEY
```

Never paste a value into a profile, a scenario, a transcript, or a commit.
Reference it as `${API_KEY}`. A verified `profile add` can store values it
Reference it as `${API_KEY}`. Never put a secret value on a command line you
run: it lands in the transcript and the shell history. Import secrets with
`rook env set --from <file>` from a `.env` or `.json` file the user already
has, or ask the user to run `rook env set KEY value` in their own terminal.
A verified `profile add` can store values it
actually used during verification; check `rook env list` and set any remaining
variables with `rook env set`. The shell's value takes precedence over a stored
value. `rook env show` prints the full secret, so avoid it in logs.
value. `rook env show` prints the full secret: do not run it for the user, and use
`rook env list` to see what is set.
2 changes: 1 addition & 1 deletion codex/rook/skills/rook/references/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ from `ok: true` or from an old report on disk.
| `remedy: plan_required` | the org has no active Agent Assurance plan (none, an ended free trial or an expired subscription), whatever its credit balance — nothing ran or was charged; tell the user the plan does not include Rook, and for plan options point to [TestMu AI pricing](https://www.testmuai.com/pricing/), not to the trial or billing link the refusal names |
| `remedy: upgrade_plan` | the plan has no Rook cloud (such as Starter) — sync, cloud project status and recording runs on Rook cloud are refused; keep work local with `rook run --test`, or tell the user the plan does not include Rook cloud |
| `remedy: reconcile` | this agent has diverged from upstream — `rook sync` |
| `remedy: update` | this version is too old to be served — announce that `rook update` may install a newer version, then recheck skill compatibility |
| `remedy: update` | this version is too old to be served — `rook update` installs a newer version; run it only with the user's authorization, then recheck skill compatibility |
| `remedy: report` | a client bug — file an issue with `rook export logs` attached |
| no active agent | `rook agent use <id>` after `rook explore` |
| no project selected | `rook project use <id>` or `rook project create <name>` |
Expand Down
2 changes: 1 addition & 1 deletion codex/skill-source.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LambdaTest/rook 3ece336df59525057723c81092bafd055e5aff7f skill-installer/skills/
LambdaTest/rook 8b752279b9c08f5d28571236c080b2e6ba04e3a9 skill-installer/skills/
2 changes: 1 addition & 1 deletion plugins/rook-skills/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rook-skills",
"version": "0.1.0",
"version": "0.1.1",
"description": "Rook by TestMu AI: test, evaluate, red-team or regression-check an AI agent you own with the Rook CLI, and read saved Rook results. Claude runs Rook, announces credit spend first and asks before steps with real effects. Skills only: no hooks, no MCP server, no code.",
"author": {
"name": "TestMu AI",
Expand Down
4 changes: 2 additions & 2 deletions plugins/rook-skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you installed the skill with `npx @testmuai/rook-skill`, Claude Code loads tw
- **Credits.** Claude says it is about to spend credits before `rook explore`, `generate`, `run`, `profile add` or `profile fix`, `ask`, and `run` or `report` with `--rca`. Paid root-cause analysis runs only with your authorization.
- **Real effects.** Before `profile add`, `profile fix`, `profile test` or `run`, Claude checks the agent's `agent.yaml` for calls marked `write: true`. Those steps call your real agent, and Rook cannot undo what it does. Claude uses a staging target and asks for your authorization first.
- **Plans.** If your plan does not cover a step, Rook refuses it and nothing is charged. Claude tells you what the plan does not include and never passes on a billing, upgrade or trial link.
- **Secrets.** Profiles hold `${VAR}` references, and the values are stored on your machine with `rook env set`. A value Claude puts in a command appears in the chat, so set real secrets yourself with `rook env set` in your own terminal. `rook env show` prints a stored value in full.
- **Secrets.** Profiles hold `${VAR}` references, and the values are stored on your machine with `rook env set`. Claude imports secrets from a `.env` or `.json` file you already have (`rook env set --from`) or asks you to run `rook env set` in your own terminal, so secret values stay off its command lines and out of the chat. It does not run `rook env show`, which prints a stored value in full.
- **Installing.** If Rook is missing, Claude points you to the [Rook install guide](https://github.com/LambdaTest/rook#install). It does not install or update Rook without your authorization.

## What it runs
Expand All @@ -45,7 +45,7 @@ Claude runs these through its own Bash tool, so Claude Code asks for your permis
| `rook sync`, `rook run`, `rook report --rca` | You ask to run scenarios or explain failures, after a credit notice | Scenarios, your agent's replies and the evidence, to TestMu AI's Rook service; a run also calls your real agent |
| `rook scenarios exclude`, `include` or `delete` | You ask to curate scenarios. `delete` is permanent | Nothing until the next `sync` |
| `rook mcp add`, `rook mcp approve` | Your agent's tools come from an MCP server | Nothing; `add` writes Rook's MCP config, and `approve` lets Rook start a server found in your repository when a scenario needs it |
| `rook env set`, `env list`, `env show`, `env rm` | Storing variables a profile needs | No values; they are stored in `~/.testmuai/rook/` on your machine |
| `rook env set`, `env list`, `env rm` | Storing variables a profile needs; secrets come from a file (`--from`) or from you | No values; they are stored in `~/.testmuai/rook/` on your machine |
| `rook export logs` | You ask for a bug report | Nothing; it writes a bundle of Rook's session logs where you choose |
| `rook update` | Only with your authorization, when Rook says the installed CLI is too old | Downloads and installs a newer Rook CLI |
| Your agent, through its profile (an HTTP call or a command) | During `profile add`, `profile fix`, `profile test` and `run` | Whatever your agent itself sends |
Expand Down
26 changes: 18 additions & 8 deletions plugins/rook-skills/skills/rook/references/ci.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# In CI

Requires bash, jq, the Rook CLI, a committed `.testmuai/rook/` tree containing
`ROOK_AGENT_ID` and a selected, configured profile. Supply the profile's declared
environment variables through CI secrets, alongside `LT_USERNAME`, `LT_ACCESS_KEY`
and `ROOK_PROJECT_ID`. Rook signs in from `LT_USERNAME`/`LT_ACCESS_KEY` directly, ahead
Requires bash, jq, the Rook CLI, and a committed `.testmuai/rook/` tree with the
agent's scenarios and a selected, configured profile. Supply `ROOK_PROJECT_ID`,
`ROOK_AGENT_ID` (the agent in that tree), `LT_USERNAME`, `LT_ACCESS_KEY` and the
profile's declared environment variables through CI secrets or variables. Rook
signs in from `LT_USERNAME`/`LT_ACCESS_KEY` directly, ahead
of any stored sign-in, so the recipe needs no `rook login` step and the key never
appears on a command line. Set `GITHUB_RUN_ID` to a job label outside GitHub Actions.
A person must review the target, its real writes, credit spend and tool grants
Expand All @@ -16,8 +17,6 @@ set -euo pipefail
printf 'Rook CLI: %s\n' "$(rook --version)" >&2
rook project use "$ROOK_PROJECT_ID"
rook agent use "$ROOK_AGENT_ID"
rook explore . --yes
rook generate --yes --json
# A committed tree is not an upstream record. Publish the profile/scenarios first.
rook sync --yes
run_code=0
Expand All @@ -31,7 +30,11 @@ fi
# A declined or interrupted run can exit 0; neither is a completed suite.
jq -e '.ok == true and .discarded == null and .halted == false
and (.run_id | type == "string" and length > 0)
and (.report | type == "object") and (.credits | type == "number")' run.json >/dev/null
and (.report | type == "object") and (.credits | type == "number")' run.json >/dev/null || {
jq -r '"discarded: \(.discarded // "no"), halted: \(.halted), reason: \(.reason // "none")"' run.json >&2 || true
echo "rook run exited $run_code without a completed suite; inspect stderr" >&2
exit 1
}
run_id=$(jq -er '.run_id' run.json)
rook report "$run_id" --json > report.json
# Missing/malformed counts or a mismatched report must not become a green build.
Expand All @@ -41,7 +44,10 @@ jq -e --arg id "$run_id" '.run_id == $id and .report.run_id == $id
.unjudged, .not_run, .unrunnable] | all(.[]; type == "number" and . >= 0 and floor == .))
and (.report.totals | .planned == (.executed + .not_run)
and .executed == (.passed + .failed + .unverifiable + .unjudged))
and (.report.clusters | type == "array")' report.json >/dev/null
and (.report.clusters | type == "array")' report.json >/dev/null || {
echo "the report for $run_id is missing, malformed or for another run; inspect report.json" >&2
exit 1
}
jq -r '.report.totals | "Pass: \(.passed) · Fail: \(.failed) · Unable to Verify: \(.unverifiable)",
"Unjudged: \(.unjudged) · Not run: \(.not_run) · Unrunnable: \(.unrunnable)"' report.json
jq -r '"Total credits: \(.credits)"' run.json
Expand All @@ -66,6 +72,10 @@ shown in `verdicts.md`. Unrunnable scenarios are printed as an assurance gap;
this recipe does not fail on that gap alone. Optional summary fields are not
required for the gate.

The recipe runs the committed scenarios. `explore` and `generate` spend credits
and change the scenario set, so keep them out of the per-change job: run them
locally or in a manually triggered job, review the result and commit it.

`rook sync --yes` records the scenarios/profile upstream. If the requested CI
result should remain local instead, omit sync and use `rook run --test` with the
same flags and result checks. Do not silently switch between these policies.
Expand Down
19 changes: 13 additions & 6 deletions plugins/rook-skills/skills/rook/references/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Three kinds of target:
## Authoring headlessly

```bash
printf '%s\n' "curl http://127.0.0.1:9110/v1/triage -H 'content-type: application/json' -d '{\"input\":\"{{goal}}\"}'" > /tmp/profile.txt
rook profile add triage-http --from /tmp/profile.txt --yes
profile_src=$(mktemp)
printf '%s\n' "curl http://127.0.0.1:9110/v1/triage -H 'content-type: application/json' -d '{\"input\":\"{{goal}}\"}'" > "$profile_src"
rook profile add triage-http --from "$profile_src" --yes
rm -f "$profile_src"
rook profile add refund-cli --command 'claude -p "{{goal}}"' --yes
rook profile test --goal "Say hello and nothing else."
rook profile use <id>
Expand Down Expand Up @@ -52,14 +54,19 @@ should declare `concurrency: 1`.
## Secrets

```bash
rook env set '{"API_KEY":"…","BASE_URL":"https://staging.example.com"}'
rook env set --from .env # every variable in the file
rook env set BASE_URL https://staging.example.com # non-secret values only
rook env list # masked
rook env show API_KEY
rook env rm API_KEY
```

Never paste a value into a profile, a scenario, a transcript, or a commit.
Reference it as `${API_KEY}`. A verified `profile add` can store values it
Reference it as `${API_KEY}`. Never put a secret value on a command line you
run: it lands in the transcript and the shell history. Import secrets with
`rook env set --from <file>` from a `.env` or `.json` file the user already
has, or ask the user to run `rook env set KEY value` in their own terminal.
A verified `profile add` can store values it
actually used during verification; check `rook env list` and set any remaining
variables with `rook env set`. The shell's value takes precedence over a stored
value. `rook env show` prints the full secret, so avoid it in logs.
value. `rook env show` prints the full secret: do not run it for the user, and use
`rook env list` to see what is set.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ from `ok: true` or from an old report on disk.
| `remedy: plan_required` | the org has no active Agent Assurance plan (none, an ended free trial or an expired subscription), whatever its credit balance — nothing ran or was charged; tell the user the plan does not include Rook, and for plan options point to [TestMu AI pricing](https://www.testmuai.com/pricing/), not to the trial or billing link the refusal names |
| `remedy: upgrade_plan` | the plan has no Rook cloud (such as Starter) — sync, cloud project status and recording runs on Rook cloud are refused; keep work local with `rook run --test`, or tell the user the plan does not include Rook cloud |
| `remedy: reconcile` | this agent has diverged from upstream — `rook sync` |
| `remedy: update` | this version is too old to be served — announce that `rook update` may install a newer version, then recheck skill compatibility |
| `remedy: update` | this version is too old to be served — `rook update` installs a newer version; run it only with the user's authorization, then recheck skill compatibility |
| `remedy: report` | a client bug — file an issue with `rook export logs` attached |
| no active agent | `rook agent use <id>` after `rook explore` |
| no project selected | `rook project use <id>` or `rook project create <name>` |
Expand Down