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