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.5",
"version": "0.1.6",
"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
9 changes: 7 additions & 2 deletions codex/rook/skills/rook/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Use the next command needed by the current state:
| Select an agent | `rook agent use <id>` |
| Generate scenarios | `rook generate --json` |
| Create/test a profile | `rook profile add <name> --from <file>` or `--command '<argv>'`; then `rook profile test --goal "<reply-only goal>"` |
| Run | `rook sync --yes` before `rook run --json`, or `rook run --test --json` for a local result |
| Run | `rook sync` before `rook run --json`, or `rook run --test --json` for a local result |
| Read results | `rook report <run-id> --json` |

Choose the profile's transport and command from the target's source or the
Expand Down Expand Up @@ -85,7 +85,12 @@ options, point to [TestMu AI pricing](https://www.testmuai.com/pricing/). A plan
without Rook cloud runs locally: when sync or cloud status is refused, use
`rook run --test` for a local result. See
[troubleshooting](references/troubleshooting.md).
Prefer scoped `--allow` grants; use `--yes` only within the authorized scope.
Rook asks before each tool call it makes. Run through your shell it is headless
and cannot ask: a call no rule covers is refused, and the refusal names the rule
that would cover it, `--allow '<tool>(<subject>)'`. Show that rule to the user
and pass it only once they approve. Never pass `--yes`, which approves every
tool call, and never grant a wildcard on a program that can run others (a shell,
interpreter, package runner, network tool, `git` or `make`).
See [headless contracts](references/headless-contract.md) for output, grants and
credit accounting.

Expand Down
16 changes: 9 additions & 7 deletions codex/rook/skills/rook/references/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ printf 'Rook CLI: %s\n' "$(rook --version)" >&2
rook project use "$ROOK_PROJECT_ID"
rook agent use "$ROOK_AGENT_ID"
# A committed tree is not an upstream record. Publish the profile/scenarios first.
rook sync --yes
rook sync
run_code=0
rook run --concurrency 3 --name "ci-$GITHUB_RUN_ID" --yes --json > run.json || run_code=$?
rook run --concurrency 3 --name "ci-$GITHUB_RUN_ID" --json > run.json || run_code=$?
# 2 = the run finished and a scenario failed (rook 0.1.26+): read the report below.
if [ "$run_code" -ne 0 ] && [ "$run_code" -ne 2 ]; then
jq -r '.error // .reason // "rook failed; inspect stderr"' run.json >&2 || true
Expand Down Expand Up @@ -76,7 +76,7 @@ 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
`rook sync` 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.
Since 0.1.13, a plan without Rook cloud, such as Starter, refuses `sync` with
Expand All @@ -85,7 +85,9 @@ if the user chooses it; otherwise report that the plan does not include Rook
cloud.

Cache the project `.testmuai/rook/` for history and comparisons. Never cache or
commit `~/.testmuai/rook/`. `--yes` supplies broad command-scoped tool consent;
existing deny policy still applies. Rook uses headless mode when `--yes` is passed,
stdin is not a TTY, or any of `CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, `BUILDKITE` or
`JENKINS_URL` is set (to any value, including `false`).
commit `~/.testmuai/rook/`. Rook runs headless when stdin is not a TTY or any of
`CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, `BUILDKITE` or `JENKINS_URL` is set (to any
value, including `false`). A headless command never prompts: a tool call no rule
covers is refused, and the refusal names its `--allow` rule. Add to the
`rook run` line only rules a person has reviewed, each naming one call. Never
pass `--yes`, and never grant a wildcard on a program that can run others.
13 changes: 8 additions & 5 deletions codex/rook/skills/rook/references/headless-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ Use `error`, or `reason` when present. Translate remedy tokens with

## Grants and accounting

`--allow 'bash(npm test)'` grants one call shape; repeat it for more grants or use
`'bash(git *)@explore'` to scope a grant to one phase. `--yes` grants broadly for
that command without changing stored settings. Existing deny policy still applies.
Stored/session grants can authorize calls even when neither flag is present;
omitting flags is not a read-only guarantee.
`--allow 'bash(npm test)'` grants exactly that call: a rule without `*` matches
only its own subject. Repeat the flag for more grants, or add `@<phase>` to
scope one to a phase, as in `'bash(git status)@explore'`. A headless refusal
names the rule that would cover the call; pass it only after the user approves
it. Do not pass `--yes`, which approves every tool call for the command, and do
not grant a wildcard on a program that can run others. Existing deny policy
still applies. Stored grants in `~/.testmuai/rook/settings.json` can authorize
calls even when no flag is present; omitting flags is not a read-only guarantee.

Record reported spend when available. `profile add` may print no total. A change
in `rook plan --json` balance reflects the whole account, possibly including
Expand Down
11 changes: 6 additions & 5 deletions codex/rook/skills/rook/references/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,27 @@ Three kinds of target:
| Kind | Give rook | Example |
| ------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| HTTP | a curl | `curl http://127.0.0.1:9110/v1/triage -H 'content-type: application/json' -d '{"input":"look at T-1043"}'` |
| command | a command line with `{{goal}}` | `claude -p "{{goal}}"` |
| command | a command line with `{{goal}}` | `./bin/refund-agent "{{goal}}"` |
| MCP | a tool on a declared server | see `mcp.md` |

## Authoring headlessly

```bash
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
rook profile add triage-http --from "$profile_src"
rm -f "$profile_src"
rook profile add refund-cli --command 'claude -p "{{goal}}"' --yes
rook profile add refund-cli --command './bin/refund-agent "{{goal}}"'
rook profile test --goal "Say hello and nothing else."
rook profile use <id>
rook profile show <id>
```

`profile add` writes the script, runs it against the agent to verify it, and
corrects it. It may make several real target calls and costs Agent Assurance credits. It
may emit text despite `--json`; `--yes` (or `--allow` rules) permits its test
calls without a prompt. With neither `--from` nor `--command`, it reads the
may emit text despite `--json`. Headless, each target call it makes needs a
grant: the refusal names the `--allow` rule, which you pass only once the user
approves that call. With neither `--from` nor `--command`, it reads the
material from stdin. If authoring stops after saving a profile but before
verification, the CLI keeps it as **unverified**. Inspect the saved script and
generated profile README, then use `rook profile test <id>` or
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 8b752279b9c08f5d28571236c080b2e6ba04e3a9 skill-installer/skills/
LambdaTest/rook cb525cff5f15d7854055d63abb34fcd4036067a3 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.1",
"version": "0.1.2",
"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
2 changes: 1 addition & 1 deletion plugins/rook-skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Claude runs these through its own Bash tool, so Claude Code asks for your permis
| `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 |

`--allow` rules grant Rook's own tool calls (for example reading your code or running `npm test`) one at a time. Claude uses `--yes` only within the scope you authorized.
Rook asks before each tool call it makes, such as reading your code or running `npm test`. Run by Claude it cannot ask, so it refuses the call and names the exact `--allow` rule that would cover it. Claude shows you that rule and passes it only after you approve it. Claude never passes `--yes`, which would approve every tool call, and never grants a wildcard on a program that can run others, such as a shell, an interpreter, a package runner, `git` or `make`.

## What it sends, and where

Expand Down
9 changes: 7 additions & 2 deletions plugins/rook-skills/skills/rook/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Use the next command needed by the current state:
| Select an agent | `rook agent use <id>` |
| Generate scenarios | `rook generate --json` |
| Create/test a profile | `rook profile add <name> --from <file>` or `--command '<argv>'`; then `rook profile test --goal "<reply-only goal>"` |
| Run | `rook sync --yes` before `rook run --json`, or `rook run --test --json` for a local result |
| Run | `rook sync` before `rook run --json`, or `rook run --test --json` for a local result |
| Read results | `rook report <run-id> --json` |

Choose the profile's transport and command from the target's source or the
Expand Down Expand Up @@ -85,7 +85,12 @@ options, point to [TestMu AI pricing](https://www.testmuai.com/pricing/). A plan
without Rook cloud runs locally: when sync or cloud status is refused, use
`rook run --test` for a local result. See
[troubleshooting](references/troubleshooting.md).
Prefer scoped `--allow` grants; use `--yes` only within the authorized scope.
Rook asks before each tool call it makes. Run through your shell it is headless
and cannot ask: a call no rule covers is refused, and the refusal names the rule
that would cover it, `--allow '<tool>(<subject>)'`. Show that rule to the user
and pass it only once they approve. Never pass `--yes`, which approves every
tool call, and never grant a wildcard on a program that can run others (a shell,
interpreter, package runner, network tool, `git` or `make`).
See [headless contracts](references/headless-contract.md) for output, grants and
credit accounting.

Expand Down
16 changes: 9 additions & 7 deletions plugins/rook-skills/skills/rook/references/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ printf 'Rook CLI: %s\n' "$(rook --version)" >&2
rook project use "$ROOK_PROJECT_ID"
rook agent use "$ROOK_AGENT_ID"
# A committed tree is not an upstream record. Publish the profile/scenarios first.
rook sync --yes
rook sync
run_code=0
rook run --concurrency 3 --name "ci-$GITHUB_RUN_ID" --yes --json > run.json || run_code=$?
rook run --concurrency 3 --name "ci-$GITHUB_RUN_ID" --json > run.json || run_code=$?
# 2 = the run finished and a scenario failed (rook 0.1.26+): read the report below.
if [ "$run_code" -ne 0 ] && [ "$run_code" -ne 2 ]; then
jq -r '.error // .reason // "rook failed; inspect stderr"' run.json >&2 || true
Expand Down Expand Up @@ -76,7 +76,7 @@ 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
`rook sync` 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.
Since 0.1.13, a plan without Rook cloud, such as Starter, refuses `sync` with
Expand All @@ -85,7 +85,9 @@ if the user chooses it; otherwise report that the plan does not include Rook
cloud.

Cache the project `.testmuai/rook/` for history and comparisons. Never cache or
commit `~/.testmuai/rook/`. `--yes` supplies broad command-scoped tool consent;
existing deny policy still applies. Rook uses headless mode when `--yes` is passed,
stdin is not a TTY, or any of `CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, `BUILDKITE` or
`JENKINS_URL` is set (to any value, including `false`).
commit `~/.testmuai/rook/`. Rook runs headless when stdin is not a TTY or any of
`CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, `BUILDKITE` or `JENKINS_URL` is set (to any
value, including `false`). A headless command never prompts: a tool call no rule
covers is refused, and the refusal names its `--allow` rule. Add to the
`rook run` line only rules a person has reviewed, each naming one call. Never
pass `--yes`, and never grant a wildcard on a program that can run others.
13 changes: 8 additions & 5 deletions plugins/rook-skills/skills/rook/references/headless-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ Use `error`, or `reason` when present. Translate remedy tokens with

## Grants and accounting

`--allow 'bash(npm test)'` grants one call shape; repeat it for more grants or use
`'bash(git *)@explore'` to scope a grant to one phase. `--yes` grants broadly for
that command without changing stored settings. Existing deny policy still applies.
Stored/session grants can authorize calls even when neither flag is present;
omitting flags is not a read-only guarantee.
`--allow 'bash(npm test)'` grants exactly that call: a rule without `*` matches
only its own subject. Repeat the flag for more grants, or add `@<phase>` to
scope one to a phase, as in `'bash(git status)@explore'`. A headless refusal
names the rule that would cover the call; pass it only after the user approves
it. Do not pass `--yes`, which approves every tool call for the command, and do
not grant a wildcard on a program that can run others. Existing deny policy
still applies. Stored grants in `~/.testmuai/rook/settings.json` can authorize
calls even when no flag is present; omitting flags is not a read-only guarantee.

Record reported spend when available. `profile add` may print no total. A change
in `rook plan --json` balance reflects the whole account, possibly including
Expand Down
11 changes: 6 additions & 5 deletions plugins/rook-skills/skills/rook/references/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,27 @@ Three kinds of target:
| Kind | Give rook | Example |
| ------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| HTTP | a curl | `curl http://127.0.0.1:9110/v1/triage -H 'content-type: application/json' -d '{"input":"look at T-1043"}'` |
| command | a command line with `{{goal}}` | `claude -p "{{goal}}"` |
| command | a command line with `{{goal}}` | `./bin/refund-agent "{{goal}}"` |
| MCP | a tool on a declared server | see `mcp.md` |

## Authoring headlessly

```bash
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
rook profile add triage-http --from "$profile_src"
rm -f "$profile_src"
rook profile add refund-cli --command 'claude -p "{{goal}}"' --yes
rook profile add refund-cli --command './bin/refund-agent "{{goal}}"'
rook profile test --goal "Say hello and nothing else."
rook profile use <id>
rook profile show <id>
```

`profile add` writes the script, runs it against the agent to verify it, and
corrects it. It may make several real target calls and costs Agent Assurance credits. It
may emit text despite `--json`; `--yes` (or `--allow` rules) permits its test
calls without a prompt. With neither `--from` nor `--command`, it reads the
may emit text despite `--json`. Headless, each target call it makes needs a
grant: the refusal names the `--allow` rule, which you pass only once the user
approves that call. With neither `--from` nor `--command`, it reads the
material from stdin. If authoring stops after saving a profile but before
verification, the CLI keeps it as **unverified**. Inspect the saved script and
generated profile README, then use `rook profile test <id>` or
Expand Down