fraim-framework 2.0.67 → 2.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/bin/fraim.js +1 -1
  2. package/dist/src/cli/commands/doctor.js +1 -1
  3. package/dist/src/cli/commands/init-project.js +6 -12
  4. package/dist/src/cli/commands/list.js +1 -1
  5. package/dist/src/cli/commands/setup.js +15 -29
  6. package/dist/src/cli/commands/sync.js +36 -143
  7. package/dist/src/cli/fraim.js +0 -4
  8. package/dist/src/cli/setup/first-run.js +4 -4
  9. package/dist/src/cli/setup/ide-detector.js +15 -5
  10. package/dist/src/fraim/template-processor.js +7 -35
  11. package/dist/src/local-mcp-server/stdio-server.js +170 -181
  12. package/dist/src/utils/git-utils.js +2 -2
  13. package/dist/src/utils/object-utils.js +11 -0
  14. package/dist/src/utils/provider-utils.js +14 -0
  15. package/dist/src/utils/request-utils.js +23 -0
  16. package/dist/src/utils/workflow-parser.js +7 -7
  17. package/package.json +7 -5
  18. package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +0 -101
  19. package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +0 -235
  20. package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +0 -243
  21. package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +0 -206
  22. package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
  23. package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
  24. package/dist/registry/ai-manager-rules/design-phases/design.md +0 -108
  25. package/dist/registry/ai-manager-rules/design-phases/finalize.md +0 -60
  26. package/dist/registry/ai-manager-rules/design-phases/validate.md +0 -125
  27. package/dist/registry/ai-manager-rules/design.json +0 -97
  28. package/dist/registry/ai-manager-rules/implement-phases/code.md +0 -323
  29. package/dist/registry/ai-manager-rules/implement-phases/completeness-review.md +0 -94
  30. package/dist/registry/ai-manager-rules/implement-phases/finalize.md +0 -177
  31. package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
  32. package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
  33. package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
  34. package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
  35. package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
  36. package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
  37. package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
  38. package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
  39. package/dist/registry/ai-manager-rules/implement-phases/quality-review.md +0 -304
  40. package/dist/registry/ai-manager-rules/implement-phases/regression.md +0 -159
  41. package/dist/registry/ai-manager-rules/implement-phases/repro.md +0 -101
  42. package/dist/registry/ai-manager-rules/implement-phases/scoping.md +0 -93
  43. package/dist/registry/ai-manager-rules/implement-phases/smoke.md +0 -225
  44. package/dist/registry/ai-manager-rules/implement-phases/spike.md +0 -118
  45. package/dist/registry/ai-manager-rules/implement-phases/validate.md +0 -347
  46. package/dist/registry/ai-manager-rules/implement.json +0 -153
  47. package/dist/registry/ai-manager-rules/retrospective.md +0 -116
  48. package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
  49. package/dist/registry/ai-manager-rules/shared-phases/finalize.md +0 -169
  50. package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
  51. package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
  52. package/dist/registry/ai-manager-rules/spec-phases/finalize.md +0 -60
  53. package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
  54. package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
  55. package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
  56. package/dist/registry/ai-manager-rules/spec-phases/spec.md +0 -102
  57. package/dist/registry/ai-manager-rules/spec-phases/validate.md +0 -118
  58. package/dist/registry/ai-manager-rules/spec.json +0 -112
  59. package/dist/registry/ai-manager-rules/test.json +0 -98
  60. package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +0 -60
  61. package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +0 -23
  62. package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +0 -22
  63. package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +0 -21
  64. package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +0 -19
  65. package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +0 -15
  66. package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +0 -45
  67. package/dist/registry/delivery/address-feedback.md +0 -83
  68. package/dist/registry/delivery/retrospective.md +0 -78
  69. package/dist/registry/delivery/submit.md +0 -79
  70. package/dist/registry/providers/ado.json +0 -19
  71. package/dist/registry/providers/delivery-conversation.json +0 -9
  72. package/dist/registry/providers/delivery-pr.json +0 -9
  73. package/dist/registry/providers/github.json +0 -19
  74. package/dist/registry/rules/agent-success-criteria.md +0 -101
  75. package/dist/registry/rules/agent-testing-guidelines.md +0 -502
  76. package/dist/registry/rules/architecture.md +0 -126
  77. package/dist/registry/rules/communication.md +0 -122
  78. package/dist/registry/rules/continuous-learning.md +0 -55
  79. package/dist/registry/rules/debugging-multitenancy-issues.md +0 -85
  80. package/dist/registry/rules/ephemeral-execution.md +0 -54
  81. package/dist/registry/rules/git-safe-commands.md +0 -34
  82. package/dist/registry/rules/hitl-ppe-record-analysis.md +0 -302
  83. package/dist/registry/rules/integrity-and-test-ethics.md +0 -275
  84. package/dist/registry/rules/local-development.md +0 -275
  85. package/dist/registry/rules/mandatory-pre-completion-reflection.md +0 -193
  86. package/dist/registry/rules/merge-requirements.md +0 -238
  87. package/dist/registry/rules/simplicity.md +0 -118
  88. package/dist/registry/rules/software-development-lifecycle.md +0 -105
  89. package/dist/registry/rules/spike-first-development.md +0 -205
  90. package/dist/registry/rules/successful-debugging-patterns.md +0 -488
  91. package/dist/registry/scripts/build-scripts-generator.js +0 -205
  92. package/dist/registry/scripts/cleanup-branch.js +0 -287
  93. package/dist/registry/scripts/evaluate-code-quality.js +0 -66
  94. package/dist/registry/scripts/exec-with-timeout.js +0 -142
  95. package/dist/registry/scripts/fraim-config.js +0 -61
  96. package/dist/registry/scripts/generate-engagement-emails.js +0 -705
  97. package/dist/registry/scripts/generic-issues-api.js +0 -100
  98. package/dist/registry/scripts/newsletter-helpers.js +0 -671
  99. package/dist/registry/scripts/openapi-generator.js +0 -664
  100. package/dist/registry/scripts/performance/profile-server.js +0 -390
  101. package/dist/registry/scripts/profile-server.js +0 -389
  102. package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
  103. package/dist/registry/scripts/send-newsletter-simple.js +0 -85
  104. package/dist/registry/scripts/send-thank-you-emails.js +0 -54
  105. package/dist/registry/scripts/validate-openapi-limits.js +0 -311
  106. package/dist/registry/scripts/validate-test-coverage.js +0 -262
  107. package/dist/registry/scripts/verify-test-coverage.js +0 -66
  108. package/dist/registry/stubs/workflows/azure/cost-optimization.md +0 -11
  109. package/dist/registry/stubs/workflows/bootstrap/create-architecture.md +0 -11
  110. package/dist/registry/stubs/workflows/bootstrap/detect-broken-windows.md +0 -11
  111. package/dist/registry/stubs/workflows/bootstrap/evaluate-code-quality.md +0 -11
  112. package/dist/registry/stubs/workflows/bootstrap/verify-test-coverage.md +0 -11
  113. package/dist/registry/stubs/workflows/brainstorming/blue-sky-brainstorming.md +0 -11
  114. package/dist/registry/stubs/workflows/brainstorming/codebase-brainstorming.md +0 -11
  115. package/dist/registry/stubs/workflows/business-development/create-business-plan.md +0 -11
  116. package/dist/registry/stubs/workflows/business-development/ideate-business-opportunity.md +0 -11
  117. package/dist/registry/stubs/workflows/business-development/price-product.md +0 -18
  118. package/dist/registry/stubs/workflows/compliance/detect-compliance-requirements.md +0 -11
  119. package/dist/registry/stubs/workflows/compliance/generate-audit-evidence.md +0 -11
  120. package/dist/registry/stubs/workflows/compliance/soc2-evidence-generator.md +0 -11
  121. package/dist/registry/stubs/workflows/customer-development/insight-analysis.md +0 -11
  122. package/dist/registry/stubs/workflows/customer-development/insight-triage.md +0 -11
  123. package/dist/registry/stubs/workflows/customer-development/interview-preparation.md +0 -11
  124. package/dist/registry/stubs/workflows/customer-development/linkedin-outreach.md +0 -11
  125. package/dist/registry/stubs/workflows/customer-development/strategic-brainstorming.md +0 -11
  126. package/dist/registry/stubs/workflows/customer-development/thank-customers.md +0 -11
  127. package/dist/registry/stubs/workflows/customer-development/user-survey-dispatch.md +0 -11
  128. package/dist/registry/stubs/workflows/customer-development/users-to-target.md +0 -11
  129. package/dist/registry/stubs/workflows/customer-development/weekly-newsletter.md +0 -11
  130. package/dist/registry/stubs/workflows/deploy/cloud-deployment.md +0 -11
  131. package/dist/registry/stubs/workflows/improve-fraim/contribute.md +0 -11
  132. package/dist/registry/stubs/workflows/improve-fraim/file-issue.md +0 -11
  133. package/dist/registry/stubs/workflows/learning/build-skillset.md +0 -11
  134. package/dist/registry/stubs/workflows/learning/synthesize-learnings.md +0 -11
  135. package/dist/registry/stubs/workflows/legal/contract-review-analysis.md +0 -11
  136. package/dist/registry/stubs/workflows/legal/nda.md +0 -11
  137. package/dist/registry/stubs/workflows/legal/patent-filing.md +0 -11
  138. package/dist/registry/stubs/workflows/legal/saas-contract-development.md +0 -11
  139. package/dist/registry/stubs/workflows/legal/trademark-filing.md +0 -11
  140. package/dist/registry/stubs/workflows/marketing/content-creation.md +0 -11
  141. package/dist/registry/stubs/workflows/marketing/convert-to-pdf.md +0 -11
  142. package/dist/registry/stubs/workflows/marketing/create-modern-website.md +0 -11
  143. package/dist/registry/stubs/workflows/marketing/domain-registration.md +0 -11
  144. package/dist/registry/stubs/workflows/marketing/evangelize.md +0 -11
  145. package/dist/registry/stubs/workflows/marketing/hbr-article.md +0 -11
  146. package/dist/registry/stubs/workflows/marketing/launch-checklist.md +0 -11
  147. package/dist/registry/stubs/workflows/marketing/marketing-strategy.md +0 -11
  148. package/dist/registry/stubs/workflows/marketing/storytelling.md +0 -11
  149. package/dist/registry/stubs/workflows/performance/analyze-performance.md +0 -11
  150. package/dist/registry/stubs/workflows/product-building/design.md +0 -11
  151. package/dist/registry/stubs/workflows/product-building/implement.md +0 -11
  152. package/dist/registry/stubs/workflows/product-building/iterate-on-pr-comments.md +0 -11
  153. package/dist/registry/stubs/workflows/product-building/prep-issue.md +0 -11
  154. package/dist/registry/stubs/workflows/product-building/prototype.md +0 -11
  155. package/dist/registry/stubs/workflows/product-building/resolve.md +0 -11
  156. package/dist/registry/stubs/workflows/product-building/retrospect.md +0 -11
  157. package/dist/registry/stubs/workflows/product-building/spec.md +0 -11
  158. package/dist/registry/stubs/workflows/product-building/test.md +0 -11
  159. package/dist/registry/stubs/workflows/productivity-report/productivity-report.md +0 -11
  160. package/dist/registry/stubs/workflows/quality-assurance/browser-validation.md +0 -11
  161. package/dist/registry/stubs/workflows/quality-assurance/iterative-improvement-cycle.md +0 -11
  162. package/dist/registry/stubs/workflows/replicate/replicate-discovery.md +0 -11
  163. package/dist/registry/stubs/workflows/replicate/replicate-to-issues.md +0 -11
  164. package/dist/registry/stubs/workflows/reviewer/review-implementation-vs-design-spec.md +0 -11
  165. package/dist/registry/stubs/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -11
  166. package/dist/registry/stubs/workflows/startup-credits/aws-activate-application.md +0 -11
  167. package/dist/registry/stubs/workflows/startup-credits/google-cloud-application.md +0 -11
  168. package/dist/registry/stubs/workflows/startup-credits/microsoft-azure-application.md +0 -11
  169. package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
  170. package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
  171. package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
  172. package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
  173. package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
  174. package/dist/registry/templates/customer-development/customer-interview-template.md +0 -99
  175. package/dist/registry/templates/customer-development/customer-persona-template.md +0 -69
  176. package/dist/registry/templates/customer-development/follow-up-email-templates.md +0 -132
  177. package/dist/registry/templates/customer-development/insight-analysis-template.md +0 -74
  178. package/dist/registry/templates/customer-development/prospect-inventory-template.csv +0 -3
  179. package/dist/registry/templates/customer-development/search-strategy-template.md +0 -123
  180. package/dist/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
  181. package/dist/registry/templates/customer-development/thank-you-email-template.html +0 -124
  182. package/dist/registry/templates/customer-development/thank-you-note-template.md +0 -16
  183. package/dist/registry/templates/customer-development/triage-log-template.md +0 -278
  184. package/dist/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
  185. package/dist/registry/templates/evidence/Design-Evidence.md +0 -30
  186. package/dist/registry/templates/evidence/Implementation-BugEvidence.md +0 -122
  187. package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -160
  188. package/dist/registry/templates/evidence/Spec-Evidence.md +0 -19
  189. package/dist/registry/templates/help/HelpNeeded.md +0 -14
  190. package/dist/registry/templates/legal/NDA-TEMPLATE.md +0 -170
  191. package/dist/registry/templates/legal/PATENT-TEMPLATE.md +0 -372
  192. package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +0 -339
  193. package/dist/registry/templates/legal/contract-review-checklist.md +0 -193
  194. package/dist/registry/templates/legal/review-report-template.md +0 -198
  195. package/dist/registry/templates/legal/saas-terms-template.md +0 -174
  196. package/dist/registry/templates/legal/sow-template.md +0 -117
  197. package/dist/registry/templates/legal/template-variables.md +0 -131
  198. package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +0 -194
  199. package/dist/registry/templates/marketing/EVANGELIZE-TEMPLATE.md +0 -102
  200. package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
  201. package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +0 -130
  202. package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +0 -262
  203. package/dist/registry/templates/marketing/github-pages-workflow.yml +0 -64
  204. package/dist/registry/templates/replicate/implementation-checklist.md +0 -39
  205. package/dist/registry/templates/replicate/use-cases-template.md +0 -88
  206. package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
  207. package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
  208. package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -66
  209. package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
  210. package/dist/registry/workflows/azure/cost-optimization.md +0 -772
  211. package/dist/registry/workflows/bootstrap/create-architecture.md +0 -37
  212. package/dist/registry/workflows/bootstrap/detect-broken-windows.md +0 -300
  213. package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +0 -35
  214. package/dist/registry/workflows/bootstrap/verify-test-coverage.md +0 -36
  215. package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +0 -211
  216. package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +0 -159
  217. package/dist/registry/workflows/business-development/create-business-plan.md +0 -737
  218. package/dist/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
  219. package/dist/registry/workflows/business-development/price-product.md +0 -325
  220. package/dist/registry/workflows/compliance/detect-compliance-requirements.md +0 -80
  221. package/dist/registry/workflows/compliance/generate-audit-evidence.md +0 -80
  222. package/dist/registry/workflows/compliance/soc2-evidence-generator.md +0 -332
  223. package/dist/registry/workflows/customer-development/insight-analysis.md +0 -156
  224. package/dist/registry/workflows/customer-development/insight-triage.md +0 -933
  225. package/dist/registry/workflows/customer-development/interview-preparation.md +0 -452
  226. package/dist/registry/workflows/customer-development/linkedin-outreach.md +0 -599
  227. package/dist/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
  228. package/dist/registry/workflows/customer-development/thank-customers.md +0 -203
  229. package/dist/registry/workflows/customer-development/user-survey-dispatch.md +0 -312
  230. package/dist/registry/workflows/customer-development/users-to-target.md +0 -427
  231. package/dist/registry/workflows/customer-development/weekly-newsletter.md +0 -366
  232. package/dist/registry/workflows/deploy/cloud-deployment.md +0 -310
  233. package/dist/registry/workflows/improve-fraim/contribute.md +0 -32
  234. package/dist/registry/workflows/improve-fraim/file-issue.md +0 -32
  235. package/dist/registry/workflows/learning/build-skillset.md +0 -212
  236. package/dist/registry/workflows/learning/synthesize-learnings.md +0 -369
  237. package/dist/registry/workflows/legal/contract-review-analysis.md +0 -382
  238. package/dist/registry/workflows/legal/nda.md +0 -69
  239. package/dist/registry/workflows/legal/patent-filing.md +0 -76
  240. package/dist/registry/workflows/legal/saas-contract-development.md +0 -204
  241. package/dist/registry/workflows/legal/trademark-filing.md +0 -77
  242. package/dist/registry/workflows/marketing/content-creation.md +0 -40
  243. package/dist/registry/workflows/marketing/convert-to-pdf.md +0 -265
  244. package/dist/registry/workflows/marketing/create-modern-website.md +0 -456
  245. package/dist/registry/workflows/marketing/domain-registration.md +0 -323
  246. package/dist/registry/workflows/marketing/evangelize.md +0 -426
  247. package/dist/registry/workflows/marketing/hbr-article.md +0 -73
  248. package/dist/registry/workflows/marketing/launch-checklist.md +0 -37
  249. package/dist/registry/workflows/marketing/marketing-strategy.md +0 -45
  250. package/dist/registry/workflows/marketing/storytelling.md +0 -65
  251. package/dist/registry/workflows/performance/analyze-performance.md +0 -65
  252. package/dist/registry/workflows/product-building/design.md +0 -263
  253. package/dist/registry/workflows/product-building/implement.md +0 -771
  254. package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
  255. package/dist/registry/workflows/product-building/prep-issue.md +0 -41
  256. package/dist/registry/workflows/product-building/prototype.md +0 -60
  257. package/dist/registry/workflows/product-building/resolve.md +0 -175
  258. package/dist/registry/workflows/product-building/retrospect.md +0 -86
  259. package/dist/registry/workflows/product-building/spec.md +0 -303
  260. package/dist/registry/workflows/product-building/test.md +0 -125
  261. package/dist/registry/workflows/productivity-report/productivity-report.md +0 -263
  262. package/dist/registry/workflows/quality-assurance/browser-validation.md +0 -221
  263. package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
  264. package/dist/registry/workflows/replicate/replicate-discovery.md +0 -336
  265. package/dist/registry/workflows/replicate/replicate-to-issues.md +0 -319
  266. package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -694
  267. package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -734
  268. package/dist/registry/workflows/startup-credits/aws-activate-application.md +0 -535
  269. package/dist/registry/workflows/startup-credits/google-cloud-application.md +0 -647
  270. package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
  271. package/dist/src/cli/commands/init.js +0 -148
  272. package/dist/src/cli/commands/mcp.js +0 -65
  273. package/dist/src/cli/commands/wizard.js +0 -35
  274. package/dist/src/fraim/issue-tracking/ado-provider.js +0 -304
  275. package/dist/src/fraim/issue-tracking/factory.js +0 -63
  276. package/dist/src/fraim/issue-tracking/github-provider.js +0 -200
  277. package/dist/src/fraim/issue-tracking/types.js +0 -7
  278. package/dist/src/fraim/issue-tracking-config.js +0 -83
  279. package/dist/src/fraim/retrospective-learner.js +0 -301
  280. package/dist/src/fraim/setup-wizard.js +0 -99
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /**
3
- * Issue Tracking Configuration Helper
4
- *
5
- * Provides guidance on which MCP tools to use based on configuration.
6
- * This replaces custom providers with MCP tool recommendations.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.getIssueTrackingGuidance = getIssueTrackingGuidance;
10
- exports.getRepositoryInfo = getRepositoryInfo;
11
- const config_loader_1 = require("./config-loader");
12
- /**
13
- * Get guidance on which MCP tools to use for issue tracking
14
- */
15
- function getIssueTrackingGuidance() {
16
- const config = (0, config_loader_1.loadFraimConfig)();
17
- // Check for ADO configuration
18
- if (config.repository?.provider === 'ado') {
19
- return {
20
- provider: 'ado',
21
- mcpTools: {
22
- createIssue: 'mcp_ado_create_work_item',
23
- getIssue: 'mcp_ado_get_work_item',
24
- updateIssue: 'mcp_ado_update_work_item',
25
- listIssues: 'mcp_ado_list_work_items',
26
- createPR: 'mcp_ado_create_pull_request',
27
- getPR: 'mcp_ado_get_pull_request',
28
- mergePR: 'mcp_ado_merge_pull_request'
29
- },
30
- config: {
31
- organization: config.repository.organization,
32
- project: config.repository.project
33
- },
34
- environmentVars: ['ADO_TOKEN', 'AZURE_DEVOPS_TOKEN'],
35
- setupInstructions: `Configure ADO MCP server in your IDE with:
36
- - Organization: ${config.repository.organization}
37
- - Project: ${config.repository.project}
38
- - Token: Set ADO_TOKEN or AZURE_DEVOPS_TOKEN environment variable`
39
- };
40
- }
41
- // Default to GitHub
42
- const owner = config.repository?.owner || config.git?.repoOwner || 'mathursrus';
43
- const repo = config.repository?.name || config.git?.repoName || 'FRAIM';
44
- return {
45
- provider: 'github',
46
- mcpTools: {
47
- createIssue: 'mcp_github_issue_write',
48
- getIssue: 'mcp_github_issue_read',
49
- updateIssue: 'mcp_github_issue_write',
50
- listIssues: 'mcp_github_list_issues',
51
- createPR: 'mcp_github_create_pull_request',
52
- getPR: 'mcp_github_pull_request_read',
53
- mergePR: 'mcp_github_merge_pull_request'
54
- },
55
- config: {
56
- owner,
57
- repo
58
- },
59
- environmentVars: ['GITHUB_TOKEN'],
60
- setupInstructions: `GitHub MCP tools are configured for:
61
- - Repository: ${owner}/${repo}
62
- - Token: Set GITHUB_TOKEN environment variable
63
- - MCP Server: Ensure GitHub MCP server is configured in your IDE`
64
- };
65
- }
66
- /**
67
- * Get repository information from .fraim/config.json
68
- */
69
- function getRepositoryInfo() {
70
- try {
71
- const config = (0, config_loader_1.loadFraimConfig)();
72
- const owner = config.repository?.owner || config.git?.repoOwner;
73
- const repo = config.repository?.name || config.git?.repoName;
74
- return {
75
- owner,
76
- repo,
77
- url: owner && repo ? `https://github.com/${owner}/${repo}.git` : undefined
78
- };
79
- }
80
- catch (e) {
81
- return {};
82
- }
83
- }
@@ -1,301 +0,0 @@
1
- "use strict";
2
- /**
3
- * FRAIM Retrospective Learning System
4
- * Scans retrospectives, extracts learnings, and generates rules
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.scanRetrospectives = scanRetrospectives;
8
- exports.detectPatterns = detectPatterns;
9
- exports.generateRuleFromPattern = generateRuleFromPattern;
10
- exports.learnFromRetrospectives = learnFromRetrospectives;
11
- const fs_1 = require("fs");
12
- const path_1 = require("path");
13
- /**
14
- * Scan retrospectives directory and parse files
15
- */
16
- function scanRetrospectives(retrospectivesPath = 'retrospectives') {
17
- const fullPath = (0, path_1.join)(process.cwd(), retrospectivesPath);
18
- if (!(0, fs_1.existsSync)(fullPath)) {
19
- console.warn(`⚠️ Retrospectives directory not found: ${fullPath}`);
20
- return [];
21
- }
22
- const learnings = [];
23
- const files = (0, fs_1.readdirSync)(fullPath, { withFileTypes: true });
24
- for (const file of files) {
25
- if (file.isFile() && (0, path_1.extname)(file.name) === '.md') {
26
- const filePath = (0, path_1.join)(fullPath, file.name);
27
- try {
28
- const content = (0, fs_1.readFileSync)(filePath, 'utf-8');
29
- const parsed = parseRetrospective(content, file.name);
30
- if (parsed) {
31
- learnings.push(parsed);
32
- }
33
- }
34
- catch (error) {
35
- console.warn(`⚠️ Failed to parse retrospective ${file.name}: ${error}`);
36
- }
37
- }
38
- }
39
- return learnings;
40
- }
41
- /**
42
- * Parse a retrospective markdown file
43
- * Looks for common patterns: issues, problems, solutions, lessons learned
44
- */
45
- function parseRetrospective(content, filename) {
46
- // Extract issue number from filename (e.g., "393-retrospective.md" -> "393")
47
- const issueMatch = filename.match(/(\d+)/);
48
- const issue = issueMatch ? `Issue #${issueMatch[1]}` : filename.replace('.md', '');
49
- // Try to extract date from filename or content
50
- const dateMatch = filename.match(/(\d{4}-\d{2}-\d{2})/) || content.match(/(\d{4}-\d{2}-\d{2})/);
51
- const date = dateMatch ? dateMatch[1] : new Date().toISOString().split('T')[0];
52
- // Extract problems (look for sections like "Problems", "Issues", "What went wrong")
53
- const problems = extractSection(content, ['problem', 'issue', 'what went wrong', 'challenges', 'bugs']);
54
- // Extract solutions (look for sections like "Solutions", "Fixes", "What we did")
55
- const solutions = extractSection(content, ['solution', 'fix', 'what we did', 'resolution', 'action']);
56
- // Extract lessons (look for sections like "Lessons", "Learnings", "Takeaways")
57
- const lessons = extractSection(content, ['lesson', 'learning', 'takeaway', 'insight', 'prevention']);
58
- // Determine category based on content
59
- const category = categorizeLearning(content, problems, lessons);
60
- if (problems.length === 0 && lessons.length === 0) {
61
- return null; // Skip if no useful content
62
- }
63
- return {
64
- issue,
65
- date,
66
- problems,
67
- solutions,
68
- lessons,
69
- category
70
- };
71
- }
72
- /**
73
- * Extract content from a section
74
- */
75
- function extractSection(content, keywords) {
76
- const items = [];
77
- const lines = content.split('\n');
78
- let inSection = false;
79
- let currentItem = '';
80
- for (let i = 0; i < lines.length; i++) {
81
- const line = lines[i].trim();
82
- const lineLower = line.toLowerCase();
83
- // Check if this line starts a relevant section
84
- if (keywords.some(keyword => lineLower.includes(keyword) && (line.startsWith('#') || line.startsWith('##')))) {
85
- inSection = true;
86
- continue;
87
- }
88
- // Check if we hit a new section
89
- if (inSection && (line.startsWith('#') || line.startsWith('##'))) {
90
- if (currentItem.trim()) {
91
- items.push(currentItem.trim());
92
- currentItem = '';
93
- }
94
- // Check if this is still a relevant section
95
- if (!keywords.some(keyword => lineLower.includes(keyword))) {
96
- inSection = false;
97
- }
98
- continue;
99
- }
100
- // Collect content in section
101
- if (inSection) {
102
- // Look for list items
103
- if (line.startsWith('-') || line.startsWith('*') || line.match(/^\d+\./)) {
104
- if (currentItem.trim()) {
105
- items.push(currentItem.trim());
106
- }
107
- currentItem = line.replace(/^[-*\d+.\s]*/, '');
108
- }
109
- else if (line.trim()) {
110
- currentItem += (currentItem ? ' ' : '') + line;
111
- }
112
- }
113
- }
114
- if (currentItem.trim()) {
115
- items.push(currentItem.trim());
116
- }
117
- return items.filter(item => item.length > 10); // Filter out very short items
118
- }
119
- /**
120
- * Categorize learning based on content
121
- */
122
- function categorizeLearning(content, problems, lessons) {
123
- const allText = (content + ' ' + problems.join(' ') + ' ' + lessons.join(' ')).toLowerCase();
124
- if (allText.includes('test') || allText.includes('spec') || allText.includes('coverage')) {
125
- return 'testing';
126
- }
127
- if (allText.includes('architecture') || allText.includes('pattern') || allText.includes('design')) {
128
- return 'architecture';
129
- }
130
- if (allText.includes('workflow') || allText.includes('process') || allText.includes('step')) {
131
- return 'workflow';
132
- }
133
- if (allText.includes('code quality') || allText.includes('lint') || allText.includes('type')) {
134
- return 'code-quality';
135
- }
136
- return 'other';
137
- }
138
- /**
139
- * Detect patterns across multiple retrospectives
140
- */
141
- function detectPatterns(learnings) {
142
- const patterns = new Map();
143
- for (const learning of learnings) {
144
- // Analyze problems
145
- for (const problem of learning.problems) {
146
- const key = extractKeyPhrase(problem);
147
- if (key) {
148
- const existing = patterns.get(key) || {
149
- pattern: key,
150
- frequency: 0,
151
- examples: [],
152
- lesson: '',
153
- suggestedRule: `learned-${key.toLowerCase().replace(/\s+/g, '-')}.md`,
154
- category: learning.category
155
- };
156
- existing.frequency++;
157
- if (!existing.examples.includes(learning.issue)) {
158
- existing.examples.push(learning.issue);
159
- }
160
- patterns.set(key, existing);
161
- }
162
- }
163
- // Analyze lessons
164
- for (const lesson of learning.lessons) {
165
- const key = extractKeyPhrase(lesson);
166
- if (key) {
167
- const existing = patterns.get(key) || {
168
- pattern: key,
169
- frequency: 0,
170
- examples: [],
171
- lesson: lesson,
172
- suggestedRule: `learned-${key.toLowerCase().replace(/\s+/g, '-')}.md`,
173
- category: learning.category
174
- };
175
- existing.frequency++;
176
- if (!existing.examples.includes(learning.issue)) {
177
- existing.examples.push(learning.issue);
178
- }
179
- if (!existing.lesson && lesson.length > existing.lesson.length) {
180
- existing.lesson = lesson;
181
- }
182
- patterns.set(key, existing);
183
- }
184
- }
185
- }
186
- // Filter patterns that appear multiple times
187
- return Array.from(patterns.values())
188
- .filter(p => p.frequency >= 2)
189
- .sort((a, b) => b.frequency - a.frequency);
190
- }
191
- /**
192
- * Extract key phrase from text (simplified)
193
- */
194
- function extractKeyPhrase(text) {
195
- // Look for common patterns
196
- const patterns = [
197
- /(?:always|never|must|should)\s+([^.!?]+)/i,
198
- /(?:don'?t|do not)\s+([^.!?]+)/i,
199
- /(?:ensure|verify|check|test)\s+([^.!?]+)/i
200
- ];
201
- for (const pattern of patterns) {
202
- const match = text.match(pattern);
203
- if (match && match[1]) {
204
- return match[1].trim().substring(0, 100); // Limit length
205
- }
206
- }
207
- // Fallback: first sentence
208
- const firstSentence = text.split(/[.!?]/)[0].trim();
209
- if (firstSentence.length > 10 && firstSentence.length < 150) {
210
- return firstSentence;
211
- }
212
- return null;
213
- }
214
- /**
215
- * Generate a rule from a learning pattern
216
- */
217
- function generateRuleFromPattern(pattern, learnings) {
218
- const relatedLearnings = learnings.filter(l => pattern.examples.some(ex => l.issue.includes(ex.split('#')[1] || '')));
219
- let rule = `# Learned Rule: ${pattern.pattern}\n\n`;
220
- rule += `## Source\n`;
221
- rule += `This rule was automatically generated from project retrospectives:\n`;
222
- for (const example of pattern.examples) {
223
- rule += `- ${example}\n`;
224
- }
225
- rule += `\n`;
226
- rule += `## Problem Pattern\n`;
227
- if (relatedLearnings.length > 0) {
228
- const problems = relatedLearnings.flatMap(l => l.problems).slice(0, 3);
229
- rule += problems.map(p => `- ${p}`).join('\n') + '\n';
230
- }
231
- rule += `\n`;
232
- rule += `## Learned Behavior\n`;
233
- rule += `**${pattern.lesson || pattern.pattern}**\n\n`;
234
- rule += `## Rule\n`;
235
- rule += `Based on ${pattern.frequency} occurrence(s) across retrospectives:\n`;
236
- rule += `1. Follow the learned behavior above\n`;
237
- rule += `2. Reference this rule when similar situations arise\n`;
238
- rule += `3. Update this rule if new learnings emerge\n\n`;
239
- rule += `## Enforcement\n`;
240
- rule += `- This is a learned rule from project experience\n`;
241
- rule += `- Violations should trigger review of retrospective learnings\n`;
242
- return rule;
243
- }
244
- /**
245
- * Learn from retrospectives and generate rules
246
- */
247
- function learnFromRetrospectives(retrospectivesPath = 'retrospectives', autoApply = false) {
248
- try {
249
- // Scan retrospectives
250
- const learnings = scanRetrospectives(retrospectivesPath);
251
- if (learnings.length === 0) {
252
- return {
253
- success: false,
254
- message: 'No retrospectives found or no learnings extracted',
255
- patterns: [],
256
- rulesGenerated: 0
257
- };
258
- }
259
- // Detect patterns
260
- const patterns = detectPatterns(learnings);
261
- if (patterns.length === 0) {
262
- return {
263
- success: true,
264
- message: `Scanned ${learnings.length} retrospectives but found no recurring patterns (need at least 2 occurrences)`,
265
- patterns: [],
266
- rulesGenerated: 0
267
- };
268
- }
269
- let rulesGenerated = 0;
270
- if (autoApply) {
271
- // Generate and write rules
272
- const fraimRulesPath = (0, path_1.join)(process.cwd(), '.fraim', 'rules');
273
- if (!(0, fs_1.existsSync)(fraimRulesPath)) {
274
- throw new Error('.fraim/rules directory does not exist. Run fraim_setup first.');
275
- }
276
- for (const pattern of patterns) {
277
- const ruleContent = generateRuleFromPattern(pattern, learnings);
278
- const rulePath = (0, path_1.join)(fraimRulesPath, pattern.suggestedRule);
279
- (0, fs_1.writeFileSync)(rulePath, ruleContent, 'utf-8');
280
- rulesGenerated++;
281
- }
282
- }
283
- const message = autoApply
284
- ? `✅ Learned from ${learnings.length} retrospectives. Generated ${rulesGenerated} rules in .fraim/rules/`
285
- : `📊 Found ${patterns.length} recurring patterns across ${learnings.length} retrospectives. Set autoApply=true to generate rules.`;
286
- return {
287
- success: true,
288
- message,
289
- patterns,
290
- rulesGenerated
291
- };
292
- }
293
- catch (error) {
294
- return {
295
- success: false,
296
- message: `Learning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
297
- patterns: [],
298
- rulesGenerated: 0
299
- };
300
- }
301
- }
@@ -1,99 +0,0 @@
1
- "use strict";
2
- /**
3
- * FRAIM Setup Wizard
4
- * Generates .fraim/config.json and initial directory structure
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.generateConfigFromAnswers = generateConfigFromAnswers;
8
- exports.writeConfig = writeConfig;
9
- exports.createDirectoryStructure = createDirectoryStructure;
10
- exports.runSetup = runSetup;
11
- const fs_1 = require("fs");
12
- const path_1 = require("path");
13
- const types_js_1 = require("./types.js");
14
- /**
15
- * Generate configuration from setup answers
16
- */
17
- function generateConfigFromAnswers(answers) {
18
- const config = {
19
- ...types_js_1.DEFAULT_FRAIM_CONFIG,
20
- project: {
21
- ...types_js_1.DEFAULT_FRAIM_CONFIG.project,
22
- name: answers.projectName || types_js_1.DEFAULT_FRAIM_CONFIG.project.name
23
- },
24
- repository: {
25
- provider: 'github',
26
- owner: 'your-username',
27
- name: 'your-project',
28
- defaultBranch: answers.defaultBranch || 'main'
29
- }
30
- };
31
- return config;
32
- }
33
- /**
34
- * Write configuration to .fraim/config.json
35
- */
36
- function writeConfig(config) {
37
- const fraimDir = (0, path_1.join)(process.cwd(), '.fraim');
38
- const configPath = (0, path_1.join)(fraimDir, 'config.json');
39
- // Create .fraim directory if it doesn't exist
40
- if (!(0, fs_1.existsSync)(fraimDir)) {
41
- (0, fs_1.mkdirSync)(fraimDir, { recursive: true });
42
- }
43
- // Write config file
44
- (0, fs_1.writeFileSync)(configPath, JSON.stringify(config, null, 2), 'utf-8');
45
- console.log(`✅ Created .fraim/config.json`);
46
- }
47
- /**
48
- * Create initial directory structure
49
- */
50
- function createDirectoryStructure() {
51
- const fraimDir = (0, path_1.join)(process.cwd(), '.fraim');
52
- const dirs = [
53
- (0, path_1.join)(fraimDir, 'rules'),
54
- (0, path_1.join)(fraimDir, 'workflows'),
55
- (0, path_1.join)(fraimDir, 'templates', 'specs'),
56
- (0, path_1.join)(fraimDir, 'templates', 'evidence'),
57
- (0, path_1.join)(fraimDir, 'templates', 'help'),
58
- (0, path_1.join)(fraimDir, 'templates', 'retrospective'),
59
- (0, path_1.join)(fraimDir, 'scripts')
60
- ];
61
- for (const dir of dirs) {
62
- if (!(0, fs_1.existsSync)(dir)) {
63
- (0, fs_1.mkdirSync)(dir, { recursive: true });
64
- console.log(`✅ Created ${dir}`);
65
- }
66
- }
67
- }
68
- /**
69
- * Run setup wizard
70
- */
71
- function runSetup(answers) {
72
- try {
73
- // Check if config already exists
74
- const configPath = (0, path_1.join)(process.cwd(), '.fraim', 'config.json');
75
- if ((0, fs_1.existsSync)(configPath)) {
76
- return {
77
- success: false,
78
- message: 'Configuration already exists at .fraim/config.json. Delete it first to run setup again.'
79
- };
80
- }
81
- // Generate config from answers
82
- const config = generateConfigFromAnswers(answers);
83
- // Create directory structure
84
- createDirectoryStructure();
85
- // Write config
86
- writeConfig(config);
87
- return {
88
- success: true,
89
- message: `✅ FRAIM setup complete!\n\nCreated:\n- .fraim/config.json\n- Directory structure\n\nNext steps:\n1. Review .fraim/config.json and adjust as needed\n2. Add custom rules to .fraim/rules/\n3. Add custom workflows to .fraim/workflows/\n4. Customize templates in .fraim/templates/`,
90
- config
91
- };
92
- }
93
- catch (error) {
94
- return {
95
- success: false,
96
- message: `Setup failed: ${error instanceof Error ? error.message : 'Unknown error'}`
97
- };
98
- }
99
- }