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.
Files changed (37) hide show
  1. package/DISTRIBUTION.md +187 -0
  2. package/README.md +159 -0
  3. package/agents/claude/CLAUDE.md +42 -0
  4. package/agents/cursor/rules/architecture.mdc +49 -0
  5. package/agents/cursor/rules/continuous-learning.mdc +48 -0
  6. package/agents/cursor/rules/cursor-workflow.mdc +29 -0
  7. package/agents/cursor/rules/design.mdc +25 -0
  8. package/agents/cursor/rules/implement.mdc +26 -0
  9. package/agents/cursor/rules/local-development.mdc +104 -0
  10. package/agents/cursor/rules/prep.mdc +15 -0
  11. package/agents/cursor/rules/resolve.mdc +46 -0
  12. package/agents/cursor/rules/simplicity.mdc +18 -0
  13. package/agents/cursor/rules/software-development-lifecycle.mdc +41 -0
  14. package/agents/cursor/rules/test.mdc +25 -0
  15. package/agents/windsurf/rules/architecture.md +49 -0
  16. package/agents/windsurf/rules/continuous-learning.md +47 -0
  17. package/agents/windsurf/rules/local-development.md +103 -0
  18. package/agents/windsurf/rules/remote-development.md +22 -0
  19. package/agents/windsurf/rules/simplicity.md +17 -0
  20. package/agents/windsurf/rules/windsurf-workflow.md +28 -0
  21. package/agents/windsurf/workflows/prep.md +20 -0
  22. package/agents/windsurf/workflows/resolve-issue.md +47 -0
  23. package/agents/windsurf/workflows/start-design.md +26 -0
  24. package/agents/windsurf/workflows/start-impl.md +27 -0
  25. package/agents/windsurf/workflows/start-tests.md +26 -0
  26. package/bin/fraim.js +117 -0
  27. package/docs/guides/getting-started.md +175 -0
  28. package/getting-started.md +143 -0
  29. package/index.js +40 -0
  30. package/install.sh +58 -0
  31. package/package.json +50 -0
  32. package/scripts/__init__.py +10 -0
  33. package/scripts/cli.py +141 -0
  34. package/setup.js +86 -0
  35. package/setup.py +0 -0
  36. package/test-config.json +32 -0
  37. package/workflows/setup-fraim.yml +147 -0
@@ -0,0 +1,46 @@
1
+ ---
2
+ description: Start resolution workflow
3
+ alwaysApply: false
4
+ ---
5
+ Ensure branch: feature/{issue}-{slug} is checked out (create if needed).
6
+
7
+ Commit & push any pending changes.
8
+
9
+ Sync from origin/master into this branch (merge or rebase), resolve conflicts, push again.
10
+
11
+ Check the results of GitHub Action that runs the full tests in the cloud.
12
+
13
+ If they pass: open/update the Implementation PR, label it, and enable auto-merge.
14
+
15
+ If they fail: no PR is opened/updated; fix, push again, repeat.
16
+
17
+ Once PR is approved and related actions succeed, do the following:
18
+ - **MANDATORY**: Verify PR is actually merged to master before proceeding
19
+ - **MANDATORY**: Run merge verification checks (see below)
20
+ - Close the issue ONLY after merge verification passes
21
+ - Delete the branch remotely.
22
+ - If operating locally, delete the local branch and the local codebase.
23
+ - Say Hoorah !
24
+
25
+ ## Mandatory Merge Verification
26
+
27
+ **Before closing ANY issue, verify the following:**
28
+
29
+ 1. ✅ **PR Status**: PR shows "merged" status, not just "closed"
30
+ 2. ✅ **Merge Commit**: Verify merge commit exists in master
31
+ 3. ✅ **Files in Master**: Confirm expected files are present in master
32
+
33
+ ### **Verification Commands**
34
+ ```bash
35
+ # Check PR is merged, not just closed
36
+ gh pr view <PR_NUMBER> --json merged
37
+
38
+ # Verify merge commit in master
39
+ git fetch origin master
40
+ git log origin/master --oneline | grep "PR #<PR_NUMBER>"
41
+
42
+ # Verify files in master
43
+ git show origin/master:path/to/expected/file
44
+ ```
45
+
46
+ **CRITICAL**: Do not close the issue until merge verification passes. This prevents work loss incidents.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description:
3
+ globs:
4
+ alwaysApply: true
5
+ ---
6
+
7
+ ****Keep it simple. Don't over-engineer. *****
8
+ Don't over-think it.
9
+ While fixing an issue, focus on that issue only. Don't fix other issues. Don't make unrelated changes. Instead, file a Git issue if you find other issues that aren't already tracked by an existing Git issue.
10
+
11
+
12
+ Always verify the action you have taken. Do not expect the user to verify it for you.
13
+ If you kicked off a Git workflow, verify it completed successfully (e.g., gh checks: list or PR status).
14
+ If you wrote a test and expect it to pass, run it yourself and verify it passes; if you expect it to fail, verify it fails.
15
+ Always link work to the issue (use “Closes #<n>” in the Implementation PR).
16
+ Open Draft PRs early; review happens in the PR, not in chat.
17
+
18
+ Agents must not run gh pr create. Push to the feature branch and let Actions open Draft PRs.
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: Issue resolution process for local development with branch/clone approach
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Issue Resolution Process
7
+
8
+ Always work on the feature branch for the current issue: `feature/<issue#>-<kebab-title>`. Never push to master.
9
+
10
+ ## Development Workflow
11
+ 1. **Clone Setup**: Work in your own cloned repository folder.
12
+ 2. **Branch Management**: Create/checkout feature branch for your issue
13
+ 3. **Local Development**: Make changes, run tests locally
14
+ 4. **Check before commit**: Only commit after approval from the user.
15
+ 5. **Remote Coordination**: Use GitHub MCP for issue labels
16
+
17
+ ## Phases
18
+ - **Design**: Set ISSUE to `phase:design` → create RFC
19
+ - **Implementation**: Set ISSUE to `phase:impl` → implement solution
20
+
21
+ ## Status Management
22
+ - **WIP**: Automatically set when entering new phase
23
+ - **Needs Review**: Set this when work is ready for review
24
+ - **Complete**: Automatically set when PR is approved
25
+
26
+ ## PR Requirements
27
+ - Implementation PR body MUST include `Closes #<n>`
28
+ - Let Actions handle PR creation and updates
29
+ - Address all reviewer feedback before completion
30
+
31
+ ## Cleanup
32
+ When user confirms code is correctly merged into master, confirm with the user, then
33
+ - delete remote branch
34
+ - delete local branch
35
+ - remove your local clone folder:
36
+ ```
37
+ cd ..
38
+ Remove-Item -Recurse -Force "<repo> - Issue {issue_number}"
39
+ ```
40
+
41
+ Respect CODEOWNERS; don't modify auth/CI without approval.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Start testing workflow
3
+ alwaysApply: false
4
+ ---
5
+ Step 1: Ask for {issue_number} (and optional {slug}); confirm target branch feature/{issue_number}-{slug}.
6
+
7
+ Step 2: Using GitHub MCP, ensure the branch exists (your GitHub Action will usually auto-create it) and checkout it.
8
+
9
+ Step 3: Label the issue 'phase:tests'. (GitHub Action will automatically label the issue `status:wip`, create a draft PR)
10
+
11
+ Step 4: Do your work either remotely or locally as defined by the user. If unsure, ask the user. Once sure, let the user know.
12
+
13
+ Step 5: Your work entails the following
14
+
15
+ - Review the RFC associated with this issue.
16
+
17
+ - Determine whether tests need to be added to an existing test suite, or a new one needs to be created.
18
+
19
+ - Write the minimal set of test cases that accurately reproduce the issue
20
+
21
+ - Run the test cases to ensure they fail
22
+
23
+ - Flip issue to 'status:needs-review' and remove 'status:wip'
24
+
25
+ Step 6: If workflow actions or reviewer feedback indicates more work is needed, ensure the issue is set back to `status:wip` and continue working as above.
@@ -0,0 +1,49 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+
6
+ # Architecture
7
+
8
+ ## Intent
9
+ Keep the architecture clean: use BAML (LLM) for any natural-language understanding, fuzzy matching, or semantic comparison. Use deterministic TypeScript only for side-effectful or strictly rule-based work (APIs, DB, validation, formatting, scheduling, retries).
10
+
11
+ ## Principles (follow in this order)
12
+ 1. Parse (LLM/BAML) → 2. Normalize (deterministic) → 3. Validate (deterministic) → 4. Decide (LLM if subjective; code if rules) → 5. Act (deterministic side effects)
13
+
14
+ ## LLM/BAML Usage
15
+ - Entity/intent extraction, timezone/place inference, date/time range interpretation
16
+ - Participant role classification, preference inference, text similarity
17
+ - De-dupe by meaning, natural language understanding
18
+
19
+ ## Deterministic TypeScript Usage
20
+ - ISO date math, schema validation, authZ/authN, idempotency keys
21
+ - OpenAPI I/O, DB writes, calendar invites, retries/timeouts
22
+ - Metrics/telemetry, side effects
23
+
24
+ ## Do / Don't
25
+
26
+ ### Do (LLM/BAML)
27
+ - NLP; Anything that needs understanding from user unstructured input
28
+
29
+ ### Do (Deterministic TS)
30
+ - Ensure structure through interfaces, folder management, test cases
31
+
32
+ ### Don't
33
+ - Don't hand-roll regex/heuristics for dates/locations/intent
34
+ - Don't duplicate LLM functionality
35
+ - Don't call BAML for pure formatting (e.g., toISOString, trimming)
36
+
37
+ ## Project Structure
38
+ - **BAML sources**: `/baml_src/**/*.baml`
39
+ - **Generated client**: `/baml_client/**` (run `baml-cli generate`)
40
+ - **Deterministic logic**: `/src/**`
41
+ - **Design docs + Test plans**: `/docs/rfcs/*.md`
42
+ - **Random utility scripts**: `/scripts`
43
+ - **Test cases**: `/` (at root level, these are the most important artifacts)
44
+
45
+ ## Local Development Notes
46
+ - Test deterministic logic with unit tests before integrating with LLM components
47
+ - Write test cases for each change. Tag representative ones with 'smoke'
48
+ - Keep architecture boundaries clear between LLM and deterministic code
49
+ - Document any architectural decisions in your RFC or implementation notes
@@ -0,0 +1,47 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # Continuous Learning
6
+
7
+ ## Retrospectives Review
8
+ - **Always review** the `/retrospectives/` folder before starting work on similar issues
9
+ - **Learn from past problems** - understand root cause analysis and lessons learned
10
+ - **Apply previous solutions** - don't repeat mistakes that have already been solved
11
+
12
+ ## Knowledge Integration
13
+ - **Read related RFCs** in `/docs/rfcs/` to understand design decisions
14
+ - **Review test cases** to see how similar problems were approached
15
+ - **Check issue history** for patterns in failures and solutions
16
+
17
+ ## Local Development Benefits
18
+ - **Avoid known pitfalls** by learning from retrospectives
19
+ - **Build on existing solutions** rather than starting from scratch
20
+ - **Understand system constraints** from past architectural decisions
21
+
22
+ ## Before Starting Work
23
+ 1. **Search retrospectives** for related issues or similar problems
24
+ 2. **Read relevant RFCs** to understand the design context
25
+ 3. **Review test cases** to see expected behavior
26
+ 4. **Check issue comments** for previous attempts and solutions
27
+
28
+ ## Document Your Learning
29
+ - **Update retrospectives** if you discover new insights
30
+ - **Add to RFCs** if you find better approaches
31
+ - **Share solutions** with other agents through issue comments
32
+
33
+ ## Retrospective Triggers
34
+
35
+ ### **Automatic Retrospective Requirements**
36
+ - **Complex Issues (>3 iterations)**: Must create retrospective before issue closure
37
+ - **Process Violations**: Any workflow rule violations require retrospectives
38
+ - **Work Loss Incidents**: Any incidents where work is lost require detailed retrospectives
39
+
40
+ ### **Retrospective Creation Process**
41
+ 1. **Stop Current Work**: Pause issue resolution if retrospective is required
42
+ 2. **Create Retrospective**: Use standard template in retrospectives folder
43
+ 3. **Root Cause Analysis**: Identify underlying causes, not just symptoms
44
+ 4. **Prevention Measures**: Document specific actions to prevent recurrence
45
+ 5. **Process Updates**: Update rules and workflows based on learnings
46
+
47
+ Remember: The best code is often written by those who learn from history rather than repeat it.
@@ -0,0 +1,103 @@
1
+ ---
2
+ trigger: manual
3
+ ---
4
+
5
+ # Local Development with Remote Coordination
6
+
7
+ - Use local file system for development work in your own cloned repository folder
8
+ - Push to feature branches only; never push to master
9
+ - Do NOT open PRs; push and let Actions open/update Draft PRs
10
+ - Always work in your own cloned repository folder: `git clone <repo> "<repo> - Issue {issue_number}"`
11
+ - After you create the clone, do not forget to change into that working directory. All your work **MUST** be in your working directory.
12
+ - Coordinate with other agents through GitHub issues and PRs
13
+ - Each agent works independently in their own folder to enable true parallel development
14
+
15
+ ## CRITICAL RULE: Absolute Workspace Separation
16
+
17
+ ### Local Clone: WORK-ONLY
18
+ - **Directory**: `<repo> - Issue <issue number>`
19
+ - **Purpose**: All development work happens here exclusively
20
+ - **Rule**: ALL file operations must be within this directory
21
+
22
+ ## Mandatory Pre-File-Operation Checklist
23
+
24
+ **Before ANY file operation (edit_file, delete_file, etc.), verify:**
25
+
26
+ 1. ✅ **Directory Check**: `pwd` shows local clone with issue number in path
27
+ 2. ✅ **Path Verification**: File path is relative (no "../" or main workspace name)
28
+ 3. ✅ **Branch Check**: `git branch` shows correct feature branch
29
+ 4. ❌ **If ANY check fails**: STOP immediately and fix location
30
+
31
+ **This checklist is MANDATORY, not optional.**
32
+
33
+
34
+ ## Enhanced Stop Conditions
35
+
36
+ **Stop ALL work immediately if:**
37
+ - You create a file and it appears in main workspace
38
+ - You use edit_file with "../" paths
39
+ - You work in directory without issue number in name
40
+ - `pwd` shows main workspace path
41
+ - Any file operation targets main workspace
42
+
43
+ **Take corrective action before continuing.**
44
+
45
+ ## Workspace Validation Commands
46
+
47
+ **Before starting work, run:**
48
+ ```bash
49
+ echo "Working in: $(pwd)"
50
+ echo "Should contain issue number in path"
51
+ git branch
52
+ echo "Should show feature branch"
53
+ ```
54
+
55
+ **If output doesn't match expectations, fix before proceeding.**
56
+
57
+ ## Tool Usage Restrictions
58
+
59
+ ### File Operations - Local Only
60
+ - `edit_file()` - ONLY with relative paths in local repo
61
+ - `delete_file()` - ONLY within local repo
62
+ - `search_replace()` - ONLY on local repo files
63
+
64
+ ### Reference Operations - Main Workspace OK
65
+ - `read_file()` - OK to read from main workspace for reference
66
+ - `list_dir()` - OK to explore main workspace structure
67
+ - `grep()` - OK to search main workspace for patterns
68
+
69
+ ## Violation Recovery Process
70
+
71
+ **If you violate workspace boundaries:**
72
+
73
+ 1. **Stop immediately** - Do not continue file operations
74
+ 2. **Assess damage** - Check what was created in wrong location
75
+ 3. **Clean up** - Delete files created in main workspace
76
+ 4. **Recreate correctly** - Recreate files in local repo only
77
+ 5. **Document violation** - Update post-mortem with details
78
+
79
+
80
+ ## Enhanced Output Template
81
+
82
+ ```
83
+ Summary:
84
+ - Work completed in local repository: [path]
85
+ - Files created/modified: [list with relative paths]
86
+ - Workspace violations: [none/details if any occurred]
87
+
88
+ Artifacts:
89
+ - Branch: [URL]
90
+ - Local directory: [full path to local clone]
91
+ ```
92
+
93
+ ## Emergency Safeguards
94
+
95
+ **If assistant shows signs of workspace confusion:**
96
+ - User should immediately clarify working directory
97
+ - Assistant should run `pwd` and verify location
98
+ - All file operations should pause until location confirmed
99
+ - Assistant should explicitly state file paths being used
100
+
101
+ ---
102
+
103
+ **Bottom Line**: The local development workflow requires absolute discipline about workspace boundaries.
@@ -0,0 +1,22 @@
1
+ ---
2
+ trigger: manual
3
+ ---
4
+
5
+ # Remote-only, headless execution, bot-authored PRs
6
+ - Use GitHub MCP for file edits, commits, and labels. Do not touch the local FS or run local servers.
7
+ - Push to feature branches only; never push to master.
8
+ - Do NOT open PRs via MCP; push and let Actions open/update Draft PRs (authored by bot).
9
+
10
+
11
+ # Stop Criteria
12
+ - When the work given to you is complete.
13
+ - When workflows tied to your PR are successful. If workflows fail, your work is not complete. Keep at it.
14
+
15
+ Output Template (use verbatim)
16
+ - Summary:
17
+ - …
18
+ - …
19
+ - Artifacts:
20
+ - Branch: <url>
21
+ - PR: <url>
22
+ - Issue: <url>
@@ -0,0 +1,17 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+
6
+ ****Keep it simple. Don't over-engineer. *****
7
+ Don't over-think it.
8
+ While fixing an issue, focus on that issue only. Don't fix other issues. Don't make unrelated changes. Instead, file a Git issue if you find other issues that aren't already tracked by an existing Git issue.
9
+
10
+
11
+ Always verify the action you have taken. Do not expect the user to verify it for you.
12
+ If you kicked off a Git workflow, verify it completed successfully (e.g., gh checks: list or PR status).
13
+ If you wrote a test and expect it to pass, run it yourself and verify it passes; if you expect it to fail, verify it fails.
14
+ Always link work to the issue (use “Closes #<n>” in the Implementation PR).
15
+ Open Draft PRs early; review happens in the PR, not in chat.
16
+
17
+ Agents must not run gh pr create. Push to the feature branch and let Actions open Draft PRs.
@@ -0,0 +1,28 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # Windsurf Development Workflow
6
+
7
+ ## Goal
8
+ Work efficiently in local environment while maintaining coordination with remote repository and other agents.
9
+
10
+ ## Behavior
11
+ - Use local file system for development work
12
+ - ***NEVER*** commit unless asked to do so
13
+ - Produce clear progress updates with:
14
+ 1. Actions executed (imperative, past tense)
15
+ 2. Local progress (files modified, tests run)
16
+ 3. Remote artifacts (branch, PR status)
17
+ 4. Next steps for this issue
18
+ 5. Blocking issues (if any)
19
+
20
+ ## Stop Criteria
21
+ - When the assigned work is complete
22
+ - When tests pass and PR is ready for review
23
+ - When waiting for reviewer feedback
24
+
25
+ ## Output Template
26
+ - Summary:
27
+ - Local progress: [what you accomplished locally]
28
+ - Remote status: [branch/PR status]
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Prep environment for issue
3
+ auto_execution_mode: 3
4
+ ---
5
+
6
+ Step 1: Ask for {issue_number}
7
+
8
+ Step 2: Clone the repo to "<repo> - Issue {issue_number}"
9
+ - **CRITICAL**: Clone ONE LEVEL ABOVE the current workspace directory
10
+ - **DO NOT** clone inside the current workspace folder
11
+ - **VERIFY LOCATION**: Use `pwd` to confirm you're in the parent directory before cloning
12
+
13
+ Step 3: Confirm items in the checklist and say "Huzzah!"
14
+
15
+
16
+ ## Safety Checklist
17
+ - [ ] Confirmed current workspace path with `pwd`
18
+ - [ ] Changed to parent directory (`cd ..`) before cloning
19
+ - [ ] Verified clone location is outside current workspace
20
+ - [ ] Successfully changed into cloned repository
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: Resolve issue (once confirmed complete)
3
+ auto_execution_mode: 3
4
+ ---
5
+
6
+ Ensure branch: feature/{issue}-{slug} is checked out (create if needed).
7
+
8
+ Commit & push any pending changes.
9
+
10
+ Sync from origin/master into this branch (merge or rebase), resolve conflicts, push again.
11
+
12
+ Check the results of GitHub Action that runs the full tests in the cloud.
13
+
14
+ If they pass: open/update the Implementation PR, label it, and enable auto-merge.
15
+
16
+ If they fail: no PR is opened/updated; fix, push again, repeat.
17
+
18
+ Once PR is approved and related actions succeed, do the following:
19
+ - **MANDATORY**: Verify PR is actually merged to master before proceeding
20
+ - **MANDATORY**: Run merge verification checks (see below)
21
+ - Close the issue ONLY after merge verification passes
22
+ - Delete the branch remotely.
23
+ - If operating locally, delete the local branch and the local codebase.
24
+ - Say Hoorah !
25
+
26
+ ## Mandatory Merge Verification
27
+
28
+ **Before closing ANY issue, verify the following:**
29
+
30
+ 1. ✅ **PR Status**: PR shows "merged" status, not just "closed"
31
+ 2. ✅ **Merge Commit**: Verify merge commit exists in master
32
+ 3. ✅ **Files in Master**: Confirm expected files are present in master
33
+
34
+ ### **Verification Commands**
35
+ ```bash
36
+ # Check PR is merged, not just closed
37
+ gh pr view <PR_NUMBER> --json merged
38
+
39
+ # Verify merge commit in master
40
+ git fetch origin master
41
+ git log origin/master --oneline | grep "PR #<PR_NUMBER>"
42
+
43
+ # Verify files in master
44
+ git show origin/master:path/to/expected/file
45
+ ```
46
+
47
+ **CRITICAL**: Do not close the issue until merge verification passes. This prevents work loss incidents like Issue #112.
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: Start working on the issue
3
+ auto_execution_mode: 3
4
+ ---
5
+
6
+ Step 1: Ask for {issue_number} (and optional {slug})
7
+
8
+ Step 2: Label the issue 'phase:design' (GitHub Action will automatically create a branch, label the issue `status:wip`, create a draft PR)
9
+
10
+ Step 3: Using GitHub MCP, wait for the branch to get created, then do a checkout to start your work.
11
+
12
+ *** IMPORTANT IF YOU ARE WORKING LOCALLY **** switch into your branch and ensure you work in your own folder.
13
+
14
+ Step 4: Do your work either remotely or locally as defined by the user. If unsure, ask the user. Once sure, let the user know.
15
+
16
+ Step 5: Your work entails the following
17
+
18
+ - Create docs/rfcs/{issue_number}-{slug}.md.
19
+
20
+ - If the issue requires a small fix or bug fix, use this template - docs/rfcs/BUG-TEMPLATE.md
21
+
22
+ - If the issue requires major changes, use this template - docs/rfcs/RFC-TEMPLATE.md
23
+
24
+ - When ready for review, flip issue to 'status:needs-review' and remove 'status:wip'
25
+
26
+ Step 6: If workflow actions or reviewer feedback indicates more work is needed, ensure the issue is set back to `status:wip` and continue working as above.
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: Implement issue
3
+ auto_execution_mode: 3
4
+ ---
5
+
6
+ Step 1: Ask for {issue_number} (and optional {slug}); confirm target branch feature/{issue_number}-{slug}.
7
+
8
+ Step 2: Ensure the branch exists (your GitHub Action will usually auto-create it) and checkout it.
9
+
10
+ Step 3: Label the issue 'phase:impl'. (GitHub Action will automatically label the issue `status:wip`, create a draft PR)
11
+
12
+ Step 4: Do your work either remotely or locally as defined by the user. If unsure, ask the user. Once sure, let the user know.
13
+
14
+ Step 5: Your work entails the following
15
+
16
+ - Review the RFC associated with this issue.
17
+
18
+ - Determine whether changes need to be made to existing code, or brand new code needs to be written.
19
+
20
+ - Write the minimal set of code and test cases needed for this issue.
21
+
22
+ - **Test cases must inherit from test-utils and follow the structure of the rest of the test suite**
23
+ - Ensure test cases pass.
24
+
25
+ - When ready for review, flip issue to 'status:needs-review' and remove 'status:wip'
26
+
27
+ Step 6: If workflow actions or reviewer feedback indicates more work is needed, ensure the issue is set back to `status:wip` and continue working as above.
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: Start writing tests
3
+ auto_execution_mode: 3
4
+ ---
5
+
6
+ Step 1: Ask for {issue_number} (and optional {slug}); confirm target branch feature/{issue_number}-{slug}.
7
+
8
+ Step 2: Using GitHub MCP, ensure the branch exists (your GitHub Action will usually auto-create it) and checkout it.
9
+
10
+ Step 3: Label the issue 'phase:tests'. (GitHub Action will automatically label the issue `status:wip`, create a draft PR)
11
+
12
+ Step 4: Do your work either remotely or locally as defined by the user. If unsure, ask the user. Once sure, let the user know.
13
+
14
+ Step 5: Your work entails the following
15
+
16
+ - Review the RFC associated with this issue.
17
+
18
+ - Determine whether tests need to be added to an existing test suite, or a new one needs to be created.
19
+
20
+ - Write the minimal set of test cases that accurately reproduce the issue
21
+
22
+ - Run the test cases to ensure they fail
23
+
24
+ - Flip issue to 'status:needs-review' and remove 'status:wip'
25
+
26
+ Step 6: If workflow actions or reviewer feedback indicates more work is needed, ensure the issue is set back to `status:wip` and continue working as above.
package/bin/fraim.js ADDED
@@ -0,0 +1,117 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Simple banner without external dependencies
4
+ const banner = `
5
+ ╔══════════════════════════════════════════════════════════════╗
6
+ ║ 🚀 FRAIM ║
7
+ ║ Framework for Rigor-based AI Management ║
8
+ ║ Where humans become AI managers ║
9
+ ╚══════════════════════════════════════════════════════════════╝
10
+ `;
11
+
12
+ function showHelp() {
13
+ console.log(banner);
14
+ console.log('🤖 Welcome to FRAIM!');
15
+ console.log('Where humans become AI managers through rigorous methodology\n');
16
+ console.log('✨ All rules and workflows have been tested in real projects!\n');
17
+
18
+ console.log('🚀 Quick commands:');
19
+ console.log(' npx fraim-framework init # Setup current repository');
20
+ console.log(' npx fraim-framework wizard # Interactive setup');
21
+ console.log(' npx fraim-framework --help # Full documentation');
22
+ console.log(' fraim rigor # Learn RIGOR methodology\n');
23
+
24
+ console.log('🧠 The RIGOR Methodology (Tested & Proven):');
25
+ console.log(' R - Reviews: Structured feedback and approval processes');
26
+ console.log(' I - Isolation: Agents don\'t interfere unless explicitly asked');
27
+ console.log(' G - GitOps: Git as the single source of truth and coordination glue');
28
+ console.log(' O - Observability: Complete visibility into AI activities');
29
+ console.log(' R - Retrospectives: Continuous learning from experience\n');
30
+
31
+ console.log('📚 Documentation: https://github.com/mathursrus/Ashley-Calendar-AI/tree/master/FRAIM');
32
+ console.log('🎯 Ready to become an AI manager? Run: npx fraim-framework init');
33
+ }
34
+
35
+ function showRigor() {
36
+ console.log(banner);
37
+ console.log('🧠 The RIGOR Methodology for AI Management (Tested & Proven)\n');
38
+
39
+ console.log('R - Reviews:');
40
+ console.log(' • Structured feedback and approval processes');
41
+ console.log(' • Code review workflows with AI agents');
42
+ console.log(' • Automated quality gates and checks');
43
+ console.log(' • Human oversight of AI decisions\n');
44
+
45
+ console.log('I - Isolation:');
46
+ console.log(' • Agents don\'t interfere with each others\' work');
47
+ console.log(' • Clear boundaries and responsibilities');
48
+ console.log(' • Coordinated handoffs between phases');
49
+ console.log(' • No unexpected side effects from other agents\n');
50
+
51
+ console.log('G - GitOps:');
52
+ console.log(' • Git as the single source of truth');
53
+ console.log(' • The glue between you and your AI agents');
54
+ console.log(' • Automated deployments from Git changes');
55
+ console.log(' • Version-controlled AI agent configurations\n');
56
+
57
+ console.log('O - Observability:');
58
+ console.log(' • Complete visibility into AI activities');
59
+ console.log(' • Metrics, logs, and tracing');
60
+ console.log(' • Performance monitoring and alerting');
61
+ console.log(' • Audit trails for compliance\n');
62
+
63
+ console.log('R - Retrospectives:');
64
+ console.log(' • Continuous learning from mistakes');
65
+ console.log(' • Learning from positive experiences');
66
+ console.log(' • Process improvement and refinement');
67
+ console.log(' • Knowledge sharing and documentation\n');
68
+
69
+ console.log('🎯 This methodology transforms you from a developer into an AI manager!');
70
+ console.log('✨ Every rule has been tested and proven in real project environments.');
71
+ }
72
+
73
+ function main() {
74
+ const args = process.argv.slice(2);
75
+
76
+ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
77
+ showHelp();
78
+ return;
79
+ }
80
+
81
+ if (args.includes('rigor')) {
82
+ showRigor();
83
+ return;
84
+ }
85
+
86
+ if (args.includes('init') || args.includes('setup')) {
87
+ console.log(banner);
88
+ console.log('🚀 Setting up FRAIM in current repository...\n');
89
+ console.log('📋 This will:');
90
+ console.log(' • Create GitHub labels for AI management');
91
+ console.log(' • Set up automated workflows');
92
+ console.log(' • Configure AI agent rules (all tested & proven)');
93
+ console.log(' • Initialize documentation\n');
94
+ console.log('💡 Run: npx fraim-framework init # For full setup');
95
+ console.log('🔧 Or run: npx fraim-framework wizard # For interactive setup');
96
+ return;
97
+ }
98
+
99
+ if (args.includes('wizard')) {
100
+ console.log(banner);
101
+ console.log('🔮 FRAIM Interactive Setup Wizard\n');
102
+ console.log('This wizard will guide you through:');
103
+ console.log(' 1. Repository configuration');
104
+ console.log(' 2. AI agent setup (with tested rules)');
105
+ console.log(' 3. Workflow customization');
106
+ console.log(' 4. Team member onboarding\n');
107
+ console.log('💡 Run: npx fraim-framework wizard # To start the wizard');
108
+ return;
109
+ }
110
+
111
+ // Default help for unknown commands
112
+ console.log('❓ Unknown command. Use --help for available options.');
113
+ showHelp();
114
+ }
115
+
116
+ // Run the CLI
117
+ main();