@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,500 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Generate publisher-style DOCX templates from templates/registry.yaml.
|
|
3
|
+
|
|
4
|
+
Data-driven: every publisher defined in the registry becomes
|
|
5
|
+
``templates/docx/<publisher>.docx``. Safe to re-run; output is idempotent in
|
|
6
|
+
content (docx zip metadata may differ across runs, but word/document.xml and
|
|
7
|
+
word/styles.xml content are stable).
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
python scripts/generate_docx_templates.py
|
|
11
|
+
python scripts/generate_docx_templates.py --publisher elsevier
|
|
12
|
+
python scripts/generate_docx_templates.py --registry path/to/registry.yaml --out-dir path/to/docx
|
|
13
|
+
"""
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import os as _os
|
|
17
|
+
import sys as _sys
|
|
18
|
+
|
|
19
|
+
_sys.dont_write_bytecode = True # the installed skill directory stays read-only
|
|
20
|
+
_sys.path.insert(0, _os.path.join(_os.path.dirname(_os.path.abspath(__file__)), "..", "..", "..", "lib"))
|
|
21
|
+
from office_runtime_bootstrap import ensure_runtime # noqa: E402
|
|
22
|
+
|
|
23
|
+
ensure_runtime(["docx", "yaml"])
|
|
24
|
+
|
|
25
|
+
import argparse
|
|
26
|
+
import sys
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
from typing import Any
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
import yaml
|
|
32
|
+
except ImportError:
|
|
33
|
+
print("Error: 'pyyaml' not found. pip install pyyaml", file=sys.stderr)
|
|
34
|
+
raise
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
from docx import Document
|
|
38
|
+
from docx.enum.style import WD_STYLE_TYPE
|
|
39
|
+
from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_LINE_SPACING
|
|
40
|
+
from docx.oxml import OxmlElement
|
|
41
|
+
from docx.oxml.ns import qn
|
|
42
|
+
from docx.shared import Cm, Pt, RGBColor
|
|
43
|
+
except ImportError:
|
|
44
|
+
print("Error: 'python-docx' not found. pip install python-docx", file=sys.stderr)
|
|
45
|
+
raise
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# ---------------------------------------------------------------------------
|
|
49
|
+
# OOXML helpers (python-docx high-level API does not cover these)
|
|
50
|
+
# ---------------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def set_fonts_on_rpr(rpr, latin: str, cjk: str | None) -> None:
|
|
54
|
+
"""Apply w:rFonts (ascii/hAnsi/cs + optional eastAsia) to an rPr element."""
|
|
55
|
+
rfonts = rpr.find(qn("w:rFonts"))
|
|
56
|
+
if rfonts is None:
|
|
57
|
+
rfonts = OxmlElement("w:rFonts")
|
|
58
|
+
rpr.append(rfonts)
|
|
59
|
+
rfonts.set(qn("w:ascii"), latin)
|
|
60
|
+
rfonts.set(qn("w:hAnsi"), latin)
|
|
61
|
+
rfonts.set(qn("w:cs"), latin)
|
|
62
|
+
if cjk:
|
|
63
|
+
rfonts.set(qn("w:eastAsia"), cjk)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def set_style_fonts(style, latin: str, cjk: str | None) -> None:
|
|
67
|
+
"""Set ascii+hAnsi+cs+eastAsia on a style's rPr."""
|
|
68
|
+
element = style.element
|
|
69
|
+
rpr = element.find(qn("w:rPr"))
|
|
70
|
+
if rpr is None:
|
|
71
|
+
rpr = OxmlElement("w:rPr")
|
|
72
|
+
element.append(rpr)
|
|
73
|
+
set_fonts_on_rpr(rpr, latin, cjk)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def set_run_fonts(run, latin: str, cjk: str | None) -> None:
|
|
77
|
+
"""Set ascii+hAnsi+cs+eastAsia on a run's rPr."""
|
|
78
|
+
rpr = run._element.get_or_add_rPr()
|
|
79
|
+
set_fonts_on_rpr(rpr, latin, cjk)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def ensure_ppr(element):
|
|
83
|
+
ppr = element.find(qn("w:pPr"))
|
|
84
|
+
if ppr is None:
|
|
85
|
+
ppr = OxmlElement("w:pPr")
|
|
86
|
+
element.insert(0, ppr)
|
|
87
|
+
return ppr
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def set_style_widow_control(style) -> None:
|
|
91
|
+
ppr = ensure_ppr(style.element)
|
|
92
|
+
wc = ppr.find(qn("w:widowControl"))
|
|
93
|
+
if wc is None:
|
|
94
|
+
wc = OxmlElement("w:widowControl")
|
|
95
|
+
ppr.append(wc)
|
|
96
|
+
wc.set(qn("w:val"), "1")
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def set_style_hanging_indent(style, hanging_cm: float) -> None:
|
|
100
|
+
"""Set hanging indent on a paragraph style (twips)."""
|
|
101
|
+
ppr = ensure_ppr(style.element)
|
|
102
|
+
ind = ppr.find(qn("w:ind"))
|
|
103
|
+
if ind is None:
|
|
104
|
+
ind = OxmlElement("w:ind")
|
|
105
|
+
ppr.append(ind)
|
|
106
|
+
# hanging requires left >= hanging for Word to render properly
|
|
107
|
+
twips = int(round(hanging_cm * 567))
|
|
108
|
+
ind.set(qn("w:left"), str(twips))
|
|
109
|
+
ind.set(qn("w:hanging"), str(twips))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def enable_auto_hyphenation(doc) -> None:
|
|
113
|
+
settings = doc.settings.element
|
|
114
|
+
if settings.find(qn("w:autoHyphenation")) is None:
|
|
115
|
+
settings.append(OxmlElement("w:autoHyphenation"))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def set_section_page(section, page_cfg: dict, title_pg: bool) -> None:
|
|
119
|
+
"""Set page size (A4) and margins from the registry.
|
|
120
|
+
|
|
121
|
+
python-docx exposes Section.page_width/page_height/margins. We use those
|
|
122
|
+
for the high-level attributes and drop in w:titlePg if first_page_different.
|
|
123
|
+
"""
|
|
124
|
+
size = (page_cfg.get("size") or "A4").upper()
|
|
125
|
+
if size == "A4":
|
|
126
|
+
section.page_width = Cm(21.0)
|
|
127
|
+
section.page_height = Cm(29.7)
|
|
128
|
+
elif size == "LETTER":
|
|
129
|
+
section.page_width = Cm(21.59)
|
|
130
|
+
section.page_height = Cm(27.94)
|
|
131
|
+
section.top_margin = Cm(page_cfg.get("margin_top_cm", 2.5))
|
|
132
|
+
section.bottom_margin = Cm(page_cfg.get("margin_bottom_cm", 2.5))
|
|
133
|
+
section.left_margin = Cm(page_cfg.get("margin_left_cm", 2.5))
|
|
134
|
+
section.right_margin = Cm(page_cfg.get("margin_right_cm", 2.5))
|
|
135
|
+
if title_pg:
|
|
136
|
+
sect_pr = section._sectPr
|
|
137
|
+
if sect_pr.find(qn("w:titlePg")) is None:
|
|
138
|
+
sect_pr.append(OxmlElement("w:titlePg"))
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
# ---------------------------------------------------------------------------
|
|
142
|
+
# Style builders
|
|
143
|
+
# ---------------------------------------------------------------------------
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def configure_normal_style(doc, publisher: dict) -> int:
|
|
147
|
+
"""Configure Normal style: body font, CJK pairing, indent/justify/line-spacing."""
|
|
148
|
+
body = publisher["docx"]["font"]["body"]
|
|
149
|
+
body_cjk = publisher["docx"]["font"].get("body_cjk") or {}
|
|
150
|
+
design = publisher["design"]
|
|
151
|
+
para_cfg = design["paragraph"]
|
|
152
|
+
|
|
153
|
+
style = doc.styles["Normal"]
|
|
154
|
+
style.font.name = body["family"]
|
|
155
|
+
style.font.size = Pt(body["size_pt"])
|
|
156
|
+
set_style_fonts(style, body["family"], body_cjk.get("family"))
|
|
157
|
+
|
|
158
|
+
pf = style.paragraph_format
|
|
159
|
+
indent_cm = para_cfg.get("first_line_indent_cm", 0)
|
|
160
|
+
if indent_cm:
|
|
161
|
+
pf.first_line_indent = Cm(indent_cm)
|
|
162
|
+
line_spacing = para_cfg.get("line_spacing") or body.get("line_spacing") or 1.15
|
|
163
|
+
pf.line_spacing = float(line_spacing)
|
|
164
|
+
pf.line_spacing_rule = WD_LINE_SPACING.MULTIPLE
|
|
165
|
+
pf.space_before = Pt(para_cfg.get("space_before_pt", 0))
|
|
166
|
+
pf.space_after = Pt(para_cfg.get("space_after_pt", 0))
|
|
167
|
+
if para_cfg.get("alignment") == "justify":
|
|
168
|
+
pf.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
|
169
|
+
elif para_cfg.get("alignment") == "left":
|
|
170
|
+
pf.alignment = WD_ALIGN_PARAGRAPH.LEFT
|
|
171
|
+
if para_cfg.get("widow_control"):
|
|
172
|
+
set_style_widow_control(style)
|
|
173
|
+
return 1
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def suppress_style_numbering(style) -> None:
|
|
177
|
+
"""Force-disable any list or outline numbering on a paragraph style.
|
|
178
|
+
|
|
179
|
+
Some readers (LibreOffice in particular) auto-apply a bullet / chapter
|
|
180
|
+
marker to paragraphs whose style carries `w:outlineLvl` unless an explicit
|
|
181
|
+
`w:numPr` with `numId=0` is set. `numId=0` is the OOXML sentinel for
|
|
182
|
+
"no numbering". Set it on both ilvl and numId to override inheritance from
|
|
183
|
+
any ancestor style.
|
|
184
|
+
"""
|
|
185
|
+
ppr = style.element.find(qn("w:pPr"))
|
|
186
|
+
if ppr is None:
|
|
187
|
+
ppr = OxmlElement("w:pPr")
|
|
188
|
+
style.element.append(ppr)
|
|
189
|
+
# Remove any pre-existing numPr first (idempotent regenerate)
|
|
190
|
+
for existing in ppr.findall(qn("w:numPr")):
|
|
191
|
+
ppr.remove(existing)
|
|
192
|
+
num_pr = OxmlElement("w:numPr")
|
|
193
|
+
ilvl = OxmlElement("w:ilvl")
|
|
194
|
+
ilvl.set(qn("w:val"), "0")
|
|
195
|
+
num_id = OxmlElement("w:numId")
|
|
196
|
+
num_id.set(qn("w:val"), "0")
|
|
197
|
+
num_pr.append(ilvl)
|
|
198
|
+
num_pr.append(num_id)
|
|
199
|
+
ppr.append(num_pr)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def configure_heading_styles(doc, publisher: dict) -> int:
|
|
203
|
+
"""Override Heading 1..4 with publisher hierarchy values."""
|
|
204
|
+
body = publisher["docx"]["font"]["body"]
|
|
205
|
+
body_cjk = publisher["docx"]["font"].get("body_cjk") or {}
|
|
206
|
+
latin = body["family"]
|
|
207
|
+
cjk = body_cjk.get("family")
|
|
208
|
+
hh = publisher["design"]["heading_hierarchy"]
|
|
209
|
+
touched = 0
|
|
210
|
+
for level, key in enumerate(["h1", "h2", "h3", "h4"], start=1):
|
|
211
|
+
cfg = hh.get(key)
|
|
212
|
+
if cfg is None:
|
|
213
|
+
continue
|
|
214
|
+
style = doc.styles[f"Heading {level}"]
|
|
215
|
+
style.font.name = latin
|
|
216
|
+
style.font.size = Pt(cfg["size_pt"])
|
|
217
|
+
weight = cfg.get("weight", "regular")
|
|
218
|
+
style.font.bold = weight in ("bold", "semibold")
|
|
219
|
+
style.font.italic = bool(cfg.get("italic", False))
|
|
220
|
+
# All headings black (color discipline)
|
|
221
|
+
style.font.color.rgb = RGBColor(0x00, 0x00, 0x00)
|
|
222
|
+
set_style_fonts(style, latin, cjk)
|
|
223
|
+
|
|
224
|
+
pf = style.paragraph_format
|
|
225
|
+
pf.space_before = Pt(cfg.get("space_before_pt", 12))
|
|
226
|
+
pf.space_after = Pt(cfg.get("space_after_pt", 4))
|
|
227
|
+
pf.keep_with_next = bool(cfg.get("keep_with_next", True))
|
|
228
|
+
pf.keep_together = True
|
|
229
|
+
|
|
230
|
+
# Hard-disable any inherited list/outline numbering so readers never
|
|
231
|
+
# render a bullet or chapter marker in front of the heading text.
|
|
232
|
+
suppress_style_numbering(style)
|
|
233
|
+
touched += 1
|
|
234
|
+
return touched
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def configure_hyperlink_style(doc, publisher: dict) -> int:
|
|
238
|
+
"""Override (or create) Hyperlink character style with publisher link color."""
|
|
239
|
+
link_hex = publisher["design"]["color_palette"]["link"].lstrip("#")
|
|
240
|
+
# On a blank Document, 'Hyperlink' char style exists after the first
|
|
241
|
+
# hyperlink is inserted. We ensure it exists by creating it defensively.
|
|
242
|
+
try:
|
|
243
|
+
style = doc.styles["Hyperlink"]
|
|
244
|
+
except KeyError:
|
|
245
|
+
style = doc.styles.add_style("Hyperlink", WD_STYLE_TYPE.CHARACTER)
|
|
246
|
+
style.font.color.rgb = RGBColor.from_string(link_hex)
|
|
247
|
+
style.font.underline = True
|
|
248
|
+
# Also set via OOXML so it persists on all readers
|
|
249
|
+
rpr = style.element.find(qn("w:rPr"))
|
|
250
|
+
if rpr is None:
|
|
251
|
+
rpr = OxmlElement("w:rPr")
|
|
252
|
+
style.element.append(rpr)
|
|
253
|
+
color = rpr.find(qn("w:color"))
|
|
254
|
+
if color is None:
|
|
255
|
+
color = OxmlElement("w:color")
|
|
256
|
+
rpr.append(color)
|
|
257
|
+
color.set(qn("w:val"), link_hex)
|
|
258
|
+
return 1
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def configure_bibliography_style(doc, publisher: dict) -> int:
|
|
262
|
+
"""Create a 'Bibliography' paragraph style with hanging indent."""
|
|
263
|
+
body = publisher["docx"]["font"]["body"]
|
|
264
|
+
body_cjk = publisher["docx"]["font"].get("body_cjk") or {}
|
|
265
|
+
bib = publisher["design"]["bibliography"]
|
|
266
|
+
if "Bibliography" in [s.name for s in doc.styles]:
|
|
267
|
+
style = doc.styles["Bibliography"]
|
|
268
|
+
else:
|
|
269
|
+
style = doc.styles.add_style("Bibliography", WD_STYLE_TYPE.PARAGRAPH)
|
|
270
|
+
style.base_style = doc.styles["Normal"]
|
|
271
|
+
style.font.name = body["family"]
|
|
272
|
+
style.font.size = Pt(bib.get("font_size_pt", 10))
|
|
273
|
+
set_style_fonts(style, body["family"], body_cjk.get("family"))
|
|
274
|
+
pf = style.paragraph_format
|
|
275
|
+
pf.line_spacing = float(bib.get("line_spacing", 1.15))
|
|
276
|
+
pf.space_after = Pt(bib.get("space_between_entries_pt", 6))
|
|
277
|
+
pf.first_line_indent = None # hanging indent instead
|
|
278
|
+
set_style_hanging_indent(style, bib.get("hanging_indent_cm", 0.6))
|
|
279
|
+
return 1
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
def configure_caption_style(doc, publisher: dict) -> int:
|
|
283
|
+
body = publisher["docx"]["font"]["body"]
|
|
284
|
+
body_cjk = publisher["docx"]["font"].get("body_cjk") or {}
|
|
285
|
+
# python-docx's blank document does include a 'Caption' style; if not, make it.
|
|
286
|
+
try:
|
|
287
|
+
style = doc.styles["Caption"]
|
|
288
|
+
except KeyError:
|
|
289
|
+
style = doc.styles.add_style("Caption", WD_STYLE_TYPE.PARAGRAPH)
|
|
290
|
+
style.font.name = body["family"]
|
|
291
|
+
style.font.size = Pt(publisher["design"]["figure_style"].get("caption_font_size_pt", 10))
|
|
292
|
+
style.font.italic = True
|
|
293
|
+
style.font.color.rgb = RGBColor(0x00, 0x00, 0x00)
|
|
294
|
+
set_style_fonts(style, body["family"], body_cjk.get("family"))
|
|
295
|
+
return 1
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
# ---------------------------------------------------------------------------
|
|
299
|
+
# Self-describing title block sample
|
|
300
|
+
# ---------------------------------------------------------------------------
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
def add_sample_title_block(doc, publisher: dict) -> None:
|
|
304
|
+
"""Add title/authors/affiliations/abstract/keywords placeholders."""
|
|
305
|
+
design = publisher["design"]
|
|
306
|
+
tb = design["title_block"]
|
|
307
|
+
body = publisher["docx"]["font"]["body"]
|
|
308
|
+
body_cjk = publisher["docx"]["font"].get("body_cjk") or {}
|
|
309
|
+
latin = body["family"]
|
|
310
|
+
cjk = body_cjk.get("family")
|
|
311
|
+
|
|
312
|
+
def _p(text: str, *, size: int, bold: bool = False, italic: bool = False,
|
|
313
|
+
align=WD_ALIGN_PARAGRAPH.CENTER, space_after: int = 4) -> None:
|
|
314
|
+
p = doc.add_paragraph()
|
|
315
|
+
p.alignment = align
|
|
316
|
+
p.paragraph_format.first_line_indent = Cm(0)
|
|
317
|
+
p.paragraph_format.space_after = Pt(space_after)
|
|
318
|
+
run = p.add_run(text)
|
|
319
|
+
run.font.name = latin
|
|
320
|
+
run.font.size = Pt(size)
|
|
321
|
+
run.bold = bold
|
|
322
|
+
run.italic = italic
|
|
323
|
+
set_run_fonts(run, latin, cjk)
|
|
324
|
+
|
|
325
|
+
_p("Manuscript Title — replace with your title",
|
|
326
|
+
size=tb["title"]["size_pt"], bold=True,
|
|
327
|
+
space_after=tb["title"].get("space_after_pt", 12))
|
|
328
|
+
|
|
329
|
+
# Authors paragraph with superscript affiliation markers
|
|
330
|
+
authors_p = doc.add_paragraph()
|
|
331
|
+
authors_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
|
332
|
+
authors_p.paragraph_format.first_line_indent = Cm(0)
|
|
333
|
+
authors_p.paragraph_format.space_after = Pt(tb["authors"].get("space_after_pt", 4))
|
|
334
|
+
sep = tb.get("author_separator", ", ")
|
|
335
|
+
samples = [("Author One", "1", True), ("Author Two", "2", False)]
|
|
336
|
+
for idx, (name, aff, corr) in enumerate(samples):
|
|
337
|
+
if idx > 0:
|
|
338
|
+
sep_run = authors_p.add_run(sep)
|
|
339
|
+
sep_run.font.name = latin
|
|
340
|
+
sep_run.font.size = Pt(tb["authors"]["size_pt"])
|
|
341
|
+
set_run_fonts(sep_run, latin, cjk)
|
|
342
|
+
name_run = authors_p.add_run(name)
|
|
343
|
+
name_run.font.name = latin
|
|
344
|
+
name_run.font.size = Pt(tb["authors"]["size_pt"])
|
|
345
|
+
set_run_fonts(name_run, latin, cjk)
|
|
346
|
+
sup_run = authors_p.add_run(aff)
|
|
347
|
+
sup_run.font.superscript = True
|
|
348
|
+
sup_run.font.name = latin
|
|
349
|
+
sup_run.font.size = Pt(tb["authors"]["size_pt"])
|
|
350
|
+
set_run_fonts(sup_run, latin, cjk)
|
|
351
|
+
if corr:
|
|
352
|
+
star = authors_p.add_run(tb.get("corresponding_marker", "*"))
|
|
353
|
+
star.font.superscript = True
|
|
354
|
+
star.font.name = latin
|
|
355
|
+
set_run_fonts(star, latin, cjk)
|
|
356
|
+
|
|
357
|
+
_p("¹ Affiliation one — department, institution, city, country",
|
|
358
|
+
size=tb["affiliations"]["size_pt"], italic=True, space_after=2)
|
|
359
|
+
_p("² Affiliation two — department, institution, city, country",
|
|
360
|
+
size=tb["affiliations"]["size_pt"], italic=True,
|
|
361
|
+
space_after=tb["affiliations"].get("space_after_pt", 8))
|
|
362
|
+
|
|
363
|
+
# Abstract label + placeholder
|
|
364
|
+
ap = doc.add_paragraph()
|
|
365
|
+
ap.paragraph_format.first_line_indent = Cm(0)
|
|
366
|
+
ap.paragraph_format.space_after = Pt(4)
|
|
367
|
+
lab = ap.add_run(tb.get("abstract_label", "Abstract"))
|
|
368
|
+
lab.bold = True
|
|
369
|
+
lab.font.name = latin
|
|
370
|
+
lab.font.size = Pt(tb.get("abstract_font_size_pt", 10))
|
|
371
|
+
set_run_fonts(lab, latin, cjk)
|
|
372
|
+
|
|
373
|
+
abs_p = doc.add_paragraph()
|
|
374
|
+
abs_p.paragraph_format.first_line_indent = Cm(0)
|
|
375
|
+
abs_p.paragraph_format.space_after = Pt(6)
|
|
376
|
+
abs_run = abs_p.add_run(
|
|
377
|
+
"Replace this paragraph with your abstract. Keep it focused on the "
|
|
378
|
+
"problem, approach, key results, and implications. Straight quotes, "
|
|
379
|
+
"hyphens-as-dashes, and missing nbsp before units will be auto-fixed "
|
|
380
|
+
"by convert_md_to_docx.py when --publisher is set."
|
|
381
|
+
)
|
|
382
|
+
abs_run.font.name = latin
|
|
383
|
+
abs_run.font.size = Pt(tb.get("abstract_font_size_pt", 10))
|
|
384
|
+
set_run_fonts(abs_run, latin, cjk)
|
|
385
|
+
|
|
386
|
+
kw_p = doc.add_paragraph()
|
|
387
|
+
kw_p.paragraph_format.first_line_indent = Cm(0)
|
|
388
|
+
kw_p.paragraph_format.space_after = Pt(12)
|
|
389
|
+
lab2 = kw_p.add_run(tb.get("keywords_label", "Keywords") + ": ")
|
|
390
|
+
lab2.bold = True
|
|
391
|
+
lab2.font.name = latin
|
|
392
|
+
lab2.font.size = Pt(tb.get("abstract_font_size_pt", 10))
|
|
393
|
+
set_run_fonts(lab2, latin, cjk)
|
|
394
|
+
kw_val = kw_p.add_run("keyword1; keyword2; keyword3")
|
|
395
|
+
kw_val.font.name = latin
|
|
396
|
+
kw_val.font.size = Pt(tb.get("abstract_font_size_pt", 10))
|
|
397
|
+
set_run_fonts(kw_val, latin, cjk)
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
# ---------------------------------------------------------------------------
|
|
401
|
+
# Main build
|
|
402
|
+
# ---------------------------------------------------------------------------
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
def build_template(publisher_key: str, publisher: dict, out_path: Path) -> int:
|
|
406
|
+
doc = Document()
|
|
407
|
+
|
|
408
|
+
# Page geometry (first section)
|
|
409
|
+
section = doc.sections[0]
|
|
410
|
+
page_cfg = publisher["docx"]["page"]
|
|
411
|
+
hf = publisher["design"]["header_footer"]
|
|
412
|
+
set_section_page(section, page_cfg, title_pg=bool(hf.get("first_page_different")))
|
|
413
|
+
|
|
414
|
+
# Auto-hyphenation
|
|
415
|
+
enable_auto_hyphenation(doc)
|
|
416
|
+
|
|
417
|
+
# Style configuration
|
|
418
|
+
style_count = 0
|
|
419
|
+
style_count += configure_normal_style(doc, publisher)
|
|
420
|
+
style_count += configure_heading_styles(doc, publisher)
|
|
421
|
+
style_count += configure_hyperlink_style(doc, publisher)
|
|
422
|
+
style_count += configure_bibliography_style(doc, publisher)
|
|
423
|
+
style_count += configure_caption_style(doc, publisher)
|
|
424
|
+
|
|
425
|
+
# Self-describing sample title block
|
|
426
|
+
add_sample_title_block(doc, publisher)
|
|
427
|
+
|
|
428
|
+
# Sample section heading so Heading 1 style is exercised
|
|
429
|
+
sh = doc.add_paragraph("1 Introduction", style="Heading 1")
|
|
430
|
+
sh_body = doc.add_paragraph(
|
|
431
|
+
"Replace this paragraph with your manuscript body. This template was "
|
|
432
|
+
"generated from templates/registry.yaml — do not hand-edit. To update "
|
|
433
|
+
"style, edit the registry and rerun scripts/generate_docx_templates.py."
|
|
434
|
+
)
|
|
435
|
+
sh_body.paragraph_format.first_line_indent = Cm(
|
|
436
|
+
publisher["design"]["paragraph"].get("first_line_indent_cm", 0.5)
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
out_path.parent.mkdir(parents=True, exist_ok=True)
|
|
440
|
+
doc.save(str(out_path))
|
|
441
|
+
return style_count
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
def load_registry(path: Path) -> dict:
|
|
445
|
+
with path.open("r", encoding="utf-8") as fh:
|
|
446
|
+
data = yaml.safe_load(fh)
|
|
447
|
+
if "publishers" not in data:
|
|
448
|
+
raise SystemExit(f"registry {path} missing top-level 'publishers' key")
|
|
449
|
+
return data
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
def parse_args() -> argparse.Namespace:
|
|
453
|
+
script_dir = Path(__file__).resolve().parent
|
|
454
|
+
default_registry = script_dir.parent / "templates" / "registry.yaml"
|
|
455
|
+
default_out = script_dir.parent / "templates" / "docx"
|
|
456
|
+
|
|
457
|
+
p = argparse.ArgumentParser(description="Generate publisher DOCX templates")
|
|
458
|
+
p.add_argument("--publisher", help="Only generate this publisher (default: all)")
|
|
459
|
+
p.add_argument("--registry", default=str(default_registry),
|
|
460
|
+
help=f"Path to registry.yaml (default: {default_registry})")
|
|
461
|
+
p.add_argument("--out-dir", default=str(default_out),
|
|
462
|
+
help=f"Output directory for .docx files (default: {default_out})")
|
|
463
|
+
return p.parse_args()
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
def main() -> int:
|
|
467
|
+
args = parse_args()
|
|
468
|
+
registry_path = Path(args.registry).expanduser().resolve()
|
|
469
|
+
out_dir = Path(args.out_dir).expanduser().resolve()
|
|
470
|
+
|
|
471
|
+
if not registry_path.exists():
|
|
472
|
+
print(f"Error: registry not found: {registry_path}", file=sys.stderr)
|
|
473
|
+
return 1
|
|
474
|
+
|
|
475
|
+
registry = load_registry(registry_path)
|
|
476
|
+
publishers = registry["publishers"]
|
|
477
|
+
|
|
478
|
+
if args.publisher:
|
|
479
|
+
if args.publisher not in publishers:
|
|
480
|
+
print(f"Error: publisher {args.publisher!r} not in registry "
|
|
481
|
+
f"(known: {', '.join(publishers)})", file=sys.stderr)
|
|
482
|
+
return 1
|
|
483
|
+
targets = {args.publisher: publishers[args.publisher]}
|
|
484
|
+
else:
|
|
485
|
+
targets = publishers
|
|
486
|
+
|
|
487
|
+
for key, publisher in targets.items():
|
|
488
|
+
out_path = out_dir / f"{key}.docx"
|
|
489
|
+
n = build_template(key, publisher, out_path)
|
|
490
|
+
rel = out_path
|
|
491
|
+
try:
|
|
492
|
+
rel = out_path.relative_to(Path.cwd())
|
|
493
|
+
except ValueError:
|
|
494
|
+
pass
|
|
495
|
+
print(f"generated {rel} ({n} styles applied)")
|
|
496
|
+
return 0
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
if __name__ == "__main__":
|
|
500
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""qa_docx.py — one pass/fail gate for a generated .docx and its Markdown source.
|
|
3
|
+
|
|
4
|
+
The document counterpart of lit-pptx's qa_deck.py. It combines:
|
|
5
|
+
|
|
6
|
+
1. Integrity — plugins/litclaude/lib/ooxml_integrity.py (the package opens,
|
|
7
|
+
relationships resolve, no NaN attribute values, python-docx reopens)
|
|
8
|
+
2. Prose lint — slop_lint rules on the Markdown source (AI-tell phrases, hedging
|
|
9
|
+
pile-ups, stock openers/closers, adjective stacks, Korean rules);
|
|
10
|
+
--kind report drops the journal-manuscript outline rules
|
|
11
|
+
3. Design — slop_lint's DOCX audit (banned fonts, profile margins, booktabs
|
|
12
|
+
tables, highlights, tracked changes, ASCII ellipsis) and the Hangul
|
|
13
|
+
eastAsia font pairing check
|
|
14
|
+
4. Content — the document has body text, every Markdown heading reached it, no
|
|
15
|
+
unfilled blank ([제품명], [금액], XXX, TBD, ○○, {{…}}) is left, and
|
|
16
|
+
no YAML frontmatter leaked into the body
|
|
17
|
+
|
|
18
|
+
Rendering is separate (visual_audit.py) because it needs soffice; a clean gate
|
|
19
|
+
is defect-absence, not a verdict on how the pages read.
|
|
20
|
+
|
|
21
|
+
Usage:
|
|
22
|
+
python3 qa_docx.py out.docx --source draft.md --publisher korean-generic [--kind report]
|
|
23
|
+
python3 qa_docx.py out.docx --source draft.md # plain profile
|
|
24
|
+
|
|
25
|
+
Prints JSON; exit 0 on PASS, 1 on FAIL.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from __future__ import annotations
|
|
29
|
+
|
|
30
|
+
import os as _os
|
|
31
|
+
import sys as _sys
|
|
32
|
+
|
|
33
|
+
_sys.dont_write_bytecode = True # the installed skill directory stays read-only
|
|
34
|
+
_sys.path.insert(0, _os.path.join(_os.path.dirname(_os.path.abspath(__file__)), "..", "..", "..", "lib"))
|
|
35
|
+
from office_runtime_bootstrap import ensure_runtime # noqa: E402
|
|
36
|
+
|
|
37
|
+
ensure_runtime(["docx", "markdown", "bs4", "yaml"])
|
|
38
|
+
|
|
39
|
+
import argparse # noqa: E402
|
|
40
|
+
import json # noqa: E402
|
|
41
|
+
import re # noqa: E402
|
|
42
|
+
from pathlib import Path # noqa: E402
|
|
43
|
+
|
|
44
|
+
from docx import Document # noqa: E402
|
|
45
|
+
from ooxml_integrity import check_package # noqa: E402
|
|
46
|
+
|
|
47
|
+
SCRIPT_DIR = Path(__file__).resolve().parent
|
|
48
|
+
_sys.path.insert(0, str(SCRIPT_DIR))
|
|
49
|
+
import slop_lint # noqa: E402
|
|
50
|
+
|
|
51
|
+
HEADING = re.compile(r"^(#{1,6})\s+(.+?)\s*#*\s*$")
|
|
52
|
+
# A bracket with a digit in it is a citation marker ([1], [S3]); a blank has none.
|
|
53
|
+
PLACEHOLDER = re.compile(
|
|
54
|
+
r"\[(?![^\]\n]*\d)[^\]\n]{1,24}\]|\bX{3,}\b|\bTBD\b|\bTODO\b|○○|OOO|\{\{[^}]*\}\}|_{4,}|_{2,}"
|
|
55
|
+
)
|
|
56
|
+
FRONTMATTER_LEAK = re.compile(r"^(?:---|title:|author:|authors:|date:|subtitle:)\s*", re.M)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def source_headings(markdown_text: str) -> list[str]:
|
|
60
|
+
headings, in_fence = [], False
|
|
61
|
+
for line in markdown_text.splitlines():
|
|
62
|
+
if line.lstrip().startswith(("```", "~~~")):
|
|
63
|
+
in_fence = not in_fence
|
|
64
|
+
continue
|
|
65
|
+
match = None if in_fence else HEADING.match(line)
|
|
66
|
+
if match:
|
|
67
|
+
headings.append(re.sub(r"[*_`]", "", match.group(2)).strip())
|
|
68
|
+
return headings
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def check_content(docx_path: Path, markdown_text: str | None) -> dict:
|
|
72
|
+
document = Document(str(docx_path))
|
|
73
|
+
paragraphs = [p.text.strip() for p in document.paragraphs if p.text.strip()]
|
|
74
|
+
body_chars = sum(len(p) for p in paragraphs) + sum(
|
|
75
|
+
len(cell.text) for table in document.tables for row in table.rows for cell in row.cells
|
|
76
|
+
)
|
|
77
|
+
cells = [cell.text for table in document.tables for row in table.rows for cell in row.cells]
|
|
78
|
+
blanks = sorted({m.group(0) for text in paragraphs + cells for m in PLACEHOLDER.finditer(text)})
|
|
79
|
+
leaked = [p for p in paragraphs[:8] if FRONTMATTER_LEAK.match(p)]
|
|
80
|
+
missing = []
|
|
81
|
+
if markdown_text:
|
|
82
|
+
text = "\n".join(paragraphs)
|
|
83
|
+
for heading in source_headings(markdown_text):
|
|
84
|
+
if heading not in text:
|
|
85
|
+
missing.append(heading)
|
|
86
|
+
return {
|
|
87
|
+
"pass": body_chars > 0 and not missing and not blanks and not leaked,
|
|
88
|
+
"placeholders": blanks[:20],
|
|
89
|
+
"frontmatter_leak": leaked[:4],
|
|
90
|
+
"paragraphs": len(paragraphs),
|
|
91
|
+
"tables": len(document.tables),
|
|
92
|
+
"body_chars": body_chars,
|
|
93
|
+
"missing_headings": missing[:20],
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def lint(source: Path | None, docx_path: Path, publisher_name: str, kind: str) -> dict:
|
|
98
|
+
registry = SCRIPT_DIR.parent / "templates" / "registry.yaml"
|
|
99
|
+
phrase_rules = slop_lint.load_phrase_rules(SCRIPT_DIR.parent / "references" / "slop_phrase_list.yaml")
|
|
100
|
+
publisher = slop_lint.load_publisher(registry, publisher_name)
|
|
101
|
+
findings = []
|
|
102
|
+
locale = "auto"
|
|
103
|
+
if source is not None:
|
|
104
|
+
found, _front, _body, locale = slop_lint.lint_text(source.read_text(encoding="utf-8"), publisher, phrase_rules, "auto")
|
|
105
|
+
findings.extend(found)
|
|
106
|
+
if kind == "report":
|
|
107
|
+
findings = [f for f in findings if f.rule_id not in slop_lint.MANUSCRIPT_ONLY_RULES]
|
|
108
|
+
design = slop_lint.audit_docx_design(docx_path, publisher)
|
|
109
|
+
if locale in {"ko", "mixed"} or source is None:
|
|
110
|
+
design.extend(slop_lint.audit_docx_cjk(docx_path))
|
|
111
|
+
craft_blocking, craft_advisory = slop_lint.audit_docx_craft(docx_path)
|
|
112
|
+
design.extend(craft_blocking)
|
|
113
|
+
as_dict = lambda f: {"rule": f.rule_id, "line": f.line, "section": f.section, "message": f.message, "excerpt": f.excerpt} # noqa: E731
|
|
114
|
+
return {
|
|
115
|
+
"pass": not findings and not design,
|
|
116
|
+
"locale": locale,
|
|
117
|
+
"prose": [as_dict(f) for f in findings][:40],
|
|
118
|
+
"design": [as_dict(f) for f in design][:40],
|
|
119
|
+
"advisories": [as_dict(f) for f in craft_advisory][:40],
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def main(argv: list[str] | None = None) -> int:
|
|
124
|
+
parser = argparse.ArgumentParser(description="Pass/fail gate for a generated DOCX.")
|
|
125
|
+
parser.add_argument("docx", type=Path)
|
|
126
|
+
parser.add_argument("--source", type=Path, default=None, help="Markdown the DOCX was built from")
|
|
127
|
+
parser.add_argument(
|
|
128
|
+
"--publisher",
|
|
129
|
+
default=None,
|
|
130
|
+
help="Profile the DOCX was built with (korean-generic, elsevier, acs, ieee, nature). Omit for the plain profile.",
|
|
131
|
+
)
|
|
132
|
+
parser.add_argument("--kind", choices=("report", "manuscript"), default="report")
|
|
133
|
+
args = parser.parse_args(argv)
|
|
134
|
+
|
|
135
|
+
docx_path = args.docx.expanduser().resolve()
|
|
136
|
+
source = args.source.expanduser().resolve() if args.source else None
|
|
137
|
+
integrity = check_package(docx_path)
|
|
138
|
+
content = check_content(docx_path, source.read_text(encoding="utf-8") if source else None) if integrity["pass"] else {"pass": False}
|
|
139
|
+
# The plain profile has no registry entry; its prose is still linted with the
|
|
140
|
+
# korean-generic phrase rules, and the design audit is limited to what every
|
|
141
|
+
# profile shares.
|
|
142
|
+
lint_report = lint(source, docx_path, args.publisher or "korean-generic", args.kind) if integrity["pass"] else {"pass": False}
|
|
143
|
+
if args.publisher is None and lint_report.get("design"):
|
|
144
|
+
shared = {"rule-45-highlighted-text", "rule-46-tracked-changes", "rule-55-ellipsis", "rule-60-numeric-column-alignment"}
|
|
145
|
+
lint_report["design"] = [f for f in lint_report["design"] if f["rule"] in shared]
|
|
146
|
+
lint_report["pass"] = not lint_report["prose"] and not lint_report["design"]
|
|
147
|
+
|
|
148
|
+
reasons = []
|
|
149
|
+
if not integrity["pass"]:
|
|
150
|
+
reasons.append("integrity: " + "; ".join(integrity["problems"][:5]))
|
|
151
|
+
if content.get("placeholders"):
|
|
152
|
+
reasons.append(f"content: unfilled blanks {content['placeholders'][:5]} — fill them with realistic values and label them as examples or assumptions")
|
|
153
|
+
if content.get("frontmatter_leak"):
|
|
154
|
+
reasons.append("content: YAML frontmatter printed as body text — convert with the converter that reads frontmatter")
|
|
155
|
+
if not content.get("pass") and not content.get("placeholders") and not content.get("frontmatter_leak"):
|
|
156
|
+
reasons.append("content: empty document or headings missing from the output")
|
|
157
|
+
if lint_report.get("prose"):
|
|
158
|
+
reasons.append(f"prose lint: {len(lint_report['prose'])} finding(s)")
|
|
159
|
+
if lint_report.get("design"):
|
|
160
|
+
reasons.append(f"design audit: {len(lint_report['design'])} finding(s)")
|
|
161
|
+
|
|
162
|
+
report = {
|
|
163
|
+
"file": str(docx_path),
|
|
164
|
+
"pass": not reasons,
|
|
165
|
+
"failure_reasons": reasons,
|
|
166
|
+
"profile": args.publisher or "plain",
|
|
167
|
+
"kind": args.kind,
|
|
168
|
+
"integrity": {"pass": integrity["pass"], "problems": integrity["problems"][:20]},
|
|
169
|
+
"content": content,
|
|
170
|
+
"lint": lint_report,
|
|
171
|
+
}
|
|
172
|
+
print(json.dumps(report, ensure_ascii=False, indent=2))
|
|
173
|
+
return 0 if report["pass"] else 1
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
if __name__ == "__main__":
|
|
177
|
+
raise SystemExit(main())
|