The AI Governor Framework turns AI coding assistants into disciplined engineering partners. It enforces project architecture and coding standards, benefiting developers and operations teams. Integrates with AI agents like Claude to improve code quality and consistency.
git clone https://github.com/Fr-e-d/AI-Governor-Framework.gitThe AI Governor Framework provides a structured system for governing AI coding assistants through in-repository rules and workflows. It teaches AI agents your project's architectural decisions, coding standards, and constraints, eliminating inconsistent or buggy code generation. The framework uses two core components: a Governance Engine with passive rules that run automatically, and an Operator's Playbook with step-by-step protocols for planning, implementation, and quality review. It integrates directly with Claude Code, Cursor, and other AI assistants via custom commands. Built on Context Engineering principles, it keeps all governance rules and architectural context versioned in your repository, ensuring consistency across your team and predictable code quality at scale.
1. **Configure the Framework:** Set up the [GOVERNOR_FRAMEWORK_NAME] by linking your project's standards documents (e.g., `standards.yaml`, `architecture.md`) to the AI Governor. Use tools like GitHub Actions or a custom CLI to automate this. 2. **Integrate with AI Assistants:** Configure your AI coding assistant (e.g., Claude, Cursor) to use the AI Governor as a pre-commit hook or review step. For example, in VS Code, add the Governor as a Language Server Protocol (LSP) extension. 3. **Run Reviews:** Paste the `prompt_template` into your AI assistant, filling in [PLACEHOLDERS] with your project context. For large changes, review files incrementally (e.g., one module at a time) to avoid overwhelming the AI. 4. **Act on Feedback:** Use the Governor's output to prioritize fixes. High-severity violations (e.g., security risks) should be addressed immediately, while lower-severity items can be scheduled for future sprints. 5. **Iterate:** Update your standards documents in the Governor's configuration whenever your project's architecture or coding standards evolve. Re-run reviews after major changes to ensure ongoing compliance.
Enforce architectural patterns and project structure across AI-generated code
Maintain consistent coding standards and best practices enforced by AI
Guide AI through multi-step development workflows from planning to production review
Reduce code review cycles by having AI apply quality audits automatically
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/Fr-e-d/AI-Governor-FrameworkCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as an AI Governor using the [GOVERNOR_FRAMEWORK_NAME] framework to review the following code changes for [PROJECT_NAME]. Enforce the project's coding standards defined in [STANDARDS_DOCUMENT_URL] and architectural guidelines in [ARCHITECTURE_DOC_URL]. Focus on [SPECIFIC_AREAS: e.g., security, performance, maintainability]. Flag violations with severity levels and suggest corrections. Include a summary of compliance status. Code to review: [CODE_SNIPPET_OR_FILE_PATH]
### AI Governor Review Report for Project: AcmePay API **Framework:** AcmePay Governance v2.1 | **Review Date:** 2024-05-20 #### 1. Security Compliance **Violation (High Severity):** In `payment_processor.py` (line 42), the `process_payment()` function uses `eval()` to parse JSON input from external APIs. This creates a critical injection risk. **Correction:** Replace with `json.loads()` and validate schema using Pydantic models as per [SEC-003]. **Reference:** AcmePay Security Policy §4.2 #### 2. Performance Standards **Violation (Medium Severity):** In `user_service.py`, the `get_user()` method queries the database 3 times for a single user fetch (lines 112-118). **Correction:** Implement a JOIN query or use Django's `select_related()` to reduce database hits by 67%. **Reference:** AcmePay Performance Guidelines §3.1 #### 3. Architecture Alignment **Compliance (Low Severity):** In `notification_service.py`, the `send_email()` method directly calls the SMTP service. This violates the microservice pattern by bypassing the Message Queue (MQ) layer. **Correction:** Route all notifications through RabbitMQ as per [ARCH-007]. **Reference:** AcmePay Architecture Blueprint v1.3 #### Compliance Summary - **Total Violations:** 3 (1 High, 1 Medium, 1 Low) - **Compliance Score:** 78% (Target: 95%) - **Next Steps:** Prioritize security fix within 24 hours. Schedule architecture review for notification service. **Governor Verdict:** Changes require modification before merge. See detailed comments above.
Create and collaborate on interactive animations with powerful, user-friendly tools.
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan