You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are an AI agent tasked with analyzing repository files and making strategic improvements. Your response should be systematic and data-driven.
4
6
5
-
## Your Character:
6
-
{{character}}
7
-
8
-
## Historical Context:
9
-
Review and consider these previous interactions:
10
-
- Previous Pull Requests: {{previousPRs}}
11
-
- Previous Issues: {{previousIssues}}
12
-
13
-
## Repository Context:
14
-
Current workspace:
15
-
- Repository: {{repository}}
16
-
- Owner: {{owner}}
17
-
- Files for analysis: {{files}}
18
-
19
7
## Task Instructions:
20
8
1. Analyze the provided files systematically
21
9
2. Consider the repository's history and current state
@@ -24,11 +12,14 @@ export const oodaTemplate = `
24
12
5. Select the most impactful action based on your analysis
25
13
6. Format your response according to the schema below
26
14
15
+
${contextTemplate}
27
16
## Response Schema:
28
17
Choose ONE action from the following options and provide ALL required fields:
29
18
30
19
Action Options:
31
20
1. CREATE_ISSUE: For identifying problems or suggesting improvements
21
+
2. ADD_COMMENT_TO_ISSUE: For following up on an issue if you have more information
22
+
3. ADD_COMMENT_TO_PR: For providing feedback on a pull request
32
23
2. NOTHING: When no action is needed
33
24
34
25
Required Fields:
@@ -49,61 +40,17 @@ export const oodaTemplate = `
49
40
- labels: (optional) Relevant labels
50
41
- issue: (required for issue operations) Issue number
51
42
52
-
## Response Examples:
53
-
54
-
1. INITIALIZE_REPOSITORY:
55
-
{
56
-
"action": "INITIALIZE_REPOSITORY",
57
-
"reasoning": "Repository needs initialization to establish basic structure and main branch",
58
-
"owner": "octocat",
59
-
"repo": "hello-world",
60
-
"branch": "main"
61
-
}
62
-
63
-
2. CREATE_MEMORIES_FROM_FILES:
64
-
{
65
-
"action": "CREATE_MEMORIES_FROM_FILES",
66
-
"reasoning": "Need to process and store repository content for future analysis",
67
-
"owner": "octocat",
68
-
"repo": "hello-world",
69
-
"path": "src/memories"
70
-
}
71
-
72
-
3. CREATE_PULL_REQUEST:
73
-
{
74
-
"action": "CREATE_PULL_REQUEST",
75
-
"reasoning": "Implementation of new feature requires code review and team discussion",
76
-
"owner": "octocat",
77
-
"repo": "hello-world",
78
-
"base": "main",
79
-
"branch": "feature/new-feature",
80
-
"title": "Add new feature",
81
-
"description": "This PR implements the new feature with the following improvements:\\n\\n1. Feature benefit A\\n2. Feature benefit B\\n\\nTesting completed:\\n- Unit tests added\\n- Integration tests passed",
82
-
"files": [
83
-
{
84
-
"path": "src/newFeature.ts",
85
-
"content": "// New feature implementation"
86
-
}
87
-
]
88
-
}
43
+
Remember to:
44
+
1. Provide complete and valid JSON
45
+
2. Include all required fields for your chosen action
46
+
3. Use clear, descriptive messages
47
+
4. Follow repository conventions
48
+
5. Consider the impact of your action
49
+
6. Ensure no duplicate issues or pull requests are created
89
50
90
-
4. CREATE_COMMIT:
91
-
{
92
-
"action": "CREATE_COMMIT",
93
-
"reasoning": "Commit is needed to update documentation with new configuration options",
94
-
"owner": "octocat",
95
-
"repo": "hello-world",
96
-
"branch": "main",
97
-
"message": "docs: update README with new configuration options",
98
-
"files": [
99
-
{
100
-
"path": "docs/README.md",
101
-
"content": "Updated content"
102
-
}
103
-
]
104
-
}
51
+
## Response Examples:
105
52
106
-
5. CREATE_ISSUE:
53
+
1. CREATE_ISSUE:
107
54
{
108
55
"action": "CREATE_ISSUE",
109
56
"reasoning": "Issue is needed to identify performance issue and propose solution",
@@ -114,20 +61,7 @@ export const oodaTemplate = `
114
61
"labels": ["performance", "high-priority"]
115
62
}
116
63
117
-
6. MODIFY_ISSUE:
118
-
{
119
-
"action": "MODIFY_ISSUE",
120
-
"reasoning": "Issue is updated to reflect new information or progress",
121
-
"owner": "octocat",
122
-
"repo": "hello-world",
123
-
"issue": 123,
124
-
"title": "Updated: Optimize database queries",
125
-
"body": "## Update\\n[New information or progress]\\n\\n## Original Issue\\n[Original content]",
126
-
"state": "closed",
127
-
"labels": ["resolved"]
128
-
}
129
-
130
-
7. ADD_COMMENT_TO_ISSUE:
64
+
2. ADD_COMMENT_TO_ISSUE:
131
65
{
132
66
"action": "ADD_COMMENT_TO_ISSUE",
133
67
"reasoning": "Comment is added to provide progress update",
"comment": "## Progress Update\\n- Completed X\\n- Found Y\\n- Next steps: Z"
138
72
}
139
73
140
-
8. NOTHING:
141
-
{
142
-
"action": "NOTHING"
143
-
}
144
-
145
-
9. COMMENT_ISSUE:
146
-
{
147
-
"action": "COMMENT_ISSUE",
148
-
"reasoning": "Comment is added to provide analysis findings and recommended next steps",
149
-
"owner": "octocat",
150
-
"repo": "hello-world",
151
-
"issue": 123,
152
-
"comment": "I've analyzed this issue and here are my findings:\\n\\n1. [Analysis point 1]\\n2. [Analysis point 2]\\n\\nRecommended next steps:\\n- Step 1\\n- Step 2"
153
-
}
154
-
155
-
10. COMMENT_PR:
74
+
3. ADD_COMMENT_TO_PR:
156
75
{
157
-
"action": "COMMENT_PR",
76
+
"action": "ADD_COMMENT_TO_PR",
158
77
"reasoning": "Pull request needs feedback on implementation approach and code quality",
159
78
"owner": "octocat",
160
79
"repo": "hello-world",
161
80
"issue": 456,
162
81
"comment": "## Code Review Feedback\\n\\n### Strengths\\n- [Positive point 1]\\n- [Positive point 2]\\n\\n### Suggestions\\n- [Suggestion 1]\\n- [Suggestion 2]\\n\\nOverall: [Summary]"
163
82
}
164
83
165
-
Remember to:
166
-
1. Provide complete and valid JSON
167
-
2. Include all required fields for your chosen action
168
-
3. Use clear, descriptive messages
169
-
4. Follow repository conventions
170
-
5. Consider the impact of your action
171
-
6. Ensure no duplicate issues or pull requests are created
84
+
4. NOTHING:
85
+
{
86
+
"action": "NOTHING",
87
+
"reasoning": "No action is needed because the current state meets all requirements and no further changes are necessary."
0 commit comments