fraim-framework 1.0.0
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/DISTRIBUTION.md +187 -0
- package/README.md +159 -0
- package/agents/claude/CLAUDE.md +42 -0
- package/agents/cursor/rules/architecture.mdc +49 -0
- package/agents/cursor/rules/continuous-learning.mdc +48 -0
- package/agents/cursor/rules/cursor-workflow.mdc +29 -0
- package/agents/cursor/rules/design.mdc +25 -0
- package/agents/cursor/rules/implement.mdc +26 -0
- package/agents/cursor/rules/local-development.mdc +104 -0
- package/agents/cursor/rules/prep.mdc +15 -0
- package/agents/cursor/rules/resolve.mdc +46 -0
- package/agents/cursor/rules/simplicity.mdc +18 -0
- package/agents/cursor/rules/software-development-lifecycle.mdc +41 -0
- package/agents/cursor/rules/test.mdc +25 -0
- package/agents/windsurf/rules/architecture.md +49 -0
- package/agents/windsurf/rules/continuous-learning.md +47 -0
- package/agents/windsurf/rules/local-development.md +103 -0
- package/agents/windsurf/rules/remote-development.md +22 -0
- package/agents/windsurf/rules/simplicity.md +17 -0
- package/agents/windsurf/rules/windsurf-workflow.md +28 -0
- package/agents/windsurf/workflows/prep.md +20 -0
- package/agents/windsurf/workflows/resolve-issue.md +47 -0
- package/agents/windsurf/workflows/start-design.md +26 -0
- package/agents/windsurf/workflows/start-impl.md +27 -0
- package/agents/windsurf/workflows/start-tests.md +26 -0
- package/bin/fraim.js +117 -0
- package/docs/guides/getting-started.md +175 -0
- package/getting-started.md +143 -0
- package/index.js +40 -0
- package/install.sh +58 -0
- package/package.json +50 -0
- package/scripts/__init__.py +10 -0
- package/scripts/cli.py +141 -0
- package/setup.js +86 -0
- package/setup.py +0 -0
- package/test-config.json +32 -0
- package/workflows/setup-fraim.yml +147 -0
package/setup.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* FRAIM Setup Script
|
|
5
|
+
* Framework for Rigor-based AI Management
|
|
6
|
+
*
|
|
7
|
+
* This script sets up the FRAIM framework in a GitHub repository,
|
|
8
|
+
* implementing the RIGOR methodology for coordinated AI agent development.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const { program } = require('commander');
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
|
|
15
|
+
// FRAIM branding
|
|
16
|
+
const FRAIM_BANNER = `
|
|
17
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
18
|
+
║ 🚀 FRAIM Setup ║
|
|
19
|
+
║ Framework for Rigor-based AI Management ║
|
|
20
|
+
║ Where humans become AI managers ║
|
|
21
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
// FRAIM methodology labels
|
|
25
|
+
const FRAIM_LABELS = [
|
|
26
|
+
// Phase Labels (RIGOR methodology)
|
|
27
|
+
{ name: 'phase:design', color: 'C2E0C6', description: 'Design phase - RFC creation and review (RIGOR: Reviews)' },
|
|
28
|
+
{ name: 'phase:impl', color: 'FEF2C0', description: 'Implementation phase - code development (RIGOR: Idempotency)' },
|
|
29
|
+
{ name: 'phase:tests', color: 'D4C5F9', description: 'Testing phase - test creation and validation (RIGOR: Observability)' },
|
|
30
|
+
|
|
31
|
+
// Status Labels
|
|
32
|
+
{ name: 'status:wip', color: 'FBCA04', description: 'Work in progress' },
|
|
33
|
+
{ name: 'status:needs-review', color: 'EB6420', description: 'Ready for review' },
|
|
34
|
+
{ name: 'status:complete', color: '0E8A16', description: 'Work completed' },
|
|
35
|
+
|
|
36
|
+
// AI Agent Labels (AI Management)
|
|
37
|
+
{ name: 'ai-agent:cursor', color: '1F77B4', description: 'Assigned to Cursor agent (IDE development)' },
|
|
38
|
+
{ name: 'ai-agent:claude', color: 'FF7F0E', description: 'Assigned to Claude agent (Conversational AI)' },
|
|
39
|
+
{ name: 'ai-agent:windsurf', color: '2CA02C', description: 'Assigned to Windsurf agent (Code understanding)' },
|
|
40
|
+
|
|
41
|
+
// Priority Labels (optional)
|
|
42
|
+
{ name: 'priority:critical', color: 'D93F0B', description: 'Critical priority' },
|
|
43
|
+
{ name: 'priority:high', color: 'FBCA04', description: 'High priority' },
|
|
44
|
+
{ name: 'priority:medium', color: '0E8A16', description: 'Medium priority' },
|
|
45
|
+
{ name: 'priority:low', color: '0366D6', description: 'Low priority' }
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
// Main setup function
|
|
49
|
+
async function setupFRAIM(options) {
|
|
50
|
+
console.log(FRAIM_BANNER);
|
|
51
|
+
console.log('🚀 Setting up FRAIM in your repository...\n');
|
|
52
|
+
|
|
53
|
+
console.log('📋 This will create:');
|
|
54
|
+
console.log(' • GitHub labels for AI management');
|
|
55
|
+
console.log(' • Automated workflows');
|
|
56
|
+
console.log(' • AI agent configurations');
|
|
57
|
+
console.log(' • Documentation templates\n');
|
|
58
|
+
|
|
59
|
+
if (options.dryRun) {
|
|
60
|
+
console.log('🔍 DRY RUN MODE - No changes will be made\n');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
console.log('🎯 Ready to become an AI manager?');
|
|
64
|
+
console.log(' Run: npx @fraim/framework init # For full setup');
|
|
65
|
+
console.log(' Or: npx @fraim/framework wizard # For interactive setup');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// CLI setup
|
|
69
|
+
program
|
|
70
|
+
.name('fraim-setup')
|
|
71
|
+
.description('Setup FRAIM framework in your repository')
|
|
72
|
+
.version('1.0.0')
|
|
73
|
+
.option('--repo <repository>', 'GitHub repository (owner/repo)')
|
|
74
|
+
.option('--config <file>', 'Configuration file path')
|
|
75
|
+
.option('--dry-run', 'Show what would be done without making changes')
|
|
76
|
+
.option('--labels-only', 'Only setup GitHub labels')
|
|
77
|
+
.option('--workflows-only', 'Only setup GitHub workflows')
|
|
78
|
+
.action(setupFRAIM);
|
|
79
|
+
|
|
80
|
+
// Parse arguments
|
|
81
|
+
program.parse();
|
|
82
|
+
|
|
83
|
+
// If no arguments provided, show help
|
|
84
|
+
if (process.argv.length === 2) {
|
|
85
|
+
program.help();
|
|
86
|
+
}
|
package/setup.py
ADDED
|
File without changes
|
package/test-config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repository": {
|
|
3
|
+
"owner": "mathursrus",
|
|
4
|
+
"name": "fraim-test",
|
|
5
|
+
"branch": "main"
|
|
6
|
+
},
|
|
7
|
+
"features": {
|
|
8
|
+
"labels": true,
|
|
9
|
+
"workflows": true,
|
|
10
|
+
"agentRules": ["cursor", "claude", "windsurf"],
|
|
11
|
+
"deployments": {
|
|
12
|
+
"enabled": false,
|
|
13
|
+
"environments": ["ppe", "production"]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"phases": {
|
|
17
|
+
"design": { "required_approvals": 1 },
|
|
18
|
+
"implementation": { "required_approvals": 1 },
|
|
19
|
+
"testing": { "auto_deploy_on_approval": false }
|
|
20
|
+
},
|
|
21
|
+
"customization": {
|
|
22
|
+
"additionalLabels": [
|
|
23
|
+
{
|
|
24
|
+
"name": "test-label",
|
|
25
|
+
"color": "FF0000",
|
|
26
|
+
"description": "Test label for validation"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"workflowOverrides": {},
|
|
30
|
+
"agentRuleOverrides": {}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
name: Setup FRAIM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
agents:
|
|
7
|
+
description: 'AI Agents to enable'
|
|
8
|
+
required: true
|
|
9
|
+
default: 'cursor,claude,windsurf'
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- 'cursor,claude,windsurf'
|
|
13
|
+
- 'cursor,claude'
|
|
14
|
+
- 'cursor,windsurf'
|
|
15
|
+
- 'claude,windsurf'
|
|
16
|
+
- 'cursor'
|
|
17
|
+
- 'claude'
|
|
18
|
+
- 'windsurf'
|
|
19
|
+
enable_deployments:
|
|
20
|
+
description: 'Enable deployment workflows'
|
|
21
|
+
required: false
|
|
22
|
+
default: false
|
|
23
|
+
type: boolean
|
|
24
|
+
dry_run:
|
|
25
|
+
description: 'Dry run (preview changes only)'
|
|
26
|
+
required: false
|
|
27
|
+
default: true
|
|
28
|
+
type: boolean
|
|
29
|
+
|
|
30
|
+
permissions:
|
|
31
|
+
contents: write
|
|
32
|
+
issues: write
|
|
33
|
+
pull-requests: write
|
|
34
|
+
|
|
35
|
+
jobs:
|
|
36
|
+
setup-fraim:
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
steps:
|
|
39
|
+
- name: Checkout repository
|
|
40
|
+
uses: actions/checkout@v4
|
|
41
|
+
|
|
42
|
+
- name: Setup Node.js
|
|
43
|
+
uses: actions/setup-node@v4
|
|
44
|
+
with:
|
|
45
|
+
node-version: '20'
|
|
46
|
+
|
|
47
|
+
- name: Install FRAIM
|
|
48
|
+
run: |
|
|
49
|
+
# Download and install FRAIM framework
|
|
50
|
+
curl -sSL https://github.com/mathursrus/Ashley-Calendar-AI/archive/master.tar.gz | tar -xz --strip-components=2 Ashley-Calendar-AI-master/FRAIM/
|
|
51
|
+
|
|
52
|
+
# Create configuration
|
|
53
|
+
cat > fraim-config.json << EOF
|
|
54
|
+
{
|
|
55
|
+
"repository": {
|
|
56
|
+
"owner": "${{ github.repository_owner }}",
|
|
57
|
+
"name": "${{ github.event.repository.name }}",
|
|
58
|
+
"branch": "${{ github.event.repository.default_branch }}"
|
|
59
|
+
},
|
|
60
|
+
"features": {
|
|
61
|
+
"labels": true,
|
|
62
|
+
"workflows": true,
|
|
63
|
+
"agentRules": [${{ github.event.inputs.agents }}],
|
|
64
|
+
"deployments": {
|
|
65
|
+
"enabled": ${{ github.event.inputs.enable_deployments }}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
EOF
|
|
70
|
+
|
|
71
|
+
- name: Run FRAIM Setup
|
|
72
|
+
env:
|
|
73
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
74
|
+
run: |
|
|
75
|
+
REPO="${{ github.repository }}"
|
|
76
|
+
|
|
77
|
+
if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then
|
|
78
|
+
echo "🧪 Running in dry-run mode..."
|
|
79
|
+
node setup.js --repo "$REPO" --config fraim-config.json --dry-run --verbose
|
|
80
|
+
else
|
|
81
|
+
echo "🚀 Setting up FRAIM framework..."
|
|
82
|
+
node setup.js --repo "$REPO" --config fraim-config.json --verbose
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
- name: Create Success Issue
|
|
86
|
+
if: github.event.inputs.dry_run == 'false'
|
|
87
|
+
uses: actions/github-script@v6
|
|
88
|
+
with:
|
|
89
|
+
script: |
|
|
90
|
+
github.rest.issues.create({
|
|
91
|
+
owner: context.repo.owner,
|
|
92
|
+
repo: context.repo.repo,
|
|
93
|
+
title: '🎉 FRAIM Setup Complete!',
|
|
94
|
+
body: `## FRAIM Successfully Installed! 🚀
|
|
95
|
+
|
|
96
|
+
Your repository is now equipped with the FRAIM framework for Rigor-based AI Management.
|
|
97
|
+
|
|
98
|
+
### What's Been Set Up
|
|
99
|
+
- ✅ **GitHub Labels**: Phase, status, agent, and priority labels
|
|
100
|
+
- ✅ **Workflows**: Automated branch and PR management
|
|
101
|
+
- ✅ **Agent Configs**: ${{ github.event.inputs.agents }} agent configurations
|
|
102
|
+
- ✅ **Documentation**: Templates and guides
|
|
103
|
+
|
|
104
|
+
### Next Steps
|
|
105
|
+
1. **Create an issue** for your first task
|
|
106
|
+
2. **Add phase label**: \`phase:design\`, \`phase:impl\`, or \`phase:tests\`
|
|
107
|
+
3. **Add agent label**: \`ai-agent:cursor\`, \`ai-agent:claude\`, or \`ai-agent:windsurf\`
|
|
108
|
+
4. **Watch the automation** create branches and PRs automatically!
|
|
109
|
+
|
|
110
|
+
### Example Workflow
|
|
111
|
+
\`\`\`
|
|
112
|
+
1. Create issue: "Add user authentication feature"
|
|
113
|
+
2. Add labels: "phase:design" + "ai-agent:claude"
|
|
114
|
+
3. GitHub creates branch: feature/123-add-user-authentication-feature
|
|
115
|
+
4. Claude creates RFC and marks "status:needs-review"
|
|
116
|
+
5. After approval, change to "phase:impl" + "ai-agent:cursor"
|
|
117
|
+
6. Cursor implements the feature and tests
|
|
118
|
+
7. Code review and merge!
|
|
119
|
+
\`\`\`
|
|
120
|
+
|
|
121
|
+
### Resources
|
|
122
|
+
- 📚 [FRAIM Documentation](https://github.com/mathursrus/Ashley-Calendar-AI/tree/master/FRAIM)
|
|
123
|
+
- 🤖 [Agent Coordination Guide](https://github.com/mathursrus/Ashley-Calendar-AI/tree/master/FRAIM/docs/guides)
|
|
124
|
+
- 🏗️ [Architecture Overview](https://github.com/mathursrus/Ashley-Calendar-AI/tree/master/FRAIM/docs/architecture)
|
|
125
|
+
|
|
126
|
+
**Welcome to the future of AI management!** 🤖✨`,
|
|
127
|
+
labels: ['phase:design', 'status:complete', 'documentation']
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
- name: Setup Summary
|
|
131
|
+
if: always()
|
|
132
|
+
run: |
|
|
133
|
+
echo "## 🎯 FRAIM Setup Summary" >> $GITHUB_STEP_SUMMARY
|
|
134
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
135
|
+
echo "**Repository**: ${{ github.repository }}" >> $GITHUB_STEP_SUMMARY
|
|
136
|
+
echo "**Agents**: ${{ github.event.inputs.agents }}" >> $GITHUB_STEP_SUMMARY
|
|
137
|
+
echo "**Deployments**: ${{ github.event.inputs.enable_deployments }}" >> $GITHUB_STEP_SUMMARY
|
|
138
|
+
echo "**Dry Run**: ${{ github.event.inputs.dry_run }}" >> $GITHUB_STEP_SUMMARY
|
|
139
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
140
|
+
|
|
141
|
+
if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then
|
|
142
|
+
echo "✅ **Dry run completed successfully!**" >> $GITHUB_STEP_SUMMARY
|
|
143
|
+
echo "Re-run this workflow with 'Dry run' unchecked to apply changes." >> $GITHUB_STEP_SUMMARY
|
|
144
|
+
else
|
|
145
|
+
echo "🚀 **FRAIM setup completed!**" >> $GITHUB_STEP_SUMMARY
|
|
146
|
+
echo "Check the issues tab for your welcome issue with next steps." >> $GITHUB_STEP_SUMMARY
|
|
147
|
+
fi
|