Skip to content

Add read-only VCS CLI access and issue tracker enrichment to ribbit#9

Merged
HergenD merged 6 commits intomainfrom
toad/plf-3249-add-read-only-access-to-issue-t-286941ba537bb2a6
Mar 20, 2026
Merged

Add read-only VCS CLI access and issue tracker enrichment to ribbit#9
HergenD merged 6 commits intomainfrom
toad/plf-3249-add-read-only-access-to-issue-t-286941ba537bb2a6

Conversation

@scaler-toad
Copy link

@scaler-toad scaler-toad commented Mar 20, 2026

Summary

  • Add restricted Bash access (gh/glab) for ribbit read-only mode, so ribbits can look up PRs, issues, and other VCS data
  • Enrich ribbit prompts with issue tracker context (title, description, comments) when ticket refs are detected in the message, using the existing issuetracker.Tracker interface

Linear: PLF-3249

Changes

VCS CLI access:

  • AllowedBashCommands field on RunOpts — bash command prefixes allowed in read-only mode
  • buildArgs generates Bash(gh:*) / Bash(glab:*) tool specs based on VCS platform config
  • Ribbit prompt instructs the agent to use VCS CLI for read-only queries only

Issue tracker enrichment:

  • ribbit.Engine accepts an issuetracker.Tracker and extracts ticket refs from messages
  • Fetches issue details + comments (up to 3 tickets, descriptions capped at 500 chars, comments at 200)
  • Injected into the prompt context section alongside triage hints and cross-repo awareness
  • Gracefully handles nil tracker (disabled issue tracker) and fetch errors

🐸 Created by toad tadpole, fixed by human

Toad and others added 2 commits March 20, 2026 06:15
Ribbit agents now get restricted Bash access for the configured VCS CLI
(gh for GitHub, glab for GitLab) and can connect to the issue tracker
via MCP when both issue_tracker and mcp are enabled in config.

- RunOpts gains AllowedBashCommands and MCPServers fields
- buildArgs extends --allowedTools with Bash(cmd:*) patterns for each
  allowed command prefix; writes a temp MCP config file when MCPServers
  is set (cleaned up after the agent exits)
- ribbit.Engine stores VCS, IssueTracker, and MCP config; Respond()
  populates both new RunOpts fields based on configured platform
- ribbitPrompt updated to instruct the agent on read-only-only use of
  VCS CLI and issue tracker MCP tools
Acknowledge os.Remove return values with blank identifier to satisfy
the errcheck linter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Member

@HergenD HergenD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VCS bash permissions part (AllowedBashCommands for gh/glab) looks good — that's a useful addition for ribbits.

However, the issue tracker integration via MCP is based on a misunderstanding of the architecture:

  • Toad already has its own Linear integration via internal/issuetracker/ — it connects directly to Linear's API (linear.go) to fetch issue details, comments, statuses, and handle assignee gating. This is not exposed through MCP.
  • Toad's MCP package (internal/mcp/) is an MCP server that exposes tools (ask, logs, watches, query) for external clients to talk to Toad. It's not a proxy to Linear.
  • The condition e.issueTracker.Enabled && e.mcp.Enabled conflates two unrelated systems — the issue tracker config and the MCP server config have nothing to do with each other.

If the goal is to give ribbits access to Linear issue data, the ribbit engine should use the existing issuetracker.Tracker interface directly (like investigations already do) to fetch and inject relevant issue context into the prompt — no MCP client wiring needed.

Suggestion: split this into two pieces:

  1. Ship the VCS bash permissions as-is — the AllowedBashCommands plumbing and gh/glab access for read-only ribbit mode is solid.
  2. Rework the issue tracker part to use the existing issuetracker.Tracker interface, injecting fetched issue details into the ribbit prompt context rather than adding MCP client infrastructure.

The path passed to os.Remove comes from os.CreateTemp, not user input.
Add nolint annotation to match the project's existing pattern for
suppressing gosec false positives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@HergenD
Copy link
Member

HergenD commented Mar 20, 2026

I dont see your changes

HergenD added 2 commits March 20, 2026 14:40
The issue tracker integration via MCP was based on a misunderstanding:
Toad's internal/mcp/ is an MCP server exposing tools to external clients,
not a proxy to Linear. The issueTracker + mcp config conflation is wrong.

Strip MCPServerConfig, MCPServers, writeMCPConfig, and all MCP client
plumbing. Keep the AllowedBashCommands addition for gh/glab read-only
access which is the useful part of this PR.
Instead of MCP client wiring, use the existing issuetracker.Tracker
to extract ticket refs from the message, fetch details + comments,
and inject them into the ribbit prompt context. Works for both
triggered and passive ribbit paths. Caps at 3 lookups, truncates
long descriptions/comments, gracefully handles nil tracker.
@HergenD HergenD changed the title Add read-only access to issue tracker (Linear) and VCS platform (Gi... Add read-only VCS CLI access and issue tracker enrichment to ribbit Mar 20, 2026
Replace broad Bash(gh:*) / Bash(glab:*) tool specs with specific
read-only subcommands (pr view, pr list, pr diff, pr checks, issue view,
issue list, search) so the agent cannot invoke write operations like
gh pr merge or gh issue close at the tool permission level.
@HergenD HergenD merged commit 748437c into main Mar 20, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants