Skip to content

Add AI Development Enforcement Foundation #12

Description

@frankbria

Summary

Implement basic enforcement mechanisms to prevent common AI agent failure modes in code generation.

Background

AI agents commonly:

  • Claim tests pass without running them
  • Skip failing tests claiming they're unrelated
  • Add @Skip decorators to make suites pass
  • Ignore coverage requirements
  • Degrade in quality over long conversations

Tasks

1. Create AI Rules File

  • Create .claude/rules.md with TDD requirements
  • Document forbidden actions (skip decorators, false claims)
  • Add context management guidelines

2. Configure Test Infrastructure

  • Add pytest configuration in pyproject.toml
  • Set coverage threshold at 80%
  • Configure branch coverage

3. Add Pre-commit Hooks

  • Install pre-commit package
  • Create .pre-commit-config.yaml
  • Add pytest execution hook
  • Add coverage enforcement hook
  • Add skip decorator detection

4. Create Verification Scripts

  • Create tools/verify-ai-claims.sh
  • Make executable with proper permissions
  • Test script with current codebase

5. Documentation

  • Update README with AI workflow
  • Add examples of correct usage
  • Document verification process

Success Criteria

  • Pre-commit hooks block commits with failing tests
  • Coverage enforcement prevents low-coverage commits
  • Verification script provides clear pass/fail feedback
  • Documentation clearly explains workflow

References

  • See AI_Development_Enforcement_Guide.md for detailed implementation
  • Quick Start section covers this issue (30 minute setup)

Implementation Notes

This is the foundation layer. Complete this issue before others as they depend on these files being in place.

Estimated Effort: 2-3 hours

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions