AGENTS.md file-size tripwires now apply to tests with no exemption, and
test files are expected to mirror source topology 1:1. args.test.ts was
a 2,503-line aggregation in src/utils/__tests__ while the code it
exercises lives in src/cli/parser. Split it into six focused files with
every test moved verbatim (142 tests before and after):
- src/cli/parser/__tests__/args-parse-interaction.test.ts (29 tests):
parseArgs shapes for press/click/swipe/gesture/type/record/screenshot
and friends
- src/cli/parser/__tests__/args-parse-session.test.ts (41 tests):
parseArgs shapes for session/daemon/device flags, passthrough,
install/metro/connect/proxy/auth and friends
- src/cli/parser/__tests__/args-validation.test.ts (17 tests): strict/
compat modes, rejections, deterministic errors
- src/cli/parser/__tests__/cli-help-topics.test.ts (15 tests): global
usage and help topics
- src/cli/parser/__tests__/cli-help-command-usage.test.ts (35 tests):
per-command usage copy
- src/utils/__tests__/command-schema-guards.test.ts (5 tests): schema/
catalog/capability guards and the cli.ts dispatch-literal walk (the
oxc-parser helpers live here)
AGENTS.md testing-matrix and help-source pointers updated to the new
paths, including the stale src/utils/cli-help.ts and cli-flags.ts
locations (both live under src/cli/parser/).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqeW8sA2ZnvnftdvpCqFMS
Summary
Stacked on #1100 (it edits the same file — GitHub will retarget this to
mainwhen #1100 merges).AGENTS.md's refocused size rules apply the LOC tripwires to tests with no exemption and require test files to mirror source topology 1:1.
args.test.tsviolated both: a 2,503-line aggregation sitting insrc/utils/__tests__while everything it exercises lives insrc/cli/parser. This splits it into six focused files, every test block moved verbatim — 142 tests before, 142 after, all passing:src/cli/parser/__tests__/args-parse-interaction.test.tssrc/cli/parser/__tests__/args-parse-session.test.tssrc/cli/parser/__tests__/args-validation.test.tssrc/cli/parser/__tests__/cli-help-topics.test.tssrc/cli/parser/__tests__/cli-help-command-usage.test.tssrc/utils/__tests__/command-schema-guards.test.tscli.tsdispatch-literal walk (oxc-parser helpers live here, besidecommand-schema.ts)AGENTS.md testing-matrix and help-source pointers updated to the new paths — including the pre-existing stale
src/utils/cli-help.ts/cli-flags.tsreferences (both actually live undersrc/cli/parser/). No other references toargs.test.tsremain in the repo.The win is primarily agent-context locality (no more whole-file reads to find one fixture) plus vitest file-level parallelism; the six files run in 1.5s wall with per-file test time of 10–60ms each.
Validation
All 142 relocated tests pass, and the full unit + smoke suites are green: 346 test files / 3211 tests, smoke 13/13,
check:quick(oxlint + tsgo) clean, fallow audit vsorigin/mainclean. Split was done mechanically (verbatim block moves with per-file import pruning verified bynoUnusedLocals+ oxlint), so no assertion text changed.Touched files: 8 (1 deleted, 6 created, AGENTS.md).
🤖 Generated with Claude Code
https://claude.ai/code/session_01FqeW8sA2ZnvnftdvpCqFMS
Generated by Claude Code