fraim-framework 2.0.65 → 2.0.67
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.
- package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +101 -0
- package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +235 -0
- package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +243 -0
- package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +206 -0
- package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +73 -0
- package/dist/registry/ai-manager-rules/design-phases/design-design.md +145 -0
- package/dist/registry/ai-manager-rules/design-phases/design.md +108 -0
- package/dist/registry/ai-manager-rules/design-phases/finalize.md +60 -0
- package/dist/registry/ai-manager-rules/design-phases/validate.md +125 -0
- package/dist/registry/ai-manager-rules/design.json +97 -0
- package/dist/registry/ai-manager-rules/implement-phases/code.md +323 -0
- package/dist/registry/ai-manager-rules/implement-phases/completeness-review.md +94 -0
- package/dist/registry/ai-manager-rules/implement-phases/finalize.md +177 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +283 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +120 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +173 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +104 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +100 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +237 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +121 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +375 -0
- package/dist/registry/ai-manager-rules/implement-phases/quality-review.md +304 -0
- package/dist/registry/ai-manager-rules/implement-phases/regression.md +159 -0
- package/dist/registry/ai-manager-rules/implement-phases/repro.md +101 -0
- package/dist/registry/ai-manager-rules/implement-phases/scoping.md +93 -0
- package/dist/registry/ai-manager-rules/implement-phases/smoke.md +225 -0
- package/dist/registry/ai-manager-rules/implement-phases/spike.md +118 -0
- package/dist/registry/ai-manager-rules/implement-phases/validate.md +347 -0
- package/dist/registry/ai-manager-rules/implement.json +153 -0
- package/dist/registry/ai-manager-rules/retrospective.md +116 -0
- package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +188 -0
- package/dist/registry/ai-manager-rules/shared-phases/finalize.md +169 -0
- package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +202 -0
- package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +170 -0
- package/dist/registry/ai-manager-rules/spec-phases/finalize.md +60 -0
- package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +105 -0
- package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +66 -0
- package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +139 -0
- package/dist/registry/ai-manager-rules/spec-phases/spec.md +102 -0
- package/dist/registry/ai-manager-rules/spec-phases/validate.md +118 -0
- package/dist/registry/ai-manager-rules/spec.json +112 -0
- package/dist/registry/ai-manager-rules/test.json +98 -0
- package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +60 -0
- package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +23 -0
- package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +22 -0
- package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +21 -0
- package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +19 -0
- package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +15 -0
- package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +45 -0
- package/dist/registry/delivery/address-feedback.md +83 -0
- package/dist/registry/delivery/retrospective.md +78 -0
- package/dist/registry/delivery/submit.md +79 -0
- package/dist/registry/providers/ado.json +19 -0
- package/dist/registry/providers/delivery-conversation.json +9 -0
- package/dist/registry/providers/delivery-pr.json +9 -0
- package/dist/registry/providers/github.json +19 -0
- package/dist/registry/rules/agent-success-criteria.md +101 -0
- package/dist/registry/rules/agent-testing-guidelines.md +502 -0
- package/dist/registry/rules/architecture.md +126 -0
- package/dist/registry/rules/communication.md +122 -0
- package/dist/registry/rules/continuous-learning.md +55 -0
- package/dist/registry/rules/debugging-multitenancy-issues.md +85 -0
- package/dist/registry/rules/ephemeral-execution.md +54 -0
- package/dist/registry/rules/git-safe-commands.md +34 -0
- package/dist/registry/rules/hitl-ppe-record-analysis.md +302 -0
- package/dist/registry/rules/integrity-and-test-ethics.md +275 -0
- package/dist/registry/rules/local-development.md +275 -0
- package/dist/registry/rules/mandatory-pre-completion-reflection.md +193 -0
- package/dist/registry/rules/merge-requirements.md +238 -0
- package/dist/registry/rules/simplicity.md +118 -0
- package/dist/registry/rules/software-development-lifecycle.md +105 -0
- package/dist/registry/rules/spike-first-development.md +205 -0
- package/dist/registry/rules/successful-debugging-patterns.md +488 -0
- package/dist/registry/scripts/build-scripts-generator.js +205 -0
- package/dist/registry/scripts/cleanup-branch.js +287 -0
- package/dist/registry/scripts/evaluate-code-quality.js +66 -0
- package/dist/registry/scripts/exec-with-timeout.js +142 -0
- package/dist/registry/scripts/fraim-config.js +61 -0
- package/dist/registry/scripts/generate-engagement-emails.js +705 -0
- package/dist/registry/scripts/generic-issues-api.js +100 -0
- package/dist/registry/scripts/newsletter-helpers.js +671 -0
- package/dist/registry/scripts/openapi-generator.js +664 -0
- package/dist/registry/scripts/performance/profile-server.js +390 -0
- package/dist/registry/scripts/profile-server.js +389 -0
- package/dist/registry/scripts/run-thank-you-workflow.js +92 -0
- package/dist/registry/scripts/send-newsletter-simple.js +85 -0
- package/dist/registry/scripts/send-thank-you-emails.js +54 -0
- package/dist/registry/scripts/validate-openapi-limits.js +311 -0
- package/dist/registry/scripts/validate-test-coverage.js +262 -0
- package/dist/registry/scripts/verify-test-coverage.js +66 -0
- package/dist/registry/stubs/workflows/azure/cost-optimization.md +11 -0
- package/dist/registry/stubs/workflows/bootstrap/create-architecture.md +11 -0
- package/dist/registry/stubs/workflows/bootstrap/detect-broken-windows.md +11 -0
- package/dist/registry/stubs/workflows/bootstrap/evaluate-code-quality.md +11 -0
- package/dist/registry/stubs/workflows/bootstrap/verify-test-coverage.md +11 -0
- package/dist/registry/stubs/workflows/brainstorming/blue-sky-brainstorming.md +11 -0
- package/dist/registry/stubs/workflows/brainstorming/codebase-brainstorming.md +11 -0
- package/dist/registry/stubs/workflows/business-development/create-business-plan.md +11 -0
- package/dist/registry/stubs/workflows/business-development/ideate-business-opportunity.md +11 -0
- package/dist/registry/stubs/workflows/business-development/price-product.md +18 -0
- package/dist/registry/stubs/workflows/compliance/detect-compliance-requirements.md +11 -0
- package/dist/registry/stubs/workflows/compliance/generate-audit-evidence.md +11 -0
- package/dist/registry/stubs/workflows/compliance/soc2-evidence-generator.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/insight-analysis.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/insight-triage.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/interview-preparation.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/linkedin-outreach.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/strategic-brainstorming.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/thank-customers.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/user-survey-dispatch.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/users-to-target.md +11 -0
- package/dist/registry/stubs/workflows/customer-development/weekly-newsletter.md +11 -0
- package/dist/registry/stubs/workflows/deploy/cloud-deployment.md +11 -0
- package/dist/registry/stubs/workflows/improve-fraim/contribute.md +11 -0
- package/dist/registry/stubs/workflows/improve-fraim/file-issue.md +11 -0
- package/dist/registry/stubs/workflows/learning/build-skillset.md +11 -0
- package/dist/registry/stubs/workflows/learning/synthesize-learnings.md +11 -0
- package/dist/registry/stubs/workflows/legal/contract-review-analysis.md +11 -0
- package/dist/registry/stubs/workflows/legal/nda.md +11 -0
- package/dist/registry/stubs/workflows/legal/patent-filing.md +11 -0
- package/dist/registry/stubs/workflows/legal/saas-contract-development.md +11 -0
- package/dist/registry/stubs/workflows/legal/trademark-filing.md +11 -0
- package/dist/registry/stubs/workflows/marketing/content-creation.md +11 -0
- package/dist/registry/stubs/workflows/marketing/convert-to-pdf.md +11 -0
- package/dist/registry/stubs/workflows/marketing/create-modern-website.md +11 -0
- package/dist/registry/stubs/workflows/marketing/domain-registration.md +11 -0
- package/dist/registry/stubs/workflows/marketing/evangelize.md +11 -0
- package/dist/registry/stubs/workflows/marketing/hbr-article.md +11 -0
- package/dist/registry/stubs/workflows/marketing/launch-checklist.md +11 -0
- package/dist/registry/stubs/workflows/marketing/marketing-strategy.md +11 -0
- package/dist/registry/stubs/workflows/marketing/storytelling.md +11 -0
- package/dist/registry/stubs/workflows/performance/analyze-performance.md +11 -0
- package/dist/registry/stubs/workflows/product-building/design.md +11 -0
- package/dist/registry/stubs/workflows/product-building/implement.md +11 -0
- package/dist/registry/stubs/workflows/product-building/iterate-on-pr-comments.md +11 -0
- package/dist/registry/stubs/workflows/product-building/prep-issue.md +11 -0
- package/dist/registry/stubs/workflows/product-building/prototype.md +11 -0
- package/dist/registry/stubs/workflows/product-building/resolve.md +11 -0
- package/dist/registry/stubs/workflows/product-building/retrospect.md +11 -0
- package/dist/registry/stubs/workflows/product-building/spec.md +11 -0
- package/dist/registry/stubs/workflows/product-building/test.md +11 -0
- package/dist/registry/stubs/workflows/productivity-report/productivity-report.md +11 -0
- package/dist/registry/stubs/workflows/quality-assurance/browser-validation.md +11 -0
- package/dist/registry/stubs/workflows/quality-assurance/iterative-improvement-cycle.md +11 -0
- package/dist/registry/stubs/workflows/replicate/replicate-discovery.md +11 -0
- package/dist/registry/stubs/workflows/replicate/replicate-to-issues.md +11 -0
- package/dist/registry/stubs/workflows/reviewer/review-implementation-vs-design-spec.md +11 -0
- package/dist/registry/stubs/workflows/reviewer/review-implementation-vs-feature-spec.md +11 -0
- package/dist/registry/stubs/workflows/startup-credits/aws-activate-application.md +11 -0
- package/dist/registry/stubs/workflows/startup-credits/google-cloud-application.md +11 -0
- package/dist/registry/stubs/workflows/startup-credits/microsoft-azure-application.md +11 -0
- package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +53 -0
- package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +37 -0
- package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +35 -0
- package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +29 -0
- package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +126 -0
- package/dist/registry/templates/customer-development/customer-interview-template.md +99 -0
- package/dist/registry/templates/customer-development/customer-persona-template.md +69 -0
- package/dist/registry/templates/customer-development/follow-up-email-templates.md +132 -0
- package/dist/registry/templates/customer-development/insight-analysis-template.md +74 -0
- package/dist/registry/templates/customer-development/prospect-inventory-template.csv +3 -0
- package/dist/registry/templates/customer-development/search-strategy-template.md +123 -0
- package/dist/registry/templates/customer-development/strategic-recommendations-template.md +53 -0
- package/dist/registry/templates/customer-development/thank-you-email-template.html +124 -0
- package/dist/registry/templates/customer-development/thank-you-note-template.md +16 -0
- package/dist/registry/templates/customer-development/triage-log-template.md +278 -0
- package/dist/registry/templates/customer-development/weekly-newsletter-template.html +204 -0
- package/dist/registry/templates/evidence/Design-Evidence.md +30 -0
- package/dist/registry/templates/evidence/Implementation-BugEvidence.md +122 -0
- package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +160 -0
- package/dist/registry/templates/evidence/Spec-Evidence.md +19 -0
- package/dist/registry/templates/help/HelpNeeded.md +14 -0
- package/dist/registry/templates/legal/NDA-TEMPLATE.md +170 -0
- package/dist/registry/templates/legal/PATENT-TEMPLATE.md +372 -0
- package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +339 -0
- package/dist/registry/templates/legal/contract-review-checklist.md +193 -0
- package/dist/registry/templates/legal/review-report-template.md +198 -0
- package/dist/registry/templates/legal/saas-terms-template.md +174 -0
- package/dist/registry/templates/legal/sow-template.md +117 -0
- package/dist/registry/templates/legal/template-variables.md +131 -0
- package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +194 -0
- package/dist/registry/templates/marketing/EVANGELIZE-TEMPLATE.md +102 -0
- package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +66 -0
- package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +130 -0
- package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +262 -0
- package/dist/registry/templates/marketing/github-pages-workflow.yml +64 -0
- package/dist/registry/templates/replicate/implementation-checklist.md +39 -0
- package/dist/registry/templates/replicate/use-cases-template.md +88 -0
- package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +55 -0
- package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +37 -0
- package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +66 -0
- package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +39 -0
- package/dist/registry/workflows/azure/cost-optimization.md +772 -0
- package/dist/registry/workflows/bootstrap/create-architecture.md +37 -0
- package/dist/registry/workflows/bootstrap/detect-broken-windows.md +300 -0
- package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +35 -0
- package/dist/registry/workflows/bootstrap/verify-test-coverage.md +36 -0
- package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +211 -0
- package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +159 -0
- package/dist/registry/workflows/business-development/create-business-plan.md +737 -0
- package/dist/registry/workflows/business-development/ideate-business-opportunity.md +55 -0
- package/dist/registry/workflows/business-development/price-product.md +325 -0
- package/dist/registry/workflows/compliance/detect-compliance-requirements.md +80 -0
- package/dist/registry/workflows/compliance/generate-audit-evidence.md +80 -0
- package/dist/registry/workflows/compliance/soc2-evidence-generator.md +332 -0
- package/dist/registry/workflows/customer-development/insight-analysis.md +156 -0
- package/dist/registry/workflows/customer-development/insight-triage.md +933 -0
- package/dist/registry/workflows/customer-development/interview-preparation.md +452 -0
- package/dist/registry/workflows/customer-development/linkedin-outreach.md +599 -0
- package/dist/registry/workflows/customer-development/strategic-brainstorming.md +146 -0
- package/dist/registry/workflows/customer-development/thank-customers.md +203 -0
- package/dist/registry/workflows/customer-development/user-survey-dispatch.md +312 -0
- package/dist/registry/workflows/customer-development/users-to-target.md +427 -0
- package/dist/registry/workflows/customer-development/weekly-newsletter.md +366 -0
- package/dist/registry/workflows/deploy/cloud-deployment.md +310 -0
- package/dist/registry/workflows/improve-fraim/contribute.md +32 -0
- package/dist/registry/workflows/improve-fraim/file-issue.md +32 -0
- package/dist/registry/workflows/learning/build-skillset.md +212 -0
- package/dist/registry/workflows/learning/synthesize-learnings.md +369 -0
- package/dist/registry/workflows/legal/contract-review-analysis.md +382 -0
- package/dist/registry/workflows/legal/nda.md +69 -0
- package/dist/registry/workflows/legal/patent-filing.md +76 -0
- package/dist/registry/workflows/legal/saas-contract-development.md +204 -0
- package/dist/registry/workflows/legal/trademark-filing.md +77 -0
- package/dist/registry/workflows/marketing/content-creation.md +40 -0
- package/dist/registry/workflows/marketing/convert-to-pdf.md +265 -0
- package/dist/registry/workflows/marketing/create-modern-website.md +456 -0
- package/dist/registry/workflows/marketing/domain-registration.md +323 -0
- package/dist/registry/workflows/marketing/evangelize.md +426 -0
- package/dist/registry/workflows/marketing/hbr-article.md +73 -0
- package/dist/registry/workflows/marketing/launch-checklist.md +37 -0
- package/dist/registry/workflows/marketing/marketing-strategy.md +45 -0
- package/dist/registry/workflows/marketing/storytelling.md +65 -0
- package/dist/registry/workflows/performance/analyze-performance.md +65 -0
- package/dist/registry/workflows/product-building/design.md +263 -0
- package/dist/registry/workflows/product-building/implement.md +771 -0
- package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +70 -0
- package/dist/registry/workflows/product-building/prep-issue.md +41 -0
- package/dist/registry/workflows/product-building/prototype.md +60 -0
- package/dist/registry/workflows/product-building/resolve.md +175 -0
- package/dist/registry/workflows/product-building/retrospect.md +86 -0
- package/dist/registry/workflows/product-building/spec.md +303 -0
- package/dist/registry/workflows/product-building/test.md +125 -0
- package/dist/registry/workflows/productivity-report/productivity-report.md +263 -0
- package/dist/registry/workflows/quality-assurance/browser-validation.md +221 -0
- package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +562 -0
- package/dist/registry/workflows/replicate/replicate-discovery.md +336 -0
- package/dist/registry/workflows/replicate/replicate-to-issues.md +319 -0
- package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +694 -0
- package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +734 -0
- package/dist/registry/workflows/startup-credits/aws-activate-application.md +535 -0
- package/dist/registry/workflows/startup-credits/google-cloud-application.md +647 -0
- package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +538 -0
- package/package.json +2 -1
|
@@ -0,0 +1,366 @@
|
|
|
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
|
|
@@ -0,0 +1,310 @@
|
|
|
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`
|
|
@@ -0,0 +1,32 @@
|
|
|
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.
|