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
|
||||
|
||||
**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
|
||||
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)
|
||||
- ✅ **Return Types** - Requires explicit return types on exported functions
|
||||
@@ -358,14 +358,27 @@ What's Enforced (Once enabled):
|
||||
|
||||
Current Status:
|
||||
|
||||
- 🟡 **Pre-commit hooks**: Enabled (formatting only until violations fixed)
|
||||
- 🔴 **Strict enforcement**: Disabled (1,226 existing violations to fix first)
|
||||
- ✅ **Pre-commit hooks**: ACTIVE - Blocks commits with violations
|
||||
- ✅ **Strict enforcement**: ENABLED - Package-level enforcement
|
||||
- 🟡 **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:
|
||||
|
||||
1. Fix existing 1,226 lint violations (priority: explicit `any` types)
|
||||
2. Enable strict pre-commit enforcement in `.lintstagedrc.mjs`
|
||||
1. Fix violations package-by-package as you work in them
|
||||
2. Priority: Fix explicit `any` types and type safety issues first
|
||||
3. Configure Woodpecker CI to run quality gates on all PRs
|
||||
|
||||
Why This Matters:
|
||||
|
||||
Reference in New Issue
Block a user