setup-benny
Configure Benny and prepare its triage and repro automations. Use when setting up Benny or changing its Slack, tracker, repository, routing, control, model, or budget settings.
- License 许可
- Apache-2.0
- 所属仓库
- caudra/caudra
- 最近更新
- 2026-11-04
- Stars
- ★ 11
- Forks
- 1
01 前言 Front Matter
- name
- setup-benny
- description
- Configure Benny and prepare its triage and repro automations. Use when setting up Benny or changing its Slack, tracker, repository, routing, control, model, or budget settings.
- disable-model-invocation
- true
03 SKILL.md 正文
Set up Benny
Benny ships as a dormant automation pack inside pstack. Its files are pages of the pstack skill, not skills of their own; this file and the two operational files have no slash command.
The human enters setup by pointing Caudra at the pack's FOR_AGENTS.md, the page pstack/automations/benny/FOR_AGENTS.md, which leads here. The pack is never copied into the target repository: its skills, references, and templates stay pages at pstack/automations/benny/..., loaded with the skill tool.
Benny needs external configuration and two Caudra automations, benny-triage and benny-reproduce. Both ship with Caudra and are listed in /automations while pstack and experimental.automations are on in the global caudra.toml.
Do not write a script that replaces either automation until the user explicitly asks. Never put a secret value in an automation script, a prompt, or configuration.
1. Check the prerequisites
Do this before asking for Benny configuration and before the user arms either automation.
Ask which repository will run the automations. Setup, and every session that arms an automation, works in that repository: each automation messages the session it is armed in, and that session reads the configuration under the repository's .caudra/benny/.
Check that automations are on: code reaches the automation module only when experimental.automations is set. If it is off, tell the user to set automations = true under [experimental] in the global caudra.toml and restart Caudra, then stop.
The shared pstack skills Benny uses are built in. Load each with the skill tool when a Benny file names it:
pstack/howpstack/whypstack/tddpstack/unsloppstack/principle-separate-before-serializing-shared-statepstack/principle-minimize-reader-loadpstack/principle-guard-the-context-windowpstack/principle-sequence-verifiable-unitspstack/principle-fix-root-causespstack/principle-prove-it-works
2. Adapt the configuration
Open these examples:
../../templates/configuration.example.yaml../reproduce-and-fix-issues/references/feature-map.example.md
Create user-owned copies in the target repository's .caudra/benny/. These are configuration files, not pack files:
- Configuration:
.caudra/benny/configuration.yaml - Feature map:
.caudra/benny/feature-map.md - Routing map:
.caudra/benny/routing.md
Fill one feature-map section for every user-facing feature the automation may reproduce. Keep it at the user point of view. Do not freeze implementation details or current code paths in the map.
Both automations pass the configuration path to their session with every firing, from their config_path arg, which defaults to .caudra/benny/configuration.yaml. The session reads it and the maps it names from the project's working tree. Keep every value in them secret-free.
Use stable repository-relative paths for configuration files. Name the pack's files by their page addresses, never by a path on disk.
3. Fill the required choices
Ask for or confirm:
- Source Slack channel ID
- Optional operations or status channel ID
- Repository URL and default branch
- Triage identity's Slack user ID: the user the triage session posts as
- Issue tracker type, team, project, labels, and intake status
- Tracker adapter skill or MCP actions
- Optional routing map path
- Required control skill name
- Required user-facing feature-map path
- Status emoji strings
- Pull request URL format
- Polling and effort budgets
- Model and thinking level for triage, repro, code work, and media review, as
<model> <thinking>
Use only models the session can run: its model favorites, in the # Model favorites system reminder, or a model the user picks in /model. caudra models lists every model Caudra knows, not only usable ones, so do not pick from it. Triage and repro run on the model of the session each automation is armed in. Do not guess a model and do not carry over a private default.
Polling has fixed limits. benny-triage reads one page of channel history per poll; when more than a page arrives between polls, it skips the older posts and logs that it did. benny-reproduce looks at the first 100 thread roots in its lookback. Tell the user when the source channel is busy enough to hit either.
The source channel, triage identity, repository, tracker adapter, control skill, and feature map must be explicit. Fail setup if any required value stays ambiguous.
4. Check integration capabilities
The triage automation needs:
- Read access to the configured source Slack channel and its threads
- Thread-reply access in that channel
- Attachment metadata and file download access when reports include media
- Search, read, create, and update access through the configured issue-tracker adapter
The repro automation needs:
- Read access to the source thread
- Thread-reply access in the source channel
- Optional post and edit access in the configured operations channel
- Repository read and history access
- A pull request action that can open a draft pull request, such as
gh pr create --draft - The configured control-adapter skill
Both automations poll Slack with BENNY_SLACK_BOT_TOKEN, so its bot needs channels:history on the source channel and must be a member of it. The user sets the variable in the environment Caudra starts from or in the global .env, ~/.config/caudra/.env, where the automations' http() reads it; a project .env cannot set it. Never store the value in YAML.
Slack reads, posts, reactions, and file downloads use a Slack MCP server's tools when one is enabled, else the Slack Web API with curl and the same token. Shell commands start from a cleared environment, so for curl the user also forwards the token to commands with pass = ["BENNY_SLACK_BOT_TOKEN"] under [agent.shell_env] in the global caudra.toml, or with /env. That forwarding applies to local sessions only: in a remote workspace, curl sees the token only if the remote server's operator provides it, so prefer a Slack MCP server there. With curl, the bot also needs the scopes for what the session does, such as chat:write, reactions:write, and files:read.
Do not use undocumented integration endpoints.
5. Prepare the routing map
If the user wants reroutes or owner pings:
- Copy
../triage-issue-reports/references/routing.example.mdto.caudra/benny/routing.md. - Replace every placeholder with public or organization-local values.
- Keep owner pings off by default.
- Allow a ping only for a configured feature owner or a confirmed likely regression author.
If no routing map is configured, triage may classify a report but must not guess a destination or owner.
6. Verify the control adapter
Read ../reproduce-and-fix-issues/references/control-adapter.md and the user's completed feature map.
Confirm that the named skill can:
- Bring up the target app
- Navigate every mapped feature through the real UI
- Exercise mapped states through declared adapter actions
- Inspect state without forcing the result
- Capture screenshots
- Start and stop a recording
- Clean up its processes and temporary data
If any capability is missing, leave the repro automation disarmed. It must fail closed rather than claim a reproduction it did not perform.
7. Arm the automations
benny-triage and benny-reproduce ship with Caudra. With pstack and experimental.automations on, /automations already lists both as bundled scripts, trusted as shipped, so there is nothing to write, validate, or trust. A project or user script of the same name replaces the bundled one. Never write one unless the user asks.
Read ../../FOR_AGENTS.md as the primary user-intent source. Use it to understand the two triggers, tools, instructions, outcomes, and shared rules. The templates ../../templates/triage-automation-prompt.md and ../../templates/reproduce-automation-prompt.md say what each automation's message asks of its session.
benny-triage polls the source channel every minute and messages its session with each new top-level report that is neither a bot's nor the triage identity's. Its message tells the session to load pstack/automations/benny/skills/triage-issue-reports/SKILL.md and follow it for each report, with the configuration in config_path. It starts watching when armed, so earlier messages are never triaged.
benny-reproduce polls the channel's recent threads every two minutes and messages its session with each thread where the triage identity's reply carries [benny:bug] or [benny:performance]. Its message tells the session to load pstack/automations/benny/skills/reproduce-and-fix-issues/SKILL.md and follow it for each thread.
Then hand over. Arming belongs to the user. Tell them to:
- Set
BENNY_SLACK_BOT_TOKEN, as in step 4. - Arm each in the session that should do its work, filled from the configuration. Separate sessions keep a long repro from delaying triage. Each polls only while its session is open.
/automations arm benny-triage {"channel_id": "C…", "triage_user_id": "U…"}
/automations arm benny-reproduce {"channel_id": "C…", "triage_user_id": "U…"}
Add "config_path": "<path>" when the configuration is not at .caudra/benny/configuration.yaml.
Existing setup
Finish configuration, routing, control-adapter, and feature-map validation. Changed args, such as a new channel or triage identity, need no new script: the user arms the automation again with the new args, or edits them under Args in /automations.
Do not install a copy under any name.
Arming boundary
Never arm an automation yourself, and never write a script that replaces a bundled one without the user's consent.
Do not arm either automation on the source channel until the thread-safety test passes.
8. Test thread safety
Use a test channel or a harmless test report.
Before testing, confirm that the configuration and every file it names exist under the target repository's .caudra/benny/, that /automations lists both automations as valid, that BENNY_SLACK_BOT_TOKEN is set, and, when Slack goes through curl, that /env shows it reaching shell commands. If any check fails, stop. Tell the user that the automations cannot be armed yet.
Verify:
- Triage stores the report's root
tsand posts exactly one verdict as a reply. - The verdict contains one configured marker.
- Repro accepts the marker only from the configured triage identity.
- Repro keeps the same immutable source coordinates.
- No source-channel root message appears.
- A delegated worker cannot use any Slack write action.
- Missing coordinates, a deleted parent, or a failed preflight produces no post and no tracker issue.
Arm both on the source channel for normal traffic only after all seven checks pass.
04 同仓库更多 Skills
caudra-workflow-dev
Write, validate, run, and debug Caudra workflows. A workflow is a durable Rhai script that fans work out to subagents in phases, checks what comes back, and keeps a journal so it can resume. Load this before writing a workflow file, before calling the workflow tool, or when a repeatable multi-agent plan would serve the user better than doing the steps by hand.
why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
unslop
Cut AI tells from any writing.
typescript-best-practices
TypeScript best practices. Use when reading or editing any .ts or .tsx file.
technical-writing
Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for /technical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages.
teach
Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'.