refactor(cli-schema): orient the schema layer above commands (#2543 step 3) - #2590
Merged
Merged
Conversation
…ove commands (#2543) Move CommandSchema/CommandSchemaOverride from src/cli-schema/types.ts into packages/command-registry beside the flag grammar they import, retiring 22 forward type-only commands -> cli-schema edges. Take projectConfigFlagKeys directly from the registry in cli-config. Relocate command-explain.ts up into the cli zone (it renders the schema and already type-depends on the daemon route union), retiring the last commands -> cli-schema value edges. commands -> cli-schema is now 0 of any kind; cli-schema -> commands (the facet aggregate) is the honest direction: the schema layer renders what the facets author.
…#2543) Add the from:commands to:cli-schema policy so the declared direction (cli-schema reads the command facets; commands never imports cli-schema) cannot regress. R6 4 -> 3 (command-explain moved above daemon-server). Update the R2 hint, the check spine comment, and the surviving-inversion notes in the findings doc.
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
|
Looks good at 9e61949. The schema types move into |
|
thymikee
added a commit
that referenced
this pull request
Sep 14, 2026
…tle-on-exit-2522 * origin/main: perf(scroll-until): answer every candidate from one visibility index (#2596) refactor(daemon): resolve device interactors through a composed capability (#2593) refactor(daemon): stop the client value-importing daemon internals (#2559) (#2594) refactor(shell-quote): one implementation, reached through the runner host port (#2595) docs(agents): delete the file-size tiers nobody enforces (#2597) fix(daemon): key the implicit session by workspace and platform (#2587) refactor(cli-schema): orient the schema layer above commands (#2543 step 3) (#2590)
This was referenced Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Step 3 of #2543. Orients the CLI/MCP schema layer above commands (not below) — the honest direction: a package cannot import
src, andcli-schemarenders what the command facets author. Both zones are rank 3, so the gate never ordered them; R2 declares it now.CommandSchema/CommandSchemaOverridefromsrc/cli-schema/types.tsintopackages/command-registry(@agent-device/command-registry/command-schema), beside the flag grammar they already import. Retires the 22 forwardcommands → cli-schematype edges.cli-config.tstakesprojectConfigFlagKeysfrom the registry directly instead of throughcommand-schema.ts.command-explain.tsfromsrc/commandsintosrc/cli(it renders the schema and already types against the daemon route union) — the lastcommands → cli-schemavalue edges, and it also retires the lastcommands → daemon-servertype inversion.R2 commands-floornow rejects anycommands → cli-schemaimport of any kind.After the change
commands → cli-schemais 0 of any kind;cli-schema → commands(reading the facet aggregate) is the declared direction. No CLI/help/MCP behavior change. 35 files, +79/-44.Validation
Head
9e61949. Green on the commit:check:layering(235/235 + check OK; R4=0, R5=0, R6 4→3, R9 6, R11 301 subpaths),typecheck,check:package,check:mcp-metadata,check:production-exports(parity 68),check:fallow,eager-closure-budgets(612), help-conformance,command-doc-coverage, andcheck:affected'svitest-relatedlane (1258 tests).lint+format:checkclean.Pre-existing, unrelated:
check:affected'smutation-modelstage fails onscripts/mutation/ownership.test.ts(gestures.test.ts → scroll-edge-state). Verified it fails identically at the merge-base730b20149e— the same failure #2562 recorded. A parallellintlane flaked under concurrent subprocess load; standalonepnpm lintis exit 0.