fraim-framework 2.0.56 → 2.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/bin/fraim-mcp.js +14 -0
  3. package/bin/fraim.js +23 -0
  4. package/dist/src/cli/commands/init-project.js +10 -4
  5. package/dist/src/cli/commands/mcp.js +65 -0
  6. package/dist/src/cli/setup/mcp-config-generator.js +19 -16
  7. package/dist/src/fraim/issue-tracking/ado-provider.js +304 -0
  8. package/dist/src/fraim/issue-tracking/factory.js +63 -0
  9. package/dist/src/fraim/issue-tracking/github-provider.js +200 -0
  10. package/dist/src/fraim/issue-tracking/types.js +7 -0
  11. package/dist/src/fraim/issue-tracking-config.js +83 -0
  12. package/dist/src/local-mcp-server/stdio-server.js +207 -0
  13. package/dist/src/utils/workflow-parser.js +81 -0
  14. package/package.json +17 -12
  15. package/registry/scripts/pdf-styles.css +172 -0
  16. package/registry/scripts/prep-issue.sh +46 -4
  17. package/registry/scripts/profile-server.ts +131 -130
  18. package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +1 -1
  19. package/registry/stubs/workflows/customer-development/users-to-target.md +1 -1
  20. package/registry/stubs/workflows/product-building/design.md +1 -1
  21. package/registry/stubs/workflows/product-building/implement.md +1 -1
  22. package/Claude.md +0 -1
  23. package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +0 -101
  24. package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +0 -235
  25. package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +0 -243
  26. package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +0 -206
  27. package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
  28. package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
  29. package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
  30. package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
  31. package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
  32. package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
  33. package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
  34. package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
  35. package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
  36. package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
  37. package/dist/registry/ai-manager-rules/retrospective.md +0 -116
  38. package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
  39. package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
  40. package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
  41. package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
  42. package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
  43. package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
  44. package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +0 -60
  45. package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +0 -23
  46. package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +0 -22
  47. package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +0 -21
  48. package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +0 -19
  49. package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +0 -15
  50. package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +0 -45
  51. package/dist/registry/providers/ado.json +0 -19
  52. package/dist/registry/providers/github.json +0 -19
  53. package/dist/registry/scripts/cleanup-branch.js +0 -287
  54. package/dist/registry/scripts/evaluate-code-quality.js +0 -66
  55. package/dist/registry/scripts/exec-with-timeout.js +0 -142
  56. package/dist/registry/scripts/generate-engagement-emails.js +0 -705
  57. package/dist/registry/scripts/newsletter-helpers.js +0 -671
  58. package/dist/registry/scripts/profile-server.js +0 -388
  59. package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
  60. package/dist/registry/scripts/send-newsletter-simple.js +0 -85
  61. package/dist/registry/scripts/send-thank-you-emails.js +0 -54
  62. package/dist/registry/scripts/validate-openapi-limits.js +0 -311
  63. package/dist/registry/scripts/validate-test-coverage.js +0 -262
  64. package/dist/registry/scripts/verify-test-coverage.js +0 -66
  65. package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
  66. package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
  67. package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
  68. package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
  69. package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
  70. package/dist/registry/templates/customer-development/customer-interview-template.md +0 -99
  71. package/dist/registry/templates/customer-development/customer-persona-template.md +0 -69
  72. package/dist/registry/templates/customer-development/follow-up-email-templates.md +0 -132
  73. package/dist/registry/templates/customer-development/insight-analysis-template.md +0 -74
  74. package/dist/registry/templates/customer-development/prospect-inventory-template.csv +0 -3
  75. package/dist/registry/templates/customer-development/search-strategy-template.md +0 -123
  76. package/dist/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
  77. package/dist/registry/templates/customer-development/thank-you-email-template.html +0 -124
  78. package/dist/registry/templates/customer-development/thank-you-note-template.md +0 -16
  79. package/dist/registry/templates/customer-development/triage-log-template.md +0 -278
  80. package/dist/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
  81. package/dist/registry/templates/evidence/Design-Evidence.md +0 -30
  82. package/dist/registry/templates/evidence/Implementation-BugEvidence.md +0 -94
  83. package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -129
  84. package/dist/registry/templates/evidence/Spec-Evidence.md +0 -19
  85. package/dist/registry/templates/help/HelpNeeded.md +0 -14
  86. package/dist/registry/templates/legal/NDA-TEMPLATE.md +0 -170
  87. package/dist/registry/templates/legal/PATENT-TEMPLATE.md +0 -372
  88. package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +0 -339
  89. package/dist/registry/templates/legal/contract-review-checklist.md +0 -193
  90. package/dist/registry/templates/legal/review-report-template.md +0 -198
  91. package/dist/registry/templates/legal/saas-terms-template.md +0 -174
  92. package/dist/registry/templates/legal/sow-template.md +0 -117
  93. package/dist/registry/templates/legal/template-variables.md +0 -131
  94. package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +0 -194
  95. package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
  96. package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +0 -130
  97. package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +0 -262
  98. package/dist/registry/templates/marketing/github-pages-workflow.yml +0 -64
  99. package/dist/registry/templates/replicate/implementation-checklist.md +0 -39
  100. package/dist/registry/templates/replicate/use-cases-template.md +0 -88
  101. package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
  102. package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
  103. package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -66
  104. package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
  105. package/dist/registry/workflows/bootstrap/create-architecture.md +0 -38
  106. package/dist/registry/workflows/bootstrap/detect-broken-windows.md +0 -300
  107. package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +0 -35
  108. package/dist/registry/workflows/bootstrap/verify-test-coverage.md +0 -36
  109. package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +0 -211
  110. package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +0 -165
  111. package/dist/registry/workflows/business-development/create-business-plan.md +0 -737
  112. package/dist/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
  113. package/dist/registry/workflows/business-development/price-product.md +0 -325
  114. package/dist/registry/workflows/compliance/detect-compliance-requirements.md +0 -78
  115. package/dist/registry/workflows/compliance/generate-audit-evidence.md +0 -75
  116. package/dist/registry/workflows/compliance/soc2-evidence-generator.md +0 -332
  117. package/dist/registry/workflows/customer-development/insight-analysis.md +0 -156
  118. package/dist/registry/workflows/customer-development/insight-triage.md +0 -938
  119. package/dist/registry/workflows/customer-development/interview-preparation.md +0 -452
  120. package/dist/registry/workflows/customer-development/linkedin-outreach.md +0 -593
  121. package/dist/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
  122. package/dist/registry/workflows/customer-development/thank-customers.md +0 -203
  123. package/dist/registry/workflows/customer-development/user-survey-dispatch.md +0 -60
  124. package/dist/registry/workflows/customer-development/users-to-target.md +0 -112
  125. package/dist/registry/workflows/customer-development/weekly-newsletter.md +0 -366
  126. package/dist/registry/workflows/deploy/cloud-deployment.md +0 -310
  127. package/dist/registry/workflows/improve-fraim/contribute.md +0 -32
  128. package/dist/registry/workflows/improve-fraim/file-issue.md +0 -32
  129. package/dist/registry/workflows/learning/build-skillset.md +0 -212
  130. package/dist/registry/workflows/learning/synthesize-learnings.md +0 -284
  131. package/dist/registry/workflows/legal/contract-review-analysis.md +0 -382
  132. package/dist/registry/workflows/legal/nda.md +0 -69
  133. package/dist/registry/workflows/legal/patent-filing.md +0 -76
  134. package/dist/registry/workflows/legal/saas-contract-development.md +0 -213
  135. package/dist/registry/workflows/legal/trademark-filing.md +0 -77
  136. package/dist/registry/workflows/marketing/content-creation.md +0 -37
  137. package/dist/registry/workflows/marketing/convert-to-pdf.md +0 -235
  138. package/dist/registry/workflows/marketing/create-modern-website.md +0 -456
  139. package/dist/registry/workflows/marketing/domain-registration.md +0 -323
  140. package/dist/registry/workflows/marketing/hbr-article.md +0 -73
  141. package/dist/registry/workflows/marketing/launch-checklist.md +0 -37
  142. package/dist/registry/workflows/marketing/marketing-strategy.md +0 -45
  143. package/dist/registry/workflows/marketing/storytelling.md +0 -65
  144. package/dist/registry/workflows/performance/analyze-performance.md +0 -65
  145. package/dist/registry/workflows/product-building/design.md +0 -103
  146. package/dist/registry/workflows/product-building/implement.md +0 -74
  147. package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
  148. package/dist/registry/workflows/product-building/prep-issue.md +0 -41
  149. package/dist/registry/workflows/product-building/prototype.md +0 -65
  150. package/dist/registry/workflows/product-building/resolve.md +0 -168
  151. package/dist/registry/workflows/product-building/retrospect.md +0 -86
  152. package/dist/registry/workflows/product-building/spec.md +0 -181
  153. package/dist/registry/workflows/product-building/test.md +0 -125
  154. package/dist/registry/workflows/productivity-report/productivity-report.md +0 -263
  155. package/dist/registry/workflows/quality-assurance/browser-validation.md +0 -221
  156. package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
  157. package/dist/registry/workflows/replicate/replicate-discovery.md +0 -336
  158. package/dist/registry/workflows/replicate/replicate-to-issues.md +0 -324
  159. package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -638
  160. package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -675
  161. package/dist/registry/workflows/startup-credits/aws-activate-application.md +0 -535
  162. package/dist/registry/workflows/startup-credits/google-cloud-application.md +0 -647
  163. package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
  164. package/dist/scripts/build-stub-registry.js +0 -108
  165. package/dist/src/ai-manager/ai-manager.js +0 -480
  166. package/dist/src/ai-manager/phase-flow.js +0 -357
  167. package/dist/src/ai-manager/types.js +0 -5
  168. package/dist/src/fraim-mcp-server.js +0 -1885
  169. package/dist/tests/debug-tools.js +0 -80
  170. package/dist/tests/shared-server-utils.js +0 -57
  171. package/dist/tests/test-add-ide.js +0 -283
  172. package/dist/tests/test-ai-coach-edge-cases.js +0 -420
  173. package/dist/tests/test-ai-coach-mcp-integration.js +0 -450
  174. package/dist/tests/test-ai-coach-performance.js +0 -328
  175. package/dist/tests/test-ai-coach-phase-content.js +0 -264
  176. package/dist/tests/test-ai-coach-workflows.js +0 -514
  177. package/dist/tests/test-cli.js +0 -228
  178. package/dist/tests/test-client-scripts-validation.js +0 -167
  179. package/dist/tests/test-complete-setup-flow.js +0 -110
  180. package/dist/tests/test-config-system.js +0 -279
  181. package/dist/tests/test-debug-session.js +0 -134
  182. package/dist/tests/test-end-to-end-hybrid-validation.js +0 -328
  183. package/dist/tests/test-enhanced-session-init.js +0 -188
  184. package/dist/tests/test-first-run-journey.js +0 -368
  185. package/dist/tests/test-fraim-issues.js +0 -59
  186. package/dist/tests/test-genericization.js +0 -44
  187. package/dist/tests/test-hybrid-script-execution.js +0 -340
  188. package/dist/tests/test-ide-detector.js +0 -46
  189. package/dist/tests/test-improved-setup.js +0 -121
  190. package/dist/tests/test-mcp-config-generator.js +0 -99
  191. package/dist/tests/test-mcp-connection.js +0 -107
  192. package/dist/tests/test-mcp-issue-integration.js +0 -156
  193. package/dist/tests/test-mcp-lifecycle-methods.js +0 -240
  194. package/dist/tests/test-mcp-shared-server.js +0 -308
  195. package/dist/tests/test-mcp-template-processing.js +0 -160
  196. package/dist/tests/test-modular-issue-tracking.js +0 -165
  197. package/dist/tests/test-node-compatibility.js +0 -95
  198. package/dist/tests/test-npm-install.js +0 -68
  199. package/dist/tests/test-package-size.js +0 -108
  200. package/dist/tests/test-pr-review-workflow.js +0 -307
  201. package/dist/tests/test-prep-issue.js +0 -129
  202. package/dist/tests/test-productivity-integration.js +0 -157
  203. package/dist/tests/test-script-location-independence.js +0 -198
  204. package/dist/tests/test-script-sync.js +0 -557
  205. package/dist/tests/test-server-utils.js +0 -32
  206. package/dist/tests/test-session-rehydration.js +0 -148
  207. package/dist/tests/test-setup-integration.js +0 -98
  208. package/dist/tests/test-setup-scenarios.js +0 -322
  209. package/dist/tests/test-standalone.js +0 -143
  210. package/dist/tests/test-stub-registry.js +0 -136
  211. package/dist/tests/test-sync-stubs.js +0 -143
  212. package/dist/tests/test-sync-version-update.js +0 -93
  213. package/dist/tests/test-telemetry.js +0 -193
  214. package/dist/tests/test-token-validator.js +0 -30
  215. package/dist/tests/test-user-journey.js +0 -236
  216. package/dist/tests/test-users-to-target-workflow.js +0 -253
  217. package/dist/tests/test-utils.js +0 -109
  218. package/dist/tests/test-wizard.js +0 -71
  219. package/dist/tests/test-workflow-discovery.js +0 -242
  220. package/labels.json +0 -52
  221. package/registry/agent-guardrails.md +0 -63
  222. package/registry/fraim.md +0 -48
  223. package/setup.js +0 -171
  224. package/tsconfig.json +0 -23
@@ -1,242 +0,0 @@
1
- "use strict";
2
- /**
3
- * Tests for dynamic workflow discovery in MCP server
4
- * Ensures workflows from all categories can be found without hardcoded category lists
5
- */
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- const node_test_1 = require("node:test");
11
- const node_assert_1 = __importDefault(require("node:assert"));
12
- const shared_server_utils_js_1 = require("./shared-server-utils.js");
13
- (0, node_test_1.describe)('Workflow Discovery', () => {
14
- (0, node_test_1.before)(async () => {
15
- // Wait for the test server to be ready
16
- await (0, shared_server_utils_js_1.waitForServer)();
17
- });
18
- (0, node_test_1.describe)('Dynamic Category Discovery', () => {
19
- (0, node_test_1.it)('should find workflows from product-building category', async () => {
20
- const axios = require('axios');
21
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
22
- jsonrpc: '2.0',
23
- id: 1,
24
- method: 'tools/call',
25
- params: {
26
- name: 'get_fraim_workflow',
27
- arguments: { workflow: 'spec' }
28
- }
29
- });
30
- node_assert_1.default.strictEqual(response.status, 200);
31
- node_assert_1.default.ok(response.data.result);
32
- node_assert_1.default.ok(response.data.result.content);
33
- node_assert_1.default.ok(Array.isArray(response.data.result.content));
34
- const content = response.data.result.content[0];
35
- node_assert_1.default.strictEqual(content.type, 'text');
36
- node_assert_1.default.ok(content.text.includes('Workflow: spec'));
37
- node_assert_1.default.ok(content.text.includes('workflows/product-building/spec.md'));
38
- });
39
- (0, node_test_1.it)('should find workflows from compliance category', async () => {
40
- const axios = require('axios');
41
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
42
- jsonrpc: '2.0',
43
- id: 2,
44
- method: 'tools/call',
45
- params: {
46
- name: 'get_fraim_workflow',
47
- arguments: { workflow: 'detect-compliance-requirements' }
48
- }
49
- });
50
- node_assert_1.default.strictEqual(response.status, 200);
51
- node_assert_1.default.ok(response.data.result);
52
- node_assert_1.default.ok(response.data.result.content);
53
- const content = response.data.result.content[0];
54
- node_assert_1.default.strictEqual(content.type, 'text');
55
- node_assert_1.default.ok(content.text.includes('Workflow: detect-compliance-requirements'));
56
- node_assert_1.default.ok(content.text.includes('workflows/compliance/detect-compliance-requirements.md'));
57
- node_assert_1.default.ok(content.text.includes('Detect Compliance Requirements'));
58
- });
59
- (0, node_test_1.it)('should find workflows from brainstorming category', async () => {
60
- const axios = require('axios');
61
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
62
- jsonrpc: '2.0',
63
- id: 3,
64
- method: 'tools/call',
65
- params: {
66
- name: 'get_fraim_workflow',
67
- arguments: { workflow: 'blue-sky-brainstorming' }
68
- }
69
- });
70
- node_assert_1.default.strictEqual(response.status, 200);
71
- node_assert_1.default.ok(response.data.result);
72
- node_assert_1.default.ok(response.data.result.content);
73
- const content = response.data.result.content[0];
74
- node_assert_1.default.strictEqual(content.type, 'text');
75
- node_assert_1.default.ok(content.text.includes('Workflow: blue-sky-brainstorming'));
76
- node_assert_1.default.ok(content.text.includes('workflows/brainstorming/blue-sky-brainstorming.md'));
77
- });
78
- (0, node_test_1.it)('should find workflows from learning category', async () => {
79
- const axios = require('axios');
80
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
81
- jsonrpc: '2.0',
82
- id: 4,
83
- method: 'tools/call',
84
- params: {
85
- name: 'get_fraim_workflow',
86
- arguments: { workflow: 'synthesize-learnings' }
87
- }
88
- });
89
- node_assert_1.default.strictEqual(response.status, 200);
90
- node_assert_1.default.ok(response.data.result);
91
- node_assert_1.default.ok(response.data.result.content);
92
- const content = response.data.result.content[0];
93
- node_assert_1.default.strictEqual(content.type, 'text');
94
- node_assert_1.default.ok(content.text.includes('Workflow: synthesize-learnings'));
95
- node_assert_1.default.ok(content.text.includes('workflows/learning/synthesize-learnings.md'));
96
- });
97
- (0, node_test_1.it)('should find workflows from replicate category', async () => {
98
- const axios = require('axios');
99
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
100
- jsonrpc: '2.0',
101
- id: 5,
102
- method: 'tools/call',
103
- params: {
104
- name: 'get_fraim_workflow',
105
- arguments: { workflow: 'replicate-discovery' }
106
- }
107
- });
108
- node_assert_1.default.strictEqual(response.status, 200);
109
- node_assert_1.default.ok(response.data.result);
110
- node_assert_1.default.ok(response.data.result.content);
111
- const content = response.data.result.content[0];
112
- node_assert_1.default.strictEqual(content.type, 'text');
113
- node_assert_1.default.ok(content.text.includes('Workflow: replicate-discovery'));
114
- node_assert_1.default.ok(content.text.includes('workflows/replicate/replicate-discovery.md'));
115
- });
116
- (0, node_test_1.it)('should find workflows from marketing category', async () => {
117
- const axios = require('axios');
118
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
119
- jsonrpc: '2.0',
120
- id: 6,
121
- method: 'tools/call',
122
- params: {
123
- name: 'get_fraim_workflow',
124
- arguments: { workflow: 'create-modern-website' }
125
- }
126
- });
127
- node_assert_1.default.strictEqual(response.status, 200);
128
- node_assert_1.default.ok(response.data.result);
129
- node_assert_1.default.ok(response.data.result.content);
130
- const content = response.data.result.content[0];
131
- node_assert_1.default.strictEqual(content.type, 'text');
132
- node_assert_1.default.ok(content.text.includes('Workflow: create-modern-website'));
133
- node_assert_1.default.ok(content.text.includes('workflows/marketing/create-modern-website.md'));
134
- });
135
- });
136
- (0, node_test_1.describe)('Error Handling', () => {
137
- (0, node_test_1.it)('should return helpful error for non-existent workflow', async () => {
138
- const axios = require('axios');
139
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
140
- jsonrpc: '2.0',
141
- id: 7,
142
- method: 'tools/call',
143
- params: {
144
- name: 'get_fraim_workflow',
145
- arguments: { workflow: 'non-existent-workflow' }
146
- }
147
- });
148
- node_assert_1.default.strictEqual(response.status, 200);
149
- node_assert_1.default.ok(response.data.result);
150
- node_assert_1.default.ok(response.data.result.content);
151
- const content = response.data.result.content[0];
152
- node_assert_1.default.strictEqual(content.type, 'text');
153
- node_assert_1.default.ok(content.text.includes('Workflow "non-existent-workflow" not found'));
154
- node_assert_1.default.ok(content.text.includes('Available workflows:'));
155
- });
156
- (0, node_test_1.it)('should handle workflow names with .md extension', async () => {
157
- const axios = require('axios');
158
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
159
- jsonrpc: '2.0',
160
- id: 8,
161
- method: 'tools/call',
162
- params: {
163
- name: 'get_fraim_workflow',
164
- arguments: { workflow: 'spec.md' }
165
- }
166
- });
167
- node_assert_1.default.strictEqual(response.status, 200);
168
- node_assert_1.default.ok(response.data.result);
169
- node_assert_1.default.ok(response.data.result.content);
170
- const content = response.data.result.content[0];
171
- node_assert_1.default.strictEqual(content.type, 'text');
172
- node_assert_1.default.ok(content.text.includes('Workflow: spec'));
173
- node_assert_1.default.ok(content.text.includes('workflows/product-building/spec.md'));
174
- });
175
- });
176
- (0, node_test_1.describe)('Regression Prevention', () => {
177
- (0, node_test_1.it)('should discover all workflow categories dynamically', async () => {
178
- const axios = require('axios');
179
- // Test that we can find workflows from multiple categories without hardcoding
180
- const testCases = [
181
- { workflow: 'spec', expectedCategory: 'product-building' },
182
- { workflow: 'detect-compliance-requirements', expectedCategory: 'compliance' },
183
- { workflow: 'blue-sky-brainstorming', expectedCategory: 'brainstorming' },
184
- { workflow: 'synthesize-learnings', expectedCategory: 'learning' },
185
- { workflow: 'replicate-discovery', expectedCategory: 'replicate' },
186
- { workflow: 'create-modern-website', expectedCategory: 'marketing' }
187
- ];
188
- for (const testCase of testCases) {
189
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
190
- jsonrpc: '2.0',
191
- id: 100 + testCases.indexOf(testCase),
192
- method: 'tools/call',
193
- params: {
194
- name: 'get_fraim_workflow',
195
- arguments: { workflow: testCase.workflow }
196
- }
197
- });
198
- node_assert_1.default.strictEqual(response.status, 200, `Failed to find workflow: ${testCase.workflow}`);
199
- node_assert_1.default.ok(response.data.result, `No result for workflow: ${testCase.workflow}`);
200
- node_assert_1.default.ok(response.data.result.content, `No content for workflow: ${testCase.workflow}`);
201
- const content = response.data.result.content[0];
202
- node_assert_1.default.strictEqual(content.type, 'text');
203
- node_assert_1.default.ok(content.text.includes(`workflows/${testCase.expectedCategory}/${testCase.workflow}.md`), `Expected workflow ${testCase.workflow} to be found in category ${testCase.expectedCategory}, but got: ${content.text.substring(0, 200)}`);
204
- }
205
- });
206
- (0, node_test_1.it)('should not fail when new categories are added', async () => {
207
- // This test documents the expected behavior:
208
- // When new workflow categories are added to the registry,
209
- // they should be automatically discoverable without code changes
210
- const axios = require('axios');
211
- // Get list of all workflows to verify dynamic discovery is working
212
- const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
213
- jsonrpc: '2.0',
214
- id: 200,
215
- method: 'tools/call',
216
- params: {
217
- name: 'list_fraim_workflows'
218
- }
219
- });
220
- node_assert_1.default.strictEqual(response.status, 200);
221
- node_assert_1.default.ok(response.data.result);
222
- node_assert_1.default.ok(response.data.result.content);
223
- const content = response.data.result.content[0];
224
- node_assert_1.default.strictEqual(content.type, 'text');
225
- // Verify that multiple categories are listed
226
- const expectedCategories = [
227
- 'bootstrap',
228
- 'brainstorming',
229
- 'business-development',
230
- 'compliance',
231
- 'customer-development',
232
- 'learning',
233
- 'marketing',
234
- 'product-building',
235
- 'replicate'
236
- ];
237
- for (const category of expectedCategories) {
238
- node_assert_1.default.ok(content.text.includes(category), `Expected category "${category}" to be listed in workflows, but got: ${content.text.substring(0, 500)}`);
239
- }
240
- });
241
- });
242
- });
package/labels.json DELETED
@@ -1,52 +0,0 @@
1
- [
2
- {
3
- "name": "phase:spec",
4
- "color": "008672",
5
- "description": "Specification creation phase"
6
- },
7
- {
8
- "name": "phase:design",
9
- "color": "0075ca",
10
- "description": "Design and RFC creation phase"
11
- },
12
- {
13
- "name": "phase:impl",
14
- "color": "7057ff",
15
- "description": "Implementation and development phase"
16
- },
17
- {
18
- "name": "phase:tests",
19
- "color": "008672",
20
- "description": "Testing and validation phase"
21
- },
22
- {
23
- "name": "status:wip",
24
- "color": "fbca04",
25
- "description": "Work in progress"
26
- },
27
- {
28
- "name": "status:needs-review",
29
- "color": "fbca04",
30
- "description": "Ready for review"
31
- },
32
- {
33
- "name": "status:complete",
34
- "color": "0e8a16",
35
- "description": "Work completed"
36
- },
37
- {
38
- "name": "ai-agent:cursor",
39
- "color": "c5def5",
40
- "description": "Assigned to Cursor"
41
- },
42
- {
43
- "name": "ai-agent:claude",
44
- "color": "c5def5",
45
- "description": "Assigned to Claude"
46
- },
47
- {
48
- "name": "ai-agent:windsurf",
49
- "color": "c5def5",
50
- "description": "Assigned to Windsurf"
51
- }
52
- ]
@@ -1,63 +0,0 @@
1
- # AI Agent Guardrails
2
-
3
- This file references the centralized rules located in `rules/` to ensure consistency across all AI platforms.
4
-
5
- ## SUCCESS CRITERIA (THE "FRAIM 5")
6
- **Source**: Retrieve via `get_fraim_file({ path: "rules/agent-success-criteria.md" })`
7
-
8
- All agents are evaluated on:
9
- 1. **Integrity (100 pts)**: Honesty above all.
10
- 2. **Correctness (50 pts)**: Architecture & tests.
11
- 3. **Completeness (30 pts)**: Thoroughness.
12
- 4. **Independence (20 pts)**: Smart decisions.
13
- 5. **Speed (10 pts)**: Velocity.
14
-
15
- ## Referenced Rules
16
-
17
- ### 0. Integrity
18
- **Source**: Retrieve via `get_fraim_file({ path: "rules/integrity-and-test-ethics.md" })`
19
-
20
- THIS IS THE MOST CRITICAL RULE. Be ethical, truthful, honest above all.
21
-
22
- ### 1. Simplicity
23
- **Source**: Retrieve via `get_fraim_file({ path: "rules/simplicity.md" })`
24
-
25
- Keep solutions simple and focused, avoid over-engineering. Focus on the assigned issue only and don't make unrelated changes.
26
-
27
- ### 2. Communication
28
- **Source**: Retrieve via `get_fraim_file({ path: "rules/communication.md" })`
29
-
30
- Establish clear communication patterns and progress reporting standards for effective coordination between agents and stakeholders.
31
-
32
- ### 3. Architecture
33
- **Source**: Read local architecture document (path from `.fraim/config.json` `customizations.architectureDoc`)
34
-
35
- Maintain clean architectural boundaries by using BAML (LLM) for natural-language understanding and TypeScript for deterministic work.
36
-
37
- ### 4. Continuous Learning
38
- **Source**: Retrieve via `get_fraim_file({ path: "rules/continuous-learning.md" })`
39
-
40
- Prevent repeating past mistakes by systematically learning from retrospectives, RFCs, and historical issue patterns.
41
-
42
- ### 5. Agent Testing Guidelines
43
- **Source**: Retrieve via `get_fraim_file({ path: "rules/agent-testing-guidelines.md" })`
44
-
45
- Comprehensive testing and validation requirements with concrete evidence. Ensures all work is thoroughly validated before completion.
46
-
47
- ### 6. Local Development
48
- **Source**: Retrieve via `get_fraim_file({ path: "rules/local-development.md" })`
49
-
50
- Local development guidelines and workspace safety. Enables safe parallel development through strict workspace separation.
51
-
52
- ### 7. Software Development Lifecycle
53
- **Source**: Retrieve via `get_fraim_file({ path: "rules/software-development-lifecycle.md" })`
54
-
55
- ### 9. Merge Requirements
56
- **Source**: Retrieve via `get_fraim_file({ path: "rules/merge-requirements.md" })`
57
-
58
- Enforces a strict `git rebase` workflow to ensure feature branches are up-to-date with `master` before merging, maintaining a clean and stable history.
59
-
60
- ### 10. Best practices while debuggin
61
- **Source**: Retrieve via `get_fraim_file({ path: "rules/successful-debugging-patterns.md" })`
62
-
63
- Patterns on debugging issues systematically and converting learnings into test cases
package/registry/fraim.md DELETED
@@ -1,48 +0,0 @@
1
- # FRAIM - Agent Instructions
2
-
3
- ## What is FRAIM?
4
-
5
- FRAIM provides workflows, rules, templates, and scripts for AI agents. Use it to get structured guidance for development and customer development tasks.
6
-
7
- ## How to Use FRAIM
8
-
9
- ### 1. Initialize First
10
- **Always call `@fraim_mcp init` at the start of your session.** This loads all rules and available workflows.
11
-
12
- ### 2. Get Workflows
13
- Use `@fraim_mcp` with a natural language description:
14
- - `@fraim_mcp write a spec for issue #631`
15
- - `@fraim_mcp design a new feature`
16
- - `@fraim_mcp implement a bug fix`
17
- - `@fraim_mcp write tests`
18
-
19
- FRAIM returns a complete package:
20
- - Workflow file with step-by-step instructions
21
- - Templates to fill out
22
- - Scripts to run
23
- - Rules you must follow
24
-
25
- ### 3. Follow the Package
26
- 1. Read the workflow file
27
- 2. Use the provided templates (don't create from scratch)
28
- 3. Run the provided scripts
29
- 4. Follow all rules (they are mandatory)
30
-
31
- ## Available Tools
32
-
33
- - `@fraim_mcp init` - Initialize and get all rules
34
- - `@fraim_mcp <workflow description>` - Get workflow package
35
- - `@fraim_mcp get <path>` - Get specific file (e.g., `workflows/spec.md`)
36
- - `@fraim_mcp list files` - Browse available files
37
- - `@fraim_mcp search <keyword>` - Find content by keyword
38
-
39
- ## Key Rules (All Active)
40
-
41
- - **Integrity**: Be ethical, truthful, honest
42
- - **Simplicity**: Keep solutions simple, avoid over-engineering
43
- - **Communication**: Provide clear progress updates
44
- - **Testing**: Comprehensive testing requirements (see agent-testing-guidelines.md)
45
- - **Code Quality**: Never use `as any`, follow debugging patterns
46
- - **PR Workflow**: Complete PR lifecycle handling
47
-
48
- **All rules are mandatory. Read them carefully when provided in workflow packages.**
package/setup.js DELETED
@@ -1,171 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- // Colors for console output
5
- const colors = {
6
- green: '\x1b[32m',
7
- red: '\x1b[31m',
8
- yellow: '\x1b[33m',
9
- reset: '\x1b[0m'
10
- };
11
-
12
- // Utility functions
13
- function ensureDirectory(dirPath) {
14
- if (!fs.existsSync(dirPath)) {
15
- fs.mkdirSync(dirPath, { recursive: true });
16
- }
17
- }
18
-
19
- function logSuccess(message) {
20
- console.log(`${colors.green}✓ ${message}${colors.reset}`);
21
- }
22
-
23
- function logError(message) {
24
- console.log(`${colors.red}✗ ${message}${colors.reset}`);
25
- }
26
-
27
- // Copy directory recursively
28
- function copyDirectory(src, dest) {
29
- if (!fs.existsSync(src)) {
30
- console.log(`⚠️ Warning: ${src} not found in package`);
31
- return;
32
- }
33
-
34
- ensureDirectory(dest);
35
- const items = fs.readdirSync(src);
36
-
37
- for (const item of items) {
38
- const srcPath = path.join(src, item);
39
- const destPath = path.join(dest, item);
40
-
41
- if (fs.statSync(srcPath).isDirectory()) {
42
- copyDirectory(srcPath, destPath);
43
- } else {
44
- fs.copyFileSync(srcPath, destPath);
45
- }
46
- }
47
- }
48
-
49
- // Copy single file
50
- function copyFile(src, dest) {
51
- if (!fs.existsSync(src)) {
52
- console.log(`⚠️ Warning: ${src} not found in package`);
53
- return;
54
- }
55
-
56
- // Ensure destination directory exists
57
- const destDir = path.dirname(dest);
58
- ensureDirectory(destDir);
59
-
60
- fs.copyFileSync(src, dest);
61
- }
62
-
63
- // Create GitHub labels from labels.json
64
- function createGitHubLabels() {
65
- const labelsPath = path.join(__dirname, 'labels.json');
66
- if (!fs.existsSync(labelsPath)) {
67
- console.log('⚠️ Warning: labels.json not found in package');
68
- return;
69
- }
70
-
71
- const labelsContent = fs.readFileSync(labelsPath, 'utf8');
72
-
73
- // Always copy the labels.json file
74
- fs.writeFileSync('labels.json', labelsContent);
75
- logSuccess('Created labels.json');
76
-
77
- // Check if we're in a git repository
78
- const isGitRepo = fs.existsSync('.git');
79
-
80
- if (isGitRepo) {
81
- // We're in a git repo, run the script
82
- try {
83
- const { execSync } = require('child_process');
84
- const os = require('os');
85
-
86
- if (os.platform() === 'win32') {
87
- // Windows: use bash to run the script
88
- execSync('bash .ai-agents/scripts/create-git-labels.sh labels.json', { stdio: 'inherit' });
89
- } else {
90
- // Unix-like: make executable and run
91
- execSync('chmod +x .ai-agents/scripts/create-git-labels.sh');
92
- execSync('.ai-agents/scripts/create-git-labels.sh labels.json', { stdio: 'inherit' });
93
- }
94
- logSuccess('Created GitHub labels');
95
- } catch (error) {
96
- console.log('⚠️ Could not create GitHub labels automatically. Run manually:');
97
- if (require('os').platform() === 'win32') {
98
- console.log(' bash .ai-agents/scripts/create-git-labels.sh labels.json');
99
- } else {
100
- console.log(' .ai-agents/scripts/create-git-labels.sh labels.json');
101
- }
102
- }
103
- } else {
104
- // Not in a git repo, give instructions
105
- console.log('📝 Note: Not in a git repository. To create GitHub labels:');
106
- console.log(' 1. Initialize git repo: git init');
107
- console.log(' 2. Create GitHub repo and connect it');
108
- if (require('os').platform() === 'win32') {
109
- console.log(' 3. Run: bash .ai-agents/scripts/create-git-labels.sh labels.json');
110
- } else {
111
- console.log(' 3. Run: .ai-agents/scripts/create-git-labels.sh labels.json');
112
- }
113
- }
114
- }
115
-
116
- // Main setup function
117
- function runSetup() {
118
- try {
119
- // Copy full directories
120
- const directoriesToCopy = [
121
- '.ai-agents',
122
- '.cursor',
123
- '.windsurf',
124
- '.github/workflows',
125
- 'examples'
126
- ];
127
-
128
- directoriesToCopy.forEach(dir => {
129
- const srcPath = path.join(__dirname, dir);
130
- const destPath = dir;
131
- copyDirectory(srcPath, destPath);
132
- logSuccess(`Copied ${dir}/`);
133
- });
134
-
135
- // Copy individual files
136
- const filesToCopy = [
137
- 'Claude.md',
138
- 'sample_package.json',
139
- 'test-utils.ts',
140
- 'tsconfig.json'
141
- ];
142
-
143
- filesToCopy.forEach(file => {
144
- const srcPath = path.join(__dirname, file);
145
- copyFile(srcPath, file);
146
- logSuccess(`Copied ${file}`);
147
- });
148
-
149
- // Create special files
150
- createGitHubLabels();
151
-
152
- console.log('\n✅ FRAIM setup complete!');
153
- console.log('🎯 Your repository is now ready for AI agent management.');
154
- console.log('📚 Next steps:');
155
- console.log(' 1. Customize .ai-agents/rules/architecture.md for your project');
156
- console.log(' 2. Update .ai-agents/scripts/cleanup-branch.ts with your cleanup logic');
157
- console.log(' 3. Copy scripts from sample_package.json to your package.json');
158
- console.log(' 4. Start creating issues with ai-agent labels!');
159
-
160
- } catch (error) {
161
- logError(`Setup failed: ${error.message}`);
162
- throw error;
163
- }
164
- }
165
-
166
- // If this file is run directly, execute setup
167
- if (require.main === module) {
168
- runSetup();
169
- }
170
-
171
- module.exports = { runSetup };
package/tsconfig.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2021",
4
- "module": "commonjs",
5
- "lib": [
6
- "es2021"
7
- ],
8
- "outDir": "./dist",
9
- "rootDir": "./",
10
- "strict": true,
11
- "esModuleInterop": true,
12
- "skipLibCheck": true,
13
- "forceConsistentCasingInFileNames": true
14
- },
15
- "include": [
16
- "src/**/*.ts",
17
- "tests/**/*.ts",
18
- "registry/**/*.ts"
19
- ],
20
- "exclude": [
21
- "node_modules"
22
- ]
23
- }