4.2 KiB
4.2 KiB
CLI Surface and Mutating Operations Agenda
Status
Closed
Resolved by 006-studio-first-asset-services-and-event-lane-decision.md.
Purpose
Define the stable Studio-facing service contract for packer operations, especially operations that mutate registry state or user files.
Context
The draft already lists a substantial command surface:
initaddadoptforgetrmlistshowdoctorbuildwatchgcquarantine
Historically, packer was framed as a CLI-first tool. The current target is different:
- packer should be fully integrated with Studio;
- asset UI and packer services should evolve together;
- operations should exist as Studio-consumable services first;
- asset workflows should be observable through a dedicated background event lane for UI integration;
- CLI, if retained, should be treated as a later adapter rather than the design center.
This means the architectural work should focus on service semantics and UI integration points first, not on freezing a command-line contract too early.
Source Sections
13. CLI Commands (Comprehensive)
Key Questions
- Which packer operations are core Studio services in v1 and which are later capabilities?
- Which identifiers should Studio-facing services accept for normal asset workflows: name, id, uuid, root path?
- Which operations mutate registry only versus mutate workspace files?
- What requires explicit confirmation, preview, or staged apply behavior in Studio?
- How should safe fix flows be exposed as service operations rather than CLI flags?
- Which responses must be structured for UI consumption and automation?
- What, if anything, should remain CLI-specific in the future adapter layer?
- Should assets have a dedicated background event lane that reports changes, diagnostics, and build activity to the UI?
Options
Option A
Define a minimal stable v1 Studio service surface and mark the rest as future or optional.
Option B
Freeze a larger command catalog immediately.
Tradeoffs
- Option A lowers the early compatibility burden.
- Option A matches the Studio-integrated direction better because services and UI can stabilize together before any CLI freeze.
- Option A gives room to validate mutating operations safely before promising too much.
- Option B gives a bigger product surface up front, but it increases long-term compatibility cost around the wrong adapter.
Recommendation
Adopt Option A and distinguish:
- required core services,
- optional future adapters,
- future operations not yet in the normative contract.
Current design target:
- Studio integration is primary;
- asset UI and packer services should be designed together;
- service contracts should describe intent, preview, apply, and result models suitable for UI workflows;
- asset-oriented operations should publish structured background events suitable for logs, progress, and live UI refresh;
- CLI should not drive the core architecture in this phase.
Also adopt this integration direction:
- the system should have a dedicated asset workspace event lane;
- this lane observes relevant asset and registry changes, triggers analysis/rebuild workflows as appropriate, and reports structured events to the UI;
- the architectural contract is the event/reporting surface, not a commitment to a specific threading primitive;
- dangerous mutations still require explicit user intent and must not be silently auto-applied by the background lane.
Expected Decisions to Produce
- Core v1 Studio service set.
- Mutation safety and preview/apply model.
- Identifier resolution rules.
- Structured response contracts for UI and automation.
- Boundary between core services and future adapters.
- Asset workspace event lane and structured event model for UI reporting.
Expected Spec Follow-up
- Service operation contract spec.
- Studio asset workflow integration spec.
- Mutation and confirmation policy spec.
- Structured response/output contract spec.
- Asset event/reporting integration spec.
Non-Goals
- Asset payload binary layout.
- Format-specific
asset.jsonrules. - Detailed cache internals.
- Freezing a comprehensive CLI contract in the current phase.