Implement the 031-quality-gates-hygiene feature that strengthens automated quality gates by adding pnpm audit to the check script, v8 coverage thresholds with per-directory auto-ratchet (domain 96%, adapters 71%, persistence 87%), Biome cognitive complexity enforcement (max 15), and keyboard accessibility for the combatant row, while cleaning up all blanket biome-ignore comments, refactoring 5 overly complex functions into smaller helpers, and codifying the early-enforcement principle in the constitution and CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
35
specs/031-quality-gates-hygiene/data-model.md
Normal file
35
specs/031-quality-gates-hygiene/data-model.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Data Model: Quality Gates & Code Hygiene
|
||||
|
||||
**Feature**: 031-quality-gates-hygiene
|
||||
**Date**: 2026-03-11
|
||||
|
||||
## Overview
|
||||
|
||||
This feature has no new domain entities. It modifies configuration files, documentation, and refactors existing code for lint compliance. No data model changes.
|
||||
|
||||
## Configuration Artifacts
|
||||
|
||||
### Vitest Coverage Config (vitest.config.ts)
|
||||
|
||||
New `test.coverage` block:
|
||||
- `provider`: "v8"
|
||||
- `enabled`: true
|
||||
- `thresholds.lines`: 70 (initial, auto-ratchets)
|
||||
- `thresholds.branches`: 60 (initial, auto-ratchets)
|
||||
- `thresholds.autoUpdate`: true
|
||||
|
||||
### Biome Config (biome.json)
|
||||
|
||||
New rules under `linter.rules`:
|
||||
- `complexity.noExcessiveCognitiveComplexity`: error, maxAllowedComplexity: 15
|
||||
- `a11y.noNoninteractiveElementInteractions`: error
|
||||
|
||||
### Check Script (package.json)
|
||||
|
||||
Updated `check` script adds `pnpm audit --audit-level=high` step.
|
||||
|
||||
## New Component
|
||||
|
||||
### StopPropagation Wrapper (apps/web/src/components/)
|
||||
|
||||
A small presentational component that wraps children in a `<div>` with `onClickCapture` to stop propagation, replacing the current pattern of `<div onClick={e => e.stopPropagation()}>` that requires biome-ignore comments. Exact implementation TBD during task execution — alternatives include using `role="presentation"` or restructuring the click handling logic in the parent row.
|
||||
Reference in New Issue
Block a user