Skip to content

Add sentry issue investigator agent and update related documentation - #6

Open
bsuchecki wants to merge 9 commits into
mainfrom
task/ai-sentry-issue-investigator
Open

Add sentry issue investigator agent and update related documentation#6
bsuchecki wants to merge 9 commits into
mainfrom
task/ai-sentry-issue-investigator

Conversation

@bsuchecki

Copy link
Copy Markdown
Collaborator

This pull request introduces a new agent, sentry-issue-investigator, designed to investigate and triage Sentry issues in the Tools codebase, with supporting documentation and configuration. The agent integrates with Sentry, Elasticsearch, and Jira, and follows a strict, gated escalation path for error investigation, ticket creation, and implementation handoff. It also adds detailed configuration and guardrails for production database and log access, ensuring safety and transparency.

The most important changes are:

New Agent: Sentry Issue Investigator

  • Added the sentry-issue-investigator agent, which investigates Sentry issues in the Tools Location and API modules, corroborates with production logs and optionally database data, and can escalate findings through Jira ticket creation and implementation handoff, each requiring explicit user confirmation. The agent never writes application code itself. (agents/sentry-issue-investigator/README.md, CLAUDE.md) [1] [2]

Documentation and Usage

  • Comprehensive README outlines agent capabilities, escalation gates, Jira conventions, and safe usage patterns. Includes sample triggers, setup instructions, and honest limitations of the system. (agents/sentry-issue-investigator/README.md)
  • Updated CLAUDE.md with trigger phrases and operational scope for the new agent. (CLAUDE.md)

Production Database Access Guardrails

  • Added db.env.example as a template for safe, read-only database access, with strong warnings and instructions to ensure only SELECT queries are possible, and explaining the rationale and limits of the SQL guard layers. (agents/sentry-issue-investigator/config/db.env.example)

Elasticsearch Configuration and Safety

  • Added elasticsearch.md detailing production log index patterns, field mapping, query recipes, correlation strategies, and strict read-only usage discipline for the agent. (agents/sentry-issue-investigator/config/elasticsearch.md)

Access Control Updates

  • Refined .claude/settings.json to enumerate specific allowed MCP servers for the agent, replacing the previous wildcard. (.claude/settings.json)

bsuchecki and others added 5 commits July 8, 2026 15:31
…ntation based on how DA, Locafy and Neustar were introduced
…ntation based on how DA, Locafy and Neustar were introduced
…it, dashboard, plan-only)

Add a failed-submissions admin dashboard phase; split frontend from backend into separate tickets and surface the aggregator in the LM edit-page Aggregators section (not Connections); require each ticket to carry a description + acceptance criteria + dependency ordering; add a Phase 1 endpoint-to-role mapping step (ask when the API doc is ambiguous); and reframe the skill as plan-and-tickets only (never implements or asks to start implementation).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bsuchecki
bsuchecki requested review from Khutorny and dubenyuk and a lite review from Copilot and removed request for Khutorny August 24, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR primarily adds a new sentry-issue-investigator agent (plus supporting configs/scripts) for triaging Tools Sentry issues with evidence from Elasticsearch and optional read-only DB inspection, and wires the agent trigger into the workspace CLAUDE.md. It also includes additional, seemingly unrelated scope: a new Connected Locations “new aggregator integration planner” Skill and expanded product context docs for Tools and ListingSyncer.

Changes:

  • Add agents/sentry-issue-investigator/ (orchestrator, Sentry/Elasticsearch/Jira cookbooks, ticket templates, and a guarded read-only DB query helper script).
  • Update workspace routing (CLAUDE.md) and permissions (.claude/settings.json) for agent usage.
  • Add a new product skill for planning end-to-end aggregator integrations, plus its reference map; expand Tools/ListingSyncer product context docs.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
CLAUDE.md Adds trigger routing and scope notes for the new sentry-issue-investigator agent.
.claude/settings.json Replaces wildcard MCP allowance with an explicit allowlist.
.gitignore Ignores .plans/.
agents/sentry-issue-investigator/CLAUDE.md Agent orchestrator: modes A–G, gating rules, evidence discipline, and operational guardrails.
agents/sentry-issue-investigator/README.md End-user documentation for capabilities, setup, limits, and escalation path.
agents/sentry-issue-investigator/config/sentry.md Verified Sentry project/org scoping and query cookbook.
agents/sentry-issue-investigator/config/elasticsearch.md Verified ES index/field map, log sources, and safe query recipes.
agents/sentry-issue-investigator/config/jira.md Jira project/type conventions, dedup workflow, and formatting verification guidance.
agents/sentry-issue-investigator/config/ticket-templates.md Templates for Jira ticket descriptions and fix-plan comments (wiki markup).
agents/sentry-issue-investigator/config/db.env.example DSN template + rationale for requiring a SELECT-only DB grant.
agents/sentry-issue-investigator/scripts/db-select.py Guarded SQL runner enforcing read-only usage (single statement, allowlist/blocklist, read-only transaction, rollback).
products/Tools/CONTEXT.md Expands Tools product/tech context and build/test commands.
products/ListingSyncer/CONTEXT.md Expands ListingSyncer product/tech context and build/test commands.
skills/product/cl-new-aggregator-integration-planner/SKILL.md New planning skill describing an 8-phase, multi-repo aggregator integration plan and Jira ticketing workflow.
skills/product/cl-new-aggregator-integration-planner/references/reference-map.md Reference file map (paths/branches) to model new integrations on existing ones.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .claude/settings.json
Comment on lines +11 to +20
"mcp__atlassian",
"mcp__claude_ai_Atlassian_Rovo",
"mcp__claude_ai_Google_Calendar",
"mcp__claude_ai_Gmail",
"mcp__claude_ai_Google_Drive",
"mcp__claude_ai_BrightLocal_MCP",
"mcp__claude_ai_BrightLocal_Design_System",
"mcp__claude_ai_Firecrawl",
"mcp__claude_ai_Metabase",
"mcp__metabase"
## Repository

`/home/lenovo/brightLocal/ListingSyncer` (or `github.com/BrightLocal/ListingSyncer`)
`/home/bartek/IdeaProjects/ListingSyncer` (or `github.com/BrightLocal/ListingSyncer`).
Comment thread products/Tools/CONTEXT.md
> campaigns, and monitor local search rankings.
## Repository

`/home/bartek/IdeaProjects/Tools` (`github.com/BrightLocal/Tools`).
- **Project** — default **`LM`** (Connected Locations); ask if different.
- **Parent** — create a parent **Task/Story** "Integrate <X> aggregator" summarizing the effort (paste the
plan / attach `plan.md`), or link under an existing epic if the user names one.
w- **Issue type & labels** — child tickets as `Task` (or sub-tasks of the parent if the project uses them);
Comment on lines +1 to +5
---
name: cl-new-aggregator-integration-planner
description: >-
Plans the FULL end-to-end integration of a NEW listing aggregator / directory syncer across
BrightLocal Tools + ListingSyncer — the same scope we followed for DataAxle, Locafy and Neustar.
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.

4 participants