fraim-framework 1.0.12 โ†’ 2.0.2

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 (93) hide show
  1. package/.ai-agents/agent-guardrails.md +58 -0
  2. package/.ai-agents/mcp-template.jsonc +34 -0
  3. package/.ai-agents/rules/agent-testing-guidelines.md +545 -0
  4. package/.ai-agents/rules/architecture.md +52 -0
  5. package/.ai-agents/rules/communication.md +122 -0
  6. package/.ai-agents/rules/continuous-learning.md +55 -0
  7. package/.ai-agents/rules/git-safe-commands.md +34 -0
  8. package/.ai-agents/rules/integrity-and-test-ethics.md +223 -0
  9. package/.ai-agents/rules/local-development.md +252 -0
  10. package/.ai-agents/rules/merge-requirements.md +231 -0
  11. package/.ai-agents/rules/pr-workflow-completeness.md +191 -0
  12. package/.ai-agents/rules/simplicity.md +112 -0
  13. package/.ai-agents/rules/software-development-lifecycle.md +276 -0
  14. package/.ai-agents/rules/spike-first-development.md +199 -0
  15. package/.ai-agents/rules/successful-debugging-patterns.md +313 -0
  16. package/.ai-agents/scripts/cleanup-branch.ts +278 -0
  17. package/.ai-agents/scripts/exec-with-timeout.ts +122 -0
  18. package/.ai-agents/scripts/prep-issue.sh +162 -0
  19. package/.ai-agents/templates/evidence/Design-Evidence.md +30 -0
  20. package/.ai-agents/templates/evidence/Implementation-BugEvidence.md +48 -0
  21. package/.ai-agents/templates/evidence/Implementation-FeatureEvidence.md +54 -0
  22. package/.ai-agents/templates/evidence/Spec-Evidence.md +19 -0
  23. package/.ai-agents/templates/help/HelpNeeded.md +14 -0
  24. package/.ai-agents/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +55 -0
  25. package/.ai-agents/templates/specs/BUGSPEC-TEMPLATE.md +37 -0
  26. package/.ai-agents/templates/specs/FEATURESPEC-TEMPLATE.md +29 -0
  27. package/.ai-agents/templates/specs/TECHSPEC-TEMPLATE.md +39 -0
  28. package/.ai-agents/workflows/design.md +121 -0
  29. package/.ai-agents/workflows/implement.md +170 -0
  30. package/.ai-agents/workflows/resolve.md +152 -0
  31. package/.ai-agents/workflows/retrospect.md +84 -0
  32. package/.ai-agents/workflows/spec.md +103 -0
  33. package/.ai-agents/workflows/test.md +90 -0
  34. package/.cursor/rules/cursor-rules.mdc +8 -0
  35. package/.cursor/rules/design.mdc +4 -0
  36. package/.cursor/rules/implement.mdc +6 -0
  37. package/.cursor/rules/resolve.mdc +5 -0
  38. package/.cursor/rules/retrospect.mdc +4 -0
  39. package/.cursor/rules/spec.mdc +4 -0
  40. package/.cursor/rules/test.mdc +5 -0
  41. package/.windsurf/rules/windsurf-rules.md +7 -0
  42. package/.windsurf/workflows/resolve-issue.md +6 -0
  43. package/.windsurf/workflows/retrospect.md +6 -0
  44. package/.windsurf/workflows/start-design.md +6 -0
  45. package/.windsurf/workflows/start-impl.md +6 -0
  46. package/.windsurf/workflows/start-spec.md +6 -0
  47. package/.windsurf/workflows/start-tests.md +6 -0
  48. package/CHANGELOG.md +66 -0
  49. package/CODEOWNERS +24 -0
  50. package/DISTRIBUTION.md +6 -6
  51. package/PUBLISH_INSTRUCTIONS.md +93 -0
  52. package/README.md +330 -104
  53. package/bin/fraim.js +49 -3
  54. package/index.js +30 -3
  55. package/install.sh +58 -58
  56. package/labels.json +52 -0
  57. package/linkedin-post.md +23 -0
  58. package/package.json +12 -7
  59. package/sample_package.json +18 -0
  60. package/setup.js +733 -384
  61. package/test-utils.ts +118 -0
  62. package/tsconfig.json +22 -0
  63. package/agents/claude/CLAUDE.md +0 -42
  64. package/agents/cursor/rules/architecture.mdc +0 -49
  65. package/agents/cursor/rules/continuous-learning.mdc +0 -48
  66. package/agents/cursor/rules/cursor-workflow.mdc +0 -29
  67. package/agents/cursor/rules/design.mdc +0 -25
  68. package/agents/cursor/rules/implement.mdc +0 -26
  69. package/agents/cursor/rules/local-development.mdc +0 -104
  70. package/agents/cursor/rules/prep.mdc +0 -15
  71. package/agents/cursor/rules/resolve.mdc +0 -46
  72. package/agents/cursor/rules/simplicity.mdc +0 -18
  73. package/agents/cursor/rules/software-development-lifecycle.mdc +0 -41
  74. package/agents/cursor/rules/test.mdc +0 -25
  75. package/agents/windsurf/rules/architecture.md +0 -49
  76. package/agents/windsurf/rules/continuous-learning.md +0 -47
  77. package/agents/windsurf/rules/local-development.md +0 -103
  78. package/agents/windsurf/rules/remote-development.md +0 -22
  79. package/agents/windsurf/rules/simplicity.md +0 -17
  80. package/agents/windsurf/rules/windsurf-workflow.md +0 -28
  81. package/agents/windsurf/workflows/prep.md +0 -20
  82. package/agents/windsurf/workflows/resolve-issue.md +0 -47
  83. package/agents/windsurf/workflows/start-design.md +0 -26
  84. package/agents/windsurf/workflows/start-impl.md +0 -27
  85. package/agents/windsurf/workflows/start-tests.md +0 -26
  86. package/github/phase-change.yml +0 -218
  87. package/github/status-change.yml +0 -68
  88. package/github/sync-on-pr-review.yml +0 -66
  89. package/scripts/__init__.py +0 -10
  90. package/scripts/cli.py +0 -141
  91. package/setup.py +0 -0
  92. package/test-config.json +0 -32
  93. package/workflows/setup-fraim.yml +0 -147
@@ -1,66 +0,0 @@
1
- name: Sync Issue on PR Review
2
- on:
3
- pull_request_review:
4
- types: [submitted]
5
-
6
- permissions:
7
- pull-requests: write
8
- issues: write
9
-
10
- concurrency:
11
- group: review-sync-${{ github.event.pull_request.number }}
12
- cancel-in-progress: true
13
-
14
- jobs:
15
- sync-on-review:
16
- runs-on: ubuntu-latest
17
- # no job-level `if` โ€” we branch inside the script
18
- env:
19
- GH_TOKEN: ${{ secrets.PR_AUTOMATION_TOKEN || secrets.GITHUB_TOKEN }}
20
- REPO: ${{ github.repository }}
21
- steps:
22
- - name: Derive review state, issue number, and branch
23
- id: vars
24
- shell: bash
25
- run: |
26
- set -euo pipefail
27
- STATE="${{ github.event.review.state }}"
28
- BR="${{ github.event.pull_request.head.ref }}" # e.g., feature/26-slug
29
- ISSUE="$(sed -nE 's#^feature/([0-9]+)-.*#\1#p' <<< "$BR" || true)"
30
- echo "state=$STATE" >> $GITHUB_OUTPUT
31
- echo "issue=$ISSUE" >> $GITHUB_OUTPUT
32
- echo "branch=$BR" >> $GITHUB_OUTPUT
33
- echo "Detected review state: $STATE; branch: $BR; issue: $ISSUE"
34
-
35
- - name: Handle review states
36
- if: steps.vars.outputs.issue != ''
37
- shell: bash
38
- env:
39
- STATE: ${{ steps.vars.outputs.state }}
40
- ISSUE: ${{ steps.vars.outputs.issue }}
41
- PRNUM: ${{ github.event.pull_request.number }}
42
- REPO: ${{ env.REPO }}
43
- run: |
44
- set -euo pipefail
45
- case "$STATE" in
46
- changes_requested)
47
- # Flip to WIP
48
- gh issue edit "$ISSUE" --repo "$REPO" \
49
- --add-label "status:wip" --remove-label "status:needs-review" --remove-label "status:complete" || true
50
- gh pr edit "$PRNUM" --repo "$REPO" \
51
- --add-label "status:wip" --remove-label "status:needs-review" --remove-label "status:complete" || true
52
- ;;
53
- approved)
54
- # Flip to Complete
55
- gh issue edit "$ISSUE" --repo "$REPO" \
56
- --add-label "status:complete" --remove-label "status:wip" --remove-label "status:needs-review" || true
57
- gh pr edit "$PRNUM" --repo "$REPO" --add-label "status:complete" --remove-label "status:wip" --remove-label "status:needs-review" || true
58
- ;;
59
- commented)
60
- # No-op; comments donโ€™t change state
61
- echo "Review was 'commented' โ€” no state change."
62
- ;;
63
- *)
64
- echo "Unknown review state: $STATE"
65
- ;;
66
- esac
@@ -1,10 +0,0 @@
1
- """
2
- FRAIM Python Package
3
- Framework for Rigor-based AI Management
4
- Where humans become AI managers through rigorous methodology
5
- """
6
-
7
- from .cli import main
8
-
9
- __version__ = "1.0.0"
10
- __all__ = ["main"]
package/scripts/cli.py DELETED
@@ -1,141 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- FRAIM Python CLI
4
- Framework for Rigor-based AI Management
5
- Where humans become AI managers through rigorous methodology
6
- """
7
-
8
- import sys
9
- import argparse
10
-
11
- def show_banner():
12
- """Display FRAIM banner"""
13
- banner = """
14
- โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
15
- โ•‘ ๐Ÿš€ FRAIM โ•‘
16
- โ•‘ Framework for Rigor-based AI Management โ•‘
17
- โ•‘ Where humans become AI managers โ•‘
18
- โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
19
- """
20
- print(banner)
21
-
22
- def show_help():
23
- """Display help information"""
24
- show_banner()
25
- print("๐Ÿค– Welcome to FRAIM!")
26
- print("Where humans become AI managers through rigorous methodology\n")
27
-
28
- print("๐Ÿš€ Quick commands:")
29
- print(" pip install fraim-framework")
30
- print(" fraim init # Setup current repository")
31
- print(" fraim rigor # Learn RIGOR methodology")
32
- print(" fraim --help # Full documentation\n")
33
-
34
- print("๐Ÿง  The RIGOR Methodology:")
35
- print(" R - Reviews: Structured feedback and approval processes")
36
- print(" I - Idempotency: Safe, repeatable operations")
37
- print(" G - GitOps: Git as the single source of truth")
38
- print(" O - Observability: Complete visibility into AI activities")
39
- print(" R - Rollback: Safe recovery from any state\n")
40
-
41
- print("๐Ÿ“š Documentation: https://github.com/mathursrus/Ashley-Calendar-AI/tree/master/FRAIM")
42
- print("๐ŸŽฏ Ready to become an AI manager? Run: fraim init")
43
-
44
- def show_rigor():
45
- """Display RIGOR methodology information"""
46
- show_banner()
47
- print("๐Ÿง  The RIGOR Methodology for AI Management\n")
48
-
49
- print("R - Reviews:")
50
- print(" โ€ข Structured feedback and approval processes")
51
- print(" โ€ข Code review workflows with AI agents")
52
- print(" โ€ข Automated quality gates and checks")
53
- print(" โ€ข Human oversight of AI decisions\n")
54
-
55
- print("I - Idempotency:")
56
- print(" โ€ข Safe, repeatable operations")
57
- print(" โ€ข No side effects from multiple runs")
58
- print(" โ€ข Consistent results every time")
59
- print(" โ€ข Rollback-friendly changes\n")
60
-
61
- print("G - GitOps:")
62
- print(" โ€ข Git as the single source of truth")
63
- print(" โ€ข Declarative infrastructure and workflows")
64
- print(" โ€ข Automated deployments from Git changes")
65
- print(" โ€ข Version-controlled AI agent configurations\n")
66
-
67
- print("O - Observability:")
68
- print(" โ€ข Complete visibility into AI activities")
69
- print(" โ€ข Metrics, logs, and tracing")
70
- print(" โ€ข Performance monitoring and alerting")
71
- print(" โ€ข Audit trails for compliance\n")
72
-
73
- print("R - Rollback:")
74
- print(" โ€ข Safe recovery from any state")
75
- print(" โ€ข Automated rollback mechanisms")
76
- print(" โ€ข Point-in-time recovery")
77
- print(" โ€ข Zero-downtime deployments\n")
78
-
79
- print("๐ŸŽฏ This methodology transforms you from a developer into an AI manager!")
80
-
81
- def main():
82
- """Main CLI entry point"""
83
- parser = argparse.ArgumentParser(
84
- description="FRAIM: Framework for Rigor-based AI Management",
85
- formatter_class=argparse.RawDescriptionHelpFormatter,
86
- epilog="""
87
- Examples:
88
- fraim init # Setup FRAIM in current repository
89
- fraim rigor # Learn about RIGOR methodology
90
- fraim --help # Show this help message
91
- """
92
- )
93
-
94
- parser.add_argument(
95
- "command",
96
- nargs="?",
97
- choices=["init", "rigor", "setup", "wizard"],
98
- help="Command to execute"
99
- )
100
-
101
- parser.add_argument(
102
- "--version",
103
- action="version",
104
- version="FRAIM 1.0.0"
105
- )
106
-
107
- args = parser.parse_args()
108
-
109
- if not args.command or args.command == "help":
110
- show_help()
111
- return
112
-
113
- if args.command == "rigor":
114
- show_rigor()
115
- return
116
-
117
- if args.command in ["init", "setup"]:
118
- show_banner()
119
- print("๐Ÿš€ Setting up FRAIM in current repository...\n")
120
- print("๐Ÿ“‹ This will:")
121
- print(" โ€ข Create GitHub labels for AI management")
122
- print(" โ€ข Set up automated workflows")
123
- print(" โ€ข Configure AI agent rules")
124
- print(" โ€ข Initialize documentation\n")
125
- print("๐Ÿ’ก Run: fraim init # For full setup")
126
- print("๐Ÿ”ง Or run: fraim wizard # For interactive setup")
127
- return
128
-
129
- if args.command == "wizard":
130
- show_banner()
131
- print("๐Ÿ”ฎ FRAIM Interactive Setup Wizard\n")
132
- print("This wizard will guide you through:")
133
- print(" 1. Repository configuration")
134
- print(" 2. AI agent setup")
135
- print(" 3. Workflow customization")
136
- print(" 4. Team member onboarding\n")
137
- print("๐Ÿ’ก Run: fraim wizard # To start the wizard")
138
- return
139
-
140
- if __name__ == "__main__":
141
- main()
package/setup.py DELETED
File without changes
package/test-config.json DELETED
@@ -1,32 +0,0 @@
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
- }
@@ -1,147 +0,0 @@
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