fraim-framework 2.0.30 → 2.0.34

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 (67) hide show
  1. package/bin/fraim.js +3 -18
  2. package/dist/src/cli/commands/init.js +29 -2
  3. package/dist/src/cli/commands/sync.js +82 -70
  4. package/dist/src/utils/script-sync-utils.js +216 -0
  5. package/dist/tests/debug-tools.js +6 -5
  6. package/dist/tests/test-chalk-regression.js +58 -8
  7. package/dist/tests/test-cli.js +70 -5
  8. package/dist/tests/test-end-to-end-hybrid-validation.js +328 -0
  9. package/dist/tests/test-first-run-journey.js +43 -3
  10. package/dist/tests/test-hybrid-script-execution.js +340 -0
  11. package/dist/tests/test-mcp-connection.js +2 -2
  12. package/dist/tests/test-mcp-issue-integration.js +12 -4
  13. package/dist/tests/test-mcp-lifecycle-methods.js +4 -4
  14. package/dist/tests/test-node-compatibility.js +24 -2
  15. package/dist/tests/test-prep-issue.js +4 -1
  16. package/dist/tests/test-script-location-independence.js +173 -0
  17. package/dist/tests/test-script-sync.js +557 -0
  18. package/dist/tests/test-session-rehydration.js +2 -2
  19. package/dist/tests/test-standalone.js +3 -3
  20. package/dist/tests/test-sync-version-update.js +1 -1
  21. package/dist/tests/test-telemetry.js +2 -2
  22. package/dist/tests/test-user-journey.js +8 -4
  23. package/dist/tests/test-utils.js +13 -0
  24. package/dist/tests/test-wizard.js +2 -2
  25. package/package.json +3 -3
  26. package/registry/rules/agent-testing-guidelines.md +502 -502
  27. package/registry/rules/ephemeral-execution.md +37 -27
  28. package/registry/rules/local-development.md +253 -251
  29. package/registry/rules/successful-debugging-patterns.md +491 -482
  30. package/registry/scripts/prep-issue.sh +468 -468
  31. package/registry/workflows/bootstrap/evaluate-code-quality.md +8 -2
  32. package/registry/workflows/bootstrap/verify-test-coverage.md +8 -2
  33. package/registry/workflows/customer-development/thank-customers.md +203 -193
  34. package/registry/workflows/customer-development/weekly-newsletter.md +366 -362
  35. package/registry/workflows/performance/analyze-performance.md +65 -63
  36. package/registry/workflows/product-building/implement.md +6 -2
  37. package/registry/workflows/product-building/prep-issue.md +11 -24
  38. package/registry/workflows/product-building/resolve.md +5 -1
  39. package/registry/workflows/replicate/replicate-discovery.md +336 -0
  40. package/registry/workflows/replicate/replicate-to-issues.md +319 -0
  41. package/registry/workflows/reviewer/review-implementation-vs-design-spec.md +632 -632
  42. package/.windsurf/rules/windsurf-rules.md +0 -7
  43. package/.windsurf/workflows/resolve-issue.md +0 -6
  44. package/.windsurf/workflows/retrospect.md +0 -6
  45. package/.windsurf/workflows/start-design.md +0 -6
  46. package/.windsurf/workflows/start-impl.md +0 -6
  47. package/.windsurf/workflows/start-spec.md +0 -6
  48. package/.windsurf/workflows/start-tests.md +0 -6
  49. package/registry/scripts/build-scripts-generator.ts +0 -216
  50. package/registry/scripts/cleanup-branch.ts +0 -303
  51. package/registry/scripts/fraim-config.ts +0 -63
  52. package/registry/scripts/generate-engagement-emails.ts +0 -744
  53. package/registry/scripts/generic-issues-api.ts +0 -110
  54. package/registry/scripts/newsletter-helpers.ts +0 -874
  55. package/registry/scripts/openapi-generator.ts +0 -695
  56. package/registry/scripts/performance/profile-server.ts +0 -370
  57. package/registry/scripts/run-thank-you-workflow.ts +0 -122
  58. package/registry/scripts/send-newsletter-simple.ts +0 -104
  59. package/registry/scripts/send-thank-you-emails.ts +0 -57
  60. package/registry/workflows/replicate/re-implementation-strategy.md +0 -226
  61. package/registry/workflows/replicate/use-case-extraction.md +0 -135
  62. package/registry/workflows/replicate/visual-analysis.md +0 -154
  63. package/registry/workflows/replicate/website-discovery-analysis.md +0 -231
  64. package/sample_package.json +0 -18
  65. /package/registry/scripts/{replicate/comprehensive-explorer.py → comprehensive-explorer.py} +0 -0
  66. /package/registry/scripts/{replicate/interactive-explorer.py → interactive-explorer.py} +0 -0
  67. /package/registry/scripts/{replicate/scrape-site.py → scrape-site.py} +0 -0
@@ -1,226 +0,0 @@
1
- # Re-implementation Strategy Workflow
2
-
3
- ## INTENT
4
- To systematically re-implement an application based on discovered use cases and analysis, ensuring feature parity and completeness.
5
-
6
- ## PRINCIPLES
7
- - **Feature Parity**: Ensure all discovered features are implemented
8
- - **Systematic Approach**: Follow structured implementation phases
9
- - **Incremental Progress**: Implement features one at a time
10
- - **Validation**: Verify parity at each stage
11
-
12
- ## Overview
13
- This workflow guides agents through systematically re-implementing an application based on discovered use cases and analysis, ensuring feature parity and completeness.
14
-
15
- ## When to Use This Workflow
16
-
17
- Use this workflow when:
18
- - Re-implementing an existing application
19
- - Migrating an application to a new technology stack
20
- - Creating a feature-complete replica of an application
21
-
22
- This workflow builds on:
23
- - `workflows/replicate/website-discovery-analysis.md` - Initial discovery
24
- - `workflows/replicate/use-case-extraction.md` - Use case documentation
25
-
26
- And uses:
27
- - `workflows/spec.md` - Specification phase
28
- - `workflows/design.md` - Design phase
29
- - `workflows/implement.md` - Implementation phase
30
- - `workflows/test.md` - Testing phase
31
-
32
- ## Prerequisites
33
- - Completed Website Discovery & Analysis workflow (`workflows/replicate/website-discovery-analysis.md`)
34
- - Completed Use Case Extraction workflow (`workflows/replicate/use-case-extraction.md`)
35
- - Technology stack selected (e.g., React, Node.js, MongoDB)
36
- - Development environment set up
37
-
38
- ## Workflow Steps
39
-
40
- ### Phase 1: Feature Mapping
41
-
42
- 1. **Create Feature Inventory**
43
- - List all features from use case documentation
44
- - Group features by domain/area (Auth, Events, Organizations, etc.)
45
- - Identify dependencies between features
46
- - Create implementation priority matrix
47
-
48
- 2. **Map Features to Implementation Tasks**
49
- For each feature, identify:
50
- - **Database Models**: What data structures are needed
51
- - **API Endpoints**: What backend routes are required
52
- - **Frontend Components**: What UI components are needed
53
- - **User Flows**: What navigation and interactions are required
54
-
55
- 3. **Create Implementation Checklist**
56
- - Use template: `templates/replicate/implementation-checklist.md`
57
- - Track status: Not Started / In Progress / Complete / Blocked
58
- - Link to use cases and screenshots
59
-
60
- ### Phase 2: Architecture Design
61
-
62
- 1. **Database Schema Design**
63
- - Analyze forms to infer data models
64
- - Identify relationships between entities
65
- - Design schemas for chosen database
66
- - Document data validation requirements
67
-
68
- 2. **API Design**
69
- - Map user actions to API endpoints
70
- - Design request/response structures
71
- - Identify authentication requirements
72
- - Plan error handling strategies
73
-
74
- 3. **Frontend Structure**
75
- - Design component hierarchy
76
- - Plan routing structure
77
- - Identify shared components
78
- - Design state management approach
79
-
80
- ### Phase 3: Incremental Implementation
81
-
82
- Follow the standard FRAIM implementation workflow (`workflows/implement.md`) for each feature.
83
-
84
- 1. **Implementation Order**
85
- Follow this order for stability:
86
- 1. **Foundation**: Database models, basic API structure
87
- 2. **Authentication**: User accounts, login, sessions
88
- 3. **Core Features**: Most important use cases first
89
- 4. **Secondary Features**: Supporting functionality
90
- 5. **Polish**: UI/UX improvements, edge cases
91
-
92
- 2. **Feature Implementation Pattern**
93
- For each feature, follow `workflows/implement.md`:
94
- - Use `workflows/spec.md` for documenting requirements
95
- - Use `workflows/design.md` for architecture design
96
- - Use `workflows/implement.md` for implementation
97
- - Use `workflows/test.md` for testing
98
- - Use `workflows/quality-assurance/iterative-improvement-cycle.md` for quality assurance
99
-
100
- 3. **Maintain Working State**
101
- - After each feature, ensure application still works
102
- - Fix issues immediately, don't accumulate debt
103
- - Run tests after each change
104
- - Commit working states frequently
105
- - Follow `workflows/implement.md` best practices
106
-
107
- ### Phase 4: Feature Parity Validation
108
-
109
- 1. **Use Case Coverage Check**
110
- - For each use case, verify implementation
111
- - Test user flows match original application
112
- - Check all pages are implemented
113
- - Verify all forms work correctly
114
-
115
- 2. **Visual Parity Check**
116
- - Compare screenshots with implemented UI
117
- - Verify layout and styling match
118
- - Check responsive design
119
- - Validate accessibility
120
-
121
- 3. **Functional Parity Check**
122
- - Test all user interactions
123
- - Verify data persistence
124
- - Check error handling
125
- - Validate edge cases
126
-
127
- ### Phase 5: Quality Assurance
128
-
129
- 1. **Code Quality**
130
- - Follow coding standards
131
- - Ensure consistent patterns
132
- - Remove unused code
133
- - Document complex logic
134
-
135
- 2. **Performance**
136
- - Optimize database queries
137
- - Minimize API calls
138
- - Optimize frontend rendering
139
- - Check bundle sizes
140
-
141
- 3. **Security**
142
- - Validate all inputs
143
- - Implement authentication properly
144
- - Check authorization on all endpoints
145
- - Sanitize user data
146
-
147
- ## Implementation Patterns
148
-
149
- ### Database-First Pattern
150
- 1. Design and create database models
151
- 2. Create seed data for testing
152
- 3. Build API endpoints
153
- 4. Build frontend components
154
- 5. Integrate and test
155
-
156
- ### API-First Pattern
157
- 1. Design API contracts
158
- 2. Create mock API responses
159
- 3. Build frontend against mocks
160
- 4. Implement backend API
161
- 5. Replace mocks with real API
162
-
163
- ### Component-Driven Pattern
164
- 1. Build reusable UI components
165
- 2. Compose pages from components
166
- 3. Add interactivity
167
- 4. Connect to API
168
- 5. Polish and optimize
169
-
170
- ## Best Practices
171
-
172
- 1. **Start Small**: Implement simplest features first
173
- 2. **Test Frequently**: Write tests as you build
174
- 3. **Iterate Quickly**: Get features working, then refine
175
- 4. **Document Decisions**: Note why you made choices
176
- 5. **Stay Organized**: Keep code organized and clean
177
-
178
- ## Common Challenges
179
-
180
- 1. **Missing Information**: Some features may not be obvious from analysis
181
- - **Solution**: Make reasonable assumptions, document them, validate later
182
-
183
- 2. **Technology Differences**: Original may use different tech stack
184
- - **Solution**: Focus on functionality, not exact implementation
185
-
186
- 3. **Incomplete Discovery**: May discover features during implementation
187
- - **Solution**: Add to checklist, prioritize, implement
188
-
189
- 4. **Scope Creep**: Temptation to add features not in original
190
- - **Solution**: Stick to discovered features, document improvements separately
191
-
192
- ## Output Artifacts
193
-
194
- 1. **Implementation Checklist**
195
- - Feature tracking document
196
- - Status of each feature
197
- - Links to code and tests
198
-
199
- 2. **Architecture Documentation**
200
- - Database schema diagrams
201
- - API endpoint documentation
202
- - Component hierarchy
203
-
204
- 3. **Feature Parity Report**
205
- - Comparison with original
206
- - Known differences
207
- - Missing features (if any)
208
-
209
- ## Next Steps
210
-
211
- After completing this workflow, proceed to:
212
- - **Testing Phase** (`workflows/test.md`) - Write comprehensive tests
213
- - **Quality Assurance** (`workflows/quality-assurance/iterative-improvement-cycle.md`) - Systematic improvement
214
- - **Browser Validation** (`workflows/quality-assurance/browser-validation.md`) - Browser testing
215
- - **Deployment** (`workflows/deploy/cloud-deployment.md`) - Deploy to cloud
216
-
217
- ## Related Workflows
218
- - `workflows/replicate/website-discovery-analysis.md` - Initial discovery phase
219
- - `workflows/replicate/use-case-extraction.md` - Use case documentation
220
- - `workflows/replicate/re-implementation-strategy.md` - Re-implementation strategy
221
- - `workflows/spec.md` - Specification phase (use for documenting requirements)
222
- - `workflows/design.md` - Design phase (use for architecture design)
223
- - `workflows/implement.md` - Implementation phase (follow for incremental implementation)
224
- - `workflows/test.md` - Testing phase (use for writing tests)
225
- - `workflows/quality-assurance/iterative-improvement-cycle.md` - Quality assurance
226
- - `workflows/quality-assurance/browser-validation.md` - Browser validation
@@ -1,135 +0,0 @@
1
- # Use Case Extraction Workflow
2
-
3
- ## Overview
4
- This workflow guides agents through systematically extracting, documenting, and validating use cases from discovered website content and analysis data.
5
-
6
- ## Prerequisites
7
- - Completed Website Discovery & Analysis workflow
8
- - Access to analysis JSON files (site_analysis.json, interaction_analysis.json, comprehensive_analysis.json)
9
- - Screenshots from discovery phase
10
- - Understanding of the target application domain
11
-
12
- ## Workflow Steps
13
-
14
- ### Phase 1: Data Aggregation
15
-
16
- 1. **Collect All Analysis Data**
17
- - Load `site_analysis.json` (page structure, forms, links)
18
- - Load `interaction_analysis.json` (user interactions, flows)
19
- - Load `comprehensive_analysis.json` (detailed content, use case hints)
20
- - Review all screenshots
21
-
22
- 2. **Identify User Roles**
23
- - Analyze forms and pages to identify different user types
24
- - Common roles: Guest, User, Admin, Organization, Volunteer
25
- - Document role-specific features and access levels
26
-
27
- ### Phase 2: Use Case Identification
28
-
29
- 1. **Extract Use Cases from Data**
30
- - Review all pages and their purposes
31
- - Identify user actions (buttons, forms, links)
32
- - Map user journeys through the application
33
- - Group related actions into use cases
34
-
35
- 2. **Use Case Categories**
36
- Organize use cases into logical categories:
37
- - **Authentication & Account Management**
38
- - **Content Discovery & Browsing**
39
- - **Content Creation & Management**
40
- - **Data Collection & Reporting**
41
- - **Administration & Configuration**
42
- - **Communication & Collaboration**
43
-
44
- 3. **Document Each Use Case**
45
- Use the template structure:
46
- ```markdown
47
- ## Use Case: [Name]
48
-
49
- **Actor**: [Who performs this]
50
- **Preconditions**: [What must be true]
51
- **Steps**:
52
- 1. [Step description]
53
- 2. [Step description]
54
- **Postconditions**: [Expected outcomes]
55
- **Screenshots**: [References]
56
- **Priority**: High/Medium/Low
57
- ```
58
-
59
- ### Phase 3: Use Case Validation
60
-
61
- 1. **Completeness Check**
62
- - Every page should have at least one associated use case
63
- - Every form should have a documented workflow
64
- - Every major button/link should be part of a use case
65
- - All user roles should have documented use cases
66
-
67
- 2. **Flow Validation**
68
- - Trace user journeys from start to completion
69
- - Verify navigation paths are logical
70
- - Check for missing steps or broken flows
71
- - Identify edge cases and error scenarios
72
-
73
- 3. **Priority Assignment**
74
- - **High**: Core functionality, critical user paths
75
- - **Medium**: Important but not critical features
76
- - **Low**: Nice-to-have features, edge cases
77
-
78
- ### Phase 4: Documentation
79
-
80
- 1. **Create Use Case Document**
81
- - Use template: `templates/replicate/use-cases-template.md`
82
- - Organize by category
83
- - Include screenshots references
84
- - Add navigation flow diagrams (text-based)
85
-
86
- 2. **Create Use Case Index**
87
- - List all use cases with quick reference
88
- - Include actor, priority, and status
89
- - Link to detailed documentation
90
-
91
- ## Output Artifacts
92
-
93
- 1. **USE_CASES_AND_SCREENSHOTS_REPORT.md**
94
- - Complete use case documentation
95
- - Organized by category
96
- - Includes all details and screenshots
97
-
98
- 2. **USE_CASE_INDEX.md**
99
- - Quick reference index
100
- - Use case status tracking
101
- - Implementation checklist
102
-
103
- ## Best Practices
104
-
105
- 1. **Be Specific**: Use cases should be detailed enough to implement
106
- 2. **User-Centric**: Focus on what users do, not technical details
107
- 3. **Complete Flows**: Document entire user journeys, not just individual actions
108
- 4. **Validate**: Manually test each use case in the original application
109
- 5. **Iterate**: Refine use cases as you discover more about the application
110
-
111
- ## Common Patterns
112
-
113
- ### Authentication Flow
114
- - Sign Up → Email Verification → Login → Dashboard
115
- - Login → Forgot Password → Reset → Login
116
-
117
- ### CRUD Operations
118
- - Create: Navigate → Fill Form → Submit → Confirmation
119
- - Read: Navigate → View List → View Details
120
- - Update: Navigate → Select Item → Edit → Save
121
- - Delete: Navigate → Select Item → Delete → Confirm
122
-
123
- ### Search & Filter
124
- - Navigate to Search → Enter Query → View Results → Filter → Select Result
125
-
126
- ## Next Steps
127
-
128
- After completing this workflow, proceed to:
129
- - **Re-implementation Strategy** workflow (`workflows/replicate/re-implementation-strategy.md`)
130
- - **Use Case-Driven Testing** workflow (`workflows/testing/use-case-driven-testing.md`)
131
-
132
- ## Related Workflows
133
- - `workflows/replicate/website-discovery-analysis.md`
134
- - `workflows/replicate/re-implementation-strategy.md`
135
- - `workflows/testing/use-case-driven-testing.md`
@@ -1,154 +0,0 @@
1
- # Visual Analysis Workflow
2
-
3
- ## Overview
4
- This workflow guides agents through organizing, analyzing, and documenting screenshots and visual elements from the discovery phase to understand UI/UX patterns and component relationships.
5
-
6
- ## Prerequisites
7
- - Completed Website Discovery & Analysis workflow
8
- - Screenshots captured from discovery phase
9
- - Analysis JSON files available
10
-
11
- ## Workflow Steps
12
-
13
- ### Phase 1: Screenshot Organization
14
-
15
- 1. **Organize by Category**
16
- Create folder structure:
17
- ```
18
- screenshots/
19
- ├── authentication/
20
- ├── events/
21
- ├── organizations/
22
- ├── profiles/
23
- └── ...
24
- ```
25
-
26
- 2. **Naming Convention**
27
- Use descriptive names:
28
- - `[category]_[page]_[state]_[timestamp].png`
29
- - Example: `events_list_filtered_20241118_172418.png`
30
-
31
- 3. **Create Screenshot Index**
32
- Document each screenshot:
33
- - Filename
34
- - Page/Route
35
- - Description
36
- - Related use case
37
- - Key elements visible
38
-
39
- ### Phase 2: UI Component Analysis
40
-
41
- 1. **Identify Reusable Components**
42
- From screenshots, identify:
43
- - Navigation components
44
- - Form components
45
- - Card/List components
46
- - Button styles
47
- - Input styles
48
- - Modal/Dialog patterns
49
-
50
- 2. **Document Component Patterns**
51
- For each component type:
52
- - Visual appearance
53
- - States (default, hover, active, disabled)
54
- - Variations
55
- - Usage patterns
56
-
57
- 3. **Create Component Inventory**
58
- - List all unique components
59
- - Document where they're used
60
- - Note styling patterns
61
-
62
- ### Phase 3: Layout & Structure Analysis
63
-
64
- 1. **Page Layout Patterns**
65
- Analyze:
66
- - Header/Navigation structure
67
- - Sidebar patterns
68
- - Content area layouts
69
- - Footer patterns
70
-
71
- 2. **Responsive Design Analysis**
72
- - Desktop layout patterns
73
- - Mobile layout patterns
74
- - Breakpoint behavior
75
- - Navigation adaptations
76
-
77
- 3. **Visual Hierarchy**
78
- - Typography scale
79
- - Color usage
80
- - Spacing patterns
81
- - Visual weight distribution
82
-
83
- ### Phase 4: Interaction Patterns
84
-
85
- 1. **User Interaction Flows**
86
- From screenshots, document:
87
- - Button click flows
88
- - Form submission flows
89
- - Navigation patterns
90
- - Modal/dialog interactions
91
-
92
- 2. **State Transitions**
93
- Document:
94
- - Loading states
95
- - Success states
96
- - Error states
97
- - Empty states
98
-
99
- 3. **Feedback Patterns**
100
- Identify:
101
- - Success messages
102
- - Error messages
103
- - Validation feedback
104
- - Progress indicators
105
-
106
- ### Phase 5: Documentation
107
-
108
- 1. **Create Visual Inventory**
109
- - Screenshot index with descriptions
110
- - Component catalog
111
- - Layout patterns document
112
- - Interaction patterns document
113
-
114
- 2. **Create Style Guide**
115
- - Color palette
116
- - Typography scale
117
- - Spacing system
118
- - Component styles
119
-
120
- ## Output Artifacts
121
-
122
- 1. **SCREENSHOT_INDEX.md**
123
- - Complete index of all screenshots
124
- - Organized by category
125
- - With descriptions and use case links
126
-
127
- 2. **COMPONENT_CATALOG.md**
128
- - List of all UI components
129
- - Visual examples (screenshot references)
130
- - Usage patterns
131
-
132
- 3. **STYLE_GUIDE.md**
133
- - Colors, typography, spacing
134
- - Component styles
135
- - Design patterns
136
-
137
- ## Best Practices
138
-
139
- 1. **Be Systematic**: Organize screenshots immediately
140
- 2. **Document Context**: Note what each screenshot shows
141
- 3. **Compare Patterns**: Look for consistent patterns
142
- 4. **Note Variations**: Document when patterns differ
143
- 5. **Reference Use Cases**: Link screenshots to use cases
144
-
145
- ## Next Steps
146
-
147
- After completing this workflow, proceed to:
148
- - **Re-implementation Strategy** workflow (`workflows/replicate/re-implementation-strategy.md`)
149
- - Use visual analysis to guide UI implementation
150
-
151
- ## Related Workflows
152
- - `workflows/replicate/website-discovery-analysis.md`
153
- - `workflows/replicate/use-case-extraction.md`
154
- - `workflows/replicate/re-implementation-strategy.md`