@litfamily/litgravity 0.0.0-stage → 0.1.1
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 +38 -0
- package/LICENSE +22 -0
- package/README.md +187 -2
- package/README_ko-KR.md +188 -0
- package/bin/litgravity.mjs +123 -0
- package/lib/agy.mjs +54 -0
- package/lib/bundle.mjs +141 -0
- package/lib/doctor.mjs +184 -0
- package/lib/guard.mjs +12 -0
- package/lib/host-tools.mjs +69 -0
- package/lib/install.mjs +130 -0
- package/lib/list.mjs +39 -0
- package/lib/models.mjs +36 -0
- package/lib/paths.mjs +28 -0
- package/lib/runtime.mjs +81 -0
- package/lib/safe-write.mjs +55 -0
- package/lib/statusline.mjs +99 -0
- package/lib/uninstall.mjs +60 -0
- package/lib/update-check.mjs +28 -0
- package/package.json +51 -4
- package/plugin/agents/.gitkeep +0 -0
- package/plugin/agents/korean-prose-editor.md +62 -0
- package/plugin/agents/korean-style-analyzer.md +59 -0
- package/plugin/agents/librarian-researcher.md +60 -0
- package/plugin/agents/lit-executor.md +61 -0
- package/plugin/agents/lit-planner.md +68 -0
- package/plugin/agents/lit-verifier.md +58 -0
- package/plugin/agents/meaning-preservation-auditor.md +57 -0
- package/plugin/agents/native-flow-reviewer.md +56 -0
- package/plugin/agents/polish-orchestrator.md +60 -0
- package/plugin/agents/qa-runner.md +53 -0
- package/plugin/agents/quality-reviewer.md +58 -0
- package/plugin/hooks/lib/boundary.mjs +106 -0
- package/plugin/hooks/lib/common.mjs +208 -0
- package/plugin/hooks/lib/continuation.mjs +157 -0
- package/plugin/hooks/lib/motion.mjs +142 -0
- package/plugin/hooks/lib/policy.mjs +149 -0
- package/plugin/hooks/lib/prose.mjs +79 -0
- package/plugin/hooks/lib/redact.mjs +23 -0
- package/plugin/hooks/lib/reentry.mjs +93 -0
- package/plugin/hooks/lib/routes.mjs +173 -0
- package/plugin/hooks/lib/transcript.mjs +48 -0
- package/plugin/hooks/post-invocation.mjs +18 -0
- package/plugin/hooks/post-tool-use.mjs +30 -0
- package/plugin/hooks/pre-invocation.mjs +62 -0
- package/plugin/hooks/pre-tool-use.mjs +112 -0
- package/plugin/hooks/session-start.mjs +31 -0
- package/plugin/hooks/stop.mjs +44 -0
- package/plugin/hooks.json +56 -0
- package/plugin/hud/render.mjs +602 -0
- package/plugin/hud/statusline.mjs +20 -0
- package/plugin/lib/host-exec.mjs +133 -0
- package/plugin/lib/python-pick.mjs +63 -0
- package/plugin/plugin.json +6 -0
- package/plugin/rules/AGENTS.md +30 -0
- package/plugin/skills/autoconference/LICENSE +21 -0
- package/plugin/skills/autoconference/PROVENANCE.md +26 -0
- package/plugin/skills/autoconference/SKILL.md +137 -0
- package/plugin/skills/autoconference/assets/conference_template.md +93 -0
- package/plugin/skills/autoconference/assets/report_template.md +59 -0
- package/plugin/skills/autoconference/assets/synthesis_template.md +52 -0
- package/plugin/skills/autoconference/modes/analyze.md +181 -0
- package/plugin/skills/autoconference/modes/core.md +244 -0
- package/plugin/skills/autoconference/modes/debate.md +240 -0
- package/plugin/skills/autoconference/modes/plan.md +220 -0
- package/plugin/skills/autoconference/modes/resume.md +172 -0
- package/plugin/skills/autoconference/modes/ship.md +247 -0
- package/plugin/skills/autoconference/modes/survey.md +218 -0
- package/plugin/skills/autoconference/references/agent-prompts.md +488 -0
- package/plugin/skills/autoconference/references/conference-protocol.md +332 -0
- package/plugin/skills/autoconference/references/convergence-guide.md +157 -0
- package/plugin/skills/autoconference/references/core-principles.md +93 -0
- package/plugin/skills/autoconference/references/crash-recovery.md +137 -0
- package/plugin/skills/autoconference/references/results-logging.md +200 -0
- package/plugin/skills/autoconference/references/visualization-guide.md +83 -0
- package/plugin/skills/autoconference/scripts/check_conference.sh +184 -0
- package/plugin/skills/autoconference/scripts/init_conference.py +392 -0
- package/plugin/skills/autoconference/scripts/style_presets.py +142 -0
- package/plugin/skills/autoconference/templates/code-performance.md +82 -0
- package/plugin/skills/autoconference/templates/debate-mode.md +58 -0
- package/plugin/skills/autoconference/templates/prompt-optimization.md +81 -0
- package/plugin/skills/autoconference/templates/quick-conference.md +70 -0
- package/plugin/skills/autoconference/templates/research-synthesis.md +76 -0
- package/plugin/skills/autoconference/templates/survey-mode.md +70 -0
- package/plugin/skills/autoresearch/LICENSE +21 -0
- package/plugin/skills/autoresearch/PROVENANCE.md +22 -0
- package/plugin/skills/autoresearch/SKILL.md +204 -0
- package/plugin/skills/autoresearch/assets/report_template.md +58 -0
- package/plugin/skills/autoresearch/assets/research_template.md +46 -0
- package/plugin/skills/autoresearch/assets/results_template.tsv +1 -0
- package/plugin/skills/autoresearch/modes/core.md +148 -0
- package/plugin/skills/autoresearch/modes/debug.md +175 -0
- package/plugin/skills/autoresearch/modes/fix.md +126 -0
- package/plugin/skills/autoresearch/modes/learn.md +77 -0
- package/plugin/skills/autoresearch/modes/plan.md +177 -0
- package/plugin/skills/autoresearch/modes/predict.md +170 -0
- package/plugin/skills/autoresearch/modes/reason.md +131 -0
- package/plugin/skills/autoresearch/modes/scenario.md +118 -0
- package/plugin/skills/autoresearch/modes/security.md +206 -0
- package/plugin/skills/autoresearch/modes/ship.md +39 -0
- package/plugin/skills/autoresearch/references/core-principles.md +91 -0
- package/plugin/skills/autoresearch/references/evaluator-contract.md +134 -0
- package/plugin/skills/autoresearch/references/investigation-techniques.md +149 -0
- package/plugin/skills/autoresearch/references/owasp-checklist.md +175 -0
- package/plugin/skills/autoresearch/references/persona-templates.md +171 -0
- package/plugin/skills/autoresearch/references/results-logging.md +100 -0
- package/plugin/skills/autoresearch/references/scenario-dimensions.md +186 -0
- package/plugin/skills/autoresearch/references/stride-model.md +192 -0
- package/plugin/skills/autoresearch/references/stuck-detection.md +105 -0
- package/plugin/skills/autoresearch/references/type-checklists.md +156 -0
- package/plugin/skills/autoresearch/references/upstream-family-contract.md +120 -0
- package/plugin/skills/autoresearch/references/visualization-guide.md +84 -0
- package/plugin/skills/autoresearch/scripts/check_progress.sh +293 -0
- package/plugin/skills/autoresearch/scripts/init_research.py +380 -0
- package/plugin/skills/autoresearch/scripts/run_with_deadline.py +207 -0
- package/plugin/skills/autoresearch/scripts/style_presets.py +156 -0
- package/plugin/skills/browser-drive/SKILL.md +138 -0
- package/plugin/skills/browser-drive/references/blocker-codes.md +31 -0
- package/plugin/skills/browser-drive/references/cleanup-receipts.md +52 -0
- package/plugin/skills/browser-drive/references/credential-and-approval-boundaries.md +49 -0
- package/plugin/skills/browser-drive/references/playwright-recipes.md +75 -0
- package/plugin/skills/browser-drive/references/snapshot-act-loop.md +65 -0
- package/plugin/skills/browser-drive/scripts/capability-probe.mjs +483 -0
- package/plugin/skills/browser-drive/scripts/secret-shapes.mjs +56 -0
- package/plugin/skills/browser-drive/templates/drive.cjs +52 -0
- package/plugin/skills/comment-checker/SKILL.md +144 -0
- package/plugin/skills/comment-checker/references/comment-policy.md +109 -0
- package/plugin/skills/debugging/SKILL.md +187 -0
- package/plugin/skills/debugging/references/methodology/00-setup.md +115 -0
- package/plugin/skills/debugging/references/methodology/02-investigate.md +107 -0
- package/plugin/skills/debugging/references/methodology/04-oracle-triple.md +116 -0
- package/plugin/skills/debugging/references/methodology/05-escalate.md +73 -0
- package/plugin/skills/debugging/references/methodology/06-fix.md +111 -0
- package/plugin/skills/debugging/references/methodology/08-qa.md +87 -0
- package/plugin/skills/debugging/references/methodology/09-cleanup.md +162 -0
- package/plugin/skills/debugging/references/methodology/partial-runtime-evidence.md +186 -0
- package/plugin/skills/debugging/references/runtimes/bundled-js-binary.md +359 -0
- package/plugin/skills/debugging/references/runtimes/go.md +204 -0
- package/plugin/skills/debugging/references/runtimes/native-binary.md +406 -0
- package/plugin/skills/debugging/references/runtimes/node.md +227 -0
- package/plugin/skills/debugging/references/runtimes/python.md +215 -0
- package/plugin/skills/debugging/references/runtimes/rust.md +205 -0
- package/plugin/skills/debugging/references/tools/ghidra.md +150 -0
- package/plugin/skills/debugging/references/tools/playwright-cli.md +179 -0
- package/plugin/skills/debugging/references/tools/pwndbg.md +223 -0
- package/plugin/skills/debugging/references/tools/pwntools.md +217 -0
- package/plugin/skills/deep-interview/SKILL.md +305 -0
- package/plugin/skills/deep-interview/references/headless-and-resume.md +35 -0
- package/plugin/skills/deep-interview/references/question-craft.md +76 -0
- package/plugin/skills/deep-interview/references/scoring-and-gates.md +69 -0
- package/plugin/skills/deep-interview/scripts/render-progress.mjs +165 -0
- package/plugin/skills/deep-interview/templates/context.md +38 -0
- package/plugin/skills/deep-interview/templates/spec.md +68 -0
- package/plugin/skills/deep-interview/templates/state.json +35 -0
- package/plugin/skills/frontend-ui-ux/ATTRIBUTION.md +23 -0
- package/plugin/skills/frontend-ui-ux/LICENSE +21 -0
- package/plugin/skills/frontend-ui-ux/PROVENANCE.json +38 -0
- package/plugin/skills/frontend-ui-ux/SKILL.md +153 -0
- package/plugin/skills/frontend-ui-ux/SOURCE-MANIFEST.json +1060 -0
- package/plugin/skills/frontend-ui-ux/THIRD-PARTY-NOTICE.txt +14 -0
- package/plugin/skills/frontend-ui-ux/data/design-intelligence.json +1 -0
- package/plugin/skills/frontend-ui-ux/examples/design-contract.example.json +186 -0
- package/plugin/skills/frontend-ui-ux/examples/phase-3-readme-ab/README.md +9 -0
- package/plugin/skills/frontend-ui-ux/references/_canonical-corpus/legal/frontend-ATTRIBUTION.md +217 -0
- package/plugin/skills/frontend-ui-ux/references/_canonical-corpus/legal/frontend-LICENSE-Apache-2.0.txt +201 -0
- package/plugin/skills/frontend-ui-ux/references/_canonical-corpus/legal/root-LICENSE +21 -0
- package/plugin/skills/frontend-ui-ux/references/_canonical-corpus/manifest.json +873 -0
- package/plugin/skills/frontend-ui-ux/references/adaptive-layout.md +103 -0
- package/plugin/skills/frontend-ui-ux/references/brand-and-imagery.md +96 -0
- package/plugin/skills/frontend-ui-ux/references/complete-contract.md +415 -0
- package/plugin/skills/frontend-ui-ux/references/composition.md +93 -0
- package/plugin/skills/frontend-ui-ux/references/craft-floor.md +203 -0
- package/plugin/skills/frontend-ui-ux/references/creative-directions.md +96 -0
- package/plugin/skills/frontend-ui-ux/references/default-editorial-pixel.json +27 -0
- package/plugin/skills/frontend-ui-ux/references/design/README.md +248 -0
- package/plugin/skills/frontend-ui-ux/references/design/_INDEX.md +191 -0
- package/plugin/skills/frontend-ui-ux/references/design/airbnb.md +393 -0
- package/plugin/skills/frontend-ui-ux/references/design/airtable.md +92 -0
- package/plugin/skills/frontend-ui-ux/references/design/apple.md +250 -0
- package/plugin/skills/frontend-ui-ux/references/design/aside.md +209 -0
- package/plugin/skills/frontend-ui-ux/references/design/binance.md +348 -0
- package/plugin/skills/frontend-ui-ux/references/design/bmw.md +183 -0
- package/plugin/skills/frontend-ui-ux/references/design/brutalist-skill.md +92 -0
- package/plugin/skills/frontend-ui-ux/references/design/bugatti.md +271 -0
- package/plugin/skills/frontend-ui-ux/references/design/cal.md +262 -0
- package/plugin/skills/frontend-ui-ux/references/design/claude.md +315 -0
- package/plugin/skills/frontend-ui-ux/references/design/clay.md +307 -0
- package/plugin/skills/frontend-ui-ux/references/design/clickhouse.md +284 -0
- package/plugin/skills/frontend-ui-ux/references/design/clone-from-url.md +65 -0
- package/plugin/skills/frontend-ui-ux/references/design/cohere.md +269 -0
- package/plugin/skills/frontend-ui-ux/references/design/coinbase.md +132 -0
- package/plugin/skills/frontend-ui-ux/references/design/composio.md +310 -0
- package/plugin/skills/frontend-ui-ux/references/design/cursor.md +312 -0
- package/plugin/skills/frontend-ui-ux/references/design/design-system-architecture.md +244 -0
- package/plugin/skills/frontend-ui-ux/references/design/elevenlabs.md +268 -0
- package/plugin/skills/frontend-ui-ux/references/design/expo.md +284 -0
- package/plugin/skills/frontend-ui-ux/references/design/ferrari.md +317 -0
- package/plugin/skills/frontend-ui-ux/references/design/figma.md +223 -0
- package/plugin/skills/frontend-ui-ux/references/design/framer.md +249 -0
- package/plugin/skills/frontend-ui-ux/references/design/gpt-tasteskill.md +74 -0
- package/plugin/skills/frontend-ui-ux/references/design/hashicorp.md +281 -0
- package/plugin/skills/frontend-ui-ux/references/design/ibm.md +335 -0
- package/plugin/skills/frontend-ui-ux/references/design/image-to-code-skill.md +1228 -0
- package/plugin/skills/frontend-ui-ux/references/design/imagegen-brandkit.md +798 -0
- package/plugin/skills/frontend-ui-ux/references/design/imagegen-frontend-mobile.md +1465 -0
- package/plugin/skills/frontend-ui-ux/references/design/imagegen-frontend-web.md +987 -0
- package/plugin/skills/frontend-ui-ux/references/design/intercom.md +149 -0
- package/plugin/skills/frontend-ui-ux/references/design/kraken.md +128 -0
- package/plugin/skills/frontend-ui-ux/references/design/lamborghini.md +291 -0
- package/plugin/skills/frontend-ui-ux/references/design/layout-skill.md +107 -0
- package/plugin/skills/frontend-ui-ux/references/design/lazyweb.md +77 -0
- package/plugin/skills/frontend-ui-ux/references/design/linear.app.md +370 -0
- package/plugin/skills/frontend-ui-ux/references/design/lovable.md +301 -0
- package/plugin/skills/frontend-ui-ux/references/design/mastercard.md +368 -0
- package/plugin/skills/frontend-ui-ux/references/design/meta.md +369 -0
- package/plugin/skills/frontend-ui-ux/references/design/minimalist-skill.md +85 -0
- package/plugin/skills/frontend-ui-ux/references/design/minimax.md +260 -0
- package/plugin/skills/frontend-ui-ux/references/design/mintlify.md +329 -0
- package/plugin/skills/frontend-ui-ux/references/design/miro.md +111 -0
- package/plugin/skills/frontend-ui-ux/references/design/mistral.ai.md +264 -0
- package/plugin/skills/frontend-ui-ux/references/design/mongodb.md +269 -0
- package/plugin/skills/frontend-ui-ux/references/design/nike.md +366 -0
- package/plugin/skills/frontend-ui-ux/references/design/notion.md +312 -0
- package/plugin/skills/frontend-ui-ux/references/design/nvidia.md +296 -0
- package/plugin/skills/frontend-ui-ux/references/design/ollama.md +270 -0
- package/plugin/skills/frontend-ui-ux/references/design/opencode.ai.md +284 -0
- package/plugin/skills/frontend-ui-ux/references/design/output-skill.md +49 -0
- package/plugin/skills/frontend-ui-ux/references/design/pinterest.md +233 -0
- package/plugin/skills/frontend-ui-ux/references/design/playstation.md +367 -0
- package/plugin/skills/frontend-ui-ux/references/design/posthog.md +259 -0
- package/plugin/skills/frontend-ui-ux/references/design/raycast.md +271 -0
- package/plugin/skills/frontend-ui-ux/references/design/react-dev-tooling-skill.md +230 -0
- package/plugin/skills/frontend-ui-ux/references/design/redesign-skill.md +178 -0
- package/plugin/skills/frontend-ui-ux/references/design/renault.md +314 -0
- package/plugin/skills/frontend-ui-ux/references/design/replicate.md +264 -0
- package/plugin/skills/frontend-ui-ux/references/design/resend.md +306 -0
- package/plugin/skills/frontend-ui-ux/references/design/revolut.md +188 -0
- package/plugin/skills/frontend-ui-ux/references/design/runwayml.md +247 -0
- package/plugin/skills/frontend-ui-ux/references/design/sanity.md +360 -0
- package/plugin/skills/frontend-ui-ux/references/design/sentry.md +265 -0
- package/plugin/skills/frontend-ui-ux/references/design/shopify.md +353 -0
- package/plugin/skills/frontend-ui-ux/references/design/soft-skill.md +98 -0
- package/plugin/skills/frontend-ui-ux/references/design/spacex.md +197 -0
- package/plugin/skills/frontend-ui-ux/references/design/spotify.md +249 -0
- package/plugin/skills/frontend-ui-ux/references/design/starbucks.md +583 -0
- package/plugin/skills/frontend-ui-ux/references/design/stitch-design-example.md +121 -0
- package/plugin/skills/frontend-ui-ux/references/design/stitch-skill.md +184 -0
- package/plugin/skills/frontend-ui-ux/references/design/stripe.md +325 -0
- package/plugin/skills/frontend-ui-ux/references/design/supabase.md +258 -0
- package/plugin/skills/frontend-ui-ux/references/design/superhuman.md +255 -0
- package/plugin/skills/frontend-ui-ux/references/design/taste-skill.md +1206 -0
- package/plugin/skills/frontend-ui-ux/references/design/tesla.md +289 -0
- package/plugin/skills/frontend-ui-ux/references/design/theverge.md +342 -0
- package/plugin/skills/frontend-ui-ux/references/design/together.ai.md +266 -0
- package/plugin/skills/frontend-ui-ux/references/design/uber.md +298 -0
- package/plugin/skills/frontend-ui-ux/references/design/vercel.md +313 -0
- package/plugin/skills/frontend-ui-ux/references/design/vodafone.md +426 -0
- package/plugin/skills/frontend-ui-ux/references/design/voltagent.md +326 -0
- package/plugin/skills/frontend-ui-ux/references/design/warp.md +256 -0
- package/plugin/skills/frontend-ui-ux/references/design/webflow.md +95 -0
- package/plugin/skills/frontend-ui-ux/references/design/wired.md +281 -0
- package/plugin/skills/frontend-ui-ux/references/design/wise.md +176 -0
- package/plugin/skills/frontend-ui-ux/references/design/x.ai.md +260 -0
- package/plugin/skills/frontend-ui-ux/references/design/zapier.md +331 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/EVIDENCE.md +97 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/README.md +48 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/UPSTREAM.md +80 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/lane-a-direction.md +64 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/lane-b-execution.md +65 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/lane-c-review.md +65 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/lane-d-memory.md +83 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/orchestration.md +80 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/routing.md +79 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/LICENSE +21 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/content-writer.md +132 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-builder.md +109 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-critic.md +89 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-lead.md +113 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-scout.md +78 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-strategist.md +121 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/inspiration-scout.md +107 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/agents/motion-designer.md +120 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/accessible-content/reference.md +101 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/adaptive-interfaces/reference.md +109 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/cognitive-accessibility/reference.md +107 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-debate/reference.md +199 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-debt-tracker/reference.md +174 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-handoff/reference.md +125 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-md/reference.md +106 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-retrospective/reference.md +266 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-review/reference.md +123 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-system-alignment/reference.md +120 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/designpowers-critique/reference.md +164 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/heuristic-evaluation/reference.md +85 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/inclusive-personas/reference.md +98 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/inspiration-scouting/reference.md +165 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/interaction-design/reference.md +122 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/motion-choreography/reference.md +81 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/research-planning/reference.md +96 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/responsive-patterns/reference.md +77 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/synthetic-user-testing/reference.md +192 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/taste-feedback/reference.md +165 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/taste-report/reference.md +78 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/token-architecture/reference.md +75 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/ui-composition/reference.md +117 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/usability-testing/reference.md +78 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/verification-before-shipping/reference.md +125 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/voice-and-tone/reference.md +79 -0
- package/plugin/skills/frontend-ui-ux/references/designpowers/vendor/skills/writing-design-plans/reference.md +119 -0
- package/plugin/skills/frontend-ui-ux/references/evidence-review.md +119 -0
- package/plugin/skills/frontend-ui-ux/references/implementation-platforms.md +115 -0
- package/plugin/skills/frontend-ui-ux/references/inclusive-interface.md +98 -0
- package/plugin/skills/frontend-ui-ux/references/interaction-motion.md +48 -0
- package/plugin/skills/frontend-ui-ux/references/motion-guide.md +153 -0
- package/plugin/skills/frontend-ui-ux/references/operating-lanes.md +101 -0
- package/plugin/skills/frontend-ui-ux/references/perfection/README.md +160 -0
- package/plugin/skills/frontend-ui-ux/references/perfection/react-perf-tooling.md +127 -0
- package/plugin/skills/frontend-ui-ux/references/performance-delivery.md +91 -0
- package/plugin/skills/frontend-ui-ux/references/product-direction.md +92 -0
- package/plugin/skills/frontend-ui-ux/references/production-interview.md +71 -0
- package/plugin/skills/frontend-ui-ux/references/redesign-playbook.md +103 -0
- package/plugin/skills/frontend-ui-ux/references/slop-register.md +139 -0
- package/plugin/skills/frontend-ui-ux/references/system-foundations.md +90 -0
- package/plugin/skills/frontend-ui-ux/references/taste-direction.md +79 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/README.md +659 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/charts.csv +26 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/colors.csv +162 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/icons.csv +106 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/landing.csv +35 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/products.csv +162 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/react-performance.csv +45 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/styles.csv +85 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/typography.csv +74 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/ui-reasoning.csv +162 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/data/web-interface.csv +31 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/scripts/core.py +262 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/scripts/design_system.py +1148 -0
- package/plugin/skills/frontend-ui-ux/references/ui-ux-db/scripts/search.py +114 -0
- package/plugin/skills/frontend-ui-ux/references/visual-language.md +90 -0
- package/plugin/skills/frontend-ui-ux/references/visual-reconstruction.md +55 -0
- package/plugin/skills/frontend-ui-ux/schemas/design-contract-v1alpha1.schema.json +306 -0
- package/plugin/skills/frontend-ui-ux/schemas/design-contract-v1beta1.schema.json +291 -0
- package/plugin/skills/frontend-ui-ux/schemas/design-contract-v1beta2.schema.json +311 -0
- package/plugin/skills/frontend-ui-ux/scripts/chrome-driver.mjs +216 -0
- package/plugin/skills/frontend-ui-ux/scripts/design-contract-format.mjs +286 -0
- package/plugin/skills/frontend-ui-ux/scripts/design-contract-inventory-rules.mjs +354 -0
- package/plugin/skills/frontend-ui-ux/scripts/design-contract-rules.mjs +361 -0
- package/plugin/skills/frontend-ui-ux/scripts/design-contract-surface-rules.mjs +313 -0
- package/plugin/skills/frontend-ui-ux/scripts/design-data.mjs +68 -0
- package/plugin/skills/frontend-ui-ux/scripts/errors.mjs +12 -0
- package/plugin/skills/frontend-ui-ux/scripts/import-design-intelligence.mjs +124 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +1534 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +141 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-server.mjs +57 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-static.mjs +129 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe.mjs +289 -0
- package/plugin/skills/frontend-ui-ux/scripts/json-boundary.mjs +63 -0
- package/plugin/skills/frontend-ui-ux/scripts/query-design-intelligence.mjs +106 -0
- package/plugin/skills/frontend-ui-ux/scripts/search.mjs +43 -0
- package/plugin/skills/frontend-ui-ux/scripts/source-replay.mjs +153 -0
- package/plugin/skills/frontend-ui-ux/scripts/strict-json.mjs +143 -0
- package/plugin/skills/frontend-ui-ux/scripts/validate-design-contract.mjs +52 -0
- package/plugin/skills/frontend-ui-ux/scripts/verify-corpus.mjs +90 -0
- package/plugin/skills/lit-brainstorm/SKILL.md +228 -0
- package/plugin/skills/lit-brainstorm/references/convergence-matrices.md +39 -0
- package/plugin/skills/lit-brainstorm/references/idea-lenses.md +71 -0
- package/plugin/skills/lit-brainstorm/references/lane-prompts.md +35 -0
- package/plugin/skills/lit-brainstorm/references/scoring-rubric.md +33 -0
- package/plugin/skills/lit-brainstorm/references/session-walkthrough.md +58 -0
- package/plugin/skills/lit-brainstorm/references/technique-catalog.md +41 -0
- package/plugin/skills/lit-brainstorm/references/techniques-generate.md +50 -0
- package/plugin/skills/lit-brainstorm/references/techniques-reframe.md +30 -0
- package/plugin/skills/lit-brainstorm/references/techniques-structure.md +36 -0
- package/plugin/skills/lit-brainstorm/templates/handoff-packet.md +23 -0
- package/plugin/skills/lit-brainstorm/templates/session-board.md +45 -0
- package/plugin/skills/lit-brainstorm/templates/shortlist.md +31 -0
- package/plugin/skills/lit-burnoff/SKILL.md +222 -0
- package/plugin/skills/lit-burnoff/references/behavior-preserving-cleanup.md +75 -0
- package/plugin/skills/lit-burnoff/references/prose-and-docs.md +31 -0
- package/plugin/skills/lit-burnoff/references/slop-categories.md +75 -0
- package/plugin/skills/lit-burnoff/templates/report.md +17 -0
- package/plugin/skills/lit-burnoff-file/SKILL.md +177 -0
- package/plugin/skills/lit-burnoff-file/references/triage-examples.md +76 -0
- package/plugin/skills/lit-burnoff-file/templates/report.md +17 -0
- package/plugin/skills/lit-code/SKILL.md +239 -0
- package/plugin/skills/lit-code/references/core/agy-surfaces-and-verification.md +95 -0
- package/plugin/skills/lit-code/references/core/cross-language-stack.md +74 -0
- package/plugin/skills/lit-code/references/core/file-size-ceiling.md +133 -0
- package/plugin/skills/lit-code/references/core/language-jump-table.md +143 -0
- package/plugin/skills/lit-code/references/core/post-write-review.md +77 -0
- package/plugin/skills/lit-code/references/core/shared-rules.md +92 -0
- package/plugin/skills/lit-code/references/core/tdd-discipline.md +82 -0
- package/plugin/skills/lit-code/references/engineering-risk-signals.md +123 -0
- package/plugin/skills/lit-code/references/go/README.md +104 -0
- package/plugin/skills/lit-code/references/go/backend-stack.md +717 -0
- package/plugin/skills/lit-code/references/go/bootstrap.md +350 -0
- package/plugin/skills/lit-code/references/go/bubbletea-v2.md +356 -0
- package/plugin/skills/lit-code/references/go/cobra-stack.md +446 -0
- package/plugin/skills/lit-code/references/go/concurrency.md +443 -0
- package/plugin/skills/lit-code/references/go/data-modeling.md +372 -0
- package/plugin/skills/lit-code/references/go/error-handling.md +379 -0
- package/plugin/skills/lit-code/references/go/golangci-strict.md +285 -0
- package/plugin/skills/lit-code/references/go/grpc-connect.md +458 -0
- package/plugin/skills/lit-code/references/go/libraries.md +327 -0
- package/plugin/skills/lit-code/references/go/one-liners.md +223 -0
- package/plugin/skills/lit-code/references/go/sqlc-pgx.md +517 -0
- package/plugin/skills/lit-code/references/go/testing.md +453 -0
- package/plugin/skills/lit-code/references/go/type-patterns.md +347 -0
- package/plugin/skills/lit-code/references/observability-contracts.md +106 -0
- package/plugin/skills/lit-code/references/python/README.md +313 -0
- package/plugin/skills/lit-code/references/python/async-anyio.md +487 -0
- package/plugin/skills/lit-code/references/python/data-modeling.md +264 -0
- package/plugin/skills/lit-code/references/python/data-processing.md +156 -0
- package/plugin/skills/lit-code/references/python/error-handling.md +300 -0
- package/plugin/skills/lit-code/references/python/fastapi-stack.md +368 -0
- package/plugin/skills/lit-code/references/python/httpx2-optimization.md +445 -0
- package/plugin/skills/lit-code/references/python/libraries.md +342 -0
- package/plugin/skills/lit-code/references/python/one-liners.md +290 -0
- package/plugin/skills/lit-code/references/python/orjson-stack.md +389 -0
- package/plugin/skills/lit-code/references/python/pydantic-ai.md +335 -0
- package/plugin/skills/lit-code/references/python/pyproject-strict.md +265 -0
- package/plugin/skills/lit-code/references/python/textual-tui.md +243 -0
- package/plugin/skills/lit-code/references/python/type-patterns.md +258 -0
- package/plugin/skills/lit-code/references/rust/README.md +338 -0
- package/plugin/skills/lit-code/references/rust/async-tokio.md +324 -0
- package/plugin/skills/lit-code/references/rust/axum-stack.md +563 -0
- package/plugin/skills/lit-code/references/rust/cargo-strict.md +357 -0
- package/plugin/skills/lit-code/references/rust/clap-stack.md +482 -0
- package/plugin/skills/lit-code/references/rust/concurrency.md +396 -0
- package/plugin/skills/lit-code/references/rust/libraries.md +467 -0
- package/plugin/skills/lit-code/references/rust/one-liners.md +294 -0
- package/plugin/skills/lit-code/references/rust/proptest-insta.md +418 -0
- package/plugin/skills/lit-code/references/rust/type-state.md +496 -0
- package/plugin/skills/lit-code/references/rust/unsafe-discipline.md +282 -0
- package/plugin/skills/lit-code/references/rust/zero-cost-safety.md +546 -0
- package/plugin/skills/lit-code/references/rust-ub/README.md +294 -0
- package/plugin/skills/lit-code/references/rust-ub/miri-sanitizers-loom.md +477 -0
- package/plugin/skills/lit-code/references/rust-ub/ub-taxonomy.md +302 -0
- package/plugin/skills/lit-code/references/typescript/README.md +191 -0
- package/plugin/skills/lit-code/references/typescript/backend-hono.md +703 -0
- package/plugin/skills/lit-code/references/typescript/bootstrap.md +185 -0
- package/plugin/skills/lit-code/references/typescript/data-modeling.md +244 -0
- package/plugin/skills/lit-code/references/typescript/error-handling.md +219 -0
- package/plugin/skills/lit-code/references/typescript/tsconfig-strict.md +193 -0
- package/plugin/skills/lit-code/references/typescript/type-patterns.md +290 -0
- package/plugin/skills/lit-code/scripts/go/check-no-excuse-rules.sh +173 -0
- package/plugin/skills/lit-code/scripts/go/new-project.py +138 -0
- package/plugin/skills/lit-code/scripts/go/templates/.editorconfig +13 -0
- package/plugin/skills/lit-code/scripts/go/templates/.golangci.yml +95 -0
- package/plugin/skills/lit-code/scripts/go/templates/AGENTS.md.tmpl +24 -0
- package/plugin/skills/lit-code/scripts/go/templates/README.md.tmpl +12 -0
- package/plugin/skills/lit-code/scripts/go/templates/Taskfile.yml +40 -0
- package/plugin/skills/lit-code/scripts/go/templates/ci.yml +37 -0
- package/plugin/skills/lit-code/scripts/go/templates/config.go +24 -0
- package/plugin/skills/lit-code/scripts/go/templates/gitignore +15 -0
- package/plugin/skills/lit-code/scripts/go/templates/main.go.tmpl +22 -0
- package/plugin/skills/lit-code/scripts/go/templates/run.go +15 -0
- package/plugin/skills/lit-code/scripts/python/check-no-excuse-rules.py +687 -0
- package/plugin/skills/lit-code/scripts/python/new-project.py +172 -0
- package/plugin/skills/lit-code/scripts/python/new-script.py +116 -0
- package/plugin/skills/lit-code/scripts/rust/check-no-excuse-rules.py +296 -0
- package/plugin/skills/lit-code/scripts/rust/check-no-excuse-rules.sh +158 -0
- package/plugin/skills/lit-code/scripts/rust/new-project.py +175 -0
- package/plugin/skills/lit-code/scripts/typescript/check-no-excuse-rules.ts +344 -0
- package/plugin/skills/lit-code/scripts/typescript/new-project.ts +174 -0
- package/plugin/skills/lit-commit/SKILL.md +148 -0
- package/plugin/skills/lit-commit/references/safe-git-operations.md +154 -0
- package/plugin/skills/lit-comprehend/SKILL.md +244 -0
- package/plugin/skills/lit-comprehend/assets/explainer-scaffold.html +257 -0
- package/plugin/skills/lit-comprehend/references/artifact-template.md +173 -0
- package/plugin/skills/lit-comprehend/references/micro-worlds.md +174 -0
- package/plugin/skills/lit-comprehend/scripts/verify-explainer.mjs +357 -0
- package/plugin/skills/lit-crucible/SKILL.md +151 -0
- package/plugin/skills/lit-crucible/references/adversarial-workflow.md +134 -0
- package/plugin/skills/lit-crucible/references/lane-briefs.md +69 -0
- package/plugin/skills/lit-crucible/templates/crucible.md +37 -0
- package/plugin/skills/lit-diagram-drawer/NOTICE +33 -0
- package/plugin/skills/lit-diagram-drawer/SKILL.md +177 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-architecture-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-architecture-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-architecture-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bar-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bar-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bar-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-beeswarm-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-beeswarm-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-beeswarm-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bubble-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bubble-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bubble-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bump-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bump-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-bump-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-data-flow-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-data-flow-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-data-flow-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-datalake-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-datalake-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-datalake-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-db-schema-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-db-schema-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-db-schema-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dependency-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dependency-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dependency-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-deployment-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-deployment-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-deployment-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dp-integration-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dp-integration-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dp-integration-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-er-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-er-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-er-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-fishbone-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-fishbone-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-fishbone-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-flowchart-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-flowchart-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-flowchart-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-gantt-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-gantt-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-gantt-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-heatmap-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-heatmap-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-heatmap-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-high-level-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-high-level-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-high-level-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-drawio-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-drawio-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-drawio-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-it-state-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-it-state-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-it-state-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-journey-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-journey-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-journey-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-kanban-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-kanban-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-kanban-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-layers-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-layers-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-layers-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-line-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-line-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-line-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-loop-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-loop-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-loop-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-marimekko-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-marimekko-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-marimekko-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-medallion-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-medallion-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-medallion-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-nested-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-nested-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-nested-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-org-chart-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-org-chart-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-org-chart-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-polar-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-polar-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-polar-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-process-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-process-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-process-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-pyramid-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-pyramid-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-pyramid-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-quadrant-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-quadrant-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-quadrant-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-queue-animated-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-queue-animated-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-queue-animated-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-radar-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-radar-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-radar-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-ridgeline-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-ridgeline-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-ridgeline-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sankey-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sankey-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sankey-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-scatter-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-scatter-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-scatter-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sequence-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sequence-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sequence-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-slopegraph-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-slopegraph-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-slopegraph-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-state-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-state-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-state-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-story-map-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-story-map-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-story-map-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-streamgraph-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-streamgraph-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-streamgraph-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-swimlane-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-swimlane-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-swimlane-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-timeline-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-timeline-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-timeline-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-tree-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-tree-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-tree-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-treemap-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-treemap-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-treemap-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-uml-class-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-uml-class-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-uml-class-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-venn-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-venn-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-venn-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-wardley-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-wardley-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-wardley-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-waterfall-dark.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-waterfall-full.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/examples/type-waterfall-light.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/fonts/OFL.txt +94 -0
- package/plugin/skills/lit-diagram-drawer/assets/fonts/PretendardVariable.woff2 +0 -0
- package/plugin/skills/lit-diagram-drawer/assets/fonts/provenance.json +22 -0
- package/plugin/skills/lit-diagram-drawer/assets/icons.html +231 -0
- package/plugin/skills/lit-diagram-drawer/assets/index.html +1 -0
- package/plugin/skills/lit-diagram-drawer/assets/licenses/devicon-MIT.txt +20 -0
- package/plugin/skills/lit-diagram-drawer/assets/licenses/diagram-design-MIT.txt +21 -0
- package/plugin/skills/lit-diagram-drawer/assets/licenses/log-z-MIT.txt +21 -0
- package/plugin/skills/lit-diagram-drawer/assets/licenses/simple-icons-CC0.md +30 -0
- package/plugin/skills/lit-diagram-drawer/assets/licenses/tabler-MIT.txt +21 -0
- package/plugin/skills/lit-diagram-drawer/examples/01-service-architecture/after.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/01-service-architecture/brief.md +33 -0
- package/plugin/skills/lit-diagram-drawer/examples/01-service-architecture/constructed-naive-foil.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/02-release-decision/after.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/02-release-decision/brief.md +18 -0
- package/plugin/skills/lit-diagram-drawer/examples/02-release-decision/constructed-naive-foil.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/03-data-retention/after.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/03-data-retention/brief.md +19 -0
- package/plugin/skills/lit-diagram-drawer/examples/03-data-retention/constructed-naive-foil.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/04-oauth-sequence/after.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/04-oauth-sequence/brief.md +17 -0
- package/plugin/skills/lit-diagram-drawer/examples/04-oauth-sequence/constructed-naive-foil.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/05-review-lanes/after.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/05-review-lanes/brief.md +17 -0
- package/plugin/skills/lit-diagram-drawer/examples/05-review-lanes/constructed-naive-foil.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/06-rollout-gates/after.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/06-rollout-gates/brief.md +17 -0
- package/plugin/skills/lit-diagram-drawer/examples/06-rollout-gates/constructed-naive-foil.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/07-deployment-boundary/after.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/07-deployment-boundary/brief.md +19 -0
- package/plugin/skills/lit-diagram-drawer/examples/07-deployment-boundary/constructed-naive-foil.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/08-policy-traces/after.html +1 -0
- package/plugin/skills/lit-diagram-drawer/examples/08-policy-traces/brief.md +20 -0
- package/plugin/skills/lit-diagram-drawer/examples/08-policy-traces/constructed-naive-foil.html +1 -0
- package/plugin/skills/lit-diagram-drawer/references/accessibility.md +37 -0
- package/plugin/skills/lit-diagram-drawer/references/drawing-rules.md +86 -0
- package/plugin/skills/lit-diagram-drawer/references/export.md +34 -0
- package/plugin/skills/lit-diagram-drawer/references/failure-codes.md +66 -0
- package/plugin/skills/lit-diagram-drawer/references/import-drawio.md +21 -0
- package/plugin/skills/lit-diagram-drawer/references/import-excalidraw.md +14 -0
- package/plugin/skills/lit-diagram-drawer/references/import-mermaid.md +18 -0
- package/plugin/skills/lit-diagram-drawer/references/import-schema.md +28 -0
- package/plugin/skills/lit-diagram-drawer/references/korean-typography.md +34 -0
- package/plugin/skills/lit-diagram-drawer/references/motion.md +29 -0
- package/plugin/skills/lit-diagram-drawer/references/office-pptx-docx.md +42 -0
- package/plugin/skills/lit-diagram-drawer/references/output-spec.md +48 -0
- package/plugin/skills/lit-diagram-drawer/references/playbooks.md +67 -0
- package/plugin/skills/lit-diagram-drawer/references/primitive-annotation.md +12 -0
- package/plugin/skills/lit-diagram-drawer/references/primitive-icons.md +21 -0
- package/plugin/skills/lit-diagram-drawer/references/primitive-sketchy.md +11 -0
- package/plugin/skills/lit-diagram-drawer/references/primitive-terminal.md +11 -0
- package/plugin/skills/lit-diagram-drawer/references/profiles.md +24 -0
- package/plugin/skills/lit-diagram-drawer/references/semantic-patterns.md +27 -0
- package/plugin/skills/lit-diagram-drawer/references/style-guide.md +67 -0
- package/plugin/skills/lit-diagram-drawer/references/type-architecture.md +51 -0
- package/plugin/skills/lit-diagram-drawer/references/type-bar.md +51 -0
- package/plugin/skills/lit-diagram-drawer/references/type-beeswarm.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-bubble.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-bump.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-catalog.json +1433 -0
- package/plugin/skills/lit-diagram-drawer/references/type-data-flow.md +51 -0
- package/plugin/skills/lit-diagram-drawer/references/type-datalake.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-db-schema.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-dependency.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-deployment.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-dp-integration.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-dp-security-matrix.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-er.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-fishbone.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-flowchart.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-gantt.md +49 -0
- package/plugin/skills/lit-diagram-drawer/references/type-heatmap.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-high-level-vertical.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-high-level.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-import-drawio.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-import-excalidraw.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-import-mermaid.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-it-state.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-journey.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-kanban.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-layers.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-line.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-loop-terminal.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-loop.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-marimekko.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-medallion.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-nested.md +59 -0
- package/plugin/skills/lit-diagram-drawer/references/type-org-chart.md +58 -0
- package/plugin/skills/lit-diagram-drawer/references/type-paved-road-animated.md +72 -0
- package/plugin/skills/lit-diagram-drawer/references/type-polar.md +67 -0
- package/plugin/skills/lit-diagram-drawer/references/type-policy-trace-animated.md +69 -0
- package/plugin/skills/lit-diagram-drawer/references/type-process.md +58 -0
- package/plugin/skills/lit-diagram-drawer/references/type-pyramid.md +59 -0
- package/plugin/skills/lit-diagram-drawer/references/type-quadrant-consultant.md +60 -0
- package/plugin/skills/lit-diagram-drawer/references/type-quadrant.md +57 -0
- package/plugin/skills/lit-diagram-drawer/references/type-queue-animated.md +63 -0
- package/plugin/skills/lit-diagram-drawer/references/type-radar.md +57 -0
- package/plugin/skills/lit-diagram-drawer/references/type-ridgeline.md +63 -0
- package/plugin/skills/lit-diagram-drawer/references/type-sankey.md +68 -0
- package/plugin/skills/lit-diagram-drawer/references/type-scatter.md +60 -0
- package/plugin/skills/lit-diagram-drawer/references/type-sequence-oauth.md +66 -0
- package/plugin/skills/lit-diagram-drawer/references/type-sequence.md +63 -0
- package/plugin/skills/lit-diagram-drawer/references/type-slopegraph.md +65 -0
- package/plugin/skills/lit-diagram-drawer/references/type-state-lifecycle.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-state.md +59 -0
- package/plugin/skills/lit-diagram-drawer/references/type-story-map.md +52 -0
- package/plugin/skills/lit-diagram-drawer/references/type-streamgraph.md +53 -0
- package/plugin/skills/lit-diagram-drawer/references/type-swimlane.md +52 -0
- package/plugin/skills/lit-diagram-drawer/references/type-timeline.md +52 -0
- package/plugin/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +57 -0
- package/plugin/skills/lit-diagram-drawer/references/type-tree.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-treemap.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/type-uml-class.md +52 -0
- package/plugin/skills/lit-diagram-drawer/references/type-venn.md +51 -0
- package/plugin/skills/lit-diagram-drawer/references/type-wardley.md +52 -0
- package/plugin/skills/lit-diagram-drawer/references/type-waterfall.md +54 -0
- package/plugin/skills/lit-diagram-drawer/references/verifier-guide.md +76 -0
- package/plugin/skills/lit-diagram-drawer/scripts/block-registry.mjs +43 -0
- package/plugin/skills/lit-diagram-drawer/scripts/brief-contract.mjs +94 -0
- package/plugin/skills/lit-diagram-drawer/scripts/check-visible-text.mjs +15 -0
- package/plugin/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +14 -0
- package/plugin/skills/lit-diagram-drawer/scripts/diagram-metrics.mjs +219 -0
- package/plugin/skills/lit-diagram-drawer/scripts/diagram-runtime-lock/package.json +9 -0
- package/plugin/skills/lit-diagram-drawer/scripts/diagram-runtime.mjs +277 -0
- package/plugin/skills/lit-diagram-drawer/scripts/doctor.mjs +25 -0
- package/plugin/skills/lit-diagram-drawer/scripts/drawio-model.mjs +162 -0
- package/plugin/skills/lit-diagram-drawer/scripts/drawio-source.mjs +147 -0
- package/plugin/skills/lit-diagram-drawer/scripts/drawio-xml.mjs +148 -0
- package/plugin/skills/lit-diagram-drawer/scripts/export.mjs +119 -0
- package/plugin/skills/lit-diagram-drawer/scripts/import-common.mjs +85 -0
- package/plugin/skills/lit-diagram-drawer/scripts/import-drawio.mjs +48 -0
- package/plugin/skills/lit-diagram-drawer/scripts/import-excalidraw.mjs +234 -0
- package/plugin/skills/lit-diagram-drawer/scripts/import-mermaid.mjs +104 -0
- package/plugin/skills/lit-diagram-drawer/scripts/mermaid-common.mjs +115 -0
- package/plugin/skills/lit-diagram-drawer/scripts/mermaid-er.mjs +70 -0
- package/plugin/skills/lit-diagram-drawer/scripts/mermaid-flowchart.mjs +178 -0
- package/plugin/skills/lit-diagram-drawer/scripts/mermaid-sequence.mjs +137 -0
- package/plugin/skills/lit-diagram-drawer/scripts/mermaid-state.mjs +80 -0
- package/plugin/skills/lit-diagram-drawer/scripts/office-safety.mjs +54 -0
- package/plugin/skills/lit-diagram-drawer/scripts/runtime-probes.mjs +11 -0
- package/plugin/skills/lit-diagram-drawer/scripts/verify-all.mjs +85 -0
- package/plugin/skills/lit-diagram-drawer/scripts/verify-brief.mjs +16 -0
- package/plugin/skills/lit-diagram-drawer/scripts/verify-diagram.mjs +27 -0
- package/plugin/skills/lit-diagram-drawer/scripts/verify-motion.mjs +12 -0
- package/plugin/skills/lit-diagram-drawer/scripts/verify-type.mjs +48 -0
- package/plugin/skills/lit-diagram-drawer/scripts/visual-quality-geometry.mjs +226 -0
- package/plugin/skills/lit-diagram-drawer/scripts/visual-quality.mjs +147 -0
- package/plugin/skills/lit-docx/NOTICE +35 -0
- package/plugin/skills/lit-docx/SKILL.md +137 -0
- package/plugin/skills/lit-docx/references/build-loop.md +96 -0
- package/plugin/skills/lit-docx/references/components.md +287 -0
- package/plugin/skills/lit-docx/references/direction-step.md +339 -0
- package/plugin/skills/lit-docx/references/examples/01-report-ko.md +166 -0
- package/plugin/skills/lit-docx/references/examples/02-brief-ko.md +96 -0
- package/plugin/skills/lit-docx/references/examples/03-manual-ko.md +170 -0
- package/plugin/skills/lit-docx/references/examples/04-proposal-ko.md +141 -0
- package/plugin/skills/lit-docx/references/examples/05-memo-en.md +56 -0
- package/plugin/skills/lit-docx/references/examples/06-journal-en.md +129 -0
- package/plugin/skills/lit-docx/references/examples/07-report-en.md +123 -0
- package/plugin/skills/lit-docx/references/examples/08-proposal-en.md +122 -0
- package/plugin/skills/lit-docx/references/examples/09-memo-ko.md +40 -0
- package/plugin/skills/lit-docx/references/frontmatter_schema.md +94 -0
- package/plugin/skills/lit-docx/references/journal_style_spec.md +89 -0
- package/plugin/skills/lit-docx/references/markdown_quality_checklist.md +43 -0
- package/plugin/skills/lit-docx/references/page-composition.md +319 -0
- package/plugin/skills/lit-docx/references/slop_phrase_list.yaml +58 -0
- package/plugin/skills/lit-docx/references/slop_rules.md +88 -0
- package/plugin/skills/lit-docx/references/tonalities/brief.md +170 -0
- package/plugin/skills/lit-docx/references/tonalities/journal.md +173 -0
- package/plugin/skills/lit-docx/references/tonalities/manual.md +182 -0
- package/plugin/skills/lit-docx/references/tonalities/memo.md +171 -0
- package/plugin/skills/lit-docx/references/tonalities/proposal.md +181 -0
- package/plugin/skills/lit-docx/references/tonalities/report.md +199 -0
- package/plugin/skills/lit-docx/scripts/clean_markdown.py +95 -0
- package/plugin/skills/lit-docx/scripts/convert_md_to_docx.py +1395 -0
- package/plugin/skills/lit-docx/scripts/convert_md_to_pdf.py +301 -0
- package/plugin/skills/lit-docx/scripts/convert_pdf.py +139 -0
- package/plugin/skills/lit-docx/scripts/docx_design.py +2449 -0
- package/plugin/skills/lit-docx/scripts/docx_layout.py +959 -0
- package/plugin/skills/lit-docx/scripts/edit_docx.py +306 -0
- package/plugin/skills/lit-docx/scripts/embed_images.py +78 -0
- package/plugin/skills/lit-docx/scripts/generate_docx_templates.py +500 -0
- package/plugin/skills/lit-docx/scripts/pdf_fonts.py +83 -0
- package/plugin/skills/lit-docx/scripts/qa_docx.py +234 -0
- package/plugin/skills/lit-docx/scripts/slop_lint.py +573 -0
- package/plugin/skills/lit-docx/scripts/visual_audit.py +48 -0
- package/plugin/skills/lit-docx/templates/docx/acs.docx +0 -0
- package/plugin/skills/lit-docx/templates/docx/elsevier.docx +0 -0
- package/plugin/skills/lit-docx/templates/docx/ieee.docx +0 -0
- package/plugin/skills/lit-docx/templates/docx/korean-generic.docx +0 -0
- package/plugin/skills/lit-docx/templates/docx/nature.docx +0 -0
- package/plugin/skills/lit-docx/templates/latex/acs/README.md +5 -0
- package/plugin/skills/lit-docx/templates/latex/acs/template.tex +41 -0
- package/plugin/skills/lit-docx/templates/latex/elsevier/README.md +5 -0
- package/plugin/skills/lit-docx/templates/latex/elsevier/template.tex +42 -0
- package/plugin/skills/lit-docx/templates/latex/ieee/README.md +5 -0
- package/plugin/skills/lit-docx/templates/latex/ieee/template.tex +41 -0
- package/plugin/skills/lit-docx/templates/latex/korean-generic/README.md +5 -0
- package/plugin/skills/lit-docx/templates/latex/korean-generic/template.tex +41 -0
- package/plugin/skills/lit-docx/templates/latex/nature/README.md +5 -0
- package/plugin/skills/lit-docx/templates/latex/nature/template.tex +41 -0
- package/plugin/skills/lit-docx/templates/registry.yaml +1366 -0
- package/plugin/skills/lit-docx/templates/tonalities/brief.yaml +28 -0
- package/plugin/skills/lit-docx/templates/tonalities/journal.yaml +25 -0
- package/plugin/skills/lit-docx/templates/tonalities/manual.yaml +26 -0
- package/plugin/skills/lit-docx/templates/tonalities/memo.yaml +26 -0
- package/plugin/skills/lit-docx/templates/tonalities/proposal.yaml +26 -0
- package/plugin/skills/lit-docx/templates/tonalities/report.yaml +26 -0
- package/plugin/skills/lit-handoff/LICENSE +21 -0
- package/plugin/skills/lit-handoff/SKILL.md +176 -0
- package/plugin/skills/lit-handoff/evals/evals.json +244 -0
- package/plugin/skills/lit-handoff/examples/HANDOFF-example-generic-auth-refactor.md +97 -0
- package/plugin/skills/lit-handoff/reference/PROVENANCE.md +17 -0
- package/plugin/skills/lit-handoff/reference/canonical-handoff.md +199 -0
- package/plugin/skills/lit-handoff/scripts/verify-closure.mjs +50 -0
- package/plugin/skills/lit-handoff/templates/HANDOFF.md +121 -0
- package/plugin/skills/lit-humanizer/NOTICE +160 -0
- package/plugin/skills/lit-humanizer/SKILL.md +226 -0
- package/plugin/skills/lit-humanizer/assets/always-on-rule.md +11 -0
- package/plugin/skills/lit-humanizer/assets/report-skeleton.md +29 -0
- package/plugin/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
- package/plugin/skills/lit-humanizer/bench/prompts.md +81 -0
- package/plugin/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
- package/plugin/skills/lit-humanizer/examples/accessibility-note/before.md +9 -0
- package/plugin/skills/lit-humanizer/examples/api-reference/after.md +10 -0
- package/plugin/skills/lit-humanizer/examples/api-reference/before.md +14 -0
- package/plugin/skills/lit-humanizer/examples/changelog/after.md +8 -0
- package/plugin/skills/lit-humanizer/examples/changelog/before.md +12 -0
- package/plugin/skills/lit-humanizer/examples/code-comments/after.md +11 -0
- package/plugin/skills/lit-humanizer/examples/code-comments/before.md +19 -0
- package/plugin/skills/lit-humanizer/examples/commit/after.md +7 -0
- package/plugin/skills/lit-humanizer/examples/commit/before.md +5 -0
- package/plugin/skills/lit-humanizer/examples/data-release/after.md +9 -0
- package/plugin/skills/lit-humanizer/examples/data-release/before.md +11 -0
- package/plugin/skills/lit-humanizer/examples/english-essay/after.md +5 -0
- package/plugin/skills/lit-humanizer/examples/english-essay/before.md +9 -0
- package/plugin/skills/lit-humanizer/examples/incident-update/after.md +9 -0
- package/plugin/skills/lit-humanizer/examples/incident-update/before.md +9 -0
- package/plugin/skills/lit-humanizer/examples/ko-essay/after.md +5 -0
- package/plugin/skills/lit-humanizer/examples/ko-essay/before.md +11 -0
- package/plugin/skills/lit-humanizer/examples/ko-report/after.md +9 -0
- package/plugin/skills/lit-humanizer/examples/ko-report/before.md +19 -0
- package/plugin/skills/lit-humanizer/examples/ko-slide/after.md +21 -0
- package/plugin/skills/lit-humanizer/examples/ko-slide/before.md +23 -0
- package/plugin/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
- package/plugin/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
- package/plugin/skills/lit-humanizer/examples/policy-faq/after.md +16 -0
- package/plugin/skills/lit-humanizer/examples/policy-faq/before.md +16 -0
- package/plugin/skills/lit-humanizer/examples/pr/after.md +17 -0
- package/plugin/skills/lit-humanizer/examples/pr/before.md +19 -0
- package/plugin/skills/lit-humanizer/examples/project-update/after.md +10 -0
- package/plugin/skills/lit-humanizer/examples/project-update/before.md +9 -0
- package/plugin/skills/lit-humanizer/examples/readme/after.md +19 -0
- package/plugin/skills/lit-humanizer/examples/readme/before.md +23 -0
- package/plugin/skills/lit-humanizer/examples/report/after.md +9 -0
- package/plugin/skills/lit-humanizer/examples/report/before.md +19 -0
- package/plugin/skills/lit-humanizer/examples/research-abstract/after.md +1 -0
- package/plugin/skills/lit-humanizer/examples/research-abstract/before.md +7 -0
- package/plugin/skills/lit-humanizer/examples/slides/after.md +16 -0
- package/plugin/skills/lit-humanizer/examples/slides/before.md +19 -0
- package/plugin/skills/lit-humanizer/examples/troubleshooting/after.md +13 -0
- package/plugin/skills/lit-humanizer/examples/troubleshooting/before.md +13 -0
- package/plugin/skills/lit-humanizer/fixtures/ko-metrics-golden.json +51 -0
- package/plugin/skills/lit-humanizer/fixtures/office/minimal.docx +0 -0
- package/plugin/skills/lit-humanizer/fixtures/office/minimal.pptx +0 -0
- package/plugin/skills/lit-humanizer/fixtures/pledge-cases.json +1341 -0
- package/plugin/skills/lit-humanizer/fixtures/pos-real.txt +26 -0
- package/plugin/skills/lit-humanizer/fixtures/rule-cases.json +312 -0
- package/plugin/skills/lit-humanizer/motion-guide.md +125 -0
- package/plugin/skills/lit-humanizer/references/code-patterns.md +324 -0
- package/plugin/skills/lit-humanizer/references/deliverable-channels.md +123 -0
- package/plugin/skills/lit-humanizer/references/en-patterns-checklist.md +44 -0
- package/plugin/skills/lit-humanizer/references/en-patterns-content.md +245 -0
- package/plugin/skills/lit-humanizer/references/en-patterns-structure.md +389 -0
- package/plugin/skills/lit-humanizer/references/en-patterns.md +58 -0
- package/plugin/skills/lit-humanizer/references/ko-metrics.md +39 -0
- package/plugin/skills/lit-humanizer/references/ko-patterns-a-d.md +667 -0
- package/plugin/skills/lit-humanizer/references/ko-patterns-e-j.md +391 -0
- package/plugin/skills/lit-humanizer/references/ko-patterns.md +40 -0
- package/plugin/skills/lit-humanizer/references/litgravity-fidelity-checklist.md +83 -0
- package/plugin/skills/lit-humanizer/references/litgravity-rewrite-rules.md +74 -0
- package/plugin/skills/lit-humanizer/references/litgravity-style-patterns.md +57 -0
- package/plugin/skills/lit-humanizer/references/prompt-injection-handling.md +29 -0
- package/plugin/skills/lit-humanizer/references/rewrite-playbook.md +67 -0
- package/plugin/skills/lit-humanizer/references/taxonomy.md +190 -0
- package/plugin/skills/lit-humanizer/rules.json +938 -0
- package/plugin/skills/lit-humanizer/scripts/artifact-text.mjs +41 -0
- package/plugin/skills/lit-humanizer/scripts/core.mjs +313 -0
- package/plugin/skills/lit-humanizer/scripts/detect.mjs +79 -0
- package/plugin/skills/lit-humanizer/scripts/extract_office_text.py +109 -0
- package/plugin/skills/lit-humanizer/scripts/ko-metrics.mjs +147 -0
- package/plugin/skills/lit-humanizer/scripts/scan-input.mjs +57 -0
- package/plugin/skills/lit-humanizer/scripts/test-fixtures.mjs +217 -0
- package/plugin/skills/lit-humanizer/scripts/test-ko-metrics.mjs +28 -0
- package/plugin/skills/lit-init/SKILL.md +189 -0
- package/plugin/skills/lit-init/references/deep-repository-map.md +95 -0
- package/plugin/skills/lit-init/templates/agents-child.md +20 -0
- package/plugin/skills/lit-init/templates/agents-root.md +35 -0
- package/plugin/skills/lit-loop/SKILL.md +217 -0
- package/plugin/skills/lit-loop/references/adversarial-classes.md +27 -0
- package/plugin/skills/lit-loop/references/ledger-and-records.md +47 -0
- package/plugin/skills/lit-plan/SKILL.md +220 -0
- package/plugin/skills/lit-plan/references/agy-surfaces.md +29 -0
- package/plugin/skills/lit-plan/references/intent-routes.md +118 -0
- package/plugin/skills/lit-plan/references/plan-contract.md +112 -0
- package/plugin/skills/lit-plan/references/review-gates.md +51 -0
- package/plugin/skills/lit-plan/references/risk-and-recovery.md +56 -0
- package/plugin/skills/lit-plan/references/start-work-handoff-contract.md +66 -0
- package/plugin/skills/lit-plan/scripts/check-plan.mjs +163 -0
- package/plugin/skills/lit-plan/templates/draft.md +41 -0
- package/plugin/skills/lit-plan/templates/plan.md +101 -0
- package/plugin/skills/lit-pptx/NOTICE +35 -0
- package/plugin/skills/lit-pptx/SKILL.md +147 -0
- package/plugin/skills/lit-pptx/assets/azure/circle-lg.png +0 -0
- package/plugin/skills/lit-pptx/assets/azure/circle-md.png +0 -0
- package/plugin/skills/lit-pptx/assets/azure/circle-sm.png +0 -0
- package/plugin/skills/lit-pptx/assets/example-a.png +0 -0
- package/plugin/skills/lit-pptx/assets/example-b.png +0 -0
- package/plugin/skills/lit-pptx/assets/example-c.png +0 -0
- package/plugin/skills/lit-pptx/fonts/a2z/A2Z-Black.otf +0 -0
- package/plugin/skills/lit-pptx/fonts/a2z/A2Z-Bold.otf +0 -0
- package/plugin/skills/lit-pptx/fonts/a2z/A2Z-Light.otf +0 -0
- package/plugin/skills/lit-pptx/fonts/a2z/A2Z-Medium.otf +0 -0
- package/plugin/skills/lit-pptx/fonts/a2z/A2Z-Regular.otf +0 -0
- package/plugin/skills/lit-pptx/fonts/a2z/OFL.txt +94 -0
- package/plugin/skills/lit-pptx/fonts/a2z/SOURCE.md +29 -0
- package/plugin/skills/lit-pptx/fonts/pretendard/OFL.txt +94 -0
- package/plugin/skills/lit-pptx/fonts/pretendard/Pretendard-Bold.otf +0 -0
- package/plugin/skills/lit-pptx/fonts/pretendard/Pretendard-Regular.otf +0 -0
- package/plugin/skills/lit-pptx/fonts/provenance.json +78 -0
- package/plugin/skills/lit-pptx/references/agents/analyst.md +71 -0
- package/plugin/skills/lit-pptx/references/agents/antithesis.md +77 -0
- package/plugin/skills/lit-pptx/references/agents/architect.md +57 -0
- package/plugin/skills/lit-pptx/references/agents/critic.md +58 -0
- package/plugin/skills/lit-pptx/references/agents/synthesizer.md +56 -0
- package/plugin/skills/lit-pptx/references/agents/thesis.md +53 -0
- package/plugin/skills/lit-pptx/references/anti-slop-checklist.md +157 -0
- package/plugin/skills/lit-pptx/references/authoring-guide.md +341 -0
- package/plugin/skills/lit-pptx/references/build-loop.md +117 -0
- package/plugin/skills/lit-pptx/references/consensus-protocol.md +123 -0
- package/plugin/skills/lit-pptx/references/data-display-cookbook.md +153 -0
- package/plugin/skills/lit-pptx/references/density-and-fill.md +232 -0
- package/plugin/skills/lit-pptx/references/design-system-azure.md +90 -0
- package/plugin/skills/lit-pptx/references/direction-step.md +245 -0
- package/plugin/skills/lit-pptx/references/examples/01-pitch-signal-ko.md +211 -0
- package/plugin/skills/lit-pptx/references/examples/02-pitch-studio-ko.md +147 -0
- package/plugin/skills/lit-pptx/references/examples/03-business-review-ledger-ko.md +199 -0
- package/plugin/skills/lit-pptx/references/examples/04-business-review-night-en.md +203 -0
- package/plugin/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +178 -0
- package/plugin/skills/lit-pptx/references/examples/06-lecture-chalk-ko.md +199 -0
- package/plugin/skills/lit-pptx/references/examples/07-data-review-night-en.md +192 -0
- package/plugin/skills/lit-pptx/references/examples/08-image-led-atlas-ko.md +175 -0
- package/plugin/skills/lit-pptx/references/examples/09-briefing-gazette-ko.md +204 -0
- package/plugin/skills/lit-pptx/references/examples/10-status-update-ledger-ko.md +179 -0
- package/plugin/skills/lit-pptx/references/examples/11-portfolio-studio-en.md +164 -0
- package/plugin/skills/lit-pptx/references/examples/12-research-tutorial-chalk-en.md +174 -0
- package/plugin/skills/lit-pptx/references/interview-protocol.md +132 -0
- package/plugin/skills/lit-pptx/references/layout-families.md +298 -0
- package/plugin/skills/lit-pptx/references/stages/autopilot.md +88 -0
- package/plugin/skills/lit-pptx/references/stages/interview.md +84 -0
- package/plugin/skills/lit-pptx/references/stages/plan.md +83 -0
- package/plugin/skills/lit-pptx/references/title-treatments.md +165 -0
- package/plugin/skills/lit-pptx/references/tonalities/atlas.md +152 -0
- package/plugin/skills/lit-pptx/references/tonalities/chalk.md +163 -0
- package/plugin/skills/lit-pptx/references/tonalities/gazette.md +173 -0
- package/plugin/skills/lit-pptx/references/tonalities/ledger.md +178 -0
- package/plugin/skills/lit-pptx/references/tonalities/night.md +174 -0
- package/plugin/skills/lit-pptx/references/tonalities/paper.md +167 -0
- package/plugin/skills/lit-pptx/references/tonalities/signal.md +157 -0
- package/plugin/skills/lit-pptx/references/tonalities/studio.md +162 -0
- package/plugin/skills/lit-pptx/scripts/compile-deck.js +464 -0
- package/plugin/skills/lit-pptx/scripts/craft_extras.py +1033 -0
- package/plugin/skills/lit-pptx/scripts/deck_craft.py +363 -0
- package/plugin/skills/lit-pptx/scripts/embed_fonts.py +215 -0
- package/plugin/skills/lit-pptx/scripts/forbidden-terms.json +55 -0
- package/plugin/skills/lit-pptx/scripts/layout_inventory.py +418 -0
- package/plugin/skills/lit-pptx/scripts/learn_template.py +446 -0
- package/plugin/skills/lit-pptx/scripts/lib/derive-palette.js +176 -0
- package/plugin/skills/lit-pptx/scripts/lib/directive-parser.js +244 -0
- package/plugin/skills/lit-pptx/scripts/lib/font-map.js +79 -0
- package/plugin/skills/lit-pptx/scripts/lib/gen-bg.js +86 -0
- package/plugin/skills/lit-pptx/scripts/lib/gen-gradient-assets.js +37 -0
- package/plugin/skills/lit-pptx/scripts/lib/grid-resolver.js +521 -0
- package/plugin/skills/lit-pptx/scripts/lib/layout-resolver.js +1119 -0
- package/plugin/skills/lit-pptx/scripts/lib/markdown-loader.js +138 -0
- package/plugin/skills/lit-pptx/scripts/lib/render-adapter-html.js +356 -0
- package/plugin/skills/lit-pptx/scripts/lib/render-adapter-pptx.js +2240 -0
- package/plugin/skills/lit-pptx/scripts/lib/render-pack.js +3559 -0
- package/plugin/skills/lit-pptx/scripts/lib/runtime-require.js +28 -0
- package/plugin/skills/lit-pptx/scripts/lib/slide-ast.js +565 -0
- package/plugin/skills/lit-pptx/scripts/lib/spec-validator.js +94 -0
- package/plugin/skills/lit-pptx/scripts/lib/template-registry.js +679 -0
- package/plugin/skills/lit-pptx/scripts/office-runtime-lock/package-lock.json +793 -0
- package/plugin/skills/lit-pptx/scripts/office-runtime-lock/package.json +12 -0
- package/plugin/skills/lit-pptx/scripts/office-runtime-lock/requirements.lock +15 -0
- package/plugin/skills/lit-pptx/scripts/office-runtime.mjs +279 -0
- package/plugin/skills/lit-pptx/scripts/office_data.py +493 -0
- package/plugin/skills/lit-pptx/scripts/office_runtime_bootstrap.py +73 -0
- package/plugin/skills/lit-pptx/scripts/ooxml_integrity.py +199 -0
- package/plugin/skills/lit-pptx/scripts/package.json +4 -0
- package/plugin/skills/lit-pptx/scripts/qa_deck.py +795 -0
- package/plugin/skills/lit-pptx/scripts/render_pages.py +116 -0
- package/plugin/skills/lit-pptx/scripts/validate_pptx.py +230 -0
- package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v1.md +275 -0
- package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v2.md +263 -0
- package/plugin/skills/lit-pptx/specs/slide-ast-v1.schema.json +229 -0
- package/plugin/skills/lit-pptx/specs/slide-ast-v2.schema.json +144 -0
- package/plugin/skills/lit-pptx/specs/template-enrollment-contract.md +405 -0
- package/plugin/skills/lit-pptx/templates/enrolled/AZURE-A2Z/capabilities.yaml +146 -0
- package/plugin/skills/lit-pptx/templates/enrolled/AZURE-A2Z/layout-mapping.yaml +454 -0
- package/plugin/skills/lit-pptx/templates/enrolled/AZURE-A2Z/template.yaml +40 -0
- package/plugin/skills/lit-pptx/templates/enrolled/AZURE-PRO/capabilities.yaml +154 -0
- package/plugin/skills/lit-pptx/templates/enrolled/AZURE-PRO/layout-mapping.yaml +475 -0
- package/plugin/skills/lit-pptx/templates/enrolled/AZURE-PRO/template.yaml +40 -0
- package/plugin/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/capabilities.yaml +179 -0
- package/plugin/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/layout-mapping.yaml +299 -0
- package/plugin/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/template.yaml +45 -0
- package/plugin/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/capabilities.yaml +181 -0
- package/plugin/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/layout-mapping.yaml +299 -0
- package/plugin/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/template.yaml +44 -0
- package/plugin/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +92 -0
- package/plugin/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +97 -0
- package/plugin/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +93 -0
- package/plugin/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +94 -0
- package/plugin/skills/lit-pptx/templates/tonalities/night/pack.yaml +93 -0
- package/plugin/skills/lit-pptx/templates/tonalities/paper/pack.yaml +98 -0
- package/plugin/skills/lit-pptx/templates/tonalities/signal/pack.yaml +94 -0
- package/plugin/skills/lit-pptx/templates/tonalities/studio/pack.yaml +92 -0
- package/plugin/skills/lit-recap/SKILL.md +168 -0
- package/plugin/skills/lit-recap/references/recap-shapes.md +166 -0
- package/plugin/skills/lit-recap/references/source-reading.md +105 -0
- package/plugin/skills/lit-recap/references/stale-state-checks.md +74 -0
- package/plugin/skills/lit-scientific-visualization/LICENSE +21 -0
- package/plugin/skills/lit-scientific-visualization/SKILL.md +165 -0
- package/plugin/skills/lit-scientific-visualization/assets/color_palettes.py +197 -0
- package/plugin/skills/lit-scientific-visualization/assets/nature.mplstyle +75 -0
- package/plugin/skills/lit-scientific-visualization/assets/presentation.mplstyle +74 -0
- package/plugin/skills/lit-scientific-visualization/assets/publication.mplstyle +78 -0
- package/plugin/skills/lit-scientific-visualization/evals/evals.json +158 -0
- package/plugin/skills/lit-scientific-visualization/references/canonical-workflow.md +278 -0
- package/plugin/skills/lit-scientific-visualization/references/color_palettes.md +380 -0
- package/plugin/skills/lit-scientific-visualization/references/journal_requirements.md +359 -0
- package/plugin/skills/lit-scientific-visualization/references/matplotlib_examples.md +608 -0
- package/plugin/skills/lit-scientific-visualization/references/mdanalysis_martini_visualization.md +85 -0
- package/plugin/skills/lit-scientific-visualization/references/publication_guidelines.md +217 -0
- package/plugin/skills/lit-scientific-visualization/references/seaborn_for_publications.md +293 -0
- package/plugin/skills/lit-scientific-visualization/scripts/figure_export.py +238 -0
- package/plugin/skills/lit-scientific-visualization/scripts/sciviz-runtime-requirements.lock +23 -0
- package/plugin/skills/lit-scientific-visualization/scripts/sciviz-runtime.mjs +230 -0
- package/plugin/skills/lit-scientific-visualization/scripts/style_presets.py +467 -0
- package/plugin/skills/lit-scientific-visualization/tests/test_figure_export.py +51 -0
- package/plugin/skills/lit-scientific-visualization/tests/test_style_presets.py +114 -0
- package/plugin/skills/lit-team/SKILL.md +118 -0
- package/plugin/skills/lit-team/references/member-briefs.md +67 -0
- package/plugin/skills/lit-team/references/team-orchestration.md +129 -0
- package/plugin/skills/lit-team/scripts/owner-lock.mjs +330 -0
- package/plugin/skills/lit-team/scripts/secure-path.mjs +24 -0
- package/plugin/skills/lit-team/scripts/state-root.mjs +55 -0
- package/plugin/skills/lit-team/scripts/team.mjs +629 -0
- package/plugin/skills/lit-typographic-motion/SKILL.md +196 -0
- package/plugin/skills/lit-typographic-motion/engine/NOTICE +23 -0
- package/plugin/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +62 -0
- package/plugin/skills/lit-typographic-motion/engine/audio/beat_grid.py +56 -0
- package/plugin/skills/lit-typographic-motion/engine/audio/requirements.lock +1084 -0
- package/plugin/skills/lit-typographic-motion/engine/core/constants.mjs +246 -0
- package/plugin/skills/lit-typographic-motion/engine/core/contrast.mjs +90 -0
- package/plugin/skills/lit-typographic-motion/engine/core/events.mjs +46 -0
- package/plugin/skills/lit-typographic-motion/engine/core/flash.mjs +211 -0
- package/plugin/skills/lit-typographic-motion/engine/core/gate-rules.mjs +550 -0
- package/plugin/skills/lit-typographic-motion/engine/core/presets.mjs +123 -0
- package/plugin/skills/lit-typographic-motion/engine/core/text.mjs +100 -0
- package/plugin/skills/lit-typographic-motion/engine/core/timeline.mjs +142 -0
- package/plugin/skills/lit-typographic-motion/engine/core/util.mjs +167 -0
- package/plugin/skills/lit-typographic-motion/engine/core/voices.mjs +19 -0
- package/plugin/skills/lit-typographic-motion/engine/models/word-timing.json +198 -0
- package/plugin/skills/lit-typographic-motion/engine/node/analysis.mjs +108 -0
- package/plugin/skills/lit-typographic-motion/engine/node/brief.mjs +158 -0
- package/plugin/skills/lit-typographic-motion/engine/node/chrome.mjs +331 -0
- package/plugin/skills/lit-typographic-motion/engine/node/cover-assets.mjs +102 -0
- package/plugin/skills/lit-typographic-motion/engine/node/cover-capture.mjs +209 -0
- package/plugin/skills/lit-typographic-motion/engine/node/cover-gate.mjs +347 -0
- package/plugin/skills/lit-typographic-motion/engine/node/cover-image.mjs +141 -0
- package/plugin/skills/lit-typographic-motion/engine/node/cover-sheet.mjs +76 -0
- package/plugin/skills/lit-typographic-motion/engine/node/cover-treatment.mjs +106 -0
- package/plugin/skills/lit-typographic-motion/engine/node/cover-worker.mjs +32 -0
- package/plugin/skills/lit-typographic-motion/engine/node/cover.mjs +374 -0
- package/plugin/skills/lit-typographic-motion/engine/node/coverage.mjs +83 -0
- package/plugin/skills/lit-typographic-motion/engine/node/done.mjs +170 -0
- package/plugin/skills/lit-typographic-motion/engine/node/encode.mjs +105 -0
- package/plugin/skills/lit-typographic-motion/engine/node/frame-worker.mjs +36 -0
- package/plugin/skills/lit-typographic-motion/engine/node/look.mjs +164 -0
- package/plugin/skills/lit-typographic-motion/engine/node/pipeline.mjs +593 -0
- package/plugin/skills/lit-typographic-motion/engine/node/png.mjs +112 -0
- package/plugin/skills/lit-typographic-motion/engine/node/report.mjs +66 -0
- package/plugin/skills/lit-typographic-motion/engine/node/runtime.mjs +349 -0
- package/plugin/skills/lit-typographic-motion/engine/node/session.mjs +145 -0
- package/plugin/skills/lit-typographic-motion/engine/node/sound-cli.mjs +60 -0
- package/plugin/skills/lit-typographic-motion/engine/node/sound.mjs +642 -0
- package/plugin/skills/lit-typographic-motion/engine/node/stage-capture.mjs +179 -0
- package/plugin/skills/lit-typographic-motion/engine/node/stage-gate.mjs +122 -0
- package/plugin/skills/lit-typographic-motion/engine/node/stage-qa.mjs +295 -0
- package/plugin/skills/lit-typographic-motion/engine/node/stage-serve.mjs +283 -0
- package/plugin/skills/lit-typographic-motion/engine/node/stage.mjs +503 -0
- package/plugin/skills/lit-typographic-motion/engine/node/stills.mjs +100 -0
- package/plugin/skills/lit-typographic-motion/engine/node/treatment.mjs +344 -0
- package/plugin/skills/lit-typographic-motion/engine/node/webp.mjs +146 -0
- package/plugin/skills/lit-typographic-motion/engine/node/ws-server.mjs +132 -0
- package/plugin/skills/lit-typographic-motion/engine/package-lock.json +25 -0
- package/plugin/skills/lit-typographic-motion/engine/package.json +10 -0
- package/plugin/skills/lit-typographic-motion/engine/stage/cover-init.js +37 -0
- package/plugin/skills/lit-typographic-motion/engine/stage/init.js +288 -0
- package/plugin/skills/lit-typographic-motion/engine/stage/loop-kit.js +106 -0
- package/plugin/skills/lit-typographic-motion/engine/stage/qa.js +157 -0
- package/plugin/skills/lit-typographic-motion/engine/stage/stage-kit.js +701 -0
- package/plugin/skills/lit-typographic-motion/engine/web/boot.mjs +123 -0
- package/plugin/skills/lit-typographic-motion/engine/web/engine.mjs +281 -0
- package/plugin/skills/lit-typographic-motion/engine/web/gl.mjs +319 -0
- package/plugin/skills/lit-typographic-motion/engine/web/glsl-common.mjs +78 -0
- package/plugin/skills/lit-typographic-motion/engine/web/index.html +6 -0
- package/plugin/skills/lit-typographic-motion/engine/web/lines.mjs +112 -0
- package/plugin/skills/lit-typographic-motion/engine/web/passes/crt.mjs +98 -0
- package/plugin/skills/lit-typographic-motion/engine/web/passes/dither.mjs +49 -0
- package/plugin/skills/lit-typographic-motion/engine/web/passes/glitch.mjs +77 -0
- package/plugin/skills/lit-typographic-motion/engine/web/passes/swiss-grid.mjs +61 -0
- package/plugin/skills/lit-typographic-motion/engine/web/passes/terminal-ui.mjs +88 -0
- package/plugin/skills/lit-typographic-motion/engine/web/passes/tidal-gradient.mjs +86 -0
- package/plugin/skills/lit-typographic-motion/engine/web/post.mjs +165 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scale.mjs +15 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scene.mjs +82 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scenes/end-card.mjs +30 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scenes/index.mjs +16 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scenes/karaoke-line.mjs +47 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scenes/kinetic-list.mjs +45 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scenes/number-counter.mjs +29 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scenes/signature.mjs +73 -0
- package/plugin/skills/lit-typographic-motion/engine/web/scenes/title-slam.mjs +73 -0
- package/plugin/skills/lit-typographic-motion/engine/web/stroke.mjs +236 -0
- package/plugin/skills/lit-typographic-motion/engine/web/type.mjs +180 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-400.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-700.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-900.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-400.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-700.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-900.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-400.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-700.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-900.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/archivo/OFL.txt +93 -0
- package/plugin/skills/lit-typographic-motion/fonts/jetbrains-mono/JetBrainsMono-wght-latin.woff2 +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/jetbrains-mono/OFL.txt +93 -0
- package/plugin/skills/lit-typographic-motion/fonts/manifest.json +455 -0
- package/plugin/skills/lit-typographic-motion/fonts/silkscreen/OFL.txt +93 -0
- package/plugin/skills/lit-typographic-motion/fonts/silkscreen/Silkscreen-Bold.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/silkscreen/Silkscreen-Regular.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/fonts/stroke/CREDITS +42 -0
- package/plugin/skills/lit-typographic-motion/fonts/stroke/EMSAllure.svg +216 -0
- package/plugin/skills/lit-typographic-motion/fonts/stroke/EMSFelix.svg +216 -0
- package/plugin/skills/lit-typographic-motion/fonts/stroke/EMSOsmotron.svg +216 -0
- package/plugin/skills/lit-typographic-motion/fonts/stroke/EMSReadability.svg +216 -0
- package/plugin/skills/lit-typographic-motion/fonts/stroke/EMSTech.svg +217 -0
- package/plugin/skills/lit-typographic-motion/fonts/stroke/OFL.txt +91 -0
- package/plugin/skills/lit-typographic-motion/fonts/vt323/OFL.txt +93 -0
- package/plugin/skills/lit-typographic-motion/fonts/vt323/VT323-Regular.ttf +0 -0
- package/plugin/skills/lit-typographic-motion/recipes/negatives/card-scenes/expected.json +16 -0
- package/plugin/skills/lit-typographic-motion/recipes/negatives/card-scenes/index.html +27 -0
- package/plugin/skills/lit-typographic-motion/recipes/negatives/reset-sweep/expected.json +16 -0
- package/plugin/skills/lit-typographic-motion/recipes/negatives/reset-sweep/index.html +17 -0
- package/plugin/skills/lit-typographic-motion/recipes/negatives/still-glow/expected.json +17 -0
- package/plugin/skills/lit-typographic-motion/recipes/negatives/still-glow/index.html +18 -0
- package/plugin/skills/lit-typographic-motion/recipes/negatives/title-slam/expected.json +17 -0
- package/plugin/skills/lit-typographic-motion/recipes/negatives/title-slam/index.html +30 -0
- package/plugin/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +67 -0
- package/plugin/skills/lit-typographic-motion/recipes/orbit-loop/index.html +152 -0
- package/plugin/skills/lit-typographic-motion/recipes/painted-light/expected.json +95 -0
- package/plugin/skills/lit-typographic-motion/recipes/painted-light/index.html +202 -0
- package/plugin/skills/lit-typographic-motion/recipes/weight-tide/expected.json +67 -0
- package/plugin/skills/lit-typographic-motion/recipes/weight-tide/index.html +100 -0
- package/plugin/skills/lit-typographic-motion/references/brief-schema.md +119 -0
- package/plugin/skills/lit-typographic-motion/references/cover.md +473 -0
- package/plugin/skills/lit-typographic-motion/references/craft-loop.md +100 -0
- package/plugin/skills/lit-typographic-motion/references/engine-contract.md +124 -0
- package/plugin/skills/lit-typographic-motion/references/look.md +157 -0
- package/plugin/skills/lit-typographic-motion/references/runtime.md +100 -0
- package/plugin/skills/lit-typographic-motion/references/sound.md +121 -0
- package/plugin/skills/lit-typographic-motion/references/stage.md +239 -0
- package/plugin/skills/lit-typographic-motion/references/style-bibles.md +130 -0
- package/plugin/skills/lit-typographic-motion/references/treatment.md +166 -0
- package/plugin/skills/lit-typographic-motion/references/type-craft.md +87 -0
- package/plugin/skills/lit-typographic-motion/scripts/motion-doctor.mjs +99 -0
- package/plugin/skills/lit-typographic-motion/scripts/motion-runtime.mjs +95 -0
- package/plugin/skills/lit-typographic-motion/scripts/motion.mjs +165 -0
- package/plugin/skills/litgoal/SKILL.md +267 -0
- package/plugin/skills/litgoal/references/close-gate.md +28 -0
- package/plugin/skills/litgoal/references/host-goal-binding.md +32 -0
- package/plugin/skills/litgoal/scripts/check-goal.mjs +116 -0
- package/plugin/skills/litgoal/templates/goal.json +23 -0
- package/plugin/skills/litresearch/ATTRIBUTION.md +42 -0
- package/plugin/skills/litresearch/SKILL.md +229 -0
- package/plugin/skills/litresearch/references/disputed-claims.md +103 -0
- package/plugin/skills/litresearch/references/lane-operations.md +96 -0
- package/plugin/skills/litresearch/references/ledger-and-evidence.md +120 -0
- package/plugin/skills/litresearch/references/pitfalls.md +56 -0
- package/plugin/skills/litresearch/references/query-craft.md +67 -0
- package/plugin/skills/litresearch/references/question-playbooks.md +74 -0
- package/plugin/skills/litresearch/references/report-formats.md +136 -0
- package/plugin/skills/litresearch/references/source-verdict-checklist.md +81 -0
- package/plugin/skills/litresearch/references/worked-examples.md +36 -0
- package/plugin/skills/litwork/SKILL.md +190 -0
- package/plugin/skills/litwork/references/execution-details.md +93 -0
- package/plugin/skills/litwork/references/qa-channel-recipes.md +83 -0
- package/plugin/skills/litwork/references/tier-and-criteria.md +68 -0
- package/plugin/skills/litwork/templates/notes.md +29 -0
- package/plugin/skills/lsp/SKILL.md +166 -0
- package/plugin/skills/lsp/references/cli-recipes.md +154 -0
- package/plugin/skills/lsp/references/runtime-triage.md +122 -0
- package/plugin/skills/lsp/scripts/diagnostics.mjs +340 -0
- package/plugin/skills/lsp/scripts/tsserver-query.mjs +83 -0
- package/plugin/skills/lsp-setup/SKILL.md +241 -0
- package/plugin/skills/lsp-setup/references/bash/README.md +92 -0
- package/plugin/skills/lsp-setup/references/c-cpp/README.md +92 -0
- package/plugin/skills/lsp-setup/references/csharp/README.md +93 -0
- package/plugin/skills/lsp-setup/references/dart/README.md +88 -0
- package/plugin/skills/lsp-setup/references/elixir/README.md +87 -0
- package/plugin/skills/lsp-setup/references/go/README.md +93 -0
- package/plugin/skills/lsp-setup/references/haskell/README.md +89 -0
- package/plugin/skills/lsp-setup/references/java/README.md +89 -0
- package/plugin/skills/lsp-setup/references/julia/README.md +85 -0
- package/plugin/skills/lsp-setup/references/kotlin/README.md +88 -0
- package/plugin/skills/lsp-setup/references/lua/README.md +92 -0
- package/plugin/skills/lsp-setup/references/php/README.md +92 -0
- package/plugin/skills/lsp-setup/references/python/README.md +104 -0
- package/plugin/skills/lsp-setup/references/ruby/README.md +90 -0
- package/plugin/skills/lsp-setup/references/rust/README.md +91 -0
- package/plugin/skills/lsp-setup/references/swift/README.md +91 -0
- package/plugin/skills/lsp-setup/references/terraform/README.md +92 -0
- package/plugin/skills/lsp-setup/references/typescript/README.md +109 -0
- package/plugin/skills/lsp-setup/references/yaml/README.md +93 -0
- package/plugin/skills/lsp-setup/references/zig/README.md +81 -0
- package/plugin/skills/lsp-setup/scripts/detect-lsp.mjs +129 -0
- package/plugin/skills/lsp-setup/scripts/lsp-server-table.mjs +192 -0
- package/plugin/skills/lsp-setup/scripts/verify-lsp.mjs +203 -0
- package/plugin/skills/readme-studio/SKILL.md +111 -0
- package/plugin/skills/readme-studio/references/decoration-and-navigation.md +55 -0
- package/plugin/skills/readme-studio/references/facts-and-assembly.md +19 -0
- package/plugin/skills/readme-studio/references/production-interview.md +11 -0
- package/plugin/skills/readme-studio/references/render-and-deliver.md +44 -0
- package/plugin/skills/readme-studio/references/type-and-background.md +23 -0
- package/plugin/skills/readme-studio/scripts/readme-runtime-lock/package-lock.json +133 -0
- package/plugin/skills/readme-studio/scripts/readme-runtime-lock/package.json +6 -0
- package/plugin/skills/readme-studio/scripts/readme-runtime.mjs +77 -0
- package/plugin/skills/readme-studio/scripts/validate-readme-facts.mjs +28 -0
- package/plugin/skills/readme-studio/templates/cover-source.json +21 -0
- package/plugin/skills/readme-studio/templates/hyperframes-cover/index.html +30 -0
- package/plugin/skills/readme-studio/templates/hyperframes-cover/index.motion.json +1 -0
- package/plugin/skills/readme-studio/templates/hyperframes-cover/package-lock.json +2017 -0
- package/plugin/skills/readme-studio/templates/hyperframes-cover/package.json +8 -0
- package/plugin/skills/readme-studio/templates/readme-cover-section.md +75 -0
- package/plugin/skills/readme-studio/templates/readme-facts.json +4 -0
- package/plugin/skills/readme-studio/templates/remotion-cover/package-lock.json +3783 -0
- package/plugin/skills/readme-studio/templates/remotion-cover/package.json +7 -0
- package/plugin/skills/readme-studio/templates/remotion-cover/src/index.tsx +36 -0
- package/plugin/skills/readme-studio/templates/typography/package-lock.json +133 -0
- package/plugin/skills/readme-studio/templates/typography/package.json +6 -0
- package/plugin/skills/readme-studio/templates/typography/safe-files.mjs +57 -0
- package/plugin/skills/readme-studio/templates/typography/shape-text-to-svg.mjs +63 -0
- package/plugin/skills/refactor/SKILL.md +228 -0
- package/plugin/skills/refactor/references/evidence-and-stops.md +107 -0
- package/plugin/skills/refactor/references/language-and-surface-checks.md +90 -0
- package/plugin/skills/refactor/references/parallel-dispatch.md +66 -0
- package/plugin/skills/refactor/references/phase-templates.md +172 -0
- package/plugin/skills/refactor/references/safe-change-playbook.md +151 -0
- package/plugin/skills/review-work/SKILL.md +227 -0
- package/plugin/skills/review-work/references/agy-plugin-review.md +38 -0
- package/plugin/skills/review-work/references/lane-briefs.md +62 -0
- package/plugin/skills/review-work/references/lane-context.md +44 -0
- package/plugin/skills/review-work/references/lane-goal.md +51 -0
- package/plugin/skills/review-work/references/lane-output-examples.md +79 -0
- package/plugin/skills/review-work/references/lane-qa.md +54 -0
- package/plugin/skills/review-work/references/lane-quality.md +39 -0
- package/plugin/skills/review-work/references/lane-security.md +38 -0
- package/plugin/skills/review-work/references/plan-review-checklist.md +142 -0
- package/plugin/skills/review-work/references/review-rules.md +54 -0
- package/plugin/skills/review-work/references/verdict-templates.md +152 -0
- package/plugin/skills/review-work/references/worked-reviews.md +85 -0
- package/plugin/skills/review-work/scripts/check-lanes.mjs +109 -0
- package/plugin/skills/rules/SKILL.md +175 -0
- package/plugin/skills/rules/references/loading-facts.md +55 -0
- package/plugin/skills/rules/templates/receipt.md +34 -0
- package/plugin/skills/start-work/SKILL.md +191 -0
- package/plugin/skills/start-work/references/admission-and-selection.md +39 -0
- package/plugin/skills/start-work/references/delegation-and-recovery.md +63 -0
- package/plugin/skills/start-work/references/execution-templates.md +131 -0
- package/plugin/skills/start-work/references/final-wave.md +47 -0
- package/plugin/skills/start-work/references/gate-details.md +79 -0
- package/plugin/skills/start-work/scripts/ledger-append.mjs +58 -0
- package/plugin/skills/start-work/scripts/next-row.mjs +99 -0
- package/plugin/skills/structural-search/SKILL.md +223 -0
- package/plugin/skills/structural-search/references/diagnostics.md +289 -0
- package/plugin/skills/structural-search/references/patterns-and-rules.md +356 -0
- package/plugin/skills/structural-search/references/rewrite-safety.md +230 -0
- package/plugin/skills/visual-qa/SKILL.md +136 -0
- package/plugin/skills/visual-qa/references/breakage-catalogue.md +70 -0
- package/plugin/skills/visual-qa/references/capture-playbook.md +96 -0
- package/plugin/skills/visual-qa/references/complete-contract.md +411 -0
- package/plugin/skills/visual-qa/references/korean-and-mixed-script-checks.md +50 -0
- package/plugin/skills/visual-qa/references/reviewer-charters.md +70 -0
- package/plugin/skills/visual-qa/schemas/design-contract-v1alpha1.schema.json +305 -0
- package/plugin/skills/visual-qa/schemas/design-contract-v1beta1.schema.json +291 -0
- package/plugin/skills/visual-qa/schemas/design-contract-v1beta2.schema.json +311 -0
- package/plugin/skills/visual-qa/schemas/evidence-manifest-v1alpha1.schema.json +235 -0
- package/plugin/skills/visual-qa/schemas/evidence-manifest-v1beta1.schema.json +208 -0
- package/plugin/skills/visual-qa/schemas/review-receipt-v1alpha1.schema.json +66 -0
- package/plugin/skills/visual-qa/scripts/ansi.ts +17 -0
- package/plugin/skills/visual-qa/scripts/cli.mjs +101 -0
- package/plugin/skills/visual-qa/scripts/cli.ts +96 -0
- package/plugin/skills/visual-qa/scripts/design-contract-shape.mjs +448 -0
- package/plugin/skills/visual-qa/scripts/east-asian-width.ts +72 -0
- package/plugin/skills/visual-qa/scripts/errors.mjs +12 -0
- package/plugin/skills/visual-qa/scripts/evidence-io.mjs +184 -0
- package/plugin/skills/visual-qa/scripts/evidence-semantic.mjs +95 -0
- package/plugin/skills/visual-qa/scripts/evidence-shape.mjs +163 -0
- package/plugin/skills/visual-qa/scripts/evidence.mjs +421 -0
- package/plugin/skills/visual-qa/scripts/image-diff.mjs +89 -0
- package/plugin/skills/visual-qa/scripts/image-diff.ts +109 -0
- package/plugin/skills/visual-qa/scripts/png-chunks.mjs +107 -0
- package/plugin/skills/visual-qa/scripts/png-crc.ts +27 -0
- package/plugin/skills/visual-qa/scripts/png-decode.mjs +143 -0
- package/plugin/skills/visual-qa/scripts/png-decode.ts +206 -0
- package/plugin/skills/visual-qa/scripts/png-synth.ts +57 -0
- package/plugin/skills/visual-qa/scripts/review-rules.mjs +137 -0
- package/plugin/skills/visual-qa/scripts/strict-json.mjs +143 -0
- package/plugin/skills/visual-qa/scripts/terminal-text.mjs +117 -0
- package/plugin/skills/visual-qa/scripts/tui-check.mjs +74 -0
- package/plugin/skills/visual-qa/scripts/tui-grid.ts +88 -0
- package/plugin/skills/visual-qa/scripts/types.ts +54 -0
- package/plugin/skills/wikify/LICENSE +21 -0
- package/plugin/skills/wikify/PROVENANCE.md +31 -0
- package/plugin/skills/wikify/SKILL.md +245 -0
- package/plugin/skills/wikify/assets/home-template.md +44 -0
- package/plugin/skills/wikify/assets/maintenance-report-template.md +46 -0
- package/plugin/skills/wikify/assets/paper-source-note-template.md +137 -0
- package/plugin/skills/wikify/assets/source-note-template.md +45 -0
- package/plugin/skills/wikify/assets/wiki-rules-template.md +117 -0
- package/plugin/skills/wikify/modes/ingest.md +40 -0
- package/plugin/skills/wikify/modes/init.md +50 -0
- package/plugin/skills/wikify/modes/lint.md +43 -0
- package/plugin/skills/wikify/modes/query.md +35 -0
- package/plugin/skills/wikify/modes/save.md +43 -0
- package/plugin/skills/wikify/references/bridge-and-promotion.md +70 -0
- package/plugin/skills/wikify/references/capture-review-protocol.md +78 -0
- package/plugin/skills/wikify/references/knowledge-script-contract.md +95 -0
- package/plugin/skills/wikify/references/lint-and-maintenance.md +83 -0
- package/plugin/skills/wikify/references/paper-notes.md +56 -0
- package/plugin/skills/wikify/references/query-protocol.md +58 -0
- package/plugin/skills/wikify/references/source-notes-and-citations.md +71 -0
- package/plugin/skills/wikify/references/wiki-layout.md +152 -0
- package/plugin/skills/wikify/scripts/wikify-knowledge.mjs +483 -0
|
@@ -0,0 +1,1395 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Convert Markdown to DOCX with proper styling.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
python convert_md_to_docx.py input.md output.docx [--template template.docx]
|
|
6
|
+
python convert_md_to_docx.py input.md output.docx --publisher elsevier
|
|
7
|
+
|
|
8
|
+
Features:
|
|
9
|
+
- Headings (H1-H6 → Word heading styles)
|
|
10
|
+
- Paragraphs with bold/italic/code formatting
|
|
11
|
+
- Bullet and numbered lists
|
|
12
|
+
- Tables
|
|
13
|
+
- Code blocks (monospace font)
|
|
14
|
+
- Images (if local)
|
|
15
|
+
- Links (as hyperlinks)
|
|
16
|
+
- [NEW in M1] --publisher NAME loads templates/registry.yaml and applies
|
|
17
|
+
journal design discipline: title block from YAML frontmatter, curly
|
|
18
|
+
quotes, en/em dashes, nbsp before units, ellipsis, heading auto-numbering,
|
|
19
|
+
booktabs tables, banned-font/style stripping, CJK font pairing.
|
|
20
|
+
- --tonality NAME (or frontmatter `tonality:`) builds the document in one of
|
|
21
|
+
the six design directions of templates/tonalities/ (docx_design.py), with
|
|
22
|
+
the page components written as ::: directives; --density and --variance
|
|
23
|
+
move the pack's dials. Without a tonality or a publisher the plain profile
|
|
24
|
+
runs through the same builders with neutral tokens.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
from __future__ import annotations
|
|
28
|
+
import os as _os
|
|
29
|
+
import sys as _sys
|
|
30
|
+
|
|
31
|
+
_sys.dont_write_bytecode = True # the installed skill directory stays read-only
|
|
32
|
+
_sys.path.insert(0, _os.path.join(_os.path.dirname(_os.path.abspath(__file__)), "..", "..", "lit-pptx", "scripts"))
|
|
33
|
+
from office_runtime_bootstrap import ensure_runtime # noqa: E402
|
|
34
|
+
from office_data import DataError, resolve_text # noqa: E402
|
|
35
|
+
|
|
36
|
+
ensure_runtime(["docx", "markdown", "bs4", "yaml"])
|
|
37
|
+
|
|
38
|
+
import argparse
|
|
39
|
+
import copy
|
|
40
|
+
import re
|
|
41
|
+
import sys
|
|
42
|
+
from pathlib import Path
|
|
43
|
+
from typing import Any
|
|
44
|
+
|
|
45
|
+
try:
|
|
46
|
+
import markdown
|
|
47
|
+
from markdown.extensions.tables import TableExtension
|
|
48
|
+
from markdown.extensions.fenced_code import FencedCodeExtension
|
|
49
|
+
except ImportError:
|
|
50
|
+
print("Error: 'markdown' library not found. Install with: pip install markdown")
|
|
51
|
+
sys.exit(1)
|
|
52
|
+
|
|
53
|
+
try:
|
|
54
|
+
from docx import Document
|
|
55
|
+
from docx.shared import Pt, Inches, Cm, RGBColor
|
|
56
|
+
from docx.enum.text import WD_ALIGN_PARAGRAPH
|
|
57
|
+
from docx.enum.style import WD_STYLE_TYPE
|
|
58
|
+
from docx.oxml.ns import qn
|
|
59
|
+
from docx.oxml import OxmlElement
|
|
60
|
+
from docx.text.paragraph import Paragraph
|
|
61
|
+
except ImportError:
|
|
62
|
+
print("Error: 'python-docx' library not found. Install with: pip install python-docx")
|
|
63
|
+
sys.exit(1)
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
from bs4 import BeautifulSoup, NavigableString
|
|
67
|
+
except ImportError:
|
|
68
|
+
print("Error: 'beautifulsoup4' library not found. Install with: pip install beautifulsoup4")
|
|
69
|
+
sys.exit(1)
|
|
70
|
+
|
|
71
|
+
import docx_design # noqa: E402 (needs the runtime's python-docx and PyYAML)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
# ===========================================================================
|
|
75
|
+
# Legacy HTML→DOCX helpers (unchanged from pre-M1 — preserved byte-for-byte)
|
|
76
|
+
# ===========================================================================
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def create_hyperlink(paragraph, url: str, text: str):
|
|
80
|
+
"""Add a hyperlink to a paragraph."""
|
|
81
|
+
part = paragraph.part
|
|
82
|
+
r_id = part.relate_to(url, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", is_external=True)
|
|
83
|
+
|
|
84
|
+
hyperlink = OxmlElement('w:hyperlink')
|
|
85
|
+
hyperlink.set(qn('r:id'), r_id)
|
|
86
|
+
|
|
87
|
+
new_run = OxmlElement('w:r')
|
|
88
|
+
rPr = OxmlElement('w:rPr')
|
|
89
|
+
|
|
90
|
+
# Blue color and underline for hyperlink
|
|
91
|
+
color = OxmlElement('w:color')
|
|
92
|
+
color.set(qn('w:val'), '0000FF')
|
|
93
|
+
rPr.append(color)
|
|
94
|
+
|
|
95
|
+
underline = OxmlElement('w:u')
|
|
96
|
+
underline.set(qn('w:val'), 'single')
|
|
97
|
+
rPr.append(underline)
|
|
98
|
+
|
|
99
|
+
new_run.append(rPr)
|
|
100
|
+
|
|
101
|
+
text_elem = OxmlElement('w:t')
|
|
102
|
+
text_elem.text = text
|
|
103
|
+
new_run.append(text_elem)
|
|
104
|
+
|
|
105
|
+
hyperlink.append(new_run)
|
|
106
|
+
paragraph._p.append(hyperlink)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def process_inline_elements(paragraph, element, md_path: Path):
|
|
110
|
+
"""Process inline elements like bold, italic, code, links within a paragraph."""
|
|
111
|
+
if isinstance(element, NavigableString):
|
|
112
|
+
text = str(element)
|
|
113
|
+
if text.strip():
|
|
114
|
+
paragraph.add_run(text)
|
|
115
|
+
elif text:
|
|
116
|
+
paragraph.add_run(text)
|
|
117
|
+
return
|
|
118
|
+
|
|
119
|
+
if element.name == 'strong' or element.name == 'b':
|
|
120
|
+
run = paragraph.add_run(element.get_text())
|
|
121
|
+
run.bold = True
|
|
122
|
+
elif element.name == 'em' or element.name == 'i':
|
|
123
|
+
run = paragraph.add_run(element.get_text())
|
|
124
|
+
run.italic = True
|
|
125
|
+
elif element.name == 'code':
|
|
126
|
+
run = paragraph.add_run(element.get_text())
|
|
127
|
+
run.font.name = 'Courier New'
|
|
128
|
+
run.font.size = Pt(10)
|
|
129
|
+
elif element.name == 'a':
|
|
130
|
+
href = element.get('href', '')
|
|
131
|
+
text = element.get_text()
|
|
132
|
+
if href:
|
|
133
|
+
create_hyperlink(paragraph, href, text)
|
|
134
|
+
else:
|
|
135
|
+
paragraph.add_run(text)
|
|
136
|
+
elif element.name == 'img':
|
|
137
|
+
src = element.get('src', '')
|
|
138
|
+
if src and not src.startswith(('http://', 'https://', 'data:')):
|
|
139
|
+
img_path = (md_path.parent / src).resolve()
|
|
140
|
+
if img_path.exists():
|
|
141
|
+
try:
|
|
142
|
+
paragraph.add_run().add_picture(str(img_path), width=Inches(4))
|
|
143
|
+
except Exception:
|
|
144
|
+
paragraph.add_run(f"[Image: {src}]")
|
|
145
|
+
else:
|
|
146
|
+
paragraph.add_run(f"[Image not found: {src}]")
|
|
147
|
+
else:
|
|
148
|
+
paragraph.add_run(f"[Image: {src}]")
|
|
149
|
+
elif element.name == 'br':
|
|
150
|
+
paragraph.add_run('\n')
|
|
151
|
+
else:
|
|
152
|
+
# Recursively process children
|
|
153
|
+
for child in element.children:
|
|
154
|
+
process_inline_elements(paragraph, child, md_path)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def add_paragraph_with_formatting(doc: Document, element, md_path: Path, style: str = None):
|
|
158
|
+
"""Add a paragraph with inline formatting."""
|
|
159
|
+
para = doc.add_paragraph(style=style)
|
|
160
|
+
for child in element.children:
|
|
161
|
+
process_inline_elements(para, child, md_path)
|
|
162
|
+
return para
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def process_list(doc: Document, element, md_path: Path, ordered: bool = False, level: int = 0):
|
|
166
|
+
"""Process ordered or unordered lists."""
|
|
167
|
+
for i, li in enumerate(element.find_all('li', recursive=False)):
|
|
168
|
+
# Create paragraph with list style
|
|
169
|
+
para = doc.add_paragraph(style='List Number' if ordered else 'List Bullet')
|
|
170
|
+
|
|
171
|
+
# Set indentation for nested lists
|
|
172
|
+
if level > 0:
|
|
173
|
+
para.paragraph_format.left_indent = Inches(0.5 * level)
|
|
174
|
+
|
|
175
|
+
# Process direct text content. Only the item's own edges are trimmed: the space after a bold lead
|
|
176
|
+
# ("**1,200개** 태그") belongs to the text.
|
|
177
|
+
children = list(li.children)
|
|
178
|
+
for ci, child in enumerate(children):
|
|
179
|
+
if isinstance(child, NavigableString):
|
|
180
|
+
text = str(child).replace("\n", " ")
|
|
181
|
+
if ci == 0 or getattr(children[ci - 1], "name", None) in ('ul', 'ol', 'p'):
|
|
182
|
+
text = text.lstrip()
|
|
183
|
+
if ci == len(children) - 1 or getattr(children[ci + 1], "name", None) in ('ul', 'ol', 'p'):
|
|
184
|
+
text = text.rstrip()
|
|
185
|
+
if text:
|
|
186
|
+
para.add_run(text)
|
|
187
|
+
elif child.name in ('ul', 'ol'):
|
|
188
|
+
# Nested list
|
|
189
|
+
process_list(doc, child, md_path, ordered=(child.name == 'ol'), level=level + 1)
|
|
190
|
+
elif child.name == 'p':
|
|
191
|
+
# Process paragraph content inline
|
|
192
|
+
for subchild in child.children:
|
|
193
|
+
process_inline_elements(para, subchild, md_path)
|
|
194
|
+
else:
|
|
195
|
+
process_inline_elements(para, child, md_path)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def process_table(doc: Document, element, md_path: Path):
|
|
199
|
+
"""Process HTML table and create DOCX table."""
|
|
200
|
+
rows = element.find_all('tr')
|
|
201
|
+
if not rows:
|
|
202
|
+
return
|
|
203
|
+
|
|
204
|
+
# Count columns from first row
|
|
205
|
+
first_row = rows[0]
|
|
206
|
+
cols = len(first_row.find_all(['th', 'td']))
|
|
207
|
+
|
|
208
|
+
if cols == 0:
|
|
209
|
+
return
|
|
210
|
+
|
|
211
|
+
table = doc.add_table(rows=len(rows), cols=cols)
|
|
212
|
+
table.style = 'Table Grid'
|
|
213
|
+
|
|
214
|
+
for row_idx, tr in enumerate(rows):
|
|
215
|
+
cells = tr.find_all(['th', 'td'])
|
|
216
|
+
for col_idx, cell in enumerate(cells):
|
|
217
|
+
if col_idx < cols:
|
|
218
|
+
table_cell = table.rows[row_idx].cells[col_idx]
|
|
219
|
+
# Clear default paragraph
|
|
220
|
+
table_cell.text = ''
|
|
221
|
+
para = table_cell.paragraphs[0]
|
|
222
|
+
for child in cell.children:
|
|
223
|
+
process_inline_elements(para, child, md_path)
|
|
224
|
+
|
|
225
|
+
# Bold for header cells
|
|
226
|
+
if cell.name == 'th':
|
|
227
|
+
for run in para.runs:
|
|
228
|
+
run.bold = True
|
|
229
|
+
|
|
230
|
+
shape_table(doc, table, [[c.get_text(" ", strip=True) for c in tr.find_all(['th', 'td'])] for tr in rows])
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
# A cell reads as a number when, after signs and units, only digits remain.
|
|
234
|
+
NUMERIC_CELL = re.compile(r"^[+\-−±▲▼△▽]?\s*[\d.,]+\s*(?:%p?|배|x|pt|[가-힣]{1,3}|[A-Za-z]{1,3})?$")
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def shape_table(doc, table, texts: list[list[str]]) -> None:
|
|
238
|
+
"""Give a table readable columns and keep it whole on the page.
|
|
239
|
+
|
|
240
|
+
Column widths follow the longest cell of each column (Hangul counted wider)
|
|
241
|
+
with a floor, so a short column never squeezes a long one into one word per
|
|
242
|
+
line. The header row repeats on a new page, a row never splits across pages,
|
|
243
|
+
and columns of numbers are right-aligned.
|
|
244
|
+
"""
|
|
245
|
+
if not texts or not texts[0]:
|
|
246
|
+
return
|
|
247
|
+
cols = len(table.columns)
|
|
248
|
+
section = doc.sections[-1]
|
|
249
|
+
usable = section.page_width - section.left_margin - section.right_margin
|
|
250
|
+
|
|
251
|
+
def width_of(text: str) -> float:
|
|
252
|
+
# Hangul runs a little over twice as wide as Latin; +3 covers the cell padding.
|
|
253
|
+
return sum(2.3 if "\uac00" <= ch <= "\ud7a3" else 1.0 for ch in text) + 3.0
|
|
254
|
+
|
|
255
|
+
want = []
|
|
256
|
+
for ci in range(cols):
|
|
257
|
+
column = [row[ci] for row in texts if ci < len(row)]
|
|
258
|
+
want.append(max([width_of(t) for t in column] + [4.0]))
|
|
259
|
+
# Each column first gets its natural width (about 0.085 in per Latin character at
|
|
260
|
+
# body size, capped at 45% of the line); columns that hit the cap share what is left.
|
|
261
|
+
unit = Inches(0.085)
|
|
262
|
+
cap = usable * 0.45
|
|
263
|
+
natural = [min(w * unit, cap) for w in want]
|
|
264
|
+
capped = [ci for ci in range(cols) if want[ci] * unit > cap]
|
|
265
|
+
spare = usable - sum(natural)
|
|
266
|
+
if spare > 0 and capped:
|
|
267
|
+
for ci in capped:
|
|
268
|
+
natural[ci] += spare / len(capped)
|
|
269
|
+
elif spare > 0:
|
|
270
|
+
natural = [w + spare / cols for w in natural]
|
|
271
|
+
scale = usable / sum(natural)
|
|
272
|
+
widths = [int(w * scale) for w in natural]
|
|
273
|
+
|
|
274
|
+
table.autofit = False
|
|
275
|
+
for ci, column in enumerate(table.columns):
|
|
276
|
+
column.width = widths[ci]
|
|
277
|
+
for ri, row in enumerate(table.rows):
|
|
278
|
+
tr_pr = row._tr.get_or_add_trPr()
|
|
279
|
+
# Schema order puts cantSplit before trHeight and tblHeader after it.
|
|
280
|
+
tr_pr.insert(0, OxmlElement("w:cantSplit"))
|
|
281
|
+
if ri == 0:
|
|
282
|
+
header = OxmlElement("w:tblHeader")
|
|
283
|
+
tr_pr.append(header)
|
|
284
|
+
for ci, cell in enumerate(row.cells):
|
|
285
|
+
if ci < cols:
|
|
286
|
+
cell.width = widths[ci]
|
|
287
|
+
for paragraph in cell.paragraphs:
|
|
288
|
+
# Body line spacing (1.6 in some profiles) makes every row a double row.
|
|
289
|
+
paragraph.paragraph_format.line_spacing = 1.15
|
|
290
|
+
paragraph.paragraph_format.space_after = Pt(0)
|
|
291
|
+
paragraph.paragraph_format.first_line_indent = Cm(0)
|
|
292
|
+
|
|
293
|
+
for ci in range(cols):
|
|
294
|
+
data = [row[ci] for row in texts[1:] if ci < len(row) and row[ci].strip()]
|
|
295
|
+
if data and all(NUMERIC_CELL.match(t.strip()) for t in data):
|
|
296
|
+
for row in table.rows:
|
|
297
|
+
for paragraph in row.cells[ci].paragraphs:
|
|
298
|
+
paragraph.alignment = WD_ALIGN_PARAGRAPH.RIGHT
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def process_code_block(doc: Document, element):
|
|
302
|
+
"""Process code block with monospace formatting."""
|
|
303
|
+
code = element.find('code')
|
|
304
|
+
text = code.get_text() if code else element.get_text()
|
|
305
|
+
|
|
306
|
+
para = doc.add_paragraph()
|
|
307
|
+
run = para.add_run(text)
|
|
308
|
+
run.font.name = 'Courier New'
|
|
309
|
+
run.font.size = Pt(9)
|
|
310
|
+
|
|
311
|
+
# Light gray background (via shading)
|
|
312
|
+
shading = OxmlElement('w:shd')
|
|
313
|
+
shading.set(qn('w:fill'), 'F0F0F0')
|
|
314
|
+
para._p.get_or_add_pPr().append(shading)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def add_figure_caption(doc, element, para) -> None:
|
|
318
|
+
"""An image alone in its paragraph keeps its alt text as the caption under it
|
|
319
|
+
("Figure 1." / "그림 1." bold), and the image keeps with the caption."""
|
|
320
|
+
images = element.find_all('img')
|
|
321
|
+
alt = images[0].get('alt', '').strip() if len(images) == 1 else ''
|
|
322
|
+
if not alt or element.get_text(strip=True):
|
|
323
|
+
return
|
|
324
|
+
para.paragraph_format.keep_with_next = True
|
|
325
|
+
try:
|
|
326
|
+
caption = doc.add_paragraph(style='Caption')
|
|
327
|
+
except KeyError:
|
|
328
|
+
caption = doc.add_paragraph()
|
|
329
|
+
label = docx_design.FIGURE_LABEL.match(alt)
|
|
330
|
+
if label:
|
|
331
|
+
caption.add_run(label.group(1)).bold = True
|
|
332
|
+
caption.add_run(alt[len(label.group(1)):])
|
|
333
|
+
else:
|
|
334
|
+
caption.add_run(alt)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
def html_to_docx(html: str, doc: Document, md_path: Path):
|
|
338
|
+
"""Convert HTML to DOCX elements."""
|
|
339
|
+
soup = BeautifulSoup(html, 'html.parser')
|
|
340
|
+
|
|
341
|
+
for element in soup.children:
|
|
342
|
+
if isinstance(element, NavigableString):
|
|
343
|
+
text = str(element).strip()
|
|
344
|
+
if text:
|
|
345
|
+
doc.add_paragraph(text)
|
|
346
|
+
continue
|
|
347
|
+
|
|
348
|
+
if element.name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6'):
|
|
349
|
+
level = int(element.name[1])
|
|
350
|
+
heading = doc.add_heading(level=level)
|
|
351
|
+
for child in element.children:
|
|
352
|
+
process_inline_elements(heading, child, md_path)
|
|
353
|
+
|
|
354
|
+
elif element.name == 'p':
|
|
355
|
+
para = add_paragraph_with_formatting(doc, element, md_path)
|
|
356
|
+
add_figure_caption(doc, element, para)
|
|
357
|
+
|
|
358
|
+
elif element.name == 'ul':
|
|
359
|
+
process_list(doc, element, md_path, ordered=False)
|
|
360
|
+
|
|
361
|
+
elif element.name == 'ol':
|
|
362
|
+
process_list(doc, element, md_path, ordered=True)
|
|
363
|
+
|
|
364
|
+
elif element.name == 'table':
|
|
365
|
+
process_table(doc, element, md_path)
|
|
366
|
+
|
|
367
|
+
elif element.name == 'pre':
|
|
368
|
+
process_code_block(doc, element)
|
|
369
|
+
|
|
370
|
+
elif element.name == 'blockquote':
|
|
371
|
+
para = doc.add_paragraph(style='Quote')
|
|
372
|
+
for child in element.children:
|
|
373
|
+
if child.name == 'p':
|
|
374
|
+
for subchild in child.children:
|
|
375
|
+
process_inline_elements(para, subchild, md_path)
|
|
376
|
+
else:
|
|
377
|
+
process_inline_elements(para, child, md_path)
|
|
378
|
+
|
|
379
|
+
elif element.name == 'hr':
|
|
380
|
+
# Add a horizontal line
|
|
381
|
+
para = doc.add_paragraph()
|
|
382
|
+
para.add_run('─' * 50)
|
|
383
|
+
para.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
|
384
|
+
|
|
385
|
+
elif element.name in ('div', 'section', 'article'):
|
|
386
|
+
# Recursively process container elements
|
|
387
|
+
html_to_docx(str(element), doc, md_path)
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
# ===========================================================================
|
|
391
|
+
# M1: Journal workflow — frontmatter, filters, design enforcement
|
|
392
|
+
# ===========================================================================
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
def _load_yaml():
|
|
396
|
+
try:
|
|
397
|
+
import yaml
|
|
398
|
+
return yaml
|
|
399
|
+
except ImportError:
|
|
400
|
+
print("Error: 'pyyaml' library required for --publisher. pip install pyyaml")
|
|
401
|
+
sys.exit(1)
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
def parse_frontmatter(md_text: str) -> tuple[dict, str]:
|
|
405
|
+
"""Extract leading YAML frontmatter. Returns (frontmatter_dict, body)."""
|
|
406
|
+
if not md_text.startswith("---"):
|
|
407
|
+
return {}, md_text
|
|
408
|
+
# Find closing fence
|
|
409
|
+
lines = md_text.splitlines(keepends=True)
|
|
410
|
+
if len(lines) < 2:
|
|
411
|
+
return {}, md_text
|
|
412
|
+
end_idx = None
|
|
413
|
+
for i in range(1, len(lines)):
|
|
414
|
+
if lines[i].rstrip() == "---":
|
|
415
|
+
end_idx = i
|
|
416
|
+
break
|
|
417
|
+
if end_idx is None:
|
|
418
|
+
return {}, md_text
|
|
419
|
+
yaml_src = "".join(lines[1:end_idx])
|
|
420
|
+
body = "".join(lines[end_idx + 1:])
|
|
421
|
+
yaml = _load_yaml()
|
|
422
|
+
try:
|
|
423
|
+
data = yaml.safe_load(yaml_src) or {}
|
|
424
|
+
except Exception as exc:
|
|
425
|
+
print(f"Warning: could not parse YAML frontmatter: {exc}", file=sys.stderr)
|
|
426
|
+
return {}, md_text
|
|
427
|
+
if not isinstance(data, dict):
|
|
428
|
+
return {}, md_text
|
|
429
|
+
return data, body
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
def load_publisher(registry_path: Path, name: str) -> dict:
|
|
433
|
+
yaml = _load_yaml()
|
|
434
|
+
if not registry_path.exists():
|
|
435
|
+
raise SystemExit(f"Error: registry not found: {registry_path}")
|
|
436
|
+
with registry_path.open("r", encoding="utf-8") as fh:
|
|
437
|
+
data = yaml.safe_load(fh) or {}
|
|
438
|
+
pubs = data.get("publishers") or {}
|
|
439
|
+
if name not in pubs:
|
|
440
|
+
raise SystemExit(
|
|
441
|
+
f"Error: publisher {name!r} not in registry "
|
|
442
|
+
f"(known: {', '.join(sorted(pubs)) or 'none'})"
|
|
443
|
+
)
|
|
444
|
+
return pubs[name]
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
# ---------------------------------------------------------------------------
|
|
448
|
+
# Code-preserving filter helpers
|
|
449
|
+
# ---------------------------------------------------------------------------
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
_FENCE_RE = re.compile(r"(^```.*?^```)", re.MULTILINE | re.DOTALL)
|
|
453
|
+
_INLINE_CODE_RE = re.compile(r"(`[^`\n]+`)")
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
def _split_code_preserving(text: str) -> list[tuple[str, bool]]:
|
|
457
|
+
"""Split text into (segment, is_code) tuples.
|
|
458
|
+
|
|
459
|
+
Fenced code blocks and inline backtick code are returned as is_code=True
|
|
460
|
+
and must never be touched by the micro-typography filters.
|
|
461
|
+
"""
|
|
462
|
+
# First split on fenced code blocks
|
|
463
|
+
out: list[tuple[str, bool]] = []
|
|
464
|
+
pos = 0
|
|
465
|
+
for m in _FENCE_RE.finditer(text):
|
|
466
|
+
if m.start() > pos:
|
|
467
|
+
out.append((text[pos:m.start()], False))
|
|
468
|
+
out.append((m.group(0), True))
|
|
469
|
+
pos = m.end()
|
|
470
|
+
if pos < len(text):
|
|
471
|
+
out.append((text[pos:], False))
|
|
472
|
+
# Then split non-code segments on inline backtick code
|
|
473
|
+
refined: list[tuple[str, bool]] = []
|
|
474
|
+
for seg, is_code in out:
|
|
475
|
+
if is_code:
|
|
476
|
+
refined.append((seg, True))
|
|
477
|
+
continue
|
|
478
|
+
last = 0
|
|
479
|
+
for m in _INLINE_CODE_RE.finditer(seg):
|
|
480
|
+
if m.start() > last:
|
|
481
|
+
refined.append((seg[last:m.start()], False))
|
|
482
|
+
refined.append((m.group(0), True))
|
|
483
|
+
last = m.end()
|
|
484
|
+
if last < len(seg):
|
|
485
|
+
refined.append((seg[last:], False))
|
|
486
|
+
return refined
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
def _apply_to_noncode(text: str, fn) -> str:
|
|
490
|
+
parts = _split_code_preserving(text)
|
|
491
|
+
out = []
|
|
492
|
+
for seg, is_code in parts:
|
|
493
|
+
out.append(seg if is_code else fn(seg))
|
|
494
|
+
return "".join(out)
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
# ---------------------------------------------------------------------------
|
|
498
|
+
# Pre-MD micro-typography filters
|
|
499
|
+
# ---------------------------------------------------------------------------
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
_NUMRANGE_RE = re.compile(r"(\d)-(\d)")
|
|
503
|
+
_PAREN_DASH_RE = re.compile(r"(\w) - (\w)")
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
def fix_dashes(text: str, rules: dict | None = None) -> str:
|
|
507
|
+
"""Numeric ranges → en-dash; parenthetical 'word - word' → em-dash.
|
|
508
|
+
|
|
509
|
+
rules is the design.micro_typography.dashes block (currently informational;
|
|
510
|
+
M1 hardcodes en-dash for numeric range and em-dash for parenthetical).
|
|
511
|
+
"""
|
|
512
|
+
def _fn(seg: str) -> str:
|
|
513
|
+
seg = _NUMRANGE_RE.sub(lambda m: f"{m.group(1)}\u2013{m.group(2)}", seg)
|
|
514
|
+
seg = _PAREN_DASH_RE.sub(lambda m: f"{m.group(1)} \u2014 {m.group(2)}", seg)
|
|
515
|
+
return seg
|
|
516
|
+
return _apply_to_noncode(text, _fn)
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
def fix_quotes(text: str) -> str:
|
|
520
|
+
"""ASCII "..." → "..."; '...' → '...' via left/right state machine."""
|
|
521
|
+
def _fn(seg: str) -> str:
|
|
522
|
+
out_chars = []
|
|
523
|
+
open_dq = True
|
|
524
|
+
open_sq = True
|
|
525
|
+
for ch in seg:
|
|
526
|
+
if ch == '"':
|
|
527
|
+
out_chars.append("\u201C" if open_dq else "\u201D")
|
|
528
|
+
open_dq = not open_dq
|
|
529
|
+
elif ch == "'":
|
|
530
|
+
# Keep apostrophe if surrounded by letters (e.g. "don't")
|
|
531
|
+
prev = out_chars[-1] if out_chars else ""
|
|
532
|
+
if prev.isalpha():
|
|
533
|
+
out_chars.append("\u2019")
|
|
534
|
+
else:
|
|
535
|
+
out_chars.append("\u2018" if open_sq else "\u2019")
|
|
536
|
+
open_sq = not open_sq
|
|
537
|
+
else:
|
|
538
|
+
out_chars.append(ch)
|
|
539
|
+
return "".join(out_chars)
|
|
540
|
+
return _apply_to_noncode(text, _fn)
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
_UNIT_GROUP = (
|
|
544
|
+
r"mg|g|kg|mL|L|\u03BCL|uL|nm|\u03BCm|um|mm|cm|m|km|K|\u00B0C|%|min|h|s|ms"
|
|
545
|
+
)
|
|
546
|
+
_UNIT_RE = re.compile(rf"(\d)(\s+)({_UNIT_GROUP})(?=\b|\W|$)")
|
|
547
|
+
_FIG_RE = re.compile(r"(Fig\.)\s(\d)")
|
|
548
|
+
_TABLE_RE = re.compile(r"(Table)\s(\d)")
|
|
549
|
+
_EQ_RE = re.compile(r"(Eq\.)\s(\d)")
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
def fix_unit_spacing(text: str) -> str:
|
|
553
|
+
"""Insert U+00A0 between number and SI unit, and after Fig./Table/Eq."""
|
|
554
|
+
def _fn(seg: str) -> str:
|
|
555
|
+
seg = _UNIT_RE.sub(lambda m: f"{m.group(1)}\u00A0{m.group(3)}", seg)
|
|
556
|
+
seg = _FIG_RE.sub(lambda m: f"{m.group(1)}\u00A0{m.group(2)}", seg)
|
|
557
|
+
seg = _TABLE_RE.sub(lambda m: f"{m.group(1)}\u00A0{m.group(2)}", seg)
|
|
558
|
+
seg = _EQ_RE.sub(lambda m: f"{m.group(1)}\u00A0{m.group(2)}", seg)
|
|
559
|
+
return seg
|
|
560
|
+
return _apply_to_noncode(text, _fn)
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
def fix_ellipsis(text: str) -> str:
|
|
564
|
+
def _fn(seg: str) -> str:
|
|
565
|
+
return seg.replace("...", "\u2026")
|
|
566
|
+
return _apply_to_noncode(text, _fn)
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
def normalize_double_spaces(text: str) -> str:
|
|
570
|
+
def _fn(seg: str) -> str:
|
|
571
|
+
# Preserve leading indentation; collapse interior double spaces
|
|
572
|
+
lines = seg.split("\n")
|
|
573
|
+
cleaned = []
|
|
574
|
+
for line in lines:
|
|
575
|
+
stripped_left = line.lstrip(" ")
|
|
576
|
+
lead = line[: len(line) - len(stripped_left)]
|
|
577
|
+
cleaned.append(lead + re.sub(r" {2,}", " ", stripped_left))
|
|
578
|
+
return "\n".join(cleaned)
|
|
579
|
+
return _apply_to_noncode(text, _fn)
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
# ---------------------------------------------------------------------------
|
|
583
|
+
# Post-HTML (doc object) filters
|
|
584
|
+
# ---------------------------------------------------------------------------
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
def apply_heading_numbering(doc, design: dict) -> None:
|
|
588
|
+
def to_roman(value: int) -> str:
|
|
589
|
+
numerals = [
|
|
590
|
+
(1000, "M"), (900, "CM"), (500, "D"), (400, "CD"),
|
|
591
|
+
(100, "C"), (90, "XC"), (50, "L"), (40, "XL"),
|
|
592
|
+
(10, "X"), (9, "IX"), (5, "V"), (4, "IV"), (1, "I"),
|
|
593
|
+
]
|
|
594
|
+
out: list[str] = []
|
|
595
|
+
remaining = value
|
|
596
|
+
for arabic, roman in numerals:
|
|
597
|
+
while remaining >= arabic:
|
|
598
|
+
out.append(roman)
|
|
599
|
+
remaining -= arabic
|
|
600
|
+
return "".join(out)
|
|
601
|
+
|
|
602
|
+
def prefix_for(level: int, counters: list[int]) -> str | None:
|
|
603
|
+
key = f"h{level}"
|
|
604
|
+
cfg = (design.get("heading_hierarchy") or {}).get(key) or {}
|
|
605
|
+
numbering = cfg.get("numbering")
|
|
606
|
+
if numbering is None:
|
|
607
|
+
return None
|
|
608
|
+
numbering = str(numbering).strip()
|
|
609
|
+
if level == 1 and numbering.upper() == "I.":
|
|
610
|
+
return f"{to_roman(counters[0])}. "
|
|
611
|
+
if level == 1:
|
|
612
|
+
return f"{counters[0]}. "
|
|
613
|
+
if level == 2:
|
|
614
|
+
return f"{counters[0]}.{counters[1]}. "
|
|
615
|
+
if level == 3:
|
|
616
|
+
return f"{counters[0]}.{counters[1]}.{counters[2]}. "
|
|
617
|
+
return None
|
|
618
|
+
|
|
619
|
+
counters = [0, 0, 0]
|
|
620
|
+
for para in doc.paragraphs:
|
|
621
|
+
style_name = para.style.name if para.style else ""
|
|
622
|
+
level = 0
|
|
623
|
+
if style_name == "Heading 1":
|
|
624
|
+
level = 1
|
|
625
|
+
counters[0] += 1
|
|
626
|
+
counters[1] = 0
|
|
627
|
+
counters[2] = 0
|
|
628
|
+
elif style_name == "Heading 2":
|
|
629
|
+
level = 2
|
|
630
|
+
counters[1] += 1
|
|
631
|
+
counters[2] = 0
|
|
632
|
+
elif style_name == "Heading 3":
|
|
633
|
+
level = 3
|
|
634
|
+
counters[2] += 1
|
|
635
|
+
else:
|
|
636
|
+
continue
|
|
637
|
+
prefix = prefix_for(level, counters)
|
|
638
|
+
if prefix is None:
|
|
639
|
+
continue
|
|
640
|
+
current = para.text or ""
|
|
641
|
+
# Skip if already numbered (e.g. "1 Introduction" from the source)
|
|
642
|
+
if re.match(r"^(?:\d+(?:\.\d+)*\.?|[IVXLCDM]+\.?)\s", current):
|
|
643
|
+
continue
|
|
644
|
+
if para.runs:
|
|
645
|
+
para.runs[0].text = prefix + para.runs[0].text
|
|
646
|
+
else:
|
|
647
|
+
para.add_run(prefix)
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
def _set_cell_borders_nil(tcPr):
|
|
651
|
+
tcBorders = tcPr.find(qn("w:tcBorders"))
|
|
652
|
+
if tcBorders is None:
|
|
653
|
+
tcBorders = OxmlElement("w:tcBorders")
|
|
654
|
+
tcPr.append(tcBorders)
|
|
655
|
+
for side in ("top", "left", "bottom", "right", "insideH", "insideV"):
|
|
656
|
+
el = tcBorders.find(qn(f"w:{side}"))
|
|
657
|
+
if el is None:
|
|
658
|
+
el = OxmlElement(f"w:{side}")
|
|
659
|
+
tcBorders.append(el)
|
|
660
|
+
el.set(qn("w:val"), "nil")
|
|
661
|
+
el.set(qn("w:sz"), "0")
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
def apply_table_style(doc, design: dict) -> None:
|
|
665
|
+
"""Override python-docx 'Table Grid' with booktabs: only horizontal rules.
|
|
666
|
+
|
|
667
|
+
Rules: top rule (table top), header-bottom rule, bottom rule (table bottom).
|
|
668
|
+
All vertical rules (left/right/insideV) set to nil.
|
|
669
|
+
"""
|
|
670
|
+
for table in doc.tables:
|
|
671
|
+
table.style = None # detach Table Grid
|
|
672
|
+
tbl = table._tbl
|
|
673
|
+
tblPr = tbl.find(qn("w:tblPr"))
|
|
674
|
+
if tblPr is None:
|
|
675
|
+
tblPr = OxmlElement("w:tblPr")
|
|
676
|
+
tbl.insert(0, tblPr)
|
|
677
|
+
# Remove any existing tblBorders and add our booktabs set
|
|
678
|
+
existing = tblPr.find(qn("w:tblBorders"))
|
|
679
|
+
if existing is not None:
|
|
680
|
+
tblPr.remove(existing)
|
|
681
|
+
tblBorders = OxmlElement("w:tblBorders")
|
|
682
|
+
|
|
683
|
+
def _add_border(name: str, val: str, sz: str):
|
|
684
|
+
el = OxmlElement(f"w:{name}")
|
|
685
|
+
el.set(qn("w:val"), val)
|
|
686
|
+
el.set(qn("w:sz"), sz)
|
|
687
|
+
el.set(qn("w:space"), "0")
|
|
688
|
+
el.set(qn("w:color"), "000000")
|
|
689
|
+
tblBorders.append(el)
|
|
690
|
+
|
|
691
|
+
_add_border("top", "single", "12") # ~1.5pt
|
|
692
|
+
_add_border("bottom", "single", "12") # ~1.5pt
|
|
693
|
+
_add_border("left", "nil", "0")
|
|
694
|
+
_add_border("right", "nil", "0")
|
|
695
|
+
_add_border("insideH", "single", "6") # ~0.75pt (header-bottom)
|
|
696
|
+
_add_border("insideV", "nil", "0") # explicit no verticals
|
|
697
|
+
tblPr.append(tblBorders)
|
|
698
|
+
|
|
699
|
+
# Bold header row + add bottom border only to header cells so the
|
|
700
|
+
# thicker rule sits under the header (and horizontal rules between
|
|
701
|
+
# body rows are suppressed)
|
|
702
|
+
if table.rows:
|
|
703
|
+
header_row = table.rows[0]
|
|
704
|
+
for cell in header_row.cells:
|
|
705
|
+
for p in cell.paragraphs:
|
|
706
|
+
for r in p.runs:
|
|
707
|
+
r.bold = True
|
|
708
|
+
# Remove insideH to prevent inner body rules; header-bottom comes
|
|
709
|
+
# from a per-cell bottom border on the first row.
|
|
710
|
+
insideH = tblBorders.find(qn("w:insideH"))
|
|
711
|
+
if insideH is not None:
|
|
712
|
+
insideH.set(qn("w:val"), "nil")
|
|
713
|
+
for cell in header_row.cells:
|
|
714
|
+
tcPr = cell._tc.get_or_add_tcPr()
|
|
715
|
+
tcBorders = tcPr.find(qn("w:tcBorders"))
|
|
716
|
+
if tcBorders is None:
|
|
717
|
+
tcBorders = OxmlElement("w:tcBorders")
|
|
718
|
+
tcPr.append(tcBorders)
|
|
719
|
+
existing_bottom = tcBorders.find(qn("w:bottom"))
|
|
720
|
+
if existing_bottom is None:
|
|
721
|
+
existing_bottom = OxmlElement("w:bottom")
|
|
722
|
+
tcBorders.append(existing_bottom)
|
|
723
|
+
existing_bottom.set(qn("w:val"), "single")
|
|
724
|
+
existing_bottom.set(qn("w:sz"), "6")
|
|
725
|
+
existing_bottom.set(qn("w:space"), "0")
|
|
726
|
+
existing_bottom.set(qn("w:color"), "000000")
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
def keep_tables_with_captions(doc) -> None:
|
|
730
|
+
"""A table caption keeps with its table, and a table that fits one page keeps its rows together
|
|
731
|
+
(every row but the last keeps with the next). Pagination only: text, styles and rules are unchanged."""
|
|
732
|
+
section = doc.sections[-1]
|
|
733
|
+
frame_h = (section.page_height - section.top_margin - section.bottom_margin) / 12700
|
|
734
|
+
for table in doc.tables:
|
|
735
|
+
prev = table._tbl.getprevious()
|
|
736
|
+
if prev is not None and prev.tag == qn("w:p") and docx_design.TABLE_CAPTION.match("".join(t.text or "" for t in prev.iter(qn("w:t"))).strip()):
|
|
737
|
+
Paragraph(prev, table._parent).paragraph_format.keep_with_next = True
|
|
738
|
+
widths = [c.width / 12700 if c.width else 100 for c in table.rows[0].cells]
|
|
739
|
+
est = sum(6 + 11 * 1.3 * max(docx_design._est_lines(c.text, (widths[i] if i < len(widths) else 100) - 12, 11) for i, c in enumerate(row.cells)) for row in table.rows)
|
|
740
|
+
if est <= 0.9 * frame_h:
|
|
741
|
+
for row in table.rows[:-1]:
|
|
742
|
+
for cell in row.cells:
|
|
743
|
+
cell.paragraphs[0].paragraph_format.keep_with_next = True
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
def publisher_spacing(doc) -> None:
|
|
747
|
+
"""Text never touches a table or a caption (spec-v2 Amendments 7, R10): the paragraph after a table stands three
|
|
748
|
+
quarters of a body line clear (docx-spec Amendments 6; 8 pt read as half a line), a table caption after text
|
|
749
|
+
8 pt, and a figure caption keeps 8 pt under it. A paragraph after a list stands 6 pt clear of its last item."""
|
|
750
|
+
body = doc.element.body
|
|
751
|
+
normal = doc.styles["Normal"]
|
|
752
|
+
size = normal.font.size.pt if normal.font.size else 11
|
|
753
|
+
multiple = normal.paragraph_format.line_spacing if isinstance(normal.paragraph_format.line_spacing, float) else 1.15
|
|
754
|
+
clear = Pt(max(8, round(size * multiple * 1.2 * 0.75)))
|
|
755
|
+
for el in body.iterchildren(qn("w:tbl")):
|
|
756
|
+
nxt = el.getnext()
|
|
757
|
+
if nxt is not None and nxt.tag == qn("w:p") and "".join(t.text or "" for t in nxt.iter(qn("w:t"))).strip():
|
|
758
|
+
para = Paragraph(nxt, doc._body)
|
|
759
|
+
# A heading keeps its own (larger) space above.
|
|
760
|
+
own = para.style.paragraph_format.space_before if para.style is not None else None
|
|
761
|
+
fmt = para.paragraph_format
|
|
762
|
+
if not (own and own >= clear) and (not fmt.space_before or fmt.space_before < clear):
|
|
763
|
+
fmt.space_before = clear
|
|
764
|
+
prev = el.getprevious()
|
|
765
|
+
if prev is not None and prev.tag == qn("w:p") and docx_design.TABLE_CAPTION.match("".join(t.text or "" for t in prev.iter(qn("w:t"))).strip()):
|
|
766
|
+
fmt = Paragraph(prev, doc._body).paragraph_format
|
|
767
|
+
if not fmt.space_before or fmt.space_before < Pt(8):
|
|
768
|
+
fmt.space_before = Pt(8)
|
|
769
|
+
docx_design.space_after_lists(doc)
|
|
770
|
+
for p in doc.paragraphs:
|
|
771
|
+
prev = p._p.getprevious()
|
|
772
|
+
under_picture = prev is not None and prev.find(f".//{qn('w:drawing')}") is not None
|
|
773
|
+
if docx_design.FIGURE_LABEL.match(p.text.strip()) and (under_picture or (p.style is not None and p.style.name == "Caption")):
|
|
774
|
+
if not p.paragraph_format.space_after or p.paragraph_format.space_after < Pt(8):
|
|
775
|
+
p.paragraph_format.space_after = Pt(8)
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
def plain_table_cells(doc) -> None:
|
|
779
|
+
"""Table cells neither hyphenate nor justify: the body may (the profile's hyphenation), but a narrow cell
|
|
780
|
+
broke "Pro-posed" and a justified header spread "Conversion at"."""
|
|
781
|
+
for table in doc.tables:
|
|
782
|
+
for row in table.rows:
|
|
783
|
+
for cell in row.cells:
|
|
784
|
+
for paragraph in cell.paragraphs:
|
|
785
|
+
p_pr = paragraph._p.get_or_add_pPr()
|
|
786
|
+
if p_pr.find(qn("w:suppressAutoHyphens")) is None:
|
|
787
|
+
p_pr.insert_element_before(OxmlElement("w:suppressAutoHyphens"), *SUPPRESS_AFTER)
|
|
788
|
+
if paragraph.alignment in (None, WD_ALIGN_PARAGRAPH.JUSTIFY):
|
|
789
|
+
paragraph.alignment = WD_ALIGN_PARAGRAPH.LEFT
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
SUPPRESS_AFTER = ("w:kinsoku", "w:wordWrap", "w:overflowPunct", "w:topLinePunct", "w:autoSpaceDE", "w:autoSpaceDN", "w:bidi",
|
|
793
|
+
"w:adjustRightInd", "w:snapToGrid", "w:spacing", "w:ind", "w:contextualSpacing", "w:mirrorIndents",
|
|
794
|
+
"w:suppressOverlap", "w:jc", "w:textDirection", "w:textAlignment", "w:textboxTightWrap",
|
|
795
|
+
"w:outlineLvl", "w:divId", "w:cnfStyle", "w:rPr", "w:sectPr", "w:pPrChange")
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
def page_numbers(doc, design: dict) -> None:
|
|
799
|
+
"""The profile's page numbering (registry design.header_footer): a centred PAGE field in the footer at the
|
|
800
|
+
footer size, and none on the first page when the profile says so (its header keeps the notice tag)."""
|
|
801
|
+
hf = design.get("header_footer") or {}
|
|
802
|
+
if hf.get("page_numbering") != "bottom_center":
|
|
803
|
+
return
|
|
804
|
+
size = Pt(float(hf.get("footer_font_size_pt") or 9))
|
|
805
|
+
for index, section in enumerate(doc.sections):
|
|
806
|
+
if index and section.footer.is_linked_to_previous:
|
|
807
|
+
continue
|
|
808
|
+
if not hf.get("page_numbering_first_page", True) and not section.different_first_page_header_footer:
|
|
809
|
+
section.different_first_page_header_footer = True
|
|
810
|
+
first = section.first_page_header
|
|
811
|
+
for paragraph in section.header.paragraphs:
|
|
812
|
+
first._element.append(copy.deepcopy(paragraph._p))
|
|
813
|
+
first._element.remove(first.paragraphs[0]._p)
|
|
814
|
+
footer = section.footer
|
|
815
|
+
paragraph = footer.paragraphs[0]
|
|
816
|
+
paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
|
817
|
+
run = paragraph.add_run()
|
|
818
|
+
run.font.size = size
|
|
819
|
+
for kind, text in (("begin", None), (None, " PAGE "), ("separate", None), (None, "1"), ("end", None)):
|
|
820
|
+
if kind:
|
|
821
|
+
char = OxmlElement("w:fldChar")
|
|
822
|
+
char.set(qn("w:fldCharType"), kind)
|
|
823
|
+
run._r.append(char)
|
|
824
|
+
elif text == " PAGE ":
|
|
825
|
+
instr = OxmlElement("w:instrText")
|
|
826
|
+
instr.set(qn("xml:space"), "preserve")
|
|
827
|
+
instr.text = text
|
|
828
|
+
run._r.append(instr)
|
|
829
|
+
else:
|
|
830
|
+
t = OxmlElement("w:t")
|
|
831
|
+
t.text = text
|
|
832
|
+
run._r.append(t)
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
def strip_banned(doc, design: dict) -> None:
|
|
836
|
+
"""Remove any banned font/style from runs and paragraphs."""
|
|
837
|
+
banned = design.get("banned") or {}
|
|
838
|
+
banned_fonts = set(banned.get("fonts") or [])
|
|
839
|
+
banned_styles = set(banned.get("styles") or [])
|
|
840
|
+
body_font = None
|
|
841
|
+
# body font is enforced on Normal style already, but we override raw runs too
|
|
842
|
+
for para in doc.paragraphs:
|
|
843
|
+
if para.style and para.style.name in banned_styles:
|
|
844
|
+
try:
|
|
845
|
+
para.style = doc.styles["Normal"]
|
|
846
|
+
except KeyError:
|
|
847
|
+
pass
|
|
848
|
+
for run in para.runs:
|
|
849
|
+
if run.font.name and run.font.name in banned_fonts:
|
|
850
|
+
run.font.name = None # inherit from style
|
|
851
|
+
# Also walk table cells
|
|
852
|
+
for table in doc.tables:
|
|
853
|
+
for row in table.rows:
|
|
854
|
+
for cell in row.cells:
|
|
855
|
+
for para in cell.paragraphs:
|
|
856
|
+
if para.style and para.style.name in banned_styles:
|
|
857
|
+
try:
|
|
858
|
+
para.style = doc.styles["Normal"]
|
|
859
|
+
except KeyError:
|
|
860
|
+
pass
|
|
861
|
+
for run in para.runs:
|
|
862
|
+
if run.font.name and run.font.name in banned_fonts:
|
|
863
|
+
run.font.name = None
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
def _set_run_fonts(run, latin: str, cjk: str | None) -> None:
|
|
867
|
+
rpr = run._element.get_or_add_rPr()
|
|
868
|
+
rfonts = rpr.find(qn("w:rFonts"))
|
|
869
|
+
if rfonts is None:
|
|
870
|
+
rfonts = OxmlElement("w:rFonts")
|
|
871
|
+
rpr.append(rfonts)
|
|
872
|
+
rfonts.set(qn("w:ascii"), latin)
|
|
873
|
+
rfonts.set(qn("w:hAnsi"), latin)
|
|
874
|
+
rfonts.set(qn("w:cs"), latin)
|
|
875
|
+
if cjk:
|
|
876
|
+
rfonts.set(qn("w:eastAsia"), cjk)
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
THEME_PAIRS = (("asciiTheme", "ascii"), ("hAnsiTheme", "hAnsi"), ("eastAsiaTheme", "eastAsia"), ("cstheme", "cs"))
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
def drop_shadowed_theme_fonts(doc) -> None:
|
|
883
|
+
"""A style that names its face keeps no theme font beside it: Word and LibreOffice both let the theme
|
|
884
|
+
attribute win, so the profile's heading face (Times New Roman, Arial, Pretendard) rendered as the
|
|
885
|
+
theme's Calibri. Styles only; the document body is untouched."""
|
|
886
|
+
for rfonts in doc.styles.element.iter(qn("w:rFonts")):
|
|
887
|
+
for theme, named in THEME_PAIRS:
|
|
888
|
+
if rfonts.get(qn(f"w:{named}")) and rfonts.get(qn(f"w:{theme}")) is not None:
|
|
889
|
+
del rfonts.attrib[qn(f"w:{theme}")]
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
def apply_cjk_font_pairing(doc, font_cfg: dict) -> None:
|
|
893
|
+
body = font_cfg.get("body") or {}
|
|
894
|
+
body_cjk = font_cfg.get("body_cjk") or {}
|
|
895
|
+
latin = body.get("family")
|
|
896
|
+
cjk = body_cjk.get("family")
|
|
897
|
+
if not latin:
|
|
898
|
+
return
|
|
899
|
+
|
|
900
|
+
def _walk(paragraphs):
|
|
901
|
+
for para in paragraphs:
|
|
902
|
+
for run in para.runs:
|
|
903
|
+
# Only fix runs that already have a font set to something
|
|
904
|
+
# other than the registry-banned default; leaving run.font.name
|
|
905
|
+
# as None lets the style do its job. We still force eastAsia.
|
|
906
|
+
current_name = run.font.name
|
|
907
|
+
if current_name and current_name != "Courier New":
|
|
908
|
+
_set_run_fonts(run, latin, cjk)
|
|
909
|
+
elif not current_name:
|
|
910
|
+
# set only eastAsia pair to avoid losing style inheritance
|
|
911
|
+
rpr = run._element.get_or_add_rPr()
|
|
912
|
+
rfonts = rpr.find(qn("w:rFonts"))
|
|
913
|
+
if rfonts is None:
|
|
914
|
+
rfonts = OxmlElement("w:rFonts")
|
|
915
|
+
rpr.append(rfonts)
|
|
916
|
+
if cjk:
|
|
917
|
+
rfonts.set(qn("w:eastAsia"), cjk)
|
|
918
|
+
|
|
919
|
+
_walk(doc.paragraphs)
|
|
920
|
+
for table in doc.tables:
|
|
921
|
+
for row in table.rows:
|
|
922
|
+
for cell in row.cells:
|
|
923
|
+
_walk(cell.paragraphs)
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
# ---------------------------------------------------------------------------
|
|
927
|
+
# Title block builder
|
|
928
|
+
# ---------------------------------------------------------------------------
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
def _insert_paragraph_before(doc, before_p, style=None):
|
|
932
|
+
"""Insert a new paragraph before the given paragraph element."""
|
|
933
|
+
new_p = OxmlElement("w:p")
|
|
934
|
+
before_p._p.addprevious(new_p)
|
|
935
|
+
from docx.text.paragraph import Paragraph
|
|
936
|
+
para = Paragraph(new_p, before_p._parent)
|
|
937
|
+
if style is not None:
|
|
938
|
+
try:
|
|
939
|
+
para.style = doc.styles[style]
|
|
940
|
+
except KeyError:
|
|
941
|
+
pass
|
|
942
|
+
return para
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
def inject_title_block(doc, frontmatter: dict, design: dict) -> None:
|
|
946
|
+
"""Prepend title/authors/affiliations/abstract/keywords to the doc.
|
|
947
|
+
|
|
948
|
+
Builds the block at the top of the document body via the underlying
|
|
949
|
+
XML so it appears before any html_to_docx output. Called BEFORE
|
|
950
|
+
html_to_docx in M1's control flow so paragraphs just append normally.
|
|
951
|
+
"""
|
|
952
|
+
tb = design.get("title_block") or {}
|
|
953
|
+
title = frontmatter.get("title")
|
|
954
|
+
if not title:
|
|
955
|
+
return
|
|
956
|
+
|
|
957
|
+
def _p_center(size: int, bold=False, italic=False, space_after=4):
|
|
958
|
+
p = doc.add_paragraph()
|
|
959
|
+
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
|
960
|
+
p.paragraph_format.first_line_indent = Cm(0)
|
|
961
|
+
p.paragraph_format.space_after = Pt(space_after)
|
|
962
|
+
return p
|
|
963
|
+
|
|
964
|
+
def _add_run(p, text: str, size: int, bold=False, italic=False, sup=False):
|
|
965
|
+
run = p.add_run(text)
|
|
966
|
+
run.font.size = Pt(size)
|
|
967
|
+
run.bold = bold
|
|
968
|
+
run.italic = italic
|
|
969
|
+
run.font.superscript = sup
|
|
970
|
+
return run
|
|
971
|
+
|
|
972
|
+
# Title
|
|
973
|
+
tp = _p_center(
|
|
974
|
+
tb.get("title", {}).get("size_pt", 18),
|
|
975
|
+
bold=True,
|
|
976
|
+
space_after=tb.get("title", {}).get("space_after_pt", 12),
|
|
977
|
+
)
|
|
978
|
+
_add_run(tp, str(title), tb.get("title", {}).get("size_pt", 18), bold=True)
|
|
979
|
+
|
|
980
|
+
# Report-style frontmatter: a subtitle and one author / organisation / date line
|
|
981
|
+
# when there is no journal author list.
|
|
982
|
+
if frontmatter.get("subtitle"):
|
|
983
|
+
sp = _p_center(13, space_after=6)
|
|
984
|
+
_add_run(sp, str(frontmatter["subtitle"]), 13)
|
|
985
|
+
if not frontmatter.get("authors"):
|
|
986
|
+
meta = [str(v) for v in (frontmatter.get("author"), frontmatter.get("organization"), frontmatter.get("date")) if v]
|
|
987
|
+
if meta:
|
|
988
|
+
mp = _p_center(10.5, space_after=14)
|
|
989
|
+
_add_run(mp, " · ".join(meta), 10.5)
|
|
990
|
+
|
|
991
|
+
# Authors
|
|
992
|
+
authors = frontmatter.get("authors") or []
|
|
993
|
+
if authors:
|
|
994
|
+
ap = _p_center(
|
|
995
|
+
tb.get("authors", {}).get("size_pt", 12),
|
|
996
|
+
space_after=tb.get("authors", {}).get("space_after_pt", 4),
|
|
997
|
+
)
|
|
998
|
+
sep = tb.get("author_separator", ", ")
|
|
999
|
+
corr_mark = tb.get("corresponding_marker", "*")
|
|
1000
|
+
size = tb.get("authors", {}).get("size_pt", 12)
|
|
1001
|
+
for i, author in enumerate(authors):
|
|
1002
|
+
if not isinstance(author, dict):
|
|
1003
|
+
continue
|
|
1004
|
+
if i > 0:
|
|
1005
|
+
_add_run(ap, sep, size)
|
|
1006
|
+
name = str(author.get("name", "Author"))
|
|
1007
|
+
_add_run(ap, name, size)
|
|
1008
|
+
aff = author.get("affiliation")
|
|
1009
|
+
if aff is not None:
|
|
1010
|
+
if isinstance(aff, list):
|
|
1011
|
+
aff_text = ",".join(str(a) for a in aff)
|
|
1012
|
+
else:
|
|
1013
|
+
aff_text = str(aff)
|
|
1014
|
+
_add_run(ap, aff_text, size, sup=True)
|
|
1015
|
+
if author.get("corresponding"):
|
|
1016
|
+
_add_run(ap, corr_mark, size, sup=True)
|
|
1017
|
+
|
|
1018
|
+
# Affiliations
|
|
1019
|
+
affs = frontmatter.get("affiliations")
|
|
1020
|
+
if isinstance(affs, dict):
|
|
1021
|
+
for key in sorted(affs.keys(), key=lambda k: str(k)):
|
|
1022
|
+
fp = _p_center(
|
|
1023
|
+
tb.get("affiliations", {}).get("size_pt", 10),
|
|
1024
|
+
italic=True,
|
|
1025
|
+
space_after=2,
|
|
1026
|
+
)
|
|
1027
|
+
_add_run(
|
|
1028
|
+
fp,
|
|
1029
|
+
f"{key} {affs[key]}",
|
|
1030
|
+
tb.get("affiliations", {}).get("size_pt", 10),
|
|
1031
|
+
italic=True,
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
# Corresponding email (if present, small italic line)
|
|
1035
|
+
corr_email = frontmatter.get("corresponding_email")
|
|
1036
|
+
if corr_email:
|
|
1037
|
+
cp = _p_center(10, italic=True, space_after=8)
|
|
1038
|
+
_add_run(cp, f"* Corresponding author: {corr_email}", 10, italic=True)
|
|
1039
|
+
|
|
1040
|
+
# Abstract
|
|
1041
|
+
abstract = frontmatter.get("abstract")
|
|
1042
|
+
if abstract:
|
|
1043
|
+
lp = doc.add_paragraph()
|
|
1044
|
+
lp.paragraph_format.first_line_indent = Cm(0)
|
|
1045
|
+
lp.paragraph_format.space_after = Pt(4)
|
|
1046
|
+
_add_run(
|
|
1047
|
+
lp,
|
|
1048
|
+
tb.get("abstract_label", "Abstract"),
|
|
1049
|
+
tb.get("abstract_font_size_pt", 10),
|
|
1050
|
+
bold=True,
|
|
1051
|
+
)
|
|
1052
|
+
body = doc.add_paragraph()
|
|
1053
|
+
body.paragraph_format.first_line_indent = Cm(0)
|
|
1054
|
+
body.paragraph_format.space_after = Pt(6)
|
|
1055
|
+
_add_run(
|
|
1056
|
+
body,
|
|
1057
|
+
str(abstract),
|
|
1058
|
+
tb.get("abstract_font_size_pt", 10),
|
|
1059
|
+
)
|
|
1060
|
+
|
|
1061
|
+
# Keywords
|
|
1062
|
+
keywords = frontmatter.get("keywords")
|
|
1063
|
+
if keywords:
|
|
1064
|
+
kp = doc.add_paragraph()
|
|
1065
|
+
kp.paragraph_format.first_line_indent = Cm(0)
|
|
1066
|
+
kp.paragraph_format.space_after = Pt(12)
|
|
1067
|
+
_add_run(
|
|
1068
|
+
kp,
|
|
1069
|
+
tb.get("keywords_label", "Keywords") + ": ",
|
|
1070
|
+
tb.get("abstract_font_size_pt", 10),
|
|
1071
|
+
bold=True,
|
|
1072
|
+
)
|
|
1073
|
+
if isinstance(keywords, list):
|
|
1074
|
+
sep = tb.get("keywords_separator", "; ")
|
|
1075
|
+
text = sep.join(str(k) for k in keywords)
|
|
1076
|
+
else:
|
|
1077
|
+
text = str(keywords)
|
|
1078
|
+
_add_run(kp, text, tb.get("abstract_font_size_pt", 10))
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
# ---------------------------------------------------------------------------
|
|
1082
|
+
# Locale detection
|
|
1083
|
+
# ---------------------------------------------------------------------------
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
_HANGUL_RE = re.compile(r"[\uac00-\ud7a3]")
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
def detect_locale(text: str) -> str:
|
|
1090
|
+
total = len(text) or 1
|
|
1091
|
+
hangul_count = len(_HANGUL_RE.findall(text))
|
|
1092
|
+
ratio = hangul_count / total
|
|
1093
|
+
if ratio > 0.05:
|
|
1094
|
+
return "ko"
|
|
1095
|
+
if ratio > 0.01:
|
|
1096
|
+
return "mixed"
|
|
1097
|
+
return "en"
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
# ===========================================================================
|
|
1101
|
+
# Conversion entry point
|
|
1102
|
+
# ===========================================================================
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
NOTICE_INK, NOTICE_FILL = docx_design.NOTICE
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
def _shade(element, fill: str) -> None:
|
|
1109
|
+
shd = OxmlElement("w:shd")
|
|
1110
|
+
shd.set(qn("w:val"), "clear")
|
|
1111
|
+
shd.set(qn("w:color"), "auto")
|
|
1112
|
+
shd.set(qn("w:fill"), fill)
|
|
1113
|
+
element.append(shd)
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
def add_notice(doc, text: str) -> None:
|
|
1117
|
+
"""The frontmatter `notice:` (e.g. "예시 데이터: 수치는 가정입니다") as a tag in
|
|
1118
|
+
every page header, so an example document cannot be mistaken for a sourced one
|
|
1119
|
+
on any page it is printed from. A profile whose title page has its own, empty
|
|
1120
|
+
header (korean-generic) gets a tinted band under the title block instead."""
|
|
1121
|
+
if doc.sections[0].different_first_page_header_footer:
|
|
1122
|
+
band = doc.add_paragraph()
|
|
1123
|
+
band_run = band.add_run(str(text))
|
|
1124
|
+
band_run.bold = True
|
|
1125
|
+
band_run.font.size = Pt(10.5)
|
|
1126
|
+
band_run.font.color.rgb = RGBColor.from_string(NOTICE_INK)
|
|
1127
|
+
band.paragraph_format.space_before = Pt(4)
|
|
1128
|
+
band.paragraph_format.space_after = Pt(14)
|
|
1129
|
+
_shade(band._p.get_or_add_pPr(), NOTICE_FILL)
|
|
1130
|
+
for index, section in enumerate(doc.sections):
|
|
1131
|
+
if index and section.header.is_linked_to_previous:
|
|
1132
|
+
continue
|
|
1133
|
+
header = section.header
|
|
1134
|
+
tag = header.paragraphs[0] if header.paragraphs and not header.paragraphs[0].text.strip() else header.add_paragraph()
|
|
1135
|
+
tag_run = tag.add_run(f"\u00a0{text}\u00a0")
|
|
1136
|
+
tag_run.bold = True
|
|
1137
|
+
tag_run.font.size = Pt(9)
|
|
1138
|
+
tag_run.font.color.rgb = RGBColor.from_string(NOTICE_INK)
|
|
1139
|
+
_shade(tag_run._r.get_or_add_rPr(), NOTICE_FILL)
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
def read_source(md_path: Path) -> str:
|
|
1143
|
+
"""The Markdown source, with {{ … }} numbers filled from its `data:` files
|
|
1144
|
+
(office_data.py computes derived values and runs the declared checks)."""
|
|
1145
|
+
text = md_path.read_text(encoding="utf-8")
|
|
1146
|
+
try:
|
|
1147
|
+
return resolve_text(text, md_path.parent)[0]
|
|
1148
|
+
except DataError as exc:
|
|
1149
|
+
raise SystemExit(f"Data error: {exc}") from exc
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
MD_EXTENSIONS = ['tables', 'fenced_code', 'nl2br', 'sane_lists']
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
def _md_renderer(md_path: Path):
|
|
1156
|
+
"""Markdown into a document or a component's cell, through the legacy HTML helpers."""
|
|
1157
|
+
def render(container, text: str) -> None:
|
|
1158
|
+
html_to_docx(markdown.Markdown(extensions=MD_EXTENSIONS).convert(text), container, md_path)
|
|
1159
|
+
return render
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
def _typography(design: dict, lang: str = "en"):
|
|
1163
|
+
"""The registry's micro-typography filters, for Markdown outside the directive fences; Korean text also
|
|
1164
|
+
writes ISO dates the Korean way (2026. 10. 1.)."""
|
|
1165
|
+
def apply(text: str) -> str:
|
|
1166
|
+
# Dates first: the dash filter would read 2026-06-30 as a number range.
|
|
1167
|
+
if lang != "en":
|
|
1168
|
+
text = docx_design.korean_dates(text)
|
|
1169
|
+
text = fix_dashes(text, design.get("micro_typography", {}).get("dashes"))
|
|
1170
|
+
text = fix_quotes(text)
|
|
1171
|
+
text = fix_unit_spacing(text)
|
|
1172
|
+
text = fix_ellipsis(text)
|
|
1173
|
+
return normalize_double_spaces(text)
|
|
1174
|
+
return apply
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
def convert_md_to_docx(
|
|
1178
|
+
md_path: Path,
|
|
1179
|
+
docx_path: Path,
|
|
1180
|
+
template_path: Path = None,
|
|
1181
|
+
publisher_name: str | None = None,
|
|
1182
|
+
registry_path: Path | None = None,
|
|
1183
|
+
locale: str = "auto",
|
|
1184
|
+
tonality: str | None = None,
|
|
1185
|
+
density: int | None = None,
|
|
1186
|
+
variance: int | None = None,
|
|
1187
|
+
):
|
|
1188
|
+
"""Convert Markdown file to DOCX.
|
|
1189
|
+
|
|
1190
|
+
With a tonality (argument or frontmatter `tonality:`), the document is built
|
|
1191
|
+
by docx_design in that design direction. Without a tonality or a publisher,
|
|
1192
|
+
the plain profile runs through the same builders with neutral tokens (A4,
|
|
1193
|
+
Pretendard, booktabs tables, notice in every header).
|
|
1194
|
+
|
|
1195
|
+
When publisher_name is set, apply the full journal pipeline: registry
|
|
1196
|
+
load, frontmatter parse, pre-MD filters, title-block injection, post-HTML
|
|
1197
|
+
heading numbering, booktabs tables, banned stripping, CJK font pairing.
|
|
1198
|
+
A publisher run writes the same document.xml as before the tonality
|
|
1199
|
+
engine unless the source holds figures (captions) or directives.
|
|
1200
|
+
"""
|
|
1201
|
+
if publisher_name is None:
|
|
1202
|
+
md_text = read_source(md_path)
|
|
1203
|
+
front, body = parse_frontmatter(md_text) if md_text.startswith("---") else ({}, md_text)
|
|
1204
|
+
name = tonality or front.get("tonality")
|
|
1205
|
+
lang = "en" if (detect_locale(body) if locale == "auto" else locale) == "en" else "ko"
|
|
1206
|
+
dials = {k: v for k, v in (("density", density if density is not None else front.get("density")),
|
|
1207
|
+
("variance", variance if variance is not None else front.get("variance"))) if v is not None}
|
|
1208
|
+
try:
|
|
1209
|
+
if name:
|
|
1210
|
+
T = docx_design.load_tonality(name, locale=lang, **{k: int(v) for k, v in dials.items()})
|
|
1211
|
+
filters = _typography(T.design, lang)
|
|
1212
|
+
else:
|
|
1213
|
+
T, filters = docx_design.neutral_tonality(lang), None
|
|
1214
|
+
doc = Document(str(template_path)) if template_path and template_path.exists() else Document()
|
|
1215
|
+
docx_design.build(doc, front, body, T, _md_renderer(md_path), lang, filters)
|
|
1216
|
+
except docx_design.DesignError as exc:
|
|
1217
|
+
raise SystemExit(f"Error: {exc}") from exc
|
|
1218
|
+
doc.save(str(docx_path))
|
|
1219
|
+
label = f"tonality={T.name}, density={T.density}, variance={T.variance}" if not T.neutral else "plain profile"
|
|
1220
|
+
print(f"Successfully converted {md_path} to {docx_path} [{label}, locale={lang}]")
|
|
1221
|
+
return
|
|
1222
|
+
|
|
1223
|
+
# --- Journal workflow ---
|
|
1224
|
+
script_dir = Path(__file__).resolve().parent
|
|
1225
|
+
registry_path = registry_path or (script_dir.parent / "templates" / "registry.yaml")
|
|
1226
|
+
publisher = load_publisher(Path(registry_path), publisher_name)
|
|
1227
|
+
design = publisher["design"]
|
|
1228
|
+
docx_font = publisher["docx"]["font"]
|
|
1229
|
+
|
|
1230
|
+
md_text = read_source(md_path)
|
|
1231
|
+
frontmatter, body = parse_frontmatter(md_text)
|
|
1232
|
+
if frontmatter.get("tonality"):
|
|
1233
|
+
raise SystemExit(f"Error: frontmatter tonality: {frontmatter['tonality']} and --publisher {publisher_name} are mutually exclusive")
|
|
1234
|
+
|
|
1235
|
+
# Locale detection (informational in M1; Korean rules land in M6)
|
|
1236
|
+
detected_locale = detect_locale(body) if locale == "auto" else locale
|
|
1237
|
+
|
|
1238
|
+
# Pre-MD micro-typography filters
|
|
1239
|
+
if detected_locale in ("ko", "mixed"):
|
|
1240
|
+
# Spec Amendments 4, A4.10 (every path): no ISO dates in Korean text. Before the dash filter, which would
|
|
1241
|
+
# read 2026-06-30 as a number range.
|
|
1242
|
+
body = docx_design.korean_dates(body)
|
|
1243
|
+
if frontmatter.get("date"):
|
|
1244
|
+
frontmatter["date"] = docx_design.format_date(frontmatter["date"], "ko")
|
|
1245
|
+
dash_rules = design.get("micro_typography", {}).get("dashes")
|
|
1246
|
+
|
|
1247
|
+
def typeset(text: str) -> str:
|
|
1248
|
+
return normalize_double_spaces(fix_ellipsis(fix_unit_spacing(fix_quotes(fix_dashes(text, dash_rules)))))
|
|
1249
|
+
|
|
1250
|
+
# A ::: fence line carries attributes (title="..."); curly quotes there would break the directive. The text
|
|
1251
|
+
# between fence lines is typeset as whole runs, so code fences and quote pairs keep their context and a
|
|
1252
|
+
# source without fences is typeset exactly as one piece.
|
|
1253
|
+
parts = re.split(r"^([ \t]*:{3,}.*)$", body, flags=re.M)
|
|
1254
|
+
body = "".join(part if i % 2 else typeset(part) for i, part in enumerate(parts))
|
|
1255
|
+
|
|
1256
|
+
# Load template if available
|
|
1257
|
+
template_docx = script_dir.parent / "templates" / "docx" / f"{publisher_name}.docx"
|
|
1258
|
+
if template_docx.exists():
|
|
1259
|
+
doc = Document(str(template_docx))
|
|
1260
|
+
# The template includes a self-describing sample title block and
|
|
1261
|
+
# sample heading/body paragraph. Strip all existing body paragraphs
|
|
1262
|
+
# and tables so the conversion output is the user's content only.
|
|
1263
|
+
body_el = doc.element.body
|
|
1264
|
+
sect_pr = body_el.find(qn("w:sectPr"))
|
|
1265
|
+
for child in list(body_el):
|
|
1266
|
+
if child is sect_pr:
|
|
1267
|
+
continue
|
|
1268
|
+
body_el.remove(child)
|
|
1269
|
+
if sect_pr is None:
|
|
1270
|
+
pass # keep original body even if no sectPr detected
|
|
1271
|
+
elif template_path and template_path.exists():
|
|
1272
|
+
doc = Document(str(template_path))
|
|
1273
|
+
else:
|
|
1274
|
+
doc = Document()
|
|
1275
|
+
|
|
1276
|
+
# Title block (built from frontmatter) before main content
|
|
1277
|
+
if frontmatter.get("title"):
|
|
1278
|
+
inject_title_block(doc, frontmatter, design)
|
|
1279
|
+
if frontmatter.get("notice"):
|
|
1280
|
+
add_notice(doc, frontmatter["notice"])
|
|
1281
|
+
page_numbers(doc, design)
|
|
1282
|
+
|
|
1283
|
+
# Main content
|
|
1284
|
+
if docx_design.has_directives(body):
|
|
1285
|
+
# Components in a journal manuscript are drawn with neutral styling (ink and line only).
|
|
1286
|
+
neutral = docx_design.neutral_tonality("en" if detected_locale == "en" else "ko")
|
|
1287
|
+
docx_design.setup_component_styles(doc, neutral)
|
|
1288
|
+
ctx = docx_design.Build(doc, neutral, _md_renderer(md_path), "en" if detected_locale == "en" else "ko")
|
|
1289
|
+
try:
|
|
1290
|
+
ctx.render(doc, body)
|
|
1291
|
+
except docx_design.DesignError as exc:
|
|
1292
|
+
raise SystemExit(f"Error: {exc}") from exc
|
|
1293
|
+
print("Note: the ::: components are drawn with publisher-neutral styling under a publisher profile")
|
|
1294
|
+
else:
|
|
1295
|
+
md_converter = markdown.Markdown(extensions=[
|
|
1296
|
+
'tables',
|
|
1297
|
+
'fenced_code',
|
|
1298
|
+
'nl2br',
|
|
1299
|
+
'sane_lists',
|
|
1300
|
+
])
|
|
1301
|
+
html = md_converter.convert(body)
|
|
1302
|
+
html_to_docx(html, doc, md_path)
|
|
1303
|
+
|
|
1304
|
+
# Post-HTML design enforcement
|
|
1305
|
+
apply_heading_numbering(doc, design)
|
|
1306
|
+
apply_table_style(doc, design)
|
|
1307
|
+
keep_tables_with_captions(doc)
|
|
1308
|
+
plain_table_cells(doc)
|
|
1309
|
+
publisher_spacing(doc)
|
|
1310
|
+
# No column narrower than its longest word (spec Amendments 4, todo 12b: "Cataly/st" in a publisher table).
|
|
1311
|
+
normal = doc.styles["Normal"].font.size
|
|
1312
|
+
for table in doc.tables:
|
|
1313
|
+
docx_design.fit_word_widths(table, normal.pt if normal else 11)
|
|
1314
|
+
docx_design.restart_numbered_lists(doc)
|
|
1315
|
+
docx_design.keep_short_lists(doc)
|
|
1316
|
+
strip_banned(doc, design)
|
|
1317
|
+
apply_cjk_font_pairing(doc, docx_font)
|
|
1318
|
+
drop_shadowed_theme_fonts(doc)
|
|
1319
|
+
|
|
1320
|
+
doc.save(str(docx_path))
|
|
1321
|
+
print(
|
|
1322
|
+
f"Successfully converted {md_path} to {docx_path} "
|
|
1323
|
+
f"[publisher={publisher_name}, locale={detected_locale}]"
|
|
1324
|
+
)
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
def parse_args() -> argparse.Namespace:
|
|
1328
|
+
parser = argparse.ArgumentParser(
|
|
1329
|
+
description="Convert Markdown to DOCX with proper styling"
|
|
1330
|
+
)
|
|
1331
|
+
parser.add_argument("input", help="Input Markdown file")
|
|
1332
|
+
parser.add_argument("output", help="Output DOCX file")
|
|
1333
|
+
parser.add_argument(
|
|
1334
|
+
"--template",
|
|
1335
|
+
help="Optional DOCX template to use as base",
|
|
1336
|
+
default=None,
|
|
1337
|
+
)
|
|
1338
|
+
parser.add_argument(
|
|
1339
|
+
"--publisher",
|
|
1340
|
+
help="Journal publisher profile from templates/registry.yaml (e.g. elsevier)",
|
|
1341
|
+
default=None,
|
|
1342
|
+
)
|
|
1343
|
+
parser.add_argument(
|
|
1344
|
+
"--registry",
|
|
1345
|
+
help="Path to templates/registry.yaml (defaults to the one in this skill)",
|
|
1346
|
+
default=None,
|
|
1347
|
+
)
|
|
1348
|
+
parser.add_argument(
|
|
1349
|
+
"--tonality",
|
|
1350
|
+
help="Design direction from templates/tonalities/: Report, Brief, Manual, Proposal, Memo or Journal "
|
|
1351
|
+
"(frontmatter tonality: works too)",
|
|
1352
|
+
default=None,
|
|
1353
|
+
)
|
|
1354
|
+
parser.add_argument("--density", type=int, default=None, help="Density dial 1-10 (default: the pack's)")
|
|
1355
|
+
parser.add_argument("--variance", type=int, default=None, help="Variance dial 1-10 (default: the pack's)")
|
|
1356
|
+
parser.add_argument(
|
|
1357
|
+
"--locale",
|
|
1358
|
+
choices=("auto", "en", "ko", "mixed"),
|
|
1359
|
+
default="auto",
|
|
1360
|
+
help="Force locale; 'auto' detects via Hangul codepoint ratio",
|
|
1361
|
+
)
|
|
1362
|
+
args = parser.parse_args()
|
|
1363
|
+
if args.publisher and args.template:
|
|
1364
|
+
parser.error("--publisher and --template are mutually exclusive")
|
|
1365
|
+
if args.publisher and args.tonality:
|
|
1366
|
+
parser.error("--tonality and --publisher are mutually exclusive: a tonality is a design direction, a publisher a journal profile")
|
|
1367
|
+
return args
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
def main() -> int:
|
|
1371
|
+
args = parse_args()
|
|
1372
|
+
|
|
1373
|
+
md_path = Path(args.input).expanduser().resolve()
|
|
1374
|
+
docx_path = Path(args.output).expanduser().resolve()
|
|
1375
|
+
template_path = Path(args.template).expanduser().resolve() if args.template else None
|
|
1376
|
+
registry_path = Path(args.registry).expanduser().resolve() if args.registry else None
|
|
1377
|
+
|
|
1378
|
+
if not md_path.exists():
|
|
1379
|
+
print(f"Error: Input file not found: {md_path}")
|
|
1380
|
+
return 1
|
|
1381
|
+
|
|
1382
|
+
convert_md_to_docx(
|
|
1383
|
+
md_path, docx_path, template_path,
|
|
1384
|
+
publisher_name=args.publisher,
|
|
1385
|
+
registry_path=registry_path,
|
|
1386
|
+
locale=args.locale,
|
|
1387
|
+
tonality=args.tonality,
|
|
1388
|
+
density=args.density,
|
|
1389
|
+
variance=args.variance,
|
|
1390
|
+
)
|
|
1391
|
+
return 0
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
if __name__ == "__main__":
|
|
1395
|
+
raise SystemExit(main())
|