Skip to content
Quality v1.0

FG-0602 Code Quality Standards

Description

Establish explicit standards for the quality of AI-generated code. AI agents can write code quickly, but quality requires explicit standards: read existing code before modifying it, follow established patterns, don't introduce new dependencies without justification, and test before committing. Code Quality Standards convert implicit expectations into explicit, enforceable rules that agents follow consistently.

Implementation

Document 10-15 code quality rules as standing orders. Common rules: explore before proposing changes, follow existing patterns, minimize new dependencies, write tests for new functionality, don't refactor beyond the task scope, preserve existing style. Enforce through code review and automated linting. Update rules based on observed quality issues.

Success Indicators

  • AI-generated code follows project conventions consistently
  • Code review findings decrease over time as standards are internalized
  • New code integrates smoothly with existing codebase
  • Quality standards evolve based on observed issues, not assumptions

Failure Modes

  • Standards too strict: impeding velocity without proportional quality gain
  • Standards not enforced: exist on paper but not in practice
  • Standards focused on style over substance: formatting over correctness
  • One-size-fits-all standards that don't account for different code contexts