diff --git a/WIZARD_AUTOMATION_ROADMAP.md b/WIZARD_AUTOMATION_ROADMAP.md index e01fbdaf..ac8c505e 100644 --- a/WIZARD_AUTOMATION_ROADMAP.md +++ b/WIZARD_AUTOMATION_ROADMAP.md @@ -493,25 +493,55 @@ Agent Mode complete prematurely. - Two-level task navigation and the embedded Wizard sidebar: landed in #104; keep navigation presentation separate from the factual action runner. -### Post-#115 handoff (#116–#119) +### Post-#120 handoff (#116–#120) -- #117 (Studio configuration slice) is open and green. It moves typed Studio - form/configuration state into `studioConfigurationSlice` while leaving - `startGeneration` and Tools execution in `useStore`. -- #118 (Story Lab production controller) is open and green. It moves the +PRs #116 through #120 are merged into `main`, with their required CI checks +green at merge. This is the accepted state, not a prediction about a branch +whose checks are still running: + +- #116 (documentation after #115) merged as `215ad2a`. +- #117 (Studio configuration slice) merged as `bfd4e9d`. It moves typed + Studio form/configuration state into `studioConfigurationSlice` while + leaving `startGeneration` and Tools execution in `useStore`. +- #118 (Story Lab production controller) merged as `e545836`. It moves the Story Lab → Director production handoff into `storyProductionController.ts` for film/trailer and music-video flows. -- #119 (exact Story song → music-video identity/provenance) remains open and - under review. Its critical simulated E2E passed. The opt-in real smoke - generated the song and an H264/AAC video of 19.75 seconds; the harness first - gave a false negative after selecting a lateral `Untitled story` project, - and selection by exact requested title has since been corrected. CI and - Cursor checks for #119 were still in progress at this writing, so this PR - must not be called finished. - -Recommended integration order is **#116 → #117 → #118 → #119**. Residual -risks are the semantically generic lyrics observed in the real smoke and the -separate investigation of concurrent conversation `409` conflicts. +- #119 (exact Story song → music-video identity/provenance) merged as + `4bc7376`. Its simulated E2E and Cursor checks passed; the opt-in real smoke + generated the song and an H264/AAC video of 19.75 seconds. The first smoke + false negative selected a lateral `Untitled story` project; exact-title + selection is now part of the accepted flow. +- #120 (code-quality trend score) merged as `658a1c3`. The current score is + **48.7/100**: complexity **52.1**, concentration **53.3**, oversized-file + health **28.5** and modularity **62.2**, a **+2.2** change against the + historical committed baseline. This score is diagnostic, not a CI blocker + or quality certificate; the existing ratchet remains the guardrail. + +The next queue is deliberately ordered as: Series → Comics exact provenance; +Wizard conversation `409` recovery; semantic song/lyrics fidelity; a second +`useStore` generation slice; Story Lab session-controller extraction; the next +backend domain router; typed Director `PipelineRuntime`; the presentation +decision gate followed by visible Wizard magic; and release validation. The +canonical packet details live in +[`docs/development/SLICE_QUEUE.md`](docs/development/SLICE_QUEUE.md). + +### Low-cost delegation protocol + +When work is orchestrated from Codex/ChatGPT, the lead agent must delegate +each bounded implementation packet to `luna_worker`, configured by +`luna-worker.toml`. This is a workflow convention and is not a dependency of +the HocusPocus product. Every packet must contain the branch base, owned and +forbidden files, contracts/invariants, tests/commands, expected PR and stop +conditions. Luna makes one bounded PR and does not merge it; the lead reviews +the diff, quality score and CI before human merge. At most one open PR may +touch each hot file (`_launch_runtime.py`, `useStore`, `agentActions`). If +Luna is unavailable, the lead executes the packet or asks for direction; it +must not silently replace Luna with a broad uncontrolled agent. + +Reusable header for future packets: + +> **Execution context: Codex/ChatGPT — delegate the bounded implementation to +> `luna_worker`; lead coordinates and reviews.** ## Continuity note @@ -524,8 +554,8 @@ chain and missing lyrics are composed into the UI in the requested language. The UI form, not the chat prose, is authoritative for prompts, lyrics and instrumental mode. #119 now binds every step to exact project, cue, candidate, production, task and pipeline IDs and fixes the smoke harness to select the -requested title exactly. Resume the migration from the first remaining -unmigrated capability after #119's checks complete and the separate -conversation-concurrency risk is reviewed. +requested title exactly. Resume the migration at the ordered post-#120 queue +in `docs/development/SLICE_QUEUE.md`; do not call the quality score a gate and +do not claim a future PR or CI run is complete until it is actually complete. Keep Decision gate A open; visible focus/fill/sparkle choreography remains the final presentation phase. diff --git a/docs/development/SLICE_QUEUE.md b/docs/development/SLICE_QUEUE.md index 6abefc99..de8712e8 100644 --- a/docs/development/SLICE_QUEUE.md +++ b/docs/development/SLICE_QUEUE.md @@ -15,9 +15,9 @@ Canonical sources in git: Working notes under `comunicaciones/` are session handoff only. They are gitignored and are not canonical. -## Landed on main (as of #115) +## Landed on main (as of #120) -`main` points at merge #115 (`69f57fe`, 2026-09-03). The queue below records +`main` points at merge #120 (`658a1c3`, 2026-09-03). The queue below records what is present in that tree; the numbered history is kept so earlier slice decisions are not rewritten. @@ -103,34 +103,35 @@ uses `--check --markdown`. virtualization share a viewport cap, including vertical-resize invalidation, so cards stay usable inside the feed. -## Open integration queue (#116–#119) +## Integrated slices (#116–#120) -These PRs are open against the #115 `main` baseline; the following status is -the state at the time of writing, not a claim that any of them has landed. +All five PRs are merged into `main` and their required CI checks were green at +merge. The merge commits are recorded here so a handoff never confuses a +prepared branch or an in-progress check with an accepted change. -- **#116 — this documentation update:** the queue and Wizard roadmap record - the state after #115 and the recommended merge order. -- **#117 — Studio configuration slice:** open and green. The typed +- **#116 — documentation after #115:** merged as `215ad2a`; refreshed the + queue and Wizard roadmap for the post-#115 state. +- **#117 — Studio configuration slice:** merged as `bfd4e9d`. The typed `studioConfigurationSlice` owns Studio form/configuration state while `startGeneration` and Tools execution stay in `useStore`; the public facade - and architecture coverage remain intact. The PR reduces `useStore.ts` from - 10,239 to 9,741 lines. -- **#118 — Story Lab production controller:** open and green. The + and architecture coverage remain intact. The extraction reduces + `useStore.ts` from 10,239 to 9,741 lines. +- **#118 — Story Lab production controller:** merged as `e545836`. The `storyProductionController.ts` owns Story Lab → Director production handoff for film/trailer and music-video flows, including model/reference/audio - preparation. The PR reduces `StoryLabPanel.tsx` from 4,688 to 4,395 lines - without touching `useStore.ts` or `_launch_runtime.py`. -- **#119 — exact Story song → music-video identity/provenance:** open and - still under review. The critical simulated E2E passed. An opt-in real smoke - generated the requested song and an H264/AAC video of 19.75 seconds, but the - harness initially reported a false negative after selecting a lateral - `Untitled story` project; selection by exact requested title has now been - corrected. #119's CI and Cursor checks are still in progress and it must not - be described as finished yet. - -Recommended integration order: **#116 → #117 → #118 → #119**. Keep #119's -remaining checks and the corrected exact-title smoke evidence attached to the -final review. + preparation. The extraction reduces `StoryLabPanel.tsx` from 4,688 to 4,395 + lines without touching `useStore.ts` or `_launch_runtime.py`. +- **#119 — exact Story song → music-video identity/provenance:** merged as + `4bc7376`, with simulated E2E and Cursor checks green. The opt-in real smoke + generated the requested song and an H264/AAC video of 19.75 seconds. The + harness's initial false negative came from selecting a lateral `Untitled + story` project; exact-title selection is now covered by the accepted flow. +- **#120 — code-quality trend score:** merged as `658a1c3`. The current + aggregate is **48.7/100**: complexity **52.1**, concentration **53.3**, + oversized-file health **28.5**, and modularity **62.2**; this is **+2.2** + against the historical committed baseline. It is a diagnostic trend signal, + not a CI blocker or quality certificate; the existing ratchet remains the + guardrail. CI publishes the score and comparison in PRs. ## Queue history (original order, statuses updated) @@ -155,31 +156,42 @@ final review. and the final identity checks still remain. 3D+Director already has folder-vs-Workspace provenance (#89). -## Next medium PRs after integrating #116–#119 - -1. **Series → Comics provenance.** Apply the same exact-ID contract used by - #119 to the remaining cross-domain handoff, with persisted project, - production, run, task and output references and no title lookup after an ID - has been returned. -2. **Remaining `useStore` generation slice.** #117 moves Studio - configuration only. Extract one cohesive remaining generation or - Director-orchestration slice behind the public facade, with architecture - coverage; do not move all of `startGeneration` in one PR. -3. **Remaining Story Lab coordination.** #118 moves production handoff into - a controller. Continue reducing the residual `StoryLabPanel` hotspot - (~4,395 lines on the #118 branch) through hooks/controllers while - preserving extracted tabs, language catalogs and canonical IDs. Do not - re-extract `StoryAssemblyTab`, `StoryLabLibraryChrome` or Assets. -4. **Backend domain router.** Choose the next complete domain boundary from - the route inventory, extract its router and services in one cohesive PR, - preserve route ordinals, and keep at most one pending PR on - `_launch_runtime.py`. -5. **Director Paso 5.** Wait for a human release-order decision. Start with - typed `5.0` `PipelineRuntime`, then one complete function/contract per PR; - do not begin by splitting the file by line count. -6. **Visible Wizard magic expansion.** The Studio → Video prototype and - semantic anchors already exist. Review its pace, focus, reduced-motion and - interruption behavior before extending presentation effects to other Labs. +## Next medium PRs after #120 + +Keep these as separate, reviewable slices in this order. Each item has one +verifiable contract and should be prepared only after the previous item's +hotspot and CI state are known. + +1. **Series → Comics exact provenance.** Apply the #119 exact-ID contract to + the remaining cross-domain handoff, preserving project, production, run, + task and output references; never fall back to title lookup after an ID is + returned. +2. **Wizard conversation `409` recovery.** Make concurrent conversation + writes merge/retry safely, preserve turns across workspace changes and + reloads, and add a focused conflict test without hiding a real failure. +3. **Semantic song/lyrics fidelity.** Keep the selected user language for + authored lyrics and preserve quoted-language spans in provider prompts; + add semantic assertions to the opt-in music/video smoke rather than + treating a valid media file as proof of content quality. +4. **Second `useStore` generation slice.** Extract one cohesive remaining + generation/orchestration boundary behind the public facade, with architecture + coverage. Do not move all of `startGeneration` in one PR. +5. **Story Lab session controller.** Continue extracting session/state + coordination from the residual `StoryLabPanel` hotspot through hooks or a + controller, without re-extracting existing tabs, chrome or Assets. +6. **Next backend domain router.** Select one complete domain boundary from + the route inventory, move its router and services together, preserve route + ordinals and keep at most one pending PR on `_launch_runtime.py`. +7. **Typed Director `PipelineRuntime`.** After the human release-order check, + introduce the typed runtime contract and migrate one complete function or + lifecycle at a time; do not split the file by line count. +8. **Decision gate, then visible Wizard magic.** Review the presentation + contract (pace, focus, auto-scroll, reduced motion and interruption) before + expanding the Studio → Video prototype's semantic anchors, field replay and + sparkles to other Labs. +9. **Release validation.** Run the safe full suite, browser Wizard flows, + quality-score comparison and explicitly opt-in local/provider smoke; record + artifact IDs and do not call a branch or CI complete while checks run. ## Residual risks to track separately @@ -203,3 +215,21 @@ final review. - Only one pending PR may touch `_launch_runtime.py`. Only one pending PR may touch `useStore.ts`. Independent PRs may proceed in parallel when files do not overlap. + +## Low-cost delegation protocol + +When work is orchestrated from Codex/ChatGPT, the lead agent delegates each +bounded implementation packet to `luna_worker` (configured by +`luna-worker.toml`). This is an engineering workflow convention, not a +product dependency. A packet must name the branch base, owned and forbidden +files, contracts/invariants, tests/commands, expected PR and stop conditions. +Luna makes one bounded PR and never merges it; the lead reviews the diff, +quality score and CI before asking a human to merge. Keep at most one open PR +per hot file (`_launch_runtime.py`, `useStore`, `agentActions`). If Luna is +unavailable, the lead executes the packet or asks for direction; it must not +silently substitute a broad uncontrolled agent. + +Reusable packet header: + +> **Execution context: Codex/ChatGPT — delegate the bounded implementation to +> `luna_worker`; lead coordinates and reviews.** diff --git a/planmejora.md b/planmejora.md index 0844e6c1..1ade1761 100644 --- a/planmejora.md +++ b/planmejora.md @@ -402,23 +402,70 @@ Comprobaciones finales: - ningún launcher de Pinokio fue modificado; - el worktree rastreado queda limpio y se preservan los documentos locales del usuario. -### Actualización posterior — PRs #116–#119 - -El estado actual se mantiene en `main` hasta #115 mientras estos PRs siguen -abiertos. La integración recomendada es **#116 → #117 → #118 → #119**: - -- #116 actualiza la cola de slices y este relevo documental. -- #117, abierto y verde, extrae la configuración de Studio a - `studioConfigurationSlice` y deja `startGeneration` en `useStore`. -- #118, abierto y verde, extrae el handoff de producción Story Lab → Director - a `storyProductionController.ts`. -- #119 sigue abierto y bajo revisión. El E2E crítico simulado pasó. El smoke - real opt-in generó correctamente la canción y un vídeo H264/AAC de 19.75 s. - El harness dio primero un falso negativo al elegir el proyecto lateral - `Untitled story`; ya se corrigió seleccionando por el título exacto pedido. - CI y Cursor seguían en curso al redactar y #119 no debe marcarse como - terminado. - -Riesgos residuales separados: la letra del smoke real fue semánticamente -genérica, aunque el medio y su cadena de identidad fueron correctos; los `409` -de conversación por concurrencia requieren una investigación independiente. +### Actualización posterior — PRs #116–#120 + +El estado vigente es `main` en el merge de #120 (`658a1c3`, 2026-09-03). +Los PRs #116–#120 están mezclados y sus comprobaciones requeridas quedaron en +verde al hacer merge: + +- #116 (documentación tras #115) se mezcló como `215ad2a`. +- #117 (slice de configuración de Studio) se mezcló como `bfd4e9d`; extrae + `studioConfigurationSlice` y mantiene `startGeneration` en `useStore`. +- #118 (controlador de coordinación de Story Lab) se mezcló como `e545836`; + extrae el handoff Story Lab → Director a `storyProductionController.ts`. +- #119 (identidad/procedencia exacta canción de Story → videoclip) se mezcló + como `4bc7376`; pasaron el E2E simulado y Cursor. El smoke real opt-in + generó canción y vídeo H264/AAC de 19,75 s. El falso negativo inicial se + debió a seleccionar un `Untitled story` lateral; la selección por título + exacto quedó corregida y cubierta. +- #120 (tendencia de calidad de código) se mezcló como `658a1c3`. La foto + actual es **48,7/100**: complejidad **52,1**, concentración **53,3**, + ficheros sobredimensionados **28,5** y modularidad **62,2**; **+2,2** frente + al baseline histórico comprometido. Es un diagnóstico, no un bloqueo de CI + ni un certificado de calidad; el ratchet existente sigue siendo el guardarraíl. + +Las notas anteriores de este documento son históricas. La siguiente cola +operativa, en orden, es: + +1. Procedencia exacta Series → Comics. +2. Recuperación de conflictos `409` de conversaciones del Wizard. +3. Fidelidad semántica de canción y letras. +4. Segundo slice de generación de `useStore`. +5. Extracción del controlador de sesión de Story Lab. +6. Siguiente router de dominio backend. +7. `PipelineRuntime` tipado en Director. +8. Puerta de decisión y, después, magia visual del Wizard. +9. Validación de release. + +### Protocolo canónico de delegación de bajo coste + +Cuando el trabajo se orqueste desde Codex/ChatGPT, el agente líder debe +delegar cada implementación acotada a `luna_worker` (configurado mediante +`luna-worker.toml`). Es una convención de trabajo de ingeniería, no una +dependencia del producto. Cada paquete para Luna debe incluir: + +- base de la rama; +- ficheros propios y ficheros prohibidos; +- contratos e invariantes; +- pruebas y comandos; +- PR esperado; +- condiciones de parada. + +Luna hace un único PR acotado y no lo mezcla. El líder revisa el diff, el score +de calidad y CI antes de que una persona mezcle el PR. Debe haber como máximo +un PR abierto por fichero caliente (`_launch_runtime.py`, `useStore`, +`agentActions`). Si Luna no está disponible, el líder ejecuta la tarea o pide +dirección; no lo sustituye silenciosamente por un agente amplio y sin límites. + +Encabezado reutilizable para los siguientes paquetes: + +> **Execution context: Codex/ChatGPT — delegate the bounded implementation to +> `luna_worker`; lead coordinates and reviews.** + +No se debe declarar terminado un PR o una CI mientras esté solamente preparado, +pendiente de revisión o ejecutándose. + +Riesgos a resolver en los siguientes bloques: la letra del smoke real fue +semánticamente genérica, aunque el medio y su cadena de identidad fueron +correctos; los `409` de conversación por concurrencia son una investigación +separada y no deben mezclarse con la garantía de procedencia de #119.