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.
- package/CHANGELOG.md +10 -0
- package/bin/fraim-mcp.js +14 -0
- package/bin/fraim.js +23 -0
- package/dist/src/cli/commands/init-project.js +10 -4
- package/dist/src/cli/commands/mcp.js +65 -0
- package/dist/src/cli/setup/mcp-config-generator.js +19 -16
- package/dist/src/fraim/issue-tracking/ado-provider.js +304 -0
- package/dist/src/fraim/issue-tracking/factory.js +63 -0
- package/dist/src/fraim/issue-tracking/github-provider.js +200 -0
- package/dist/src/fraim/issue-tracking/types.js +7 -0
- package/dist/src/fraim/issue-tracking-config.js +83 -0
- package/dist/src/local-mcp-server/stdio-server.js +207 -0
- package/dist/src/utils/workflow-parser.js +81 -0
- package/package.json +17 -12
- package/registry/scripts/pdf-styles.css +172 -0
- package/registry/scripts/prep-issue.sh +46 -4
- package/registry/scripts/profile-server.ts +131 -130
- package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +1 -1
- package/registry/stubs/workflows/customer-development/users-to-target.md +1 -1
- package/registry/stubs/workflows/product-building/design.md +1 -1
- package/registry/stubs/workflows/product-building/implement.md +1 -1
- package/Claude.md +0 -1
- package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +0 -101
- package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +0 -235
- package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +0 -243
- package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +0 -206
- package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
- package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
- package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
- package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
- package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
- package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
- package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
- package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
- package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
- package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
- package/dist/registry/ai-manager-rules/retrospective.md +0 -116
- package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
- package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
- package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
- package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
- package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
- package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
- package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +0 -60
- package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +0 -23
- package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +0 -22
- package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +0 -21
- package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +0 -19
- package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +0 -15
- package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +0 -45
- package/dist/registry/providers/ado.json +0 -19
- package/dist/registry/providers/github.json +0 -19
- package/dist/registry/scripts/cleanup-branch.js +0 -287
- package/dist/registry/scripts/evaluate-code-quality.js +0 -66
- package/dist/registry/scripts/exec-with-timeout.js +0 -142
- package/dist/registry/scripts/generate-engagement-emails.js +0 -705
- package/dist/registry/scripts/newsletter-helpers.js +0 -671
- package/dist/registry/scripts/profile-server.js +0 -388
- package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
- package/dist/registry/scripts/send-newsletter-simple.js +0 -85
- package/dist/registry/scripts/send-thank-you-emails.js +0 -54
- package/dist/registry/scripts/validate-openapi-limits.js +0 -311
- package/dist/registry/scripts/validate-test-coverage.js +0 -262
- package/dist/registry/scripts/verify-test-coverage.js +0 -66
- package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
- package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
- package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
- package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
- package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
- package/dist/registry/templates/customer-development/customer-interview-template.md +0 -99
- package/dist/registry/templates/customer-development/customer-persona-template.md +0 -69
- package/dist/registry/templates/customer-development/follow-up-email-templates.md +0 -132
- package/dist/registry/templates/customer-development/insight-analysis-template.md +0 -74
- package/dist/registry/templates/customer-development/prospect-inventory-template.csv +0 -3
- package/dist/registry/templates/customer-development/search-strategy-template.md +0 -123
- package/dist/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
- package/dist/registry/templates/customer-development/thank-you-email-template.html +0 -124
- package/dist/registry/templates/customer-development/thank-you-note-template.md +0 -16
- package/dist/registry/templates/customer-development/triage-log-template.md +0 -278
- package/dist/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
- package/dist/registry/templates/evidence/Design-Evidence.md +0 -30
- package/dist/registry/templates/evidence/Implementation-BugEvidence.md +0 -94
- package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -129
- package/dist/registry/templates/evidence/Spec-Evidence.md +0 -19
- package/dist/registry/templates/help/HelpNeeded.md +0 -14
- package/dist/registry/templates/legal/NDA-TEMPLATE.md +0 -170
- package/dist/registry/templates/legal/PATENT-TEMPLATE.md +0 -372
- package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +0 -339
- package/dist/registry/templates/legal/contract-review-checklist.md +0 -193
- package/dist/registry/templates/legal/review-report-template.md +0 -198
- package/dist/registry/templates/legal/saas-terms-template.md +0 -174
- package/dist/registry/templates/legal/sow-template.md +0 -117
- package/dist/registry/templates/legal/template-variables.md +0 -131
- package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +0 -194
- package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
- package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +0 -130
- package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +0 -262
- package/dist/registry/templates/marketing/github-pages-workflow.yml +0 -64
- package/dist/registry/templates/replicate/implementation-checklist.md +0 -39
- package/dist/registry/templates/replicate/use-cases-template.md +0 -88
- package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
- package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
- package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -66
- package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
- package/dist/registry/workflows/bootstrap/create-architecture.md +0 -38
- package/dist/registry/workflows/bootstrap/detect-broken-windows.md +0 -300
- package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +0 -35
- package/dist/registry/workflows/bootstrap/verify-test-coverage.md +0 -36
- package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +0 -211
- package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +0 -165
- package/dist/registry/workflows/business-development/create-business-plan.md +0 -737
- package/dist/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
- package/dist/registry/workflows/business-development/price-product.md +0 -325
- package/dist/registry/workflows/compliance/detect-compliance-requirements.md +0 -78
- package/dist/registry/workflows/compliance/generate-audit-evidence.md +0 -75
- package/dist/registry/workflows/compliance/soc2-evidence-generator.md +0 -332
- package/dist/registry/workflows/customer-development/insight-analysis.md +0 -156
- package/dist/registry/workflows/customer-development/insight-triage.md +0 -938
- package/dist/registry/workflows/customer-development/interview-preparation.md +0 -452
- package/dist/registry/workflows/customer-development/linkedin-outreach.md +0 -593
- package/dist/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
- package/dist/registry/workflows/customer-development/thank-customers.md +0 -203
- package/dist/registry/workflows/customer-development/user-survey-dispatch.md +0 -60
- package/dist/registry/workflows/customer-development/users-to-target.md +0 -112
- package/dist/registry/workflows/customer-development/weekly-newsletter.md +0 -366
- package/dist/registry/workflows/deploy/cloud-deployment.md +0 -310
- package/dist/registry/workflows/improve-fraim/contribute.md +0 -32
- package/dist/registry/workflows/improve-fraim/file-issue.md +0 -32
- package/dist/registry/workflows/learning/build-skillset.md +0 -212
- package/dist/registry/workflows/learning/synthesize-learnings.md +0 -284
- package/dist/registry/workflows/legal/contract-review-analysis.md +0 -382
- package/dist/registry/workflows/legal/nda.md +0 -69
- package/dist/registry/workflows/legal/patent-filing.md +0 -76
- package/dist/registry/workflows/legal/saas-contract-development.md +0 -213
- package/dist/registry/workflows/legal/trademark-filing.md +0 -77
- package/dist/registry/workflows/marketing/content-creation.md +0 -37
- package/dist/registry/workflows/marketing/convert-to-pdf.md +0 -235
- package/dist/registry/workflows/marketing/create-modern-website.md +0 -456
- package/dist/registry/workflows/marketing/domain-registration.md +0 -323
- package/dist/registry/workflows/marketing/hbr-article.md +0 -73
- package/dist/registry/workflows/marketing/launch-checklist.md +0 -37
- package/dist/registry/workflows/marketing/marketing-strategy.md +0 -45
- package/dist/registry/workflows/marketing/storytelling.md +0 -65
- package/dist/registry/workflows/performance/analyze-performance.md +0 -65
- package/dist/registry/workflows/product-building/design.md +0 -103
- package/dist/registry/workflows/product-building/implement.md +0 -74
- package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
- package/dist/registry/workflows/product-building/prep-issue.md +0 -41
- package/dist/registry/workflows/product-building/prototype.md +0 -65
- package/dist/registry/workflows/product-building/resolve.md +0 -168
- package/dist/registry/workflows/product-building/retrospect.md +0 -86
- package/dist/registry/workflows/product-building/spec.md +0 -181
- package/dist/registry/workflows/product-building/test.md +0 -125
- package/dist/registry/workflows/productivity-report/productivity-report.md +0 -263
- package/dist/registry/workflows/quality-assurance/browser-validation.md +0 -221
- package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
- package/dist/registry/workflows/replicate/replicate-discovery.md +0 -336
- package/dist/registry/workflows/replicate/replicate-to-issues.md +0 -324
- package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -638
- package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -675
- package/dist/registry/workflows/startup-credits/aws-activate-application.md +0 -535
- package/dist/registry/workflows/startup-credits/google-cloud-application.md +0 -647
- package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
- package/dist/scripts/build-stub-registry.js +0 -108
- package/dist/src/ai-manager/ai-manager.js +0 -480
- package/dist/src/ai-manager/phase-flow.js +0 -357
- package/dist/src/ai-manager/types.js +0 -5
- package/dist/src/fraim-mcp-server.js +0 -1885
- package/dist/tests/debug-tools.js +0 -80
- package/dist/tests/shared-server-utils.js +0 -57
- package/dist/tests/test-add-ide.js +0 -283
- package/dist/tests/test-ai-coach-edge-cases.js +0 -420
- package/dist/tests/test-ai-coach-mcp-integration.js +0 -450
- package/dist/tests/test-ai-coach-performance.js +0 -328
- package/dist/tests/test-ai-coach-phase-content.js +0 -264
- package/dist/tests/test-ai-coach-workflows.js +0 -514
- package/dist/tests/test-cli.js +0 -228
- package/dist/tests/test-client-scripts-validation.js +0 -167
- package/dist/tests/test-complete-setup-flow.js +0 -110
- package/dist/tests/test-config-system.js +0 -279
- package/dist/tests/test-debug-session.js +0 -134
- package/dist/tests/test-end-to-end-hybrid-validation.js +0 -328
- package/dist/tests/test-enhanced-session-init.js +0 -188
- package/dist/tests/test-first-run-journey.js +0 -368
- package/dist/tests/test-fraim-issues.js +0 -59
- package/dist/tests/test-genericization.js +0 -44
- package/dist/tests/test-hybrid-script-execution.js +0 -340
- package/dist/tests/test-ide-detector.js +0 -46
- package/dist/tests/test-improved-setup.js +0 -121
- package/dist/tests/test-mcp-config-generator.js +0 -99
- package/dist/tests/test-mcp-connection.js +0 -107
- package/dist/tests/test-mcp-issue-integration.js +0 -156
- package/dist/tests/test-mcp-lifecycle-methods.js +0 -240
- package/dist/tests/test-mcp-shared-server.js +0 -308
- package/dist/tests/test-mcp-template-processing.js +0 -160
- package/dist/tests/test-modular-issue-tracking.js +0 -165
- package/dist/tests/test-node-compatibility.js +0 -95
- package/dist/tests/test-npm-install.js +0 -68
- package/dist/tests/test-package-size.js +0 -108
- package/dist/tests/test-pr-review-workflow.js +0 -307
- package/dist/tests/test-prep-issue.js +0 -129
- package/dist/tests/test-productivity-integration.js +0 -157
- package/dist/tests/test-script-location-independence.js +0 -198
- package/dist/tests/test-script-sync.js +0 -557
- package/dist/tests/test-server-utils.js +0 -32
- package/dist/tests/test-session-rehydration.js +0 -148
- package/dist/tests/test-setup-integration.js +0 -98
- package/dist/tests/test-setup-scenarios.js +0 -322
- package/dist/tests/test-standalone.js +0 -143
- package/dist/tests/test-stub-registry.js +0 -136
- package/dist/tests/test-sync-stubs.js +0 -143
- package/dist/tests/test-sync-version-update.js +0 -93
- package/dist/tests/test-telemetry.js +0 -193
- package/dist/tests/test-token-validator.js +0 -30
- package/dist/tests/test-user-journey.js +0 -236
- package/dist/tests/test-users-to-target-workflow.js +0 -253
- package/dist/tests/test-utils.js +0 -109
- package/dist/tests/test-wizard.js +0 -71
- package/dist/tests/test-workflow-discovery.js +0 -242
- package/labels.json +0 -52
- package/registry/agent-guardrails.md +0 -63
- package/registry/fraim.md +0 -48
- package/setup.js +0 -171
- package/tsconfig.json +0 -23
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Phase 1: Survey Question Formulation (Scoping)
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
Define the survey's goals, target audience characteristics, and formulate a set of refined questions optimized for audience segmentation and actionable insights.
|
|
5
|
-
|
|
6
|
-
## Key Questions to Ask
|
|
7
|
-
|
|
8
|
-
### Goal Alignment
|
|
9
|
-
1. "What is the single most important thing you want to learn from this survey?"
|
|
10
|
-
2. "How will the answers to these questions change your product roadmap or strategy?"
|
|
11
|
-
3. "Are you looking for qualitative feedback (stories/pain points) or quantitative data (stats/preferences)?"
|
|
12
|
-
|
|
13
|
-
### Audience Definition
|
|
14
|
-
4. "Who specifically should be answering this survey? (Job titles, interests, communities)"
|
|
15
|
-
5. "What background knowledge should the respondent have?"
|
|
16
|
-
|
|
17
|
-
### Question Design
|
|
18
|
-
6. "Which question will help you disqualify respondents who are NOT in your target market?"
|
|
19
|
-
7. "How can we phrase these questions to avoid leading the witness or bias?"
|
|
20
|
-
8. "What specific 'demographic' or 'psychographic' data points do you need (e.g., industry, company size, frequency of problem)?"
|
|
21
|
-
|
|
22
|
-
## Validation Criteria
|
|
23
|
-
|
|
24
|
-
### Scope Definition
|
|
25
|
-
- [ ] Primary research goal clearly articulated.
|
|
26
|
-
- [ ] Target segment defined with specific characteristics.
|
|
27
|
-
- [ ] Success metrics for the survey (e.g., number of responses, specific insights) established.
|
|
28
|
-
|
|
29
|
-
### Question Quality
|
|
30
|
-
- [ ] Disqualification question included to filter non-target respondents.
|
|
31
|
-
- [ ] Questions are open-ended for qualitative phases.
|
|
32
|
-
- [ ] Binary or Scale-based questions included for quantitative phases.
|
|
33
|
-
- [ ] Total number of questions is limited to maximize completion rates (usually < 5 for social polls).
|
|
34
|
-
|
|
35
|
-
## Evidence Required
|
|
36
|
-
|
|
37
|
-
### Survey Plan Document
|
|
38
|
-
Create: `docs/surveys/51-survey-plan.md`
|
|
39
|
-
|
|
40
|
-
**Required Sections:**
|
|
41
|
-
- Research Objectives
|
|
42
|
-
- Target Audience Profile
|
|
43
|
-
- Core Survey Questions
|
|
44
|
-
- Platform-Specific Variation Strategy
|
|
45
|
-
- Success Metrics
|
|
46
|
-
|
|
47
|
-
## Common Pitfalls
|
|
48
|
-
|
|
49
|
-
### Too Many Questions
|
|
50
|
-
- **Problem**: Asking 10+ questions on a social media post.
|
|
51
|
-
- **Better**: Focus on 1-3 high-impact questions for social polls, linking to a longer survey only for highly engaged users.
|
|
52
|
-
|
|
53
|
-
### Broad or Vague Questions
|
|
54
|
-
- **Problem**: "Do you like our idea?" (Yields "Yes" which is not actionable).
|
|
55
|
-
- **Better**: "In the last 30 days, how many hours did you spend on [specific task]?"
|
|
56
|
-
|
|
57
|
-
## Next Steps
|
|
58
|
-
Once validation criteria are met:
|
|
59
|
-
1. **Proceed to Phase 2**: Building for LinkedIn.
|
|
60
|
-
2. **Review survey plan** with the founder to ensure alignment.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Phase 2: Building for LinkedIn
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
Generate LinkedIn-optimized survey content, including professional post copy and poll options, tailored to the platform's career-focused audience.
|
|
5
|
-
|
|
6
|
-
## Key Actions
|
|
7
|
-
1. **Optimize for Feed**: Write a hook that stops the scroll for professionals.
|
|
8
|
-
2. **Poll Configuration**: Define clear, mutually exclusive poll options.
|
|
9
|
-
3. **Hashtag Strategy**: Identify 3-5 high-reach professional hashtags.
|
|
10
|
-
4. **Call to Action**: Encourage comments for deeper qualitative feedback.
|
|
11
|
-
|
|
12
|
-
## Validation Criteria
|
|
13
|
-
- [ ] Post copy is professional and clear.
|
|
14
|
-
- [ ] Poll options fit within LinkedIn's character limits (30 chars per option).
|
|
15
|
-
- [ ] Post length is optimal for mobile readability.
|
|
16
|
-
- [ ] CTA (Call to Action) is explicit.
|
|
17
|
-
|
|
18
|
-
## Evidence Required
|
|
19
|
-
- **LinkedIn Survey Doc**: `docs/surveys/51-linkedin-survey.md`
|
|
20
|
-
- **Mock Preview**: `docs/feature specs/mocks/51-linkedin-survey-mock.html` (verified vs requirement)
|
|
21
|
-
|
|
22
|
-
## Next Steps
|
|
23
|
-
Proceed to Phase 3: Building for Reddit.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Phase 3: Building for Reddit
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
Generate Reddit-specific posts for targeted subreddits, ensuring compliance with community rules and "Reddiquette."
|
|
5
|
-
|
|
6
|
-
## Key Actions
|
|
7
|
-
1. **Subreddit Selection**: Identify 2-3 specific subreddits (e.g., /r/startups, /r/SaaS).
|
|
8
|
-
2. **Rule Verification**: Read the "About" section or Wiki of target subreddits to check rules on surveys/polls.
|
|
9
|
-
3. **Conversational Tone**: Use a less formal, more community-oriented tone.
|
|
10
|
-
4. **Value First**: Explicitly state why the community should care or how the results will be shared back.
|
|
11
|
-
|
|
12
|
-
## Validation Criteria
|
|
13
|
-
- [ ] Post copy matches the tone of the target subreddit.
|
|
14
|
-
- [ ] Subreddit rules on self-promotion/surveys have been checked.
|
|
15
|
-
- [ ] Link to external survey (if used) is clear.
|
|
16
|
-
|
|
17
|
-
## Evidence Required
|
|
18
|
-
- **Reddit Survey Doc**: `docs/surveys/51-reddit-survey.md`
|
|
19
|
-
- **Subreddit List**: Documented in the survey doc with specific rules for each.
|
|
20
|
-
|
|
21
|
-
## Next Steps
|
|
22
|
-
Proceed to Phase 4: Building for X.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Phase 4: Building for X (Twitter)
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
Generate short-form, high-engagement content for X, including poll copy or threaded questions.
|
|
5
|
-
|
|
6
|
-
## Key Actions
|
|
7
|
-
1. **Brevity**: Ensure copy fits within character limits (280 for free, or longer for Premium).
|
|
8
|
-
2. **Engagement Hook**: Create a concise "Question of the Day" format.
|
|
9
|
-
3. **Poll Duration**: Recommend optimal poll duration (e.g., 24 hours or 7 days).
|
|
10
|
-
4. **Visuals**: Suggest or generate an accompanying image if a poll isn't used.
|
|
11
|
-
|
|
12
|
-
## Validation Criteria
|
|
13
|
-
- [ ] Copy is within character limits.
|
|
14
|
-
- [ ] Poll options are clear and 25 characters or less.
|
|
15
|
-
- [ ] Content is "retweetable" (viral potential).
|
|
16
|
-
|
|
17
|
-
## Evidence Required
|
|
18
|
-
- **X Survey Doc**: `docs/surveys/51-x-survey.md`
|
|
19
|
-
|
|
20
|
-
## Next Steps
|
|
21
|
-
Proceed to Phase 5: Building for Facebook.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Phase 5: Building for Facebook
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
Generate content for Facebook Groups or Profiles, focusing on community engagement and personal networking.
|
|
5
|
-
|
|
6
|
-
## Key Actions
|
|
7
|
-
1. **Group Identification**: List target Facebook Groups.
|
|
8
|
-
2. **Contextual Hook**: Frame the survey as a "seeking advice" post for the community.
|
|
9
|
-
3. **Admin Check**: Remind the user to check with Group Admins if required.
|
|
10
|
-
|
|
11
|
-
## Validation Criteria
|
|
12
|
-
- [ ] Tone is helpful and collaborative.
|
|
13
|
-
- [ ] Post includes a clear prompt for comments.
|
|
14
|
-
|
|
15
|
-
## Evidence Required
|
|
16
|
-
- **Facebook Survey Doc**: `docs/surveys/51-facebook-survey.md`
|
|
17
|
-
|
|
18
|
-
## Next Steps
|
|
19
|
-
Proceed to Phase 6: Custom Platform Build.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Phase 6: Custom Platform Build
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
Assess the need for additional platforms (Discord, Slack, Instagram) and generate custom copy accordingly.
|
|
5
|
-
|
|
6
|
-
## Key Actions
|
|
7
|
-
1. **Identify Gaps**: Review if the core 4 platforms reach the target audience effectively.
|
|
8
|
-
2. **Custom Format**: Adapt copy for Slack/Discord (markdown-heavy) or Instagram (visual-heavy).
|
|
9
|
-
3. **Execution Plan**: Define how these supplementary surveys should be dispatched.
|
|
10
|
-
|
|
11
|
-
## Validation Criteria
|
|
12
|
-
- [ ] User confirms no more platforms are needed OR custom copy is generated.
|
|
13
|
-
|
|
14
|
-
## Next Steps
|
|
15
|
-
Proceed to Phase 7: Dispatch & Automated Execution.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Phase 7: Dispatch & Automated Execution
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
Execute the survey distribution across the prepared platforms using browser automation (Playwright).
|
|
5
|
-
|
|
6
|
-
## Agent Instructions (Playwright)
|
|
7
|
-
|
|
8
|
-
**CRITICAL**: Use Playwright MCP tools to interact with platforms. Do NOT rely on hard-coded selectors. Use your intelligence to find buttons and fields by role or label.
|
|
9
|
-
|
|
10
|
-
### General Dispatch Process
|
|
11
|
-
1. **Navigate**: Go to the platform URL.
|
|
12
|
-
2. **Login Verification**: Check if the user is logged in.
|
|
13
|
-
- If NOT logged in: **Pause and ask the user to log in manually** in the browser.
|
|
14
|
-
3. **Drafting**: Locate the "Start a post" or "Create post" button.
|
|
15
|
-
4. **Filling**: Enter the copy generated in Phases 2-5.
|
|
16
|
-
5. **Poll Creation**: Click the "Add Poll" button if applicable and fill in options.
|
|
17
|
-
6. **Execution**: **Pause and ask for user confirmation** before clicking "Post".
|
|
18
|
-
|
|
19
|
-
## Platform-Specific Guidance
|
|
20
|
-
|
|
21
|
-
### LinkedIn
|
|
22
|
-
- Look for `button[name="Start a post"]`.
|
|
23
|
-
- Click "Create a poll" icon.
|
|
24
|
-
- Enter questions and options.
|
|
25
|
-
|
|
26
|
-
### Reddit
|
|
27
|
-
- Navigate to the specific subreddit URL (e.g., `reddit.com/r/SaaS/submit`).
|
|
28
|
-
- Select "Poll" or "Post" tab.
|
|
29
|
-
- Enter title and body.
|
|
30
|
-
|
|
31
|
-
### X (Twitter)
|
|
32
|
-
- Locate the "Post" button or the large "What is happening?!" textbox.
|
|
33
|
-
- Click the "Poll" icon.
|
|
34
|
-
|
|
35
|
-
## Validation Criteria
|
|
36
|
-
- [ ] Post successfully drafted on the target platform.
|
|
37
|
-
- [ ] Screenshot of the "Ready to Post" state shared with the user.
|
|
38
|
-
- [ ] User has explicitly clicked "Confirm" or given permission to click "Post".
|
|
39
|
-
|
|
40
|
-
## Evidence Required
|
|
41
|
-
- **Screenshot**: `docs/evidence/screenshots/[platform]-ready-to-post-{timestamp}.png`
|
|
42
|
-
- **Execution Log**: Mentioned in the chat.
|
|
43
|
-
|
|
44
|
-
## Next Steps
|
|
45
|
-
The User Survey Dispatch workflow is complete once all platforms are posted.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"get_issue": "mcp_ado_get_work_item({ organization: '{{repository.organization}}', project: '{{repository.project}}', workItemId: {{issue_number}} })",
|
|
3
|
-
"update_issue_status": "mcp_ado_update_work_item({ organization: '{{repository.organization}}', project: '{{repository.project}}', workItemId: {{issue_number}}, state: 'Active' })",
|
|
4
|
-
"create_pr": "mcp_ado_create_pull_request({ organization: '{{repository.organization}}', project: '{{repository.project}}', repository: '{{repository.name}}', title: '{{title}}', sourceBranch: '{{branch}}', targetBranch: 'main', description: '{{body}}' })",
|
|
5
|
-
"get_pr": "mcp_ado_get_pull_request({ organization: '{{repository.organization}}', project: '{{repository.project}}', repository: '{{repository.name}}', pullRequestId: {{pr_number}} })",
|
|
6
|
-
"get_pr_comments": "mcp_ado_get_pr_comments({ organization: '{{repository.organization}}', project: '{{repository.project}}', repository: '{{repository.name}}', pullRequestId: {{pr_number}} })",
|
|
7
|
-
"get_pr_review_comments": "mcp_ado_get_pr_review_comments({ organization: '{{repository.organization}}', project: '{{repository.project}}', repository: '{{repository.name}}', pullRequestId: {{pr_number}} })",
|
|
8
|
-
"get_pr_reviews": "mcp_ado_get_pr_reviews({ organization: '{{repository.organization}}', project: '{{repository.project}}', repository: '{{repository.name}}', pullRequestId: {{pr_number}} })",
|
|
9
|
-
"add_pr_comment": "mcp_ado_add_pr_comment({ organization: '{{repository.organization}}', project: '{{repository.project}}', repository: '{{repository.name}}', pullRequestId: {{pr_number}}, content: '{{comment}}' })",
|
|
10
|
-
"merge_pr": "mcp_ado_merge_pull_request({ organization: '{{repository.organization}}', project: '{{repository.project}}', repository: '{{repository.name}}', pullRequestId: {{pr_number}} })",
|
|
11
|
-
"create_branch": "git checkout -b feature/{{issue_number}}-{{slug}}",
|
|
12
|
-
"switch_branch": "git checkout {{branch}}",
|
|
13
|
-
"commit_changes": "git add . && git commit -m '{{message}}'",
|
|
14
|
-
"push_branch": "git push origin {{branch}}",
|
|
15
|
-
"list_issues": "mcp_ado_list_work_items({ organization: '{{repository.organization}}', project: '{{repository.project}}', state: 'Active' })",
|
|
16
|
-
"create_issue": "mcp_ado_create_work_item({ organization: '{{repository.organization}}', project: '{{repository.project}}', workItemType: 'Bug', title: '{{title}}', description: '{{body}}' })",
|
|
17
|
-
"add_issue_comment": "mcp_ado_add_work_item_comment({ organization: '{{repository.organization}}', project: '{{repository.project}}', workItemId: {{issue_number}}, text: '{{comment}}' })",
|
|
18
|
-
"assign_issue": "mcp_ado_update_work_item({ organization: '{{repository.organization}}', project: '{{repository.project}}', workItemId: {{issue_number}}, assignedTo: '{{assignee}}' })"
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"get_issue": "mcp_github_issue_read({ owner: '{{repository.owner}}', repo: '{{repository.name}}', issue_number: {{issue_number}}, method: 'get' })",
|
|
3
|
-
"update_issue_status": "mcp_github_issue_write({ owner: '{{repository.owner}}', repo: '{{repository.name}}', issue_number: {{issue_number}}, method: 'update', labels: ['status:in-progress'] })",
|
|
4
|
-
"create_pr": "mcp_github_create_pull_request({ owner: '{{repository.owner}}', repo: '{{repository.name}}', title: '{{title}}', head: '{{branch}}', base: 'main', body: '{{body}}' })",
|
|
5
|
-
"get_pr": "mcp_github_pull_request_read({ owner: '{{repository.owner}}', repo: '{{repository.name}}', pullNumber: {{pr_number}}, method: 'get' })",
|
|
6
|
-
"get_pr_comments": "mcp_github_pull_request_read({ owner: '{{repository.owner}}', repo: '{{repository.name}}', pullNumber: {{pr_number}}, method: 'get_comments' })",
|
|
7
|
-
"get_pr_review_comments": "mcp_github_pull_request_read({ owner: '{{repository.owner}}', repo: '{{repository.name}}', pullNumber: {{pr_number}}, method: 'get_review_comments' })",
|
|
8
|
-
"get_pr_reviews": "mcp_github_pull_request_read({ owner: '{{repository.owner}}', repo: '{{repository.name}}', pullNumber: {{pr_number}}, method: 'get_reviews' })",
|
|
9
|
-
"add_pr_comment": "mcp_github_add_issue_comment({ owner: '{{repository.owner}}', repo: '{{repository.name}}', issue_number: {{pr_number}}, body: '{{comment}}' })",
|
|
10
|
-
"merge_pr": "mcp_github_merge_pull_request({ owner: '{{repository.owner}}', repo: '{{repository.name}}', pullNumber: {{pr_number}} })",
|
|
11
|
-
"create_branch": "git checkout -b feature/{{issue_number}}-{{slug}}",
|
|
12
|
-
"switch_branch": "git checkout {{branch}}",
|
|
13
|
-
"commit_changes": "git add . && git commit -m '{{message}}'",
|
|
14
|
-
"push_branch": "git push origin {{branch}}",
|
|
15
|
-
"list_issues": "mcp_github_list_issues({ owner: '{{repository.owner}}', repo: '{{repository.name}}', state: 'OPEN' })",
|
|
16
|
-
"create_issue": "mcp_github_issue_write({ owner: '{{repository.owner}}', repo: '{{repository.name}}', method: 'create', title: '{{title}}', body: '{{body}}' })",
|
|
17
|
-
"add_issue_comment": "mcp_github_add_issue_comment({ owner: '{{repository.owner}}', repo: '{{repository.name}}', issue_number: {{issue_number}}, body: '{{comment}}' })",
|
|
18
|
-
"assign_issue": "mcp_github_issue_write({ owner: '{{repository.owner}}', repo: '{{repository.name}}', issue_number: {{issue_number}}, method: 'update', assignees: ['{{assignee}}'] })"
|
|
19
|
-
}
|
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env npx tsx
|
|
2
|
-
"use strict";
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
|
-
const fs_1 = require("fs");
|
|
9
|
-
const path_1 = require("path");
|
|
10
|
-
const dotenv_1 = __importDefault(require("dotenv"));
|
|
11
|
-
// Load environment variables
|
|
12
|
-
dotenv_1.default.config({ override: true });
|
|
13
|
-
// Self-contained utility functions (no FRAIM internal imports)
|
|
14
|
-
function extractIssueNumber(branchName) {
|
|
15
|
-
const match = branchName.match(/(\d+)/);
|
|
16
|
-
return match ? match[1] : '';
|
|
17
|
-
}
|
|
18
|
-
function getCurrentGitBranch() {
|
|
19
|
-
try {
|
|
20
|
-
return (0, child_process_1.execSync)('git branch --show-current', { encoding: 'utf8' }).trim();
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
return 'unknown';
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function loadClientConfig() {
|
|
27
|
-
const configPath = (0, path_1.join)(process.cwd(), '.fraim', 'config.json');
|
|
28
|
-
if (!(0, fs_1.existsSync)(configPath)) {
|
|
29
|
-
throw new Error('.fraim/config.json not found. Run fraim init first.');
|
|
30
|
-
}
|
|
31
|
-
return JSON.parse((0, fs_1.readFileSync)(configPath, 'utf-8'));
|
|
32
|
-
}
|
|
33
|
-
function getEnvOr(keys, fallback) {
|
|
34
|
-
for (const key of keys) {
|
|
35
|
-
const value = process.env[key];
|
|
36
|
-
if (value && value.length)
|
|
37
|
-
return value;
|
|
38
|
-
}
|
|
39
|
-
return fallback;
|
|
40
|
-
}
|
|
41
|
-
class BranchCleanup {
|
|
42
|
-
constructor(options = {}) {
|
|
43
|
-
this.options = {
|
|
44
|
-
branchName: options.branchName,
|
|
45
|
-
force: options.force || false,
|
|
46
|
-
skipProjectCleanup: options.skipProjectCleanup || false,
|
|
47
|
-
skipGit: options.skipGit || false,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
async insertYourCodeHere(branchName) {
|
|
51
|
-
const branchPattern = "branch_" + extractIssueNumber(branchName) + "%";
|
|
52
|
-
this.log(`Attempting to fetch and run DB cleanup for pattern: ${branchPattern}`);
|
|
53
|
-
// Historically this called: npx tsx scripts/database/cleanup-mongo-schemas.ts
|
|
54
|
-
// In FRAIM 2.0, we should fetch it if possible, or skip if it's an internal-only script
|
|
55
|
-
// that doesn't exist in the registry but was incorrectly referenced.
|
|
56
|
-
// NOTE: In this specific case, cleanup-mongo-schemas.ts is likely an internal script.
|
|
57
|
-
// If it's not in the registry, get_fraim_file will fail.
|
|
58
|
-
// For now, we fix the path to be more agnostic or explicitly documented as a dependency.
|
|
59
|
-
try {
|
|
60
|
-
// NOTE: Users should define their own cleanup script location in .fraim/config.json
|
|
61
|
-
// or the agent should fetch it. For now, we try to run it from a standard location
|
|
62
|
-
// if it exists, but we don't hardcode it as a requirement for the script to run.
|
|
63
|
-
const cleanupScript = process.env.FRAIM_PROJECT_CLEANUP_SCRIPT || (['scripts', 'database', 'cleanup-mongo-schemas.ts'].join('/'));
|
|
64
|
-
this.log(`Checking for project cleanup script: ${cleanupScript}`);
|
|
65
|
-
await this.executeCommand(`npx tsx ${cleanupScript} "${branchPattern}"`, 'Run project-specific cleanup script');
|
|
66
|
-
}
|
|
67
|
-
catch (e) {
|
|
68
|
-
this.log('Skipping project-specific cleanup (script not found or failed).', 'info');
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
log(message, level = 'info') {
|
|
72
|
-
const timestamp = new Date().toISOString();
|
|
73
|
-
const prefix = {
|
|
74
|
-
info: 'โน๏ธ ',
|
|
75
|
-
warn: 'โ ๏ธ ',
|
|
76
|
-
error: 'โ',
|
|
77
|
-
success: 'โ
'
|
|
78
|
-
}[level];
|
|
79
|
-
console.log(`${prefix} [${timestamp}] ${message}`);
|
|
80
|
-
}
|
|
81
|
-
async executeCommand(command, description) {
|
|
82
|
-
this.log(`Executing: ${description}`);
|
|
83
|
-
try {
|
|
84
|
-
const result = (0, child_process_1.execSync)(command, {
|
|
85
|
-
encoding: 'utf8',
|
|
86
|
-
stdio: 'pipe',
|
|
87
|
-
cwd: process.cwd()
|
|
88
|
-
});
|
|
89
|
-
this.log(`Success: ${description}`, 'success');
|
|
90
|
-
return result;
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
this.log(`Failed: ${description} - ${error.message}`, 'error');
|
|
94
|
-
throw error;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
async getCurrentBranch() {
|
|
98
|
-
try {
|
|
99
|
-
const result = await this.executeCommand('git branch --show-current', 'Get current branch');
|
|
100
|
-
return result.trim();
|
|
101
|
-
}
|
|
102
|
-
catch (error) {
|
|
103
|
-
this.log('Could not determine current branch', 'warn');
|
|
104
|
-
return 'unknown';
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
async getBranchName() {
|
|
108
|
-
if (this.options.branchName) {
|
|
109
|
-
return this.options.branchName;
|
|
110
|
-
}
|
|
111
|
-
const currentBranch = await this.getCurrentBranch();
|
|
112
|
-
if (currentBranch === 'master' || currentBranch === 'main') {
|
|
113
|
-
throw new Error('Cannot cleanup master/main branch. Please specify a feature branch name.');
|
|
114
|
-
}
|
|
115
|
-
return currentBranch;
|
|
116
|
-
}
|
|
117
|
-
async checkBranchExists(branchName, remote = false) {
|
|
118
|
-
try {
|
|
119
|
-
const command = remote
|
|
120
|
-
? `git ls-remote --heads origin ${branchName}`
|
|
121
|
-
: `git branch --list ${branchName}`;
|
|
122
|
-
const result = await this.executeCommand(command, `Check if ${remote ? 'remote' : 'local'} branch exists`);
|
|
123
|
-
return result.trim().length > 0;
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
async doProjectSpecificCleanup(branchName) {
|
|
130
|
-
try {
|
|
131
|
-
if (this.options.skipProjectCleanup) {
|
|
132
|
-
this.log('Skipping project-specific cleanup', 'warn');
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
this.log('Starting project-specific cleanup...');
|
|
136
|
-
await this.insertYourCodeHere(branchName);
|
|
137
|
-
this.log('Project-specific cleanup completed successfully', 'success');
|
|
138
|
-
}
|
|
139
|
-
catch (error) {
|
|
140
|
-
this.log(`Project-specific cleanup failed: ${error.message}`, 'error');
|
|
141
|
-
if (!this.options.force) {
|
|
142
|
-
throw error;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
async cleanupGitBranches(branchName) {
|
|
147
|
-
if (this.options.skipGit) {
|
|
148
|
-
this.log('Skipping Git cleanup', 'warn');
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
this.log(`Starting Git branch cleanup for: ${branchName}`);
|
|
152
|
-
// Check if we're on the branch we want to delete
|
|
153
|
-
const currentBranch = await this.getCurrentBranch();
|
|
154
|
-
if (currentBranch === branchName) {
|
|
155
|
-
this.log(`Currently on branch ${branchName}, switching to master first`, 'warn');
|
|
156
|
-
await this.executeCommand('git checkout master', 'Switch to master branch');
|
|
157
|
-
}
|
|
158
|
-
// Delete remote branch
|
|
159
|
-
const remoteExists = await this.checkBranchExists(branchName, true);
|
|
160
|
-
if (remoteExists) {
|
|
161
|
-
this.log(`Deleting remote branch: origin/${branchName}`);
|
|
162
|
-
await this.executeCommand(`git push origin --delete ${branchName}`, `Delete remote branch ${branchName}`);
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
this.log(`Remote branch origin/${branchName} does not exist`, 'info');
|
|
166
|
-
}
|
|
167
|
-
// Delete local branch
|
|
168
|
-
const localExists = await this.checkBranchExists(branchName, false);
|
|
169
|
-
if (localExists) {
|
|
170
|
-
this.log(`Deleting local branch: ${branchName}`);
|
|
171
|
-
await this.executeCommand(`git branch -D ${branchName}`, `Delete local branch ${branchName}`);
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
this.log(`Local branch ${branchName} does not exist`, 'info');
|
|
175
|
-
}
|
|
176
|
-
// Clean up any untracked files
|
|
177
|
-
this.log('Cleaning up untracked files...');
|
|
178
|
-
await this.executeCommand('git clean -fd', 'Remove untracked files and directories');
|
|
179
|
-
// Reset any uncommitted changes
|
|
180
|
-
this.log('Resetting uncommitted changes...');
|
|
181
|
-
await this.executeCommand('git reset --hard HEAD', 'Reset to HEAD');
|
|
182
|
-
this.log('Git branch cleanup completed', 'success');
|
|
183
|
-
}
|
|
184
|
-
async verifyCleanup(branchName) {
|
|
185
|
-
this.log('Verifying cleanup...');
|
|
186
|
-
// Verify branch deletion
|
|
187
|
-
const remoteExists = await this.checkBranchExists(branchName, true);
|
|
188
|
-
const localExists = await this.checkBranchExists(branchName, false);
|
|
189
|
-
if (remoteExists || localExists) {
|
|
190
|
-
this.log(`Warning: Branch ${branchName} still exists (remote: ${remoteExists}, local: ${localExists})`, 'warn');
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
this.log(`Branch ${branchName} successfully deleted`, 'success');
|
|
194
|
-
}
|
|
195
|
-
// Verify we're on master
|
|
196
|
-
const currentBranch = await this.getCurrentBranch();
|
|
197
|
-
if (currentBranch === 'master' || currentBranch === 'main') {
|
|
198
|
-
this.log('Currently on master/main branch', 'success');
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
this.log(`Warning: Not on master branch, currently on ${currentBranch}`, 'warn');
|
|
202
|
-
}
|
|
203
|
-
this.log('Cleanup verification completed', 'success');
|
|
204
|
-
}
|
|
205
|
-
async cleanup() {
|
|
206
|
-
try {
|
|
207
|
-
this.log('๐ Starting branch cleanup process...');
|
|
208
|
-
const branchName = await this.getBranchName();
|
|
209
|
-
this.log(`Target branch: ${branchName}`);
|
|
210
|
-
// Step 1: Project-specific cleanup
|
|
211
|
-
await this.doProjectSpecificCleanup(branchName);
|
|
212
|
-
// Step 2: Git branch cleanup
|
|
213
|
-
await this.cleanupGitBranches(branchName);
|
|
214
|
-
// Step 3: Verification
|
|
215
|
-
await this.verifyCleanup(branchName);
|
|
216
|
-
this.log('๐ Branch cleanup completed successfully!', 'success');
|
|
217
|
-
}
|
|
218
|
-
catch (error) {
|
|
219
|
-
this.log(`Cleanup failed: ${error.message}`, 'error');
|
|
220
|
-
if (!this.options.force) {
|
|
221
|
-
process.exit(1);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
// Parse command line arguments
|
|
227
|
-
const args = process.argv.slice(2);
|
|
228
|
-
const options = {};
|
|
229
|
-
// Parse arguments
|
|
230
|
-
for (let i = 0; i < args.length; i++) {
|
|
231
|
-
const arg = args[i];
|
|
232
|
-
switch (arg) {
|
|
233
|
-
case '--branch':
|
|
234
|
-
case '-b':
|
|
235
|
-
options.branchName = args[++i];
|
|
236
|
-
break;
|
|
237
|
-
case '--force':
|
|
238
|
-
case '-f':
|
|
239
|
-
options.force = true;
|
|
240
|
-
break;
|
|
241
|
-
case '--skip-project-cleanup':
|
|
242
|
-
options.skipProjectCleanup = true;
|
|
243
|
-
break;
|
|
244
|
-
case '--skip-git':
|
|
245
|
-
options.skipGit = true;
|
|
246
|
-
break;
|
|
247
|
-
case '--help':
|
|
248
|
-
case '-h':
|
|
249
|
-
console.log(`
|
|
250
|
-
๐งน Branch Cleanup Script
|
|
251
|
-
|
|
252
|
-
Usage:
|
|
253
|
-
npx tsx scripts/cleanup-branch.ts [options]
|
|
254
|
-
|
|
255
|
-
Options:
|
|
256
|
-
--branch, -b <name> Specific branch name to cleanup (default: current branch)
|
|
257
|
-
--force, -f Continue even if some operations fail
|
|
258
|
-
--skip-project-cleanup Skip project-specific cleanup
|
|
259
|
-
--skip-git Skip Git branch deletion
|
|
260
|
-
--help, -h Show this help message
|
|
261
|
-
|
|
262
|
-
Examples:
|
|
263
|
-
# Cleanup current branch with default settings
|
|
264
|
-
npx tsx <cleanup-script-path>
|
|
265
|
-
|
|
266
|
-
# Cleanup specific branch
|
|
267
|
-
npx tsx <cleanup-script-path> --branch feature/123
|
|
268
|
-
|
|
269
|
-
# Force cleanup even if some operations fail
|
|
270
|
-
npx tsx <cleanup-script-path> --force
|
|
271
|
-
|
|
272
|
-
# Skip project-specific cleanup (only do Git cleanup)
|
|
273
|
-
npx tsx <cleanup-script-path> --skip-project-cleanup
|
|
274
|
-
|
|
275
|
-
This script performs the following cleanup operations:
|
|
276
|
-
1. ๐๏ธ Project-specific cleanup (calls configured cleanup script)
|
|
277
|
-
2. ๐ฟ Git branch deletion (remote and local)
|
|
278
|
-
3. โ
Verification of cleanup completion
|
|
279
|
-
|
|
280
|
-
โ ๏ธ WARNING: This script will permanently delete branches and data!
|
|
281
|
-
`);
|
|
282
|
-
process.exit(0);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
// Run the cleanup
|
|
286
|
-
const cleanup = new BranchCleanup(options);
|
|
287
|
-
cleanup.cleanup();
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
/**
|
|
4
|
-
* Code Quality Evaluator (Diagnostic Tool)
|
|
5
|
-
*
|
|
6
|
-
* Runs code quality checks and outputs results to the console.
|
|
7
|
-
* Used by the evaluate-code-quality bootstrapping workflow.
|
|
8
|
-
*
|
|
9
|
-
* Usage: npx tsx <this-script>
|
|
10
|
-
*/
|
|
11
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(o, k2, desc);
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
-
}) : function(o, v) {
|
|
25
|
-
o["default"] = v;
|
|
26
|
-
});
|
|
27
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
-
var ownKeys = function(o) {
|
|
29
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
-
var ar = [];
|
|
31
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
-
return ar;
|
|
33
|
-
};
|
|
34
|
-
return ownKeys(o);
|
|
35
|
-
};
|
|
36
|
-
return function (mod) {
|
|
37
|
-
if (mod && mod.__esModule) return mod;
|
|
38
|
-
var result = {};
|
|
39
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
-
__setModuleDefault(result, mod);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
const path = __importStar(require("path"));
|
|
46
|
-
const child_process_1 = require("child_process");
|
|
47
|
-
const REGISTRY_SCRIPTS_DIR = __dirname;
|
|
48
|
-
const QUALITY_CHECK_SCRIPT = path.join(REGISTRY_SCRIPTS_DIR, 'code-quality-check.sh');
|
|
49
|
-
function evaluateQuality() {
|
|
50
|
-
console.log('๐ Starting Code Quality Evaluation...');
|
|
51
|
-
console.log('๐ Running code-quality-check.sh...\n');
|
|
52
|
-
// Run the existing quality check script and pipe output directly to terminal
|
|
53
|
-
const child = (0, child_process_1.spawn)('bash', [QUALITY_CHECK_SCRIPT, 'pre-pr'], {
|
|
54
|
-
stdio: 'inherit',
|
|
55
|
-
shell: false
|
|
56
|
-
});
|
|
57
|
-
child.on('exit', (code) => {
|
|
58
|
-
if (code === 0) {
|
|
59
|
-
console.log('\nโ
Code quality check completed successfully.');
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
console.log(`\nโ Code quality check failed with exit code ${code}.`);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
evaluateQuality();
|