docs: Update Quality Rails status to reflect active enforcement
Strict enforcement is now ACTIVE and blocking commits. Updated documentation to reflect: - Pre-commit hooks are actively blocking violations - Package-level enforcement strategy - How developers should handle blocked commits - Next steps for incremental cleanup Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
25
CLAUDE.md
25
CLAUDE.md
@@ -341,12 +341,12 @@ TDD Anti-Patterns to Avoid
|
|||||||
|
|
||||||
Quality Rails - Mechanical Code Quality Enforcement
|
Quality Rails - Mechanical Code Quality Enforcement
|
||||||
|
|
||||||
**Status:** Installed (2026-01-30) - Currently in formatting-only mode
|
**Status:** ACTIVE (2026-01-30) - Strict enforcement enabled ✅
|
||||||
|
|
||||||
Quality Rails provides mechanical enforcement of code quality standards through pre-commit hooks
|
Quality Rails provides mechanical enforcement of code quality standards through pre-commit hooks
|
||||||
and CI/CD pipelines. See `docs/quality-rails-status.md` for full details.
|
and CI/CD pipelines. See `docs/quality-rails-status.md` for full details.
|
||||||
|
|
||||||
What's Enforced (Once enabled):
|
What's Enforced (NOW ACTIVE):
|
||||||
|
|
||||||
- ✅ **Type Safety** - Blocks explicit `any` types (@typescript-eslint/no-explicit-any: error)
|
- ✅ **Type Safety** - Blocks explicit `any` types (@typescript-eslint/no-explicit-any: error)
|
||||||
- ✅ **Return Types** - Requires explicit return types on exported functions
|
- ✅ **Return Types** - Requires explicit return types on exported functions
|
||||||
@@ -358,14 +358,27 @@ What's Enforced (Once enabled):
|
|||||||
|
|
||||||
Current Status:
|
Current Status:
|
||||||
|
|
||||||
- 🟡 **Pre-commit hooks**: Enabled (formatting only until violations fixed)
|
- ✅ **Pre-commit hooks**: ACTIVE - Blocks commits with violations
|
||||||
- 🔴 **Strict enforcement**: Disabled (1,226 existing violations to fix first)
|
- ✅ **Strict enforcement**: ENABLED - Package-level enforcement
|
||||||
- 🟡 **CI/CD pipeline**: Ready (.woodpecker.yml created, not yet configured)
|
- 🟡 **CI/CD pipeline**: Ready (.woodpecker.yml created, not yet configured)
|
||||||
|
|
||||||
|
How It Works:
|
||||||
|
|
||||||
|
**Package-Level Enforcement** - If you touch ANY file in a package with violations,
|
||||||
|
you must fix ALL violations in that package before committing. This forces incremental
|
||||||
|
cleanup while preventing new violations.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
- Edit `apps/api/src/tasks/tasks.service.ts`
|
||||||
|
- Pre-commit hook runs lint on ENTIRE `@mosaic/api` package
|
||||||
|
- If `@mosaic/api` has violations → Commit BLOCKED
|
||||||
|
- Fix all violations in `@mosaic/api` → Commit allowed
|
||||||
|
|
||||||
Next Steps:
|
Next Steps:
|
||||||
|
|
||||||
1. Fix existing 1,226 lint violations (priority: explicit `any` types)
|
1. Fix violations package-by-package as you work in them
|
||||||
2. Enable strict pre-commit enforcement in `.lintstagedrc.mjs`
|
2. Priority: Fix explicit `any` types and type safety issues first
|
||||||
3. Configure Woodpecker CI to run quality gates on all PRs
|
3. Configure Woodpecker CI to run quality gates on all PRs
|
||||||
|
|
||||||
Why This Matters:
|
Why This Matters:
|
||||||
|
|||||||
@@ -4,17 +4,18 @@
|
|||||||
|
|
||||||
2026-01-30
|
2026-01-30
|
||||||
|
|
||||||
## Current Status: **INSTALLED - PARTIAL ENFORCEMENT**
|
## Current Status: **STRICT ENFORCEMENT ACTIVE** ✅
|
||||||
|
|
||||||
Quality Rails has been successfully installed but is currently in **formatting-only mode** due to existing codebase violations.
|
Quality Rails is now **FULLY ENFORCING** code quality on all commits. Any commit that touches a package with violations will be blocked until that package is cleaned up.
|
||||||
|
|
||||||
## What's Installed
|
## What's Installed
|
||||||
|
|
||||||
### ✅ Pre-Commit Hooks (.husky/)
|
### ✅ Pre-Commit Hooks (.husky/) - ACTIVE
|
||||||
|
|
||||||
- Runs lint-staged on every commit
|
- Runs lint-staged on every commit
|
||||||
- Currently only enforces Prettier formatting
|
- **BLOCKS commits** with lint errors or warnings in affected packages
|
||||||
- Ready to enable full enforcement once violations are fixed
|
- **BLOCKS commits** with type errors in affected packages
|
||||||
|
- Auto-formats code with Prettier before linting
|
||||||
|
|
||||||
### ✅ Enhanced ESLint Rules
|
### ✅ Enhanced ESLint Rules
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user