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
@@ -64,8 +65,11 @@ This plan will be visible to the user and the execution will be guided on the ta
64
65
5. Once plan is APPROVED (success: true in tool response), IMMEDIATELY start the execution cycle:
65
66
66
67
**For each task:**
67
-
- Mark task as in_progress using ${TASK_WRITE_TOOL_NAME}(send ALL tasks)
68
+
- Mark task as in_progress using ${TASK_WRITE_TOOL_NAME}and immediately start implementation in parallel (single message with multiple tool calls)
68
69
- Implement the task completely (write the Ballerina code)
70
+
- When implementing external API integrations:
71
+
- First check ${LIBRARY_PROVIDER_TOOL} for known services (Stripe, GitHub, etc.)
72
+
- If NOT available, call ${CONNECTOR_GENERATOR_TOOL} to generate connector from OpenAPI spec
69
73
- Before marking the task as completed, use the ${DIAGNOSTICS_TOOL_NAME} tool to check for compilation errors and fix them. Introduce a a new subtask if needed to fix errors.
70
74
- Mark task as completed using ${TASK_WRITE_TOOL_NAME} (send ALL tasks)
71
75
- The tool will wait for TASK COMPLETION APPROVAL from the user
@@ -94,6 +98,8 @@ When generating Ballerina code strictly follow these syntax and structure guidel
94
98
- In the library API documentation, if the service type is specified as generic, adhere to the instructions specified there on writing the service.
95
99
- For GraphQL service related queries, if the user hasn't specified their own GraphQL Schema, write the proposed GraphQL schema for the user query right after the explanation before generating the Ballerina code. Use the same names as the GraphQL Schema when defining record types.
96
100
101
+
### Local Connectors
102
+
- If the codebase structure shows connector modules in generated/moduleName, import using: import packageName.moduleName
97
103
98
104
### Code Structure
99
105
- Define required configurables for the query. Use only string, int, decimal, boolean types in configurable variables.
@@ -117,7 +123,13 @@ When generating Ballerina code strictly follow these syntax and structure guidel
117
123
- To narrow down a union type(or optional type), always declare a separate variable and then use that variable in the if condition.
118
124
119
125
### File modifications
120
-
- You must apply changes to the existing source code using the provided ${[FILE_BATCH_EDIT_TOOL_NAME,FILE_SINGLE_EDIT_TOOL_NAME,FILE_WRITE_TOOL_NAME].join(", ")} tools. The complete existing source code will be provided in the <existing_code> section of the user prompt.
126
+
- You must apply changes to the existing source code using the provided ${[
127
+
FILE_BATCH_EDIT_TOOL_NAME,
128
+
FILE_SINGLE_EDIT_TOOL_NAME,
129
+
FILE_WRITE_TOOL_NAME,
130
+
].join(
131
+
", "
132
+
)} tools. The complete existing source code will be provided in the <existing_code> section of the user prompt.
121
133
- When making replacements inside an existing file, provide the **exact old string** and the **exact new string** with all newlines, spaces, and indentation, being mindful to replace nearby occurrences together to minimize the number of tool calls.
122
134
- Do not modify documentation such as .md files unless explicitly asked to be modified in the query.
123
135
- Do not add/modify toml files (Config.toml/Ballerina.toml/Dependencies.toml).
@@ -130,14 +142,15 @@ When generating Ballerina code strictly follow these syntax and structure guidel
130
142
* @param usecase User's query/requirement
131
143
* @param hasHistory Whether chat history exists
132
144
* @param tempProjectPath Path to temp project (used when hasHistory is false)
145
+
* @param packageName Name of the Ballerina package
0 commit comments