refactor(command-surface): split the system family by command

Merged
TH
7d ago
+1018-927

Summary

packages/command-surface/src/system/index.ts was 905 lines of unrelated commands (home, back, keyboard, clipboard, orientation, fold, telephony, hardware buttons, TV remote, app switcher, appstate), changed in 16 of the last 200 commits. Each command now owns one file with its schema, description, metadata, CLI schema/reader, daemon writer, facet, and private input readers. index.ts keeps only the family composition and the output-schema projection. 16 files touched.

This is move-only: all 88 module-scope statements are unchanged (base vs head statements compared, and ADR 0027's split tolerance passes with no approval row). No strings, descriptions, help text, schemas, facet ordering, or exported names changed.

One deviation: the 16 *CliReader/*DaemonWriter symbols moved to their command modules instead of being re-exported from the barrel. Re-exported alone they have no production consumer, so check:production-exports flags them, and the only alternative was a Fallow suppression row. Each module now exports what its own facet consumes, matching capture/ and management/. systemCommandFamily and SYSTEM_COMMAND_OUTPUT_SCHEMAS keep their names, values, and index.ts path, so descriptor ownerFiles claims are untouched.

Validation

Tested at 458fe5c8c5. install --frozen-lockfile, build, format, lint, tsc -b pass. Targeted suites pass: command-surface 287, src/commands/schema 114, cli+mcp+command-registry 1214, daemon 4938, eager-closure/closure-growth/repo-guards 1083. check:layering, check:fallow, check:production-exports, check:bundle-owner-files, check:command-docs, check:mcp-metadata, check:di-seams, check:daemon-wire-compat (identical to base) pass. agent-device help is byte-identical to base for all twelve commands. Full unit-ci and device lanes left to CI.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.