Skip to content

refactor: migrate command families to facets#854

Open
thymikee wants to merge 5 commits into
mainfrom
refactor/management-command-facets
Open

refactor: migrate command families to facets#854
thymikee wants to merge 5 commits into
mainfrom
refactor/management-command-facets

Conversation

@thymikee

@thymikee thymikee commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

Migrates every command family to command-level facets, with no remaining exported raw family constructor path. The command surface now composes metadata, executable definition, CLI schema/reader, daemon projection, and output formatting from per-command facets across all families.

Before/after: management/index.ts drops from 463 LOC to a 21 LOC composer; every exported command family now uses defineCommandFamilyFromFacets; the old defineCommandFamily helper was removed. Gesture typed-client projection aliases are preserved through explicit extraDaemonWriters, with duplicate writer-key protection covered by a regression test.

Second-order cleanup included removing the stale family constructor/cast path and making Android .aab bundletool tests hermetic so local unit checks do not depend on a developer machine bundletool in PATH.

Touched files: 21. Scope expanded from management to all command families plus one Android test isolation fix.

Note: requested external claude -p review was blocked by execution policy because it would send private repository context to an external service. I performed a local critical pass instead and addressed the actionable duplicate-writer overwrite risk it found.

Validation

Verified with pnpm format, pnpm check:quick, focused command-surface/CLI/gesture tests, pnpm test:integration:progress:check, pnpm check:fallow --base origin/main, focused Android bundletool tests, and escalated pnpm check:unit. The full unit/smoke run passed after the final cleanup: 270 unit files / 2611 tests and smoke tests passed, with the live web smoke intentionally skipped by env guard.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.3 MB 1.3 MB +2.9 kB
JS gzip 429.4 kB 429.8 kB +458 B
npm tarball 565.6 kB 566.0 kB +421 B
npm unpacked 1.9 MB 1.9 MB +2.9 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.5 ms 29.5 ms -0.0 ms
CLI --help 48.3 ms 49.3 ms +1.0 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/2948.js +2.9 kB +458 B

@thymikee

thymikee commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

Reviewer pass is clean: no actionable findings.

Merge-ready from my side. The isolated review checked the PR metadata, all green checks, CONTEXT.md, ADR 0003, and the management command route through family facets -> CLI schema/reader -> daemon projection -> existing daemon routing/output formatting.

The split preserves the public management command order, keeps install-from-source projected to internal install_source, leaves daemon routing unchanged, and retains the prior output formatter behavior. Residual risk is low: this is a structural command-surface refactor with no daemon/runtime files changed, so CI parser/metadata/integration coverage is appropriate and I did not require a fresh manual device run.

@thymikee thymikee force-pushed the refactor/management-command-facets branch from c3474ea to 233cb09 Compare June 24, 2026 12:07
@thymikee thymikee changed the title refactor: split management command facets refactor: migrate command families to facets Jun 24, 2026
@thymikee

Copy link
Copy Markdown
Member Author

The earlier merge-ready note applied to the previous management-only head. This new head broadens the PR to all command families, so I’m treating it as needing a fresh review once CI finishes. Current status: mergeable but UNSTABLE, with most checks still pending.

@thymikee

Copy link
Copy Markdown
Member Author

Fresh reviewer pass on the expanded head is clean: no actionable findings.

Merge-ready from my side for bc4d9c7. CI is green, including Unit Tests, Integration Tests, Smoke Tests, Typecheck, Lint & Format, Fallow, Coverage, CodeQL, Layering Guard, and Bundle Size.

The isolated review traced the command-family facet migration through registry aggregation, CLI schema/readers, daemon projection, CLI output formatting, and existing daemon routing. It also compared base vs head registry outputs: metadata order, CLI schema keys/readers, daemon writer keys, output formatter keys, schema JSON, representative daemon projections, and representative CLI readers all matched. Gesture alias writers were preserved. Residual risk is low: this is a structural command-surface/test-isolation refactor with no daemon router/runtime behavior changes, so I did not require live device verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant