Skip to content

decision: enforce or delete the implementation-file size tiers in AGENTS.md #2529

Description

@thymikee

Decision needed

AGENTS.md states 300/500/1000-line tiers for implementation files. Nothing enforces them: scripts/__tests__/test-file-size-ratchet.test.ts matches only *.test.* (:32), its roots and rename pathspec are test-shaped (:30, :69), and its tripwire is 1,000 (:27), so widening the regex is not a small change. Seven implementation files exceed 1,000 lines (registry.ts 1972, cli-help.ts 1255, runner-session.ts 1134, perf.ts 1111, resolution.ts 1104, client-metro.ts 1094, connection-runtime.ts 1002).

The draft plan contradicts itself: its header says "do not create a second ratchet file" and its Step 2 creates one. The 2026-09-02 maintainability review ranked enforcement machinery (~21.6k LOC, 24 rules without a kill criterion) as the top waste.

Options:

  1. Delete the 300/500 tiers from AGENTS.md; keep "over 1,000: split before adding behavior" as review guidance. Zero machinery.
  2. Generalize the existing ratchet to source files (parametrize roots, rename pathspec, tripwire) in the same file. One test, no baseline JSON; only files over 1,000 are watched, no growth past merge-base size.
  3. A second ratchet file as drafted. Rejected.

Recommendation: option 1 unless the seven files above are expected to keep growing, in which case option 2 with the kill criterion "delete when no file is over the tripwire for 90 days".

Not blocking any other audit item: none of the wave-2 files is over 1,000 lines today (exec.ts 821 has 179 lines of headroom).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions