fraim-framework 2.0.55 → 2.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +101 -0
  2. package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +235 -0
  3. package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +243 -0
  4. package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +206 -0
  5. package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +60 -0
  6. package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +23 -0
  7. package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +22 -0
  8. package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +21 -0
  9. package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +19 -0
  10. package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +15 -0
  11. package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +45 -0
  12. package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +53 -0
  13. package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +37 -0
  14. package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +35 -0
  15. package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +29 -0
  16. package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +126 -0
  17. package/dist/registry/templates/customer-development/customer-interview-template.md +99 -0
  18. package/dist/registry/templates/customer-development/customer-persona-template.md +69 -0
  19. package/dist/registry/templates/customer-development/follow-up-email-templates.md +132 -0
  20. package/dist/registry/templates/customer-development/insight-analysis-template.md +74 -0
  21. package/dist/registry/templates/customer-development/prospect-inventory-template.csv +3 -0
  22. package/dist/registry/templates/customer-development/search-strategy-template.md +123 -0
  23. package/dist/registry/templates/customer-development/strategic-recommendations-template.md +53 -0
  24. package/dist/registry/templates/customer-development/thank-you-email-template.html +124 -0
  25. package/dist/registry/templates/customer-development/thank-you-note-template.md +16 -0
  26. package/dist/registry/templates/customer-development/triage-log-template.md +278 -0
  27. package/dist/registry/templates/customer-development/weekly-newsletter-template.html +204 -0
  28. package/dist/registry/templates/evidence/Design-Evidence.md +30 -0
  29. package/dist/registry/templates/evidence/Implementation-BugEvidence.md +94 -0
  30. package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +129 -0
  31. package/dist/registry/templates/evidence/Spec-Evidence.md +19 -0
  32. package/dist/registry/templates/help/HelpNeeded.md +14 -0
  33. package/dist/registry/templates/legal/NDA-TEMPLATE.md +170 -0
  34. package/dist/registry/templates/legal/PATENT-TEMPLATE.md +372 -0
  35. package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +339 -0
  36. package/dist/registry/templates/legal/contract-review-checklist.md +193 -0
  37. package/dist/registry/templates/legal/review-report-template.md +198 -0
  38. package/dist/registry/templates/legal/saas-terms-template.md +174 -0
  39. package/dist/registry/templates/legal/sow-template.md +117 -0
  40. package/dist/registry/templates/legal/template-variables.md +131 -0
  41. package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +194 -0
  42. package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +66 -0
  43. package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +130 -0
  44. package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +262 -0
  45. package/dist/registry/templates/marketing/github-pages-workflow.yml +64 -0
  46. package/dist/registry/templates/replicate/implementation-checklist.md +39 -0
  47. package/dist/registry/templates/replicate/use-cases-template.md +88 -0
  48. package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +55 -0
  49. package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +37 -0
  50. package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +66 -0
  51. package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +39 -0
  52. package/dist/registry/workflows/bootstrap/create-architecture.md +38 -0
  53. package/dist/registry/workflows/bootstrap/detect-broken-windows.md +300 -0
  54. package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +35 -0
  55. package/dist/registry/workflows/bootstrap/verify-test-coverage.md +36 -0
  56. package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +211 -0
  57. package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +165 -0
  58. package/dist/registry/workflows/business-development/create-business-plan.md +737 -0
  59. package/dist/registry/workflows/business-development/ideate-business-opportunity.md +55 -0
  60. package/dist/registry/workflows/business-development/price-product.md +325 -0
  61. package/dist/registry/workflows/compliance/detect-compliance-requirements.md +78 -0
  62. package/dist/registry/workflows/compliance/generate-audit-evidence.md +75 -0
  63. package/dist/registry/workflows/compliance/soc2-evidence-generator.md +332 -0
  64. package/dist/registry/workflows/customer-development/insight-analysis.md +156 -0
  65. package/dist/registry/workflows/customer-development/insight-triage.md +938 -0
  66. package/dist/registry/workflows/customer-development/interview-preparation.md +452 -0
  67. package/dist/registry/workflows/customer-development/linkedin-outreach.md +593 -0
  68. package/dist/registry/workflows/customer-development/strategic-brainstorming.md +146 -0
  69. package/dist/registry/workflows/customer-development/thank-customers.md +203 -0
  70. package/dist/registry/workflows/customer-development/user-survey-dispatch.md +60 -0
  71. package/dist/registry/workflows/customer-development/users-to-target.md +112 -0
  72. package/dist/registry/workflows/customer-development/weekly-newsletter.md +366 -0
  73. package/dist/registry/workflows/deploy/cloud-deployment.md +310 -0
  74. package/dist/registry/workflows/improve-fraim/contribute.md +32 -0
  75. package/dist/registry/workflows/improve-fraim/file-issue.md +32 -0
  76. package/dist/registry/workflows/learning/build-skillset.md +212 -0
  77. package/dist/registry/workflows/learning/synthesize-learnings.md +284 -0
  78. package/dist/registry/workflows/legal/contract-review-analysis.md +382 -0
  79. package/dist/registry/workflows/legal/nda.md +69 -0
  80. package/dist/registry/workflows/legal/patent-filing.md +76 -0
  81. package/dist/registry/workflows/legal/saas-contract-development.md +213 -0
  82. package/dist/registry/workflows/legal/trademark-filing.md +77 -0
  83. package/dist/registry/workflows/marketing/content-creation.md +37 -0
  84. package/dist/registry/workflows/marketing/convert-to-pdf.md +235 -0
  85. package/dist/registry/workflows/marketing/create-modern-website.md +456 -0
  86. package/dist/registry/workflows/marketing/domain-registration.md +323 -0
  87. package/dist/registry/workflows/marketing/hbr-article.md +73 -0
  88. package/dist/registry/workflows/marketing/launch-checklist.md +37 -0
  89. package/dist/registry/workflows/marketing/marketing-strategy.md +45 -0
  90. package/dist/registry/workflows/marketing/storytelling.md +65 -0
  91. package/dist/registry/workflows/performance/analyze-performance.md +65 -0
  92. package/dist/registry/workflows/product-building/design.md +103 -0
  93. package/dist/registry/workflows/product-building/implement.md +74 -0
  94. package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +70 -0
  95. package/dist/registry/workflows/product-building/prep-issue.md +41 -0
  96. package/dist/registry/workflows/product-building/prototype.md +65 -0
  97. package/dist/registry/workflows/product-building/resolve.md +168 -0
  98. package/dist/registry/workflows/product-building/retrospect.md +86 -0
  99. package/dist/registry/workflows/product-building/spec.md +181 -0
  100. package/dist/registry/workflows/product-building/test.md +125 -0
  101. package/dist/registry/workflows/productivity-report/productivity-report.md +263 -0
  102. package/dist/registry/workflows/quality-assurance/browser-validation.md +221 -0
  103. package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +562 -0
  104. package/dist/registry/workflows/replicate/replicate-discovery.md +336 -0
  105. package/dist/registry/workflows/replicate/replicate-to-issues.md +324 -0
  106. package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +638 -0
  107. package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +675 -0
  108. package/dist/registry/workflows/startup-credits/aws-activate-application.md +535 -0
  109. package/dist/registry/workflows/startup-credits/google-cloud-application.md +647 -0
  110. package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +538 -0
  111. package/dist/src/ai-manager/ai-manager.js +4 -6
  112. package/dist/tests/test-users-to-target-workflow.js +2 -2
  113. package/package.json +1 -1
  114. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-customer-profiling.md +0 -11
  115. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-survey-scoping.md +0 -11
  116. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-platform-discovery.md +0 -11
  117. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-survey-build-linkedin.md +0 -11
  118. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-prospect-qualification.md +0 -11
  119. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-survey-build-reddit.md +0 -11
  120. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-inventory-compilation.md +0 -11
  121. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-survey-build-x.md +0 -11
  122. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase5-survey-build-facebook.md +0 -11
  123. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase6-survey-build-custom.md +0 -11
  124. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase7-survey-dispatch.md +0 -11
  125. package/registry/stubs/workflows/customer-development/templates/customer-persona-template.md +0 -11
  126. package/registry/stubs/workflows/customer-development/templates/search-strategy-template.md +0 -11
@@ -0,0 +1,593 @@
1
+ # LinkedIn Outreach Workflow
2
+
3
+ ## INTENT
4
+ To help founders and executives generate personalized LinkedIn outreach messages by researching profiles, identifying connection paths, finding conversation hooks, and combining them with the user's outreach intent.
5
+
6
+ ## PRINCIPLES
7
+ - **Research First**: Thoroughly research each profile before generating messages
8
+ - **Personalization**: Generate highly personalized messages based on profile research
9
+ - **User Intent**: Understand and incorporate the user's specific outreach goal
10
+ - **Connection Paths**: Identify direct connections or mutual connections who can help
11
+ - **Rate Limiting**: Respect LinkedIn's terms of service with appropriate delays
12
+
13
+ ## WORKFLOW TRIGGER
14
+ **User explicitly requests LinkedIn outreach help**:
15
+ - "Generate LinkedIn messages for these profiles: [list of LinkedIn profile URLs]"
16
+ - "Help me craft outreach messages for these people: [URLs]"
17
+ - "Following the LinkedIn outreach workflow with these profiles: [URLs]"
18
+
19
+ ## INPUT REQUIREMENTS
20
+ **User provides**:
21
+ - List of LinkedIn profile URLs (one per line or comma-separated)
22
+ - User's outreach intent (will be asked if not provided)
23
+
24
+ **Example input**:
25
+ ```
26
+ Profiles:
27
+ https://linkedin.com/in/sarah-chen
28
+ https://linkedin.com/in/michael-rodriguez
29
+ https://linkedin.com/in/jane-smith
30
+
31
+ Intent: I want to reach out to potential customers for our dev tools product
32
+ ```
33
+
34
+ ## AI AGENT PROCESS (Cursor)
35
+
36
+ **CRITICAL**: Use Playwright MCP tools to interact with LinkedIn. Do NOT write hard-coded scripts with specific selectors. Use your intelligence to analyze what's on screen and interact accordingly.
37
+
38
+ ### Step 1: Parse Input
39
+ **Cursor reads user input**:
40
+ 1. Extract LinkedIn profile URLs from user message
41
+ 2. Extract user's outreach intent (if provided)
42
+ 3. If intent not provided, ask user: "What is your goal in reaching out to these people? (e.g., 'Find potential customers', 'Build partnerships', 'Hire talent')"
43
+ 4. Validate that at least one profile URL is provided
44
+
45
+ ### Step 2: Browser Setup & Session Management
46
+ **Use Playwright MCP to launch browser with session persistence**:
47
+ 1. **Navigate to LinkedIn**: Use `browser_navigate` to open LinkedIn (the browser extension maintains session state automatically)
48
+ 2. **Take snapshot**: Use `browser_snapshot` to see current state and verify if logged in
49
+ 3. **Check login status from snapshot**:
50
+ - If you see "Sign in" button → Not logged in
51
+ - If you see navigation menu with profile/notifications → Logged in
52
+ - If you see "Message" button on profiles → Logged in
53
+
54
+ **Note**: The browser extension automatically maintains cookies and session state between sessions, so if the user logged in previously, they should remain logged in. No manual cookie management needed.
55
+
56
+ ### Step 3: LinkedIn Navigation & Authentication
57
+ **Cursor navigates to LinkedIn**:
58
+ 1. Navigate to LinkedIn using `browser_navigate`
59
+ 2. Take a snapshot with `browser_snapshot` to see current state
60
+ 3. **Check login status**:
61
+ - Look for "Sign in" button → Not logged in
62
+ - Look for navigation menu with profile icon → Logged in
63
+ - Look for "Message" button on profiles → Logged in
64
+ 4. **If not logged in**:
65
+ - Navigate to login page using `browser_navigate`
66
+ - Inform user: "Please log in to LinkedIn in the browser window"
67
+ - Wait for user to manually log in
68
+ - Use `browser_wait_for` with text like "Home" or "Feed" to detect login success
69
+ - Take snapshot to verify login
70
+ - **Session is automatically saved** by the browser extension
71
+ 5. **If already logged in**: Proceed directly to profile research
72
+
73
+ **CRITICAL**:
74
+ - Cursor does NOT automate login. User must log in manually to comply with LinkedIn ToS.
75
+ - **The browser extension automatically maintains session state** - cookies are persisted between sessions
76
+ - User only needs to log in once, and subsequent workflow runs will use the saved session
77
+
78
+ ### Step 4: Research Each Profile
79
+ **For each profile URL, Cursor performs research using intelligent browser interaction**:
80
+
81
+ #### 4a. Navigate to Profile
82
+ 1. Use `browser_navigate` to go to the profile URL
83
+ 2. Use `browser_wait_for` to wait for page to load
84
+ 3. Take a snapshot with `browser_snapshot` to see the profile page
85
+ 4. Analyze what's visible on screen
86
+
87
+ #### 4b. Check Connection Status
88
+ **Determine if direct connection or find mutual connections**:
89
+ 1. **Look at the snapshot** to identify connection status:
90
+ - If you see a "Message" button → Already connected
91
+ - If you see a "Connect" button → Not connected
92
+ - If you see text like "X mutual connections" → Has mutual connections
93
+ 2. **If mutual connections exist**:
94
+ - Click on the mutual connections indicator/text
95
+ - Wait for modal/dialog to appear (use `browser_wait_for`)
96
+ - Take snapshot to see mutual connection names
97
+ - Extract the names from the snapshot
98
+ - Close the modal (click X, press Escape, or click outside)
99
+ 3. **Store connection info**:
100
+ - Direct connection: "You are already connected"
101
+ - Mutual connections: "You have X mutual connection(s): [names]"
102
+ - No connection: "No direct or mutual connections found"
103
+
104
+ #### 4c. Find Person's Interests and Hooks
105
+ **Research what would be good conversation starters by analyzing the profile**:
106
+
107
+ 1. **Extract Basic Profile Info**:
108
+ - Look at the snapshot for the person's name (usually large heading at top)
109
+ - Find their headline/title (usually below name)
110
+ - Note their location if visible
111
+
112
+ 2. **Scroll Through Profile**:
113
+ - Use `browser_evaluate` to scroll down the page
114
+ - Take multiple snapshots as you scroll to see different sections
115
+ - Look for: About section, Experience, Education, Skills, Activity/Posts
116
+
117
+ 3. **Find Recent Activity/Posts**:
118
+ - Scroll to find their activity feed or recent posts
119
+ - Look for posts they've made (usually in a feed section)
120
+ - Extract the text/content of 2-3 most recent posts
121
+ - Note topics they're discussing
122
+
123
+ 4. **Extract Skills and Expertise**:
124
+ - Find the Skills section on their profile
125
+ - Extract skill names (usually listed items)
126
+ - Note top 5-10 skills
127
+
128
+ 5. **Extract Experience Highlights**:
129
+ - Find the Experience section
130
+ - Note current and previous roles
131
+ - Extract company names and role titles
132
+
133
+ 6. **Identify Hooks** (conversation starters):
134
+ - **Recent posts**: "Recent post about: [topic]"
135
+ - **Shared interests**: "Expertise in: [skills]"
136
+ - **Current role**: "Current role: [headline]"
137
+ - **Location**: "Based in: [location]"
138
+ - **Experience**: "Background: [notable roles/companies]"
139
+
140
+ **IMPORTANT**: Use snapshots to see what's actually on screen. Don't assume specific CSS selectors exist. Analyze the visual layout and extract information accordingly.
141
+
142
+ #### 4d. Store Research Results
143
+ **For each profile, compile**:
144
+ - Profile URL
145
+ - Name
146
+ - Headline/Title
147
+ - Connection info (direct/mutual/none)
148
+ - Hooks found (array of conversation starters)
149
+ - Recent posts (if found)
150
+ - Skills (if found)
151
+ - Experience highlights (if found)
152
+
153
+ ### Step 5: Get User's Outreach Intent
154
+ **If not already provided, ask user**:
155
+ ```
156
+ I've researched [X] profile(s). Now I need to understand your outreach goal.
157
+
158
+ What is your intent in reaching out to these people?
159
+ Examples:
160
+ - "I want to find potential customers for our dev tools product"
161
+ - "I'm looking to build partnerships with companies in this space"
162
+ - "I'm hiring and want to reach out to potential candidates"
163
+ - "I want to learn from their experience in [topic]"
164
+
165
+ Your intent:
166
+ ```
167
+
168
+ Wait for user to provide their intent.
169
+
170
+ ### Step 6: Generate Personalized Messages
171
+ **For each profile, combine research + user intent to create message**:
172
+
173
+ Use your AI capabilities to generate a message with this prompt:
174
+
175
+ ```
176
+ Generate a short, personalized LinkedIn connection request message (under 300 characters).
177
+
178
+ Profile Research:
179
+ - Name: [name]
180
+ - Headline: [headline]
181
+ - Connection: [connection info]
182
+ - Hooks: [list of hooks found]
183
+
184
+ User's Outreach Intent: [user intent]
185
+
186
+ Requirements:
187
+ 1. Start with a personalized hook based on their profile (recent post, shared interest, mutual connection, etc.)
188
+ 2. Clearly state the user's intent
189
+ 3. Keep it under 300 characters
190
+ 4. Be genuine and not salesy
191
+ 5. If mutual connections exist, mention them naturally
192
+ 6. End with a clear call to action
193
+
194
+ Message:
195
+ ```
196
+
197
+ Generate one message per profile.
198
+
199
+ ### Step 7: Generate Introduction Messages for Mutual Connections
200
+ **If mutual connections exist, generate messages to ask for introductions**:
201
+
202
+ For each mutual connection, generate a message asking them to introduce you:
203
+
204
+ ```
205
+ Generate a brief message (under 200 characters) asking [mutual connection name] to introduce you to [target name].
206
+
207
+ Context:
208
+ - You're reaching out to [target name] because: [user intent]
209
+ - Your connection: [mutual connection name]
210
+ - Why this introduction makes sense: [shared context, if any]
211
+
212
+ Message should be:
213
+ - Short and respectful
214
+ - Clear about what you're asking
215
+ - Explain why the introduction is valuable
216
+ - Not pushy or demanding
217
+
218
+ Message:
219
+ ```
220
+
221
+ ### Step 8: Save Research to File
222
+ **Create a comprehensive research document**:
223
+
224
+ Save all research to a markdown file: `docs/linkedin-outreach/[date]-[profile-name]-research.md`
225
+
226
+ **File Structure**:
227
+ ```markdown
228
+ # LinkedIn Outreach Research - [Date]
229
+
230
+ ## Target Profile: [Name]
231
+
232
+ ### Profile Information
233
+ - **Name:** [name]
234
+ - **Headline:** [headline]
235
+ - **Location:** [location]
236
+ - **Profile URL:** [URL]
237
+ - **Connection Status:** [direct/mutual/none]
238
+
239
+ ### Connection Information
240
+ - **Type:** [direct connection / mutual connections / no connection]
241
+ - **Mutual Connections:**
242
+ - [List all mutual connection names]
243
+ - [For each, note their relationship/context if available]
244
+
245
+ ### Research Findings
246
+
247
+ #### Hooks Identified
248
+ 1. [Hook 1 - e.g., Recent post about...]
249
+ 2. [Hook 2 - e.g., Expertise in...]
250
+ 3. [Hook 3 - e.g., Current role...]
251
+
252
+ #### Recent Activity
253
+ - [Post 1 summary]
254
+ - [Post 2 summary]
255
+ - [Post 3 summary]
256
+
257
+ #### Skills & Expertise
258
+ - [Skill 1]
259
+ - [Skill 2]
260
+ - [Skill 3]
261
+ ...
262
+
263
+ #### Experience Highlights
264
+ - [Notable role/company 1]
265
+ - [Notable role/company 2]
266
+ ...
267
+
268
+ ### Generated Messages
269
+
270
+ #### Direct Connection Request Message
271
+ **Length:** [X]/300 characters
272
+
273
+ "[Generated message]"
274
+
275
+ #### Introduction Request Messages (for Mutual Connections)
276
+
277
+ **To [Mutual Connection 1 Name]:**
278
+ "[Generated introduction request message]"
279
+
280
+ **To [Mutual Connection 2 Name]:**
281
+ "[Generated introduction request message]"
282
+
283
+ ...
284
+
285
+ ### Outreach Intent
286
+ [User's stated intent]
287
+
288
+ ### Next Steps
289
+ - [ ] Review and refine messages
290
+ - [ ] Decide: Direct connection or ask for introduction?
291
+ - [ ] Send connection request or introduction request
292
+ - [ ] Follow up if no response after 1 week
293
+ ```
294
+
295
+ ### Step 9: Display Results & Offer Actions
296
+ **Display all generated messages and offer to populate/send**:
297
+
298
+ ```
299
+ ✅ LinkedIn Outreach Research Complete
300
+
301
+ 📊 Profile: [Name] - [Headline]
302
+ 🔗 Profile URL: [URL]
303
+ 🤝 Connection: [connection info]
304
+
305
+ 🎣 Hooks Found:
306
+ 1. [Hook 1]
307
+ 2. [Hook 2]
308
+ 3. [Hook 3]
309
+
310
+ 💬 Generated Connection Request Message ([X]/300 characters):
311
+ "[Message]"
312
+
313
+ 🤝 Mutual Connections Available:
314
+ - [Name 1] - [Their role/context]
315
+ - [Name 2] - [Their role/context]
316
+ ...
317
+
318
+ 💌 Introduction Request Messages:
319
+
320
+ To [Mutual Connection 1]:
321
+ "[Introduction message]"
322
+
323
+ To [Mutual Connection 2]:
324
+ "[Introduction message]"
325
+
326
+ 📄 Research saved to: docs/linkedin-outreach/[filename].md
327
+
328
+ ---
329
+
330
+ 🎯 What would you like to do next?
331
+
332
+ 1. **Populate message in LinkedIn** - I'll fill in the connection request form for you to review and send
333
+ 2. **Send connection request** - I'll send it on your behalf (requires confirmation)
334
+ 3. **Ask for introduction** - I'll help you message a mutual connection to request an introduction
335
+ 4. **Refine message** - Tell me what to change and I'll update it
336
+ 5. **Review research file** - Check the saved research document first
337
+
338
+ Your choice:
339
+ ```
340
+
341
+ **CRITICAL**: Always ask for user confirmation before sending any messages. Never send automatically without explicit user approval.
342
+
343
+ ### Step 10: Execute User's Choice
344
+
345
+ #### Option 1: Populate Message in LinkedIn
346
+ 1. Navigate to the profile using `browser_navigate`
347
+ 2. Click "Connect" or "More actions" → "Connect"
348
+ 3. Click "Add a note"
349
+ 4. **CRITICAL - Properly type message into LinkedIn's message box:**
350
+
351
+ **LinkedIn uses a contenteditable div for message input, not a regular textarea. The text must be properly inserted to activate the send button. Follow these steps:**
352
+
353
+ a. **First, click/focus the message input box** using `browser_click` on the message input element
354
+
355
+ b. **Clear any existing placeholder text** by:
356
+ - Using `browser_evaluate` to select all text (Ctrl+A / Cmd+A)
357
+ - Or using `browser_press_key` with "Control+a" (Windows) or "Meta+a" (Mac) to select all
358
+ - Then `browser_press_key` with "Backspace" or "Delete" to clear
359
+
360
+ c. **Type the message using `browser_type`** with the `slowly: true` parameter:
361
+ ```
362
+ Use browser_type with:
363
+ - element: "LinkedIn message input box"
364
+ - ref: [the CSS selector or ref from snapshot]
365
+ - text: [the generated message]
366
+ - slowly: true (IMPORTANT: This types character-by-character, which properly triggers LinkedIn's input detection)
367
+ ```
368
+
369
+ d. **After typing, verify the text is visible** by taking a snapshot and checking that:
370
+ - The message text appears in the input box (not as placeholder)
371
+ - The text has actual styling (not placeholder gray text)
372
+ - The send button becomes enabled/active
373
+
374
+ e. **If send button is still disabled**, try:
375
+ - Clicking the message box again to ensure focus
376
+ - Using `browser_evaluate` to trigger input events manually:
377
+ ```javascript
378
+ const messageBox = document.querySelector('.msg-form__contenteditable');
379
+ if (messageBox) {
380
+ messageBox.dispatchEvent(new InputEvent('input', { bubbles: true }));
381
+ messageBox.dispatchEvent(new Event('change', { bubbles: true }));
382
+ }
383
+ ```
384
+ - Wait 1-2 seconds for LinkedIn to process the input
385
+ - Check snapshot again to verify send button is enabled
386
+
387
+ **Common mistakes to avoid:**
388
+ - ❌ Don't just set textContent/innerHTML - LinkedIn won't detect it
389
+ - ❌ Don't type too fast - use `slowly: true` to type character-by-character
390
+ - ❌ Don't skip clearing placeholder - old placeholder can blend with new text
391
+ - ❌ Don't forget to focus the input first - typing without focus won't work
392
+
393
+ 5. **DO NOT click "Send"** - leave it for user to review and send
394
+ 6. Inform user: "Message populated in LinkedIn. Please review and click 'Send invitation' when ready."
395
+
396
+ #### Option 2: Send Connection Request (with confirmation)
397
+ 1. Ask user: "Are you sure you want me to send this connection request now?"
398
+ 2. If confirmed:
399
+ - Navigate to profile
400
+ - Click "Connect" → "Add a note"
401
+ - **Fill in message using the same detailed process from Option 1** (clear placeholder, type slowly, verify send button activates)
402
+ - **Wait for send button to be enabled** - take snapshot to verify it's clickable
403
+ - Click "Send invitation" only after confirming the button is enabled
404
+ - Confirm: "✅ Connection request sent to [Name]"
405
+ 3. If not confirmed, proceed with Option 1 (populate only)
406
+
407
+ #### Option 3: Ask for Introduction via Mutual Connection
408
+ 1. Ask user: "Which mutual connection would you like me to message for an introduction?"
409
+ 2. Navigate to that mutual connection's profile
410
+ 3. Click "Message"
411
+ 4. **Fill in the introduction request message using the same detailed process:**
412
+ - Click/focus the message input box
413
+ - Clear any placeholder text (select all + delete)
414
+ - Type message using `browser_type` with `slowly: true`
415
+ - Verify text is visible and send button is enabled
416
+ - If send button not enabled, follow troubleshooting steps from Option 1
417
+ 5. **DO NOT send automatically** - show message to user for review
418
+ 6. Ask: "Ready to send this introduction request? (Yes/No)"
419
+ 7. If yes, send (only after verifying send button is enabled); if no, allow editing
420
+
421
+ #### Option 4: Refine Message
422
+ 1. Ask user: "What would you like to change about the message?"
423
+ 2. Generate new version based on feedback
424
+ 3. Update the research file
425
+ 4. Offer to populate in LinkedIn again
426
+
427
+ #### Option 5: Review Research File
428
+ 1. Open the saved markdown file
429
+ 2. Display key sections
430
+ 3. Ask if user wants to proceed with any actions
431
+
432
+ ## OUTPUT TEMPLATE
433
+
434
+ ### Research File Template
435
+ **File Location:** `docs/linkedin-outreach/[YYYY-MM-DD]-[profile-name-slug]-research.md`
436
+
437
+ **Example filename:** `docs/linkedin-outreach/2025-01-15-dharmesh-shah-research.md`
438
+
439
+ ### Workflow Execution Summary
440
+ **Display in Cursor chat**:
441
+ ```
442
+ ✅ LinkedIn Outreach Research Complete
443
+
444
+ 📊 Profile:
445
+ 🔗 Profile URL:
446
+ 🤝 Connection:
447
+
448
+ 🎣 Hooks Found:
449
+
450
+ 💬 Generated Connection Request Message (298/300 characters):
451
+
452
+ 🤝 Mutual Connections Available:
453
+
454
+ 💌 Introduction Request Messages:
455
+
456
+ 📄 Research saved to:
457
+
458
+ ---
459
+
460
+ 🎯 What would you like to do next?
461
+
462
+ 1. Populate message in LinkedIn - I'll fill in the connection request form for you to review and send
463
+ 2. Send connection request - I'll send it on your behalf (requires confirmation)
464
+ 3. Ask for introduction - I'll help you message a mutual connection to request an introduction
465
+ 4. Refine message - Tell me what to change and I'll update it
466
+ 5. Review research file - Check the saved research document first
467
+
468
+ Your choice:
469
+ ```
470
+
471
+ ## EXAMPLES
472
+
473
+ ### Good: Complete Workflow Execution
474
+ ```
475
+ User: "Generate LinkedIn messages for these profiles:
476
+ https://linkedin.com/in/sarah-chen
477
+ https://linkedin.com/in/michael-rodriguez
478
+
479
+ My intent: I want to find potential customers for our dev tools product"
480
+
481
+ Cursor Workflow:
482
+ 1. ✅ Parsed profile URLs
483
+ 2. ✅ Extracted user intent
484
+ 3. ✅ Launched browser
485
+ 4. ✅ User logged into LinkedIn
486
+ 5. ✅ Researched Sarah's profile:
487
+ - Found 2 mutual connections: John Doe, Jane Smith
488
+ - Found recent post about scaling infrastructure
489
+ - Identified expertise in distributed systems
490
+ 6. ✅ Researched Michael's profile:
491
+ - No connections found
492
+ - Found expertise in microservices
493
+ 7. ✅ Generated personalized messages combining hooks + intent
494
+ 8. ✅ Displayed results
495
+
496
+ Output: 2 personalized messages ready for review
497
+ ```
498
+
499
+ ### Bad: Missing User Intent
500
+ ```
501
+ User: "Generate messages for these profiles: [URLs]"
502
+
503
+ Cursor Workflow:
504
+ 1. ✅ Parsed URLs
505
+ 2. ❌ No user intent provided
506
+ 3. ✅ Asked user for intent
507
+ 4. User provides: "Find customers"
508
+ 5. ✅ Continues with research and message generation
509
+
510
+ Result: Workflow completes successfully after getting intent
511
+ ```
512
+
513
+ ### Bad: Invalid Profile URLs
514
+ ```
515
+ User: "Generate messages for: invalid-url"
516
+
517
+ Cursor Workflow:
518
+ 1. ❌ Invalid LinkedIn URL format
519
+ 2. ✅ Asks user: "Please provide valid LinkedIn profile URLs (format: https://linkedin.com/in/username)"
520
+ 3. User provides correct URLs
521
+ 4. ✅ Continues workflow
522
+
523
+ Result: Workflow validates input and asks for correction
524
+ ```
525
+
526
+ ## SUCCESS METRICS
527
+ - **Profile Research Accuracy**: 95% of extracted profile data is accurate
528
+ - **Hook Identification**: At least one relevant hook found per profile
529
+ - **Message Personalization**: Messages reference specific profile details
530
+ - **Connection Path Identification**: Correctly identifies direct/mutual/no connections
531
+ - **Time Efficiency**: User spends 2 minutes reviewing vs 30 minutes researching manually
532
+ - **Message Quality**: Messages are under 300 characters and include both hook and intent
533
+
534
+ ## TECHNICAL REQUIREMENTS
535
+
536
+ ### Dependencies
537
+ - Playwright (if user has not enabled this MCP, ask them to)
538
+ - TypeScript
539
+ - AI/LLM access (via Cursor's built-in AI or OpenAI API)
540
+
541
+ ### Browser Automation Best Practices
542
+ - Use realistic delays between actions (1000-2000ms)
543
+ - Randomize delays to avoid detection
544
+ - Scroll pages naturally to load content
545
+ - Respect rate limits (don't scrape too many profiles too quickly)
546
+ - Never store LinkedIn credentials
547
+ - Always wait for user to log in manually
548
+
549
+ ### Error Handling
550
+ - If LinkedIn login fails: Ask user to log in manually
551
+ - If profile URL is invalid: Skip and continue with next profile
552
+ - If profile is private: Note that and use available public information
553
+ - If scraping fails: Log error, continue with other profiles
554
+ - If AI generation fails: Retry with simpler prompt
555
+
556
+ ## SECURITY & COMPLIANCE
557
+
558
+ ### LinkedIn Terms of Service
559
+ - ✅ User must log in manually (no credential storage)
560
+ - ✅ Respect rate limits (reasonable delays between profile visits)
561
+ - ✅ Human-like behavior patterns
562
+ - ✅ No mass automation or spamming
563
+ - ✅ All messages are suggestions - user reviews before sending
564
+
565
+ ### Data Privacy
566
+ - ✅ Profile data used only for message generation
567
+ - ✅ No profile data stored permanently
568
+ - ✅ User can review all research before messages are generated
569
+ - ✅ Messages are suggestions - user has full control
570
+
571
+ ## WORKFLOW VARIATIONS
572
+
573
+ ### Variation 1: Batch Processing
574
+ If user provides many profiles (10+), process in batches:
575
+ 1. Research first 5 profiles
576
+ 2. Generate messages for those 5
577
+ 3. Display results
578
+ 4. Ask user if they want to continue with remaining profiles
579
+
580
+ ### Variation 2: Interactive Refinement
581
+ After generating messages:
582
+ 1. Display all messages
583
+ 2. Ask user: "Would you like to refine any messages?"
584
+ 3. For each message user wants to refine:
585
+ - Show current message
586
+ - Ask what to change
587
+ - Regenerate with new instructions
588
+
589
+ ### Variation 3: Export Messages
590
+ After generation:
591
+ 1. Ask user: "Would you like to export these messages?"
592
+ 2. If yes, create a markdown file with all messages
593
+ 3. Save to `docs/linkedin-outreach/[date]-messages.md`