diff --git a/.agents/subplans/02-domain-and-storage.md b/.agents/subplans/02-domain-and-storage.md index 5fac7cc..6cf9cfa 100644 --- a/.agents/subplans/02-domain-and-storage.md +++ b/.agents/subplans/02-domain-and-storage.md @@ -1,5 +1,10 @@ # Subplan 02 - Product Domain And Storage +> **Flow decomposition:** Slice 1 is split across two flow steps — **P2.1** +> (Core Structs + boundary validation) and **P2.3** (in-memory repository + +> `db.json` persistence). Token ships in **Slice 5 - Token Security**, not +> Slice 1. See "Milestone 1 — Flow Step ↔ Subplan Slice Mapping" in `PLAN.md`. + ## Goal Define the distribution platform's core data model and persistence layer once diff --git a/PLAN.md b/PLAN.md index 79a9d1b..b05f9a5 100644 --- a/PLAN.md +++ b/PLAN.md @@ -271,6 +271,27 @@ Milestone 1 is complete when: - The admin UI can inspect apps, releases, validations, tokens, and audit logs. - A Docker image can run on a UGREEN NAS with a persistent data volume. +## Milestone 1 — Flow Step ↔ Subplan Slice Mapping + +The flow decomposes subplan 02 (`.agents/subplans/02-domain-and-storage.md`) +Slice 1 into two steps. This records that decomposition so each step's scope is +verifiable from the repo: + +- **P2.1 — domain structs + boundary validation.** Delivers subplan-02 *Core + Structs* (App, Platform, Release, Artifact, Channel, AuditEvent) and the + *boundary validation* portion of Slice 1 — slug, version, channel name, + platform id, and required-field presence, each with a distinct typed error. + Per the PO ruling this includes `Release.published_at` and `Artifact.metadata`. + Code lives under `src/domain/`; the acceptance test is + `tests/domain_validate.sx`. +- **P2.3 — in-memory repository + persistence.** Delivers the rest of Slice 1: + the in-memory repository (create/list/get/update, find-by-slug, + find-artifact-by-digest) plus `db.json` persistence. +- **Token is in neither P2.1 nor P2.3.** Subplan 02 lists Token under *Core + Structs*, but its delivery slice is **Slice 5 — Token Security** (generation, + hashing at rest, scopes, expiration/revocation). It is out of the Slice-1 + steps above. + ## Non-goals For Version 1 - Public marketplace payments.