@litfamily/litclaude 1.0.10 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +436 -45
- package/README_ko-KR.md +403 -17
- package/bin/install-ownership.mjs +155 -18
- package/bin/litclaude-ai.js +91 -9
- package/docs/ab/S11-baseline-desktop.webp +0 -0
- package/docs/ab/S11-baseline-phone.webp +0 -0
- package/docs/ab/S11-litclaude-desktop.webp +0 -0
- package/docs/ab/S11-litclaude-phone.webp +0 -0
- package/docs/ab/S3-baseline-desktop.webp +0 -0
- package/docs/ab/S3-baseline-phone.webp +0 -0
- package/docs/ab/S3-litclaude-desktop.webp +0 -0
- package/docs/ab/S3-litclaude-phone.webp +0 -0
- package/docs/ab/S4-baseline-desktop.webp +0 -0
- package/docs/ab/S4-baseline-phone.webp +0 -0
- package/docs/ab/S4-litclaude-desktop.webp +0 -0
- package/docs/ab/S4-litclaude-phone.webp +0 -0
- package/docs/ab/S5-baseline-pages.webp +0 -0
- package/docs/ab/S5-baseline-slides.webp +0 -0
- package/docs/ab/S5-litclaude-pages.webp +0 -0
- package/docs/ab/S5-litclaude-slides.webp +0 -0
- package/docs/ab/S7-litclaude-diagram.webp +0 -0
- package/docs/ab/S8-baseline-slides.webp +0 -0
- package/docs/ab/S8-litclaude-slides.webp +0 -0
- package/docs/ab/S9-litclaude-pages.webp +0 -0
- package/docs/agents.md +10 -7
- package/docs/assets/cover-motion-still.webp +0 -0
- package/docs/assets/cover-motion.webp +0 -0
- package/docs/assets/readme/badge-version.svg +1 -1
- package/docs/assets/skills/autoconference.webp +0 -0
- package/docs/assets/skills/automatic-checks.webp +0 -0
- package/docs/assets/skills/autoresearch.webp +0 -0
- package/docs/assets/skills/browser-drive.webp +0 -0
- package/docs/assets/skills/debugging.webp +0 -0
- package/docs/assets/skills/deep-interview.webp +0 -0
- package/docs/assets/skills/frontend-ui-ux.webp +0 -0
- package/docs/assets/skills/lit-burnoff-file.webp +0 -0
- package/docs/assets/skills/lit-burnoff.webp +0 -0
- package/docs/assets/skills/lit-code.webp +0 -0
- package/docs/assets/skills/lit-commit.webp +0 -0
- package/docs/assets/skills/lit-comprehend.webp +0 -0
- package/docs/assets/skills/lit-crucible.webp +0 -0
- package/docs/assets/skills/lit-diagram-drawer.webp +0 -0
- package/docs/assets/skills/lit-docx.webp +0 -0
- package/docs/assets/skills/lit-handoff.webp +0 -0
- package/docs/assets/skills/lit-humanizer.webp +0 -0
- package/docs/assets/skills/lit-init.webp +0 -0
- package/docs/assets/skills/lit-loop.webp +0 -0
- package/docs/assets/skills/lit-plan.webp +0 -0
- package/docs/assets/skills/lit-pptx.webp +0 -0
- package/docs/assets/skills/lit-recap.webp +0 -0
- package/docs/assets/skills/lit-scientific-visualization.webp +0 -0
- package/docs/assets/skills/lit-team.webp +0 -0
- package/docs/assets/skills/lit-typographic-motion.webp +0 -0
- package/docs/assets/skills/litgoal.webp +0 -0
- package/docs/assets/skills/litresearch.webp +0 -0
- package/docs/assets/skills/litwork.webp +0 -0
- package/docs/assets/skills/lsp-setup.webp +0 -0
- package/docs/assets/skills/readme-studio.webp +0 -0
- package/docs/assets/skills/refactor.webp +0 -0
- package/docs/assets/skills/review-work.webp +0 -0
- package/docs/assets/skills/start-work.webp +0 -0
- package/docs/assets/skills/structural-search.webp +0 -0
- package/docs/assets/skills/visual-qa.webp +0 -0
- package/docs/assets/skills/wikify.webp +0 -0
- package/docs/hooks.md +185 -41
- package/docs/migration.md +6 -3
- package/docs/privacy.md +6 -1
- package/package.json +4 -2
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/agents/korean-prose-editor.md +1 -0
- package/plugins/litclaude/agents/korean-style-analyzer.md +1 -0
- package/plugins/litclaude/agents/meaning-preservation-auditor.md +1 -0
- package/plugins/litclaude/agents/native-flow-reviewer.md +1 -0
- package/plugins/litclaude/agents/polish-orchestrator.md +1 -0
- package/plugins/litclaude/bin/litclaude-hook.js +347 -35
- package/plugins/litclaude/bin/litclaude-hud.js +29 -1
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/bundled-rules/lit-humanizer.md +14 -0
- package/plugins/litclaude/commands/korean-ai-slop-remover.md +2 -2
- package/plugins/litclaude/commands/lit-comprehend.md +11 -11
- package/plugins/litclaude/commands/lit-humanizer.md +75 -0
- package/plugins/litclaude/commands/lit-korean.md +4 -130
- package/plugins/litclaude/commands/litresearch.md +12 -10
- package/plugins/litclaude/hooks/hooks.json +1 -1
- package/plugins/litclaude/lib/canonical-runtime-commitments.mjs +2 -2
- package/plugins/litclaude/lib/canonical-skill-catalog.mjs +5 -1
- package/plugins/litclaude/lib/canonical-skill-resources.mjs +618 -13
- package/plugins/litclaude/lib/deliverable-hedge-guard.mjs +256 -350
- package/plugins/litclaude/lib/hud-accent-palette.mjs +33 -0
- package/plugins/litclaude/lib/interface-mode.mjs +33 -0
- package/plugins/litclaude/lib/interface-probe-gate.mjs +125 -0
- package/plugins/litclaude/lib/jev-skill-hint.mjs +445 -0
- package/plugins/litclaude/lib/motion-render-gate.mjs +164 -0
- package/plugins/litclaude/lib/mutated-file-paths.mjs +32 -1
- package/plugins/litclaude/lib/office-runtime-lock/package-lock.json +745 -0
- package/plugins/litclaude/lib/office-runtime-lock/package.json +12 -0
- package/plugins/litclaude/lib/office-runtime-lock/requirements.lock +15 -0
- package/plugins/litclaude/lib/office-runtime.mjs +255 -0
- package/plugins/litclaude/lib/office_data.py +493 -0
- package/plugins/litclaude/lib/office_runtime_bootstrap.py +61 -0
- package/plugins/litclaude/lib/ooxml_integrity.py +199 -0
- package/plugins/litclaude/lib/rename-aliases.mjs +3 -1
- package/plugins/litclaude/lib/render_pages.py +105 -0
- package/plugins/litclaude/skills/autoconference/SKILL.md +2 -0
- package/plugins/litclaude/skills/browser-drive/SKILL.md +19 -6
- package/plugins/litclaude/skills/browser-drive/scripts/capability-probe.mjs +44 -8
- package/plugins/litclaude/skills/frontend-ui-ux/ATTRIBUTION.md +26 -0
- package/plugins/litclaude/skills/frontend-ui-ux/SKILL.md +50 -16
- package/plugins/litclaude/skills/frontend-ui-ux/examples/phase-3-readme-ab/README.md +9 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/complete-contract.md +32 -6
- package/plugins/litclaude/skills/frontend-ui-ux/references/craft-floor.md +257 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/default-editorial-pixel.json +6 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/interaction-motion.md +34 -88
- package/plugins/litclaude/skills/frontend-ui-ux/references/motion-guide.md +130 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/slop-register.md +150 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/visual-reconstruction.md +39 -85
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +1534 -0
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +141 -0
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe-server.mjs +57 -0
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe-static.mjs +129 -0
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe.mjs +316 -0
- package/plugins/litclaude/skills/lit-comprehend/SKILL.md +34 -43
- package/plugins/litclaude/skills/lit-comprehend/references/artifact-template.md +5 -44
- package/plugins/litclaude/skills/lit-comprehend/scripts/verify-explainer.mjs +6 -16
- package/plugins/litclaude/skills/lit-diagram-drawer/NOTICE +33 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/SKILL.md +123 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-architecture-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-architecture-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-architecture-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bar-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bar-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bar-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-beeswarm-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-beeswarm-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-beeswarm-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bubble-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bubble-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bubble-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bump-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bump-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bump-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-data-flow-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-data-flow-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-data-flow-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-datalake-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-datalake-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-datalake-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-db-schema-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-db-schema-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-db-schema-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dependency-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dependency-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dependency-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-deployment-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-deployment-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-deployment-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-integration-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-integration-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-integration-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-er-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-er-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-er-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-fishbone-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-fishbone-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-fishbone-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-flowchart-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-flowchart-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-flowchart-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-gantt-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-gantt-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-gantt-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-heatmap-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-heatmap-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-heatmap-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-drawio-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-drawio-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-drawio-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-it-state-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-it-state-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-it-state-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-journey-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-journey-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-journey-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-kanban-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-kanban-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-kanban-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-layers-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-layers-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-layers-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-line-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-line-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-line-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-marimekko-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-marimekko-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-marimekko-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-medallion-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-medallion-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-medallion-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-nested-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-nested-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-nested-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-org-chart-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-org-chart-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-org-chart-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-polar-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-polar-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-polar-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-process-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-process-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-process-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-pyramid-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-pyramid-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-pyramid-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-queue-animated-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-queue-animated-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-queue-animated-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-radar-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-radar-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-radar-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-ridgeline-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-ridgeline-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-ridgeline-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sankey-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sankey-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sankey-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-scatter-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-scatter-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-scatter-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-slopegraph-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-slopegraph-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-slopegraph-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-story-map-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-story-map-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-story-map-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-streamgraph-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-streamgraph-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-streamgraph-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-swimlane-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-swimlane-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-swimlane-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-timeline-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-timeline-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-timeline-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-treemap-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-treemap-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-treemap-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-uml-class-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-uml-class-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-uml-class-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-venn-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-venn-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-venn-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-wardley-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-wardley-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-wardley-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-waterfall-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-waterfall-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-waterfall-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/fonts/OFL.txt +94 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/fonts/PretendardVariable.woff2 +0 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/fonts/provenance.json +22 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/icons.html +231 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/index.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/devicon-MIT.txt +20 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/diagram-design-MIT.txt +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/log-z-MIT.txt +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/simple-icons-CC0.md +30 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/tabler-MIT.txt +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/01-service-architecture/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/01-service-architecture/brief.md +33 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/02-release-decision/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/02-release-decision/brief.md +18 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/03-data-retention/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/03-data-retention/brief.md +19 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/04-oauth-sequence/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/04-oauth-sequence/brief.md +17 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/05-review-lanes/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/05-review-lanes/brief.md +17 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/06-rollout-gates/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/06-rollout-gates/brief.md +17 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/07-deployment-boundary/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/07-deployment-boundary/brief.md +19 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/08-policy-traces/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/08-policy-traces/brief.md +20 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/accessibility.md +37 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/export.md +29 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/import-drawio.md +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/import-excalidraw.md +14 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/import-mermaid.md +18 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/import-schema.md +28 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/korean-typography.md +34 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/motion.md +29 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/office-pptx-docx.md +42 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/output-spec.md +48 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/primitive-annotation.md +12 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/primitive-icons.md +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/primitive-sketchy.md +11 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/primitive-terminal.md +11 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/profiles.md +24 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/semantic-patterns.md +27 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/style-guide.md +67 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-architecture.md +51 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-bar.md +51 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-beeswarm.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-bubble.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-bump.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-catalog.json +1433 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-data-flow.md +51 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-datalake.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-db-schema.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-dependency.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-deployment.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-dp-integration.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-dp-security-matrix.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-er.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-fishbone.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-flowchart.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-gantt.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-heatmap.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-high-level-vertical.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-high-level.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-import-drawio.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-import-excalidraw.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-import-mermaid.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-it-state.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-journey.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-kanban.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-layers.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-line.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-loop-terminal.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-loop.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-marimekko.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-medallion.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-nested.md +59 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-org-chart.md +58 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-paved-road-animated.md +72 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-polar.md +67 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-policy-trace-animated.md +69 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-process.md +58 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-pyramid.md +59 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-quadrant-consultant.md +60 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-quadrant.md +57 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-queue-animated.md +63 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-radar.md +57 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-ridgeline.md +63 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-sankey.md +68 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-scatter.md +60 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-sequence-oauth.md +66 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-sequence.md +63 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-slopegraph.md +65 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-state-lifecycle.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-state.md +59 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-story-map.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-streamgraph.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-swimlane.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-timeline.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +57 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-tree.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-treemap.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-uml-class.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-venn.md +51 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-wardley.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-waterfall.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/verifier-guide.md +66 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/block-registry.mjs +43 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/brief-contract.mjs +94 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/check-visible-text.mjs +15 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/diagram-metrics.mjs +223 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/doctor.mjs +35 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/drawio-extract.mjs +635 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/excalidraw-extract.mjs +319 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/export.mjs +116 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/mermaid-extract.mjs +438 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/office-safety.mjs +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/renderer.mjs +33 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-all.mjs +58 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-brief.mjs +22 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-coverage.mjs +56 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-diagram.mjs +27 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-motion.mjs +12 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-type.mjs +48 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/visual-quality.mjs +376 -0
- package/plugins/litclaude/skills/lit-docx/NOTICE +33 -0
- package/plugins/litclaude/skills/lit-docx/SKILL.md +170 -0
- package/plugins/litclaude/skills/lit-docx/references/frontmatter_schema.md +42 -0
- package/plugins/litclaude/skills/lit-docx/references/journal_style_spec.md +17 -0
- package/plugins/litclaude/skills/lit-docx/references/markdown_quality_checklist.md +37 -0
- package/plugins/litclaude/skills/lit-docx/references/slop_phrase_list.yaml +58 -0
- package/plugins/litclaude/skills/lit-docx/references/slop_rules.md +35 -0
- package/plugins/litclaude/skills/lit-docx/scripts/clean_markdown.py +95 -0
- package/plugins/litclaude/skills/lit-docx/scripts/convert_md_to_docx.py +1194 -0
- package/plugins/litclaude/skills/lit-docx/scripts/convert_md_to_pdf.py +290 -0
- package/plugins/litclaude/skills/lit-docx/scripts/convert_pdf.py +139 -0
- package/plugins/litclaude/skills/lit-docx/scripts/edit_docx.py +306 -0
- package/plugins/litclaude/skills/lit-docx/scripts/embed_images.py +78 -0
- package/plugins/litclaude/skills/lit-docx/scripts/generate_docx_templates.py +500 -0
- package/plugins/litclaude/skills/lit-docx/scripts/qa_docx.py +177 -0
- package/plugins/litclaude/skills/lit-docx/scripts/slop_lint.py +561 -0
- package/plugins/litclaude/skills/lit-docx/scripts/visual_audit.py +48 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/acs.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/elsevier.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/ieee.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/korean-generic.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/nature.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/acs/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/acs/template.tex +37 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/elsevier/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/elsevier/template.tex +38 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/ieee/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/ieee/template.tex +37 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/korean-generic/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/korean-generic/template.tex +37 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/nature/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/nature/template.tex +37 -0
- package/plugins/litclaude/skills/lit-docx/templates/registry.yaml +1366 -0
- package/plugins/litclaude/skills/lit-humanizer/NOTICE +160 -0
- package/plugins/litclaude/skills/lit-humanizer/SKILL.md +164 -0
- package/plugins/litclaude/skills/lit-humanizer/assets/always-on-rule.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/assets/report-skeleton.md +25 -0
- package/plugins/litclaude/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
- package/plugins/litclaude/skills/lit-humanizer/bench/prompts.md +73 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/accessibility-note/before.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/api-reference/after.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/api-reference/before.md +15 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/changelog/after.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/changelog/before.md +12 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/code-comments/after.md +10 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/code-comments/before.md +19 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/commit/after.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/commit/before.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/data-release/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/data-release/before.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/english-essay/after.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/english-essay/before.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/incident-update/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/incident-update/before.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-essay/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-essay/before.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-report/after.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-report/before.md +13 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-slide/after.md +19 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-slide/before.md +21 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/policy-faq/after.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/policy-faq/before.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/pr/after.md +15 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/pr/before.md +17 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/project-update/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/project-update/before.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/readme/after.md +12 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/readme/before.md +14 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/report/after.md +13 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/report/before.md +11 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/research-abstract/after.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/research-abstract/before.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/slides/after.md +19 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/slides/before.md +19 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/troubleshooting/after.md +11 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/troubleshooting/before.md +11 -0
- package/plugins/litclaude/skills/lit-humanizer/motion-guide.md +123 -0
- package/plugins/litclaude/skills/lit-humanizer/references/code-patterns.md +468 -0
- package/plugins/litclaude/skills/lit-humanizer/references/deliverable-channels.md +111 -0
- package/plugins/litclaude/skills/lit-humanizer/references/en-patterns-checklist.md +43 -0
- package/plugins/litclaude/skills/lit-humanizer/references/en-patterns-content.md +243 -0
- package/plugins/litclaude/skills/lit-humanizer/references/en-patterns-structure.md +375 -0
- package/plugins/litclaude/skills/lit-humanizer/references/en-patterns.md +57 -0
- package/plugins/litclaude/skills/lit-humanizer/references/ko-metrics.md +33 -0
- package/plugins/litclaude/skills/lit-humanizer/references/ko-patterns-a-d.md +659 -0
- package/plugins/litclaude/skills/lit-humanizer/references/ko-patterns-e-j.md +387 -0
- package/plugins/litclaude/skills/lit-humanizer/references/ko-patterns.md +31 -0
- package/plugins/litclaude/skills/lit-humanizer/references/rewrite-playbook.md +54 -0
- package/plugins/litclaude/skills/lit-humanizer/references/taxonomy.md +153 -0
- package/plugins/litclaude/skills/lit-humanizer/rules.json +884 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/artifact-text.mjs +38 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/core.mjs +207 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/detect.mjs +64 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/extract_office_text.py +112 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/ko-metrics.mjs +124 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/scan-input.mjs +29 -0
- package/plugins/litclaude/skills/lit-loop/SKILL.md +30 -1
- package/plugins/litclaude/skills/lit-plan/SKILL.md +4 -1
- package/plugins/litclaude/skills/lit-pptx/NOTICE +38 -0
- package/plugins/litclaude/skills/lit-pptx/SKILL.md +207 -0
- package/plugins/litclaude/skills/lit-pptx/assets/azure/circle-lg.png +0 -0
- package/plugins/litclaude/skills/lit-pptx/assets/azure/circle-md.png +0 -0
- package/plugins/litclaude/skills/lit-pptx/assets/azure/circle-sm.png +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Black.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Bold.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Light.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Medium.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Regular.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/OFL.txt +94 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/SOURCE.md +29 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/pretendard/OFL.txt +94 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/pretendard/Pretendard-Bold.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/pretendard/Pretendard-Regular.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/provenance.json +78 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/analyst.md +49 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/antithesis.md +59 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/architect.md +44 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/critic.md +42 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/synthesizer.md +47 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/thesis.md +33 -0
- package/plugins/litclaude/skills/lit-pptx/references/anti-slop-checklist.md +81 -0
- package/plugins/litclaude/skills/lit-pptx/references/authoring-guide.md +173 -0
- package/plugins/litclaude/skills/lit-pptx/references/consensus-protocol.md +125 -0
- package/plugins/litclaude/skills/lit-pptx/references/data-display-cookbook.md +45 -0
- package/plugins/litclaude/skills/lit-pptx/references/design-system-azure.md +58 -0
- package/plugins/litclaude/skills/lit-pptx/references/interview-protocol.md +113 -0
- package/plugins/litclaude/skills/lit-pptx/references/stages/autopilot.md +48 -0
- package/plugins/litclaude/skills/lit-pptx/references/stages/interview.md +52 -0
- package/plugins/litclaude/skills/lit-pptx/references/stages/plan.md +42 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/compile-deck.js +414 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/craft_extras.py +373 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/deck_craft.py +321 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/embed_fonts.py +215 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/forbidden-terms.json +55 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/layout_inventory.py +418 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/learn_template.py +446 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/derive-palette.js +176 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/directive-parser.js +244 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/font-map.js +79 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/gen-bg.js +86 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/gen-gradient-assets.js +37 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/layout-resolver.js +768 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/markdown-loader.js +136 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/render-adapter-html.js +356 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/render-adapter-pptx.js +2094 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/runtime-require.js +28 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/slide-ast.js +561 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/spec-validator.js +94 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/template-registry.js +394 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/package.json +4 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/qa_deck.py +766 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/validate_pptx.py +215 -0
- package/plugins/litclaude/skills/lit-pptx/specs/markdown-slide-spec-v1.md +251 -0
- package/plugins/litclaude/skills/lit-pptx/specs/markdown-slide-spec-v2.md +214 -0
- package/plugins/litclaude/skills/lit-pptx/specs/slide-ast-v1.schema.json +229 -0
- package/plugins/litclaude/skills/lit-pptx/specs/slide-ast-v2.schema.json +144 -0
- package/plugins/litclaude/skills/lit-pptx/specs/template-enrollment-contract.md +382 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-A2Z/capabilities.yaml +146 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-A2Z/layout-mapping.yaml +454 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-A2Z/template.yaml +37 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-PRO/capabilities.yaml +154 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-PRO/layout-mapping.yaml +475 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-PRO/template.yaml +37 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/capabilities.yaml +179 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/layout-mapping.yaml +299 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/template.yaml +45 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/capabilities.yaml +181 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/layout-mapping.yaml +299 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/template.yaml +44 -0
- package/plugins/litclaude/skills/lit-scientific-visualization/SKILL.md +1 -0
- package/plugins/litclaude/skills/lit-typographic-motion/SKILL.md +131 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/NOTICE +23 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +56 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/audio/beat_grid.py +56 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/audio/requirements.lock +1084 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/constants.mjs +211 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/contrast.mjs +90 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/events.mjs +46 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/flash.mjs +211 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/gate-rules.mjs +550 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/presets.mjs +123 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/text.mjs +100 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/timeline.mjs +142 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/util.mjs +167 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/voices.mjs +19 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/models/word-timing.json +198 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/analysis.mjs +108 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/brief.mjs +158 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/chrome.mjs +330 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/coverage.mjs +83 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/done.mjs +104 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/encode.mjs +104 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/frame-worker.mjs +36 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/look.mjs +128 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/pipeline.mjs +592 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/png.mjs +112 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/report.mjs +66 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/runtime.mjs +330 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/session.mjs +145 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/sound-cli.mjs +60 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/sound.mjs +641 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-capture.mjs +178 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-gate.mjs +122 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-qa.mjs +295 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-serve.mjs +278 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage.mjs +503 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stills.mjs +100 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/treatment.mjs +343 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/ws-server.mjs +132 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/package-lock.json +25 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/package.json +10 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/init.js +288 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/qa.js +157 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/stage-kit.js +701 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/boot.mjs +123 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/engine.mjs +281 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/gl.mjs +319 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/glsl-common.mjs +78 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/index.html +6 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/lines.mjs +112 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/crt.mjs +98 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/dither.mjs +49 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/glitch.mjs +77 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/swiss-grid.mjs +61 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/terminal-ui.mjs +88 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/tidal-gradient.mjs +86 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/post.mjs +165 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scale.mjs +15 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scene.mjs +82 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/end-card.mjs +30 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/index.mjs +16 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/karaoke-line.mjs +47 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/kinetic-list.mjs +45 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/number-counter.mjs +29 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/signature.mjs +73 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/title-slam.mjs +73 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/stroke.mjs +236 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/type.mjs +180 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-400.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-700.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-900.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-400.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-700.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-900.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-400.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-700.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-900.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/OFL.txt +93 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/manifest.json +437 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/silkscreen/OFL.txt +93 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/silkscreen/Silkscreen-Bold.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/silkscreen/Silkscreen-Regular.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/CREDITS +42 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSAllure.svg +216 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSFelix.svg +216 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSOsmotron.svg +216 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSReadability.svg +216 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSTech.svg +217 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/OFL.txt +91 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/vt323/OFL.txt +93 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/vt323/VT323-Regular.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/brief-schema.md +91 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/craft-loop.md +69 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/engine-contract.md +104 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/look.md +106 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/runtime.md +65 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/sound.md +83 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/stage.md +192 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/style-bibles.md +117 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/treatment.md +114 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/type-craft.md +79 -0
- package/plugins/litclaude/skills/lit-typographic-motion/scripts/motion-doctor.mjs +78 -0
- package/plugins/litclaude/skills/lit-typographic-motion/scripts/motion-runtime.mjs +67 -0
- package/plugins/litclaude/skills/lit-typographic-motion/scripts/motion.mjs +132 -0
- package/plugins/litclaude/skills/litresearch/SKILL.md +54 -18
- package/scripts/doctor.mjs +5 -0
- package/scripts/postinstall.mjs +1 -0
- package/plugins/litclaude/skills/lit-korean/SKILL.md +0 -327
- /package/plugins/litclaude/skills/{lit-korean/references/fidelity-checklist.md → lit-humanizer/references/litclaude-fidelity-checklist.md} +0 -0
- /package/plugins/litclaude/skills/{lit-korean/references/rewrite-rules.md → lit-humanizer/references/litclaude-rewrite-rules.md} +0 -0
- /package/plugins/litclaude/skills/{lit-korean/references/style-patterns.md → lit-humanizer/references/litclaude-style-patterns.md} +0 -0
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
// The stage path: a model-authored page captured frame by frame on a virtual clock (director brief
|
|
2
|
+
// section 6). One round: treatment check -> static scan -> fonts -> master Chrome steps every frame
|
|
3
|
+
// from 0 and captures it -> decode and analyse in a worker pool -> ffmpeg (with the sound bed) ->
|
|
4
|
+
// stills set -> in parallel, a fresh Chrome replays the clock from 0 for the determinism samples and
|
|
5
|
+
// another replays it for the DOM text QA -> preview by decimating master frames -> gate -> deliver,
|
|
6
|
+
// or withhold on a flash-audit FAIL. `--stills-only` stops after the stills set, with no encode.
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
9
|
+
import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import { EXIT, GATE, PREVIEW } from "../core/constants.mjs";
|
|
12
|
+
import { FlashDetector, cellsFromRgba, detectSequence, gridFor } from "../core/flash.mjs";
|
|
13
|
+
import { areaDownscale } from "./analysis.mjs";
|
|
14
|
+
import { BlockedError } from "./chrome.mjs";
|
|
15
|
+
import { findFfmpeg, findFfprobe, findImg2webp, previewRungs, startMaster, encodePreview, probeVideo } from "./encode.mjs";
|
|
16
|
+
import { resolveViewed, asBlocked } from "./pipeline.mjs";
|
|
17
|
+
import { encodePng, rgbaToRgb } from "./png.mjs";
|
|
18
|
+
import { auditMuxed } from "./sound.mjs";
|
|
19
|
+
import { soundTrackFor } from "./sound-cli.mjs";
|
|
20
|
+
import { StageBrowser, FramePool, analyzeChecked } from "./stage-capture.mjs";
|
|
21
|
+
import { evaluateStageGate, formatStageReport } from "./stage-gate.mjs";
|
|
22
|
+
import { textQaReplay } from "./stage-qa.mjs";
|
|
23
|
+
import { treatmentSha } from "./done.mjs";
|
|
24
|
+
import { scanStage, stageFonts } from "./stage-serve.mjs";
|
|
25
|
+
import { beatCuts, stillsPlan, writeStills } from "./stills.mjs";
|
|
26
|
+
import { FORMATS, loadTreatment } from "./treatment.mjs";
|
|
27
|
+
|
|
28
|
+
export const DELIVERABLES = ["film.mp4", "preview.webp", "preview.gif", "poster.png", "reduced-motion.png"];
|
|
29
|
+
export const DETERMINISM_SAMPLES = Object.freeze({ min: 8, max: 16 });
|
|
30
|
+
|
|
31
|
+
const writeJson = (file, value) => {
|
|
32
|
+
mkdirSync(path.dirname(file), { recursive: true });
|
|
33
|
+
writeFileSync(file, `${JSON.stringify(value, null, 2)}\n`);
|
|
34
|
+
};
|
|
35
|
+
const sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex");
|
|
36
|
+
const percentile = (values, p) => {
|
|
37
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
38
|
+
return sorted.length ? +sorted[Math.min(sorted.length - 1, Math.floor(p * sorted.length))].toFixed(1) : null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** Determinism samples: frame 0, the last frame, each beat's first frame, beat midpoints to 8, at most 16. */
|
|
42
|
+
export function determinismFrames({ beats, fps, frameCount }) {
|
|
43
|
+
const clamp = (f) => Math.max(0, Math.min(frameCount - 1, f));
|
|
44
|
+
const base = [0, frameCount - 1, ...beats.map((b) => clamp(Math.round(b.t0 * fps)))];
|
|
45
|
+
let set = [...new Set(base)].sort((a, b) => a - b);
|
|
46
|
+
for (const b of beats) {
|
|
47
|
+
if (set.length >= DETERMINISM_SAMPLES.min) break;
|
|
48
|
+
set = [...new Set([...set, clamp(Math.round(((b.t0 + b.t1) / 2) * fps))])].sort((a, b) => a - b);
|
|
49
|
+
}
|
|
50
|
+
for (let k = 1; set.length < DETERMINISM_SAMPLES.min && k < 64; k++) set = [...new Set([...set, clamp(Math.round((k * (frameCount - 1)) / 8))])].sort((a, b) => a - b);
|
|
51
|
+
if (set.length > DETERMINISM_SAMPLES.max) {
|
|
52
|
+
const keep = new Set([set[0], set[set.length - 1]]);
|
|
53
|
+
for (let i = 0; keep.size < DETERMINISM_SAMPLES.max; i++) keep.add(set[Math.round((i * (set.length - 1)) / (DETERMINISM_SAMPLES.max - 1))]);
|
|
54
|
+
set = [...keep].sort((a, b) => a - b);
|
|
55
|
+
}
|
|
56
|
+
return set;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** The first 64x64 block where two RGBA frames differ, as "x,y wxh". */
|
|
60
|
+
export function firstDifference(a, b, width, height) {
|
|
61
|
+
const block = 64;
|
|
62
|
+
for (let by = 0; by < height; by += block) {
|
|
63
|
+
for (let bx = 0; bx < width; bx += block) {
|
|
64
|
+
for (let y = by; y < Math.min(height, by + block); y++) {
|
|
65
|
+
const o = (y * width + bx) * 4;
|
|
66
|
+
const n = Math.min(width - bx, block) * 4;
|
|
67
|
+
if (Buffer.compare(a.subarray(o, o + n), b.subarray(o, o + n)) !== 0) return `${bx},${by} ${Math.min(block, width - bx)}x${Math.min(block, height - by)}`;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function violationExit(state, router) {
|
|
75
|
+
if (router.refused.length) {
|
|
76
|
+
const first = router.refused[0];
|
|
77
|
+
return new BlockedError(EXIT.STAGE_NETWORK_REQUEST, `STAGE_NETWORK_REQUEST: the page requested ${first.url.slice(0, 160)} (${first.reason}); everything on the stage is local`);
|
|
78
|
+
}
|
|
79
|
+
const net = state.violations.find((v) => v.kind === "network");
|
|
80
|
+
if (net) return new BlockedError(EXIT.STAGE_NETWORK_REQUEST, `STAGE_NETWORK_REQUEST: the page used ${net.name}`);
|
|
81
|
+
const v = state.violations[0];
|
|
82
|
+
if (v) return new BlockedError(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: the page used ${v.name}, which a stage page may not use`);
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Open a stage browser and check the page's LitStage contract against the treatment. */
|
|
87
|
+
async function openChecked({ label, ctx }) {
|
|
88
|
+
const { stageDir, faces, scan, width, height, treatment, runDir, env, log } = ctx;
|
|
89
|
+
const browser = await StageBrowser.open({ stageDir, faces, rasters: scan.rasters, width, height, seed: treatment.seed, profileDir: path.join(runDir, `c${process.pid % 100000}${label}`), env, log });
|
|
90
|
+
const state = browser.state;
|
|
91
|
+
const fail = (message) => new BlockedError(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: ${message}`);
|
|
92
|
+
const early = violationExit(state, browser.router);
|
|
93
|
+
let error = early;
|
|
94
|
+
const spec = state.spec;
|
|
95
|
+
if (!error && !spec) error = fail(`the page never called LitStage.define (or set window.litStage)${state.errors.length ? `; first page error: ${state.errors[0]}` : ""}`);
|
|
96
|
+
else if (!error && (spec.width !== width || spec.height !== height)) error = fail(`the page defines ${spec.width}x${spec.height}, the ${treatment.format} format is ${width}x${height}`);
|
|
97
|
+
else if (!error && spec.render !== "function") error = fail("LitStage.define needs render(t)");
|
|
98
|
+
else if (!error && spec.fps !== (treatment.fps ?? 60)) error = fail(`the page runs at ${spec.fps} fps; the treatment asks for ${treatment.fps ?? 60} (30 only when the treatment says fps: 30)`);
|
|
99
|
+
else if (!error && !(spec.duration > 0)) error = fail("the page's duration must be a positive number of seconds");
|
|
100
|
+
if (!error && state.webglMissing) error = new BlockedError(EXIT.BLOCKED_NO_WEBGL2, "BLOCKED_NO_WEBGL2: the page asked for a WebGL context and the software rung gave none");
|
|
101
|
+
if (!error && browser.prepared?.failedFaces?.length) log(`warning: faces that did not load: ${browser.prepared.failedFaces.join(", ")}`);
|
|
102
|
+
if (error) {
|
|
103
|
+
await browser.close();
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
return browser;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function stepChecked(browser, f, fps, opts) {
|
|
110
|
+
const s = await browser.step(f, fps, opts);
|
|
111
|
+
if (s.violations > 0 || browser.router.refused.length) {
|
|
112
|
+
const error = violationExit(await browser.pageState(), browser.router);
|
|
113
|
+
if (error) throw error;
|
|
114
|
+
}
|
|
115
|
+
return s;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Stills-only, or the frames a caller needs, stepping the clock from 0. Stills skip the paint between
|
|
120
|
+
* wanted frames. The determinism replay passes `asMaster`: it paints and captures every frame exactly
|
|
121
|
+
* as the master does and keeps only the wanted ones, because an element whose opacity and transform
|
|
122
|
+
* change together can raster one level apart depending on which earlier frames were painted and
|
|
123
|
+
* captured (the replay would then flag the renderer, not the page).
|
|
124
|
+
*/
|
|
125
|
+
async function captureFrames({ browser, pool, fps, frames, width, height, asMaster = false }) {
|
|
126
|
+
const wanted = [...frames].sort((a, b) => a - b);
|
|
127
|
+
const last = wanted[wanted.length - 1];
|
|
128
|
+
const out = new Map();
|
|
129
|
+
const pending = [];
|
|
130
|
+
const want = new Set(wanted);
|
|
131
|
+
for (let f = 0; f <= last; f++) {
|
|
132
|
+
await stepChecked(browser, f, fps, { paint: asMaster || want.has(f) });
|
|
133
|
+
if (!want.has(f)) {
|
|
134
|
+
if (asMaster) await browser.capture();
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const png = await browser.capture();
|
|
138
|
+
pending.push(analyzeChecked(pool, png, width, height).then((a) => out.set(f, a)));
|
|
139
|
+
}
|
|
140
|
+
await Promise.all(pending);
|
|
141
|
+
return out;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function renderId(treatment, scan) {
|
|
145
|
+
const h = createHash("sha256").update(JSON.stringify(treatment));
|
|
146
|
+
for (const f of scan.files) h.update(f.rel).update(readFileSync(f.real));
|
|
147
|
+
return h.digest("hex").slice(0, 16);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** The preview ladder from the decimated master frames written during the master pass. */
|
|
151
|
+
function buildPreview({ out, ffmpeg, env, width, height, frameCount, fps }) {
|
|
152
|
+
const runDir = path.join(out, ".run");
|
|
153
|
+
const sourceDir = path.join(runDir, "preview-src");
|
|
154
|
+
const encoders = previewRungs(ffmpeg, env);
|
|
155
|
+
const img2webp = findImg2webp(env);
|
|
156
|
+
const attempts = [];
|
|
157
|
+
const landscape = width >= height;
|
|
158
|
+
const sources = readdirSync(sourceDir).filter((f) => /^\d{5}\.rgba$/u.test(f)).sort();
|
|
159
|
+
const srcFps = PREVIEW.rungs[0].fps;
|
|
160
|
+
const [sw, sh] = previewSize(width, height, PREVIEW.rungs[0].width);
|
|
161
|
+
for (const rung of PREVIEW.rungs) {
|
|
162
|
+
const [pw, ph] = previewSize(width, height, rung.width);
|
|
163
|
+
const dir = path.join(runDir, "preview", `${rung.width}x${rung.fps}`);
|
|
164
|
+
rmSync(dir, { recursive: true, force: true });
|
|
165
|
+
mkdirSync(dir, { recursive: true });
|
|
166
|
+
const count = Math.max(1, Math.round((frameCount / fps) * rung.fps));
|
|
167
|
+
const cells = [];
|
|
168
|
+
const grid = gridFor(pw, ph);
|
|
169
|
+
for (let i = 0; i < count; i++) {
|
|
170
|
+
const src = Math.min(sources.length - 1, Math.round((i * srcFps) / rung.fps));
|
|
171
|
+
let rgba = readFileSync(path.join(sourceDir, sources[src]));
|
|
172
|
+
if (pw !== sw) rgba = areaDownscale(rgba, sw, sh, pw, ph);
|
|
173
|
+
cells.push(cellsFromRgba(rgba, pw, ph, undefined, grid));
|
|
174
|
+
writeFileSync(path.join(dir, `${String(i).padStart(5, "0")}.png`), encodePng(rgbaToRgb(rgba, pw, ph), pw, ph, 3, { level: 1 }));
|
|
175
|
+
}
|
|
176
|
+
const records = detectSequence(cells, { loop: true, grid });
|
|
177
|
+
for (const encoder of encoders) {
|
|
178
|
+
const file = path.join(runDir, "stage", encoder === "gif" ? "preview.gif" : "preview.webp");
|
|
179
|
+
const result = encodePreview({ encoder, ffmpeg, img2webp, dir, fps: rung.fps, out: file });
|
|
180
|
+
if (result.code !== 0 || !existsSync(file)) {
|
|
181
|
+
attempts.push({ ...rung, encoder, error: result.stderr.slice(-200) });
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
const bytes = statSync(file).size;
|
|
185
|
+
attempts.push({ ...rung, encoder, bytes });
|
|
186
|
+
if (bytes <= GATE.previewCapBytes) {
|
|
187
|
+
rmSync(dir, { recursive: true, force: true });
|
|
188
|
+
return { file, encoder, rung, bytes, records, attempts, landscape };
|
|
189
|
+
}
|
|
190
|
+
rmSync(file, { force: true });
|
|
191
|
+
}
|
|
192
|
+
rmSync(dir, { recursive: true, force: true });
|
|
193
|
+
}
|
|
194
|
+
return { file: null, encoder: null, rung: null, bytes: null, records: null, attempts, landscape };
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** The frame's own gate geometry: title-safe and action-safe insets, flash grid and window. */
|
|
198
|
+
export function geometryFor(width, height) {
|
|
199
|
+
const g = gridFor(width, height);
|
|
200
|
+
const inset = (k) => [Math.round(width * k), Math.round(height * k), Math.round(width * (1 - k)), Math.round(height * (1 - k))];
|
|
201
|
+
return { titleSafe: inset(0.05), actionSafe: inset(0.025), flashGrid: [g.gw, g.gh], flashWindow: [g.ww, g.wh], contrastScale: Math.min(width, height) / 1080, previewLongEdge: PREVIEW.rungs[0].width };
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Capture chosen frames of a stage page in a fresh Chrome that steps the clock from 0 (for tests and
|
|
206
|
+
* diagnostics). Returns Map(frame -> RGBA).
|
|
207
|
+
*/
|
|
208
|
+
export async function captureStageFrames({ out, frames, env = process.env, log = () => {} }) {
|
|
209
|
+
const treatment = asBlocked(() => loadTreatment(out, { pathName: "stage" }));
|
|
210
|
+
const stageDir = path.join(out, "stage");
|
|
211
|
+
const [width, height] = FORMATS[treatment.format];
|
|
212
|
+
const scan = scanStage(stageDir);
|
|
213
|
+
const faces = stageFonts(env);
|
|
214
|
+
const runDir = path.join(out, ".run");
|
|
215
|
+
mkdirSync(runDir, { recursive: true });
|
|
216
|
+
const ctx = { stageDir, faces, scan, width, height, treatment, runDir, env, log };
|
|
217
|
+
const browser = await openChecked({ label: "x", ctx });
|
|
218
|
+
const pool = new FramePool(2);
|
|
219
|
+
try {
|
|
220
|
+
const got = await captureFrames({ browser, pool, fps: browser.state.spec.fps, frames: new Set(frames), width, height });
|
|
221
|
+
return new Map([...got].map(([f, a]) => [f, a.rgba]));
|
|
222
|
+
} finally {
|
|
223
|
+
await pool.close();
|
|
224
|
+
await browser.close();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** Preview rungs are keyed on the long edge (960, 720, 540). */
|
|
229
|
+
export function previewSize(width, height, longEdge) {
|
|
230
|
+
return width >= height ? [longEdge, Math.round((longEdge * height) / width)] : [Math.round((longEdge * width) / height), longEdge];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** A poster PNG within the 1 MB cap: RGB first, then a 256-colour palette PNG through ffmpeg. */
|
|
234
|
+
function writePoster({ rgba, width, height, file, ffmpeg }) {
|
|
235
|
+
writeFileSync(file, encodePng(rgbaToRgb(rgba, width, height), width, height, 3, { level: 9 }));
|
|
236
|
+
if (statSync(file).size <= GATE.posterCapBytes || !ffmpeg) return "rgb";
|
|
237
|
+
const tmp = `${file}.rgb.png`;
|
|
238
|
+
renameSync(file, tmp);
|
|
239
|
+
const r = spawnSyncSafe(ffmpeg, ["-y", "-hide_banner", "-loglevel", "error", "-i", tmp, "-vf", "split[a][b];[a]palettegen=max_colors=256:stats_mode=full[p];[b][p]paletteuse=dither=sierra2_4a", "-frames:v", "1", file]);
|
|
240
|
+
if (r !== 0 || !existsSync(file)) {
|
|
241
|
+
renameSync(tmp, file);
|
|
242
|
+
return "rgb";
|
|
243
|
+
}
|
|
244
|
+
rmSync(tmp, { force: true });
|
|
245
|
+
return "palette";
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const spawnSyncSafe = (cmd, args) => spawnSync(cmd, args, { encoding: "utf8" }).status;
|
|
249
|
+
|
|
250
|
+
function promote(out, flashFail) {
|
|
251
|
+
const stage = path.join(out, ".run", "stage");
|
|
252
|
+
const names = existsSync(stage) ? readdirSync(stage).filter((f) => DELIVERABLES.includes(f)) : [];
|
|
253
|
+
const dest = flashFail ? path.join(out, "withheld") : out;
|
|
254
|
+
mkdirSync(dest, { recursive: true });
|
|
255
|
+
for (const name of names) renameSync(path.join(stage, name), path.join(dest, name));
|
|
256
|
+
return { withheld: flashFail, dir: dest };
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function clearOutputs(out) {
|
|
260
|
+
for (const name of [...DELIVERABLES, "manifest.json", "render.jsonl", "gate-report.txt"]) rmSync(path.join(out, name), { force: true });
|
|
261
|
+
for (const dir of ["withheld", path.join(".run", "stage"), path.join(".run", "preview"), path.join(".run", "preview-src")]) rmSync(path.join(out, dir), { recursive: true, force: true });
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function progress(out, value) {
|
|
265
|
+
try {
|
|
266
|
+
writeJson(path.join(out, ".run", "progress.json"), { ...value, pid: process.pid, updatedAt: new Date().toISOString() });
|
|
267
|
+
} catch {
|
|
268
|
+
// Progress is advisory; a render never fails on it.
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Render one stage round. Returns { code, message, ... }; throws BlockedError for 10/11/14-19.
|
|
274
|
+
* `qa` (optional) is the DOM text-QA replay, run in its own Chrome in parallel with the master.
|
|
275
|
+
*/
|
|
276
|
+
export async function renderStage({ out, round = 1, stillsOnly = false, env = process.env, log = () => {}, qa = null }) {
|
|
277
|
+
if (!(round >= 1 && round <= 3)) throw new BlockedError(EXIT.USAGE, "--round must be 1..3");
|
|
278
|
+
const t0 = Date.now();
|
|
279
|
+
const treatment = asBlocked(() => loadTreatment(out, { pathName: "stage" }));
|
|
280
|
+
const stageDir = path.join(out, "stage");
|
|
281
|
+
const [width, height] = FORMATS[treatment.format];
|
|
282
|
+
const scan = scanStage(stageDir);
|
|
283
|
+
for (const w of scan.warnings) log(`warning: ${w}`);
|
|
284
|
+
const faces = stageFonts(env);
|
|
285
|
+
const runDir = path.join(out, ".run");
|
|
286
|
+
mkdirSync(runDir, { recursive: true });
|
|
287
|
+
const ffmpeg = findFfmpeg(env);
|
|
288
|
+
const ctx = { stageDir, faces, scan, width, height, treatment, runDir, env, log };
|
|
289
|
+
progress(out, { phase: "open", round, stillsOnly });
|
|
290
|
+
const master = await openChecked({ label: "m", ctx });
|
|
291
|
+
const spec = master.state.spec;
|
|
292
|
+
const fps = spec.fps;
|
|
293
|
+
const frameCount = Math.round(spec.duration * fps);
|
|
294
|
+
const beats = treatment.beats;
|
|
295
|
+
const cuts = beatCuts(beats, fps, frameCount);
|
|
296
|
+
const plan = stillsPlan({ beats, fps, frameCount, cuts, posterBeat: treatment.posterBeat });
|
|
297
|
+
const pool = new FramePool();
|
|
298
|
+
const id = renderId(treatment, scan);
|
|
299
|
+
try {
|
|
300
|
+
if (stillsOnly) {
|
|
301
|
+
const frames = await captureFrames({ browser: master, pool, fps, frames: plan.all, width, height });
|
|
302
|
+
const stills = writeStills({ out, plan, frames: new Map([...frames].map(([f, a]) => [f, a.rgba])), width, height, fps, frameCount, round, stillsOnly: true, path: "stage" });
|
|
303
|
+
progress(out, { phase: "done", round, stillsOnly });
|
|
304
|
+
return {
|
|
305
|
+
code: EXIT.OK,
|
|
306
|
+
message: `STILLS_ONLY: look at every file in ${path.join(out, "stills")} (index.json lists them), record the round with look --round ${round}, make the change, then render the film with --round ${round + 1} (no --stills-only)`,
|
|
307
|
+
stills, renderId: id,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
if (!ffmpeg) {
|
|
311
|
+
const frames = await captureFrames({ browser: master, pool, fps, frames: plan.all, width, height });
|
|
312
|
+
writeStills({ out, plan, frames: new Map([...frames].map(([f, a]) => [f, a.rgba])), width, height, fps, frameCount, round, stillsOnly: true, path: "stage" });
|
|
313
|
+
return { code: EXIT.BLOCKED_NO_FFMPEG_FOR_VIDEO, message: `BLOCKED_NO_FFMPEG_FOR_VIDEO: ffmpeg is not on PATH; the stills and contact sheet are in ${path.join(out, "stills")}; install ffmpeg for the film` };
|
|
314
|
+
}
|
|
315
|
+
clearOutputs(out);
|
|
316
|
+
const stageOut = path.join(runDir, "stage");
|
|
317
|
+
mkdirSync(stageOut, { recursive: true });
|
|
318
|
+
const sound = soundTrackFor({ treatment, out, stageDir, frameCount, fps, cutTimes: cuts.map((c) => c / fps), ffmpeg });
|
|
319
|
+
const filmPath = path.join(stageOut, "film.mp4");
|
|
320
|
+
const encoder = startMaster({ ffmpeg, width, height, fps, out: filmPath, audio: sound.file });
|
|
321
|
+
|
|
322
|
+
// The replays start with the master: each is its own Chrome stepping its own clock from 0.
|
|
323
|
+
const detFrames = determinismFrames({ beats, fps, frameCount });
|
|
324
|
+
const detPromise = (async () => {
|
|
325
|
+
const browser = await openChecked({ label: "d", ctx });
|
|
326
|
+
try {
|
|
327
|
+
return await captureFrames({ browser, pool, fps, frames: new Set(detFrames), width, height, asMaster: true });
|
|
328
|
+
} finally {
|
|
329
|
+
await browser.close();
|
|
330
|
+
}
|
|
331
|
+
})();
|
|
332
|
+
detPromise.catch(() => {});
|
|
333
|
+
const replayQa = qa ?? textQaReplay({ pool, stageFiles: scan.files.map((f) => path.basename(f.rel)) });
|
|
334
|
+
const qaPromise = replayQa({ ctx, fps, frameCount, plan, openBrowser: (label) => openChecked({ label, ctx }), stepChecked });
|
|
335
|
+
qaPromise.catch(() => {});
|
|
336
|
+
|
|
337
|
+
const [pw, ph] = previewSize(width, height, PREVIEW.rungs[0].width);
|
|
338
|
+
const previewDir = path.join(runDir, "preview-src");
|
|
339
|
+
mkdirSync(previewDir, { recursive: true });
|
|
340
|
+
const previewEvery = fps / PREVIEW.rungs[0].fps;
|
|
341
|
+
const detector = new FlashDetector(gridFor(width, height));
|
|
342
|
+
const lines = [];
|
|
343
|
+
const kept = new Map();
|
|
344
|
+
const detMaster = new Map();
|
|
345
|
+
const frameMs = [];
|
|
346
|
+
const inflight = [];
|
|
347
|
+
const maxInflight = pool.workers.length + 1;
|
|
348
|
+
let poster = null;
|
|
349
|
+
const consume = async (entry) => {
|
|
350
|
+
const a = await entry.analysis;
|
|
351
|
+
await encoder.write(a.rgba);
|
|
352
|
+
const flash = detector.push(a.cells);
|
|
353
|
+
lines.push({ frame: entry.f, artifact: "master", rgbaSha256: a.rgbaSha256, luminanceP995: a.luminanceP995, flash });
|
|
354
|
+
if (plan.all.has(entry.f)) kept.set(entry.f, a.rgba);
|
|
355
|
+
if (detFrames.includes(entry.f)) detMaster.set(entry.f, a);
|
|
356
|
+
if (entry.f % previewEvery === 0) {
|
|
357
|
+
const small = areaDownscale(a.rgba, width, height, pw, ph);
|
|
358
|
+
writeFileSync(path.join(previewDir, `${String(entry.f / previewEvery).padStart(5, "0")}.rgba`), small);
|
|
359
|
+
}
|
|
360
|
+
if (entry.f === plan.poster) poster = writePoster({ rgba: a.rgba, width, height, file: path.join(stageOut, "poster.png"), ffmpeg });
|
|
361
|
+
if (entry.f === plan.reduced) writeFileSync(path.join(stageOut, "reduced-motion.png"), encodePng(rgbaToRgb(a.rgba, width, height), width, height, 3, { level: 9 }));
|
|
362
|
+
};
|
|
363
|
+
const tMaster = Date.now();
|
|
364
|
+
for (let f = 0; f < frameCount; f++) {
|
|
365
|
+
const ts = performance.now();
|
|
366
|
+
await stepChecked(master, f, fps, { paint: true });
|
|
367
|
+
const png = await master.capture();
|
|
368
|
+
frameMs.push(performance.now() - ts);
|
|
369
|
+
inflight.push({ f, analysis: analyzeChecked(pool, png, width, height) });
|
|
370
|
+
if (inflight.length >= maxInflight) await consume(inflight.shift());
|
|
371
|
+
if (f % 30 === 0) progress(out, { phase: "master", frame: f, frameCount, round });
|
|
372
|
+
}
|
|
373
|
+
while (inflight.length) await consume(inflight.shift());
|
|
374
|
+
const encoded = await encoder.finish();
|
|
375
|
+
if (encoded.code !== 0) throw new Error(`ffmpeg master encode failed (${encoded.code}): ${encoded.stderr.slice(-400)}`);
|
|
376
|
+
const masterSec = (Date.now() - tMaster) / 1000;
|
|
377
|
+
const finalState = await master.pageState();
|
|
378
|
+
writeFileSync(path.join(out, "render.jsonl"), `${lines.map((l) => JSON.stringify(l)).join("\n")}\n`);
|
|
379
|
+
|
|
380
|
+
progress(out, { phase: "determinism", round });
|
|
381
|
+
const replay = await detPromise;
|
|
382
|
+
const detRows = detFrames.map((f) => ({ frame: f, master: detMaster.get(f)?.rgbaSha256, replay: replay.get(f)?.rgbaSha256 }));
|
|
383
|
+
const mismatch = detRows.find((r) => r.master !== r.replay);
|
|
384
|
+
const determinism = mismatch
|
|
385
|
+
? { status: "FAIL", frames: detRows, firstMismatch: { frame: mismatch.frame, region: firstDifference(detMaster.get(mismatch.frame).rgba, replay.get(mismatch.frame).rgba, width, height) } }
|
|
386
|
+
: { status: "PASS", frames: detRows };
|
|
387
|
+
writeJson(path.join(runDir, "determinism.json"), determinism);
|
|
388
|
+
|
|
389
|
+
progress(out, { phase: "qa", round });
|
|
390
|
+
const qaResult = await qaPromise;
|
|
391
|
+
|
|
392
|
+
progress(out, { phase: "preview", round });
|
|
393
|
+
const preview = buildPreview({ out, ffmpeg, env, width, height, frameCount, fps });
|
|
394
|
+
const probe = probeVideo(filmPath, env);
|
|
395
|
+
const soundAudit = auditMuxed({ ffmpeg, ffprobe: findFfprobe(env), film: filmPath, videoDurationSec: frameCount / fps, mode: sound.mode });
|
|
396
|
+
const exports = {
|
|
397
|
+
film: existsSync(filmPath) ? { bytes: statSync(filmPath).size } : null,
|
|
398
|
+
preview: preview.file ? { bytes: preview.bytes, kind: path.extname(preview.file).slice(1) } : null,
|
|
399
|
+
poster: existsSync(path.join(stageOut, "poster.png")) ? { bytes: statSync(path.join(stageOut, "poster.png")).size } : null,
|
|
400
|
+
reducedMotion: existsSync(path.join(stageOut, "reduced-motion.png")) ? { bytes: statSync(path.join(stageOut, "reduced-motion.png")).size } : null,
|
|
401
|
+
};
|
|
402
|
+
const gate = evaluateStageGate({
|
|
403
|
+
masterFlash: lines.map((l) => l.flash), previewFlash: preview.records ? { records: preview.records, fps: preview.rung.fps } : null, fps,
|
|
404
|
+
probe, width, height, treatment, exports, reducedFrame: plan.reduced, frames: lines, usesWebGL: finalState.usesWebGL, renderer: master.renderer,
|
|
405
|
+
determinism, extraRules: [...soundAudit.rules, ...(qaResult?.rules ?? [])],
|
|
406
|
+
});
|
|
407
|
+
const promoted = promote(out, gate.flashFail);
|
|
408
|
+
const loc = (name) => path.join(promoted.dir, name);
|
|
409
|
+
const stills = writeStills({ out, plan, frames: kept, width, height, fps, frameCount, round, stillsOnly: false, path: "stage", posterFile: existsSync(loc("poster.png")) ? loc("poster.png") : null });
|
|
410
|
+
const totalSec = (Date.now() - t0) / 1000;
|
|
411
|
+
const manifest = {
|
|
412
|
+
schemaVersion: 1, path: "stage", renderId: id, round, treatmentSha256: treatmentSha(out), format: treatment.format, width, height, fps, durationSec: spec.duration, treatmentDurationSec: treatment.durationSec,
|
|
413
|
+
frameCount, seed: treatment.seed, renderer: "SwiftShader (software rung)", chromeFlags: master.flags, usesWebGL: finalState.usesWebGL,
|
|
414
|
+
cuts, stills: { sha256: stills.sha256, poster: plan.poster, reduced: plan.reduced }, posterEncoding: poster,
|
|
415
|
+
geometry: geometryFor(width, height),
|
|
416
|
+
sound: { mode: sound.mode, label: sound.label, file: sound.file ? path.relative(out, sound.file) : null, sha256: sound.file ? sha256(readFileSync(sound.file)) : null, lufs: sound.bed?.lufs ?? null },
|
|
417
|
+
preview: { encoder: preview.encoder, rung: preview.rung, attempts: preview.attempts },
|
|
418
|
+
pageErrors: finalState.errors, missingAssets: master.router.missing,
|
|
419
|
+
timing: { frameP50Ms: percentile(frameMs, 0.5), frameP95Ms: percentile(frameMs, 0.95), masterSec: +masterSec.toFixed(1), totalSec: +totalSec.toFixed(1) },
|
|
420
|
+
warnings: [...scan.warnings, ...master.router.missing.map((m) => `the page asked for a missing file ${m.url} (${m.reason})`)],
|
|
421
|
+
generatedAt: new Date().toISOString(),
|
|
422
|
+
};
|
|
423
|
+
writeJson(path.join(out, "manifest.json"), manifest);
|
|
424
|
+
const report = formatStageReport({
|
|
425
|
+
gate, manifest, round, framesViewed: resolveViewed(out, 0), withheld: promoted.withheld,
|
|
426
|
+
outputs: { film: loc("film.mp4"), preview: preview.file ? loc(path.basename(preview.file)) : "(no preview under 3 MB)", poster: loc("poster.png"), still: loc("reduced-motion.png") },
|
|
427
|
+
});
|
|
428
|
+
writeFileSync(path.join(out, "gate-report.txt"), report);
|
|
429
|
+
rmSync(previewDir, { recursive: true, force: true });
|
|
430
|
+
progress(out, { phase: "done", round });
|
|
431
|
+
const code = determinism.status !== "PASS" ? EXIT.STAGE_NONDETERMINISTIC
|
|
432
|
+
: qaResult?.exit ? qaResult.exit
|
|
433
|
+
: soundAudit.exitCode ? soundAudit.exitCode
|
|
434
|
+
: gate.pass ? EXIT.OK : EXIT.GATE_FAIL_QA;
|
|
435
|
+
const message = code === EXIT.STAGE_NONDETERMINISTIC
|
|
436
|
+
? `STAGE_NONDETERMINISTIC: frame ${determinism.firstMismatch.frame} differs between the master and a fresh replay (first differing region ${determinism.firstMismatch.region}); the page read something the clock does not drive`
|
|
437
|
+
: code === qaResult?.exit ? qaResult.message
|
|
438
|
+
: code === EXIT.SOUND_INVALID ? `SOUND_INVALID: ${soundAudit.rules.filter((x) => x.status === "FAIL").map((x) => `${x.id} ${x.detail}`).join("; ")}`
|
|
439
|
+
: gate.pass ? `OK: gate PASS; film ${loc("film.mp4")}; look at ${path.join(out, "stills")} and record look --round ${round}`
|
|
440
|
+
: `GATE_FAIL_QA: ${gate.failed.join(", ")}${promoted.withheld ? " (flash audit failed: exports withheld)" : ""}; see ${path.join(out, "gate-report.txt")}`;
|
|
441
|
+
return { code, message, gate, manifest, stills };
|
|
442
|
+
} finally {
|
|
443
|
+
await pool.close();
|
|
444
|
+
await master.close();
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// ---- detached full renders: the render keeps going if the calling tool times out ----
|
|
449
|
+
|
|
450
|
+
const alive = (pid) => {
|
|
451
|
+
try {
|
|
452
|
+
process.kill(pid, 0);
|
|
453
|
+
return true;
|
|
454
|
+
} catch {
|
|
455
|
+
return false;
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Run a full stage render in a detached child with a progress file, and wait for it. A second call
|
|
461
|
+
* while one is running attaches to it instead of starting another.
|
|
462
|
+
*/
|
|
463
|
+
export async function renderStageDetached({ out, round, cli, env = process.env, log = () => {}, pollMs = 1000 }) {
|
|
464
|
+
const runDir = path.join(out, ".run");
|
|
465
|
+
mkdirSync(runDir, { recursive: true });
|
|
466
|
+
const lock = path.join(runDir, "render.pid");
|
|
467
|
+
const resultFile = path.join(runDir, "result.json");
|
|
468
|
+
let pid = existsSync(lock) ? Number(readFileSync(lock, "utf8")) : null;
|
|
469
|
+
if (!(pid && alive(pid))) {
|
|
470
|
+
rmSync(resultFile, { force: true });
|
|
471
|
+
const logFd = openSync(path.join(runDir, "render.log"), "w");
|
|
472
|
+
const child = spawn(process.execPath, [cli, "stage", "--out", out, "--round", String(round), "--worker"], { detached: true, stdio: ["ignore", logFd, logFd], env });
|
|
473
|
+
closeSync(logFd);
|
|
474
|
+
child.unref();
|
|
475
|
+
pid = child.pid;
|
|
476
|
+
writeFileSync(lock, String(pid));
|
|
477
|
+
log(`full render running detached (pid ${pid}); progress in ${path.join(runDir, "progress.json")}`);
|
|
478
|
+
} else log(`attaching to the render already running (pid ${pid})`);
|
|
479
|
+
let lastPhase = null;
|
|
480
|
+
for (;;) {
|
|
481
|
+
if (existsSync(resultFile)) {
|
|
482
|
+
const result = JSON.parse(readFileSync(resultFile, "utf8"));
|
|
483
|
+
rmSync(lock, { force: true });
|
|
484
|
+
return result;
|
|
485
|
+
}
|
|
486
|
+
if (!alive(pid)) {
|
|
487
|
+
await new Promise((r) => setTimeout(r, 200));
|
|
488
|
+
if (existsSync(resultFile)) continue;
|
|
489
|
+
rmSync(lock, { force: true });
|
|
490
|
+
const tail = existsSync(path.join(runDir, "render.log")) ? readFileSync(path.join(runDir, "render.log"), "utf8").trim().split("\n").slice(-5).join(" | ") : "";
|
|
491
|
+
throw new Error(`the detached render (pid ${pid}) ended without a result: ${tail}`);
|
|
492
|
+
}
|
|
493
|
+
try {
|
|
494
|
+
const p = JSON.parse(readFileSync(path.join(runDir, "progress.json"), "utf8"));
|
|
495
|
+
const phase = `${p.phase}${p.frame !== undefined && p.phase === "master" ? ` ${Math.floor((p.frame / p.frameCount) * 10) * 10}%` : ""}`;
|
|
496
|
+
if (phase !== lastPhase) log(`render: ${phase}`);
|
|
497
|
+
lastPhase = phase;
|
|
498
|
+
} catch {
|
|
499
|
+
// Not written yet.
|
|
500
|
+
}
|
|
501
|
+
await new Promise((r) => setTimeout(r, pollMs));
|
|
502
|
+
}
|
|
503
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// The stills set both renderers write, the thing the look rounds are about: one full-size still per
|
|
2
|
+
// beat midpoint, one transition strip per cut (the frames 6 before, at and 6 after the cut, side by
|
|
3
|
+
// side at half size), a 12-frame contact sheet, and `stills/index.json` listing every file with its
|
|
4
|
+
// frames and SHA-256. The index's own SHA-256 is the "stills manifest" a look round is stamped with.
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
|
+
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { areaDownscale } from "./analysis.mjs";
|
|
9
|
+
import { encodePng, rgbaToRgb } from "./png.mjs";
|
|
10
|
+
|
|
11
|
+
export const STILLS_DIR = "stills";
|
|
12
|
+
export const INDEX_FILE = "index.json";
|
|
13
|
+
export const STRIP_OFFSETS = Object.freeze([-6, 0, 6]);
|
|
14
|
+
export const SHEET_FRAMES = 12;
|
|
15
|
+
const GAP = 12;
|
|
16
|
+
const GROUND = 30;
|
|
17
|
+
|
|
18
|
+
const sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex");
|
|
19
|
+
const clampFrame = (f, count) => Math.max(0, Math.min(count - 1, f));
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Which frames the stills set needs. `beats` are { t0, t1 } in seconds; `cuts` are cut frames.
|
|
23
|
+
* Returns { beats: [frame], strips: [[f-6, f, f+6]], sheet: [12 frames], poster, reduced, all: Set }.
|
|
24
|
+
*/
|
|
25
|
+
export function stillsPlan({ beats, fps, frameCount, cuts, posterBeat = null }) {
|
|
26
|
+
const mids = beats.map((b) => clampFrame(Math.round(((b.t0 + b.t1) / 2) * fps), frameCount));
|
|
27
|
+
const strips = cuts.map((c) => STRIP_OFFSETS.map((o) => clampFrame(c + o, frameCount)));
|
|
28
|
+
const sheet = Array.from({ length: SHEET_FRAMES }, (_, k) => Math.round((k * (frameCount - 1)) / (SHEET_FRAMES - 1)));
|
|
29
|
+
const pick = Number.isInteger(posterBeat) && posterBeat >= 0 && posterBeat < mids.length ? posterBeat : Math.floor(mids.length / 2);
|
|
30
|
+
const all = new Set([...mids, ...strips.flat(), ...sheet]);
|
|
31
|
+
return { beats: mids, strips, sheet, poster: mids[pick], reduced: mids[mids.length - 1], all };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Cut frames of a stage film: every beat boundary after the first, inside the film. */
|
|
35
|
+
export const beatCuts = (beats, fps, frameCount) => beats.slice(1).map((b) => Math.round(b.t0 * fps)).filter((c) => c > 0 && c < frameCount);
|
|
36
|
+
|
|
37
|
+
function tile(target, W, rgba, w, h, ox, oy) {
|
|
38
|
+
for (let y = 0; y < h; y++) {
|
|
39
|
+
const src = y * w * 4;
|
|
40
|
+
const dst = ((oy + y) * W + ox) * 3;
|
|
41
|
+
for (let x = 0; x < w; x++) {
|
|
42
|
+
target[dst + x * 3] = rgba[src + x * 4];
|
|
43
|
+
target[dst + x * 3 + 1] = rgba[src + x * 4 + 1];
|
|
44
|
+
target[dst + x * 3 + 2] = rgba[src + x * 4 + 2];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Compose frames into one RGB PNG: `cols` per row, each scaled to tw x th. */
|
|
50
|
+
export function composeGrid(frames, width, height, { cols, tw, th }) {
|
|
51
|
+
const rows = Math.ceil(frames.length / cols);
|
|
52
|
+
const W = cols * tw + (cols + 1) * GAP;
|
|
53
|
+
const H = rows * th + (rows + 1) * GAP;
|
|
54
|
+
const out = Buffer.alloc(W * H * 3, GROUND);
|
|
55
|
+
frames.forEach((rgba, i) => {
|
|
56
|
+
const small = areaDownscale(rgba, width, height, tw, th);
|
|
57
|
+
tile(out, W, small, tw, th, GAP + (i % cols) * (tw + GAP), GAP + Math.floor(i / cols) * (th + GAP));
|
|
58
|
+
});
|
|
59
|
+
return encodePng(out, W, H, 3, { level: 6 });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const stripPng = (frames, width, height) => composeGrid(frames, width, height, { cols: 3, tw: Math.round(width / 2), th: Math.round(height / 2) });
|
|
63
|
+
export function sheetPng(frames, width, height) {
|
|
64
|
+
const landscape = width >= height;
|
|
65
|
+
return composeGrid(frames, width, height, landscape ? { cols: 4, tw: 480, th: 270 } : { cols: 6, tw: 270, th: 480 });
|
|
66
|
+
}
|
|
67
|
+
export const stillPng = (rgba, width, height) => encodePng(rgbaToRgb(rgba, width, height), width, height, 3, { level: 6 });
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Write the stills set from a map frame -> RGBA. Returns { index, sha256, files }. The index lists
|
|
71
|
+
* paths relative to the output directory; `poster` (full renders) is the delivered poster.png.
|
|
72
|
+
*/
|
|
73
|
+
export function writeStills({ out, plan, frames, width, height, fps, frameCount, round, stillsOnly, path: renderPath, posterFile = null }) {
|
|
74
|
+
const dir = path.join(out, STILLS_DIR);
|
|
75
|
+
rmSync(dir, { recursive: true, force: true });
|
|
76
|
+
mkdirSync(dir, { recursive: true });
|
|
77
|
+
const entries = [];
|
|
78
|
+
const put = (name, bytes, extra) => {
|
|
79
|
+
writeFileSync(path.join(dir, name), bytes);
|
|
80
|
+
entries.push({ file: `${STILLS_DIR}/${name}`, sha256: sha256(bytes), ...extra });
|
|
81
|
+
};
|
|
82
|
+
plan.beats.forEach((f, i) => put(`beat-${String(i + 1).padStart(2, "0")}.png`, stillPng(frames.get(f), width, height), { kind: "beat", beat: i, frames: [f] }));
|
|
83
|
+
plan.strips.forEach((fs, i) => put(`strip-${String(i + 1).padStart(2, "0")}.png`, stripPng(fs.map((f) => frames.get(f)), width, height), { kind: "strip", cut: i, frames: fs }));
|
|
84
|
+
put("sheet.png", sheetPng(plan.sheet.map((f) => frames.get(f)), width, height), { kind: "sheet", frames: plan.sheet });
|
|
85
|
+
if (posterFile) entries.push({ file: path.relative(out, posterFile), sha256: sha256(readFileSync(posterFile)), kind: "poster", frames: [plan.poster] });
|
|
86
|
+
const index = { schema: "litclaude.motion-stills/v1", path: renderPath, round, stillsOnly, width, height, fps, frameCount, files: entries };
|
|
87
|
+
const bytes = Buffer.from(`${JSON.stringify(index, null, 2)}\n`);
|
|
88
|
+
writeFileSync(path.join(dir, INDEX_FILE), bytes);
|
|
89
|
+
return { index, sha256: sha256(bytes), files: entries.map((e) => e.file) };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Read the latest stills index and its SHA-256 (null when absent). */
|
|
93
|
+
export function readStills(out) {
|
|
94
|
+
try {
|
|
95
|
+
const bytes = readFileSync(path.join(out, STILLS_DIR, INDEX_FILE));
|
|
96
|
+
return { index: JSON.parse(bytes.toString("utf8")), sha256: sha256(bytes) };
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
}
|