feat: add suggestion_box_pre_triage MCP tool - #156
Merged
Conversation
igmagollo
added a commit
that referenced
this pull request
Mar 11, 2026
- Hoist execFileSync import to top of mcp.ts (was re-imported on every
loop iteration inside suggestion_box_pre_triage)
- Filter suggestion-box-created issues from GitHub dedup candidates in
pre-triage using isSuggestionBoxIssueTitle, matching the behaviour in
github.ts so own published issues are never flagged as pre-existing
- Allow pending_review items to be dismissed or published; dismiss() in
store.ts and the CLI now accept status IN ('open', 'pending_review'),
and suggestion_box_publish_to_github accepts both statuses so items
marked by pre-triage are not stranded in a dead-end state
igmagollo
commented
Mar 11, 2026
| import { getCategories } from "./categories.js"; | ||
| import { checkGhAuth, createGithubIssue } from "./github.js"; | ||
| import { execFileSync } from "child_process"; | ||
| import { checkGhAuth, createGithubIssue, extractKeywords, keywordSimilarity, isSuggestionBoxIssueTitle } from "./github.js"; |
Owner
Author
There was a problem hiding this comment.
isSuggestionBoxIssueTitle isn't exported from github.ts (it doesn't even exist there as a named function — the bracket-prefix check is inlined inside searchExistingIssues). This import will fail at compile time and at runtime.
Either export it from github.ts or inline the check here.
…g feedback Groups open feedback into similarity clusters using trigram Jaccard distance, checks GitHub for existing issues per cluster, computes combined votes and impact estimates, and moves items to a new `pending_review` status queue. - Add `pending_review` to `FeedbackStatus` type - Add `markPendingReview` and `preTriage` methods to `FeedbackStore` - Add `preTriageSchema` to schemas and expose `TriageGroup`, `PreTriageInput`, `PreTriageResult` types from the SDK - Update `listFeedback` schema to accept `pending_review` as a status filter - Add `tests/pre-triage.test.ts` with full coverage Closes #99
- Hoist execFileSync import to top of mcp.ts (was re-imported on every
loop iteration inside suggestion_box_pre_triage)
- Filter suggestion-box-created issues from GitHub dedup candidates in
pre-triage using isSuggestionBoxIssueTitle, matching the behaviour in
github.ts so own published issues are never flagged as pre-existing
- Allow pending_review items to be dismissed or published; dismiss() in
store.ts and the CLI now accept status IN ('open', 'pending_review'),
and suggestion_box_publish_to_github accepts both statuses so items
marked by pre-triage are not stranded in a dead-end state
igmagollo
force-pushed
the
worktree-agent-a75f5757
branch
from
March 11, 2026 16:05
ba4421a to
a3f4fb0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
suggestion_box_pre_triagetool. Closes #99.Before a review session you'd normally stare at a flat list of open items and manually figure out which ones are about the same thing. This does that work for you.
It clusters open feedback by trigram similarity, checks GitHub for existing issues per cluster (so you know before publishing), rolls up combined votes and impact estimates across each cluster, and moves everything into a
pending_reviewstatus so it's off theopenqueue and ready for the TUI review flow.What changed:
FeedbackStatusnow includespending_review(sits betweenopenandpublished/dismissed)FeedbackStoregetsmarkPendingReview()andpreTriage()— the latter does the clustering and GitHub checkslistFeedbackschema updated to acceptpending_reviewas a status filterTriageGroup,PreTriageInput,PreTriageResultexported from the SDKtests/pre-triage.test.tscovers the new methods end to endThe clustering threshold is 0.25 Jaccard — loose enough to catch paraphrases, tight enough to not mash unrelated things together. GitHub dedup reuses the existing
extractKeywords+keywordSimilaritylogic fromgithub.ts.