The Researcher, build 2: the agent, its prompt and its allow list #71

Merged
city-root merged 3 commits from worker/gascitypacks-ajfb into main 2026-11-12 18:13:17 +00:00
Contributor

The user commits two lines first. Claude Code denies a write to a .claude directory in full-auto, so the Edit of roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json was refused and I did not write it another way. In that file's permissions.allow, after "ToolSearch" (add a comma to it), the list must gain exactly:

      "mcp__perplexity__perplexity_search",
      "mcp__perplexity__perplexity_ask"

Until then the Researcher's session has the server but, under full-auto, may call none of its tools. tests/researcher.sh already holds the other side (no more of Perplexity than search and ask, never the whole server), so it passes before and after.

Round 3: the Reviewer's findings (review 317 on 190f9e1)

Rebase. The branch is on 0deb291 (main moved past 62ca905). The one conflict was README's pack table again: main's forgejo row now names pr comment (#62) and is kept, with my roles row. Main carries none of this change, so nothing was dropped.

  1. [blocking] tests/researcher.sh in CI's lint job. gc mcp list --agent only checks that the provider's command exists, and the runner has no claude. The test now puts a stub claude (exit 0) in its scratch directory and prepends it to PATH, with a comment saying why. Run under env -i with a PATH of gc, jq, /usr/bin and /bin, the CI's shape: tests/researcher.sh, formula.sh, reviewer.sh and operator-overlay.sh print ok.
  2. [minor] the two allow rules are not in the head. Tried the Edit once more this round: Claude Code refused it in full-auto, so the lines at the top of this description stand, for the user to commit. The test's lower bound (both rules required, so a list that loses them fails) is not added here, for the same reason: it would fail this head. Once the user's commit is in, it is one jq line: (["mcp__perplexity__perplexity_search","mcp__perplexity__perplexity_ask"] - .permissions.allow) | length == 0.
  3. [minor] README, "Permission mode". A paragraph says the Researcher pins full-auto (dontAsk) in every city that imports the pack, and why (the user's brief: full-auto with an allow list, never a mode that asks nothing).

Round 2: rebase, and Perplexity

Rebase. The branch is on 0e49d7c. The one conflict was README's pack table: main's forgejo row (it gained the review order) is kept, and my roles row, which names the Researcher, is kept. Main carries none of this change's parts (the role skill of #72 is the skill the agent names), so nothing was dropped.

1. The server, the Researcher's alone. roles/agents/researcher/mcp/perplexity.toml: the official server, @perplexity-ai/mcp-server pinned to 1.3.0. gc reads an agent's own mcp/ directory for that agent only. From the resolved config of a throwaway city that imports this checkout:

  • gc mcp list --agent researcher: perplexity, stdio, layer agent, delivery acp (the session receives it in-band in session/new), command sh -c 'k=$(cat "$HOME/.config/gascity-root/perplexity-token") && PERPLEXITY_API_KEY=$k exec npx -y @perplexity-ai/mcp-server@1.3.0', no env.
  • gc mcp list --agent worker and --agent operator: no servers.
  • claudeacp turns session/new's mcpServers into claude --mcp-config '{"mcpServers":{...}}' (claudeagent/options.go), so the Researcher's claude gets one server named perplexity, and its tools are mcp__perplexity__perplexity_search, _ask, _research and _reason (the package's server.js registers those four).

2. The allow list names search and ask and nothing else of Perplexity (the lines at the top); perplexity_research and perplexity_reason stay off, since under full-auto what no rule allows is denied.

3. The key. The file ~/.config/gascity-root/perplexity-token, read by the server's start, as the forge tokens and kimicode-token are: the server takes its key from PERPLEXITY_API_KEY only, an acp session's env entries are literal, and the city's [[patches.agent]] env would put the key in the tracked city.toml. I did not read the key, create the file or write it into a tracked file. The one command the user runs (the README says it too):

bao kv get -field=token agents/perplexity/city-root > ~/.config/gascity-root/perplexity-token && chmod 600 ~/.config/gascity-root/perplexity-token

The start line is one sh -c line with no branch and no parse (under every threshold of docs/shell.md). Without the file it ends with cat's message and the session carries on without Perplexity. npx has to be on the session's PATH (it is /opt/homebrew/bin/npx here).

From the first round, unchanged: the agent, its prompt, the Operator's line, and how a pack gives one agent a list of its own (its overlay's .claude/settings.json, which Claude Code merges with the city's: allow lists union, a deny beats any allow; see the README's Researcher section).

Checks run: bash tests/researcher.sh on jq 1.7.1 and 1.8.2; gc lint .; tests/operator-overlay.sh; tests/formula.sh under env -i (bare, it fails in a Worker's environment: gascitypacks-pmn); the changelog check (valid=true). Not shown: the server answering a search, since the key is not on the Mac yet.


Round 1, as opened

Build bead 2 of the Researcher (docs/researcher.md in gascity-root, section 7): the agent, its prompt, its settings, the Operator's prompt line and a test. Bead: gascitypacks-ajfb.

What it adds

  • roles/agents/researcher/agent.toml: scope = "city", session = "acp", wake_mode = "fresh", min_active_sessions = 0, max_active_sessions = 2, default_sling_formula = "mol-researcher-work", option_defaults = { permission_mode = "full-auto" }, work_dir = ".gc/agents/researcher", the Worker's nudge (--drain-ack), inject_assigned_skills = false. The formula and the skill researcher do not exist yet (beads 3 and 4); the agent and its prompt name them.
  • roles/agents/researcher/prompt.template.md: the Worker's, loading researcher, roles.city and roles.contact.
  • roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json: its permissions (below). .gitignore ignores every dotfile, so the overlay's directory is un-ignored beside the Operator's.
  • The Operator's prompt: "The Researcher's pool, for a bead that is a research question, of any store: roles.researcher".
  • tests/researcher.sh, run by the lint job, and a fragment, .changelog/researcher-agent.md. README: the roles row and a section "The Researcher".

How a pack gives one agent a list of its own

gc starts every Claude session of the city with one --settings <city>/.gc/settings.json (the city's .claude/settings.json merged over gc's defaults). I read cmd/gc/cmd_start.go and internal/hooks/hooks.go at the pin (6bd609f): no agent field changes that file or names another in its place. The route is the agent's overlay: gc copies overlay/per-provider/claude/ into the agent's work directory (internal/overlay/overlay.go; the Operator's .claude/settings.json works this way), where Claude Code reads it as the project's settings and merges it with the city's. The merge is a union of allow lists and of deny lists, and a deny beats any allow (Claude Code's documented rule; see "Not shown").

So an agent can add to the city's list, and can take a tool away only by denying it. The city's list has Agent, Edit and Write, so an own allow list that merely leaves them out would take nothing away. The design's "allow list without the Agent tool" is therefore: the allow list of what it calls, and a deny of what the city's list gives and it must not have: Agent, Edit, Write, NotebookEdit. Bash stays as the city has it (bare, so no pattern of an own list can narrow it); a rule that keeps it to commands that read is for the trial of build bead 4 to find. A scratch note is written through Bash.

Resolved

gc --city <throwaway> config show --json, city importing roles from this checkout:

{"Scope":"city","Session":"acp","WakeMode":"fresh","MinActiveSessions":0,"MaxActiveSessions":2,
 "DefaultSlingFormula":"mol-researcher-work","OptionDefaults":{"permission_mode":"full-auto"},
 "WorkDir":".gc/agents/researcher","InjectAssignedSkills":false,
 "OverlayDir":".../roles/agents/researcher/overlay"}

gc prime researcher and gc prime operator render: "You are the Researcher of this Gas City. Before anything else, load the skills researcher, roles.city and roles.contact..." and, in the Operator's, "- The Researcher's pool, for a bead that is a research question, of any store: roles.researcher".

The overlay's rules merged with the city's list as it stands (gascity-root .claude/settings.json):

{"allow":["Agent","Bash","Edit","Glob","Grep","Monitor","Read","Skill","TaskStop","TodoWrite","ToolSearch","WebFetch","WebSearch","Write"],"deny":["Agent","Edit","Write","NotebookEdit"]}

Agent, Edit, Write are in allow and in deny: refused. The test computes this and fails when the Agent deny is removed (tried).

Checked

  • bash tests/researcher.sh on jq 1.6, 1.7.1 and 1.8.2; tests/formula.sh and tests/reviewer.sh still pass; gc lint . ok.
  • The v2 changelog checker (-base main -fail-on warning) passes with the fragment.
  • No new shell logic (docs/shell.md): the one new script is a test.

Not shown

Claude Code itself refusing a call of Agent under dontAsk with this merge: the claude CLI of the Worker's session was not logged in for a scratch run, so the merge rule is Claude Code's documented one and the test models it. Build bead 4 tries it first, as the design says. The city's own patch for the Researcher (model, effort, check-pins.sh) is bead 6; an import of this pack that carries the agent fails check-pins.sh until that patch is in the same pull request.

🤖 Generated with Claude Code

Bead: gascitypacks-ajfb

**The user commits two lines first.** Claude Code denies a write to a `.claude` directory in full-auto, so the Edit of `roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json` was refused and I did not write it another way. In that file's `permissions.allow`, after `"ToolSearch"` (add a comma to it), the list must gain exactly: ``` "mcp__perplexity__perplexity_search", "mcp__perplexity__perplexity_ask" ``` Until then the Researcher's session has the server but, under full-auto, may call none of its tools. `tests/researcher.sh` already holds the other side (no more of Perplexity than search and ask, never the whole server), so it passes before and after. ## Round 3: the Reviewer's findings (review 317 on `190f9e1`) **Rebase.** The branch is on `0deb291` (main moved past `62ca905`). The one conflict was README's pack table again: main's `forgejo` row now names `pr comment` (#62) and is kept, with my `roles` row. Main carries none of this change, so nothing was dropped. 1. **[blocking] `tests/researcher.sh` in CI's `lint` job.** `gc mcp list --agent` only checks that the provider's command exists, and the runner has no `claude`. The test now puts a stub `claude` (`exit 0`) in its scratch directory and prepends it to `PATH`, with a comment saying why. Run under `env -i` with a `PATH` of `gc`, `jq`, `/usr/bin` and `/bin`, the CI's shape: `tests/researcher.sh`, `formula.sh`, `reviewer.sh` and `operator-overlay.sh` print `ok`. 2. **[minor] the two allow rules are not in the head.** Tried the Edit once more this round: Claude Code refused it in full-auto, so the lines at the top of this description stand, for the user to commit. The test's lower bound (both rules required, so a list that loses them fails) is not added here, for the same reason: it would fail this head. Once the user's commit is in, it is one `jq` line: `(["mcp__perplexity__perplexity_search","mcp__perplexity__perplexity_ask"] - .permissions.allow) | length == 0`. 3. **[minor] README, "Permission mode".** A paragraph says the Researcher pins `full-auto` (`dontAsk`) in every city that imports the pack, and why (the user's brief: full-auto with an allow list, never a mode that asks nothing). --- ## Round 2: rebase, and Perplexity **Rebase.** The branch is on `0e49d7c`. The one conflict was README's pack table: main's `forgejo` row (it gained the `review` order) is kept, and my `roles` row, which names the Researcher, is kept. Main carries none of this change's parts (the role skill of #72 is the skill the agent names), so nothing was dropped. **1. The server, the Researcher's alone.** `roles/agents/researcher/mcp/perplexity.toml`: the official server, `@perplexity-ai/mcp-server` pinned to `1.3.0`. gc reads an agent's own `mcp/` directory for that agent only. From the resolved config of a throwaway city that imports this checkout: - `gc mcp list --agent researcher`: `perplexity`, stdio, layer `agent`, delivery `acp` (the session receives it in-band in `session/new`), command `sh -c 'k=$(cat "$HOME/.config/gascity-root/perplexity-token") && PERPLEXITY_API_KEY=$k exec npx -y @perplexity-ai/mcp-server@1.3.0'`, no `env`. - `gc mcp list --agent worker` and `--agent operator`: no servers. - claudeacp turns `session/new`'s `mcpServers` into `claude --mcp-config '{"mcpServers":{...}}'` (`claudeagent/options.go`), so the Researcher's `claude` gets one server named `perplexity`, and its tools are `mcp__perplexity__perplexity_search`, `_ask`, `_research` and `_reason` (the package's `server.js` registers those four). **2. The allow list** names search and ask and nothing else of Perplexity (the lines at the top); `perplexity_research` and `perplexity_reason` stay off, since under full-auto what no rule allows is denied. **3. The key.** The file `~/.config/gascity-root/perplexity-token`, read by the server's start, as the forge tokens and `kimicode-token` are: the server takes its key from `PERPLEXITY_API_KEY` only, an acp session's `env` entries are literal, and the city's `[[patches.agent]]` env would put the key in the tracked `city.toml`. I did not read the key, create the file or write it into a tracked file. The one command the user runs (the README says it too): ``` bao kv get -field=token agents/perplexity/city-root > ~/.config/gascity-root/perplexity-token && chmod 600 ~/.config/gascity-root/perplexity-token ``` The start line is one `sh -c` line with no branch and no parse (under every threshold of `docs/shell.md`). Without the file it ends with `cat`'s message and the session carries on without Perplexity. `npx` has to be on the session's `PATH` (it is `/opt/homebrew/bin/npx` here). **From the first round, unchanged:** the agent, its prompt, the Operator's line, and how a pack gives one agent a list of its own (its overlay's `.claude/settings.json`, which Claude Code merges with the city's: allow lists union, a deny beats any allow; see the README's Researcher section). **Checks run:** `bash tests/researcher.sh` on jq 1.7.1 and 1.8.2; `gc lint .`; `tests/operator-overlay.sh`; `tests/formula.sh` under `env -i` (bare, it fails in a Worker's environment: `gascitypacks-pmn`); the changelog check (`valid=true`). Not shown: the server answering a search, since the key is not on the Mac yet. --- ## Round 1, as opened Build bead 2 of the Researcher (`docs/researcher.md` in gascity-root, section 7): the agent, its prompt, its settings, the Operator's prompt line and a test. Bead: gascitypacks-ajfb. ## What it adds - `roles/agents/researcher/agent.toml`: `scope = "city"`, `session = "acp"`, `wake_mode = "fresh"`, `min_active_sessions = 0`, `max_active_sessions = 2`, `default_sling_formula = "mol-researcher-work"`, `option_defaults = { permission_mode = "full-auto" }`, `work_dir = ".gc/agents/researcher"`, the Worker's nudge (`--drain-ack`), `inject_assigned_skills = false`. The formula and the skill `researcher` do not exist yet (beads 3 and 4); the agent and its prompt name them. - `roles/agents/researcher/prompt.template.md`: the Worker's, loading `researcher`, `roles.city` and `roles.contact`. - `roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json`: its permissions (below). `.gitignore` ignores every dotfile, so the overlay's directory is un-ignored beside the Operator's. - The Operator's prompt: "The Researcher's pool, for a bead that is a research question, of any store: `roles.researcher`". - `tests/researcher.sh`, run by the `lint` job, and a fragment, `.changelog/researcher-agent.md`. README: the roles row and a section "The Researcher". ## How a pack gives one agent a list of its own gc starts every Claude session of the city with one `--settings <city>/.gc/settings.json` (the city's `.claude/settings.json` merged over gc's defaults). I read `cmd/gc/cmd_start.go` and `internal/hooks/hooks.go` at the pin (6bd609f): no agent field changes that file or names another in its place. The route is the agent's **overlay**: gc copies `overlay/per-provider/claude/` into the agent's work directory (`internal/overlay/overlay.go`; the Operator's `.claude/settings.json` works this way), where Claude Code reads it as the project's settings and merges it with the city's. The merge is a union of `allow` lists and of `deny` lists, and a deny beats any allow (Claude Code's documented rule; see "Not shown"). So an agent can add to the city's list, and can take a tool away only by denying it. The city's list has `Agent`, `Edit` and `Write`, so an own allow list that merely leaves them out would take nothing away. The design's "allow list without the Agent tool" is therefore: the allow list of what it calls, and a deny of what the city's list gives and it must not have: `Agent`, `Edit`, `Write`, `NotebookEdit`. `Bash` stays as the city has it (bare, so no pattern of an own list can narrow it); a rule that keeps it to commands that read is for the trial of build bead 4 to find. A scratch note is written through `Bash`. ## Resolved `gc --city <throwaway> config show --json`, city importing `roles` from this checkout: ``` {"Scope":"city","Session":"acp","WakeMode":"fresh","MinActiveSessions":0,"MaxActiveSessions":2, "DefaultSlingFormula":"mol-researcher-work","OptionDefaults":{"permission_mode":"full-auto"}, "WorkDir":".gc/agents/researcher","InjectAssignedSkills":false, "OverlayDir":".../roles/agents/researcher/overlay"} ``` `gc prime researcher` and `gc prime operator` render: "You are the Researcher of this Gas City. Before anything else, load the skills `researcher`, `roles.city` and `roles.contact`..." and, in the Operator's, "- The Researcher's pool, for a bead that is a research question, of any store: `roles.researcher`". The overlay's rules merged with the city's list as it stands (gascity-root `.claude/settings.json`): ``` {"allow":["Agent","Bash","Edit","Glob","Grep","Monitor","Read","Skill","TaskStop","TodoWrite","ToolSearch","WebFetch","WebSearch","Write"],"deny":["Agent","Edit","Write","NotebookEdit"]} ``` `Agent`, `Edit`, `Write` are in `allow` and in `deny`: refused. The test computes this and fails when the `Agent` deny is removed (tried). ## Checked - `bash tests/researcher.sh` on jq 1.6, 1.7.1 and 1.8.2; `tests/formula.sh` and `tests/reviewer.sh` still pass; `gc lint .` ok. - The v2 changelog checker (`-base main -fail-on warning`) passes with the fragment. - No new shell logic (`docs/shell.md`): the one new script is a test. ## Not shown Claude Code itself refusing a call of `Agent` under `dontAsk` with this merge: the `claude` CLI of the Worker's session was not logged in for a scratch run, so the merge rule is Claude Code's documented one and the test models it. Build bead 4 tries it first, as the design says. The city's own patch for the Researcher (model, effort, `check-pins.sh`) is bead 6; an import of this pack that carries the agent fails `check-pins.sh` until that patch is in the same pull request. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Bead: gascitypacks-ajfb
feat: the Researcher, build bead 2: its agent, prompt and settings (gascitypacks-ajfb)
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 19s
test / scripts (pull_request) Successful in 34s
c904388756
Build bead 2 of docs/researcher.md in gascity-root: the agent of the Researcher, a pool of the city (scope city, 0 to 2 acp sessions, fresh at each wake, claiming with --drain-ack) in gc's full-auto mode, never in bypass. Its formula and skill come with build beads 3 and 4; the agent names both.

The city's allow list (gascity-root's .claude/settings.json) has Agent, Edit and Write, and gc gives every session that one file as --settings, with no setting for another in its place (cmd/gc/cmd_start.go at 6bd609f). A list of an agent's own is its overlay's .claude/settings.json, which gc copies into the work directory and Claude Code merges with the city's: allow lists union, and a deny beats any allow. So the overlay denies Agent, Edit, Write and NotebookEdit, and allows the tools the Researcher calls. .gitignore ignores every dotfile, so the overlay's directory is un-ignored beside the Operator's.

The Operator's startup prompt names the pool beside the Worker's two. tests/researcher.sh resolves the agent in a throwaway city, renders both prompts, and merges the overlay with the city's list to show the three tools are not permitted; it passes on jq 1.6, 1.7.1 and 1.8.2, and fails when the Agent deny is removed. It is run by the lint job.

Not shown: Claude Code refusing a call of Agent under dontAsk; the claude CLI of this session was not logged in. Build bead 4 tries it first.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mikluko force-pushed worker/gascitypacks-ajfb from c904388756
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 19s
test / scripts (pull_request) Successful in 34s
to 2bf2d2976b
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 25s
test / scripts (pull_request) Successful in 37s
2026-11-12 15:55:52 +00:00
Compare
mikluko force-pushed worker/gascitypacks-ajfb from 2bf2d2976b
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 25s
test / scripts (pull_request) Successful in 37s
to 190f9e18d9
Some checks failed
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Failing after 23s
test / scripts (pull_request) Successful in 37s
2026-11-12 17:21:08 +00:00
Compare
city-root-review requested changes 2026-11-12 17:51:40 +00:00
Dismissed
city-root-review left a comment

Review of 190f9e18d9 for gascitypacks-ajfb. Checks of the head: failure (test / lint).

Verdict

fail

Findings

  • [blocking] tests/researcher.sh:112: the lint job fails here (run 236, job lint). gc mcp list --agent researcher exits with gc mcp list: provider not found in PATH: provider "claude" command "claude", because the runner has no claude, and the two checks after it then fail on null. That also means the job's Go step (go vet, go test) never ran. I reproduced it locally on the merge with main by running the test with a PATH that holds only gc, jq, /usr/bin and /bin: the same three FAIL lines. With a stub claude (#!/bin/sh / exit 0) on that PATH it prints ok. Fix: have the test put a stub claude in $tmp/bin and prepend that to PATH, with a comment saying gc only checks that the provider's command exists. Don't install Claude Code on the runner. gc mcp list --agent worker and --agent operator passed without it.
  • [minor] roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json:12: the head does not have the two allow rules (mcp__perplexity__perplexity_search, mcp__perplexity__perplexity_ask). The bead routes them through the user, and the description says so, so this finding does not block. Until they are committed, the README (the Researcher section: "allows the tools it calls: … and two of Perplexity's") and the changelog describe a grant that the file does not make. The next head should carry the user's commit. tests/researcher.sh:123 checks only the upper bound (nothing beyond search and ask). Once the lines are in, it should also require both, so that a list that loses them fails.
  • [minor] README.md:28 (the "Permission mode" section, which main gained in #57 after this branch was cut): it says what the Worker, the Reviewer and the Operator do, and doesn't mention the Researcher. Add one sentence saying the Researcher pins full-auto (dontAsk) in every city that imports the pack, and why (the user's brief: full-auto with an allow list, never bypass). That keeps the section complete after the merge.

Verified

  • Read the work bead (description, both rework notes), the PR description and the whole diff (10 files, +226/-1) against main 62ca905. The target branch has no REVIEW.md, AGENTS.md or CLAUDE.md.
  • Merged the head into origin/main (62ca905, which includes #57 and #73): clean, ort, no conflicts. The forge says mergeable.
  • On the merged tree under env -i: gc lint . ok; tests/formula.sh, tests/reviewer.sh, tests/operator-overlay.sh, tests/researcher.sh ok (with claude on PATH); go vet ./... and go test ./... ok. tests/researcher.sh without claude on PATH fails as CI does (finding 1).
  • #57 (Worker and Reviewer take the city's permission mode) does not conflict with this change. The Researcher's explicit full-auto pin matches the bead, and no test on main forbids it.
  • The server's start line: under /bin/sh, dash, bash and zsh, k=$(cat …) && PERPLEXITY_API_KEY=$k exec … exports the key to the exec'd process (checked with env and a fake token). With no file it exits 1 with cat's message, and the key is never in argv or in a tracked file.
  • @perplexity-ai/mcp-server@1.3.0 exists on npm and is latest (published 2026-09-25). Its dist/ registers exactly perplexity_search, perplexity_ask, perplexity_research and perplexity_reason, and reads the key from process.env.PERPLEXITY_API_KEY only. I only grepped it; nothing was run.
  • Scope: agent, prompt, the Operator's line, overlay settings with deny Agent/Edit/Write/NotebookEdit, the agent-only MCP server, the key file and its bao command in the README and the PR, a changelog fragment, and the test wired into CI. It adds no new shell logic beyond a test and the one-line start. The PR has a description.
Review of 190f9e18d9d26915e195115806703f934e05a0d7 for gascitypacks-ajfb. Checks of the head: failure (test / lint). ### Verdict fail ### Findings - [blocking] tests/researcher.sh:112: the `lint` job fails here (run 236, job `lint`). `gc mcp list --agent researcher` exits with `gc mcp list: provider not found in PATH: provider "claude" command "claude"`, because the runner has no `claude`, and the two checks after it then fail on `null`. That also means the job's Go step (`go vet`, `go test`) never ran. I reproduced it locally on the merge with main by running the test with a PATH that holds only `gc`, `jq`, `/usr/bin` and `/bin`: the same three FAIL lines. With a stub `claude` (`#!/bin/sh` / `exit 0`) on that PATH it prints `ok`. Fix: have the test put a stub `claude` in `$tmp/bin` and prepend that to PATH, with a comment saying gc only checks that the provider's command exists. Don't install Claude Code on the runner. `gc mcp list --agent worker` and `--agent operator` passed without it. - [minor] roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json:12: the head does not have the two allow rules (`mcp__perplexity__perplexity_search`, `mcp__perplexity__perplexity_ask`). The bead routes them through the user, and the description says so, so this finding does not block. Until they are committed, the README (the Researcher section: "allows the tools it calls: … and two of Perplexity's") and the changelog describe a grant that the file does not make. The next head should carry the user's commit. tests/researcher.sh:123 checks only the upper bound (nothing beyond search and ask). Once the lines are in, it should also require both, so that a list that loses them fails. - [minor] README.md:28 (the "Permission mode" section, which main gained in #57 after this branch was cut): it says what the Worker, the Reviewer and the Operator do, and doesn't mention the Researcher. Add one sentence saying the Researcher pins `full-auto` (`dontAsk`) in every city that imports the pack, and why (the user's brief: full-auto with an allow list, never bypass). That keeps the section complete after the merge. ### Verified - Read the work bead (description, both rework notes), the PR description and the whole diff (10 files, +226/-1) against main 62ca905. The target branch has no REVIEW.md, AGENTS.md or CLAUDE.md. - Merged the head into origin/main (62ca905, which includes #57 and #73): clean, ort, no conflicts. The forge says `mergeable`. - On the merged tree under `env -i`: `gc lint .` ok; `tests/formula.sh`, `tests/reviewer.sh`, `tests/operator-overlay.sh`, `tests/researcher.sh` ok (with `claude` on PATH); `go vet ./...` and `go test ./...` ok. `tests/researcher.sh` without `claude` on PATH fails as CI does (finding 1). - #57 (Worker and Reviewer take the city's permission mode) does not conflict with this change. The Researcher's explicit `full-auto` pin matches the bead, and no test on main forbids it. - The server's start line: under /bin/sh, dash, bash and zsh, `k=$(cat …) && PERPLEXITY_API_KEY=$k exec …` exports the key to the exec'd process (checked with `env` and a fake token). With no file it exits 1 with `cat`'s message, and the key is never in argv or in a tracked file. - `@perplexity-ai/mcp-server@1.3.0` exists on npm and is `latest` (published 2026-09-25). Its `dist/` registers exactly `perplexity_search`, `perplexity_ask`, `perplexity_research` and `perplexity_reason`, and reads the key from `process.env.PERPLEXITY_API_KEY` only. I only grepped it; nothing was run. - Scope: agent, prompt, the Operator's line, overlay settings with deny Agent/Edit/Write/NotebookEdit, the agent-only MCP server, the key file and its `bao` command in the README and the PR, a changelog fragment, and the test wired into CI. It adds no new shell logic beyond a test and the one-line start. The PR has a description.
mikluko force-pushed worker/gascitypacks-ajfb from 190f9e18d9
Some checks failed
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Failing after 23s
test / scripts (pull_request) Successful in 37s
to f557cfe515
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 23s
test / scripts (pull_request) Successful in 42s
2026-11-12 17:56:50 +00:00
Compare
city-root-review left a comment

Review of f557cfe515 for gascitypacks-ajfb. Checks of the head: success.

Verdict

pass

Findings

  • [minor] roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json:12: this head still lacks the two allow rules mcp__perplexity__perplexity_search and mcp__perplexity__perplexity_ask. Claude Code refused the Edit in full-auto again. The bead sends these lines to the user, and the top of the description gives them exactly, so this does not block. If the head merges first, the user's commit goes to main afterwards. Until then, README.md:605 ("and two of Perplexity's") and README.md:607 ("The allow list names the first two") describe a grant the file does not make. The changelog fragment's "is to name" is accurate. When the commit lands, tests/researcher.sh:312 should also check the lower bound (the jq line the description gives), so that a list that drops the rules fails.

Verified

  • Read the work bead (the description and the three rework notes), the PR description, my review 317 of 190f9e1, and the whole diff (10 files, +234/-1) against main 0deb291. Main has no REVIEW.md, AGENTS.md or CLAUDE.md.
  • Review 317's findings: (1) tests/researcher.sh now puts a stub claude (exit 0) in $tmp/bin ahead of PATH, with a comment saying why. Fixed. (2) The allow rules: see the minor finding above. They still need the user's commit, as the bead says. (3) README "Permission mode" (README.md:55) has a paragraph saying the Researcher pins full-auto (dontAsk) in every city that imports the pack, and why. Fixed.
  • Merge: the head sits on main's tip (0deb291), so it merges as a fast-forward with no conflicts. The forge says mergeable.
  • I ran the lint job's steps on the merged tree, under env -i, with PATH holding only gc, jq, go, /usr/bin and /bin (no claude, as on the runner) and with a throwaway HOME. gc lint . ok. tests/formula.sh, tests/reviewer.sh, tests/operator-overlay.sh and tests/researcher.sh ok. go vet ./..., go test ./... and go test -race ./... ok.
  • Changelog: I built the checker from mikluko/changelog at tag v2 and ran it with -base=main -fail-on=warning: valid=true.
  • In a throwaway city that imports this checkout's roles pack, gc mcp list --agent roles.researcher and --agent researcher each show one server, perplexity (layer agent, command sh). roles.worker and roles.operator show none.
  • The scripts job's files are untouched by this diff. The head's checks completed with success.
  • Scope is unchanged since round 2. It has no new shell logic beyond the test, and no key in a tracked file. The PR has a description.
Review of f557cfe51521e22232b94b41dc2f0e17e9f02418 for gascitypacks-ajfb. Checks of the head: success. ### Verdict pass ### Findings - [minor] roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json:12: this head still lacks the two allow rules `mcp__perplexity__perplexity_search` and `mcp__perplexity__perplexity_ask`. Claude Code refused the Edit in full-auto again. The bead sends these lines to the user, and the top of the description gives them exactly, so this does not block. If the head merges first, the user's commit goes to main afterwards. Until then, README.md:605 ("and two of Perplexity's") and README.md:607 ("The allow list names the first two") describe a grant the file does not make. The changelog fragment's "is to name" is accurate. When the commit lands, `tests/researcher.sh:312` should also check the lower bound (the `jq` line the description gives), so that a list that drops the rules fails. ### Verified - Read the work bead (the description and the three rework notes), the PR description, my review 317 of 190f9e1, and the whole diff (10 files, +234/-1) against main 0deb291. Main has no REVIEW.md, AGENTS.md or CLAUDE.md. - Review 317's findings: (1) `tests/researcher.sh` now puts a stub `claude` (`exit 0`) in `$tmp/bin` ahead of PATH, with a comment saying why. Fixed. (2) The allow rules: see the minor finding above. They still need the user's commit, as the bead says. (3) README "Permission mode" (README.md:55) has a paragraph saying the Researcher pins `full-auto` (`dontAsk`) in every city that imports the pack, and why. Fixed. - Merge: the head sits on main's tip (0deb291), so it merges as a fast-forward with no conflicts. The forge says `mergeable`. - I ran the `lint` job's steps on the merged tree, under `env -i`, with PATH holding only `gc`, `jq`, `go`, `/usr/bin` and `/bin` (no `claude`, as on the runner) and with a throwaway HOME. `gc lint .` ok. `tests/formula.sh`, `tests/reviewer.sh`, `tests/operator-overlay.sh` and `tests/researcher.sh` ok. `go vet ./...`, `go test ./...` and `go test -race ./...` ok. - Changelog: I built the checker from mikluko/changelog at tag `v2` and ran it with `-base=main -fail-on=warning`: `valid=true`. - In a throwaway city that imports this checkout's `roles` pack, `gc mcp list --agent roles.researcher` and `--agent researcher` each show one server, `perplexity` (layer `agent`, command `sh`). `roles.worker` and `roles.operator` show none. - The scripts job's files are untouched by this diff. The head's checks completed with `success`. - Scope is unchanged since round 2. It has no new shell logic beyond the test, and no key in a tracked file. The PR has a description.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/gascitypacks!71
No description provided.