diff options
Diffstat (limited to 'docs/superpowers/plans/2026-09-20-artifact-pipeline-implementation.md')
| -rw-r--r-- | docs/superpowers/plans/2026-09-20-artifact-pipeline-implementation.md | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/docs/superpowers/plans/2026-09-20-artifact-pipeline-implementation.md b/docs/superpowers/plans/2026-09-20-artifact-pipeline-implementation.md new file mode 100644 index 0000000..e1cb4e6 --- /dev/null +++ b/docs/superpowers/plans/2026-09-20-artifact-pipeline-implementation.md @@ -0,0 +1,49 @@ +# Artifact Pipeline Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Complete the typed artifact pipeline from the shared contract through the Blender CLI, server SSE, and browser manifest link. + +**Architecture:** Keep `SomhairlesDream.Shared` as the wire contract, put deterministic artifact writing and Blender invocation in `SomhairlesDream.Modeling`, expose it through a thin CLI, and have the ASP.NET server run the same pipeline asynchronously. Preserve the existing replay store and UI path. + +**Tech Stack:** F#/.NET 8, ASP.NET Core minimal APIs, `System.Text.Json`, `System.Diagnostics.Process`, xUnit, Blender Python fixture. + +--- + +### Task 1: Align contracts and lifecycle validation + +**Files:** `src/SomhairlesDream.Shared/Artifact.fs`, `src/SomhairlesDream.Modeling/Definitions.fs`, `src/SomhairlesDream.Server/Store.fs`, and the corresponding Shared/Modeling/Server tests. + +- [ ] Add checkpoint `TotalSteps` and serialize it as flat camel-case JSON. +- [ ] Make design object IDs cumulative snapshots and require completion only after all ordered checkpoints. +- [ ] Verify focused tests and keep legacy `RunStore` behavior unchanged. + +### Task 2: Implement the Blender bridge and CLI + +**Files:** `src/SomhairlesDream.Modeling/BlenderBridge.fs`, `src/SomhairlesDream.Cli/Program.fs`, `stage/blender/fixture.py`, project files, and CLI/Modeling tests. + +- [ ] Add a process bridge using `ProcessStartInfo.ArgumentList`, bounded to 120 seconds, with structured result/error handling, an explicit result file, and retained stdout/stderr logs. +- [ ] Add the deterministic `bpy` fixture with step validation, object custom properties, GLB reimport verification, and optional PNG render. +- [ ] Add CLI `run` and `verify` exit-code behavior and test fake-bridge/argument paths. + +### Task 3: Wire server execution and SSE + +**Files:** `src/SomhairlesDream.Server/Program.fs`, `src/SomhairlesDream.Server/Store.fs`, server project/tests. + +- [ ] Add the Modeling reference and launch the same pipeline in a background task. +- [ ] Implement exact-run start, SSE, manifest, artifact, validation, conflict, and 404 responses. +- [ ] Add one-second stale observation without changing lifecycle status. + +### Task 4: Update browser and solution wiring + +**Files:** `src/SomhairlesDream.Frontend/App.fs`, `public/index.html`, `public/App.js`, and `SomhairlesDream.sln`. + +- [ ] Start a selected run, subscribe to its exact SSE stream, and expose `artifact-manifest-link` only on completion. +- [ ] Preserve replay behavior and the existing `Uint32BufferAttribute` mesh path. +- [ ] Include Modeling and CLI projects in the solution. + +### Task 5: Verify and publish + +- [ ] Run all project tests and builds. +- [ ] Run the real `bpy 5.0.1` integration and CLI verification, then server/browser checks. +- [ ] Review status/diff, commit only scoped project files, publish to the authorized bare repository, and verify `git ls-remote` plus cgit. |
