diff --git a/.github/ISSUE_TEMPLATE/sdk_triage_bot.md b/.github/ISSUE_TEMPLATE/sdk_triage_bot.md new file mode 100644 index 00000000..1175c7c1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/sdk_triage_bot.md @@ -0,0 +1,5 @@ +--- +name: "package:sdk_triage_bot" +about: "Create a bug or file a feature request against package:sdk_triage_bot." +labels: "package:sdk_triage_bot" +--- diff --git a/.github/labeler.yml b/.github/labeler.yml index 7b765b59..4043bf44 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -23,3 +23,7 @@ 'package:repo_manage': - changed-files: - any-glob-to-any-file: 'pkgs/repo_manage/**/*' + +'package:sdk_triage_bot': + - changed-files: + - any-glob-to-any-file: 'pkgs/sdk_triage_bot/**/*' diff --git a/README.md b/README.md index 038878ef..1adf3184 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This repository is home to general Dart Ecosystem tools and packages. | [dart_flutter_team_lints](pkgs/dart_flutter_team_lints/) | An analysis rule set used by the Dart and Flutter teams. | [![pub package](https://img.shields.io/pub/v/dart_flutter_team_lints.svg)](https://pub.dev/packages/dart_flutter_team_lints) | | [firehose](pkgs/firehose/) | A tool to automate publishing of Pub packages from GitHub actions. | [![pub package](https://img.shields.io/pub/v/firehose.svg)](https://pub.dev/packages/firehose) | | [repo_manage](pkgs/repo_manage/) | Miscellaneous issue, repo, and PR query tools. | | +| [sdk_triage_bot](pkgs/sdk_triage_bot/) | A triage automation tool for dart-lang/sdk issues. | | ## Publishing automation diff --git a/pkgs/sdk_triage_bot/README.md b/pkgs/sdk_triage_bot/README.md index e91ddafe..ba2e2842 100644 --- a/pkgs/sdk_triage_bot/README.md +++ b/pkgs/sdk_triage_bot/README.md @@ -9,12 +9,29 @@ human would. This includes: ## Bot trigger and entry-point -TODO: doc +This bot is generally triggered by a GitHub workflow listening for new issues +on the dart-lang/sdk repo. + +See https://github.com/dart-lang/sdk/blob/main/.github/workflows/issue-triage.yml. ## Overview -TODO: doc +The general workflow of the tool is: + +- download the issue information (existing labels, title, first comment) +- ask Gemini to summarize the issue (see [prompts](lib/src/prompts.dart)) +- ask Gemini to classify the issue (see [prompts](lib/src/prompts.dart)) +- create a comment on the issue ( `@dart-github-bot`) with the summary; + apply any labels produced as part of the classification ## Tuning -TODO: doc +We create a tuned Gemini model in order to improve the performance of +classification. This involves: + +- downloading recent, already triaged issues (~800 issues) +- writing them in a format suitable for tuning (either .csv or .jsonl) +- tuning via the Gemini APIs; this gives us a new model name to use when + calling Gemini (e.g., `model: 'tunedModels/sdk-triage-tuned-prompt-1l96e2n'`) + +See [tool/create_tuning_data.dart](tool/create_tuning_data.dart).