fraim-framework 1.0.7 → 1.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fraim-framework",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "FRAIM: Framework for Rigor-based AI Management - Where humans become AI managers through rigorous methodology",
5
5
  "main": "index.js",
6
6
  "bin": {
package/setup.js CHANGED
@@ -94,6 +94,140 @@ function askQuestion(question, defaultValue = 'y') {
94
94
  });
95
95
  }
96
96
 
97
+ function createProjectStructure() {
98
+ // Create retrospectives folder
99
+ ensureDirectory('retrospectives');
100
+ logSuccess('Created retrospectives folder');
101
+
102
+ // Create docs/rfcs folder
103
+ ensureDirectory('docs/rfcs');
104
+ logSuccess('Created docs/rfcs folder');
105
+
106
+ // Create BUGFIX template
107
+ const bugfixTemplate = `Issue: #<issue>
108
+
109
+ ## Impact of the Bug
110
+
111
+ ## Repro Steps
112
+
113
+ ## Root Cause
114
+
115
+ ## Fix
116
+
117
+ ## Tests
118
+ - Could be existing tests that are failing and need to be fixed
119
+ - Could be new tests that need to be added into an existing test suite
120
+ - Could be a new test suite
121
+ `;
122
+ writeFile('docs/rfcs/BUGFIX-TEMPLATE.md', bugfixTemplate);
123
+ logSuccess('Created BUGFIX-TEMPLATE.md');
124
+
125
+ // Create RFC template
126
+ const rfcTemplate = `# RFC: <Title>
127
+
128
+ Issue: #<issue>
129
+ Owner: <agent>
130
+
131
+ ## Customer
132
+
133
+ ## Customer Outcome
134
+
135
+ ## Customer Problem being solved
136
+
137
+ ## Solution
138
+
139
+ ## Alternatives
140
+
141
+ ## Design Details
142
+ - User Experience changes (incl. all modalities currently supported: see codebase to know which ones)
143
+ - API surface (OpenAPI) changes
144
+ - Data model / schema changes
145
+ - Failure modes & timeouts
146
+ - Telemetry & analytics
147
+
148
+ ## Test Matrix
149
+ - Unit: modules & edge cases
150
+ - Integration: API <-> DB <-> external
151
+ - E2E: user flows (happy/sad)
152
+
153
+ ## Risks & Mitigations
154
+
155
+ ## Observability (logs, metrics, alerts)
156
+
157
+ ## Phased Delivery Plan
158
+ - Do not incude timelines
159
+ - Do include the following for each phase:
160
+ - Deliverable
161
+ - Value delivered by deliverable
162
+ - What will be tested
163
+ `;
164
+ writeFile('docs/rfcs/RFC-TEMPLATE.md', rfcTemplate);
165
+ logSuccess('Created RFC-TEMPLATE.md');
166
+
167
+ logSuccess('Project structure created');
168
+ }
169
+
170
+ async function setupGitHubCLI() {
171
+ logStep('GitHub CLI Setup');
172
+ logInfo('To create GitHub labels automatically, you need GitHub CLI installed and authenticated.');
173
+
174
+ // Check if gh is installed
175
+ try {
176
+ execSync('gh --version', { stdio: 'pipe' });
177
+ logSuccess('GitHub CLI is already installed');
178
+ } catch (error) {
179
+ logWarning('GitHub CLI is not installed');
180
+ logInfo('Installing GitHub CLI...');
181
+ logInfo('📥 Download from: https://cli.github.com/');
182
+ logInfo('💻 Or use package manager:');
183
+ logInfo(' Windows: winget install GitHub.cli');
184
+ logInfo(' macOS: brew install gh');
185
+ logInfo(' Ubuntu/Debian: sudo apt install gh');
186
+ logInfo(' CentOS/RHEL: sudo yum install gh');
187
+
188
+ const waitForInstall = await askQuestion('Press Enter after installing GitHub CLI, or type "skip" to continue without it');
189
+ if (waitForInstall === 'skip') {
190
+ return false;
191
+ }
192
+
193
+ // Check again
194
+ try {
195
+ execSync('gh --version', { stdio: 'pipe' });
196
+ logSuccess('GitHub CLI is now available');
197
+ } catch (error) {
198
+ logWarning('GitHub CLI still not available, continuing without it');
199
+ return false;
200
+ }
201
+ }
202
+
203
+ // Check if authenticated
204
+ try {
205
+ execSync('gh auth status', { stdio: 'pipe' });
206
+ logSuccess('GitHub CLI is already authenticated');
207
+ return true;
208
+ } catch (error) {
209
+ logWarning('GitHub CLI is not authenticated');
210
+ logInfo('You need to authenticate with GitHub to create labels automatically.');
211
+ logInfo('🔐 Run: gh auth login');
212
+ logInfo(' This will open a browser for OAuth authentication');
213
+
214
+ const waitForAuth = await askQuestion('Press Enter after authenticating, or type "skip" to continue without authentication');
215
+ if (waitForAuth === 'skip') {
216
+ return false;
217
+ }
218
+
219
+ // Check authentication again
220
+ try {
221
+ execSync('gh auth status', { stdio: 'pipe' });
222
+ logSuccess('GitHub CLI is now authenticated');
223
+ return true;
224
+ } catch (error) {
225
+ logWarning('GitHub CLI authentication failed, continuing without it');
226
+ return false;
227
+ }
228
+ }
229
+ }
230
+
97
231
  function createGitHubLabels() {
98
232
  const labels = [
99
233
  { name: 'phase:design', color: '0e8a16', description: 'Design phase - RFC creation and review' },
@@ -102,7 +236,6 @@ function createGitHubLabels() {
102
236
  { name: 'status:wip', color: 'fbca04', description: 'Work in progress' },
103
237
  { name: 'status:needs-review', color: 'd93f0b', description: 'Ready for review' },
104
238
  { name: 'status:complete', color: '0e8a16', description: 'Completed and approved' },
105
- { name: 'status:approved', color: '0e8a16', description: 'Approved and ready to merge' },
106
239
  { name: 'status:changes-requested', color: 'd93f0b', description: 'Changes requested in review' },
107
240
  { name: 'ai-agent:cursor', color: '5319e7', description: 'Assigned to Cursor AI agent' },
108
241
  { name: 'ai-agent:claude', color: 'c2e0c6', description: 'Assigned to Claude AI agent' },
@@ -136,7 +269,6 @@ function createLabelsConfigFile() {
136
269
  { name: 'status:wip', color: 'fbca04', description: 'Work in progress' },
137
270
  { name: 'status:needs-review', color: 'd93f0b', description: 'Ready for review' },
138
271
  { name: 'status:complete', color: '0e8a16', description: 'Completed and approved' },
139
- { name: 'status:approved', color: '0e8a16', description: 'Approved and ready to merge' },
140
272
  { name: 'status:changes-requested', color: 'd93f0b', description: 'Changes requested in review' },
141
273
  { name: 'ai-agent:cursor', color: '5319e7', description: 'Assigned to Cursor AI agent' },
142
274
  { name: 'ai-agent:claude', color: 'c2e0c6', description: 'Assigned to Claude AI agent' },
@@ -288,19 +420,6 @@ async function runWizard() {
288
420
  // Check prerequisites
289
421
  logStep('Step 1: Checking Prerequisites');
290
422
 
291
- // Check if gh CLI is available
292
- let ghAvailable = false;
293
- try {
294
- execSync('gh --version', { stdio: 'pipe' });
295
- logSuccess('GitHub CLI (gh) is available');
296
- ghAvailable = true;
297
- } catch (error) {
298
- logWarning('GitHub CLI (gh) is not installed or not available');
299
- logInfo('You can still set up FRAIM, but GitHub labels will need to be created manually');
300
- logInfo('Install GitHub CLI: https://cli.github.com/');
301
- ghAvailable = false;
302
- }
303
-
304
423
  // Check if we're in a git repository
305
424
  try {
306
425
  execSync('git rev-parse --git-dir', { stdio: 'pipe' });
@@ -311,8 +430,18 @@ async function runWizard() {
311
430
  return;
312
431
  }
313
432
 
314
- // Step 2: AI Agent Setup
315
- logStep('Step 2: AI Agent Configuration');
433
+ // Step 2: Project Structure
434
+ logStep('Step 2: Project Structure');
435
+ const setupStructure = await askQuestion('Would you like to create project structure (retrospectives, docs/rfcs with templates)?', 'y');
436
+
437
+ if (setupStructure === 'y' || setupStructure === 'yes') {
438
+ createProjectStructure();
439
+ } else {
440
+ logInfo('Skipping project structure setup');
441
+ }
442
+
443
+ // Step 3: AI Agent Setup
444
+ logStep('Step 3: AI Agent Configuration');
316
445
  const setupAgents = await askQuestion('Would you like to set up AI agent configurations (.cursor, .windsurf, CLAUDE.md)?', 'y');
317
446
 
318
447
  if (setupAgents === 'y' || setupAgents === 'yes') {
@@ -321,8 +450,8 @@ async function runWizard() {
321
450
  logInfo('Skipping AI agent setup');
322
451
  }
323
452
 
324
- // Step 3: GitHub Workflows
325
- logStep('Step 3: GitHub Workflows');
453
+ // Step 4: GitHub Workflows
454
+ logStep('Step 4: GitHub Workflows');
326
455
  const setupWorkflows = await askQuestion('Would you like to set up GitHub workflows for automation?', 'y');
327
456
 
328
457
  if (setupWorkflows === 'y' || setupWorkflows === 'yes') {
@@ -332,34 +461,29 @@ async function runWizard() {
332
461
  logInfo('Skipping GitHub workflow setup');
333
462
  }
334
463
 
335
- // Step 4: GitHub Labels
336
- logStep('Step 4: GitHub Labels');
337
- if (ghAvailable) {
338
- const setupLabels = await askQuestion('Would you like to create GitHub labels for FRAIM?', 'y');
339
-
340
- if (setupLabels === 'y' || setupLabels === 'yes') {
464
+ // Step 5: GitHub Labels
465
+ logStep('Step 5: GitHub Labels');
466
+ const setupLabels = await askQuestion('Would you like to create GitHub labels for FRAIM?', 'y');
467
+
468
+ if (setupLabels === 'y' || setupLabels === 'yes') {
469
+ const ghAvailable = await setupGitHubCLI();
470
+ if (ghAvailable) {
341
471
  createGitHubLabels();
342
472
  } else {
343
- logInfo('Skipping GitHub label setup');
473
+ logInfo('GitHub CLI not available - creating labels configuration file instead');
474
+ createLabelsConfigFile();
344
475
  }
345
476
  } else {
346
- logInfo('GitHub CLI not available - creating labels configuration file instead');
347
- createLabelsConfigFile();
477
+ logInfo('Skipping GitHub label setup');
348
478
  }
349
479
 
350
- // Step 5: Summary
351
- logStep('Step 5: Setup Summary');
480
+ // Step 6: Summary
481
+ logStep('Step 6: Setup Summary');
352
482
  logHeader('🎉 Setup Complete!');
353
483
  logSuccess('FRAIM has been successfully set up in your repository!');
354
484
  logInfo('Next steps:');
355
485
  logInfo('1. Commit and push these files to GitHub');
356
-
357
- if (ghAvailable) {
358
- logInfo('2. GitHub labels have been created automatically');
359
- } else {
360
- logInfo('2. Import GitHub labels from .github/labels.json using the web interface');
361
- }
362
-
486
+ logInfo('2. Import GitHub labels from .github/labels.json using the web interface');
363
487
  logInfo('3. Create your first issue with phase labels');
364
488
  logInfo('4. Start coordinating your AI agents!');
365
489
 
@@ -381,14 +505,6 @@ function runSetup() {
381
505
 
382
506
  try {
383
507
  // Check prerequisites
384
- try {
385
- execSync('gh --version', { stdio: 'pipe' });
386
- } catch (error) {
387
- logError('GitHub CLI (gh) is not installed or not available');
388
- logInfo('Please install GitHub CLI: https://cli.github.com/');
389
- process.exit(1);
390
- }
391
-
392
508
  try {
393
509
  execSync('git rev-parse --git-dir', { stdio: 'pipe' });
394
510
  } catch (error) {
@@ -398,16 +514,17 @@ function runSetup() {
398
514
  }
399
515
 
400
516
  // Create everything at once
517
+ createProjectStructure();
401
518
  ensureDirectory('.github/workflows');
402
519
  createAgentFolders();
403
520
  createGitHubWorkflows();
404
- createGitHubLabels();
521
+ createLabelsConfigFile();
405
522
 
406
523
  logHeader('🎉 Setup Complete!');
407
524
  logSuccess('FRAIM has been successfully set up in your repository!');
408
525
  logInfo('Next steps:');
409
526
  logInfo('1. Commit and push these files to GitHub');
410
- logInfo('2. The GitHub labels have been created automatically');
527
+ logInfo('2. Import GitHub labels from .github/labels.json using the web interface');
411
528
  logInfo('3. Create your first issue with phase labels');
412
529
  logInfo('4. Start coordinating your AI agents!');
413
530
 
@@ -428,4 +545,4 @@ if (require.main === module) {
428
545
  runSetup();
429
546
  }
430
547
 
431
- module.exports = { runSetup, runWizard };
548
+ module.exports = { runSetup, runWizard, createProjectStructure };
@@ -1,175 +0,0 @@
1
- # 🚀 Getting Started with FRAIM
2
-
3
- **Framework for Rigor-based AI Management**
4
-
5
- Welcome to FRAIM! This guide will transform you from a developer into an AI manager in under 30 seconds.
6
-
7
- ## 🚀 Quick Start (30 seconds)
8
-
9
- ### 1. Navigate to Your Repository
10
- ```bash
11
- cd your-project
12
- ```
13
-
14
- ### 2. Setup FRAIM
15
- ```bash
16
- npx @fraim/framework init
17
- ```
18
-
19
- ### 3. Create Your First AI-Managed Issue
20
- ```bash
21
- gh issue create --title "Add user authentication" --label "phase:design,ai-agent:claude"
22
- ```
23
-
24
- ### 4. Watch the Magic Happen! 🎉
25
-
26
- GitHub automatically:
27
- - 🔄 Creates branch: `feature/1-add-user-authentication`
28
- - 🔄 Creates draft PR
29
- - 🔄 Sets status: `status:wip`
30
- - 🤖 Claude starts working on RFC
31
-
32
- ## 🤖 AI Agent Coordination
33
-
34
- FRAIM coordinates three types of AI agents, each with specific roles:
35
-
36
- ### Cursor (IDE Development)
37
- - **Role**: Implementation and testing
38
- - **Strengths**: Code generation, testing, IDE integration
39
- - **Best For**: `phase:impl` tasks
40
-
41
- ### Claude (Conversational AI)
42
- - **Role**: Design and RFC creation
43
- - **Strengths**: Natural language, documentation, architecture
44
- - **Best For**: `phase:design` tasks
45
-
46
- ### Windsurf (Code Understanding)
47
- - **Role**: Performance and integration
48
- - **Strengths**: Code analysis, optimization, system integration
49
- - **Best For**: `phase:tests` and optimization tasks
50
-
51
- ## 📋 Workflow Phases
52
-
53
- ### Phase 1: Design (`phase:design`)
54
- 1. **Create Issue**: Describe the feature or bug
55
- 2. **Add Labels**: `phase:design` + `ai-agent:claude`
56
- 3. **AI Action**: Claude creates RFC and architecture docs
57
- 4. **Review**: Stakeholders review and approve design
58
- 5. **Transition**: Change to `phase:impl` + `ai-agent:cursor`
59
-
60
- ### Phase 2: Implementation (`phase:impl`)
61
- 1. **AI Action**: Cursor implements the feature
62
- 2. **Testing**: Comprehensive test coverage
63
- 3. **Documentation**: Code comments and updates
64
- 4. **Review**: Code review and validation
65
- 5. **Transition**: Change to `phase:tests` + `ai-agent:windsurf`
66
-
67
- ### Phase 3: Testing (`phase:tests`)
68
- 1. **AI Action**: Windsurf validates implementation
69
- 2. **Performance**: Performance testing and optimization
70
- 3. **Integration**: System integration testing
71
- 4. **Validation**: Final validation against requirements
72
- 5. **Completion**: Mark as `status:complete`
73
-
74
- ## 🏷️ Label System
75
-
76
- ### Phase Labels
77
- - `phase:design` - Design and RFC creation
78
- - `phase:impl` - Implementation and development
79
- - `phase:tests` - Testing and validation
80
-
81
- ### Status Labels
82
- - `status:wip` - Work in progress
83
- - `status:needs-review` - Ready for review
84
- - `status:complete` - Work completed
85
-
86
- ### Agent Labels
87
- - `ai-agent:cursor` - Assigned to Cursor
88
- - `ai-agent:claude` - Assigned to Claude
89
- - `ai-agent:windsurf` - Assigned to Windsurf
90
-
91
- ### Priority Labels (Optional)
92
- - `priority:critical` - Critical priority
93
- - `priority:high` - High priority
94
- - `priority:medium` - Medium priority
95
- - `priority:low` - Low priority
96
-
97
- ## 🔧 Advanced Setup
98
-
99
- ### Interactive Wizard
100
- ```bash
101
- npx @fraim/framework wizard
102
- ```
103
-
104
- The wizard will ask you:
105
- - Which AI agents to enable
106
- - Whether to enable deployment workflows
107
- - Whether to run in dry-run mode first
108
-
109
- ### Custom Configuration
110
- ```bash
111
- npx @fraim/framework setup owner/repository --config custom-config.json
112
- ```
113
-
114
- ### Partial Setup
115
- ```bash
116
- # Only create labels
117
- npx @fraim/framework setup owner/repository --labels-only
118
-
119
- # Only setup workflows
120
- npx @fraim/framework setup owner/repository --workflows-only
121
- ```
122
-
123
- ## 📚 Next Steps
124
-
125
- ### 1. Explore Documentation
126
- - [🧠 RIGOR Methodology](../../README.md#-the-rigor-methodology)
127
- - [🤖 AI Agent Rules](../../agents/)
128
- - [🏗️ Framework Overview](../../README.md#-framework-structure)
129
-
130
- ### 2. Try Different Workflows
131
- - Create issues with different phase/agent combinations
132
- - Experiment with the label system
133
- - Practice phase transitions
134
-
135
- ### 3. Customize for Your Team
136
- - Adjust agent assignments based on team strengths
137
- - Customize workflows for your development process
138
- - Add team-specific labels and processes
139
-
140
- ### 4. Scale Up
141
- - Apply FRAIM to multiple repositories
142
- - Train your team on the methodology
143
- - Integrate with existing CI/CD pipelines
144
-
145
- ## 🎯 Success Metrics
146
-
147
- ### Individual Level
148
- - **Setup Time**: < 30 seconds to get started
149
- - **Issue Resolution**: Faster development cycles
150
- - **Code Quality**: Higher quality through AI coordination
151
- - **Learning**: Better understanding of AI capabilities
152
-
153
- ### Team Level
154
- - **Coordination**: Seamless AI agent collaboration
155
- - **Consistency**: Standardized development processes
156
- - **Visibility**: Clear progress tracking and status
157
- - **Efficiency**: Reduced manual coordination overhead
158
-
159
- ### Organization Level
160
- - **Scalability**: Framework grows with your organization
161
- - **Compliance**: Audit trails and process documentation
162
- - **Innovation**: Faster adoption of new AI capabilities
163
- - **Competitive Advantage**: Professional AI management capabilities
164
-
165
- ## 🚀 Ready to Become an AI Manager?
166
-
167
- ```bash
168
- npx @fraim/framework init
169
- ```
170
-
171
- **FRAIM: Where humans become AI managers through rigorous methodology**
172
-
173
- ---
174
-
175
- *Need help? Check the [main README](../../README.md) or [contact the team](https://github.com/mathursrus/Ashley-Calendar-AI/issues).*