FRAIM v2: Framework for Rigor-based AI Management - Transform from solo developer to AI manager orchestrating production-ready code with enterprise-grade discipline
npm install fraim-framework.ai-agents/rules/integrity-and-test-ethics.md)
bash
Before FRAIM: "Tests look good!"
After FRAIM: "Here's the test output proving all 47 tests pass"
`
#### π§ͺ Comprehensive Testing Guidelines (.ai-agents/rules/agent-testing-guidelines.md)
Problem: Superficial testing that misses real issues
Solution: Multi-layer validation (database, API, UI, integration) with mandatory evidence
`bash
Before: Mock everything, hope it works
After: Test real systems, prove it works, show evidence
`
#### π£οΈ Clear Communication Standards (.ai-agents/rules/communication.md)
Problem: Vague progress reports and unclear accountability
Solution: Structured progress updates with concrete evidence and absolute accountability
`bash
Before: "Working on it, almost done"
After: "Fixed API timeout, tests passing, evidence attached, ready for review"
`
#### ποΈ Architectural Discipline (.ai-agents/rules/architecture.md)
Problem: Agents create architectural chaos and technical debt
Solution: Clean separation of concerns, type safety, and testability patterns
`bash
Before: Spaghetti code with mixed responsibilities
After: Clean layers with proper boundaries and validation
`
#### π― Spike-First Development (.ai-agents/rules/spike-first-development.md)
Problem: Agents build complex solutions without validating assumptions
Solution: 5-15 minute proof-of-concepts before major implementation
`bash
Before: Build 3-week solution, discover it doesn't work
After: 10-minute spike, validate approach, then build confidently
`
#### π Continuous Learning System (.ai-agents/rules/continuous-learning.md)
Problem: Same mistakes repeated across projects
Solution: Retrospective-driven knowledge capture and pattern recognition
`bash
Before: Every agent learns the same lessons from scratch
After: Knowledge accumulates, patterns emerge, quality improves
`
#### π§Ή Simplicity Discipline (.ai-agents/rules/simplicity.md)
Problem: Over-engineered solutions that are hard to maintain
Solution: "Keep it simple" principles with complexity budgets
`bash
Before: 500-line solution to a 10-line problem
After: Minimal, focused solution that actually works
`
#### π§ Git Safety & Timeout Management (.ai-agents/rules/git-safe-commands.md)
Problem: Agents hang on interactive Git commands and long-running tasks, requiring human intervention
Solution: Safe Git commands and timeout scripts with output visibility
`bash
Before: Agent hangs on "git log" (opens pager) or tests run forever
After: Non-interactive commands with timeouts and log files for visibility
Example: exec-with-timeout.ts runs tests with timeout and saves output to files
`
#### π Merge Requirements & Branch Safety (.ai-agents/rules/merge-requirements.md)
Problem: Agents accidentally overwrite master branch or create merge conflicts
Solution: Mandatory rebase workflows with conflict resolution patterns
`bash
Before: Force pushes that destroy other work
After: Rebase-on-master with force-with-lease for safety
`
#### π Systematic Debugging Patterns (.ai-agents/rules/successful-debugging-patterns.md)
Problem: Agents struggle with complex debugging and repeat the same mistakes
Solution: Structured debugging methodology with evidence collection and pattern recognition
`bash
Before: Random debugging attempts, no learning
After: Systematic approach with documented patterns and regression tests
`
#### π Package Scripts & Output Visibility (.ai-agents/scripts/ and sample_package.json)
Problem: Long-running tasks hang agents and provide no visibility into progress
Solution: Background execution with log files and timeout management
`bash
Before: "npm test" hangs agent, no output visibility
After: "npm test" runs in background, saves to test.log, agent can observe progress
Example: exec-with-timeout.ts prevents hangs and provides output visibility
`
π Proven Benefits from Real Projects
- Dramatic reduction in AI-generated code that needs rework through evidence-based validation
- Faster delivery through structured workflows and clear handoffs
- Higher test coverage through mandatory testing guidelines and evidence collection
- Zero agent conflicts through phase-based isolation and coordination
- Complete accountability - agents fix their own mistakes with evidence
π¬ The FRAIM Experience: From Chaos to Clarity
$3
`bash
You: "Add user authentication to the app"
Agent: "I'll add login functionality"
#
10 minutes later...
Agent: "I've designed the UX to be modern and beautiful. What do you think?"
You: "It's way too complex and does not work with the rest of the product. Just make it simple"
Agent: "You are right. I've made it too complex, let me simplify it right now"
You: "I've told you this 10 times already!!!! "
#
1 hour later...
Agent: "Implementation complete. Solution looks good."
You: "I get an error on the first screen."
Agent: "What error do you see? Can you write it out for me or give me a screenshot?"
You: "C'mon, do this yourself."
#
2 hours later...
Agent:
You: "You've made no progress"
Agent: "You are right. I keep getting stuck. Could you test the implementation for me?"
#
3 hours later...
Agent: "Ok I'm all done, test cases are passing"
You: "Wait, what... you changed existing tests to make them pass ... everything is broken!!"
`
$3
`bash
You: "Add user authentication to the app"
Agent: "Starting design phase. Creating RFC with UX mockups, validation rules, and API specs"
#
10 minutes later...
Agent: "Design complete. UX mockups created, validation rules defined, API endpoints specified.
Evidence: 3 mockup images, validation requirements document, API spec ready for review"
You: "Looks good, proceed to implementation"
#
1 hour later...
Agent: "Implementation complete. Code written, tests created, all tests passing.
Evidence: Test output showing existing 120/120 tests pass, new 12/12 tests pass, API endpoint tested with curl,
UI tested with screenshots showing login form and error states"
During PR review...
Reviewer: "Password validation is too strict"
Agent: "Fixed password validation rules, updated tests, evidence provided.
Evidence: New test output showing updated validation, UI screenshots with new rules"
#
Result: In best case, hours of frustration, rework saved. In worst case, reputation saved from deploying broken code to production.
`
ποΈ Enterprise-Grade Framework Structure
`
FRAIM/
βββ π§ .ai-agents/rules/ # Guardrails - The "HR Handbook" for AI agents
β βββ integrity-and-test-ethics.md # Prevents "fake it till you make it"
β βββ agent-testing-guidelines.md # Ensures real validation, not claims
β βββ communication.md # Clear accountability and progress
β βββ architecture.md # Prevents technical debt
β βββ spike-first-development.md # Validates before building
β βββ continuous-learning.md # Learns from mistakes
β βββ simplicity.md # Prevents over-engineering
β βββ git-safe-commands.md # Prevents agent hangs on Git commands
β βββ merge-requirements.md # Safe branch management and rebasing
β βββ successful-debugging-patterns.md # Systematic debugging approach
β βββ local-development.md # Local development best practices
β βββ pr-workflow-completeness.md # PR workflow validation
β βββ software-development-lifecycle.md # Full SDLC integration
β
βββ π .ai-agents/workflows/ # Process - The "Project Management Office"
β βββ spec.md # Specification and requirements phase
β βββ design.md # Structured design phase
β βββ implement.md # Implementation with validation
β βββ test.md # Comprehensive testing
β βββ resolve.md # Issue resolution workflow
β βββ retrospect.md # Learning and improvement
β
βββ π .ai-agents/templates/ # Human Interfaces - The "Standard Operating Procedures"
β βββ evidence/ # Proof of work templates
β βββ retrospective/ # Learning capture templates
β βββ specs/ # Specification templates
β
βββ π οΈ Scripts & Automation # Determinism - The "DevOps Pipeline"
βββ prep-issue.sh # Issue preparation
βββ exec-with-timeout.ts # Command execution with timeout & output visibility
βββ cleanup-branch.ts # Branch management
`
π Get Started in 60 Seconds
$3
Shell Requirements:
- Windows: Must use Git Bash (install from https://git-scm.com/download/win)
- macOS/Linux: Default terminal works fine
Why Git Bash on Windows? All FRAIM scripts use Unix-style paths and Bash commands. Git Bash ensures consistent behavior across platforms.
$3
`bash
npm install -g fraim-framework
fraim setup # Complete setup with IDE configuration
`
$3
After initial setup, you can use these commands:
`bash
Add FRAIM to additional IDEs (after initial setup)
fraim add-ide --ide claude # Configure specific IDE
fraim add-ide --ide antigravity # Configure Gemini Antigravity
fraim add-ide --all # Configure all detected IDEs
fraim add-ide --list # List supported IDEs
Project initialization
fraim init-project # Initialize FRAIM in current project
Testing and validation
fraim test-mcp # Test MCP server connections
fraim doctor # Diagnose configuration issues
Sync and maintenance
fraim sync # Sync latest workflows and rules
`
π‘ Pro Tip: Use fraim add-ide when you install a new IDE after initial setup. It reuses your existing FRAIM and GitHub keys, making it much faster than running full setup again.
$3
After installation, customize these files for your specific project:
#### 1. Architecture Rules (.ai-agents/rules/architecture.md)
- Purpose: Define your system's architectural patterns and boundaries
- Customize: Replace generic examples with your specific architecture patterns
- Example: Add your database patterns, API structures, service boundaries
#### 2. Branch Cleanup Script (.ai-agents/scripts/cleanup-branch.ts)
- Purpose: Project-specific cleanup when branches are deleted
- Customize: Add your cleanup logic in the insertYourCodeHere() method
- Example: Database cleanup, cache invalidation, temporary file removal
#### 3. Package Scripts (sample_package.json β package.json)
- Purpose: Testing and build scripts for your project
- Adopt: Copy relevant scripts from sample_package.json into your main package.json
- Customize: Update test commands, build processes, and framework-specific commands
- Example: Replace baml-cli generate with your framework's generate command
#### 4. Test Utilities (test-utils.ts β your project)
- Purpose: Generic test framework with tagging system
- Adopt: Copy test-utils.ts into your project and import in your test files
- Customize: Extend BaseTestCase interface for your specific test needs
- Example: Create domain-specific test cases using the tagging system
#### 5. Test Structure (examples/simple-webapp/example-test.ts)
- Purpose: Example test cases with proper tagging
- Adopt: Use as a template for your project's test structure
- Customize: Replace with your project's test cases and domain-specific tags
- Example: Add your specific test scenarios and validation patterns
π― The Transformation: From Developer to AI Manager
$3
`bash
npx fraim-framework init
β
Repository configured with AI management rules
β
Agents assigned to specific roles (Design, Implementation, Testing)
β
Workflows and templates installed
`
$3
`bash
gh issue create --title "Add user authentication" --label "ai-agent:cursor"
β
Git issue is centralized coordination point
β
Agent assignment handled
β
Ready for work
`
$3
`bash
.ai-agents/scripts/prep-issue.sh #issue_number
β
Local clone and new branch created
β
Coding agent initiated
β
Tell coding agent which phase it should proceed with
`
π Why FRAIM is the Future
$3
Every rule, workflow, and pattern has been tested in real projects. This isn't theoreticalβit's battle-tested.
$3
The same rigor you'd apply to managing human developers, applied to AI agents.
$3
Built-in learning systems that make your AI agents better over time.
$3
Full visibility into what each agent is doing, with evidence-based validation.
$3
Works with any AI agent (Cursor, Claude, Windsurf, future agents).
π Ready to Transform Your Development?
$3
`bash
Watch the magic happen
gh issue create --title "Add API rate limiting" --label "phase:design"
β Agent: "RFC created, architecture validated, ready for implementation"
gh issue edit 123 --remove-label "phase:design" --add-label "phase:impl"
β Agent: "Implementation complete, tests passing, evidence provided"
gh issue edit 123 --remove-label "phase:impl" --add-label "phase:tests"
β Agent: "Performance validated, security checked, ready for production"
Result: Production-ready feature in 2 hours instead of 2 days
``