Skip to content

Commit 3cc12e7

Browse files
authored
Tweak the connect prompt to look at gitignored files and to be less eager to do more than check your login status (#9133)
* Tweak the connect prompt to look at gitignored files and to be less eager to do more than check your login status * Loosen prescriptiveness, ease testing proactivity, come up with multiple root causes * Respond to prompt review comments.
1 parent ece5bcd commit 3cc12e7

File tree

1 file changed

+47
-24
lines changed

1 file changed

+47
-24
lines changed

src/mcp/prompts/crashlytics/connect.ts

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,36 @@ Active user: ${accountEmail || "<NONE>"}
2424
## Required first steps! Absolutely required! Incredibly important!
2525
2626
1. **Make sure the user is logged in. No Crashlytics tools will work if the user is not logged in.**
27-
a. Use the \`firebase_get_environment\` tool to verify that the user is logged in,
28-
and find the active Firebase project.
27+
a. Use the \`firebase_get_environment\` tool to verify that the user is logged in.
2928
b. If the Firebase 'Active user' is set to <NONE>, instruct the user to run \`firebase login\`
30-
before continuing.
31-
32-
2. **Get the app_id for the Firebase application.**
33-
a. If this is an Android app, read the mobilesdk_app_id value specified in the
34-
google-services.json file. If there are multiple files or multiple app ids in a
35-
single file, ask the user to choose one by providing a numbered list of all the package names.
36-
b. If this is an iOS app, read the GOOGLE_APP_ID from GoogleService-Info.plist file.
37-
If there are multiple files or multiple app ids in single file, ask the user to
38-
choose one by providing a numbered list of all the bundle names.
39-
c. If you can't find either of the above, just ask the user for the app id.
29+
before continuing. Ignore other fields that are set to <NONE>. We are just making sure the
30+
user is logged in.
31+
32+
2. **Get the app ID for the Firebase application.**
33+
34+
Use the information below to help you find the developer's app ID. If you cannot find it after 2-3
35+
attempts, just ask the user for the value they want to use, providing the description of what the
36+
value looks like.
37+
38+
* **Description:** The app ID we are looking for contains four colon (":") delimited parts: a version
39+
number (typically "1"), a project number, a platform type ("android", "ios", or "web"),
40+
and a sequence of hexadecimal characters. This can be found in the project settings in the Firebase Console
41+
or in the appropriate google services file for the application type.
42+
* For Android apps, you will typically find the app ID in a file called google-services.json under the
43+
mobilesdk_app_id key. The file is most often located in the app directory that contains the src directory.
44+
* For iOS apps, you will typically find the app ID in a property list file called GoogleService-Info.plist under the
45+
GOOGLE_APP_ID key. The plist file is most often located in the main project directory.
46+
* Sometimes developers will not check in the google services file because it is a shared or public
47+
repository. If you can't find the file, the files may be included in the .gitignore. Check again for the file
48+
removing restrictions around looking for tracked files.
49+
* Developers may have multiple google services files that map to different releases. In cases like this,
50+
developers may create different directories to hold each like alpha/google-services.json or alpha/GoogleService-Info.plist.
51+
In other cases, developers may change the suffix of the file to something like google-services-alpha.json or
52+
GoogleService-Alpha.plist. Look for as many google services files as you can find.
53+
* Sometimes developers may include the codebase for both the Android app and the iOS app in the same repository.
54+
* If there are multiple files or multiple app IDs in a single file, ask the user to choose one by providing
55+
a numbered list of all the package names.
56+
* Again, if you have trouble finding the app ID, just ask the user for it.
4057
4158
## Next steps
4259
@@ -70,6 +87,7 @@ Follow these steps to fetch issues and prioritize them.
7087
* <the issue subtitle>
7188
* **Description:** <a discription of the issue based on information from the tool response>
7289
* **Rationale:** <the reason this issue was prioritized in the way it was>
90+
6. Ask the user if they would like to diagnose and fix any of the issues presented
7391
7492
### How to diagnose and fix issues
7593
@@ -80,16 +98,18 @@ Follow these steps to diagnose and fix issues.
8098
3. Use the 'crashlytics_list_events' tool to get an example crash for this issue.
8199
3a. Apply the same filtering criteria that you used to find the issue, so that you find an appropriate event.
82100
4. Read the files that exist in the stack trace of the issue to understand the crash deeply.
83-
5. Determine the root cause of the crash.
84-
6. Write out a plan using the following criteria:
85-
6a. Write out a description of the issue and including
101+
5. Determine possible root causes for the crash - no more than 5 potential root causes.
102+
6. Critique your own determination, analyzing how plausible each scenario is given the crash details.
103+
7. Choose the most likely root cause given your analysis.
104+
8. Write out a plan for the most likely root cause using the following criteria:
105+
8a. Write out a description of the issue and including
86106
* A brief description of the cause of the issue
87-
* A determination of your level of confidence in the cause of the issue
107+
* A determination of your level of confidence in the cause of the issue using your analysis.
88108
* A determination of which library is at fault, this codebase or a dependent library
89109
* A determination for how complex the fix will be
90-
6b. The plan should include relevant files to change
91-
6c. The plan should include a test plan to verify the fix
92-
6d. Use the following format for the plan:
110+
8b. The plan should include relevant files to change
111+
8c. The plan should include a test plan for how the user might verify the fix
112+
8d. Use the following format for the plan:
93113
94114
## Cause
95115
<A description of the root cause leading to the issue>
@@ -105,12 +125,15 @@ Follow these steps to diagnose and fix issues.
105125
<A plan for how to test that the issue has been fixed and protect against regressions>
106126
1. <Test case 1>
107127
2. <Test case 2>
128+
129+
## Other potential causes
130+
1. <Another possible root cause>
131+
2. <Another possible root cause>
108132
109-
7. Present the plan to the user and get approval before making the change.
110-
8. Fix the issue.
111-
8a. Be mindful of API contracts and do not add fields to resources without a clear way to populate those fields
112-
8b. If there is not enough information in the crash report to find a root cause, describe why you cannot fix the issue instead of making a guess.
113-
9. Ask the developer if they would like you to test the fix for them.
133+
9. Present the plan to the user and get approval before making the change.
134+
10. Only if they approve the plan, create a fix for the issue.
135+
10a. Be mindful of API contracts and do not add fields to resources without a clear way to populate those fields
136+
10b. If there is not enough information in the crash report to find a root cause, describe why you cannot fix the issue instead of making a guess.
114137
`.trim(),
115138
},
116139
},

0 commit comments

Comments
 (0)