From 90d920c8d976c301f4281140db19b0ed0d796a21 Mon Sep 17 00:00:00 2001 From: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> Date: Thu, 29 Oct 2026 23:24:28 +0900 Subject: [PATCH 01/13] feat(html-output-mode): HTML deck output with reveal.js (phase 1) (#440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * โจ feat(html-output-mode): add deck.json outputFormat and init_deck_workspace(output_format) deck_output_format() / OUTPUT_FORMATS in engine/schema; validate_specs errors on a bad outputFormat and adds "outputFormat": "html" to the result only for HTML decks. api.init / init_deck_workspace / CLI init_deck_workspace --output-format write the field only for html; PPTX deck.json and check_specs results are unchanged. Verified: SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/test_deck_spec.py tests/test_tool_descriptions.py tests/test_entry_tools.py tests/test_cli_contract.py -q (83 passed) SPEC: 20261029-1619_html-output-mode Progress: tasks 4.1 (init part, outputFormat field) Next: FEAT-001 template conversion (tasks 1.1-1.6) * โจ feat(html-output-mode): convert pptx templates to theme.css, template.json and decoration SVGs New core package sdpm/sdpm/engine/html/: textstyle.py resolves placeholder text styles through layout -> master placeholder -> txStyles -> defaultTextStyle; decorations.py computes decoration boxes/kinds and layout grounds from the XML and renders decoration-only SVGs via LibreOffice PDF + pdftocairo with a sentinel ground (stripped, together with the PDF page underlay); template.py builds theme.css / template.json, caches them per content hash and prefers the bundled artifacts. Missing LibreOffice/poppler only drops the decorations (decorations_status in the preview_unavailable shape). Bundled artifacts for blank-light / blank-dark under sdpm/templates/html/, generated by scripts/build_bundled_template_html.py (drift-guarded by tests). Verified: SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/test_deck_spec.py tests/test_html_template.py tests/test_architecture.py tests/test_entry_tools.py -q (175 passed, LO-gated render test ran locally); uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/ -q (1270 passed, 26 skipped) SPEC: 20261029-1619_html-output-mode Progress: tasks 1.1-1.6 (template conversion, bundled artifacts, tests) Next: FEAT-002 (reveal.js vendoring + HTML assembly) * โจ feat(html-output-mode): assemble offline reveal.js output.html with static checks Vendor reveal.js 6.0.2 under sdpm/vendor/revealjs (MIT, update procedure in sdpm/vendor/README.md, VENDOR_DIR anchor, THIRD-PARTY-LICENSES entry). engine/html/assemble.py builds one self-contained output.html (style :root, theme.css, one decoration SVG background per used layout, deck.css once, slide styles nested under section[data-slug], inline SVG icons and data-URI images, slide-number/footer chrome, inline reveal.js + notes plugin). engine/html/check.py adds the browser-free checks (--fs-* lint for slides and deck.css, structure, data-layout, script, external-url, data-background, self-chrome, :root, data-slug) and the html preview note. sdpm.api gains generate_html / refresh_html; affected_slugs(..., html=True) treats specs/art-direction.html and deck.css as deck-wide. Verified: targeted pytest (html_assemble/check/api, render_scope) 79 passed; uv run make lint clean; full suite 1341 passed, 26 skipped. SPEC: 20261029-1619_html-output-mode Progress: tasks 2.1-2.4, 2.6, 3.1, 3.2, 3.4 (3.3 helper html_preview_unavailable) Next: FEAT-003 role documents (composer-html.md, slide-html-spec.md, orchestrator) * ๐ docs(html-output-mode): add composer-html role document and slide HTML guide Add workflows/composer-html.md (composer html mode, layout pass writes deck.css + frames + empty data-region boxes) and guides/slide-html-spec.md; orchestrator picks HTML only on explicit request / @format:html and passes mode in the spawn prompt; ACP composer prompt and server instructions name start_composing(deck_id, assigned_slugs, mode); import-pptx, hand-edit-sync and translate say PPTX decks only; principles.md rule 4 and AGENTS.md describe one document per composer mode chosen by the spawner. composer.md is unchanged. Verified: pytest test_reference/test_acp_agent_definitions/ test_tool_descriptions/test_entry_tools/test_agent_modes 87 passed; make lint clean; full suite 1341 passed, 26 skipped. SPEC: 20261029-1619_html-output-mode Progress: tasks 2.5, 2.5b, 4.2 (plan step 9, FEAT-003) Next: FEAT-004 start_composing(mode) wiring, run_python HTML branch, guards * โจ feat(html-output-mode): start_composing mode, run_python HTML branch and CLI generate_html start_composing(mode="pptx"|"html") picks the composer document and slide spec by mode; a mode that does not match deck.json outputFormat returns specs_ok=false with the deck's format. HTML payloads carry slide HTML, deck_css and template_html. The PPTX payload is byte-identical to main. generate_pptx, code_to_slide, start_translation and diff refuse HTML decks. Local run_python rebuilds output.html through sdpm.api.refresh_html for HTML decks; the CLI gains generate_html and start composing --mode, and measure / preview accept HTML decks. Verified: targeted pytest (entry_tools, run_python_semantics, cli_contract, tool_descriptions, acp_agent_definitions, agent_modes, architecture) 229 passed; uv run make lint clean; full suite 1358 passed, 26 skipped; servers/remote no diff. SPEC: 20261029-1619_html-output-mode Progress: tasks 3.3, 4.1, 4.3 (local; remote unchanged by design), 4.4 tests part Next: FEAT-005 docs (architecture.md tool table, CHANGELOG, en/ja) + validation * ๐ docs(html-output-mode): document HTML decks and record phase 1 validation Architecture tool table (start_composing mode, init_deck_workspace output_format, generate_pptx no-op on HTML decks), HTML deck sections in getting-started en/ja, HTML template conversion in custom-template, CHANGELOG [Unreleased] entry. .ash.yaml: suppress SECRET-HEX-HIGH-ENTROPY-STRING for the sourceHash content hash in sdpm/templates/html/*/template.json. Verified: uv run make lint (pass); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1358 passed, 26 skipped); uv run python /tmp/sdpm-html-v1/run.py (V1/V3 all OK); ash scan --mode local --fail-on-findings exit 2 โ only npm-audit findings on web-ui/infra package-lock.json, unchanged from main. SPEC: 20261029-1619_html-output-mode Progress: 4.4, 4.5, V1, V3, V4 done; V2 awaits manual browser check; V5 blocked by pre-existing npm-audit findings Next: phase 2 (cloud) * ๐ fix(html-output-mode): position data-region boxes absolutely in output.html design.md ยง4 writes regions as `