From 73211942a7bdf2579c1cab8cb0b344d86bcdae68 Mon Sep 17 00:00:00 2001 From: Michael Oyebadejo <59027324+Michaeloye@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:52:26 +0100 Subject: [PATCH 1/2] Update prompting-debugging.mdx Refactor AI response prompt example for proper MDX rendering under Full System Review (Codebase Audit) section. --- prompting/prompting-debugging.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prompting/prompting-debugging.mdx b/prompting/prompting-debugging.mdx index a9db3f1..7315548 100644 --- a/prompting/prompting-debugging.mdx +++ b/prompting/prompting-debugging.mdx @@ -31,11 +31,11 @@ Break down the suggestions into an ordered list of steps we could take, from mos This prompt is long, but it directs the AI to act like a code reviewer or architect. We’ve asked it to find mislocated code, check modularity, and even prioritize the fixes​. The AI might respond with something like: -- \_“1. **__Separate API calls from components:__** The \_`ProjectList`_component is directly fetching data. Suggestion: move data fetching to a dedicated hook or context to keep components pure UI.​_ +1. ”**Separate API calls from components:** The `ProjectList` component is directly fetching data. _Suggestion: move data fetching to a dedicated hook or context to keep components pure UI._ +2. **Reduce coupling in Task logic:** The task completion toggle is updating both state and directly writing to localStorage. This should be refactored to have a single source of truth. +3. **Organize utility functions:** There are utility functions in `App.tsx` that would be better placed in a `utils` folder (e.g., date formatting functions). +4. ...” -1. **Reduce coupling in Task logic:** The task completion toggle is updating both state and directly writing to localStorage. This should be refactored to have a single source of truth.​ -2. **Organize utility functions:** There are utility functions in `App.tsx` that would be better placed in a `utils` folder (e.g., date formatting functions). -3. ...”\* Each point might come with explanation and maybe references to specific files. Such a report helps you see the forest for the trees. It’s especially useful if you’ve been focusing on one feature at a time and haven’t looked at the overall structure in a while. @@ -354,4 +354,4 @@ This guidebook was shared in our community Discord—it might be useful for debu Approach API integration with a comprehensive strategy for requests, responses, and error handling. Verify authentication headers, parameters, and body format for each request. Implement proper error handling for all network operations with specific catches for different error types. Ensure consistent typing between request payloads, expected responses, and application state. Configure proper CORS settings and verify they work across all environments. Implement intelligent retry mechanisms for transient failures with exponential backoff. Consider rate limiting implications and implement appropriate throttling. Add strategic request caching to improve performance and reduce server load. Monitor network performance including request timing and payload sizes. Test API integrations against both happy paths and various failure scenarios. Maintain clear documentation of all API endpoints, their purposes, expected parameters, and response formats to facilitate future development and debugging. - \ No newline at end of file + From 7e37e106ee477c7d53c0b0bec4de7690dd081a6c Mon Sep 17 00:00:00 2001 From: Michael Oyebadejo <59027324+Michaeloye@users.noreply.github.com> Date: Thu, 31 Jul 2025 15:00:32 +0100 Subject: [PATCH 2/2] Update prompting-debugging.mdx Fix quotation typo --- prompting/prompting-debugging.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompting/prompting-debugging.mdx b/prompting/prompting-debugging.mdx index 7315548..999e71f 100644 --- a/prompting/prompting-debugging.mdx +++ b/prompting/prompting-debugging.mdx @@ -31,7 +31,7 @@ Break down the suggestions into an ordered list of steps we could take, from mos This prompt is long, but it directs the AI to act like a code reviewer or architect. We’ve asked it to find mislocated code, check modularity, and even prioritize the fixes​. The AI might respond with something like: -1. ”**Separate API calls from components:** The `ProjectList` component is directly fetching data. _Suggestion: move data fetching to a dedicated hook or context to keep components pure UI._ +1. “**Separate API calls from components:** The `ProjectList` component is directly fetching data. _Suggestion: move data fetching to a dedicated hook or context to keep components pure UI._ 2. **Reduce coupling in Task logic:** The task completion toggle is updating both state and directly writing to localStorage. This should be refactored to have a single source of truth. 3. **Organize utility functions:** There are utility functions in `App.tsx` that would be better placed in a `utils` folder (e.g., date formatting functions). 4. ...”