Files
prometeu-studio/docs/specs/studio/1. Studio Shell and Workspace Layout Specification.md
T
bquarkz e6542df56e
Test / Tests and coverage
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
feat(studio): coordinate integrated AI activity and internal language services
Start project-owned language and authenticated MCP services when opening a
project, reusing the embedded LSP backend without a desktop TCP listener.
Keep editor overlays separate from saved-file MCP queries.

Reserve conflicting editing before ACP prompt delivery and retain protection
through native/tool termination, runtime cleanup and document refresh. Preserve
drafts on rejected admission, provide cleanup/preparation recovery, distinguish
terminal outcomes and redact permission previews.

Add lifecycle, language parity, activity, composition and UI regressions and
update the canonical Studio contracts. Keep distribution update alignment as
the separate WRK-002A follow-up.

Validation: complete make -C tooling verify PASSED in
20261127T035822Z-ec5d9266 (1172 unit, 131 compiler fixture, 31 headless tests).
Opt-in real-model and native AI-view qualification are outside that gate.

Work: WRK-0029; decision: DEC-0001.
2026-11-27 09:58:57 +00:00

171 lines
8.6 KiB
Markdown

# Studio Shell and Workspace Layout Specification
Status: Draft
Scope: Studio shell, project entry, and workspace frame
Purpose: Define the normative shell structure of the Studio UI.
## Authority and Precedence
This document describes the retained previous frontend. The normal application's
replacement shell/project flow is governed by specifications
[13](13.%20JavaFX%202%20Foundation%20Specification.md) and
[14](14.%20Integrated%20Play%20Specification.md), which take precedence for UI2.
This specification consolidates the accepted Studio shell decision into normative form. DEC-0060 adds DEV and project-scoped automation authority; its detailed behavior is owned by the [DEV and Automation Specification](10.%20DEV%20and%20Automation%20Specification.md).
## Normative Inputs
- the Studio application shell
- project entry or launcher flow
- shell-level workspace navigation
- shell-level utility and run surfaces
## Core Rules
1. The Studio must open through a project launcher or home surface before entering the main workspace shell.
2. The main shell must expose a top global menu region.
3. The main shell must expose a left fixed workspace selector.
4. The main shell must expose a center workspace host.
5. The main shell must expose a right global utility panel.
6. The main shell must expose an always-visible run surface in the top-right area.
7. Workspaces mounted in the shell must follow the Studio event-driven workspace framework.
8. The shell must preserve a clear path for reusable workspace framework primitives shared across workspaces.
## Project Entry
The Studio must not land directly into a workspace as its primary entry behavior.
Baseline project entry behavior is:
- show a lightweight launcher or home surface first;
- show existing or recent projects;
- expose `Open Project` and `Create Project` as first-class actions;
- the project-creation flow may include an optional extra-details step for project-local setup such as editor indentation policy;
- enter the main workspace shell only after a concrete project is selected or created.
## Workspace Model
The left workspace selector remains fixed in the baseline Studio shell.
The baseline workspace set includes:
- Asset Management;
- Debugger/Profiler;
- DEV, for granting/reclaiming project control and observing external-agent automation;
- Shipper, temporarily represented by the current `BuilderWorkspace`.
`BuilderWorkspace` is transitional and must not be treated as a long-term architectural reference for the final shipping surface.
DEV MUST remain separate from human Debug and MUST NOT offer chat or manual Play/input for the headless session. Selecting, hiding or switching away from DEV MUST NOT grant or release project authority. The shell's always-visible run surface remains visible, but conflicting manual actions MUST be unavailable while project control is ceded, including while waiting for an agent. Services MUST enforce the same exclusion; shell bindings alone are insufficient.
## Workspace Architecture Model
The shell-level workspace host exists to mount independently authored workspaces under one Studio contract.
Baseline workspace architecture rules are:
- each workspace should have a composition root that mounts the workspace into the shell;
- the shell and workspace composition roots must receive neutral Studio API services through explicit constructor or factory injection;
- a workspace composition root should coordinate workspace services, state orchestration, and structural sync, but it should not own every local render path directly;
- project-session services that must survive workspace focus changes should be owned above individual workspace focus lifecycles and then consumed by workspace composition roots;
- event-observing workspace controls must be lifecycle-managed;
- workspace-local updates should flow through the Studio event system rather than ad hoc imperative redraw chains;
- future workspaces should consume shared Studio workspace framework primitives where those primitives already cover the needed behavior.
- shell and workspace code must not resolve application services through a static container or Spring application-context lookup.
The shell must not encourage a workspace model where every interaction falls back to whole-workspace refresh.
Detailed local workspace composition remains workspace-owned.
For example, `Assets`-local navigator behavior, detail-pane composition, and mutation flows are not shell-global rules and must be defined by the workspace-local specifications that still exist.
Project-session boundaries may still exist above a workspace when the state must remain alive while the project window stays open.
Rules:
- the shell may construct and own project-session services that survive workspace focus changes;
- workspaces may consume those project-session services without inheriting their ownership;
- introducing a project-session service must not collapse shell and workspace responsibilities into one monolithic root.
- project-local Studio state under `.studio/` must be loaded through the project-session boundary rather than through shell-local ad hoc persistence;
- session-restoration state under `.studio/state.json` must be loaded through the project-session lifecycle;
- project-local setup under `.studio/setup.json` is configuration rather than session snapshot state and may be read on demand by the consumer that needs it;
- shell-restorable state accepted by Studio must be restored when the project shell mounts and persisted when the project shell closes.
## Right Utility Panel
The right-side global utility surface is tab-based.
Baseline rules:
- the initial tab set contains only `Activity`;
- the panel must be extendable with additional tabs later;
- `Run` is not a tab.
The right utility panel exists for shell-level visibility and utility, not for general per-workspace log dumping.
## Logs and Operational Detail
Detailed execution output belongs to the active workspace that owns the operation.
Rules:
- the shell must not define a single mandatory global console as the baseline logging model;
- each workspace may expose its own logs, console, or detailed operational output;
- shell-level utility surfaces may summarize shared activity, but they do not replace workspace-owned detail.
## UI Remodeling Scope
The Studio UI may be remodeled substantially during this wave.
That flexibility is constrained by:
- theme support must remain preserved;
- i18n support must remain preserved;
- the resulting shell must keep a clear path for reusable Studio controls.
## Deferred Docking
A fully docked IDE shell is not baseline behavior.
Rules:
- docking is explicitly deferred;
- shell topology and workspace responsibilities must be proven first;
- future dockability may be revisited only after the baseline shell is stable in actual use.
## Non-Goals
- defining the full internal layout of every workspace
- defining the final future tab set of the right utility panel
- defining the detailed activity rendering model
- defining every reusable workspace primitive in this document
## Exit Criteria
This specification is complete enough when:
- project entry and shell regions are unambiguous;
- workspace and shell responsibilities are clearly separated;
- the shell-level expectations for workspace architecture are explicit;
- the baseline Studio frame is stable enough for implementation planning.
## Project Assistant Preparation (DEC-0061)
Project creation MUST scaffold neutral agent-integration intent in
`.studio/setup.json` and invoke the same preparation port used by existing
projects in DEV. Application infrastructure resolves installed Studio and client
configuration; the wizard/Core MUST NOT serialize provider TOML or launch an
agent. Failed preparation leaves a usable project with actionable incomplete
readiness in DEV, never a false ready claim. Runtime/editor settings and unrelated
client configuration MUST survive. Preparation grants no project control.
### Automatic preparation when opening a project
Opening a project MUST prepare its enabled MCP integration using the same neutral
port as scaffold and DEV retry. Desktop composition MUST start the shared loopback
server before project sessions become available; no external command or separate
per-project desktop Run is required. Explicitly disabled integration MUST remain
disabled. Preparation failure MUST remain visible in DEV readiness without blocking
project use. Opening MUST publish authenticated project MCP access without granting task
authority or reserving editing. Integrated activity admission follows specs 10 and 16.
The coding client continues to own its configured stdio process and initial trust.