added asset workspace working with packer

This commit is contained in:
2026-03-24 13:42:43 +00:00
parent 1f6df50f09
commit ebbfe311ee
71 changed files with 2800 additions and 711 deletions
+3 -10
View File
@@ -404,27 +404,20 @@ Variants:
* `add --dir` creates a dedicated asset root dir
* `add --in-place` anchors next to the file
### 13.3 `prometeu packer adopt`
Scans workspace for unregistered `asset.json` anchors and offers to register them.
* default: dry-run list
* `--apply` registers them
### 13.4 `prometeu packer forget <name|id|uuid>`
### 13.3 `prometeu packer forget <name|id|uuid>`
Removes an asset from the registry without deleting files.
Useful for WIP and cleanup.
### 13.5 `prometeu packer rm <name|id|uuid> [--delete]`
### 13.4 `prometeu packer rm <name|id|uuid> [--delete]`
Removes the asset from the registry.
* default: no deletion
* `--delete` can remove the asset root dir (dangerous; must confirm in UI tooling, or require a force flag in CLI)
### 13.6 `prometeu packer list`
### 13.5 `prometeu packer list`
Lists managed assets:
+1 -1
View File
@@ -26,7 +26,7 @@ There are two different truths for two different jobs:
- each `asset.json` tells the packer what that asset declares locally.
This split matters.
Without it, copy/move/adopt flows become ambiguous very quickly.
Without it, copy/move/register flows become ambiguous very quickly.
## 3. What is the difference between `asset_id` and `asset_name`?
@@ -14,7 +14,7 @@ Runtime-side reading semantics for `assets.pa` are defined upstream in `../runti
- project workspace with `assets/`
- packer registry and control data under `assets/.prometeu/`
- managed asset roots anchored by `asset.json`
- registered asset roots anchored by `asset.json`
## Core Rules
@@ -1,7 +1,7 @@
# Workspace, Registry, and Asset Identity Specification
Status: Draft
Scope: Managed asset roots, registry authority, and stable identity
Scope: Registered asset roots, registry authority, and stable identity
Purpose: Define how the packer recognizes, tracks, and preserves asset identity.
## Authority and Precedence
@@ -16,18 +16,22 @@ This specification consolidates the initial packer agenda and decision wave into
## Core Rules
1. One managed asset equals one asset root directory.
1. One registered asset equals one asset root directory.
2. One asset root contains exactly one anchor `asset.json`.
3. `assets/.prometeu/index.json` is the authoritative registry of managed assets.
3. `assets/.prometeu/index.json` is the authoritative registry of registered assets.
4. `asset.json` is the authoritative asset-local declaration.
5. An asset root absent from the registry is not part of the managed build set.
5. An asset root absent from the registry is `unregistered`.
6. `unregistered` assets are always `excluded` from build participation.
7. Registered assets may be `included` or `excluded` from build participation without losing identity.
8. The baseline build set includes registered assets whose registry entry is marked as build-included.
## Identity Model
Each managed asset has:
Each registered asset has:
- `asset_id`: stable project-local identity
- `asset_uuid`: stable long-lived identity for migration/tooling scenarios
- `included_in_build`: build participation flag persisted in the registry
The following are not primary identity:
@@ -50,15 +54,26 @@ Rules:
Renaming `asset_name` is an API-visible change, but not an identity change.
## Orphan Anchors
## Unregistered Roots
An `asset.json` without a corresponding registry entry is an orphan declaration.
An `asset.json` without a corresponding registry entry is an unregistered asset root.
Rules:
- it does not enter the build automatically;
- it is excluded from the build automatically;
- it is diagnosable;
- it is adoptable only through explicit flow.
- it becomes registered only through explicit flow.
## Build Participation
Build participation is registry-owned for registered assets.
Rules:
- excluding a registered asset from builds does not remove `asset_id`;
- excluding a registered asset from builds does not remove `asset_uuid`;
- inclusion changes must preserve asset identity and registry location;
- unregistered assets cannot be marked as build-included.
## Asset ID Allocation
@@ -77,7 +92,7 @@ Identity-bearing conflicts are structural errors.
Examples:
- duplicate or ambiguous anchors under managed expectations;
- duplicate or ambiguous anchors under registered expectations;
- manual copy that creates identity collision;
- registered root missing anchor.
@@ -91,6 +106,6 @@ Examples:
This specification is complete enough when:
- managed asset boundaries are unambiguous;
- registered asset boundaries are unambiguous;
- registry authority is explicit;
- identity survives relocation without ambiguity.
@@ -92,7 +92,7 @@ Rules:
## Preload
Each managed asset must declare preload intent explicitly.
Each registered asset must declare preload intent explicitly.
Baseline shape:
@@ -74,7 +74,7 @@ The header carries:
Rules:
- one entry per managed asset in the current build set;
- one entry per included asset in the current build set;
- no secondary runtime-only identity layer;
- no synthetic dense reindexing layer;
- `asset_name` remains present as logical/API-facing metadata.
@@ -12,12 +12,12 @@ This specification consolidates the initial packer agenda and decision wave into
Diagnostics are divided into:
- structural managed-world errors;
- structural registered-world errors;
- advisory workspace hygiene diagnostics.
Rules:
- structural managed-world errors block builds;
- structural registered-world errors block builds;
- hygiene findings do not block baseline builds by default;
- workspace scanning is broader than build validation.
@@ -25,7 +25,7 @@ Rules:
Baseline doctor behavior:
- managed-world validation by default;
- registered-world validation by default;
- broader workspace hygiene scanning in expanded workspace mode;
- safe mechanical fix application only for baseline fix flows.
@@ -38,7 +38,7 @@ Rules:
- destructive or relocational mutations require explicit consent;
- quarantine is explicit and reversible;
- duplicate content detection is advisory, not structurally invalid by itself;
- orphan anchors are diagnosable, not build-active.
- unregistered asset roots are diagnosable and remain excluded from builds.
## Studio-First Service Surface
@@ -48,8 +48,8 @@ Baseline core services:
- `init_workspace`
- `register_asset`
- `adopt_asset`
- `forget_asset`
- `include_asset_in_build`
- `exclude_asset_from_build`
- `remove_asset`
- `list_assets`
- `get_asset_details`
@@ -92,7 +92,7 @@ Rules:
- preview or analysis precedes broad mutation where appropriate;
- safe-fix flows are modeled as services, not merely terminal flags;
- `forget_asset` and `remove_asset` remain distinct operations.
- `exclude_asset_from_build` and `remove_asset` remain distinct operations.
## Structured Responses
@@ -45,8 +45,8 @@ The `Assets` workspace is a Studio view over packer services.
The workspace must assume:
- managed assets are the primary unit of identity and operation;
- orphan declarations may exist and must remain visible;
- registered and unregistered assets may coexist inside `assets/`;
- unregistered assets remain visible but excluded from builds;
- assets may aggregate many internal inputs;
- runtime-facing output contract data exists for each asset;
- diagnostics, activity, progress, and staged mutation responses are available from Studio-facing services.
@@ -62,7 +62,7 @@ The `Assets` workspace is:
The workspace must help the user understand:
- what the managed asset is;
- what the asset registration and build status are;
- where the asset root lives;
- which internal inputs belong to that asset;
- what the asset declares toward the runtime-facing contract;
@@ -93,7 +93,8 @@ Filesystem structure may be visible and actionable as supporting context, but it
- The left navigation surface must be a custom `Asset Tree` / `Asset Navigator`.
- Asset nodes must expose strong visual semantics through icons, badges, and state styling.
- Asset nodes must surface:
- managed/orphan state,
- registration status,
- build participation,
- diagnostics presence,
- preload intent,
- and broad asset family or type where available.
@@ -102,8 +103,8 @@ Filesystem structure may be visible and actionable as supporting context, but it
### Filters and Search
- The baseline filters are:
- `Managed`
- `Orphan`
- `Registered`
- `Unregistered`
- `Diagnostics`
- `Preload`
- The navigator must support textual search.
@@ -112,11 +113,22 @@ Filesystem structure may be visible and actionable as supporting context, but it
- asset root path
- path context
### Workspace Actions
- Workspace-scoped actions must appear above the main asset workspace split, not inside the navigator list region.
- Workspace-scoped actions must not be mixed into the selected-asset details surface.
- Workspace actions should remain visible without requiring a selected asset.
- Global asset-manager actions such as `Add Asset`, `Doctor`, and `Pack` belong to this workspace-level action area.
### Navigator Actions
- Navigator-local controls may include search and filters that are specifically about asset discovery and navigation.
### Selection Rules
- The baseline navigator is single-select.
- Managed asset selection must be preserved by `asset_id`.
- Orphan selection must be preserved by asset root path until the asset becomes managed.
- Registered asset selection must be preserved by `asset_id`.
- Unregistered selection must be preserved by asset root path until the asset becomes registered.
- If an asset changes state while preserving identity, selection must remain attached to it.
- If the selected asset is removed from the navigator, selection must clear explicitly.
- Selection must never silently drift to another asset due to refresh ordering.
@@ -127,8 +139,8 @@ Filesystem structure may be visible and actionable as supporting context, but it
- The navigator must define explicit `no assets` state.
- The navigator must define explicit `no results` state.
- The navigator must define explicit `workspace error` state.
- Orphan assets must appear in the same navigator flow as managed assets.
- Orphan styling must communicate `declared, not managed`, not `broken`.
- Unregistered assets must appear in the same navigator flow as registered assets.
- Unregistered styling must communicate `present but not yet registered`, not `broken`.
### Inputs Expansion
@@ -137,22 +149,22 @@ Filesystem structure may be visible and actionable as supporting context, but it
## Selected Asset Details Rules
The selected asset view must use this fixed section order:
The selected asset view must use this stable composition:
1. `Summary`
1. top row with `Summary` and `Actions` side by side
2. `Runtime Contract`
3. `Inputs / Preview`
4. `Diagnostics`
5. `Actions`
This section order is stable across asset families.
This composition is stable across asset families.
### Summary
- `Summary` must always be present for a selected asset.
- `Summary` must show:
- `asset_name`
- managed/orphan state
- registration status
- build participation
- `asset_id` when available
- family/type
- asset root path
@@ -187,16 +199,21 @@ This section order is stable across asset families.
### Actions
- Actions must be explicit.
- Actions that target the selected asset must appear beside `Summary`, not in the navigator area.
- Safe and routine actions must be visually separated from sensitive mutations.
- Hidden or automatic repair behavior is not allowed in the selected-asset view.
## Action Rules
- Primary actions for managed assets include `Doctor` and `Build`.
- Primary actions for orphan assets include `Adopt`.
- `Register` must remain available when explicit registration is the correct flow.
- Sensitive actions such as `Forget`, `Remove`, and quarantine-like actions must be visually separated from routine actions.
- Registered assets excluded from builds must expose an explicit `Include In Build` action.
- Primary actions for unregistered assets include `Register`.
- `Register` is a direct action in Studio UX. If registration is valid, clicking it must register immediately without an extra acknowledgement step.
- If registration is blocked, Studio may surface the blocking preview inline so the user can inspect why registration cannot proceed.
- Sensitive actions such as `Exclude From Build`, `Remove`, and `Relocate` must be visually separated from routine actions.
- Sensitive actions must not look interchangeable with routine actions.
- `Relocate` must collect an explicit user-chosen destination root before the staged preview is generated.
- Automatic relocation targets are not sufficient Studio UX for `Relocate`.
- `Exclude From Build` and `Remove` must confirm in a modal review surface rather than an inline staged panel.
## Activity, Progress, and Logs Rules
@@ -230,24 +247,25 @@ This section order is stable across asset families.
Sensitive asset mutations are `preview-first`.
The default review surface is an inline staged panel inside the workspace.
The review surface depends on the mutation class.
Modal confirmation is reserved for high-risk final commits such as destructive delete or major relocation.
Inline staged panels are allowed for non-destructive blocked or inspect-only flows.
Modal review and confirmation is required for `Exclude From Build`, `Remove`, and relocation commits.
### Mutations Requiring Preview
- `Adopt`
- `Forget`
- `Exclude From Build`
- `Remove`
- `Quarantine`
- relocational changes such as move or rename of asset roots
- batch operations
`Doctor` and `Build` remain outside this sensitive mutation staging flow.
Navigator-level `Doctor` and `Pack`, plus asset-level `Include In Build` and successful `Register`, remain outside this sensitive mutation staging flow.
### Preview Content
- Preview must show affected assets.
- Relocation preview must show the planned target root chosen by the user.
- Preview must show proposed actions.
- Preview must distinguish registry impact from workspace impact.
- Preview must show blockers, warnings, and safe fixes as separate visual sections.