fraim-framework 2.0.30 → 2.0.33
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/dist/src/cli/commands/init.js +29 -2
- package/dist/src/cli/commands/sync.js +18 -1
- package/dist/src/utils/script-sync-utils.js +218 -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 +349 -0
- package/dist/tests/test-first-run-journey.js +43 -3
- package/dist/tests/test-hybrid-script-execution.js +369 -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/bin/fraim.js +0 -23
- 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,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FRAIM Generic Issues API
|
|
3
|
-
*
|
|
4
|
-
* Generic issue filing endpoint that works for any project.
|
|
5
|
-
* Can be invoked through ChatGPT OpenAPI or MCP.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* 1. Import this file
|
|
9
|
-
* 2. Mount the router in your Express app
|
|
10
|
-
* 3. Configure GitHub repository in .fraim/config.json
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { Router, Request, Response } from 'express';
|
|
14
|
-
import { fileFraimIssue } from '../../src/fraim/issues.js';
|
|
15
|
-
import { loadFraimConfig } from '../../src/fraim/config-loader.js';
|
|
16
|
-
|
|
17
|
-
const issuesRouter = Router();
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* POST /issues/create - Create a GitHub issue
|
|
21
|
-
*
|
|
22
|
-
* Generic endpoint that works for any FRAIM project.
|
|
23
|
-
* Repository owner and name are read from .fraim/config.json
|
|
24
|
-
*/
|
|
25
|
-
issuesRouter.post('/create', async (req: Request, res: Response) => {
|
|
26
|
-
try {
|
|
27
|
-
// Load project configuration
|
|
28
|
-
const config = loadFraimConfig();
|
|
29
|
-
const repoOwner = config.git?.repoOwner || process.env.GITHUB_OWNER || 'your-org';
|
|
30
|
-
const repoName = config.git?.repoName || process.env.GITHUB_REPO || 'your-repo';
|
|
31
|
-
|
|
32
|
-
// Get user context (if available - project-specific)
|
|
33
|
-
// Projects can customize this based on their auth system
|
|
34
|
-
const userId = (req as any).userContext?.userId ||
|
|
35
|
-
(req as any).executiveContext?.executiveId ||
|
|
36
|
-
req.headers['x-user-id'] as string;
|
|
37
|
-
const userEmail = (req as any).userContext?.email ||
|
|
38
|
-
(req as any).executiveContext?.executiveEmail ||
|
|
39
|
-
req.headers['x-user-email'] as string;
|
|
40
|
-
const userName = (req as any).userContext?.name ||
|
|
41
|
-
(req as any).executiveContext?.executiveName ||
|
|
42
|
-
req.headers['x-user-name'] as string;
|
|
43
|
-
|
|
44
|
-
const { title, body, labels } = req.body;
|
|
45
|
-
|
|
46
|
-
if (!title || !body) {
|
|
47
|
-
return res.status(400).json({
|
|
48
|
-
success: false,
|
|
49
|
-
error: 'Missing required fields: title, body'
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Check if GitHub token is configured
|
|
54
|
-
if (!process.env.GITHUB_TOKEN && !process.env.GIT_TOKEN && !process.env.GITHUB_PAT) {
|
|
55
|
-
return res.status(500).json({
|
|
56
|
-
success: false,
|
|
57
|
-
error: 'GitHub integration not configured. Please set GITHUB_TOKEN environment variable.'
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Build issue body with user context (if available)
|
|
62
|
-
let issueBody = body;
|
|
63
|
-
if (userName || userEmail || userId) {
|
|
64
|
-
issueBody = `**Reported by:** ${userName || 'Unknown'}${userEmail ? ` (${userEmail})` : ''}${userId ? `\n**User ID:** ${userId}` : ''}\n\n**Issue Details:**\n${body}\n\n---\n*This issue was automatically created through the API.*`;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Create the issue using shared function
|
|
68
|
-
const result = await fileFraimIssue({
|
|
69
|
-
title: title,
|
|
70
|
-
body: issueBody,
|
|
71
|
-
labels: labels || ['user-reported']
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
if (!result.success) {
|
|
75
|
-
return res.status(500).json({
|
|
76
|
-
success: false,
|
|
77
|
-
error: result.message
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return res.json({
|
|
82
|
-
success: true,
|
|
83
|
-
message: 'Issue created successfully',
|
|
84
|
-
issueNumber: result.issueNumber,
|
|
85
|
-
issueUrl: result.htmlUrl,
|
|
86
|
-
title: title
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
} catch (error: any) {
|
|
90
|
-
console.error('❌ Unexpected error creating Git issue:', error);
|
|
91
|
-
return res.status(500).json({
|
|
92
|
-
success: false,
|
|
93
|
-
error: error.message || 'Failed to create Git issue'
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* GET /issues/list - List issues
|
|
100
|
-
*
|
|
101
|
-
* Not implemented in this generic version.
|
|
102
|
-
*/
|
|
103
|
-
issuesRouter.get('/list', async (req: Request, res: Response) => {
|
|
104
|
-
return res.status(501).json({
|
|
105
|
-
success: false,
|
|
106
|
-
error: 'Listing issues is not supported in this generic API version yet.'
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
export { issuesRouter };
|