Context
The capabilities command was small but touched many public-surface files. The design review afterwards converged on a narrower conclusion: this is not a new CommandManifest problem yet. ADR 0008 is already partially implemented through src/core/command-descriptor/registry.ts; the next step is to finish the remaining live drift between command descriptors and hand-maintained command exposure lists.
Current drift:
CommandDescriptor.mcpExposed exists, but src/core/command-descriptor/registry.ts still computes it from listMcpExposedCommandNames() in src/command-catalog.ts.
src/command-catalog.ts still owns MCP_UNEXPOSED_CLI_COMMANDS.
src/command-catalog.ts still owns CAPABILITY_EXEMPT_CLI_COMMANDS.
listCapabilityCheckedCommandNames() should be derivable from descriptor capability entries, but is still maintained as an inverse hand list.
This keeps two live sources for the same command facts and is exactly the kind of drift ADR 0008 is meant to remove.
Scope
Finish the next descriptor-registry strangler step without introducing a new manifest layer and without changing daemon/platform behavior.
Acceptance Criteria
Out of Scope
- Capability profile inversion (
semantic-read, semantic-interaction, etc.) for many-platform scaling. That is a separate migration and should be parity-tested against the current command x device capability matrix before deleting the family/kind buckets.
- Full
defineCommand / CommandManifest rewrite. This issue should finish the live drift already identified by ADR 0008.
- Public/client API behavior changes.
Validation
At minimum:
pnpm exec vitest run src/core/command-descriptor/__tests__ src/utils/__tests__/command-schema-guards.test.ts src/commands/__tests__/command-surface-metadata.test.ts
pnpm check:quick
pnpm format
Run broader checks if the implementation touches shared command metadata, CLI schema, or descriptor derivation beyond these projections.
Context
The
capabilitiescommand was small but touched many public-surface files. The design review afterwards converged on a narrower conclusion: this is not a newCommandManifestproblem yet. ADR 0008 is already partially implemented throughsrc/core/command-descriptor/registry.ts; the next step is to finish the remaining live drift between command descriptors and hand-maintained command exposure lists.Current drift:
CommandDescriptor.mcpExposedexists, butsrc/core/command-descriptor/registry.tsstill computes it fromlistMcpExposedCommandNames()insrc/command-catalog.ts.src/command-catalog.tsstill ownsMCP_UNEXPOSED_CLI_COMMANDS.src/command-catalog.tsstill ownsCAPABILITY_EXEMPT_CLI_COMMANDS.listCapabilityCheckedCommandNames()should be derivable from descriptor capability entries, but is still maintained as an inverse hand list.This keeps two live sources for the same command facts and is exactly the kind of drift ADR 0008 is meant to remove.
Scope
Finish the next descriptor-registry strangler step without introducing a new manifest layer and without changing daemon/platform behavior.
Acceptance Criteria
CommandDescriptor/descriptor registry is the live source for MCP exposure.listMcpExposedCommandNames()no longer depends on a hand-maintainedMCP_UNEXPOSED_CLI_COMMANDSset.listCapabilityCheckedCommandNames()derives from descriptor capability entries instead ofCAPABILITY_EXEMPT_CLI_COMMANDS.Out of Scope
semantic-read,semantic-interaction, etc.) for many-platform scaling. That is a separate migration and should be parity-tested against the current command x device capability matrix before deleting the family/kind buckets.defineCommand/CommandManifestrewrite. This issue should finish the live drift already identified by ADR 0008.Validation
At minimum:
pnpm exec vitest run src/core/command-descriptor/__tests__ src/utils/__tests__/command-schema-guards.test.ts src/commands/__tests__/command-surface-metadata.test.tspnpm check:quickpnpm formatRun broader checks if the implementation touches shared command metadata, CLI schema, or descriptor derivation beyond these projections.