GeezerVison is showing github.com — ci: update triage workflow (#13944) · mathstuf/opencode@ed4e484
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .opencode/agent/triage.md +62-8Lines changed: 62 additions & 8 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | --- | 2 | 2 | mode: primary | 3 | 3 | hidden: true | 4 | | -model: opencode/claude-haiku-4-5 | | 4 | +model: opencode/minimax-m2.5 | 5 | 5 | color: "#44BA81" | 6 | 6 | tools: | 7 | 7 | "*": false | @@ -12,6 +12,8 @@ You are a triage agent responsible for triaging github issues. | 12 | 12 |
| 13 | 13 | Use your github-triage tool to triage issues. | 14 | 14 |
| | 15 | +This file is the source of truth for ownership/routing rules. | | 16 | + | 15 | 17 | ## Labels | 16 | 18 |
| 17 | 19 | ### windows | @@ -43,12 +45,30 @@ Desktop app issues: | 43 | 45 |
| 44 | 46 | **Only** add if the issue explicitly mentions nix. | 45 | 47 |
| | 48 | +If the issue does not mention nix, do not add nix. | | 49 | + | | 50 | +If the issue mentions nix, assign to `rekram1-node`. | | 51 | + | 46 | 52 | #### zen | 47 | 53 |
| 48 | 54 | **Only** add if the issue mentions "zen" or "opencode zen" or "opencode black". | 49 | 55 |
| 50 | 56 | If the issue doesn't have "zen" or "opencode black" in it then don't add zen label | 51 | 57 |
| | 58 | +#### core | | 59 | + | | 60 | +Use for core server issues in `packages/opencode/`, excluding `packages/opencode/src/cli/cmd/tui/`. | | 61 | + | | 62 | +Examples: | | 63 | + | | 64 | +- LSP server behavior | | 65 | +- Harness behavior (agent + tools) | | 66 | +- Feature requests for server behavior | | 67 | +- Agent context construction | | 68 | +- API endpoints | | 69 | +- Provider integration issues | | 70 | +- New, broken, or poor-quality models | | 71 | + | 52 | 72 | #### docs | 53 | 73 |
| 54 | 74 | Add if the issue requests better documentation or docs updates. | @@ -66,13 +86,47 @@ TUI issues potentially caused by our underlying TUI library: | 66 | 86 |
| 67 | 87 | When assigning to people here are the following rules: | 68 | 88 |
| 69 | | -adamdotdev: | 70 | | -ONLY assign adam if the issue will have the "desktop" label. | | 89 | +Desktop / Web: | | 90 | +Use for desktop-labeled issues only. | | 91 | + | | 92 | +- adamdotdevin | | 93 | +- iamdavidhill | | 94 | +- Brendonovich | | 95 | +- nexxeln | | 96 | + | | 97 | +Zen: | | 98 | +ONLY assign if the issue will have the "zen" label. | | 99 | + | | 100 | +- fwang | | 101 | +- MrMushrooooom | | 102 | + | | 103 | +TUI (`packages/opencode/src/cli/cmd/tui/...`): | | 104 | + | | 105 | +- thdxr for TUI UX/UI product decisions and interaction flow | | 106 | +- kommander for OpenTUI engine issues: rendering artifacts, keybind handling, terminal compatibility, SSH behavior, and low-level perf bottlenecks | | 107 | +- rekram1-node for TUI bugs that are not clearly OpenTUI engine issues | | 108 | + | | 109 | +Core (`packages/opencode/...`, excluding TUI subtree): | | 110 | + | | 111 | +- thdxr for sqlite/snapshot/memory bugs and larger architectural core features | | 112 | +- jlongster for opencode server + API feature work (tool currently remaps jlongster -> thdxr until assignable) | | 113 | +- rekram1-node for harness issues, provider issues, and other bug-squashing | | 114 | + | | 115 | +For core bugs that do not clearly map, either thdxr or rekram1-node is acceptable. | | 116 | + | | 117 | +Docs: | | 118 | + | | 119 | +- R44VC0RP | | 120 | + | | 121 | +Windows: | | 122 | + | | 123 | +- Hona (assign any issue that mentions Windows or is likely Windows-specific) | 71 | 124 |
| 72 | | -fwang: | 73 | | -ONLY assign fwang if the issue will have the "zen" label. | | 125 | +Determinism rules: | 74 | 126 |
| 75 | | -jayair: | 76 | | -ONLY assign jayair if the issue will have the "docs" label. | | 127 | +- If title + body does not contain "zen", do not add the "zen" label | | 128 | +- If "nix" label is added but title + body does not mention nix/nixos, the tool will drop "nix" | | 129 | +- If title + body mentions nix/nixos, assign to `rekram1-node` | | 130 | +- If "desktop" label is added, the tool will override assignee and randomly pick one Desktop / Web owner | 77 | 131 |
| 78 | | -In all other cases use best judgment. Avoid assigning to kommander needlessly, when in doubt assign to rekram1-node. | | 132 | +In all other cases, choose the team/section with the most overlap with the issue and assign a member from that team at random. |
Collapse file Copy file name to clipboardExpand all lines: .opencode/tool/github-triage.ts +59-26Lines changed: 59 additions & 26 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /// <reference path="../env.d.ts" /> | 2 | | -// import { Octokit } from "@octokit/rest" | 3 | 2 | import { tool } from "@opencode-ai/plugin" | 4 | 3 | import DESCRIPTION from "./github-triage.txt" | 5 | 4 |
| | 5 | +const TEAM = { | | 6 | + desktop: ["adamdotdevin", "iamdavidhill", "Brendonovich", "nexxeln"], | | 7 | + zen: ["fwang", "MrMushrooooom"], | | 8 | + tui: ["thdxr", "kommander", "rekram1-node"], | | 9 | + core: ["thdxr", "rekram1-node", "jlongster"], | | 10 | + docs: ["R44VC0RP"], | | 11 | + windows: ["Hona"], | | 12 | +} as const | | 13 | + | | 14 | +const ASSIGNEES = [...new Set(Object.values(TEAM).flat())] | | 15 | + | | 16 | +function pick<T>(items: readonly T[]) { | | 17 | + return items[Math.floor(Math.random() * items.length)]! | | 18 | +} | | 19 | + | 6 | 20 | function getIssueNumber(): number { | 7 | 21 | const issue = parseInt(process.env.ISSUE_NUMBER ?? "", 10) | 8 | 22 | if (!issue) throw new Error("ISSUE_NUMBER env var not set") | @@ -29,60 +43,79 @@ export default tool({ | 29 | 43 | description: DESCRIPTION, | 30 | 44 | args: { | 31 | 45 | assignee: tool.schema | 32 | | - .enum(["thdxr", "adamdotdevin", "rekram1-node", "fwang", "jayair", "kommander"]) | | 46 | + .enum(ASSIGNEES as [string, ...string[]]) | 33 | 47 | .describe("The username of the assignee") | 34 | 48 | .default("rekram1-node"), | 35 | 49 | labels: tool.schema | 36 | | - .array(tool.schema.enum(["nix", "opentui", "perf", "desktop", "zen", "docs", "windows"])) | | 50 | + .array(tool.schema.enum(["nix", "opentui", "perf", "web", "desktop", "zen", "docs", "windows", "core"])) | 37 | 51 | .describe("The labels(s) to add to the issue") | 38 | 52 | .default([]), | 39 | 53 | }, | 40 | 54 | async execute(args) { | 41 | 55 | const issue = getIssueNumber() | 42 | | - // const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }) | 43 | 56 | const owner = "anomalyco" | 44 | 57 | const repo = "opencode" | 45 | 58 |
| 46 | 59 | const results: string[] = [] | | 60 | + let labels = [...new Set(args.labels.map((x) => (x === "desktop" ? "web" : x)))] | | 61 | + const web = labels.includes("web") | | 62 | + const text = `${process.env.ISSUE_TITLE ?? ""}\n${process.env.ISSUE_BODY ?? ""}`.toLowerCase() | | 63 | + const zen = /\bzen\b/.test(text) || text.includes("opencode black") | | 64 | + const nix = /\bnix(os)?\b/.test(text) | | 65 | + | | 66 | + if (labels.includes("nix") && !nix) { | | 67 | + labels = labels.filter((x) => x !== "nix") | | 68 | + results.push("Dropped label: nix (issue does not mention nix)") | | 69 | + } | | 70 | + | | 71 | + const assignee = nix | | 72 | + ? "rekram1-node" | | 73 | + : web | | 74 | + ? pick(TEAM.desktop) | | 75 | + : args.assignee === "jlongster" | | 76 | + ? "thdxr" | | 77 | + : args.assignee | | 78 | + | | 79 | + if (args.assignee === "jlongster" && assignee === "thdxr") { | | 80 | + results.push("Remapped assignee: jlongster -> thdxr (jlongster not assignable yet)") | | 81 | + } | | 82 | + | | 83 | + if (labels.includes("zen") && !zen) { | | 84 | + throw new Error("Only add the zen label when issue title/body contains 'zen'") | | 85 | + } | | 86 | + | | 87 | + if (web && !nix && !(TEAM.desktop as readonly string[]).includes(assignee)) { | | 88 | + throw new Error("Web issues must be assigned to adamdotdevin, iamdavidhill, Brendonovich, or nexxeln") | | 89 | + } | | 90 | + | | 91 | + if ((TEAM.zen as readonly string[]).includes(assignee) && !labels.includes("zen")) { | | 92 | + throw new Error("Only zen issues should be assigned to fwang or MrMushrooooom") | | 93 | + } | 47 | 94 |
| 48 | | - if (args.assignee === "adamdotdevin" && !args.labels.includes("desktop")) { | 49 | | - throw new Error("Only desktop issues should be assigned to adamdotdevin") | | 95 | + if (assignee === "Hona" && !labels.includes("windows")) { | | 96 | + throw new Error("Only windows issues should be assigned to Hona") | 50 | 97 | } | 51 | 98 |
| 52 | | - if (args.assignee === "fwang" && !args.labels.includes("zen")) { | 53 | | - throw new Error("Only zen issues should be assigned to fwang") | | 99 | + if (assignee === "R44VC0RP" && !labels.includes("docs")) { | | 100 | + throw new Error("Only docs issues should be assigned to R44VC0RP") | 54 | 101 | } | 55 | 102 |
| 56 | | - if (args.assignee === "kommander" && !args.labels.includes("opentui")) { | | 103 | + if (assignee === "kommander" && !labels.includes("opentui")) { | 57 | 104 | throw new Error("Only opentui issues should be assigned to kommander") | 58 | 105 | } | 59 | 106 |
| 60 | | - // await octokit.rest.issues.addAssignees({ | 61 | | - // owner, | 62 | | - // repo, | 63 | | - // issue_number: issue, | 64 | | - // assignees: [args.assignee], | 65 | | - // }) | 66 | 107 | await githubFetch(`/repos/${owner}/${repo}/issues/${issue}/assignees`, { | 67 | 108 | method: "POST", | 68 | | - body: JSON.stringify({ assignees: [args.assignee] }), | | 109 | + body: JSON.stringify({ assignees: [assignee] }), | 69 | 110 | }) | 70 | | - results.push(`Assigned @${args.assignee} to issue #${issue}`) | 71 | | - | 72 | | - const labels: string[] = args.labels.map((label) => (label === "desktop" ? "web" : label)) | | 111 | + results.push(`Assigned @${assignee} to issue #${issue}`) | 73 | 112 |
| 74 | 113 | if (labels.length > 0) { | 75 | | - // await octokit.rest.issues.addLabels({ | 76 | | - // owner, | 77 | | - // repo, | 78 | | - // issue_number: issue, | 79 | | - // labels, | 80 | | - // }) | 81 | 114 | await githubFetch(`/repos/${owner}/${repo}/issues/${issue}/labels`, { | 82 | 115 | method: "POST", | 83 | 116 | body: JSON.stringify({ labels }), | 84 | 117 | }) | 85 | | - results.push(`Added labels: ${args.labels.join(", ")}`) | | 118 | + results.push(`Added labels: ${labels.join(", ")}`) | 86 | 119 | } | 87 | 120 |
| 88 | 121 | return results.join("\n") | |
Collapse file Copy file name to clipboard +3-85Lines changed: 3 additions & 85 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | Use this tool to assign and/or label a GitHub issue. | 2 | 2 |
| 3 | | -You can assign the following users: | 4 | | -- thdxr | 5 | | -- adamdotdevin | 6 | | -- fwang | 7 | | -- jayair | 8 | | -- kommander | 9 | | -- rekram1-node | | 3 | +Choose labels and assignee using the current triage policy and ownership rules. | | 4 | +Pick the most fitting labels for the issue and assign one owner. | 10 | 5 |
| 11 | | - | 12 | | -You can use the following labels: | 13 | | -- nix | 14 | | -- opentui | 15 | | -- perf | 16 | | -- web | 17 | | -- zen | 18 | | -- docs | 19 | | - | 20 | | -Always try to assign an issue, if in doubt, assign rekram1-node to it. | 21 | | - | 22 | | -## Breakdown of responsibilities: | 23 | | - | 24 | | -### thdxr | 25 | | - | 26 | | -Dax is responsible for managing core parts of the application, for large feature requests, api changes, or things that require significant changes to the codebase assign him. | 27 | | - | 28 | | -This relates to OpenCode server primarily but has overlap with just about anything | 29 | | - | 30 | | -### adamdotdevin | 31 | | - | 32 | | -Adam is responsible for managing the Desktop/Web app. If there is an issue relating to the desktop app or `opencode web` command. Assign him. | 33 | | - | 34 | | - | 35 | | -### fwang | 36 | | - | 37 | | -Frank is responsible for managing Zen, if you see complaints about OpenCode Zen, maybe it's the dashboard, the model quality, billing issues, etc. Assign him to the issue. | 38 | | - | 39 | | -### jayair | 40 | | - | 41 | | -Jay is responsible for documentation. If there is an issue relating to documentation assign him. | 42 | | - | 43 | | -### kommander | 44 | | - | 45 | | -Sebastian is responsible for managing an OpenTUI (a library for building terminal user interfaces). OpenCode's TUI is built with OpenTUI. If there are issues about: | 46 | | -- random characters on screen | 47 | | -- keybinds not working on different terminals | 48 | | -- general terminal stuff | 49 | | -Then assign the issue to Him. | 50 | | - | 51 | | -### rekram1-node | 52 | | - | 53 | | -ALL BUGS SHOULD BE assigned to rekram1-node unless they have the `opentui` label. | 54 | | - | 55 | | -Assign Aiden to an issue as a catch all, if you can't assign anyone else. Most of the time this will be bugs/polish things. | 56 | | -If no one else makes sense to assign, assign rekram1-node to it. | 57 | | - | 58 | | -Always assign to aiden if the issue mentions "acp", "zed", or model performance issues | 59 | | - | 60 | | -## Breakdown of Labels: | 61 | | - | 62 | | -### nix | 63 | | - | 64 | | -Any issue that mentions nix, or nixos should have a nix label | 65 | | - | 66 | | -### opentui | 67 | | - | 68 | | -Anything relating to the TUI itself should have an opentui label | 69 | | - | 70 | | -### perf | 71 | | - | 72 | | -Anything related to slow performance, high ram, high cpu usage, or any other performance related issue should have a perf label | 73 | | - | 74 | | -### desktop | 75 | | - | 76 | | -Anything related to `opencode web` command or the desktop app should have a desktop label. Never add this label for anything terminal/tui related | 77 | | - | 78 | | -### zen | 79 | | - | 80 | | -Anything related to OpenCode Zen, billing, or model quality from Zen should have a zen label | 81 | | - | 82 | | -### docs | 83 | | - | 84 | | -Anything related to the documentation should have a docs label | 85 | | - | 86 | | -### windows | 87 | | - | 88 | | -Use for any issue that involves the windows OS | | 6 | +If unsure, choose the team/section with the most overlap with the issue and assign a member from that team at random. |
Collapse file Copy file name to clipboardExpand all lines: packages/script/src/index.ts +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,8 +54,13 @@ const team = [ | 54 | 54 | "kommander", | 55 | 55 | "jayair", | 56 | 56 | "fwang", | | 57 | + "MrMushrooooom", | 57 | 58 | "adamdotdevin", | 58 | 59 | "iamdavidhill", | | 60 | + "Brendonovich", | | 61 | + "nexxeln", | | 62 | + "Hona", | | 63 | + "jlongster", | 59 | 64 | "opencode-agent[bot]", | 60 | 65 | "R44VC0RP", | 61 | 66 | ] | |
|