Skip to main content

Module code_quality_hook

Module code_quality_hook 

Source
Expand description

Code Quality Verification Hook

This hook verifies code quality before writing files, preventing invalid code from being written and returning errors to AI for correction.

§Verification Strategy

  • none: No verification
  • post: Verify after write (default, current behavior)
  • pre: Verify before write, block if errors
  • pre-quick: Quick syntax check before write, full check after

§Workflow

  1. Detect file type (Rust, TypeScript, Python, Go)
  2. Write to temporary file for verification
  3. Run appropriate verification command
  4. If errors found, block write and return errors to AI
  5. AI corrects code and tries again

Structs§

CodeQualityHook
Code quality verification hook

Enums§

VerificationStrategy
Verification strategy