fraim-framework 2.0.52 → 2.0.54

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 (98) hide show
  1. package/dist/registry/scripts/profile-server.js +2 -1
  2. package/dist/src/ai-manager/ai-manager.js +49 -1
  3. package/dist/src/ai-manager/phase-flow.js +68 -0
  4. package/dist/tests/test-debug-session.js +6 -2
  5. package/dist/tests/test-enhanced-session-init.js +6 -2
  6. package/dist/tests/test-mcp-lifecycle-methods.js +1 -2
  7. package/dist/tests/test-mcp-template-processing.js +6 -2
  8. package/dist/tests/test-modular-issue-tracking.js +6 -2
  9. package/dist/tests/test-node-compatibility.js +4 -2
  10. package/dist/tests/test-npm-install.js +4 -2
  11. package/dist/tests/test-productivity-integration.js +157 -0
  12. package/dist/tests/test-session-rehydration.js +1 -2
  13. package/dist/tests/test-telemetry.js +1 -2
  14. package/dist/tests/test-users-to-target-workflow.js +256 -0
  15. package/package.json +1 -1
  16. package/registry/agent-guardrails.md +62 -62
  17. package/registry/scripts/detect-tautological-tests.sh +38 -38
  18. package/registry/scripts/productivity/build-productivity-csv.mjs +242 -0
  19. package/registry/scripts/productivity/fetch-pr-details.mjs +144 -0
  20. package/registry/scripts/productivity/productivity-report.sh +147 -0
  21. package/registry/scripts/profile-server.ts +1 -1
  22. package/registry/scripts/validate-openapi-limits.ts +366 -366
  23. package/registry/scripts/validate-test-coverage.ts +280 -280
  24. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-customer-profiling.md +11 -0
  25. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-survey-scoping.md +11 -0
  26. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-platform-discovery.md +11 -0
  27. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-survey-build-linkedin.md +11 -0
  28. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-prospect-qualification.md +11 -0
  29. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-survey-build-reddit.md +11 -0
  30. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-inventory-compilation.md +11 -0
  31. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-survey-build-x.md +11 -0
  32. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase5-survey-build-facebook.md +11 -0
  33. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase6-survey-build-custom.md +11 -0
  34. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase7-survey-dispatch.md +11 -0
  35. package/registry/stubs/workflows/customer-development/templates/customer-persona-template.md +11 -0
  36. package/registry/stubs/workflows/customer-development/templates/search-strategy-template.md +11 -0
  37. package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +11 -0
  38. package/registry/stubs/workflows/customer-development/users-to-target.md +11 -0
  39. package/registry/stubs/workflows/productivity-report/productivity-report.md +11 -0
  40. package/bin/fraim.js +0 -8
  41. package/dist/registry/ai-manager-rules/design-phases/design.md +0 -108
  42. package/dist/registry/ai-manager-rules/design-phases/finalize.md +0 -60
  43. package/dist/registry/ai-manager-rules/design-phases/validate.md +0 -125
  44. package/dist/registry/ai-manager-rules/design.json +0 -97
  45. package/dist/registry/ai-manager-rules/implement-phases/code.md +0 -323
  46. package/dist/registry/ai-manager-rules/implement-phases/completeness-review.md +0 -94
  47. package/dist/registry/ai-manager-rules/implement-phases/finalize.md +0 -177
  48. package/dist/registry/ai-manager-rules/implement-phases/quality-review.md +0 -304
  49. package/dist/registry/ai-manager-rules/implement-phases/regression.md +0 -159
  50. package/dist/registry/ai-manager-rules/implement-phases/repro.md +0 -101
  51. package/dist/registry/ai-manager-rules/implement-phases/scoping.md +0 -93
  52. package/dist/registry/ai-manager-rules/implement-phases/smoke.md +0 -225
  53. package/dist/registry/ai-manager-rules/implement-phases/spike.md +0 -118
  54. package/dist/registry/ai-manager-rules/implement-phases/validate.md +0 -347
  55. package/dist/registry/ai-manager-rules/implement.json +0 -153
  56. package/dist/registry/ai-manager-rules/shared-phases/finalize.md +0 -169
  57. package/dist/registry/ai-manager-rules/spec-phases/finalize.md +0 -60
  58. package/dist/registry/ai-manager-rules/spec-phases/spec.md +0 -102
  59. package/dist/registry/ai-manager-rules/spec-phases/validate.md +0 -118
  60. package/dist/registry/ai-manager-rules/spec.json +0 -112
  61. package/dist/registry/ai-manager-rules/test.json +0 -98
  62. package/dist/registry/scripts/build-scripts-generator.js +0 -205
  63. package/dist/registry/scripts/fraim-config.js +0 -61
  64. package/dist/registry/scripts/generic-issues-api.js +0 -100
  65. package/dist/registry/scripts/openapi-generator.js +0 -664
  66. package/dist/registry/scripts/performance/profile-server.js +0 -390
  67. package/dist/src/ai-manager/evidence-validator.js +0 -309
  68. package/dist/src/fraim/issue-tracking/ado-provider.js +0 -304
  69. package/dist/src/fraim/issue-tracking/factory.js +0 -63
  70. package/dist/src/fraim/issue-tracking/github-provider.js +0 -200
  71. package/dist/src/fraim/issue-tracking/types.js +0 -7
  72. package/dist/src/fraim/issue-tracking-config.js +0 -83
  73. package/dist/src/static-website-middleware.js +0 -75
  74. package/dist/test-utils.js +0 -96
  75. package/dist/tests/esm-compat.js +0 -11
  76. package/dist/tests/test-ai-manager-phase-protocol.js +0 -147
  77. package/dist/tests/test-ai-manager.js +0 -118
  78. package/dist/tests/test-chalk-esm-issue.js +0 -159
  79. package/dist/tests/test-chalk-real-world.js +0 -265
  80. package/dist/tests/test-chalk-regression.js +0 -377
  81. package/dist/tests/test-chalk-resolution-issue.js +0 -304
  82. package/dist/tests/test-evidence-validation.js +0 -221
  83. package/dist/tests/test-first-run-interactive.js +0 -1
  84. package/dist/tests/test-fraim-install-chalk-issue.js +0 -254
  85. package/dist/tests/test-markdown-to-pdf.js +0 -454
  86. package/dist/tests/test-npm-resolution-diagnostic.js +0 -140
  87. package/dist/tests/test-pr-review-integration.js +0 -1
  88. package/dist/website/.nojekyll +0 -0
  89. package/dist/website/404.html +0 -101
  90. package/dist/website/CNAME +0 -1
  91. package/dist/website/README.md +0 -22
  92. package/dist/website/demo.html +0 -604
  93. package/dist/website/images/.gitkeep +0 -1
  94. package/dist/website/images/fraim-logo.png +0 -0
  95. package/dist/website/index.html +0 -290
  96. package/dist/website/pricing.html +0 -414
  97. package/dist/website/script.js +0 -55
  98. package/dist/website/styles.css +0 -2647
@@ -0,0 +1,256 @@
1
+ "use strict";
2
+ /**
3
+ * Comprehensive tests for Users to Target workflow
4
+ * Tests the complete customer discovery workflow including:
5
+ * - Phase loading and validation
6
+ * - Template file accessibility
7
+ * - AI coach phase content validation
8
+ * - Output directory structure
9
+ * - CSV template format validation
10
+ * - Browser automation integration points
11
+ */
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ const node_test_1 = require("node:test");
17
+ const node_assert_1 = __importDefault(require("node:assert"));
18
+ const fs_1 = require("fs");
19
+ const path_1 = require("path");
20
+ (0, node_test_1.describe)('Users to Target Workflow', () => {
21
+ const workflowPath = 'registry/workflows/customer-development';
22
+ const mainWorkflowFile = (0, path_1.join)(workflowPath, 'users-to-target.md');
23
+ const templatesPath = (0, path_1.join)(workflowPath, 'templates');
24
+ const aiCoachPhasesPath = (0, path_1.join)(workflowPath, 'ai-coach-phases');
25
+ const outputPath = 'docs/customer-development';
26
+ (0, node_test_1.describe)('Workflow Structure', () => {
27
+ (0, node_test_1.it)('should have main workflow file', () => {
28
+ (0, node_assert_1.default)((0, fs_1.existsSync)(mainWorkflowFile), 'Main workflow file should exist');
29
+ const content = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
30
+ (0, node_assert_1.default)(content.includes('# FRAIM Workflow: users-to-target'), 'Should have proper workflow header');
31
+ (0, node_assert_1.default)(content.includes('## Intent'), 'Should have intent section');
32
+ (0, node_assert_1.default)(content.includes('## Phases'), 'Should have phases section');
33
+ (0, node_assert_1.default)(content.includes('Phase 1: Customer Profiling'), 'Should include Phase 1');
34
+ (0, node_assert_1.default)(content.includes('Phase 2: Multi-Platform Discovery'), 'Should include Phase 2');
35
+ (0, node_assert_1.default)(content.includes('Phase 3: Prospect Qualification'), 'Should include Phase 3');
36
+ (0, node_assert_1.default)(content.includes('Phase 4: Inventory Compilation'), 'Should include Phase 4');
37
+ });
38
+ (0, node_test_1.it)('should have all required template files', () => {
39
+ const requiredTemplates = [
40
+ 'customer-persona-template.md',
41
+ 'search-strategy-template.md',
42
+ 'prospect-inventory-template.csv'
43
+ ];
44
+ requiredTemplates.forEach(template => {
45
+ const templatePath = (0, path_1.join)(templatesPath, template);
46
+ (0, node_assert_1.default)((0, fs_1.existsSync)(templatePath), `Template ${template} should exist`);
47
+ });
48
+ });
49
+ (0, node_test_1.it)('should have all AI coach phase files', () => {
50
+ const requiredPhases = [
51
+ 'phase1-customer-profiling.md',
52
+ 'phase2-platform-discovery.md',
53
+ 'phase3-prospect-qualification.md',
54
+ 'phase4-inventory-compilation.md'
55
+ ];
56
+ requiredPhases.forEach(phase => {
57
+ const phasePath = (0, path_1.join)(aiCoachPhasesPath, phase);
58
+ (0, node_assert_1.default)((0, fs_1.existsSync)(phasePath), `Phase file ${phase} should exist`);
59
+ });
60
+ });
61
+ (0, node_test_1.it)('should have output directory structure', () => {
62
+ (0, node_assert_1.default)((0, fs_1.existsSync)(outputPath), 'Output directory should exist');
63
+ });
64
+ });
65
+ (0, node_test_1.describe)('Template Content Validation', () => {
66
+ (0, node_test_1.it)('should have properly structured customer persona template', () => {
67
+ const templatePath = (0, path_1.join)(templatesPath, 'customer-persona-template.md');
68
+ const content = (0, fs_1.readFileSync)(templatePath, 'utf-8');
69
+ // Check required sections
70
+ (0, node_assert_1.default)(content.includes('## Basic Information'), 'Should have Basic Information section');
71
+ (0, node_assert_1.default)(content.includes('## Demographics'), 'Should have Demographics section');
72
+ (0, node_assert_1.default)(content.includes('## Pain Points & Challenges'), 'Should have Pain Points section');
73
+ (0, node_assert_1.default)(content.includes('## Search Keywords'), 'Should have Search Keywords section');
74
+ (0, node_assert_1.default)(content.includes('### LinkedIn Keywords'), 'Should have LinkedIn keywords section');
75
+ (0, node_assert_1.default)(content.includes('### Reddit Keywords'), 'Should have Reddit keywords section');
76
+ (0, node_assert_1.default)(content.includes('### X (Twitter) Keywords'), 'Should have Twitter keywords section');
77
+ (0, node_assert_1.default)(content.includes('## Qualification Criteria'), 'Should have qualification criteria');
78
+ });
79
+ (0, node_test_1.it)('should have properly structured search strategy template', () => {
80
+ const templatePath = (0, path_1.join)(templatesPath, 'search-strategy-template.md');
81
+ const content = (0, fs_1.readFileSync)(templatePath, 'utf-8');
82
+ // Check platform strategies
83
+ (0, node_assert_1.default)(content.includes('### LinkedIn Strategy'), 'Should have LinkedIn strategy');
84
+ (0, node_assert_1.default)(content.includes('### Reddit Strategy'), 'Should have Reddit strategy');
85
+ (0, node_assert_1.default)(content.includes('### X (Twitter) Strategy'), 'Should have Twitter strategy');
86
+ (0, node_assert_1.default)(content.includes('### Facebook Strategy'), 'Should have Facebook strategy');
87
+ (0, node_assert_1.default)(content.includes('### Forum Strategy'), 'Should have Forum strategy');
88
+ (0, node_assert_1.default)(content.includes('### Web Search Strategy'), 'Should have Web Search strategy');
89
+ (0, node_assert_1.default)(content.includes('## Success Metrics per Platform'), 'Should have success metrics');
90
+ });
91
+ (0, node_test_1.it)('should have properly formatted CSV template', () => {
92
+ const templatePath = (0, path_1.join)(templatesPath, 'prospect-inventory-template.csv');
93
+ const content = (0, fs_1.readFileSync)(templatePath, 'utf-8');
94
+ // Check required CSV columns
95
+ const requiredColumns = [
96
+ 'Name', 'Platform Found', 'Profile URL', 'Contact Information',
97
+ 'Pain Points Identified', 'Relevance Score', 'Discovery Context',
98
+ 'Follow-up Priority', 'Notes', 'Date Found', 'Industry',
99
+ 'Job Title', 'Company', 'Location', 'Engagement Level'
100
+ ];
101
+ const headerLine = content.split('\n')[0];
102
+ requiredColumns.forEach(column => {
103
+ (0, node_assert_1.default)(headerLine.includes(column), `CSV should include ${column} column`);
104
+ });
105
+ // Should have at least 2 sample rows
106
+ const lines = content.split('\n').filter(line => line.trim());
107
+ (0, node_assert_1.default)(lines.length >= 3, 'CSV should have header + at least 2 sample rows');
108
+ });
109
+ });
110
+ (0, node_test_1.describe)('AI Coach Phase Content', () => {
111
+ (0, node_test_1.it)('should have comprehensive Phase 1 coaching content', () => {
112
+ const phasePath = (0, path_1.join)(aiCoachPhasesPath, 'phase1-customer-profiling.md');
113
+ const content = (0, fs_1.readFileSync)(phasePath, 'utf-8');
114
+ (0, node_assert_1.default)(content.includes('## Objective'), 'Should have objective');
115
+ (0, node_assert_1.default)(content.includes('## Key Questions to Ask'), 'Should have coaching questions');
116
+ (0, node_assert_1.default)(content.includes('### Understanding the Business'), 'Should have business questions');
117
+ (0, node_assert_1.default)(content.includes('### Defining the Target Customer'), 'Should have customer questions');
118
+ (0, node_assert_1.default)(content.includes('### Identifying Pain Points'), 'Should have pain point questions');
119
+ (0, node_assert_1.default)(content.includes('## Validation Criteria'), 'Should have validation criteria');
120
+ (0, node_assert_1.default)(content.includes('## Evidence Required'), 'Should have evidence requirements');
121
+ // Should have at least 15 coaching questions
122
+ const questionMatches = content.match(/^\d+\.\s*"/gm);
123
+ (0, node_assert_1.default)(questionMatches && questionMatches.length >= 15, 'Should have at least 15 coaching questions');
124
+ });
125
+ (0, node_test_1.it)('should have browser automation guidance in Phase 2', () => {
126
+ const phasePath = (0, path_1.join)(aiCoachPhasesPath, 'phase2-platform-discovery.md');
127
+ const content = (0, fs_1.readFileSync)(phasePath, 'utf-8');
128
+ // Check browser automation integration
129
+ (0, node_assert_1.default)(content.includes('mcp_playwright_browser_navigate'), 'Should reference Playwright navigation');
130
+ (0, node_assert_1.default)(content.includes('mcp_playwright_browser_snapshot'), 'Should reference Playwright snapshots');
131
+ (0, node_assert_1.default)(content.includes('mcp_playwright_browser_click'), 'Should reference Playwright clicking');
132
+ (0, node_assert_1.default)(content.includes('Authentication Check'), 'Should have authentication handling');
133
+ // Check platform coverage
134
+ (0, node_assert_1.default)(content.includes('LinkedIn'), 'Should cover LinkedIn');
135
+ (0, node_assert_1.default)(content.includes('Reddit'), 'Should cover Reddit');
136
+ (0, node_assert_1.default)(content.includes('X (Twitter)'), 'Should cover Twitter');
137
+ (0, node_assert_1.default)(content.includes('Facebook'), 'Should cover Facebook');
138
+ (0, node_assert_1.default)(content.includes('Industry Forum Search'), 'Should cover forums');
139
+ (0, node_assert_1.default)(content.includes('General Web Search'), 'Should cover web search');
140
+ // Check authentication prompts
141
+ (0, node_assert_1.default)(content.includes('Please log into'), 'Should have login prompts');
142
+ (0, node_assert_1.default)(content.includes('Type \'ready\''), 'Should have confirmation prompts');
143
+ });
144
+ (0, node_test_1.it)('should have scoring system in Phase 3', () => {
145
+ const phasePath = (0, path_1.join)(aiCoachPhasesPath, 'phase3-prospect-qualification.md');
146
+ const content = (0, fs_1.readFileSync)(phasePath, 'utf-8');
147
+ (0, node_assert_1.default)(content.includes('## Scoring System (1-10 Scale)'), 'Should have scoring system');
148
+ (0, node_assert_1.default)(content.includes('Pain Point Match'), 'Should have pain point scoring');
149
+ (0, node_assert_1.default)(content.includes('Authority/Influence'), 'Should have authority scoring');
150
+ (0, node_assert_1.default)(content.includes('Urgency'), 'Should have urgency scoring');
151
+ (0, node_assert_1.default)(content.includes('Accessibility'), 'Should have accessibility scoring');
152
+ (0, node_assert_1.default)(content.includes('Engagement Level'), 'Should have engagement scoring');
153
+ // Check qualification tiers
154
+ (0, node_assert_1.default)(content.includes('Tier 1'), 'Should have tier 1 prospects');
155
+ (0, node_assert_1.default)(content.includes('Tier 2'), 'Should have tier 2 prospects');
156
+ (0, node_assert_1.default)(content.includes('Score 35-50'), 'Should define high-score prospects');
157
+ (0, node_assert_1.default)(content.includes('Score 25-34'), 'Should define medium-score prospects');
158
+ });
159
+ (0, node_test_1.it)('should have CSV compilation guidance in Phase 4', () => {
160
+ const phasePath = (0, path_1.join)(aiCoachPhasesPath, 'phase4-inventory-compilation.md');
161
+ const content = (0, fs_1.readFileSync)(phasePath, 'utf-8');
162
+ (0, node_assert_1.default)(content.includes('## CSV Structure'), 'Should have CSV structure');
163
+ (0, node_assert_1.default)(content.includes('### Required Columns'), 'Should define required columns');
164
+ (0, node_assert_1.default)(content.includes('### Step 2: Priority Assignment'), 'Should have priority assignment');
165
+ (0, node_assert_1.default)(content.includes('High Priority'), 'Should define high priority');
166
+ (0, node_assert_1.default)(content.includes('Medium Priority'), 'Should define medium priority');
167
+ (0, node_assert_1.default)(content.includes('Low Priority'), 'Should define low priority');
168
+ // Check file naming
169
+ (0, node_assert_1.default)(content.includes('users-to-target-{timestamp}.csv'), 'Should have file naming convention');
170
+ (0, node_assert_1.default)(content.includes('docs/customer-development/'), 'Should specify output location');
171
+ });
172
+ });
173
+ (0, node_test_1.describe)('Workflow Integration Points', () => {
174
+ (0, node_test_1.it)('should specify browser automation requirements', () => {
175
+ const mainContent = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
176
+ (0, node_assert_1.default)(mainContent.includes('Playwright MCP'), 'Should mention Playwright MCP requirement');
177
+ (0, node_assert_1.default)(mainContent.includes('Browser automation'), 'Should mention browser automation');
178
+ });
179
+ (0, node_test_1.it)('should define success metrics', () => {
180
+ const mainContent = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
181
+ (0, node_assert_1.default)(mainContent.includes('50-200 qualified prospects'), 'Should define prospect quantity target');
182
+ (0, node_assert_1.default)(mainContent.includes('70%+ relevance score'), 'Should define quality target');
183
+ (0, node_assert_1.default)(mainContent.includes('60%+ of prospects'), 'Should define contact info target');
184
+ });
185
+ (0, node_test_1.it)('should reference all template files', () => {
186
+ const mainContent = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
187
+ (0, node_assert_1.default)(mainContent.includes('customer-persona-template.md'), 'Should reference persona template');
188
+ (0, node_assert_1.default)(mainContent.includes('search-strategy-template.md'), 'Should reference strategy template');
189
+ (0, node_assert_1.default)(mainContent.includes('prospect-inventory-template.csv'), 'Should reference CSV template');
190
+ });
191
+ (0, node_test_1.it)('should reference AI coach integration', () => {
192
+ const mainContent = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
193
+ (0, node_assert_1.default)(mainContent.includes('seekCoachingOnNextStep'), 'Should reference AI coach integration');
194
+ (0, node_assert_1.default)(mainContent.includes('customer-development'), 'Should specify customer-development workflow type');
195
+ });
196
+ });
197
+ (0, node_test_1.describe)('Output Validation', () => {
198
+ (0, node_test_1.it)('should specify correct output file format', () => {
199
+ const phase4Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase4-inventory-compilation.md'), 'utf-8');
200
+ (0, node_assert_1.default)(phase4Content.includes('users-to-target-{YYYY-MM-DD-HHMM}.csv'), 'Should specify timestamp format');
201
+ (0, node_assert_1.default)(phase4Content.includes('docs/customer-development/'), 'Should specify output directory');
202
+ });
203
+ (0, node_test_1.it)('should define minimum success criteria', () => {
204
+ const phase4Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase4-inventory-compilation.md'), 'utf-8');
205
+ (0, node_assert_1.default)(phase4Content.includes('50+ qualified prospects'), 'Should define minimum prospects');
206
+ (0, node_assert_1.default)(phase4Content.includes('70%+ relevance score'), 'Should define minimum relevance');
207
+ (0, node_assert_1.default)(phase4Content.includes('60%+ of prospects'), 'Should define minimum contact success');
208
+ });
209
+ });
210
+ (0, node_test_1.describe)('Error Handling and Edge Cases', () => {
211
+ (0, node_test_1.it)('should include authentication failure handling', () => {
212
+ const phase2Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase2-platform-discovery.md'), 'utf-8');
213
+ (0, node_assert_1.default)(phase2Content.includes('Authentication Failures'), 'Should handle auth failures');
214
+ (0, node_assert_1.default)(phase2Content.includes('Rate Limiting'), 'Should handle rate limiting');
215
+ (0, node_assert_1.default)(phase2Content.includes('Technical Issues'), 'Should handle technical issues');
216
+ });
217
+ (0, node_test_1.it)('should include qualification edge cases', () => {
218
+ const phase3Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase3-prospect-qualification.md'), 'utf-8');
219
+ (0, node_assert_1.default)(phase3Content.includes('Common Pitfalls'), 'Should identify common pitfalls');
220
+ (0, node_assert_1.default)(phase3Content.includes('Over-Qualification'), 'Should warn about over-qualification');
221
+ (0, node_assert_1.default)(phase3Content.includes('Under-Qualification'), 'Should warn about under-qualification');
222
+ });
223
+ (0, node_test_1.it)('should include data quality validation', () => {
224
+ const phase4Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase4-inventory-compilation.md'), 'utf-8');
225
+ (0, node_assert_1.default)(phase4Content.includes('Data Validation'), 'Should include data validation');
226
+ (0, node_assert_1.default)(phase4Content.includes('Quality Assurance'), 'Should include QA checklist');
227
+ (0, node_assert_1.default)(phase4Content.includes('Remove Duplicates'), 'Should handle duplicates');
228
+ });
229
+ });
230
+ });
231
+ /**
232
+ * Integration test that would require actual browser automation
233
+ * This test is commented out as it requires:
234
+ * - Playwright MCP server running
235
+ * - Valid social media accounts
236
+ * - Network connectivity
237
+ * - Longer execution time
238
+ */
239
+ /*
240
+ describe('Users to Target Integration Tests', () => {
241
+ it('should complete end-to-end workflow simulation', async () => {
242
+ // This would test:
243
+ // 1. Loading customer persona template
244
+ // 2. Simulating browser automation (with mocked responses)
245
+ // 3. Generating prospect data
246
+ // 4. Creating CSV output
247
+ // 5. Validating output format and content
248
+
249
+ // Implementation would require:
250
+ // - Mock Playwright MCP responses
251
+ // - Sample social media data
252
+ // - CSV validation logic
253
+ // - File system cleanup
254
+ });
255
+ });
256
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fraim-framework",
3
- "version": "2.0.52",
3
+ "version": "2.0.54",
4
4
  "description": "FRAIM v2: Framework for Rigor-based AI Management - Transform from solo developer to AI manager orchestrating production-ready code with enterprise-grade discipline",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,63 +1,63 @@
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
-
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
63
  Patterns on debugging issues systematically and converting learnings into test cases
@@ -1,38 +1,38 @@
1
- #!/bin/bash
2
-
3
- # Detect Tautological Tests
4
- # This script scans test files for patterns that suggest tests are validating code structure
5
- # (interfaces, enums) rather than runtime behavior.
6
-
7
- echo "🔍 Scanning for Tautological Test Patterns..."
8
- ERROR_FOUND=0
9
-
10
- # Pattern 1: Asserting an array literal equals another array literal (common in enum testing)
11
- # Looks for: assert.deepEqual(['a', 'b'], ['a', 'b'])
12
- if grep -rE "assert\.(deep)?(Strict)?Equal\(\[.*\], \[.*\]\)" test*.ts; then
13
- echo "❌ ERROR: Found potential tautological array comparison. Tests should verify app logic, not hardcoded arrays."
14
- echo " Rationale: Testing that ['A'] equals ['A'] validates nothing about the application."
15
- ERROR_FOUND=1
16
- fi
17
-
18
- # Pattern 2: Asserting properties on an object literal defined in the test (Type/Interface testing)
19
- # Simplified: Look for defining a typed object and immediately asserting on it in the same file
20
- # This is hard to do robustly with just grep, so we'll rely on the Naming Convention check for now.
21
-
22
- # Pattern 3: Test names that explicitly say "Validate Enums", "Validate Fields", etc.
23
- # We match "Validate TaskStatus Enums" or similar phrases
24
- if grep -riE "['\"]Unit: Validate (Enum|Constant|Interface|Type|Field|Object|TaskStatus|Task Object)" test*.ts; then
25
- echo "❌ ERROR: Found test descriptions explicitly claiming to validate Enums/Types/Fields."
26
- echo " Rationale: Unit tests should validate BEHAVIOR (e.g., 'persists correct status'), not definitions."
27
- ERROR_FOUND=1
28
- fi
29
-
30
- if [ $ERROR_FOUND -eq 1 ]; then
31
- echo ""
32
- echo "⚠️ Potential Anti-Patterns Detected."
33
- echo " Please review the identified tests against rules/integrity-and-test-ethics.md"
34
- exit 1
35
- else
36
- echo "✅ No obvious tautological patterns found."
37
- exit 0
38
- fi
1
+ #!/bin/bash
2
+
3
+ # Detect Tautological Tests
4
+ # This script scans test files for patterns that suggest tests are validating code structure
5
+ # (interfaces, enums) rather than runtime behavior.
6
+
7
+ echo "🔍 Scanning for Tautological Test Patterns..."
8
+ ERROR_FOUND=0
9
+
10
+ # Pattern 1: Asserting an array literal equals another array literal (common in enum testing)
11
+ # Looks for: assert.deepEqual(['a', 'b'], ['a', 'b'])
12
+ if grep -rE "assert\.(deep)?(Strict)?Equal\(\[.*\], \[.*\]\)" test*.ts; then
13
+ echo "❌ ERROR: Found potential tautological array comparison. Tests should verify app logic, not hardcoded arrays."
14
+ echo " Rationale: Testing that ['A'] equals ['A'] validates nothing about the application."
15
+ ERROR_FOUND=1
16
+ fi
17
+
18
+ # Pattern 2: Asserting properties on an object literal defined in the test (Type/Interface testing)
19
+ # Simplified: Look for defining a typed object and immediately asserting on it in the same file
20
+ # This is hard to do robustly with just grep, so we'll rely on the Naming Convention check for now.
21
+
22
+ # Pattern 3: Test names that explicitly say "Validate Enums", "Validate Fields", etc.
23
+ # We match "Validate TaskStatus Enums" or similar phrases
24
+ if grep -riE "['\"]Unit: Validate (Enum|Constant|Interface|Type|Field|Object|TaskStatus|Task Object)" test*.ts; then
25
+ echo "❌ ERROR: Found test descriptions explicitly claiming to validate Enums/Types/Fields."
26
+ echo " Rationale: Unit tests should validate BEHAVIOR (e.g., 'persists correct status'), not definitions."
27
+ ERROR_FOUND=1
28
+ fi
29
+
30
+ if [ $ERROR_FOUND -eq 1 ]; then
31
+ echo ""
32
+ echo "⚠️ Potential Anti-Patterns Detected."
33
+ echo " Please review the identified tests against rules/integrity-and-test-ethics.md"
34
+ exit 1
35
+ else
36
+ echo "✅ No obvious tautological patterns found."
37
+ exit 0
38
+ fi