Skip to content

Commit 3e0c484

Browse files
Add a skill for closing obsolete issues (#9812)
1 parent 9265adf commit 3e0c484

6 files changed

Lines changed: 159 additions & 14 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: closing-obsolete-issues
3+
description: Find and close obsolete, stale, or not reproducible issues in the flutter/devtools repository.
4+
---
5+
6+
# Closing Obsolete Issues
7+
8+
Use this skill to find old, outdated issues in the `flutter/devtools` repository that can be closed because they have been fixed, are stale, obsolete, or not reproducible.
9+
10+
## Instructions
11+
12+
1. **Identify Target Issues**:
13+
- Use the GitHub CLI (`gh`) to search for the oldest open issues.
14+
- Use any label that the user gives you, or none if the user does not specify any issue labels.
15+
- Sort by creation date (`created-asc`) or last update (`updated-asc`) to find the most likely candidates for being outdated.
16+
- Fetch at least 20-30 candidates.
17+
- Example command (with label): `gh issue list --repo flutter/devtools --search "label:bug is:open sort:created-asc" --limit 30 | cat`
18+
- Example command (without label): `gh issue list --repo flutter/devtools --search "is:open sort:created-asc" --limit 30 | cat`
19+
20+
2. **Investigate Status**:
21+
- For each candidate, analyze its description and comments.
22+
- **Pro Tip**: Use the bundled script `scripts/fetch_issue_details.sh <number>` to get a comprehensive view of the issue and its comments.
23+
- Compare the issue's request or reported bug with the current state of the codebase.
24+
- Refer to `references/rationale_templates.md` for a library of common reasons issues become outdated in DevTools.
25+
- **Safety Rule**: Do not assume a bug is fixed or obsolete just because the screen has been updated or the file modified. Verify if the specific bug behavior is still possible. Valid bugs or feature requests should not be closed as stale just because they are old or have no activity. Inactivity alone does not invalidate a feature request or bug report.
26+
27+
3. **Draft and Review Closing Comments (CRITICAL MANDATE)**:
28+
- For issues identified as candidates for closing, draft a detailed comment for each explaining *why* it can be closed.
29+
- **Style Constraint**: DO NOT use em dashes (—) in the comments. Use hyphens (-) or colons (:) instead.
30+
- **Template**: Consult `references/rationale_templates.md` for wording inspiration.
31+
- Each comment MUST end with: "If there is more work to do here, please let us know by filing a new issue with up to date information. Thanks!"
32+
- **User Approval Required**: You MUST present the identified issues (including URLs to the issues for easy navigation) and their drafted comments to the user and obtain explicit approval BEFORE running any command that closes an issue.
33+
34+
4. **Iterate on Skill Knowledge (Learning Loop)**:
35+
- If you discover a new, distinct category of closing rationale that is not covered in `references/rationale_templates.md`, **update the reference file** to include it.
36+
37+
5. **Execute and Summarize**:
38+
- Once approved, use `gh issue close` with the `-c` flag to post the comment and close the issue.
39+
- Provide the user with a clean bulleted list of links to each closing comment.
40+
41+
## Tips
42+
43+
- Use available file and content search tools (such as `grep`, `ripgrep`, or environment-specific
44+
search tools) to check the current codebase for references to the issue or relevant code.
45+
- Look for related PRs that might have fixed the issue but didn't close it automatically.
46+
- **Pro Tip**: Use the bundled script `scripts/search_prs.sh <query>` to search for PRs in the repository.
47+
- For issues reporting specific versions, check the current DevTools version in `packages/devtools_app/pubspec.yaml`
48+
to determine if the reported version is very old. If the reported version is 1 or more major versions behind or 12 or more
49+
minor versions behind the current version, this issue is a good candidate for being obsolete.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Common Closing Rationales for DevTools
2+
3+
When investigating old issues in the Flutter DevTools repository, look for these common reasons they may be eligible for closing. Use these as templates for your closing comments.
4+
5+
## 1. Superseded by New DevTools Features
6+
DevTools has evolved significantly. Many old requests for features are now solved by newer implementations or entire new screens.
7+
- **Example**: Requests for specific memory allocation tracking features that are covered by the new Tracing or Diff panes.
8+
- **Rationale**: Point to the new feature or screen that fulfills the need (e.g., "This is now supported in the Memory screen's Tracing pane.").
9+
10+
## 2. Observatory Deprecation
11+
With the deprecation and removal of the Observatory UI in favor of DevTools, issues specifically requesting feature parity or fixing bugs in Observatory integration may be obsolete.
12+
- **Rationale**: Note that Observatory is deprecated/removed and DevTools is the supported solution.
13+
14+
## 3. Tooling Daemon (DTD) and IDE Integration
15+
Issues about IDE integration or multi-package support might be resolved by the introduction of the Dart Tooling Daemon (DTD).
16+
- **Rationale**: Explain that DTD now handles this integration or that workspace support has improved.
17+
18+
## 4. UI Refactoring and Legacy Screens
19+
Requests related to old UI patterns or legacy screens that have been completely rewritten or removed are obsolete.
20+
- **Example**: The "Analysis" pane in the Memory screen no longer exists.
21+
- **Rationale**: Note that the feature or screen has been refactored or removed.
22+
23+
## 5. Resolved by Flutter SDK Updates
24+
Some issues are caused by or fixed by changes in the Flutter SDK rather than DevTools itself.
25+
- **Rationale**: If a bug was fixed in a specific Flutter version, mention it.
26+
27+
## 6. Stale Feature Requests
28+
Proposals or feature requests from several years ago with no recent activity or community interest may be closed if they no longer align with current priorities or have been superseded by general improvements.
29+
- **Rationale**: Note that the issue is a stale feature request with no recent activity and that DevTools has evolved significantly since then.
30+
31+
## 7. Very Old DevTools Version
32+
Issues reported on very old versions of DevTools (check current version in `packages/devtools_app/pubspec.yaml` for comparison) may be closed if they are likely fixed or no longer relevant.
33+
- **Rationale**: "This issue looks like it occurred on an old version of DevTools. Are you still experiencing this issue with DevTools on the latest Flutter stable? If so, please reopen and we will take a look. Thanks."
34+
35+
## 8. Insufficient Information
36+
Issues that lack clear descriptions, reproduction steps, or logs make it impossible to investigate.
37+
- **Rationale**: "Without additional information, we cannot debug this issue. Please re-open if you can provide a description of your issue and repro steps. Thanks."
38+
39+
---
40+
**Reminder**: Every closing comment MUST end with:
41+
"If there is more work to do here, please let us know by filing a new issue with up to date information. Thanks!"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# A script to fetch and format comprehensive issue details for investigation.
4+
# Usage: ./fetch_issue_details.sh <issue_number>
5+
6+
ISSUE_NUMBER=$1
7+
8+
if [ -z "$ISSUE_NUMBER" ]; then
9+
echo "Usage: $0 <issue_number>"
10+
exit 1
11+
fi
12+
13+
echo "--- INVESTIGATION FOR ISSUE #$ISSUE_NUMBER ---"
14+
# Fetching all comments to ensure full context is captured.
15+
gh issue view "$ISSUE_NUMBER" --repo flutter/devtools --json number,title,author,createdAt,labels,body,comments -t '
16+
Title: {{.title}}
17+
Author: {{if .author}}{{.author.login}}{{else}}ghost{{end}}
18+
Created: {{.createdAt}}
19+
Labels: {{range .labels}}{{.name}}, {{end}}
20+
21+
Description:
22+
{{.body}}
23+
24+
--- ALL COMMENTS ---
25+
{{range .comments}}
26+
{{if .author}}{{.author.login}}{{else}}ghost{{end}} ({{.createdAt}}):
27+
{{.body}}
28+
------------------------------------------------------------
29+
{{end}}
30+
'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# A script to search for PRs in flutter/devtools.
4+
# Usage: ./search_prs.sh <query>
5+
6+
QUERY=$1
7+
8+
if [ -z "$QUERY" ]; then
9+
echo "Usage: $0 <query>"
10+
exit 1
11+
fi
12+
13+
echo "--- SEARCHING PRs FOR: $QUERY ---"
14+
gh search prs "$QUERY" --repo flutter/devtools --limit 20 --json number,title,state,url,createdAt -t '
15+
{{range .}}
16+
#{{.number}} {{.title}} ({{.state}})
17+
Url: {{.url}}
18+
Created: {{.createdAt}}
19+
------------------------------------------------------------
20+
{{end}}
21+
'

TRIAGE.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ If the issue is actively being worked on or if it needs immediate / almost-immed
5050
to a product area owner.
5151

5252
Here are some suggested owners by product area:
53-
* **Flutter Inspector**: @elliette
53+
* **Flutter Inspector**: @kenzieschmoll or @srawlins
5454
* **Performance**: @kenzieschmoll
5555
* **CPU Profiler**: @kenzieschmoll or @bkonyi
5656
* **Memory**: @kenzieschmoll or @bkonyi
57-
* **Network**: @elliette or @bkonyi
58-
* **Logging**: @elliette or @bkonyi
57+
* **Network**: @srawlins or @bkonyi
58+
* **Logging**: @kenzieschmoll or @bkonyi
5959
* **VM Tools**: @bkonyi
60-
* **Debugger**: @elliette
60+
* **Debugger**: @srawlins
6161
* **DevTools extensions**: @kenzieschmoll
6262
* **Tooling integrations with VS Code**: @DanTup
6363
* **Tooling integrations with IntelliJ or Android Studio**: @helin24 or @jwren
@@ -73,6 +73,10 @@ about issues marked “severe: …” or “P0”.**
7373
This step is to ensure the health of the [DevTools issue backlog](https://github.com/flutter/devtools/issues) over time.
7474
There are a couple of things to do as part of the backlog clean up work:
7575
- Close any obsolete issues. Recommendation: start with the oldest issues first since these are the most likely to be stale.
76+
- **Tip**: You can use an AI assistant (agent) to help with this. Try a prompt like:
77+
```
78+
Identify and close obsolete issues in the backlog.
79+
```
7680
- Add good candidates for product excellence / quality work to the
7781
[DevTools Product Excellence project](https://github.com/orgs/flutter/projects/157). This project feeds monthly milestone
7882
planning for ongoing P.E. work.

pubspec.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ packages:
6161
dependency: transitive
6262
description:
6363
name: build
64-
sha256: aadd943f4f8cc946882c954c187e6115a84c98c81ad1d9c6cbf0895a8c85da9c
64+
sha256: a156715e7cd728130c592f30552575908aae5b100005fbc1f0fb16b3c03a3d10
6565
url: "https://pub.dev"
6666
source: hosted
67-
version: "4.0.5"
67+
version: "4.0.6"
6868
build_config:
6969
dependency: transitive
7070
description:
@@ -85,10 +85,10 @@ packages:
8585
dependency: "direct dev"
8686
description:
8787
name: build_runner
88-
sha256: "521daf8d189deb79ba474e43a696b41c49fb3987818dbacf3308f1e03673a75e"
88+
sha256: "22fdcc3cfeb9d974d7408718c4be15ec5e9b1b350088f3a6c88f154e74dd700d"
8989
url: "https://pub.dev"
9090
source: hosted
91-
version: "2.13.1"
91+
version: "2.14.1"
9292
built_collection:
9393
dependency: transitive
9494
description:
@@ -286,10 +286,10 @@ packages:
286286
dependency: transitive
287287
description:
288288
name: file_selector_android
289-
sha256: bf7ab65776d7e176280c853679e7742668586ba1663f7f1561e897fadad6c3ba
289+
sha256: "89243030ea4b3463fb402b44d5eeacc4ccb1c46a88870cb2a5080d693200c1ed"
290290
url: "https://pub.dev"
291291
source: hosted
292-
version: "0.5.2+5"
292+
version: "0.5.2+6"
293293
file_selector_ios:
294294
dependency: transitive
295295
description:
@@ -767,10 +767,10 @@ packages:
767767
dependency: transitive
768768
description:
769769
name: source_gen
770-
sha256: "732792cfd197d2161a65bb029606a46e0a18ff30ef9e141a7a82172b05ea8ecd"
770+
sha256: ec37cc0e6694374cbef59ed79685572c870a54ede6fa30a3e420feb3adffea02
771771
url: "https://pub.dev"
772772
source: hosted
773-
version: "4.2.2"
773+
version: "4.2.3"
774774
source_map_stack_trace:
775775
dependency: transitive
776776
description:
@@ -975,10 +975,10 @@ packages:
975975
dependency: transitive
976976
description:
977977
name: vm_service
978-
sha256: "046d3928e16fa4dc46e8350415661755ab759d9fc97fc21b5ab295f71e4f0499"
978+
sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360"
979979
url: "https://pub.dev"
980980
source: hosted
981-
version: "15.1.0"
981+
version: "15.2.0"
982982
vm_service_protos:
983983
dependency: transitive
984984
description:

0 commit comments

Comments
 (0)