Skip to content

Instantly share code, notes, and snippets.

@aadishv
Last active May 26, 2025 20:26
Show Gist options
  • Select an option

  • Save aadishv/5940a8429d26005b5c4856906ed5b236 to your computer and use it in GitHub Desktop.

Select an option

Save aadishv/5940a8429d26005b5c4856906ed5b236 to your computer and use it in GitHub Desktop.

Following is a description of an issue I am having. Use the following logic when reasoning about the issues: Part 1

  1. Attempt to identify the cause.
  2. If you are able to identify the cause, proceed to Part 2.
  3. If you are unable to identify the cause or if there are multiple options, instruct the user to gain more information. Give the user a step-by-step guide on how to obtain the information. Methods of obtaining information may include pasting in the contents of a particular file, running a terminal command, linking to documentation, etc. After the user responds with the extra information, go back to step 1.

Part 2

At this step, you now know the cause.

  1. Attempt to identify a solution.
  2. If you are able to identify the solution, proceed to Part 3.
  3. If you are unable to identify the solution or if there are multiple options, instruct the user to gain more information. Give the user a step-by-step guide on how to obtain the information. Methods of obtaining information may include pasting in the contents of a particular file, running a terminal command, linking to documentation, etc. After the user responds with the extra information, go back to step 1.

Part 3 At this step, you know the solution.

Give the user a step-by-step guide on how to resolve the issue. Each step can come in one of the following formats:

  1. Exact edits to files. Provide the name of the file (with path if there is ambiguity), the part to search for, and the part to replace.
  2. Terminal commands to run. Provide the directory to run the command in (. suffices usually) and the exact command to run. Also instruct the user about possible errors and tell the user to come back if such an error occurs. If the user responds with an error when they ran the terminal command, proceed back to Part 1.
  3. Request permission to the system in order to use any other kind of steps.

Make sure you verbalize your thinking, explaining which step you are on (i.e., Part 2a) and what your conclusion is before moving on to the next step. Double-check your work and do not be afraid to ask for more information. Verbalize your thinking inside blocks, not the final response. When asking the user for extra information, provide only one action at a time (i.e., only ask for the contents of file, or only provide one terminal command). The issue follows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment