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
Copy file name to clipboardExpand all lines: docs/introduction/prompting.mdx
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,10 @@ If there are specific implementation details you want included, make sure to spe
25
25
## Elements of a Strong Prompt
26
26
27
27
1.**Scope:** What repository, branch, or files are involved? (e.g., `my-web-app` repo, `PR #42`, `src/services/user.ts`)
28
-
2.**Goal:** What is the high-level objective? (e.g., Refactor `UserService`, improve testability)
29
-
3.**Tasks:** What specific actions should the agent take? Use a numbered or bulleted list for clarity. (e.g., Extract logic to `UserRepository`, use dependency injection, update tests, update diagram)
30
-
4.**Context/Patterns:** Are there existing patterns, examples, or documentation to reference? (e.g., `ProductService`, `ProductRepository`)
31
-
5.**Success Criteria:** How will you know the task is done correctly? (e.g., Tests pass, 90%+ coverage, diagram updated)
28
+
1.**Goal:** What is the high-level objective? (e.g., Refactor `UserService`, improve testability)
29
+
1.**Tasks:** What specific actions should the agent take? Use a numbered or bulleted list for clarity. (e.g., Extract logic to `UserRepository`, use dependency injection, update tests, update diagram)
30
+
1.**Context/Patterns:** Are there existing patterns, examples, or documentation to reference? (e.g., `ProductService`, `ProductRepository`)
31
+
1.**Success Criteria:** How will you know the task is done correctly? (e.g., Tests pass, 90%+ coverage, diagram updated)
32
32
33
33
## Platform-Specific Guidance
34
34
@@ -43,9 +43,9 @@ Example Slack prompt:
43
43
```
44
44
@codegen In the `api-server` repo, can you:
45
45
1. Add input validation to the `/users` endpoint
46
-
2. Use the same validation pattern as `/products`
47
-
3. Add tests covering edge cases
48
-
4. Update the OpenAPI spec
46
+
1. Use the same validation pattern as `/products`
47
+
1. Add tests covering edge cases
48
+
1. Update the OpenAPI spec
49
49
50
50
Let me know when you have a PR ready! 🚀
51
51
```
@@ -82,8 +82,8 @@ Example GitHub prompt:
82
82
```
83
83
@codegen Please review this PR focusing on:
84
84
1. Security implications of the new auth flow
85
-
2. Performance impact of the database queries
86
-
3. Test coverage for edge cases
85
+
1. Performance impact of the database queries
86
+
1. Test coverage for edge cases
87
87
88
88
Also check if the error handling follows our patterns in `utils/errors.ts`.
89
89
```
@@ -162,10 +162,10 @@ For interconnected changes:
162
162
```
163
163
I need to update the user model across multiple services:
164
164
1. Add `preferences` field to User model in `user-service`
165
-
2. Update the GraphQL schema in `api-gateway`
166
-
3. Modify the frontend components in `web-app/src/components/user/`
167
-
4. Add database migration scripts
168
-
5. Update all related tests
165
+
1. Update the GraphQL schema in `api-gateway`
166
+
1. Modify the frontend components in `web-app/src/components/user/`
167
+
1. Add database migration scripts
168
+
1. Update all related tests
169
169
170
170
Please coordinate these changes and create PRs in the correct order.
171
171
```
@@ -218,3 +218,4 @@ If you're unsure how to structure a prompt for your specific use case:
218
218
- Ask Codegen to suggest how to break down complex tasks
219
219
- Reference the [capabilities documentation](/introduction/capabilities) to understand available tools
220
220
- Check out real examples in our [use cases section](/use-cases)
0 commit comments