Skip to content

Commit 84642c2

Browse files
committed
refactor: update prompts for analyzing, explaining, implementing, and planning features and bugs
1 parent 1f74120 commit 84642c2

File tree

4 files changed

+43
-144
lines changed

4 files changed

+43
-144
lines changed

.github/prompts/analyze.prompt.md

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,32 @@
11
---
22
agent: Maintainer
3-
description: Root cause analysis for a bug in the codebase.
3+
description: Root cause analysis for a bug or issue.
44
tools:
55
[
6-
vscode/runCommand,
76
vscode/askQuestions,
87
read/problems,
98
read/readFile,
109
agent,
1110
search,
1211
web/fetch,
1312
github/issue_read,
14-
github/list_issue_types,
1513
github/list_issues,
16-
github/list_pull_requests,
1714
github/pull_request_read,
1815
github/search_issues,
19-
github/search_pull_requests,
2016
todo,
2117
]
2218
---
2319

24-
You are an expert in this codebase.
20+
Analyze the bug or issue. If a number is provided, treat it as a GitHub issue number.
2521

26-
Your goal is to analyze a bug or add the new feature, for this you first need to:
22+
1. Read the issue description and relevant code
23+
2. Identify the root cause (for bugs) or clarify requirements (for features)
24+
3. Determine if this is by-design behavior or an actual bug
2725

28-
- Understand the context of the bug or feature by reading the issue description and comments.
29-
- Ask for clarification from user only if the issue description is not clear.
30-
- Understand the codebase by reading the relevant instruction files and code.
31-
- If its a bug, then identify the root cause of the bug, and explain this to the user.
32-
- If just a number is provided by the user, assume it is an issue number and fetch the issue details.
26+
Output a markdown summary with:
3327

34-
Based on your above understanding generate a summary of your analysis.
35-
Ensure the plan consists of a Markdown document that has the following sections:
28+
- **Overview**: What's the issue?
29+
- **Root Cause**: Why is this happening? (bugs only)
30+
- **Recommendation**: Should this be fixed? What are the risks?
3631

37-
- Overview: A brief description of the bug/feature. If its a bug, then is this bydesign or a bug?
38-
- Root Cause: A detailed explanation of the root cause of the bug, including any relevant code snippets or references to the codebase. (only if it's a bug)
39-
- Requirements: A list of requirements to resolve the bug or add the new feature.
40-
- Additional Considerations: Mention any potential challenges or risks associated with the implementation.
41-
- Proposal: Can and should a solution be implemented? Is it a bug, or is this by design? What are the risks or challenges associated with a solution if it is a feature?
42-
43-
Do not make any code edits, just generate a plan. Use thinking and reasoning skills to outline the steps needed to achieve the desired outcome.
44-
45-
<reminder>
46-
MUST:
47-
- Read instruction file(s) before analyzing code
48-
- Understand codebase, issue and architecture thoroughly
49-
- Perform root cause analysis only if the issue is a bug
50-
- Never make any assumptions, always strive to be thorough and accurate
51-
- Avoid unnecessary repetition and verbosity
52-
- Be concise, but thorough.
53-
54-
MUST NOT:
55-
56-
- Make code changes
57-
- Mention all new or updated lines of code
58-
</reminder>
32+
Do not make code changes.

.github/prompts/explain.prompt.md

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,28 @@
11
---
22
agent: Maintainer
3-
description: Analyze the codebase and explain a feature/component in detail.
3+
description: Explain a feature or component in the codebase.
44
tools:
55
[
6-
vscode/runCommand,
76
vscode/askQuestions,
8-
read/problems,
97
read/readFile,
10-
read/terminalLastCommand,
118
agent,
12-
edit/editFiles,
139
search,
14-
web,
15-
github/search_code,
10+
web/fetch,
1611
github/search_issues,
1712
todo,
1813
]
1914
---
2015

21-
# Code Explanation Guide
16+
Explain the requested feature or component. Use diagrams where helpful.
2217

23-
You are an expert in this codebase.
24-
Your task is to analyze the user requests and explain the feature/component in detail. Where possible use diagrams to depict the architecture and or flow.
18+
1. Read relevant code and instruction files
19+
2. Identify key patterns and architectural decisions
20+
3. Trace data and control flow
2521

26-
Start by first:
22+
Output a markdown explanation with:
2723

28-
- Understand what needs explaining.
24+
- **Overview**: What does it do and why?
25+
- **Key Components**: Main pieces involved
26+
- **How It Works**: Data flow, control flow, integration points
2927

30-
* Read instruction files for the relevant area
31-
* Examine code with appropriate tools
32-
* Understand the codebase by reading the relevant instruction files and code.
33-
* Identify design patterns and architectural decisions
34-
* Use available tools to gather information
35-
* Be thorough before presenting any explanation
36-
37-
Based on your above understanding generate a markdown document that explains the feature/component in detail.
38-
Use thinking and reasoning skills when generating the explanation & ensure the document has the following sections:
39-
40-
- Overview: Brief summary of the feature/component and its purpose.
41-
- Architecture: High-level architecture diagram (if applicable).
42-
- Key Components: List and describe key components involved.
43-
- Data Flow: Explain how data moves through the system.
44-
- Control Flow: Describe the control flow and how components interact.
45-
- Integration Points: Explain how this feature/component integrates with others.
46-
- Additional Considerations: Mention any potential challenges or risks associated with understanding or modifying this feature/component.
47-
Mention any other relevant information that would help in understanding the feature/component.
48-
49-
<reminder>
50-
MUST:
51-
- Do not make any other code edits.
52-
- Read instruction file(s) before analyzing code
53-
- Understand codebase, issue and architecture thoroughly
54-
- Never make any assumptions, always strive to be thorough and accurate
55-
- Avoid unnecessary repetition and verbosity
56-
- Be concise, but thorough.
57-
</reminder>
28+
Do not make code changes.
Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,34 @@
11
---
22
agent: Maintainer
3-
description: Executed after a plan has been created to implement a bug fix or feature request.
3+
description: Implement a bug fix or feature.
44
tools:
55
[
66
vscode/runCommand,
77
vscode/askQuestions,
88
execute/testFailure,
99
execute/getTerminalOutput,
10-
execute/awaitTerminal,
11-
execute/killTerminal,
12-
execute/createAndRunTask,
1310
execute/runInTerminal,
1411
read/problems,
1512
read/readFile,
16-
read/terminalSelection,
1713
read/terminalLastCommand,
1814
agent,
19-
edit/createDirectory,
2015
edit/createFile,
2116
edit/editFiles,
2217
search,
23-
web,
24-
github/add_comment_to_pending_review,
25-
github/add_issue_comment,
26-
github/assign_copilot_to_issue,
18+
web/fetch,
2719
github/create_pull_request,
2820
github/issue_read,
29-
github/issue_write,
30-
github/list_issue_types,
31-
github/list_issues,
32-
github/list_pull_requests,
33-
github/merge_pull_request,
34-
github/pull_request_read,
35-
github/pull_request_review_write,
36-
github/request_copilot_review,
3721
github/search_issues,
38-
github/search_pull_requests,
39-
github/update_pull_request,
40-
github/update_pull_request_branch,
41-
github.vscode-pull-request-github/activePullRequest,
22+
github/request_copilot_review,
4223
todo,
4324
]
4425
---
4526

46-
You are an expert in this codebase.
47-
Your task is to now implement the solution.
27+
Implement the solution based on the plan or user request.
28+
29+
1. Make focused code changes following project patterns
30+
2. Add or update tests as needed
31+
3. Run `cargo fmt --all` and `cargo clippy --all -- -D warnings` before committing
32+
4. Create a PR when complete
4833

49-
<reminder>
50-
MUST:
51-
- Adhere to patterns and best practices of the project
52-
- Add required tests to ensure the fix works
53-
</reminder>
34+
Keep changes minimal and focused on the task.

.github/prompts/plan.prompt.md

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,33 @@
11
---
22
agent: Maintainer
3-
description: Analyze a bug/issue in the codebase and report findings without making code changes.
3+
description: Create an implementation plan for a bug fix or feature.
44
tools:
55
[
66
vscode/askQuestions,
77
read/problems,
88
read/readFile,
99
agent,
1010
search,
11-
web,
11+
web/fetch,
1212
github/issue_read,
13-
github/list_issue_types,
1413
github/list_issues,
15-
github/list_pull_requests,
1614
github/pull_request_read,
1715
github/search_issues,
18-
github/search_pull_requests,
19-
github.vscode-pull-request-github/activePullRequest,
2016
todo,
2117
]
2218
---
2319

24-
You are an expert in this codebase.
20+
Create an implementation plan. If a number is provided, treat it as a GitHub issue number.
2521

26-
Your goal is to prepare a detailed plan to fix the bug or add the new feature, for this you first need to:
22+
1. Read the issue description and relevant code
23+
2. Identify root cause (bugs) or clarify requirements (features)
24+
3. Outline implementation steps following project patterns
2725

28-
- Understand the context of the bug or feature by reading the issue description and comments.
29-
- Ask for clarification from user only if the issue description is not clear.
30-
- Understand the codebase by reading the relevant instruction files and code.
31-
- If its a bug, then identify the root cause of the bug, and explain this to the user.
32-
- If just a number is provided by the user, assume it is an issue number and fetch the issue details.
26+
Output a markdown plan with:
3327

34-
Based on your above understanding generate a plan to fix the bug or add the new feature.
35-
Ensure the plan consists of a Markdown document that has the following sections:
28+
- **Overview**: What needs to be done?
29+
- **Problem**: Root cause analysis (bugs only)
30+
- **Solution**: Approach and key changes needed
31+
- **Implementation Steps**: Ordered list of steps to complete the work
3632

37-
- Overview: A brief description of the bug/feature.
38-
- Problem: A detailed explanation of the root cause of the bug, including any relevant code snippets or references to the codebase. (only if it's a bug)
39-
- Solution: A brief summary of the solution including a list of requirements to resolve the bug or add the new feature.
40-
- Additional Considerations: Mention any potential challenges or risks associated with the implementation.
41-
- Implementation Steps: A detailed list of steps to implement the bug fix or new feature.
42-
Note: Limit information to what is necessary for developers and AI assistants to understand the implementation steps.
43-
Note: Adhere to architecture, development and testing patterns in instruction files
44-
45-
Do not make any code edits, just generate a plan. Use thinking and reasoning skills to outline the steps needed to achieve the desired outcome.
46-
47-
<reminder>
48-
MUST:
49-
- Understand codebase, issue and architecture thoroughly
50-
- Adhere to patterns and best practices of the project
51-
- Perform root cause analysis only if the issue is a bug
52-
- Never make any assumptions, always strive to be thorough and accurate
53-
- Avoid unnecessary repetition and verbosity
54-
- Be concise, but thorough.
55-
56-
MUST NOT:
57-
58-
- Make code changes
59-
- Mention all new or updated lines of code
60-
</reminder>
33+
Do not make code changes.

0 commit comments

Comments
 (0)