fraim-framework 2.0.56 → 2.0.58

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 (224) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/bin/fraim-mcp.js +14 -0
  3. package/bin/fraim.js +23 -0
  4. package/dist/src/cli/commands/init-project.js +10 -4
  5. package/dist/src/cli/commands/mcp.js +65 -0
  6. package/dist/src/cli/setup/mcp-config-generator.js +19 -16
  7. package/dist/src/fraim/issue-tracking/ado-provider.js +304 -0
  8. package/dist/src/fraim/issue-tracking/factory.js +63 -0
  9. package/dist/src/fraim/issue-tracking/github-provider.js +200 -0
  10. package/dist/src/fraim/issue-tracking/types.js +7 -0
  11. package/dist/src/fraim/issue-tracking-config.js +83 -0
  12. package/dist/src/local-mcp-server/stdio-server.js +207 -0
  13. package/dist/src/utils/workflow-parser.js +81 -0
  14. package/package.json +17 -12
  15. package/registry/scripts/pdf-styles.css +172 -0
  16. package/registry/scripts/prep-issue.sh +46 -4
  17. package/registry/scripts/profile-server.ts +131 -130
  18. package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +1 -1
  19. package/registry/stubs/workflows/customer-development/users-to-target.md +1 -1
  20. package/registry/stubs/workflows/product-building/design.md +1 -1
  21. package/registry/stubs/workflows/product-building/implement.md +1 -1
  22. package/Claude.md +0 -1
  23. package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +0 -101
  24. package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +0 -235
  25. package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +0 -243
  26. package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +0 -206
  27. package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
  28. package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
  29. package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
  30. package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
  31. package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
  32. package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
  33. package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
  34. package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
  35. package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
  36. package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
  37. package/dist/registry/ai-manager-rules/retrospective.md +0 -116
  38. package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
  39. package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
  40. package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
  41. package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
  42. package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
  43. package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
  44. package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +0 -60
  45. package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +0 -23
  46. package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +0 -22
  47. package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +0 -21
  48. package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +0 -19
  49. package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +0 -15
  50. package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +0 -45
  51. package/dist/registry/providers/ado.json +0 -19
  52. package/dist/registry/providers/github.json +0 -19
  53. package/dist/registry/scripts/cleanup-branch.js +0 -287
  54. package/dist/registry/scripts/evaluate-code-quality.js +0 -66
  55. package/dist/registry/scripts/exec-with-timeout.js +0 -142
  56. package/dist/registry/scripts/generate-engagement-emails.js +0 -705
  57. package/dist/registry/scripts/newsletter-helpers.js +0 -671
  58. package/dist/registry/scripts/profile-server.js +0 -388
  59. package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
  60. package/dist/registry/scripts/send-newsletter-simple.js +0 -85
  61. package/dist/registry/scripts/send-thank-you-emails.js +0 -54
  62. package/dist/registry/scripts/validate-openapi-limits.js +0 -311
  63. package/dist/registry/scripts/validate-test-coverage.js +0 -262
  64. package/dist/registry/scripts/verify-test-coverage.js +0 -66
  65. package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
  66. package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
  67. package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
  68. package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
  69. package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
  70. package/dist/registry/templates/customer-development/customer-interview-template.md +0 -99
  71. package/dist/registry/templates/customer-development/customer-persona-template.md +0 -69
  72. package/dist/registry/templates/customer-development/follow-up-email-templates.md +0 -132
  73. package/dist/registry/templates/customer-development/insight-analysis-template.md +0 -74
  74. package/dist/registry/templates/customer-development/prospect-inventory-template.csv +0 -3
  75. package/dist/registry/templates/customer-development/search-strategy-template.md +0 -123
  76. package/dist/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
  77. package/dist/registry/templates/customer-development/thank-you-email-template.html +0 -124
  78. package/dist/registry/templates/customer-development/thank-you-note-template.md +0 -16
  79. package/dist/registry/templates/customer-development/triage-log-template.md +0 -278
  80. package/dist/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
  81. package/dist/registry/templates/evidence/Design-Evidence.md +0 -30
  82. package/dist/registry/templates/evidence/Implementation-BugEvidence.md +0 -94
  83. package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -129
  84. package/dist/registry/templates/evidence/Spec-Evidence.md +0 -19
  85. package/dist/registry/templates/help/HelpNeeded.md +0 -14
  86. package/dist/registry/templates/legal/NDA-TEMPLATE.md +0 -170
  87. package/dist/registry/templates/legal/PATENT-TEMPLATE.md +0 -372
  88. package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +0 -339
  89. package/dist/registry/templates/legal/contract-review-checklist.md +0 -193
  90. package/dist/registry/templates/legal/review-report-template.md +0 -198
  91. package/dist/registry/templates/legal/saas-terms-template.md +0 -174
  92. package/dist/registry/templates/legal/sow-template.md +0 -117
  93. package/dist/registry/templates/legal/template-variables.md +0 -131
  94. package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +0 -194
  95. package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
  96. package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +0 -130
  97. package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +0 -262
  98. package/dist/registry/templates/marketing/github-pages-workflow.yml +0 -64
  99. package/dist/registry/templates/replicate/implementation-checklist.md +0 -39
  100. package/dist/registry/templates/replicate/use-cases-template.md +0 -88
  101. package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
  102. package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
  103. package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -66
  104. package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
  105. package/dist/registry/workflows/bootstrap/create-architecture.md +0 -38
  106. package/dist/registry/workflows/bootstrap/detect-broken-windows.md +0 -300
  107. package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +0 -35
  108. package/dist/registry/workflows/bootstrap/verify-test-coverage.md +0 -36
  109. package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +0 -211
  110. package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +0 -165
  111. package/dist/registry/workflows/business-development/create-business-plan.md +0 -737
  112. package/dist/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
  113. package/dist/registry/workflows/business-development/price-product.md +0 -325
  114. package/dist/registry/workflows/compliance/detect-compliance-requirements.md +0 -78
  115. package/dist/registry/workflows/compliance/generate-audit-evidence.md +0 -75
  116. package/dist/registry/workflows/compliance/soc2-evidence-generator.md +0 -332
  117. package/dist/registry/workflows/customer-development/insight-analysis.md +0 -156
  118. package/dist/registry/workflows/customer-development/insight-triage.md +0 -938
  119. package/dist/registry/workflows/customer-development/interview-preparation.md +0 -452
  120. package/dist/registry/workflows/customer-development/linkedin-outreach.md +0 -593
  121. package/dist/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
  122. package/dist/registry/workflows/customer-development/thank-customers.md +0 -203
  123. package/dist/registry/workflows/customer-development/user-survey-dispatch.md +0 -60
  124. package/dist/registry/workflows/customer-development/users-to-target.md +0 -112
  125. package/dist/registry/workflows/customer-development/weekly-newsletter.md +0 -366
  126. package/dist/registry/workflows/deploy/cloud-deployment.md +0 -310
  127. package/dist/registry/workflows/improve-fraim/contribute.md +0 -32
  128. package/dist/registry/workflows/improve-fraim/file-issue.md +0 -32
  129. package/dist/registry/workflows/learning/build-skillset.md +0 -212
  130. package/dist/registry/workflows/learning/synthesize-learnings.md +0 -284
  131. package/dist/registry/workflows/legal/contract-review-analysis.md +0 -382
  132. package/dist/registry/workflows/legal/nda.md +0 -69
  133. package/dist/registry/workflows/legal/patent-filing.md +0 -76
  134. package/dist/registry/workflows/legal/saas-contract-development.md +0 -213
  135. package/dist/registry/workflows/legal/trademark-filing.md +0 -77
  136. package/dist/registry/workflows/marketing/content-creation.md +0 -37
  137. package/dist/registry/workflows/marketing/convert-to-pdf.md +0 -235
  138. package/dist/registry/workflows/marketing/create-modern-website.md +0 -456
  139. package/dist/registry/workflows/marketing/domain-registration.md +0 -323
  140. package/dist/registry/workflows/marketing/hbr-article.md +0 -73
  141. package/dist/registry/workflows/marketing/launch-checklist.md +0 -37
  142. package/dist/registry/workflows/marketing/marketing-strategy.md +0 -45
  143. package/dist/registry/workflows/marketing/storytelling.md +0 -65
  144. package/dist/registry/workflows/performance/analyze-performance.md +0 -65
  145. package/dist/registry/workflows/product-building/design.md +0 -103
  146. package/dist/registry/workflows/product-building/implement.md +0 -74
  147. package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
  148. package/dist/registry/workflows/product-building/prep-issue.md +0 -41
  149. package/dist/registry/workflows/product-building/prototype.md +0 -65
  150. package/dist/registry/workflows/product-building/resolve.md +0 -168
  151. package/dist/registry/workflows/product-building/retrospect.md +0 -86
  152. package/dist/registry/workflows/product-building/spec.md +0 -181
  153. package/dist/registry/workflows/product-building/test.md +0 -125
  154. package/dist/registry/workflows/productivity-report/productivity-report.md +0 -263
  155. package/dist/registry/workflows/quality-assurance/browser-validation.md +0 -221
  156. package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
  157. package/dist/registry/workflows/replicate/replicate-discovery.md +0 -336
  158. package/dist/registry/workflows/replicate/replicate-to-issues.md +0 -324
  159. package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -638
  160. package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -675
  161. package/dist/registry/workflows/startup-credits/aws-activate-application.md +0 -535
  162. package/dist/registry/workflows/startup-credits/google-cloud-application.md +0 -647
  163. package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
  164. package/dist/scripts/build-stub-registry.js +0 -108
  165. package/dist/src/ai-manager/ai-manager.js +0 -480
  166. package/dist/src/ai-manager/phase-flow.js +0 -357
  167. package/dist/src/ai-manager/types.js +0 -5
  168. package/dist/src/fraim-mcp-server.js +0 -1885
  169. package/dist/tests/debug-tools.js +0 -80
  170. package/dist/tests/shared-server-utils.js +0 -57
  171. package/dist/tests/test-add-ide.js +0 -283
  172. package/dist/tests/test-ai-coach-edge-cases.js +0 -420
  173. package/dist/tests/test-ai-coach-mcp-integration.js +0 -450
  174. package/dist/tests/test-ai-coach-performance.js +0 -328
  175. package/dist/tests/test-ai-coach-phase-content.js +0 -264
  176. package/dist/tests/test-ai-coach-workflows.js +0 -514
  177. package/dist/tests/test-cli.js +0 -228
  178. package/dist/tests/test-client-scripts-validation.js +0 -167
  179. package/dist/tests/test-complete-setup-flow.js +0 -110
  180. package/dist/tests/test-config-system.js +0 -279
  181. package/dist/tests/test-debug-session.js +0 -134
  182. package/dist/tests/test-end-to-end-hybrid-validation.js +0 -328
  183. package/dist/tests/test-enhanced-session-init.js +0 -188
  184. package/dist/tests/test-first-run-journey.js +0 -368
  185. package/dist/tests/test-fraim-issues.js +0 -59
  186. package/dist/tests/test-genericization.js +0 -44
  187. package/dist/tests/test-hybrid-script-execution.js +0 -340
  188. package/dist/tests/test-ide-detector.js +0 -46
  189. package/dist/tests/test-improved-setup.js +0 -121
  190. package/dist/tests/test-mcp-config-generator.js +0 -99
  191. package/dist/tests/test-mcp-connection.js +0 -107
  192. package/dist/tests/test-mcp-issue-integration.js +0 -156
  193. package/dist/tests/test-mcp-lifecycle-methods.js +0 -240
  194. package/dist/tests/test-mcp-shared-server.js +0 -308
  195. package/dist/tests/test-mcp-template-processing.js +0 -160
  196. package/dist/tests/test-modular-issue-tracking.js +0 -165
  197. package/dist/tests/test-node-compatibility.js +0 -95
  198. package/dist/tests/test-npm-install.js +0 -68
  199. package/dist/tests/test-package-size.js +0 -108
  200. package/dist/tests/test-pr-review-workflow.js +0 -307
  201. package/dist/tests/test-prep-issue.js +0 -129
  202. package/dist/tests/test-productivity-integration.js +0 -157
  203. package/dist/tests/test-script-location-independence.js +0 -198
  204. package/dist/tests/test-script-sync.js +0 -557
  205. package/dist/tests/test-server-utils.js +0 -32
  206. package/dist/tests/test-session-rehydration.js +0 -148
  207. package/dist/tests/test-setup-integration.js +0 -98
  208. package/dist/tests/test-setup-scenarios.js +0 -322
  209. package/dist/tests/test-standalone.js +0 -143
  210. package/dist/tests/test-stub-registry.js +0 -136
  211. package/dist/tests/test-sync-stubs.js +0 -143
  212. package/dist/tests/test-sync-version-update.js +0 -93
  213. package/dist/tests/test-telemetry.js +0 -193
  214. package/dist/tests/test-token-validator.js +0 -30
  215. package/dist/tests/test-user-journey.js +0 -236
  216. package/dist/tests/test-users-to-target-workflow.js +0 -253
  217. package/dist/tests/test-utils.js +0 -109
  218. package/dist/tests/test-wizard.js +0 -71
  219. package/dist/tests/test-workflow-discovery.js +0 -242
  220. package/labels.json +0 -52
  221. package/registry/agent-guardrails.md +0 -63
  222. package/registry/fraim.md +0 -48
  223. package/setup.js +0 -171
  224. package/tsconfig.json +0 -23
@@ -1,366 +0,0 @@
1
- # Weekly Newsletter Workflow
2
-
3
- ## INTENT
4
- To generate and distribute a compelling weekly newsletter that showcases the AI Agent's amazing new features and improvements, creating excitement among current users and FOMO for subscribers who haven't joined yet.
5
-
6
- ## PRINCIPLES
7
- - **Value-Focused**: Highlight features and improvements that deliver real value to users
8
- - **User-Facing Only**: Do NOT include internal features (admin dashboards, monitoring, backups, devops)
9
- - **Authentic Testimonials**: Only use real testimonials from actual users - NO fake quotes
10
- - **FOMO-Inducing**: Create urgency and excitement about missing out
11
- - **Visually Stunning**: Beautiful design that catches the eye
12
- - **Concise**: Scannable format with clear sections
13
- - **AI Creativity**: AI agent makes all editorial decisions - what's a feature vs bug, what's worth highlighting
14
-
15
- ## WORKFLOW TRIGGER
16
- **User triggers this workflow manually**:
17
- - Weekly, typically Monday morning
18
- - User says: "Generate this week's newsletter" or similar
19
-
20
- ## AI AGENT PROCESS
21
-
22
- ### Step 1: Issue Retrieval
23
- **AI Agent calls function**:
24
- ```typescript
25
- // Import newsletter helper functions directly from synced location
26
- const os = require('os');
27
- const path = require('path');
28
-
29
- const scriptsDir = path.join(os.homedir(), '.fraim', 'scripts');
30
- const scriptPath = path.join(scriptsDir, 'newsletter-helpers.ts');
31
-
32
- // Import from the synced script
33
- const { getResolvedIssuesForNewsletter } = await import(scriptPath);
34
-
35
- // Use the function
36
- const resolvedIssues = await getResolvedIssuesForNewsletter();
37
- ```
38
-
39
- **Note**: The `getResolvedIssuesForNewsletter()` function automatically:
40
- - Finds the most recent newsletter date from existing files
41
- - Uses that date as the starting point to fetch issues resolved AFTER that date
42
- - If no newsletter files exist, falls back to last 7 days
43
- - Returns ALL closed issues - AI agent decides what to include
44
-
45
- ### Step 2: Intelligent Categorization & Filtering
46
- **AI Agent does creative analysis**:
47
-
48
- 1. **Go through each resolved issue** and make editorial decisions:
49
- - Is this user-facing or internal?
50
- - Is this a feature, improvement, or bug fix?
51
- - Is this worth highlighting to users?
52
- - How should this be described to non-technical users?
53
-
54
- 2. **Filter out internal-only issues**:
55
- - Admin dashboards, monitoring, analytics (internal tools)
56
- - Database backups, devops improvements
57
- - CI/CD, deployment automation
58
- - Developer tools, debugging features
59
- - Documentation updates, dependency updates
60
- - **API route fixes, endpoint refactoring, code structure changes**
61
- - **Environment variable updates, configuration file changes**
62
- - **Developer setup improvements, build process updates**
63
- - **Internal bug fixes that don't impact user experience**
64
- - Any change without user-facing impact
65
-
66
- 3. **Categorize remaining issues**:
67
- - **Features**: Adds NEW capability users didn't have before
68
- - **Improvements**: Makes existing functionality better/faster/easier
69
- - **Bug Fixes**: Fixes something that was broken
70
-
71
- 4. **Select hero feature** (optional):
72
- - Pick the MOST impactful feature or improvement
73
- - Must have clear user value and ideally a quantifiable impact statement
74
-
75
- ### Step 3: Write Compelling Content
76
- **AI Agent writes newsletter content** - be creative, exciting, and user-focused!
77
-
78
- **Guidelines**:
79
- - **NO TECHNICAL JARGON**: Don't mention internal systems, code, or technical details
80
- - **USER VALUE FOCUS**: Describe what the user can now do, not how it works
81
- - **ACTIVE, EXCITING LANGUAGE**: "You can now...", "The AI Agent now automatically...", "Your calendar finally..."
82
- - **QUANTIFY IMPACT**: "85% reduction in...", "5 hours saved per week", "3x faster"
83
- - **CREATE FOMO**: "Current users are already...", "Join 500+ executives who..."
84
-
85
- **For each item, write**:
86
- - **Title**: Short, benefit-focused (e.g., "Smart Timezone Detection" not "Implement timezone handling")
87
- - **Description**: What the user can do now, why it matters (2-3 sentences)
88
- - **Impact** (optional): Quantified benefit or user testimonial
89
-
90
- **Example**:
91
- ```json
92
- {
93
- "title": "Work Hours & Focus Blocks on Your Calendar",
94
- "description": "Your work hours and focus blocks now automatically appear as visual blocks on your calendar! No more scheduling conflicts during your protected time. The AI creates beautiful calendar events that sync across all your devices, making it crystal clear when you're available and when you're in deep work mode.",
95
- "impact": "Users report 85% reduction in meeting conflicts during focus time. Your calendar finally shows the complete picture of your day!"
96
- }
97
- ```
98
-
99
- ### Step 4: Generate Newsletter JSON
100
- **AI Agent creates ONE file**:
101
- - File: `docs/customer-development/newsletters/newsletter-YYYY-MM-DD.json`
102
- - Format: Structured JSON for deterministic rendering
103
- - Contains ALL content ready for user review
104
-
105
- **File format** (JSON):
106
- ```json
107
- {
108
- "metadata": {
109
- "generatedOn": "2025-11-01T00:00:00.000Z",
110
- "weekStart": "2025-10-25",
111
- "weekEnd": "2025-11-01",
112
- ...
113
- },
114
- "content": {
115
- "weekTitle": "Work Hours & Focus Blocks Now on Your Calendar! 🎯",
116
- "weekSubtitle": "8 powerful updates that supercharge your productivity",
117
- "weekDate": "Oct 25 - Nov 1, 2025",
118
- "openingMessage": "This week has been HUGE! We've shipped game-changing features that make the AI Agent even more powerful at protecting your time and managing your schedule. Current users are already saving hours every week - here's what you've been missing! 🚀",
119
- "heroFeature": { ... },
120
- "newFeatures": [ ... ],
121
- "improvements": [ ... ],
122
- "bugFixes": [ ... ],
123
- "testimonial": {
124
- "text": "The AI saved me 5 hours this week just by protecting my focus blocks...",
125
- "author": "Sid Mathur",
126
- "role": "Founder"
127
- },
128
- "comingNext": "Next week: Voice commands for calendar management, smart meeting summaries...",
129
- "ctaLink": "https://example.com/wellness/ai-agent",
130
- "ctaText": "Start Your Free Trial"
131
- }
132
- }
133
- ```
134
-
135
- ### Step 5: Generate HTML
136
- // Import helper functions directly from synced location
137
- const os = require('os');
138
- const path = require('path');
139
- const scriptsDir = path.join(os.homedir(), '.fraim', 'scripts');
140
- const scriptPath = path.join(scriptsDir, 'newsletter-helpers.ts');
141
-
142
- const { saveNewsletter } = await import(scriptPath);
143
-
144
- // 2. Save newsletter JSON and generate HTML
145
- const savedPath = saveNewsletter(newsletter);
146
- ```
147
-
148
- **This function will**:
149
- - Save the JSON file
150
- - Generate beautiful HTML from the template
151
- - Save the HTML file
152
- - Return path to JSON file
153
-
154
- ### Step 6: User Review
155
- **AI Agent**:
156
- 1. **Points user to the generated file**: `docs/customer-development/newsletters/newsletter-YYYY-MM-DD.json`
157
- 2. **Shows preview**: Points to HTML file for browser preview
158
- 3. **Requests review** and any edits needed (user can edit JSON directly)
159
- 4. **Waits for user approval** before proceeding
160
-
161
- **Note**: User can:
162
- - Edit titles to be more compelling
163
- - Add/remove items
164
- - Adjust descriptions
165
- - Add real testimonials (verify authenticity!)
166
- - Add "coming next" teaser
167
-
168
- ### Step 7: Send Newsletter (Separate Command)
169
- **When user says "Send the newsletter" or similar**:
170
-
171
- **User runs deterministic script**:
172
- ```bash
173
- npm run send-newsletter
174
- ```
175
-
176
- // Import helper functions directly from synced location
177
- const os = require('os');
178
- const path = require('path');
179
- const scriptsDir = path.join(os.homedir(), '.fraim', 'scripts');
180
- const scriptPath = path.join(scriptsDir, 'newsletter-helpers.ts');
181
-
182
- const { sendNewsletterToExecutives } = await import(scriptPath);
183
-
184
- // 2. Send newsletter to all active executives
185
- await sendNewsletterToExecutives('docs/customer-development/newsletters/newsletter-2025-11-01.json');
186
- ```
187
-
188
- **This function will**:
189
- - Load the approved newsletter JSON
190
- - Get all active executives from database
191
- - For each executive:
192
- - Get their AI Agent email address
193
- - Get their OAuth tokens
194
- - Send personalized newsletter from their AI identity
195
- - Log results and exit
196
-
197
- ## NEWSLETTER STRUCTURE
198
-
199
- ### Hero Section
200
- - **Week Title**: Catchy title based on hero feature or main theme
201
- - **Subtitle**: Count of updates
202
- - **Stats Banner**: Features | Improvements | Bug Fixes counters
203
-
204
- ### Content Sections
205
- 1. **Opening Message**: Exciting intro about what shipped (AI agent writes this)
206
- 2. **Hero Feature** (optional): Spotlights the most impactful change with red "HERO FEATURE" badge
207
- 3. **New Capabilities**: Major new features added
208
- 4. **Major Improvements**: Significant enhancements
209
- 5. **Fixes & Polish**: Bug fixes and minor improvements
210
- 6. **Testimonial** (optional): Real user quote about impact (VERIFY AUTHENTICITY)
211
- 7. **Coming Next** (optional): Preview of upcoming features
212
-
213
- ### Call-to-Actions
214
- - **FOMO CTA**: "Don't Miss Out!" with signup link
215
- - **Feedback CTA**: Link to ChatGPT interface
216
-
217
- ## EDITORIAL GUIDELINES
218
-
219
- ### What to Include ✅
220
- - New features that add capability for users
221
- - Improvements that save time or improve UX
222
- - Bug fixes that had user impact
223
- - Real user testimonials (ONLY - verify authenticity)
224
- - Quantified benefits (time saved, conflicts reduced, etc.)
225
-
226
- ### What to Exclude ❌
227
- - Internal infrastructure changes
228
- - **Admin dashboards, monitoring, analytics (internal-only)**
229
- - **Backups, database operations, devops**
230
- - **API route fixes, duplicate endpoint resolution**
231
- - **Environment configuration, .env file updates**
232
- - **Developer setup scripts, build configuration**
233
- - CI/CD improvements
234
- - Documentation updates
235
- - Dependency updates
236
- - Technical debt cleanup
237
- - Developer tools and debugging features
238
- - **Internal bug fixes (code structure, not user experience)**
239
- - Issues without user-facing impact
240
- - **FAKE TESTIMONIALS - authenticity is critical**
241
-
242
- **Rule of thumb**: If the user wouldn't notice the change in their daily use of the AI Assistant, don't include it.
243
-
244
- ### Writing Style
245
-
246
- **Titles:**
247
- - Short, punchy, benefit-focused
248
- - ❌ "Implement timezone handling in calendar service"
249
- - ✅ "Smart Timezone Detection"
250
-
251
- **Descriptions:**
252
- - Start with the benefit to the user
253
- - Use "you" and "your" to make it personal
254
- - Be specific about what changed
255
- - ❌ "Fixed bug where calendar events weren't syncing correctly"
256
- - ✅ "Your calendar now stays perfectly in sync across all devices, no more mysterious missing meetings!"
257
-
258
- **Impact Statements:**
259
- - Quantify whenever possible
260
- - Include real user feedback
261
- - ❌ "Improved performance"
262
- - ✅ "Calendar loads 3x faster, getting you to your day in seconds instead of minutes"
263
-
264
- ### Creating FOMO
265
-
266
- - **Quantify Success**: "500+ executives already using this feature"
267
- - **Show Savings**: "Don't miss out on 5 hours saved per week"
268
- - **Create Urgency**: "Limited spots available"
269
- - **Social Proof**: Real testimonials, growth stats, company names (with permission)
270
-
271
- ## EXAMPLES
272
-
273
- ### Example 1: Feature-Rich Week
274
- ```
275
- User: "Generate this week's newsletter"
276
-
277
- AI Agent:
278
- 1. Calls getResolvedIssuesForNewsletter() → gets 15 issues
279
- 2. Analyzes each issue:
280
- - 3 user-facing features
281
- - 5 improvements
282
- - 2 bugs
283
- - 5 internal/devops (FILTERED OUT)
284
- 3. Writes compelling content for each item
285
- 4. Selects "Voice Commands for Calendar" as hero feature
286
- 5. Writes exciting opening: "This week has been HUGE!..."
287
- 6. Creates newsletter JSON with all content
288
- 7. Calls saveNewsletter() → generates HTML
289
- 8. Shows preview: "Newsletter ready! docs/customer-development/newsletters/newsletter-2025-11-01.html"
290
-
291
- User: "Looks great, send it"
292
-
293
- AI Agent or User:
294
- Runs: npm run send-newsletter
295
- OR
296
- Calls: sendNewsletterToExecutives('newsletter-2025-11-01.json')
297
- ```
298
-
299
- ### Example 2: User Adds Testimonial
300
- ```
301
- User: "Generate newsletter"
302
-
303
- AI Agent:
304
- [Creates newsletter with 5 improvements, no testimonial]
305
-
306
- User: "Add a testimonial from me - I saved 5 hours this week thanks to focus blocks"
307
-
308
- AI Agent:
309
- [Edits JSON to add testimonial with user's name]
310
- [Regenerates HTML]
311
- Shows: "Updated! Ready to send?"
312
-
313
- User: "Yes, send it"
314
-
315
- User runs: npm run send-newsletter
316
- ```
317
-
318
- ## TIPS FOR COMPELLING NEWSLETTERS
319
-
320
- ### Highlight User Value
321
- - Focus on what users can DO, not how it works
322
- - "You can now..." not "We implemented..."
323
- - "Your calendar automatically..." not "The system now..."
324
-
325
- ### Use Concrete Examples
326
- - "Schedule meetings in seconds" not "Faster scheduling"
327
- - "85% fewer conflicts" not "Better conflict detection"
328
- - "Save 5 hours per week" not "More efficient"
329
-
330
- ### Create Narrative
331
- - Opening: "This week has been incredible!"
332
- - Hero feature: Build excitement around main change
333
- - Coming next: Build anticipation for next week
334
-
335
- ### Make it Scannable
336
- - Short paragraphs (2-3 sentences max)
337
- - Clear section headers
338
- - Visual hierarchy with emojis and formatting
339
- - Impact callouts that stand out
340
-
341
- ## QUALITY CHECKLIST
342
-
343
- Before approving newsletter, verify:
344
- - [ ] All items are user-facing (no internal/devops features)
345
- - [ ] Testimonials are real and verified
346
- - [ ] Impact statements are accurate and quantified
347
- - [ ] Descriptions focus on user value, not implementation
348
- - [ ] Opening message is exciting and FOMO-inducing
349
- - [ ] Links are correct (Azure signup URL)
350
- - [ ] No mention of API credits or costs (the service is free)
351
- - [ ] Grammar and spelling are perfect
352
- - [ ] Preview HTML looks beautiful in browser
353
-
354
- ## FREQUENCY
355
-
356
- **Recommended**: Weekly, sent Monday morning
357
- - Catches people starting their week
358
- - Fresh in mind for decision-making
359
- - Consistent schedule builds anticipation
360
-
361
- **Alternative**: Bi-weekly if weekly feels too frequent
362
-
363
- **Special editions**:
364
- - Major feature launches
365
- - Milestone celebrations (e.g., "100 users!")
366
- - Holiday/end-of-year roundups
@@ -1,310 +0,0 @@
1
- # Cloud Deployment Workflow
2
-
3
- ## Overview
4
- This workflow guides agents through deploying an application to cloud platforms (Azure, AWS, GCP), including infrastructure setup, CI/CD configuration, and database initialization.
5
-
6
- ## Prerequisites
7
- - Application is implemented and tested
8
- - Cloud platform account access
9
- - Understanding of chosen cloud platform
10
- - GitHub repository (for CI/CD)
11
-
12
- ## Workflow Steps
13
-
14
- ### Phase 1: Platform Selection
15
-
16
- 1. **Evaluate Options**
17
- Consider:
18
- - **Cost**: Free tier availability, pricing structure
19
- - **Features**: Required services (hosting, database, storage)
20
- - **Ease of Use**: Setup complexity, documentation quality
21
- - **Scalability**: Future growth requirements
22
-
23
- 2. **Common Platform Choices**
24
- - **Azure**: Good for Microsoft ecosystem, free tier available
25
- - **AWS**: Most comprehensive, free tier available
26
- - **GCP**: Good for Google services, free tier available
27
- - **Vercel/Netlify**: Simple for frontend, limited backend options
28
-
29
- 3. **Resource Planning**
30
- - **Hosting**: App Service, EC2, Cloud Run, etc.
31
- - **Database**: Cosmos DB, RDS, Cloud SQL, etc.
32
- - **Storage**: Blob Storage, S3, Cloud Storage
33
- - **Networking**: CDN, load balancer (if needed)
34
-
35
- ### Phase 2: Infrastructure Setup
36
-
37
- 1. **Create Resource Group/Project**
38
- ```bash
39
- # Azure
40
- az group create --name <resource-group> --location <region>
41
-
42
- # AWS
43
- aws ec2 create-vpc ...
44
-
45
- # GCP
46
- gcloud projects create <project-id>
47
- ```
48
-
49
- 2. **Create Database**
50
- ```bash
51
- # Azure Cosmos DB
52
- az cosmosdb create --name <db-name> --resource-group <rg> ...
53
-
54
- # AWS RDS
55
- aws rds create-db-instance ...
56
-
57
- # GCP Cloud SQL
58
- gcloud sql instances create <instance-name> ...
59
- ```
60
-
61
- 3. **Create Hosting Service**
62
- ```bash
63
- # Azure App Service
64
- az webapp create --name <app-name> --resource-group <rg> ...
65
-
66
- # AWS Elastic Beanstalk
67
- eb init ...
68
-
69
- # GCP Cloud Run
70
- gcloud run deploy ...
71
- ```
72
-
73
- 4. **Configure Networking**
74
- - Set up database firewall rules
75
- - Configure CORS if needed
76
- - Set up custom domains (if needed)
77
-
78
- ### Phase 3: CI/CD Pipeline Setup
79
-
80
- 1. **GitHub Actions Workflow**
81
- Create `.github/workflows/deploy.yml`:
82
- ```yaml
83
- name: Deploy to Cloud
84
-
85
- on:
86
- push:
87
- branches: [main]
88
-
89
- jobs:
90
- deploy:
91
- runs-on: ubuntu-latest
92
- steps:
93
- - uses: actions/checkout@v3
94
- - name: Setup Node.js
95
- uses: actions/setup-node@v3
96
- - name: Install dependencies
97
- run: npm ci
98
- - name: Build
99
- run: npm run build
100
- - name: Deploy
101
- uses: azure/webapps-deploy@v2
102
- with:
103
- app-name: <app-name>
104
- publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
105
- ```
106
-
107
- 2. **Configure Secrets**
108
- - Store publish profiles/credentials in GitHub Secrets
109
- - Store connection strings securely
110
- - Never commit secrets to repository
111
-
112
- 3. **Test Deployment**
113
- - Push to trigger deployment
114
- - Monitor deployment logs
115
- - Verify application is accessible
116
-
117
- ### Phase 4: Environment Configuration
118
-
119
- 1. **Environment Variables**
120
- Set in cloud platform:
121
- - `NODE_ENV=production`
122
- - `MONGO_DATABASE_URL=<connection-string>`
123
- - `API_URL=<api-endpoint>`
124
- - Any other required variables
125
-
126
- 2. **Connection Strings**
127
- - Get database connection string from cloud platform
128
- - Configure in application settings
129
- - Test connection
130
-
131
- 3. **Build Configuration**
132
- - Ensure build process works in CI/CD
133
- - Check that all dependencies are in package.json
134
- - Verify build outputs are correct
135
-
136
- ### Phase 5: Database Initialization
137
-
138
- 1. **Create Database**
139
- ```bash
140
- # MongoDB/Cosmos DB
141
- az cosmosdb mongodb database create \
142
- --account-name <account> \
143
- --resource-group <rg> \
144
- --name <database-name>
145
- ```
146
-
147
- 2. **Run Seed Script**
148
- ```bash
149
- # Set connection string
150
- export MONGO_DATABASE_URL="<connection-string>"
151
-
152
- # Run seed (with CLEAR_DB=false to preserve data)
153
- npm run seed
154
- ```
155
-
156
- 3. **Verify Data**
157
- - Check database has expected collections
158
- - Verify seed data was created
159
- - Test application can read data
160
-
161
- ### Phase 6: Deployment Validation
162
-
163
- 1. **Health Check**
164
- - Verify application is running
165
- - Check health endpoint
166
- - Verify database connection
167
-
168
- 2. **Functional Testing**
169
- - Test key user flows
170
- - Verify API endpoints work
171
- - Check frontend loads correctly
172
-
173
- 3. **Error Monitoring**
174
- - Check application logs
175
- - Monitor for errors
176
- - Verify error handling works
177
-
178
- ## Platform-Specific Guides
179
-
180
- ### Azure Deployment
181
-
182
- 1. **Create Resources**
183
- ```bash
184
- # Resource Group
185
- az group create --name <rg> --location westus
186
-
187
- # Cosmos DB
188
- az cosmosdb create --name <db> --resource-group <rg> --server-version 4.2
189
-
190
- # App Service Plan
191
- az appservice plan create --name <plan> --resource-group <rg> --sku FREE
192
-
193
- # Web App
194
- az webapp create --name <app> --resource-group <rg> --plan <plan>
195
- ```
196
-
197
- 2. **Configure App Settings**
198
- ```bash
199
- az webapp config appsettings set \
200
- --name <app> \
201
- --resource-group <rg> \
202
- --settings MONGO_DATABASE_URL="<connection-string>"
203
- ```
204
-
205
- 3. **Deploy via GitHub Actions**
206
- - Use `azure/webapps-deploy` action
207
- - Store publish profile in secrets
208
- - Configure workflow to build and deploy
209
-
210
- ### AWS Deployment
211
-
212
- 1. **Create Resources**
213
- ```bash
214
- # RDS Instance
215
- aws rds create-db-instance ...
216
-
217
- # Elastic Beanstalk
218
- eb init
219
- eb create
220
- ```
221
-
222
- 2. **Configure Environment**
223
- - Set environment variables in EB console
224
- - Configure security groups
225
- - Set up IAM roles
226
-
227
- ### GCP Deployment
228
-
229
- 1. **Create Resources**
230
- ```bash
231
- # Cloud SQL
232
- gcloud sql instances create <instance> ...
233
-
234
- # Cloud Run
235
- gcloud run deploy <service> ...
236
- ```
237
-
238
- ## Best Practices
239
-
240
- 1. **Start Simple**: Use free tiers initially
241
- 2. **Secure Secrets**: Never commit credentials
242
- 3. **Monitor Costs**: Set up billing alerts
243
- 4. **Test Locally**: Test deployment process locally first
244
- 5. **Version Control**: Keep infrastructure as code
245
-
246
- ## Common Challenges
247
-
248
- 1. **Connection Issues**: Database not accessible
249
- - **Solution**: Check firewall rules, verify connection strings
250
-
251
- 2. **Build Failures**: CI/CD build fails
252
- - **Solution**: Test build locally, check all dependencies committed
253
-
254
- 3. **Environment Variables**: App can't find variables
255
- - **Solution**: Verify variable names, check platform-specific requirements
256
-
257
- 4. **Database Initialization**: Seed script doesn't run
258
- - **Solution**: Run manually first, check connection, verify script works
259
-
260
- 5. **Static File Serving (SPA Routing)**: Frontend routes return 404
261
- - **Symptom**: API works (`/api/health` returns OK) but frontend routes show "Not Found"
262
- - **Root Cause**: Path resolution for static files incorrect in deployment environment
263
- - **Solution for Express/Node.js**:
264
- ```javascript
265
- // Use process.cwd() for path resolution in deployment
266
- // In deployment, process.cwd() is the root of the deployment package
267
- const distPath = path.join(process.cwd(), 'dist')
268
- app.use(express.static(distPath))
269
-
270
- // Serve React app for all non-API routes (SPA routing)
271
- app.get('*', (req, res) => {
272
- if (req.path.startsWith('/api')) {
273
- return res.status(404).json({ error: 'Not found' })
274
- }
275
- res.sendFile(path.join(distPath, 'index.html'))
276
- })
277
- ```
278
- - **Verification**:
279
- - Check that `dist/` directory exists in deployment package
280
- - Verify `index.html` is in `dist/` directory
281
- - Test that non-API routes serve `index.html`
282
- - Test that API routes still work correctly
283
-
284
- ## Output Artifacts
285
-
286
- 1. **Infrastructure Documentation**
287
- - Resources created
288
- - Configuration details
289
- - Connection information
290
-
291
- 2. **CI/CD Workflow**
292
- - GitHub Actions workflow file
293
- - Deployment process documentation
294
-
295
- 3. **Deployment Checklist**
296
- - Steps completed
297
- - Issues encountered
298
- - Solutions applied
299
-
300
- ## Next Steps
301
-
302
- After completing this workflow, proceed to:
303
- - **Iterative Improvement Cycle** workflow (`workflows/quality-assurance/iterative-improvement-cycle.md`) (recommended for systematic validation)
304
- - **Browser Validation & Iteration** workflow (`workflows/quality-assurance/browser-validation.md`)
305
- - Monitor application in production
306
-
307
- ## Related Workflows
308
- - `workflows/quality-assurance/iterative-improvement-cycle.md` - **Recommended**: Systematic review-critique-fix-validate cycle
309
- - `workflows/replicate/re-implementation-strategy.md`
310
- - `workflows/quality-assurance/browser-validation.md`
@@ -1,32 +0,0 @@
1
- # Workflow: Contribute to FRAIM
2
-
3
- **Path:** `workflows/improve-fraim/contribute.md`
4
-
5
- ---
6
-
7
- # Contribute Workflow
8
-
9
- ## INTENT
10
- Allows users to contribute new workflow ideas back to the FRAIM project. The agent collects necessary information and files a GitHub issue with the contribution details.
11
-
12
- ## STEPS
13
-
14
- ### Step 1: Gather Information
15
- 1. Ask the user for the **Workflow Name**.
16
- - Example: "What is the name of the workflow you would like to contribute?"
17
- 2. Ask the user for the **Recommended Prompt** / Description.
18
- - Example: "Please provide the recommended prompt or a detailed description of what this workflow should do."
19
-
20
- ### Step 2: Confirmation
21
- Confirm the details with the user before proceeding.
22
- - "I am about to file a contribution for workflow '{workflow_name}' with the following prompt: '{workflow_prompt}'. Is this correct?"
23
-
24
- ### Step 3: Execute Contribution
25
- Call the `file_issue` tool with the details gathered.
26
-
27
- - `title`: `"[CONTRIBUTION]: {workflow_name}"`
28
- - `body`: `"{workflow_prompt}"`
29
- - `labels`: `["enhancement", "workflow"]`
30
-
31
- ### Step 4: Completion
32
- Notify the user that the issue has been filed successfully. Summarize the information (title and body) that was filed. Do not provide the issue number or URL.