From 60e27fe51e7cda0032d4e1691ead1e315ccd6ebb Mon Sep 17 00:00:00 2001 From: Suliman Abdulrazzaq Date: Tue, 11 Aug 2026 00:10:22 +0300 Subject: [PATCH] docs(rules): clarify 800-line review ceiling --- rules/common/code-review.md | 4 ++-- rules/common/coding-style.md | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rules/common/code-review.md b/rules/common/code-review.md index d79ba9bf0..9ca1454ed 100644 --- a/rules/common/code-review.md +++ b/rules/common/code-review.md @@ -28,7 +28,7 @@ Before marking code complete: - [ ] Code is readable and well-named - [ ] Functions are focused (<50 lines) -- [ ] Files are cohesive (<800 lines) +- [ ] Source files are cohesive (under the 800-line soft maintainability ceiling, or include a reason for a deliberate exception) - [ ] No deep nesting (>4 levels) - [ ] Errors are handled explicitly - [ ] No hardcoded secrets or credentials @@ -54,7 +54,7 @@ Before marking code complete: |-------|---------|--------| | CRITICAL | Security vulnerability or data loss risk | **BLOCK** - Must fix before merge | | HIGH | Bug or significant quality issue | **WARN** - Should fix before merge | -| MEDIUM | Maintainability concern | **INFO** - Consider fixing | +| MEDIUM | Maintainability concern, including an unexplained source file over the soft 800-line ceiling | **INFO** - Consider fixing | | LOW | Style or minor suggestion | **NOTE** - Optional | ## Agent Usage diff --git a/rules/common/coding-style.md b/rules/common/coding-style.md index e72f3f119..9ab495508 100644 --- a/rules/common/coding-style.md +++ b/rules/common/coding-style.md @@ -36,7 +36,8 @@ Rationale: Immutable data prevents hidden side effects, makes debugging easier, MANY SMALL FILES > FEW LARGE FILES: - High cohesion, low coupling -- 200-400 lines typical, 800 max +- 200-400 lines typical, with 800 lines as a soft maintainability ceiling for source files +- Test, generated, and vendored files may exceed the ceiling when their size is justified by their role - Extract utilities from large modules - Organize by feature/domain, not by type