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.
- package/bin/fraim.js +3 -18
- package/dist/src/cli/commands/init.js +29 -2
- package/dist/src/cli/commands/sync.js +82 -70
- package/dist/src/utils/script-sync-utils.js +216 -0
- package/dist/tests/debug-tools.js +6 -5
- package/dist/tests/test-chalk-regression.js +58 -8
- package/dist/tests/test-cli.js +70 -5
- package/dist/tests/test-end-to-end-hybrid-validation.js +328 -0
- package/dist/tests/test-first-run-journey.js +43 -3
- package/dist/tests/test-hybrid-script-execution.js +340 -0
- package/dist/tests/test-mcp-connection.js +2 -2
- package/dist/tests/test-mcp-issue-integration.js +12 -4
- package/dist/tests/test-mcp-lifecycle-methods.js +4 -4
- package/dist/tests/test-node-compatibility.js +24 -2
- package/dist/tests/test-prep-issue.js +4 -1
- package/dist/tests/test-script-location-independence.js +173 -0
- package/dist/tests/test-script-sync.js +557 -0
- package/dist/tests/test-session-rehydration.js +2 -2
- package/dist/tests/test-standalone.js +3 -3
- package/dist/tests/test-sync-version-update.js +1 -1
- package/dist/tests/test-telemetry.js +2 -2
- package/dist/tests/test-user-journey.js +8 -4
- package/dist/tests/test-utils.js +13 -0
- package/dist/tests/test-wizard.js +2 -2
- package/package.json +3 -3
- package/registry/rules/agent-testing-guidelines.md +502 -502
- package/registry/rules/ephemeral-execution.md +37 -27
- package/registry/rules/local-development.md +253 -251
- package/registry/rules/successful-debugging-patterns.md +491 -482
- package/registry/scripts/prep-issue.sh +468 -468
- package/registry/workflows/bootstrap/evaluate-code-quality.md +8 -2
- package/registry/workflows/bootstrap/verify-test-coverage.md +8 -2
- package/registry/workflows/customer-development/thank-customers.md +203 -193
- package/registry/workflows/customer-development/weekly-newsletter.md +366 -362
- package/registry/workflows/performance/analyze-performance.md +65 -63
- package/registry/workflows/product-building/implement.md +6 -2
- package/registry/workflows/product-building/prep-issue.md +11 -24
- package/registry/workflows/product-building/resolve.md +5 -1
- package/registry/workflows/replicate/replicate-discovery.md +336 -0
- package/registry/workflows/replicate/replicate-to-issues.md +319 -0
- package/registry/workflows/reviewer/review-implementation-vs-design-spec.md +632 -632
- package/.windsurf/rules/windsurf-rules.md +0 -7
- package/.windsurf/workflows/resolve-issue.md +0 -6
- package/.windsurf/workflows/retrospect.md +0 -6
- package/.windsurf/workflows/start-design.md +0 -6
- package/.windsurf/workflows/start-impl.md +0 -6
- package/.windsurf/workflows/start-spec.md +0 -6
- package/.windsurf/workflows/start-tests.md +0 -6
- package/registry/scripts/build-scripts-generator.ts +0 -216
- package/registry/scripts/cleanup-branch.ts +0 -303
- package/registry/scripts/fraim-config.ts +0 -63
- package/registry/scripts/generate-engagement-emails.ts +0 -744
- package/registry/scripts/generic-issues-api.ts +0 -110
- package/registry/scripts/newsletter-helpers.ts +0 -874
- package/registry/scripts/openapi-generator.ts +0 -695
- package/registry/scripts/performance/profile-server.ts +0 -370
- package/registry/scripts/run-thank-you-workflow.ts +0 -122
- package/registry/scripts/send-newsletter-simple.ts +0 -104
- package/registry/scripts/send-thank-you-emails.ts +0 -57
- package/registry/workflows/replicate/re-implementation-strategy.md +0 -226
- package/registry/workflows/replicate/use-case-extraction.md +0 -135
- package/registry/workflows/replicate/visual-analysis.md +0 -154
- package/registry/workflows/replicate/website-discovery-analysis.md +0 -231
- package/sample_package.json +0 -18
- /package/registry/scripts/{replicate/comprehensive-explorer.py → comprehensive-explorer.py} +0 -0
- /package/registry/scripts/{replicate/interactive-explorer.py → interactive-explorer.py} +0 -0
- /package/registry/scripts/{replicate/scrape-site.py → scrape-site.py} +0 -0
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
# Website Discovery & Analysis Workflow
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
This workflow guides agents through systematically discovering, analyzing, and documenting an existing web application. This is the first critical phase when re-implementing an application from a live site.
|
|
5
|
-
|
|
6
|
-
## Prerequisites
|
|
7
|
-
- Access to the target website URL
|
|
8
|
-
- Python 3.8 or higher
|
|
9
|
-
- Basic understanding of web technologies (HTML, CSS, JavaScript, React)
|
|
10
|
-
|
|
11
|
-
### Required Python Packages
|
|
12
|
-
Install required packages:
|
|
13
|
-
```bash
|
|
14
|
-
pip install playwright beautifulsoup4 requests
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
For Playwright browser automation, you also need to install browser binaries:
|
|
18
|
-
```bash
|
|
19
|
-
playwright install chromium
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Workflow Steps
|
|
23
|
-
|
|
24
|
-
### Phase 1: Initial Site Scraping
|
|
25
|
-
|
|
26
|
-
**Objective**: Get a comprehensive understanding of the site structure, pages, and resources.
|
|
27
|
-
|
|
28
|
-
1. **Run Basic Site Scraper**
|
|
29
|
-
```bash
|
|
30
|
-
python <scrape-script> <target_url> [--max-pages N] [--output-dir DIR] [--output-file FILE]
|
|
31
|
-
```
|
|
32
|
-
- **Options**:
|
|
33
|
-
- `target_url`: Base URL of the website to scrape (required)
|
|
34
|
-
- `--max-pages N`: Maximum number of pages to scrape (default: 50)
|
|
35
|
-
- `--output-dir DIR`: Output directory for results (default: current directory)
|
|
36
|
-
- `--output-file FILE`: Output filename (default: site_analysis.json)
|
|
37
|
-
- This will:
|
|
38
|
-
- Discover all pages on the site
|
|
39
|
-
- Extract HTML structure
|
|
40
|
-
- Identify CSS and JavaScript files
|
|
41
|
-
- Find all forms and inputs
|
|
42
|
-
- Map internal and external links
|
|
43
|
-
- Generate `site_analysis.json` containing page structure, forms, CSS/JS files, images, and links
|
|
44
|
-
|
|
45
|
-
2. **Review Initial Findings**
|
|
46
|
-
- Check `site_analysis.json` for:
|
|
47
|
-
- Total pages discovered
|
|
48
|
-
- Common navigation patterns
|
|
49
|
-
- Form structures
|
|
50
|
-
- Resource dependencies
|
|
51
|
-
|
|
52
|
-
### Phase 2: Interactive Browser Analysis
|
|
53
|
-
|
|
54
|
-
**Objective**: Understand dynamic behavior, user interactions, and React/SPA patterns.
|
|
55
|
-
|
|
56
|
-
1. **Run Interactive Explorer**
|
|
57
|
-
```bash
|
|
58
|
-
python <interactive-explorer-script> <target_url> [--output-dir DIR] [--headless] [--max-clicks N]
|
|
59
|
-
```
|
|
60
|
-
- **Options**:
|
|
61
|
-
- `target_url`: Base URL of the website to explore (required)
|
|
62
|
-
- `--output-dir DIR`: Output directory for results (default: current directory)
|
|
63
|
-
- `--headless`: Run browser in headless mode
|
|
64
|
-
- `--max-clicks N`: Maximum number of clicks to perform (default: 20)
|
|
65
|
-
- This will:
|
|
66
|
-
- Navigate through all pages
|
|
67
|
-
- Click buttons and links
|
|
68
|
-
- Capture screenshots of each state
|
|
69
|
-
- Identify React components and routing
|
|
70
|
-
- Document user flows
|
|
71
|
-
- Generate `interaction_analysis.json` (containing pages visited, interactions performed, screenshots taken, use case hints) and screenshots in `screenshots/` directory
|
|
72
|
-
|
|
73
|
-
2. **Review Screenshots**
|
|
74
|
-
- Organize screenshots by page/feature
|
|
75
|
-
- Document visual patterns and UI components
|
|
76
|
-
- Identify navigation flows
|
|
77
|
-
|
|
78
|
-
### Phase 3: Comprehensive Content Analysis
|
|
79
|
-
|
|
80
|
-
**Objective**: Deep dive into all content, extract use cases, and understand functionality.
|
|
81
|
-
|
|
82
|
-
1. **Run Comprehensive Explorer**
|
|
83
|
-
```bash
|
|
84
|
-
python <comprehensive-explorer-script> <target_url> [--output-dir DIR] [--headless]
|
|
85
|
-
```
|
|
86
|
-
- **Options**:
|
|
87
|
-
- `target_url`: Base URL of the website to explore (required)
|
|
88
|
-
- `--output-dir DIR`: Output directory for results (default: current directory)
|
|
89
|
-
- `--headless`: Run browser in headless mode
|
|
90
|
-
- This will:
|
|
91
|
-
- Explore all discovered routes
|
|
92
|
-
- Extract detailed page content
|
|
93
|
-
- Identify use cases from content analysis
|
|
94
|
-
- Generate comprehensive report
|
|
95
|
-
- Create `comprehensive_analysis.json` (containing detailed page content, all discovered routes, comprehensive use case analysis, page structure analysis) and screenshots in `screenshots/` directory
|
|
96
|
-
|
|
97
|
-
2. **Manual Review & Validation**
|
|
98
|
-
- Open the site in a browser
|
|
99
|
-
- Manually navigate through all features
|
|
100
|
-
- Verify automated findings
|
|
101
|
-
- Document any missed features
|
|
102
|
-
|
|
103
|
-
### Phase 4: Use Case Extraction
|
|
104
|
-
|
|
105
|
-
**Objective**: Systematically identify and document all user workflows and use cases.
|
|
106
|
-
|
|
107
|
-
1. **Analyze Collected Data**
|
|
108
|
-
- Review all JSON reports
|
|
109
|
-
- Identify user roles (volunteer, organization, admin)
|
|
110
|
-
- Map user journeys
|
|
111
|
-
- Document feature sets
|
|
112
|
-
|
|
113
|
-
2. **Create Use Case Document**
|
|
114
|
-
- Use template: `templates/replicate/use-cases-template.md`
|
|
115
|
-
- For each use case, document:
|
|
116
|
-
- **Name**: Clear, descriptive name
|
|
117
|
-
- **Actor**: Who performs this action
|
|
118
|
-
- **Preconditions**: What must be true before
|
|
119
|
-
- **Steps**: Detailed step-by-step workflow
|
|
120
|
-
- **Postconditions**: Expected outcomes
|
|
121
|
-
- **Screenshots**: Reference to relevant screenshots
|
|
122
|
-
- **Priority**: High/Medium/Low
|
|
123
|
-
|
|
124
|
-
3. **Validate Completeness**
|
|
125
|
-
- Check that all pages have associated use cases
|
|
126
|
-
- Ensure all forms have documented workflows
|
|
127
|
-
- Verify all navigation paths are covered
|
|
128
|
-
- Confirm all user roles are represented
|
|
129
|
-
|
|
130
|
-
### Phase 5: Structure Documentation
|
|
131
|
-
|
|
132
|
-
**Objective**: Document the application architecture and structure.
|
|
133
|
-
|
|
134
|
-
1. **Create Structure Document**
|
|
135
|
-
- Document:
|
|
136
|
-
- Page hierarchy and routing
|
|
137
|
-
- Component relationships
|
|
138
|
-
- Data models (inferred from forms)
|
|
139
|
-
- API endpoints (inferred from forms and interactions)
|
|
140
|
-
- User roles and permissions
|
|
141
|
-
|
|
142
|
-
2. **Create Visual Inventory**
|
|
143
|
-
- Organize screenshots by:
|
|
144
|
-
- Page/Route
|
|
145
|
-
- Feature/Use Case
|
|
146
|
-
- User Role
|
|
147
|
-
- Create screenshot index document
|
|
148
|
-
|
|
149
|
-
## Output Artifacts
|
|
150
|
-
|
|
151
|
-
After completing this workflow, you should have:
|
|
152
|
-
|
|
153
|
-
1. **Data Files**:
|
|
154
|
-
- `site_analysis.json` - Basic site structure
|
|
155
|
-
- `interaction_analysis.json` - Interactive behavior
|
|
156
|
-
- `comprehensive_analysis.json` - Deep content analysis
|
|
157
|
-
|
|
158
|
-
2. **Screenshots**:
|
|
159
|
-
- Organized in `screenshots/` directory
|
|
160
|
-
- Named with descriptive prefixes
|
|
161
|
-
- Cover all pages and key interactions
|
|
162
|
-
|
|
163
|
-
3. **Documentation**:
|
|
164
|
-
- `USE_CASES_AND_SCREENSHOTS_REPORT.md` - Complete use case documentation
|
|
165
|
-
- `SITE_ANALYSIS_REPORT.md` - Site structure and architecture
|
|
166
|
-
- `SCREENSHOT_INDEX.md` - Index of all screenshots with descriptions
|
|
167
|
-
|
|
168
|
-
## Best Practices
|
|
169
|
-
|
|
170
|
-
1. **Be Thorough**: Don't skip pages or features. Every page should be analyzed.
|
|
171
|
-
|
|
172
|
-
2. **Document Everything**: When in doubt, document it. Better to have too much information than too little.
|
|
173
|
-
|
|
174
|
-
3. **Validate Manually**: Automated tools are helpful but manual review is essential.
|
|
175
|
-
|
|
176
|
-
4. **Organize Early**: Keep screenshots and documents organized from the start.
|
|
177
|
-
|
|
178
|
-
5. **Iterate**: Discovery is iterative. You may need to run scripts multiple times as you discover new routes.
|
|
179
|
-
|
|
180
|
-
## Common Challenges
|
|
181
|
-
|
|
182
|
-
1. **SPA Routing**: React/SPA apps may not expose all routes in HTML. Use browser navigation to discover routes.
|
|
183
|
-
|
|
184
|
-
2. **Authentication**: Some pages may require login. Document login flows separately.
|
|
185
|
-
|
|
186
|
-
3. **Dynamic Content**: Content loaded via JavaScript may not appear in initial HTML. Use browser automation.
|
|
187
|
-
|
|
188
|
-
4. **Rate Limiting**: Be respectful with request frequency. Scripts include delays.
|
|
189
|
-
|
|
190
|
-
## Troubleshooting
|
|
191
|
-
|
|
192
|
-
### Browser Installation Issues
|
|
193
|
-
If Playwright browser installation fails:
|
|
194
|
-
```bash
|
|
195
|
-
playwright install chromium --force
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### Import Errors
|
|
199
|
-
If you get import errors, ensure all packages are installed:
|
|
200
|
-
```bash
|
|
201
|
-
pip install --upgrade playwright beautifulsoup4 requests
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### Network Timeouts
|
|
205
|
-
If scripts timeout:
|
|
206
|
-
- Check your internet connection
|
|
207
|
-
- Verify the target URL is accessible
|
|
208
|
-
- Increase timeout values in the script if needed
|
|
209
|
-
|
|
210
|
-
### Best Practices for Scripts
|
|
211
|
-
1. **Be Respectful**: Include delays between requests to avoid overwhelming the target server
|
|
212
|
-
2. **Start Small**: Use `--max-pages` or `--max-clicks` to limit initial exploration
|
|
213
|
-
3. **Review Outputs**: Manually review JSON outputs and screenshots to validate findings
|
|
214
|
-
4. **Organize Results**: Use consistent output directories to keep analysis organized
|
|
215
|
-
|
|
216
|
-
**Important Notes**:
|
|
217
|
-
- These scripts are specialized tools for website replication/migration projects
|
|
218
|
-
- They require Python and Playwright dependencies
|
|
219
|
-
- Use these scripts responsibly and respect robots.txt and terms of service
|
|
220
|
-
- Consider rate limiting and be respectful of server resources
|
|
221
|
-
|
|
222
|
-
## Next Steps
|
|
223
|
-
|
|
224
|
-
After completing this workflow, proceed to:
|
|
225
|
-
- **Re-implementation Strategy** workflow (`workflows/replicate/re-implementation-strategy.md`)
|
|
226
|
-
- **Use Case-Driven Testing** workflow (`workflows/testing/use-case-driven-testing.md`)
|
|
227
|
-
|
|
228
|
-
## Related Workflows
|
|
229
|
-
- `workflows/replicate/use-case-extraction.md`
|
|
230
|
-
- `workflows/replicate/visual-analysis.md`
|
|
231
|
-
- `workflows/replicate/re-implementation-strategy.md`
|
package/sample_package.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"scripts": {
|
|
3
|
-
"build": "tsc",
|
|
4
|
-
"dev": "npx tsx --watch src/server.ts > server.log 2>&1",
|
|
5
|
-
"test": "set EXCLUDE_TAGS=baml,flaky,failing&& npx tsx --test --test-concurrency=1 --test-reporter tap %npm_config_test% > test.log 2>&1",
|
|
6
|
-
"test-smoke": "set TAGS=smoke&& npx tsx --test --test-concurrency=1 --test-reporter tap %npm_config_test% > test.log 2>&1",
|
|
7
|
-
"test-smoke-ci": "set TAGS=smoke&& npx tsx --test --test-concurrency=1 --test-reporter tap test*.ts",
|
|
8
|
-
"test-flaky": "set TAGS=flaky&& npx tsx --test --test-concurrency=1 --test-reporter tap %npm_config_test% > test.log 2>&1",
|
|
9
|
-
"test-failing": "set TAGS=failing&& npx tsx --test --test-concurrency=1 --test-reporter tap %npm_config_test% > test.log 2>&1",
|
|
10
|
-
"test-baml": "set TAGS=baml&& npx tsx --test --test-concurrency=1 --test-reporter tap %npm_config_test% > test.log 2>&1",
|
|
11
|
-
"test-all": "tsx --test --test-concurrency=1 --test-reporter tap",
|
|
12
|
-
"test-all-ci": "set EXCLUDE_TAGS=flaky,failing&& tsx --test --test-concurrency=1 --test-reporter tap test*.ts",
|
|
13
|
-
"generate": "baml-cli generate",
|
|
14
|
-
"lint": "eslint *.ts",
|
|
15
|
-
"lint:fix": "eslint *.ts --fix"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|