chore: add Slack triage tooling, PR reviewer assignment, and MCP config#2594
chore: add Slack triage tooling, PR reviewer assignment, and MCP config#2594balzss wants to merge 1 commit into
Conversation
|
Visual regression report✅ No changes.
Baselines come from the |
e891e96 to
6f3a3d0
Compare
| "command": "sh", | ||
| "args": [ | ||
| "-c", | ||
| "set -a; . /Users/balazs.saros/work/instui/master/.claude/mcp.local.env; set +a; exec npx -y @modelcontextprotocol/server-slack" |
There was a problem hiding this comment.
You forgot your local home folder here
1bf4192 to
7ac2bfd
Compare
7ac2bfd to
8b16acd
Compare
There was a problem hiding this comment.
⚠️ 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.jsonwith Atlassian (SSE) and Slack (npx-based) MCP server configuration. - Add new Claude Code commands:
/slack-triage,/slack-setup, and/implement. - Extend existing
/prand/commitcommands to support reviewer suggestion/assignment flow and to prevent committing onmaster/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.
| # 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>
8b16acd to
ed9532f
Compare
| 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**). |
There was a problem hiding this comment.
It did not do this for me
|
|
||
| ## 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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
should this be listed in some tool list?
matyasf
left a comment
There was a problem hiding this comment.
worked good for a sample issue. The commands seem a bit too verbose for me, bu should refine them in the future as needed.
Summary
/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 + scopes, stored in.claude/mcp.local.env(the single source.mcp.jsonreads)./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/CODEOWNERSranked by fewest reviews in the last 60 days (user picks; not auto-assigned), and self-assign the PR author./commit: refuse to commit onmaster/mainand offer to create a feature branch..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./pron a branch: confirm it lists CODEOWNERS candidates with their 60-day review counts and only assigns after you pick./commitwhile onmaster: confirm it refuses and offers to create a feature branch.🤖 Generated with Claude Code