CodexImage to Editable PPT v2.2
Current execution and PPTX-only delivery override
Measure dispatch without perturbing it
Prepare all page-worker requests before dispatch. Issue the selected agent calls consecutively without intervening shell commands, output inspection, manual timestamp writes, or waits. Use only supported tool interfaces; do not invent a batch-spawn API. After dispatch, extract actual call/return timestamps from the session log with scripts/launch_diagnostics.py session --session-log LOG --call-ids ID1 ID2 ID3. This reads only event metadata and does not report prompts or reasoning.
Report separately: creation-tool duration, gaps between dispatch calls, and worker first-command delay where evidence exists. Legacy manual requested/returned markers include coordinator scheduling and are not creation-tool timing. Unknown queue/inference/network components remain unknown. Workers record their real start once; never change starts or insert barriers to manufacture overlap.
A short SHA256 probe is optional diagnostic work, not a mandatory preflight or a host-capacity gate. check reports observed workload overlap only. No overlap in a short test means concurrency was not demonstrated in that test; it does not prove a host limit, COM contention, or lack of parallel capability. Preserve missing events as incomplete evidence. Do not rerun expensive benchmarks merely to diagnose dispatch. Do not replace AI page agents with subprocess builders or promise that skill wording fixes model/service latency.
This section supersedes conflicting scheduling, confirmation, timing and output instructions below. V2.1 fidelity and editability gates remain applicable. Final delivery is ONE merged PPTX only.
- Mandatory preflight confirmation: present this run's page strategy (including common-masthead handling) and proposed exact page-worker count, then stop for explicit user confirmation before
prepareor dispatch. Do not substitute an announced default, a generic request to process images, or a prior run's authorization. A confirmation already given for this same unchanged preflight need not be repeated. Four to nine workers additionally require authorization for the required auxiliary task roots; exceeding the hardware recommendation requires a capacity override. - Create a unique run with
tempfile.mkdtemp(prefix="codex-v22-"). Put preflight at RUN/preflight.json and all prepared tasks at RUN/work. Treat everyoutputexample below as this temporary work directory, never as the user delivery directory. Do not useprepare --cleanon existing user folders. - Record request receipt, authorization, prepare, dispatch, worker start/finish, merge and publication with actual timestamps. Never estimate missing confirmation waits or initial overhead by subtracting an app screenshot duration. Report worker-start-to-merge separately from request-to-publication. Sum of worker durations is not a measured serial benchmark.
- Before dispatch, test Python imports and OCR languages once, then perform one real small PowerPoint rendering smoke test with the supplied validator in RUN. Resolve the baseline renderer once. Copy the verified environment commands to each task. Workers must not compile launchers, clone LibreOffice installations or independently repair COM/.NET. If baseline preview rendering is unavailable, use the supplied PowerPoint validator for that preview.
- Dispatch all selected page agents back-to-back before inspecting outputs. Workers mark start as their first action. Record dispatch times; investigate a missing start after 60 seconds without duplicating a running worker. Startup spread and completion-to-merge delay must be reported separately.
- Generate manifest rows from construction helpers while adding text, shapes and assets. Check fonts, text boxes, line breaks and bounds before rendering; collect all defects from each render and correct them together. Re-render only when the deck changes. Do not shrink text merely to clear an overflow counter. Two corrective rounds are a planning target, not a quality cutoff. Never guarantee 15 minutes per page without measurement.
- Inspect original versus rendered page and enlarged small charts/formulas. Reject raster-label residue, duplicate axes/text, damaged silhouettes, altered connectors/formulas, unsupported shadows and changed corner radii even when numeric thresholds pass. The actual visual review can overturn a programmatic pass.
- After approved PowerPoint rendering, run
scripts/parallel_v2_pages.py sync-evidence --task-json TASK/task.json. This shared helper archives the real preview, source/recomposed/diff, asset ZIP and recomposed deck and checks required paths. It does not write approvals or replace semantic/crop/quality review. Then runrecord. Keep full V2.1 evidence only as temporary validation input. - Start
watch-finalizeimmediately after dispatch and retain its process handle. Failed records are retryable and must not kill monitoring. On every worker completion, check records immediately: when all pass, verify the watcher is finalizing or runfinalizeif it exited. A timeout is resumable; restart monitoring while page work continues. A stopped agent with a failed page needs targeted repair or an honest blocker report. - Finish visual acceptance at page level before recording completion. Start
watch-finalize --outdir RUN/work --publish-pptx DELIVERY/NAME.pptxso successful structural finalization calls publication in the same process, without another coordinator turn. If recovering an already completed merge, usepublish --outdir RUN/work --pptx DELIVERY/NAME.pptxdirectly. Publication checks the finalization and source/destination hashes and refuses overwrites; its own hash check is the final saved-file verification. Report the PPTX immediately on success. Cleanup is not another acceptance gate: after agents and owned renderer processes finish, remove only the exact unique RUN directory after verifying it is a direct TEMP child named codex-v22-*. Preserve failed work for repair. Never remove the delivery directory or unrelated files. - Final output must contain only the merged
.pptx; do not copy logs, JSON, PNG previews, ZIPs, scripts or single-page decks there. Previously existing user files are not cleanup targets.
Purpose
Post-merge fast path (mandatory default)
Page-level rendering and visual review remain mandatory, including enlarged charts and formulas. Coordinator review of existing page previews, when needed, happens as pages complete, before merge; it must not queue a second full-deck review after all pages finish.
After an unchanged ordered OpenXML merge, run only the existing structural checks (count, source order, canvas, object fingerprints, accepted-page hashes) and publication hash verification. Do not reopen PowerPoint, rerender the full deck, rerun page validators, or regenerate previews, differences, ZIPs or manifests after a successful merge. Existing internal evidence is reused, not recreated for delivery.
Exception: a concrete merge integrity failure, a discovered visual defect, a changed page/theme/font/canvas, or an explicit user request can require targeted QA. Identify the affected pages and reason first. Correct and revalidate only affected pages, then merge again; do not waive a failed invariant to publish. Use the recorded task validation parameters, never unrelated default thresholds or thresholds relaxed merely to pass. Full-deck rerendering is justified only when every page is affected or the user asks for it.
Keep publication_seconds separate from merge_to_publish_start_seconds and merge_to_publication_seconds. The latter include structural checks and any scheduling gaps; they are not renderer time. Do not promise a fixed runtime from these rules.
Parallelize complete V2.1 page reconstruction without changing the V2.1 single-page algorithm or weakening its delivery contract.
- For one page, use
../codeximage-to-editable-ppt-v2-1/SKILL.mddirectly. - For two or three workers, use one Codex task tree and one page subagent per page.
- For four to six workers, require two independent Codex task trees; for seven to nine workers, require three. Obtain explicit user authorization before creating auxiliary tasks.
- Never replace page agents with ordinary subprocess builders. Subprocesses may run deterministic extraction, rendering, validation, timing, and merge utilities only.
- Never let two workers write the same PPTX, bundle, task record, render directory, or temporary directory.
The original V2.1 directory is canonical and remains unchanged. prepare verifies hashes of its SKILL.md and three required references, then copies a compact page contract into each isolated task.
Required reading
The primary coordinator must read completely, once:
../codeximage-to-editable-ppt-v2-1/SKILL.md../codeximage-to-editable-ppt-v2-1/references/refined_rebuild_workflow.md../codeximage-to-editable-ppt-v2-1/references/manifest_schema.md../codeximage-to-editable-ppt-v2-1/references/quality_review_workflow.mdreferences/parallel_v2_orchestration.md
Page workers read only their generated worker_request.md, copied page_worker_contract.md, source page, and task JSON. They must not reread the canonical skill or inspect another page task.
Unchanged per-page V2.1 contract
V2.2 clarification: preserve integrated scientific artwork
Classify arrows by their role, not merely their shape or location inside an image. Arrows, trajectories, points and non-text markers that form part of a scientific illustration remain together with that illustration as one coherent semantic_png. For example, preserve a potential-energy surface together with its force arrow, trajectory and state point. Do not erase those elements and redraw them separately: doing so can damage shading, shift anchors or duplicate paths.
Separate slide-level connectors, flowchart arrows, external axes and other independently editable simple structure remain native PowerPoint objects. All readable text and formulas, including labels inside an illustration, remain editable. An arrow inside a screenshot of an ordinary flowchart is still simple structure; a rectangular crop alone does not establish semantic unity.
This classification takes precedence over blanket instructions in the inherited V2.1 references to extract every arrow or subtract every geometric element. Record the integrated non-text components in the composite's decision_reason and review_note; they are intentional visual content, not simple-structure residue. Check source versus render for erasure scars, duplicate arrows, displaced endpoints and damaged internal shading. The copied page worker contract carries this rule to each agent; manifest guidance defines the residue fields.
Every page worker must independently complete all thirteen V2.1 steps:
- preserve the immutable source page;
- run baseline decomposition with OCR, overlay, and quality output;
- inspect the baseline artifacts;
- map and classify every visible object;
- build a deterministic refined one-slide PPTX from source coordinates;
- make all readable text editable;
- rebuild simple structure as native PowerPoint objects;
- retain only independent complex semantic visuals as PNG assets;
- apply the original V2.1 background-cleaning gate when required;
- generate and close all crop, semantic, and background audits;
- render the final PPTX through Microsoft PowerPoint and inspect it;
- write the complete V2.1 manifest, preview, diff, ZIP, and quality reports;
- pass the unchanged V2.1
validate_delivery.pyand the supplied terminal PowerPoint validator.
Parallel scheduling does not authorize scientific-chart exceptions, reduced manifests, omitted ZIPs, compact-only bundles, or relaxed text editability. The original V2.1 representation and review rules control every page.
Coordinator workflow
1. Read-only preflight
Use the configured project Python environment with the packages listed in
requirements.txt. Prefer an isolated Python 3 virtual environment.
Run preflight outside the formal output directory:
powershellpython scripts/parallel_v2_pages.py preflight page1.png page2.png page3.png ` --report run.preflight.json ` --intended-outdir output ` --available-worker-slots 3 ` --root-task-count 1 ` --powerpoint-worker-cap 3
Report page count, input hashes, dimensions, CPU, available memory, active PowerPoint processes, conservative worker recommendation, maximum available task-tree capacity, and whether a capacity override would be required.
Before asking, visually inspect the source pages and add a concise per-page strategy: page type, editable text, native structure, independent complex visuals, background handling, and quality risks. Hardware preflight alone is incomplete. Inspect repeated institutional headers, logos, gradients and header frames across pages; report candidate common-masthead groups, representative source page, normalized region, reusable components, and pages requiring individual handling. If none exist, state that explicitly. Do not claim automatic detection: the current hardware script does not perform this visual analysis.
For each common-masthead group, propose one standardized header using a named representative source page. Lock the same header height, gradient stops/angle, slanted geometry, logo bitmap/size, editable font family/size/weight, line spacing and absolute placement on the shared canvas. Minor differences between source pages are normalized within that confirmed group, not preserved independently. List intentional cover/section variants as separate groups for confirmation; never force unrelated brands into one header. Read references/shared_masthead.md before preparing grouped pages.
Preserve V2.1 representation rules: readable text stays editable, simple geometry stays native, and only independent complex artwork/logos stay raster. After confirmation build and render one header-only PPTX seed per group, then bind it with scripts/shared_masthead.py before dispatch. Actual frozen objects must be reused, not just a common prose specification. Do not create assets or page tasks before confirmation.
Stop and request explicit confirmation of:
- the page strategy, including common-masthead handling;
- the exact page-worker count (not CPU core count);
- the required auxiliary Codex tasks when selecting four to nine workers;
- any worker count above the conservative hardware recommendation.
Only set --confirmed --strategy-confirmed after the user approves this run's displayed plan and count. Changed inputs, strategy or count require renewed confirmation of the changed items. Preflight may use temporary inspection files but must not start baseline reconstruction or task preparation.
2. Prepare isolated tasks
powershellpython scripts/parallel_v2_pages.py prepare page1.png page2.png page3.png ` --outdir output ` --workers 3 ` --preflight-report run.preflight.json ` --confirmed ` --strategy-confirmed ` --clean
prepare verifies input order and hashes, extracts pages, creates one immutable page source and one private task directory per page, copies the compact V2.1 worker contract, and writes contiguous shard requests.
3. Dispatch all selected workers before waiting
- Spawn one page worker per assigned
worker_request.md, back-to-back. - For four to six workers, use two authorized task roots; for seven to nine workers, use three. Each root handles one contiguous shard.
- Do not silently execute sequential waves when the user selected higher concurrency.
- Retry only missing or failed pages. Preserve completed pages.
- Start
watch-finalizeimmediately after dispatch so merging begins as soon as all page records pass.
4. Worker completion
Each worker follows its generated commands:
textmark-start -> baseline -> mark-baseline -> complete V2.1 refined bundle -> Microsoft PowerPoint terminal validation -> record
record independently reruns the unchanged V2.1 delivery validator and checks the complete bundle, one-slide PPTX, source ratio, Microsoft PowerPoint terminal report, final render, zero text overflow, and zero off-slide shapes.
5. Finalize
powershellpython scripts/parallel_v2_pages.py watch-finalize --outdir output --publish-pptx DELIVERY/NAME.pptx
Only completed, hash-verified one-page decks are merged. Use deterministic OpenXML copying in original source order. Validate:
- final slide count and order;
- page shape counts before and after merge;
- target canvas consistency;
- worker-result hashes;
- bound shared-masthead object/style/asset fingerprints and reserved header-region clearance, before and after merge;
- complete V2.1 page and terminal validation status;
- observed worker overlap and peak concurrency.
Do not run multiple PowerPoint instances for the merge. Page rendering is private and PID-owned; final merge is OpenXML-only.
With --publish-pptx, a successful merge is published immediately in the same process. A failed finalization never publishes. Do not insert an additional full-deck visual-acceptance stage here.
Concurrency truth gate
For worker intervals d_i, earliest start S, latest finish F, and merge finish M:
textsequential_equivalent = sum(d_i) worker_wall_time = F - S measured_speedup = sequential_equivalent / worker_wall_time worker_start_to_merge = M - S required_peak = min(selected_workers, page_count)
Require observed_peak_concurrent_workers >= required_peak. If the selected workers did not overlap, report review_required; never describe sequential waves as successful parallelism.
Timing and quality are separate. A timing miss must not lower V2.1 quality or delete diagnostics.
Output contract
The following tree is the INTERNAL TEMPORARY work root. Only the merged PPTX is published:
textoutput/ |-- merged_v2_1_refined_editable.pptx |-- parallel_v2_manifest.json |-- parallel_timing_report.json |-- parallel_v2_finalization.json |-- page_tasks/ | `-- <page_uid>/ | |-- source_page.* | |-- baseline_v21/ | |-- <page_uid>_refined_editable.pptx | |-- refined_v21_output/ | |-- terminal_powerpoint_validation/ | |-- page_worker_contract.md | |-- worker_request.md | `-- worker_result.json `-- shards/
Keep page bundles in the temporary run until publication passes; then clean the owned temporary run. Deliver only the merged PPTX.
Failure rules
- Fail before dispatch when preflight confirmation, input hashes, canonical V2.1 hashes, task capacity, or output isolation is invalid.
- Fail a page when its V2.1 bundle is incomplete,
validate_delivery.pyis nonzero, terminal renderer is not Microsoft PowerPoint, its terminal render was not visually inspected, or overflow/off-slide counts are nonzero. - Fail finalization when page order, slide count, shape counts, accepted PPTX hashes, or observed concurrency is inconsistent.
- Do not merge failed pages and do not claim partial output as complete.
Read references/page_worker_contract.md for the compact page contract and references/parallel_v2_orchestration.md for the execution graph and multi-root rules.


