Skip to content

Commit 2a845e7

Browse files
committed
Add a skill for closing obsolete issues
1 parent dc1d7ad commit 2a845e7

4 files changed

Lines changed: 112 additions & 10 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: closing-obsolete-issues
3+
description: Find and close obsolete or stale 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, or are obsolete.
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+
26+
3. **Draft and Review Closing Comments (CRITICAL MANDATE)**:
27+
- For issues identified as candidates for closing, draft a detailed comment for each explaining *why* it can be closed.
28+
- **Style Constraint**: DO NOT use em dashes (—) in the comments. Use hyphens (-) or colons (:) instead.
29+
- **Template**: Consult `references/rationale_templates.md` for wording inspiration.
30+
- 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!"
31+
- **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.
32+
33+
4. **Iterate on Skill Knowledge (Learning Loop)**:
34+
- 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.
35+
36+
5. **Execute and Summarize**:
37+
- Once approved, use `gh issue close` with the `-c` flag to post the comment and close the issue.
38+
- Provide the user with a clean bulleted list of links to each closing comment.
39+
40+
## Tips
41+
42+
- Use `grep_search` or `find_by_name` to check the current codebase for references to the issue or relevant code.
43+
- Look for related PRs that might have fixed the issue but didn't close it automatically.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
---
28+
**Reminder**: Every closing comment MUST end with:
29+
"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: {{.author.login}}
18+
Created: {{.createdAt}}
19+
Labels: {{range .labels}}{{.name}}, {{end}}
20+
21+
Description:
22+
{{.body}}
23+
24+
--- ALL COMMENTS ---
25+
{{range .comments}}
26+
{{.author.login}} ({{.createdAt}}):
27+
{{.body}}
28+
------------------------------------------------------------
29+
{{end}}
30+
'

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)