PitchHut logo
AutoRules
Effortless code quality checks with AI-generated rules.
Pitch

AutoRules simplifies code quality assurance by allowing users to set rules in natural language. With AI-powered analysis, developers can efficiently check their codebases against custom-defined criteria, ensuring high standards are met with ease and accuracy.

Description

AutoRules is an automated code quality checking tool that leverages AI to enhance code reliability and maintainability. With the ability to define rules in natural language using Markdown files, AutoRules ensures that codebases adhere to predefined quality standards effortlessly.

Key Features

  • 🤖 AI-Powered Analysis: Utilizes any OpenRouter AI model for comprehensive code evaluations.
  • 📝 Natural Language Rules: Create rules in Markdown format, making them easy to understand and implement.
  • 🚀 Parallel Processing: Configurable worker options allow for efficient processing of large codebases.
  • 📊 Interactive HTML Reports: Generates detailed and expandable reports to visualize results clearly.
  • 🎯 Glob Pattern Support: Target specific files or directories with customizable glob patterns.
  • 💰 Monitoring Token Usage: Keep track of the API token usage and associated costs.
  • 🖥️ Real-Time Feedback: Enjoy a console-based user interface that updates during analysis.

Usage Examples

Easy to integrate into any JavaScript project. Begin with a simple command:

autorules

For advanced configurations, options such as worker count and AI model selection can be modified:

autorules --workers=5 --model=anthropic/claude-3-opus

To specify the output location for reports, use:

autorules --output=./reports/code-quality.html

Rule Definition

Rules are structured in Markdown format:

title: No console.log statements
files: **/*.js
---
This file should not contain any console.log statements in production code.

Each rule file includes necessary frontmatter, a criteria section that clearly articulates the expectation of code quality, and supports error handling and naming conventions.

Comprehensive Reporting

The HTML report generated includes key elements:

  • Dashboard: Summary of statistics and metadata.
  • Results Table: Overview of each file checked with pass or fail statuses.
  • Interactive Details: Insightful AI feedback, token usage, and costs.
  • User-Friendly Interface: Easily navigable layout for rapid assessment.

How It Operates

  1. Scan: Identifies all autorules folders within your project.
  2. Parse: Loads and interprets rule files.
  3. Match: Utilizes glob patterns for file identification.
  4. Analyze: Sends files to the AI for evaluation against the defined rules.
  5. Report: Produces an interactive HTML report summarizing analysis results.

By implementing AutoRules in a development workflow, teams can effectively maintain high code quality standards while minimizing manual checks.

0 comments

No comments yet.

Sign in to be the first to comment.