From 546071e1ff65b71e5a8e9bec3f1622801cfe2b84 Mon Sep 17 00:00:00 2001 From: samyakLambda Date: Thu, 3 Dec 2026 00:26:56 +0530 Subject: [PATCH] Sync the rook skill to LambdaTest/rook cb525cf (#91): no blanket approval Claude's plugin directory refused rook-skills: "Documented command starts agent with permissions skipped". LambdaTest/rook#91 removed `--yes` and the `git *` wildcard grant from the skill; both copies now carry it. The rook-skills README no longer says Claude uses `--yes`: Claude passes only the exact `--allow` rule Rook names, after the user approves it. rook-skills 0.1.1 -> 0.1.2, Codex 0.1.5 -> 0.1.6. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KxTgyL5kwZu8ZnQ5DN79eE --- codex/rook/.codex-plugin/plugin.json | 2 +- codex/rook/skills/rook/SKILL.md | 9 +++++++-- codex/rook/skills/rook/references/ci.md | 16 +++++++++------- .../skills/rook/references/headless-contract.md | 13 ++++++++----- codex/rook/skills/rook/references/profiles.md | 11 ++++++----- codex/skill-source.txt | 2 +- plugins/rook-skills/.claude-plugin/plugin.json | 2 +- plugins/rook-skills/README.md | 2 +- plugins/rook-skills/skills/rook/SKILL.md | 9 +++++++-- plugins/rook-skills/skills/rook/references/ci.md | 16 +++++++++------- .../skills/rook/references/headless-contract.md | 13 ++++++++----- .../skills/rook/references/profiles.md | 11 ++++++----- 12 files changed, 64 insertions(+), 42 deletions(-) diff --git a/codex/rook/.codex-plugin/plugin.json b/codex/rook/.codex-plugin/plugin.json index 33ddb43..f6e7930 100644 --- a/codex/rook/.codex-plugin/plugin.json +++ b/codex/rook/.codex-plugin/plugin.json @@ -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)", diff --git a/codex/rook/skills/rook/SKILL.md b/codex/rook/skills/rook/SKILL.md index bb8187c..5f1c859 100644 --- a/codex/rook/skills/rook/SKILL.md +++ b/codex/rook/skills/rook/SKILL.md @@ -51,7 +51,7 @@ Use the next command needed by the current state: | Select an agent | `rook agent use ` | | Generate scenarios | `rook generate --json` | | Create/test a profile | `rook profile add --from ` or `--command ''`; then `rook profile test --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 --json` | Choose the profile's transport and command from the target's source or the @@ -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 '()'`. 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. diff --git a/codex/rook/skills/rook/references/ci.md b/codex/rook/skills/rook/references/ci.md index ad4fed9..64461c6 100644 --- a/codex/rook/skills/rook/references/ci.md +++ b/codex/rook/skills/rook/references/ci.md @@ -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 @@ -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 @@ -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. diff --git a/codex/rook/skills/rook/references/headless-contract.md b/codex/rook/skills/rook/references/headless-contract.md index aca96d4..fd896cb 100644 --- a/codex/rook/skills/rook/references/headless-contract.md +++ b/codex/rook/skills/rook/references/headless-contract.md @@ -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 `@` 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 diff --git a/codex/rook/skills/rook/references/profiles.md b/codex/rook/skills/rook/references/profiles.md index 5950b27..a8e22db 100644 --- a/codex/rook/skills/rook/references/profiles.md +++ b/codex/rook/skills/rook/references/profiles.md @@ -10,7 +10,7 @@ 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 @@ -18,9 +18,9 @@ Three kinds of target: ```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 rook profile show @@ -28,8 +28,9 @@ rook profile show `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 ` or diff --git a/codex/skill-source.txt b/codex/skill-source.txt index 02e38e8..be6bced 100644 --- a/codex/skill-source.txt +++ b/codex/skill-source.txt @@ -1 +1 @@ -LambdaTest/rook 8b752279b9c08f5d28571236c080b2e6ba04e3a9 skill-installer/skills/ +LambdaTest/rook cb525cff5f15d7854055d63abb34fcd4036067a3 skill-installer/skills/ diff --git a/plugins/rook-skills/.claude-plugin/plugin.json b/plugins/rook-skills/.claude-plugin/plugin.json index fe73149..9e36fbf 100644 --- a/plugins/rook-skills/.claude-plugin/plugin.json +++ b/plugins/rook-skills/.claude-plugin/plugin.json @@ -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", diff --git a/plugins/rook-skills/README.md b/plugins/rook-skills/README.md index b812b37..5bb9169 100644 --- a/plugins/rook-skills/README.md +++ b/plugins/rook-skills/README.md @@ -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 diff --git a/plugins/rook-skills/skills/rook/SKILL.md b/plugins/rook-skills/skills/rook/SKILL.md index bb8187c..5f1c859 100644 --- a/plugins/rook-skills/skills/rook/SKILL.md +++ b/plugins/rook-skills/skills/rook/SKILL.md @@ -51,7 +51,7 @@ Use the next command needed by the current state: | Select an agent | `rook agent use ` | | Generate scenarios | `rook generate --json` | | Create/test a profile | `rook profile add --from ` or `--command ''`; then `rook profile test --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 --json` | Choose the profile's transport and command from the target's source or the @@ -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 '()'`. 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. diff --git a/plugins/rook-skills/skills/rook/references/ci.md b/plugins/rook-skills/skills/rook/references/ci.md index ad4fed9..64461c6 100644 --- a/plugins/rook-skills/skills/rook/references/ci.md +++ b/plugins/rook-skills/skills/rook/references/ci.md @@ -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 @@ -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 @@ -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. diff --git a/plugins/rook-skills/skills/rook/references/headless-contract.md b/plugins/rook-skills/skills/rook/references/headless-contract.md index aca96d4..fd896cb 100644 --- a/plugins/rook-skills/skills/rook/references/headless-contract.md +++ b/plugins/rook-skills/skills/rook/references/headless-contract.md @@ -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 `@` 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 diff --git a/plugins/rook-skills/skills/rook/references/profiles.md b/plugins/rook-skills/skills/rook/references/profiles.md index 5950b27..a8e22db 100644 --- a/plugins/rook-skills/skills/rook/references/profiles.md +++ b/plugins/rook-skills/skills/rook/references/profiles.md @@ -10,7 +10,7 @@ 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 @@ -18,9 +18,9 @@ Three kinds of target: ```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 rook profile show @@ -28,8 +28,9 @@ rook profile show `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 ` or