-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Overview
Implement health gating enforcement based on the context-aware ratchet telemetry that was introduced in issue #198. This builds on the successful telemetry burn-in phase to add actual enforcement.
Background
The context-aware ratchet now provides:
- Composite Code Health score (0-100)
- Intent classification (refactor/suspect/neutral)
- Weighted violation analysis
- Violation density metrics
Currently running as non-blocking telemetry for burn-in. Need to add enforcement mechanisms.
Implementation Tasks
Core Health Gating
- Add configurable health score thresholds in .ai-coding-guide.json
- Implement health score enforcement in ratchet script
- Add bypass mechanisms for emergency fixes
- Configure different thresholds for different change types (refactor vs normal)
CI Integration
- Remove continue-on-error from context-aware telemetry job
- Add health gating as required branch protection rule
- Configure appropriate failure modes and messaging
Configuration Schema
- Extend .ai-coding-guide.json with health gating config:
- Minimum health scores by intent type
- Bypass keywords/patterns
- Enforcement modes (strict/lenient/disabled)
- Threshold adjustments for file types
Documentation
- Update CONTEXT-AWARE-LINTING.md with gating details
- Add troubleshooting guide for health gate failures
- Document bypass procedures for urgent fixes
- Add calibration guidance for teams
Testing & Validation
- Test enforcement with various code changes
- Validate bypass mechanisms work correctly
- Ensure emergency override procedures
- Add tests for health gating logic
Success Criteria
- Health gating prevents merging of code that degrades quality metrics significantly
- Emergency bypass mechanisms work when needed
- Clear feedback helps developers understand and fix issues
- Configuration is flexible enough for different project needs
Dependencies
- Successful telemetry burn-in from issue Ratchet 2.0: context-aware code health, critical vs minor policy, weighted/density metrics, heuristics (Phase 2 next) #198
- Stable context-aware ratchet implementation
- Team agreement on enforcement thresholds
Related Issues
- Ratchet 2.0: context-aware code health, critical vs minor policy, weighted/density metrics, heuristics (Phase 2 next) #198 - Context-aware ratchet telemetry (predecessor)
- Health gating builds on the telemetry foundation established there
Metadata
Metadata
Assignees
Labels
No labels