Skip to content

Commit 751520d

Browse files
authored
docs(agents): delete the file-size tiers nobody enforces (#2597)
AGENTS.md set a 300-line target and a 500-line extraction threshold for implementation files, and nothing in the repo checks either one. #2529 option 1 deletes them rather than building machinery to police them. What survives is the norm a review can still hold a change to: past 1,000 lines is architecture debt, split it before adding behavior. That sentence stays unqualified as to file kind on purpose — it is the one `test-file-size-ratchet.test.ts` quotes when it says tests are not exempt, and the gate does what the sentence cannot: freeze growth against the merge-base. Four `post-gesture-*` test comments explained a #1563 split by citing a repo-wide 500-line test-file tripwire, one of them on AGENTS.md's authority. That figure goes with this change, so they now state what the split was: by subject.
1 parent 28accb8 commit 751520d

5 files changed

Lines changed: 7 additions & 11 deletions

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ under `contracts/fixtures/`.
8181

8282
- Name modules for the domain question they answer and colocate machine-readable claims with their
8383
enforcement. Internal barrels are legacy; add barrels only at package boundaries.
84-
- Implementation files target at most 300 lines. Extract before adding behavior past 500 lines;
85-
files past 1,000 lines are architecture debt unless generated or fixture data.
84+
- Files past 1,000 lines are architecture debt; split them before adding behavior, unless they
85+
are generated or fixture data.
8686
- Tests mirror source topology one-to-one. Split a source module and its test together; do not add to
8787
the legacy `interaction.test.ts` or platform `index.test.ts` aggregations. Pure moves carry their
8888
tests unchanged; rename-only hunks owe no new coverage.

‎src/daemon/__tests__/post-gesture-no-effect-claim.test.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ import {
2626
} from './post-gesture-stabilization-fixtures.ts';
2727

2828
// When the agent-facing gestureNoEffect claim may and may not surface — split
29-
// by subject from post-gesture-stabilization.test.ts (the capture loop), the
30-
// same #1563 convention that keeps test files under the repo's 500-line
31-
// tripwire. Loop mechanics (rebase, distrust budget, timeouts) stay in the
29+
// by subject from post-gesture-stabilization.test.ts (the capture loop), per
30+
// #1563. Loop mechanics (rebase, distrust budget, timeouts) stay in the
3231
// loop file; everything here is about the claim and its veto instrumentation.
3332

3433
afterEach(() => {

‎src/daemon/__tests__/post-gesture-stabilization-fixtures.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import type { SessionState } from '../session-state.ts';
66
* Shared fixtures for the deferred-interaction-outcome test cluster:
77
* post-gesture-stabilization.test.ts (the async capture loop),
88
* post-gesture-stabilization-verdict.test.ts (the pure verdict/classifier
9-
* coverage — split by subject per #1563 review, to stay under the repo's
10-
* 500-line test-file tripwire, AGENTS.md), deferred-interaction-outcome.test.ts,
9+
* coverage — split by subject per #1563 review), deferred-interaction-outcome.test.ts,
1110
* and session-snapshot-freshness.test.ts. Not a `.test.ts` file, so vitest
1211
* never tries to run it directly.
1312
*/

‎src/daemon/__tests__/post-gesture-stabilization-verdict.test.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ const decidePostGestureStabilityVerdict = (params: {
3535
//
3636
// Split out of post-gesture-stabilization.test.ts per #1563 review (the pure
3737
// verdict coverage, alongside its own shared fixtures, moved to this sibling
38-
// module so the async-loop test file stays under the repo's 500-line
39-
// tripwire — see post-gesture-stabilization-fixtures.ts).
38+
// module — see post-gesture-stabilization-fixtures.ts).
4039
// ---------------------------------------------------------------------------
4140

4241
test('decidePostGestureStabilityVerdict trusts immediately when the platform does not need baseline distrust', () => {

‎src/daemon/__tests__/post-gesture-stabilization.test.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ import {
2828
// Pure verdict/classifier coverage (decidePostGestureStabilityVerdict) lives
2929
// in the sibling post-gesture-stabilization-verdict.test.ts, and the
3030
// agent-facing no-effect claim (corroboration, vetoes, warning wording) in
31-
// post-gesture-no-effect-claim.test.ts — split by subject per #1563 review to
32-
// stay under the repo's 500-line test-file tripwire.
31+
// post-gesture-no-effect-claim.test.ts — split by subject per #1563 review.
3332

3433
afterEach(() => {
3534
vi.useRealTimers();

0 commit comments

Comments
 (0)