Thank you for taking the time to help us improve the app!
Is there a pain point in the app driving this feature request?
Human Essentials is a large monolith (70+ controllers, 60+ models, 60+ services) with a lot of code generated and maintained with the help of AI coding assistants. Today the only automated safeguards are CI runs of RuboCop (with most Metrics cops disabled via Standard), Brakeman (no threshold) and RSpec. There is no single command an AI agent or contributor can run to know whether a change is safe to ship beyond "the tests pass".
Desired Behavior
Implement an automated quality gate for the Rails app, following the "Rails Playbook" described by Paulo Tarso (CodeMiner42):
- Test coverage (SimpleCov) — line and branch coverage with a ratcheted threshold.
- Complexity / method & module sizes (RuboCop Metrics cops + Flog) — ceiling on cyclomatic complexity, ABC size, method/class/module length for new code.
- Mutation testing (Mutant) — kill ratio as the "truth detector" for whether tests assert real behavior; threshold ratcheted from the first run.
- Security (Brakeman) — JSON report parsed into the gate with a hard
warnings_max threshold.
- N+1 detection (Bullet) —
Bullet.raise = true wired into the spec suite so N+1s fail the gate.
All of it collapses into one command: bin/rake quality, with a fast local variant (bin/rake quality:local, everything except mutation) and a full CI variant. A config/quality_thresholds.yml holds every threshold, ratcheted on first run. Diff-aware execution (e.g. mutant --since main) should be used where full-suite runs are infeasible for a codebase this size.
Criteria for Completion
Anything else?
Reference articles (the playbook this issue implements):
The follow-up post also documents two gates the author deliberately removed (suite-wide allocations via GC.stat and per-action SQL counts via ActiveSupport::Notifications) because they are "continuous-drift" numbers that only produce threshold-bumping rituals — those should NOT be implemented. Packwerk/dependency-structure gates were also skipped by the author as architecture-theatre for a Rails monolith.
Thank you for taking the time to help us improve the app!
Is there a pain point in the app driving this feature request?
Human Essentials is a large monolith (70+ controllers, 60+ models, 60+ services) with a lot of code generated and maintained with the help of AI coding assistants. Today the only automated safeguards are CI runs of RuboCop (with most Metrics cops disabled via Standard), Brakeman (no threshold) and RSpec. There is no single command an AI agent or contributor can run to know whether a change is safe to ship beyond "the tests pass".
Desired Behavior
Implement an automated quality gate for the Rails app, following the "Rails Playbook" described by Paulo Tarso (CodeMiner42):
warnings_maxthreshold.Bullet.raise = truewired into the spec suite so N+1s fail the gate.All of it collapses into one command:
bin/rake quality, with a fast local variant (bin/rake quality:local, everything except mutation) and a full CI variant. Aconfig/quality_thresholds.ymlholds every threshold, ratcheted on first run. Diff-aware execution (e.g.mutant --since main) should be used where full-suite runs are infeasible for a codebase this size.Criteria for Completion
bin/rake qualityruns coverage, rubocop metrics, flog, mutation, brakeman and reports a pass/fail table with thresholds fromconfig/quality_thresholds.ymlbin/rake quality:localruns everything except mutation (~15s) for fast AI/contributor iterationtmp/quality/artifacts for inspectionAnything else?
Reference articles (the playbook this issue implements):
The follow-up post also documents two gates the author deliberately removed (suite-wide allocations via
GC.statand per-action SQL counts viaActiveSupport::Notifications) because they are "continuous-drift" numbers that only produce threshold-bumping rituals — those should NOT be implemented. Packwerk/dependency-structure gates were also skipped by the author as architecture-theatre for a Rails monolith.