Skip to content

chore: add Slack triage tooling, PR reviewer assignment, and MCP config#2594

Open
balzss wants to merge 1 commit into
masterfrom
chore/slack-triage-claude-skill
Open

chore: add Slack triage tooling, PR reviewer assignment, and MCP config#2594
balzss wants to merge 1 commit into
masterfrom
chore/slack-triage-claude-skill

Conversation

@balzss

@balzss balzss commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add /slack-triage: triage a thread from the internal Slack channel — classify, investigate the code (incl. tracing the commit/PR/author behind a regression), reproduce and confirm with the user, draft a Jira ticket, and draft a reply for the user to post (the skill never posts to Slack itself).
  • Add /slack-setup: one-time bootstrap for the read-only Slack bot token + scopes, stored in .claude/mcp.local.env (the single source .mcp.json reads).
  • Add /implement: bridge a triaged ticket to a verified change on a branch, reusing the in-session investigation rather than just the ticket summary.
  • /pr: suggest a reviewer from .github/CODEOWNERS ranked by fewest reviews in the last 60 days (user picks; not auto-assigned), and self-assign the PR author.
  • /commit: refuse to commit on master/main and offer to create a feature branch.
  • Add .github/CODEOWNERS (reviewer roster) and .mcp.json (atlassian + slack MCP servers); allowlist the new command files in .gitignore.

Test Plan

  • /slack-setup, then /slack-triage <thread-link>: confirm it reads the thread and stops at a drafted reply + proposed ticket — nothing posted to Slack or created in Jira without confirmation.
  • /pr on a branch: confirm it lists CODEOWNERS candidates with their 60-day review counts and only assigns after you pick.
  • /commit while on master: confirm it refuses and offers to create a feature branch.

🤖 Generated with Claude Code

@balzss balzss self-assigned this Jun 16, 2026
@balzss balzss requested a review from joyenjoyer June 16, 2026 13:40
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2594/

Built to branch gh-pages at 2026-06-19 09:00 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions Bot pushed a commit that referenced this pull request Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Visual regression report

No changes.

Status Count
Unchanged 32
Changed 0
New 0
Removed 0

📊 View full report

Baselines come from the visual-baselines branch. They refresh on every merge to master.

@balzss balzss force-pushed the chore/slack-triage-claude-skill branch from e891e96 to 6f3a3d0 Compare June 17, 2026 13:14
Comment thread .mcp.json Outdated
"command": "sh",
"args": [
"-c",
"set -a; . /Users/balazs.saros/work/instui/master/.claude/mcp.local.env; set +a; exec npx -y @modelcontextprotocol/server-slack"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You forgot your local home folder here

@balzss balzss force-pushed the chore/slack-triage-claude-skill branch 2 times, most recently from 1bf4192 to 7ac2bfd Compare June 17, 2026 15:16
@balzss balzss changed the title chore: add slack-triage command and MCP server config chore: add Slack triage tooling, PR reviewer assignment, and MCP config Jun 18, 2026
@balzss balzss force-pushed the chore/slack-triage-claude-skill branch from 7ac2bfd to 8b16acd Compare June 18, 2026 08:52
@balzss balzss requested a review from joyenjoyer June 18, 2026 11:14
@matyasf matyasf requested review from Copilot and matyasf June 18, 2026 12:06

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.

⚠️ Not ready to approve

The /pr reviewer-selection script mis-parses CODEOWNERS team handles (e.g., @org/team), which can yield invalid reviewer candidates and misleading counts.

Pull request overview

Adds Claude Code command tooling and configuration to support Slack-thread triage (read-only), Jira ticket drafting/creation via MCP, an “implement from triage” workflow, and improved PR workflow automation (self-assign + reviewer suggestion from CODEOWNERS).

Changes:

  • Add .mcp.json with Atlassian (SSE) and Slack (npx-based) MCP server configuration.
  • Add new Claude Code commands: /slack-triage, /slack-setup, and /implement.
  • Extend existing /pr and /commit commands to support reviewer suggestion/assignment flow and to prevent committing on master/main.
File summaries
File Description
.mcp.json Configures Atlassian + Slack MCP servers (Slack reads local env file).
.gitignore Keeps .claude/commands/* ignored by default while allowlisting new shared commands; confirms local secrets remain ignored.
.github/CODEOWNERS Adds reviewer roster used by /pr reviewer suggestion tooling.
.claude/commands/slack-triage.md Defines a read-only Slack triage workflow including investigation, repro gating, and Jira draft/creation confirmation steps.
.claude/commands/slack-setup.md Documents one-time Slack app/token setup and verification for read-only thread access.
.claude/commands/implement.md Defines a workflow to implement a triaged ticket into a verified branch change (stop before commit/PR).
.claude/commands/pr.md Adds PR self-assignment and reviewer suggestion/assignment instructions based on recent review load.
.claude/commands/commit.md Strengthens “never commit on master/main” guidance and adds branching guidance when on the wrong branch.

Copilot's findings

  • Files reviewed: 7/8 changed files
  • Comments generated: 1

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .claude/commands/pr.md
Comment on lines +41 to +43
# Roster: individual @handles from CODEOWNERS — drop comments, globs, and @org/team handles.
grep -v '^[[:space:]]*#' .github/CODEOWNERS \
| grep -oE '@[A-Za-z0-9_-]+' | sed 's/@//' | grep -v '/' | sort -u > /tmp/pr_roster.txt
Adds Claude Code slash commands and supporting config:

- /slack-triage: triage a thread from the internal Slack channel — classify,
  investigate the code (incl. tracing the commit/PR/author behind a regression),
  reproduce and confirm with the user, draft a Jira ticket, and draft a reply
  for the user to post (the skill never posts to Slack itself).
- /slack-setup: one-time bootstrap for the read-only Slack bot token and scopes,
  stored in .claude/mcp.local.env (the single source .mcp.json sources).
- /implement: bridge a triaged ticket to a verified change on a branch, reusing
  the in-session investigation rather than just the ticket summary.
- /pr: suggest a reviewer from .github/CODEOWNERS ranked by fewest reviews in the
  last 60 days (user picks; not auto-assigned), and self-assign the PR author.
- /commit: refuse to commit on master/main and offer to create a feature branch
  (also flags committing onto an unrelated branch).
- .github/CODEOWNERS: reviewer roster the /pr skill reads.
- .mcp.json: wire up the atlassian and slack MCP servers.
- .gitignore: track the new shared command files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@balzss balzss force-pushed the chore/slack-triage-claude-skill branch from 8b16acd to ed9532f Compare June 19, 2026 08:55
Comment thread .claude/commands/pr.md
3. If not pushed: `git push -u origin <branch>`.
4. Create the PR (see invocation below).
5. Return the PR URL.
5. Suggest reviewers and assign the user's pick (see **Reviewer assignment**).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It did not do this for me

Comment thread .claude/commands/pr.md

## Reviewer assignment

After the PR is created, help the user choose a reviewer from the CODEOWNERS roster, ranked by **fewest reviews in the last 60 days** (lightest load first). Don't auto-assign — the counts can't see who's on PTO or heads-down, so the human makes the call. **Run this verbatim** to gather the ranked list:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This did not happen for some reason... I'm using 252K tokens out of my 1M context, and I've heard that Claude performance degrades after like 150K tokens, perhaps this is the reason

`git log -p`/`git blame`/`git log -S'<symbol>'` on the relevant path, or bisect against dated
`CHANGELOG.md` entries / release tags. Capture the short SHA + subject, the author/date
(`git show -s --format='%an <%ae>, %ad' <sha>`), and the merging PR
(`gh pr list --search <sha> --state merged --json number,title,url`). **Verify the suspect code is

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should this be listed in some tool list?

@matyasf matyasf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

worked good for a sample issue. The commands seem a bit too verbose for me, bu should refine them in the future as needed.

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