| 1 | --- |
| 2 | description: Main-pipeline control stage for resuming execution in a fresh chat after planning completed. |
| 3 | --- |
| 4 | |
| 5 | # Resume Execute Stage |
| 6 | |
| 7 | > Generate-PPTX control stage for a fresh execution session. Run when [`generate-pptx`](../generate-pptx.md) Step 1–5 completed in a previous chat and the user wants to continue with SVG generation + export. Loads project state from disk and runs Step 6 + Step 7 inside the already selected Generate route. |
| 8 | |
| 9 | This stage is **context-independent**: it owns the execution session starting from a fresh chat — no upstream conversation context required. Persisted project artifacts replace the planning session's confirmation dialogue and image-acquisition history. |
| 10 | |
| 11 | `validation/workflow.log` is a cold command/outcome audit log with optional |
| 12 | important manual entries, not persisted planning state. Do not open or replay |
| 13 | it while resuming. Use the real artifacts in Step 1 to establish current state; |
| 14 | inspect the log only when the user explicitly asks to review the prior run. Run |
| 15 | inherited Python commands normally; their shared CLI bootstrap records a |
| 16 | bounded material outcome selection automatically, not the full console stream. |
| 17 | |
| 18 | ## When to Run |
| 19 | |
| 20 | The user opens a new chat and gives a phrase that names a project path and signals continuation. Recognize any of: |
| 21 | |
| 22 | | Pattern | Example | |
| 23 | |---|---| |
| 24 | | "继续生成 projects/<project_name>" | "继续生成 projects/ppt169_joe_hisaishi" | |
| 25 | | "resume execution projects/<project_name>" | "resume execution projects/ppt169_joe_hisaishi" | |
| 26 | | Project path + any "继续 / 恢复 / 继续做 / 接着做" semantic | "把 projects/ppt169_joe_hisaishi 继续做完" | |
| 27 | |
| 28 | **Prerequisite**: the planning session must have completed in the named project. Verified by file presence in Step 1; do NOT auto-trigger planning on missing state. |
| 29 | |
| 30 | --- |
| 31 | |
| 32 | ## Step 1: Sanity check |
| 33 | |
| 34 | Verify the project's planning-session artifacts before doing anything else: |
| 35 | |
| 36 | | File / Directory | Required when | Reason | |
| 37 | |---|---|---| |
| 38 | | `<project_path>/spec_lock.md` | Always | Strategist's execution anchors and routing contract; read it completely once in this fresh execution context | |
| 39 | | `<project_path>/design_spec.md` | Always | Complete approved design narrative and Section IX page outline; read it completely once in this fresh execution context | |
| 40 | | `<project_path>/images/` plus files whose row status requires existence | `spec_lock images` references any image | `Existing` / `Generated` / `Sourced` / `Rendered` files must exist; an absent `Needs-Manual` file remains allowed until the Step 7 readiness gate | |
| 41 | | `<project_path>/templates/` | `spec_lock page_layouts` references any | Layout / mirror prototypes required by execution | |
| 42 | | `skills/ppt-master/templates/charts/` | `spec_lock page_charts` references any | Shared chart SVGs selected by key | |
| 43 | |
| 44 | If any required artifact is missing, report it and stop this stage. Do not enter Step 6 or invent a replacement artifact. Recover by artifact owner: |
| 45 | |
| 46 | - Missing `design_spec.md` / `spec_lock.md` → use [`failure-recovery.md`](../governance/failure-recovery.md) §3. |
| 47 | - Missing `images/`, or a file whose status requires existence → recover by provenance: an `Acquire Via: user` / `Status: Existing` file is a required manual artifact, so use `failure-recovery.md` §2 and wait for the user to restore that exact file; a template-bundled bitmap returns to [`generate-pptx`](../generate-pptx.md) Step 3 to restore the selected workspace; an AI, web, formula, or slice output uses its matching row in `failure-recovery.md` §1 to reacquire, rerender, or derive it. An absent `Needs-Manual` file is not a Step 1 failure. |
| 48 | - Missing `templates/` inputs → restore the selected workspace through [`generate-pptx`](../generate-pptx.md) Step 3 and [`apply-template-workspace`](apply-template-workspace.md). If the workspace is unavailable or invalid, run Create Template again rather than reconstructing a template inside this stage. |
| 49 | |
| 50 | --- |
| 51 | |
| 52 | ## Step 2: Load the Generate authority, proceed from Step 6 |
| 53 | |
| 54 | ``` |
| 55 | Read skills/ppt-master/workflows/generate-pptx.md |
| 56 | ``` |
| 57 | |
| 58 | Then jump to `### Step 6: Executor Phase` and run the documented pipeline: |
| 59 | |
| 60 | - Read the complete project Design Spec, then the complete `spec_lock.md`, once to establish the fresh execution context |
| 61 | - Resolve the effective Speaker Notes, Custom Animations, and Narration Audio |
| 62 | outcomes from `design_spec.md §I`. Missing outcomes use the workflow defaults |
| 63 | `enabled` / `disabled` / `disabled`; these production decisions never come |
| 64 | from `spec_lock.md` |
| 65 | - If resuming mid-deck, read the latest completed SVG and current image metadata when images are used |
| 66 | - Read the complete Step 6 always-on core exactly as listed in [`generate-pptx.md`](../generate-pptx.md); for custom directions, reload every optional `*_references` file from `spec_lock.md` before applying the behavior, then only the branches selected by the condition table |
| 67 | - Design Parameter Confirmation |
| 68 | - When structured, read the template Design Spec and each selected prototype once; retain unchanged references in the fresh context. A later bounded repair follows [`executor-base.md`](../../references/executor-base.md) §2.1 only while that context remains valid and uncompacted |
| 69 | - Generate pages sequentially from the retained planning artifacts. Use `page-context` only for the on-demand diagnostic/telemetry triggers in Executor §2.1, never as a routine pre-page load |
| 70 | - Quality Check Gate |
| 71 | - Speaker notes generation only when the effective Speaker Notes outcome is enabled |
| 72 | - Conditional custom-animation handling under the effective outcome, |
| 73 | provenance, explicit instruction, and existing-sidecar rules |
| 74 | - Step 7: Post-processing & Export (conditional `total_md_split` → `finalize_svg` |
| 75 | → `svg_to_pptx`; disabled speaker notes use `--no-notes`) |
| 76 | - After the base export, run `generate-audio` when the effective Narration Audio |
| 77 | outcome is enabled; narration implies speaker notes are enabled |
| 78 | |
| 79 | Reload the Generate authority and required execution references; do not reconstruct or replay the earlier planning conversation. |
| 80 | |
| 81 | If the user gives a newer explicit instruction after final Stage 2, update only the |
| 82 | affected effective outcome and provenance in `design_spec.md §I`, then resume at |
| 83 | its owning step. Do not reopen Confirm UI or add the decision to |
| 84 | `spec_lock.md`. Before writing, apply Generate's single notes/audio dependency |
| 85 | gate; at export, apply its sidecar suppression rules. |
| 86 | |
| 87 | **Source verification**: the execution session is fresh. Read only the relevant `sources/` passages needed to resolve explicit `Fact IDs` / source references or verify facts, quotes, names, and data required by the current §IX block. Follow [`executor-base.md`](../../references/executor-base.md) §2.1's content-vs-expression contract; source verification never authorizes a second outline. If §IX lacks executable content or evidence, stop and return to Generate Step 4 for Design Spec repair. |
| 88 | |
| 89 | > Note: this stage does NOT duplicate Step 6 / Step 7 content. `generate-pptx.md` is the authoritative procedure; resume-execute only adds the resumption entry, sanity check, and source-verification guidance. |
| 90 | |
| 91 | --- |
| 92 | |
| 93 | ## Step 3: Hand-back |
| 94 | |
| 95 | When Step 7 completes and `exports/<project_name>_<timestamp>.pptx` is produced, the stage ends. Report the export path to the user. |
| 96 | |
| 97 | If the deck contains data charts, the [`verify-charts`](verify-charts.md) stage runs between Step 6 and Step 7 as documented in [`generate-pptx`](../generate-pptx.md); resume mode handles it the same way as continuous mode. |
| 98 |