prometeu-studio/discussion/workflow/plans/PLN-0023-scaffold-flat-packed-prometeu-lsp-api-and-session-seams.md
2026-03-31 11:12:52 +01:00

3.4 KiB

id ticket title status created completed tags
PLN-0023 studio-editor-write-wave-supported-non-frontend-files Scaffold flat-packed prometeu-lsp API and Studio session seams review 2026-03-31
studio
lsp
api
packaging
session

Objective

Create the flat-packed prometeu-lsp module surfaces and the Studio/VFS session seams required by DEC-0011 before semantic capabilities are implemented.

Background

prometeu-lsp currently exists only as empty Gradle modules. DEC-0011 requires:

  • flat packaging in the style of prometeu-packer-api,
  • a Studio-integrated semantic consumer above VFS,
  • and a clean session-level seam for opened-document snapshots and closed-document filesystem fallback.

Scope

Included

  • scaffold public LSP API packages and contract types
  • scaffold runtime/v1 module shape
  • add Studio-side integration seam for a project-session-owned LSP consumer

Excluded

  • actual diagnostics/symbol/definition/highlight logic
  • frontend editing
  • completion

Execution Steps

Step 1 - Create Flat API Surfaces

What: Set up prometeu-lsp-api with explicit public package surfaces.

How: Create shallow public packages such as:

  • dtos
  • messages
  • events

along with the top-level service/factory/context contracts needed by Studio.

File(s):

  • prometeu-lsp/prometeu-lsp-api/src/main/java/**

Step 2 - Create Runtime/V1 Wiring

What: Set up the first concrete implementation module.

How: Add the initial runtime package layout in prometeu-lsp-v1, including factory and internal service skeletons that consume prometeu-vfs state rather than raw filesystem reads.

File(s):

  • prometeu-lsp/prometeu-lsp-v1/src/main/java/**
  • prometeu-lsp/prometeu-lsp-v1/build.gradle.kts

Step 3 - Add Studio Session Integration Seams

What: Make room for a project-session-owned LSP consumer in Studio.

How: Introduce or extend Studio project-session types so an integrated LSP consumer can later be constructed from project context and VFS access without changing the architectural owner.

File(s):

  • prometeu-studio/src/main/java/p/studio/projectsessions/**
  • prometeu-studio/src/main/java/p/studio/window/MainView.java
  • prometeu-studio/src/main/java/p/studio/window/StudioWindowCoordinator.java

Test Requirements

Unit Tests

  • API contract smoke tests where useful
  • session-seam construction tests

Integration Tests

  • project-session integration test proving Studio can construct LSP scaffold without semantic behavior yet

Manual Verification

  • confirm package layout is shallow and public surfaces are legible
  • confirm no direct filesystem ownership leaks into Studio UI code

Acceptance Criteria

  • prometeu-lsp-api exposes flat public package surfaces
  • prometeu-lsp-v1 contains concrete scaffold wiring above VFS
  • Studio has a session seam ready for an integrated LSP consumer
  • no semantic feature implementation is required yet for the scaffold to compile

Dependencies

  • DEC-0011 accepted
  • PLN-0022 review completed or otherwise stable enough for contract shape
  • DEC-0010 major VFS contract direction already stable

Risks

  • public API may accidentally mirror internal implementation packages too closely
  • Studio session ownership could drift if LSP is wired too low in the editor UI
  • premature semantic helpers may leak into the scaffold plan if scope is not kept tight