discussion framework migration

This commit is contained in:
2026-03-26 18:45:46 +00:00
parent e78b72f61a
commit 38d8c25bba
90 changed files with 1150 additions and 2585 deletions
@@ -0,0 +1,52 @@
---
id: LSN-0001
ticket: studio-docs-import
title: Assets workspace execution wave legacy lesson
created: 2026-03-26
tags:
- studio
- legacy-import
- assets-workspace
- event-driven-ui
---
## Context
Legacy import from `docs/studio/learn/assets-workspace-execution-wave.md`.
This lesson captures the didactic consolidation of the first `Assets` workspace execution wave after the original implementation slices had already been absorbed into Studio specs and learn material.
Relevant specs:
- `docs/studio/specs/1. Studio Shell and Workspace Layout Specification.md`
- `docs/studio/specs/4. Assets Workspace Specification.md`
## Key Decisions
### Assets workspace should remain asset-first, event-driven, and preview-first
**What:** The stable workspace model treats `Assets` as a real asset workspace, separates navigator projection from details rendering, routes routine UI ownership through typed events, and keeps sensitive mutations preview-first rather than refresh-heavy or modal-first.
**Why:** The original execution wave produced many local slices, but the enduring lesson is the ownership model: local redraws instead of workspace-wide refresh, didactic asset detail ordering, workspace-local review with shell-level lifecycle visibility, and semantically separate mutation feedback.
**Trade-offs:** This model requires more deliberate component boundaries and event routing, but it avoids monolithic redraw logic and keeps the UI easier to reason about as the workspace grows.
## Patterns and Algorithms
- Treat `Assets` as a real workspace with explicit `loading`, `empty`, `error`, and `ready` states.
- Keep navigator updates and selected-asset details updates independently owned.
- Use typed workspace events for local state flow instead of defaulting to `refresh()`.
- Keep activity at shell scope, while review and mutation reasoning stay inside the workspace.
- Reserve modal confirmation for high-risk commit boundaries; use inline preview as the default review surface.
## Pitfalls
- Treating `Assets` like a filesystem explorer with extra badges.
- Rebuilding navigator, details, and unrelated controls for row-scoped changes.
- Letting details sections depend on one monolithic selected-asset redraw.
- Using logs as the main explanation surface for mutations.
- Publishing shell activity without keeping workspace-local review visible.
## Takeaways
- The durable lesson from the first `Assets` execution wave is the ownership model, not the historical sequencing of implementation slices.
- Event-directed local redraw and preview-first mutation review are foundational Studio patterns for the asset workspace.
- Legacy source attribution: `docs/studio/learn/assets-workspace-execution-wave.md`.
@@ -0,0 +1,47 @@
---
id: LSN-0002
ticket: studio-docs-import
title: Bank composition editor legacy lesson
created: 2026-03-26
tags:
- studio
- legacy-import
- bank-composition
- staged-editing
---
## Context
Legacy import from `docs/studio/learn/bank-composition-editor.md`.
This lesson captures the first-wave `Bank Composition` model as a didactic Studio pattern inside `Asset Details`, with direct relevance to `docs/studio/specs/4. Assets Workspace Specification.md` and packer-facing integration boundaries.
## Key Decisions
### Bank composition should use a Studio DTO boundary and staged session coordinator
**What:** `Bank Composition` should operate through Studio-owned DTOs, intentionally dumb visual components, one section-scoped coordinator built around `StudioFormSession<BankCompositionDraft>`, minimal public workspace-bus notifications, and a persistence path that goes through packer rather than direct Studio writes.
**Why:** Direct binding to raw packer/runtime shapes, rule-heavy generic controls, and direct `asset.json` writes would collapse family-specific rules into the wrong layer and duplicate authority that belongs to packer.
**Trade-offs:** The section needs a dedicated coordinator and DTO projection layer, but that cost keeps component boundaries honest and makes family-specific capacity and transfer semantics easier to control.
## Patterns and Algorithms
- Keep `available` and `selected` state in Studio-owned DTOs rather than raw packer objects.
- Land the section shell early and follow the existing staged-edit rhythm: `change`, `apply`, `reset`, `cancel`.
- Keep `StudioDualListView<T>` and `StudioAssetCapacityMeter` state-driven rather than rule-driven.
- Let the section-scoped coordinator own draft lifecycle, transfer/reorder effects, blockers, hints, and apply handling.
- Submit ordered selected files to packer, then rebind from refreshed persisted state after apply.
## Pitfalls
- Binding the section UI directly to raw snapshot rows or manifest shape.
- Hiding bank-family rules inside the dual list or capacity meter.
- Creating a second staged-edit model parallel to `StudioFormSession`.
- Turning every local action into a public workspace-bus event.
- Writing `asset.json` directly from Studio.
## Takeaways
- The lasting lesson is not the specific first-wave editor controls; it is the ownership boundary between projection, orchestration, dumb components, and packer persistence.
- Section-scoped coordinators are the right place for family-specific editing semantics in Studio.
- Legacy source attribution: `docs/studio/learn/bank-composition-editor.md`.
@@ -0,0 +1,47 @@
---
id: LSN-0003
ticket: studio-docs-import
title: Asset mutations legacy lesson
created: 2026-03-26
tags:
- studio
- legacy-import
- asset-mutations
- preview-first
---
## Context
Legacy import from `docs/studio/learn/mental-model-asset-mutations.md`.
This lesson preserves the didactic rule for how Studio must present asset mutations in the `Assets` workspace, aligned with `docs/studio/specs/4. Assets Workspace Specification.md` and packer integration boundaries.
## Key Decisions
### Sensitive asset mutations must be preview-first
**What:** Studio should treat destructive or relocational asset mutations as preview-first workflows, keep registry impact and workspace impact distinct, and reserve modal confirmation for high-risk final commits rather than using modals as a substitute for review.
**Why:** Users lose trust quickly when the UI hides whether a mutation affects only registry state or also the physical workspace. Inline staged review keeps the user anchored in the selected asset and its consequences.
**Trade-offs:** Inline review takes more UI structure than a modal-only flow, but it produces a clearer and safer operational model for both single-asset and batch mutations.
## Patterns and Algorithms
- Show affected assets, scope of impact, creations/moves/deletions, blockers, warnings, and safe fixes before apply.
- Use an inline staged panel as the default review surface.
- Keep `blockers`, `warnings`, and `safe fixes` visually and semantically distinct.
- For batch operations, show an aggregate summary first and drill-down detail second.
- Reflect lifecycle milestones such as `preview ready`, `action applied`, and `action failed` at shell scope while keeping review inside the workspace.
## Pitfalls
- Destructive apply without preview.
- Using raw logs as the main explanation surface.
- Mixing safe fixes with deletes as if they were the same class of action.
- Showing technical diff data without user-facing interpretation.
- Forcing modal-only review for ordinary mutation flows.
## Takeaways
- Preview is the review; modal confirmation is only the final safety gate for high-risk commits.
- Registry impact and workspace impact must never blur in Studio mutation UX.
- Legacy source attribution: `docs/studio/learn/mental-model-asset-mutations.md`.
@@ -0,0 +1,51 @@
---
id: LSN-0004
ticket: studio-docs-import
title: Assets workspace mental model legacy lesson
created: 2026-03-26
tags:
- studio
- legacy-import
- assets-workspace
- asset-first
---
## Context
Legacy import from `docs/studio/learn/mental-model-assets-workspace.md`.
This lesson keeps the didactic framing for the `Assets` workspace as an asset-first, path-aware Studio surface over the packer model.
Relevant specs:
- `docs/studio/specs/4. Assets Workspace Specification.md`
- `docs/packer/learn/mental-model-packer.md`
## Key Decisions
### The assets workspace exists to teach the asset model, not to act as a nicer file browser
**What:** The `Assets` workspace should treat asset identity as primary, path as supporting context, and the selected-asset view as a didactic explanation surface ordered around what the asset is, what it produces, what it contains, what is wrong, and what actions are available.
**Why:** A raw file-tree framing teaches the wrong mental model for packer-backed assets. The Studio needs to make managed assets, runtime-facing output, previewable inputs, and operational state understandable from the UI itself.
**Trade-offs:** Asset-first navigation requires custom navigator semantics and stronger didactic structure, but it produces a clearer and more accurate Studio view over the project.
## Patterns and Algorithms
- Use a custom asset navigator rather than a generic file explorer.
- Keep grouping/path visible as supporting context while preserving asset identity as primary.
- Present the selected asset in a fixed teaching order: `Summary`, `Runtime Contract`, `Inputs / Preview`, `Diagnostics`, `Actions`.
- Treat preview as part of the bridge between the conceptual asset model and real project materials.
## Pitfalls
- Turning the workspace into a filesystem explorer with badges.
- Making path the true identity instead of the asset.
- Showing only diagnostics and forgetting the asset model itself.
- Treating orphan as equivalent to broken.
- Hiding runtime-facing information behind technical dumps.
## Takeaways
- The key durable rule is `asset-first`, not `file-first`.
- Path-awareness is supporting context, not the primary identity model.
- Legacy source attribution: `docs/studio/learn/mental-model-assets-workspace.md`.
@@ -0,0 +1,45 @@
---
id: LSN-0005
ticket: studio-docs-import
title: Studio events and components legacy lesson
created: 2026-03-26
tags:
- studio
- legacy-import
- events
- components
---
## Context
Legacy import from `docs/studio/learn/mental-model-studio-events-and-components.md`.
This lesson preserves the Studio-wide mental model for typed events and the `prometeu-studio-components` control layer.
## Key Decisions
### Studio should grow through typed events and a Studio-owned control layer
**What:** The Studio should use a typed event model with both workspace buses and a global bus, automatically republishing workspace events upward, while visible controls should come through `prometeu-studio-components` rather than raw JavaFX usage scattered across the app.
**Why:** Direct references between shell, workspaces, and services create coupling that becomes hard to unwind as the application gains global activity, background operations, multiple workspaces, and cross-cutting actions. Raw JavaFX use also causes naming, styling, and behavior drift.
**Trade-offs:** This approach adds explicit control layers and event publication paths, but it keeps the UI dialect smaller, more opinionated, and easier to evolve consistently.
## Patterns and Algorithms
- Give each workspace its own bus and republish workspace events to the global Studio bus.
- Keep event publication explicit and typed.
- Use `prometeu-studio-components` as the Studio-facing control API rather than reimplementing JavaFX wholesale.
- When adding UI code, ask whether the behavior is an event and whether the control is part of the Studio-visible dialect.
## Pitfalls
- Letting shell, workspaces, and services call each other directly by convenience.
- Spreading raw JavaFX controls directly across the app.
- Recreating local wrappers and styling hooks inconsistently.
- Treating the component layer as a full JavaFX replacement instead of a focused Studio API.
## Takeaways
- Typed events and a Studio-owned control layer solve different problems, but together they prevent architectural drift as the UI grows.
- Workspace-local segregation and global shell visibility both matter; one bus alone is not enough.
- Legacy source attribution: `docs/studio/learn/mental-model-studio-events-and-components.md`.
@@ -0,0 +1,49 @@
---
id: LSN-0006
ticket: studio-docs-import
title: Studio shell mental model legacy lesson
created: 2026-03-26
tags:
- studio
- legacy-import
- shell
- workspace-boundary
---
## Context
Legacy import from `docs/studio/learn/mental-model-studio-shell.md`.
This lesson preserves the Studio-wide boundary between shell framing concerns and workspace operational detail.
Relevant spec:
- `docs/studio/specs/1. Studio Shell and Workspace Layout Specification.md`
## Key Decisions
### The shell should frame workspaces without absorbing their operational detail
**What:** The Studio shell owns project entry, global menus, fixed workspace navigation, the workspace host, right-side utility surface, and always-visible run control, while each workspace owns its own main body and domain-specific operational detail.
**Why:** Early JavaFX apps often collapse into one giant frame where every new concern lands at shell scope. The chosen shell model avoids that drift and keeps topology stable without prematurely committing to a fully docked IDE model.
**Trade-offs:** A structured shell limits early flexibility compared with full docking, but it prevents the codebase from solving layout-persistence and docking complexity before the product actually needs it.
## Patterns and Algorithms
- Keep shell concerns focused on framing, not workspace internals.
- Keep operational detail such as asset-management views, debugger/profiler content, and workspace-local logs inside the relevant workspace.
- Treat `Run` as a persistent shell control because it is a primary action rather than a secondary panel.
- Use the practical rule: framing concerns go to the shell; workspace operational detail stays in the workspace.
## Pitfalls
- Adding every new concern to one giant shell layout.
- Treating shell-wide console surfaces as mandatory for all detailed logs.
- Introducing docking complexity before the product topology is proven.
- Hiding primary actions like `Run` behind avoidable navigation friction.
## Takeaways
- The shell frames workspaces; it does not absorb them.
- The shell/workspace boundary is a product rule, not just a layout preference.
- Legacy source attribution: `docs/studio/learn/mental-model-studio-shell.md`.
@@ -0,0 +1,47 @@
---
id: LSN-0007
ticket: studio-docs-import
title: Pack wizard shell legacy lesson
created: 2026-03-26
tags:
- studio
- legacy-import
- pack-wizard
- packer-boundary
---
## Context
Legacy import from `docs/studio/learn/pack-wizard-shell.md`.
This lesson keeps the first-wave Studio rule for the `Pack` wizard as a shell over packer-owned operations, aligned with `docs/studio/specs/4. Assets Workspace Specification.md` and packer integration docs.
## Key Decisions
### Pack should be a Studio-owned wizard shell over packer-owned operations
**What:** The `Pack` flow should be a phase-based wizard with `Summary`, `Validation`, `Packing`, and `Result`, where Studio owns presentation and state binding while packer owns build-set summary, validation, execution, progress, and result semantics.
**Why:** A plausible-looking Studio modal can quietly reimplement packer semantics or hide operational phases. The wizard should expose those phases without pretending Studio owns build execution.
**Trade-offs:** The wizard structure is more explicit than one opaque modal state, but it keeps operational ownership honest and makes blocked, failed, and successful outcomes easier to reason about.
## Patterns and Algorithms
- Treat `Pack` as a workspace-level action over the current build set, not a selected-asset action.
- Ask packer for the build-set summary instead of recomputing it locally from navigator state.
- Use a separate validation phase that runs only on `registered + included in build`.
- Reflect packer-owned progress honestly and keep the first wave non-cancelable if packer does not support cancel.
- Make `assets.pa` the primary runtime artifact in the result summary; companion artifacts remain supporting detail.
## Pitfalls
- Treating pack summary as a local Studio recomputation.
- Using one opaque modal state instead of explicit operational phases.
- Letting unrelated assets influence wizard validation.
- Exposing fake cancel behavior unsupported by packer.
- Making companion artifacts dominate the main result summary.
## Takeaways
- The important lasting rule is ownership: Studio shells the flow, packer owns the semantics.
- Explicit phases are a didactic and operational feature, not decorative UI ceremony.
- Legacy source attribution: `docs/studio/learn/pack-wizard-shell.md`.
@@ -0,0 +1,50 @@
---
id: LSN-0008
ticket: studio-docs-import
title: Project-scoped state and activity legacy lesson
created: 2026-03-26
tags:
- studio
- legacy-import
- project-state
- activity
---
## Context
Legacy import from `docs/studio/learn/project-scoped-state-and-activity.md`.
This lesson preserves the rule for project-local Studio state and shell activity persistence.
Relevant spec:
- `docs/studio/specs/1. Studio Shell and Workspace Layout Specification.md`
## Key Decisions
### Project-local Studio state should live under `.studio/` inside the project root
**What:** Project-local Studio state should be rooted at `.studio/`, shell activity should be persisted and restored per project, persisted history should be bounded, and `.studio/` should remain the reserved root for future project-local Studio settings.
**Why:** If project-local state is stored as if it were application-global, the shell mixes unrelated histories and stops teaching what happened in the currently opened project.
**Trade-offs:** This design requires project-scoped persistence logic and bounded retention, but it preserves causality and keeps Studio-owned project data in one obvious root.
## Patterns and Algorithms
- Create `.studio/` during new-project scaffolding.
- Load shell activity when the project opens.
- Append new activity to the current project's local history.
- Trim persisted activity to the latest `500` entries.
- Keep launcher-global concerns outside the project-local `.studio/` root.
## Pitfalls
- Treating project activity as launcher-global state.
- Mixing multiple projects into one persisted activity history.
- Leaving project-local Studio files in ad hoc roots instead of `.studio/`.
- Allowing activity persistence to grow without a hard cap.
## Takeaways
- Project-local history must preserve causality for the currently opened project.
- `.studio/` is the reserved home for project-scoped Studio state.
- Legacy source attribution: `docs/studio/learn/project-scoped-state-and-activity.md`.
@@ -0,0 +1,51 @@
---
id: LSN-0016
ticket: studio-docs-import
title: Studio docs import pattern
created: 2026-03-26
tags:
- studio
- migration
- discussion-framework
- import-pattern
---
## Context
This lesson summarizes the completed migration of `docs/studio` into `.discussion/`.
The original migration control artifacts were:
- `AGD-0001`
- `DEC-0001`
- `PLN-0001`
Those workflow files are being deleted during housekeeping. The index remains the permanent historical record.
## Key Decisions
### Domain documentation import should preserve retained truth instead of reconstructing deleted history
**What:** The `docs/studio` migration imported only retained artifacts, rewrote them into framework-native templates, turned retained `learn` documents into legacy lessons, kept `specs` outside `.discussion/`, and promoted imported open agendas into their own new discussions.
**Why:** Reconstructing deleted decisions or plans would fabricate workflow history. The retained source set already contained the truth that mattered: one open agenda, zero retained decisions, zero retained plans, and a didactic learn corpus.
**Trade-offs:** This approach requires explicit editorial normalization and separate migration bookkeeping, but it yields a canonical framework surface without inventing missing history.
## Patterns and Algorithms
- Import only currently retained domain artifacts.
- Rewrite imported material into native framework templates.
- Turn retained `learn` material into legacy lessons under the migration discussion directory.
- Split retained open agendas into new discussions rather than leaving them nested inside the migration discussion.
- Keep `specs` as external normative references.
- Use housekeeping to delete completed migration control artifacts after their durable lesson is recorded.
## Pitfalls
- Recreating deleted decisions or plans from README summaries.
- Treating imported legacy lessons as if they came from framework-native execution rather than backfill.
- Leaving completed migration control artifacts in place after the durable pattern is already preserved.
## Takeaways
- The migration pattern is now reusable for other domains: retained agendas become new discussions, retained learn becomes legacy lessons, and completed migration control artifacts are disposable after housekeeping.
- Legacy source attribution for imported content remains in the imported lessons themselves; this lesson captures the migration pattern rather than one domain-specific document.