GitAuto Logo
  1. Home
  2. Pricing
  3. Docs
  4. Dashboard
  5. Blog
  6. Contact
  1. Home
  2. How It Works
  3. Use Cases
  4. Pricing
  5. Docs
  6. Dashboard
  7. FAQ
  8. Blog
  9. Contact

Coding Standards

GitAuto injects an XML document into every model session. This document codifies test design principles, code quality rules, and anti-pattern definitions. It acts as a universal baseline that applies to every repository, regardless of language or framework.

Why This Exists

Without codified standards, the model produces tests with common anti-patterns: testing implementation details instead of behavior, over-mocking dependencies so tests pass even when code is broken, and writing tautological assertions like expect(mock).toHaveBeenCalled() right after calling the mock directly. The coding standards document explicitly names these anti-patterns and provides correct alternatives. It is the product of hundreds of real code reviews - every time a pattern was consistently rejected by reviewers, it was added to the standards to prevent recurrence.

Why Models Produce Anti-Patterns

Models learn from training data that includes both good and bad code. They replicate patterns they have seen most frequently, not patterns that are correct. Testing anti-patterns like over-mocking and tautological assertions are extremely common in real-world codebases, so models reproduce them confidently. Without explicit rules saying "don't do X, do Y instead," models default to the most statistically common pattern - which for tests is often the wrong one. The model has no inherent sense of test quality; it only knows what patterns appeared most often in its training data. Code generation benchmarks like HumanEval and SWE-bench reinforce this - they measure whether code passes tests, not whether the tests themselves follow best practices. Models are never penalized during training or evaluation for writing over-mocked tests or tautological assertions.

How It Works

The standards document is structured in XML with distinct sections:

  • Test design principles - behavioral testing over implementation testing, meaningful assertion messages, test isolation requirements
  • Mock management - when to mock, when not to mock, how to avoid over-mocking that makes tests meaningless
  • Anti-pattern catalog - specific patterns to avoid with examples of what to do instead
  • Code quality rules - naming conventions, file organization, import hygiene
  • Dead code handling - rules for identifying and removing unreachable code rather than writing impossible tests for it. This is key to achieving 100% coverage. See Dead Code Removal for the full implementation.
  • GITAUTO.md guidance- instructions for when and how to update the repo's GITAUTO.md file with new learnings

The document is injected into the system message alongside trigger-specific prompts and repository rules. It has lower priority than GITAUTO.md but higher priority than the model's default training, ensuring these standards are followed unless explicitly overridden by repo-specific configuration.

Related Features

  • GITAUTO.md - repo-specific overrides that take priority over universal standards
  • Repository Rules - user-configured rules that supplement the built-in standards
  • Trigger-Specific Prompts - scenario-specific instructions injected alongside standards

Need Help?

Have questions or suggestions? We're here to help you get the most out of GitAuto.

Contact us with your questions or feedback!

Trigger-Specific PromptsDiff Hunk Repair

Getting Started

  • Installation
  • Setup

Triggers

  • Overview
  • Schedule Trigger
  • Test Failure Trigger
  • Review Comment Trigger
  • Dashboard Trigger

Coverage Dashboard

  • Overview
  • Python Testing
  • JavaScript Testing
  • Java Testing
  • Go Testing
  • PHP Testing
  • Ruby Testing
  • Flutter Testing
  • Multi-Language
  • Coverage Charts

Customization

  • Repository Rules
  • Output Language
  • GITAUTO.md

Integrations

  • CircleCI Integration
  • npm Integration

How It Works

Context Enrichment

  • Line Numbers
  • Full File Reads
  • Test File Preloading
  • Test Naming Detection
  • Error Baselines
  • CI Log Cleaning
  • Trigger-Specific Prompts
  • Coding Standards

Output Auto-Correction

  • Diff Hunk Repair
  • Diff Prefix Repair
  • Tool Name Correction
  • Tool Argument Correction
  • Import Sorting
  • Trailing Space Removal
  • Final Newline
  • Line Ending Preservation
  • Sanitize Tool Arguments
  • Lint Disable Headers

Quality Verification

  • Formatting
  • Linting
  • Type Checking
  • Test Execution
  • Coverage Enforcement
  • phpcs / phpstan Support
  • PHPUnit Support
  • pytest Support
  • Snapshot Auto-Update
  • Untestable Detection
  • Should-Skip Detection
  • Dead Code Removal
  • Quality Check Scoring
  • Quality Checklist

Safety Guardrails

  • File Edit Restrictions
  • Temperature Zero
  • PR/Branch Checks
  • Race Condition Prevention
  • Bot Loop Prevention
  • Webhook Deduplication
  • Duplicate Error Hashing
  • Infrastructure Failure Detection
  • Strict Tool Schemas
  • No-Change Detection

Token/Cost Management

  • Token Trimming
  • Outdated Diff Removal
  • Stale File Replacement
  • Skip CI Intermediate
  • CI Log Deduplication
  • Web Fetch Summarization
  • Context Forgetting
  • File Query Routing
  • On-Demand Diff

Resilience & Recovery

  • Model Fallback
  • Overload Retry
  • Forced Verification
  • Error Files Editable

Hallucination Prevention

  • Web Search
  • URL Fetching
  • Anti-Hallucination Prompts
  • GITAUTO.md Restrictions
  • Review Response Guardrails

Ready to improve your test coverage?

Go from 0% to 90% test coverage with GitAuto. Start for free, no credit card required.

Install FreeContact Sales

Product

  • Home
  • Why GitAuto
  • What GitAuto Does
  • How It Works
  • Use Cases
  • How to Get Started
  • Solution
  • Pricing
  • Pricing Details
  • ROI Calculator
  • ROI Methodology
  • FAQ
  • Blog
  • Contact

Dashboard

  • Dashboard
  • Coverage Trends
  • File Coverage
  • Credits
  • Open PRs
  • Usage
  • Triggers
  • Actions
  • References
  • Rules
  • CircleCI Integration
  • npm Integration

Documentation

  • Docs
  • Getting Started
  • Setup
  • Triggers
  • Coverage Setup
  • Customization
  • How It Works
  • Auto Merge
  • CircleCI
  • npm

Legal

  • Privacy Policy
  • Terms of Service

Connect

  • GitHub
  • LinkedIn
  • Twitter
  • YouTube
GitAuto Logo© 2026 GitAuto, Inc. All Rights Reserved