Skip to content

chore: ratchet-down complexity thresholds #18943

@marcusquinn

Description

@marcusquinn

Automated ratchet-down (t1913)

Simplification wins have accumulated. The following thresholds can be lowered:

NESTING_DEPTH_THRESHOLD: 279 → 274 (actual: 272, gap: 7)

Worker Guidance

Files to Modify:

  • EDIT: .agents/configs/complexity-thresholds.conf — lower the thresholds listed above

Do NOT modify:

  • .agents/configs/simplification-state.json — this is a maintenance registry updated by the pulse on main only. Including it in a focused ratchet-down PR causes diff noise across hundreds of unrelated entries and increases merge-conflict surface (GH#18622). The pulse refreshes it automatically after the PR merges. If it appears modified in your worktree, do not git add it.

Implementation Steps:

  1. For each proposed threshold, update the value in complexity-thresholds.conf
  2. Add a ratchet-down comment above the updated value documenting the change (e.g., # Ratcheted down to NNN (GH#NNNN): actual violations NNN + 2 buffer)
  3. Do NOT remove existing bump history comments — they are the audit trail
  4. Verify the state file is NOT staged before committing: git diff --cached --name-only | grep -v simplification-state

Verification:

# Confirm thresholds updated
grep -E 'FUNCTION_COMPLEXITY_THRESHOLD|NESTING_DEPTH_THRESHOLD|FILE_SIZE_THRESHOLD|BASH32_COMPAT_THRESHOLD' .agents/configs/complexity-thresholds.conf
# Confirm CI would pass with new values
.agents/scripts/complexity-scan-helper.sh ratchet-check . 5
# Confirm state file is NOT staged in the PR commit
git diff --cached --name-only | grep -v 'simplification-state.json'

Metadata

Metadata

Assignees

Labels

auto-dispatchAuto-created from TODO.md tagcode-qualityAuto-created from TODO.md tagnot-plannedClosed without implementation — not plannedorigin:workerAuto-created by pulse labelless backfill (t2112)status:queuedWorker dispatched, not yet startedtier:standardRoute to sonnet-tier model for dispatch

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions