@litfamily/lithermes 1.0.0
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/LICENSE +21 -0
- package/README.md +186 -0
- package/README_Ko-KR.md +188 -0
- package/assets/lithermes-plugin/NOTICE.md +46 -0
- package/assets/lithermes-plugin/README.md +390 -0
- package/assets/lithermes-plugin/__init__.py +589 -0
- package/assets/lithermes-plugin/auto_update.py +338 -0
- package/assets/lithermes-plugin/bounded_work.py +1120 -0
- package/assets/lithermes-plugin/bounded_work_tools.py +115 -0
- package/assets/lithermes-plugin/core.py +1813 -0
- package/assets/lithermes-plugin/core_commands.py +243 -0
- package/assets/lithermes-plugin/core_contexts.py +458 -0
- package/assets/lithermes-plugin/core_contract.py +456 -0
- package/assets/lithermes-plugin/core_plans.py +418 -0
- package/assets/lithermes-plugin/core_reader_args.py +34 -0
- package/assets/lithermes-plugin/core_recap_command.py +141 -0
- package/assets/lithermes-plugin/core_recap_state.py +175 -0
- package/assets/lithermes-plugin/core_review.py +198 -0
- package/assets/lithermes-plugin/core_routing.py +641 -0
- package/assets/lithermes-plugin/core_runs.py +283 -0
- package/assets/lithermes-plugin/core_runtime.py +251 -0
- package/assets/lithermes-plugin/core_workflow_commands.py +207 -0
- package/assets/lithermes-plugin/deliverable_hedge_guard.py +562 -0
- package/assets/lithermes-plugin/diagnostics.py +468 -0
- package/assets/lithermes-plugin/handoff.py +97 -0
- package/assets/lithermes-plugin/knowledge.py +920 -0
- package/assets/lithermes-plugin/knowledge_tools.py +130 -0
- package/assets/lithermes-plugin/lit_mark.py +140 -0
- package/assets/lithermes-plugin/lit_mark_rows.json +1363 -0
- package/assets/lithermes-plugin/litgoal/__init__.py +10 -0
- package/assets/lithermes-plugin/litgoal/cli.py +207 -0
- package/assets/lithermes-plugin/litgoal/hook.py +81 -0
- package/assets/lithermes-plugin/litgoal/model.py +203 -0
- package/assets/lithermes-plugin/litgoal/runtime.py +522 -0
- package/assets/lithermes-plugin/litgoal/store.py +367 -0
- package/assets/lithermes-plugin/litgoal/tools.py +300 -0
- package/assets/lithermes-plugin/output-styles/asd-ste100-ko.md +41 -0
- package/assets/lithermes-plugin/output-styles/asd-ste100.md +40 -0
- package/assets/lithermes-plugin/output-styles/eli5-ko.md +13 -0
- package/assets/lithermes-plugin/output-styles/eli5.md +11 -0
- package/assets/lithermes-plugin/output_styles.py +62 -0
- package/assets/lithermes-plugin/payload-version.json +2107 -0
- package/assets/lithermes-plugin/plugin.yaml +16 -0
- package/assets/lithermes-plugin/provider_metrics.py +161 -0
- package/assets/lithermes-plugin/redaction.py +148 -0
- package/assets/lithermes-plugin/rules/__init__.py +55 -0
- package/assets/lithermes-plugin/rules/bundled-rules/baseline-discipline.md +20 -0
- package/assets/lithermes-plugin/rules/bundled-rules/build-decision-gate.md +19 -0
- package/assets/lithermes-plugin/rules/bundled-rules/windows-git-bash.md +17 -0
- package/assets/lithermes-plugin/rules/constants.py +122 -0
- package/assets/lithermes-plugin/rules/discovery.py +276 -0
- package/assets/lithermes-plugin/rules/engine.py +447 -0
- package/assets/lithermes-plugin/rules/frontmatter.py +149 -0
- package/assets/lithermes-plugin/rules/globmatch.py +333 -0
- package/assets/lithermes-plugin/scientific_visualization.py +158 -0
- package/assets/lithermes-plugin/session_context.py +8 -0
- package/assets/lithermes-plugin/skill_loop.py +2044 -0
- package/assets/lithermes-plugin/skill_observer.py +1778 -0
- package/assets/lithermes-plugin/skills/autoconference/LICENSE +21 -0
- package/assets/lithermes-plugin/skills/autoconference/ORIGIN.json +11 -0
- package/assets/lithermes-plugin/skills/autoconference/SKILL.md +163 -0
- package/assets/lithermes-plugin/skills/autoconference/assets/conference_template.md +76 -0
- package/assets/lithermes-plugin/skills/autoconference/assets/report_template.md +53 -0
- package/assets/lithermes-plugin/skills/autoconference/assets/synthesis_template.md +39 -0
- package/assets/lithermes-plugin/skills/autoconference/dependencies/autoresearch.md +14 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/analyze/SKILL.md +269 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/core/SKILL.md +134 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/core/convergence-guide.md +162 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/core/crash-recovery.md +63 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/debate/SKILL.md +383 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/plan/SKILL.md +304 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/resume/SKILL.md +82 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/ship/SKILL.md +78 -0
- package/assets/lithermes-plugin/skills/autoconference/modes/survey/SKILL.md +376 -0
- package/assets/lithermes-plugin/skills/autoconference/references/agent-prompts.md +110 -0
- package/assets/lithermes-plugin/skills/autoconference/references/conference-protocol.md +90 -0
- package/assets/lithermes-plugin/skills/autoconference/references/core-principles.md +78 -0
- package/assets/lithermes-plugin/skills/autoconference/references/results-logging.md +165 -0
- package/assets/lithermes-plugin/skills/autoconference/references/visualization-guide.md +99 -0
- package/assets/lithermes-plugin/skills/autoconference/scripts/check_conference.sh +197 -0
- package/assets/lithermes-plugin/skills/autoconference/scripts/init_conference.py +489 -0
- package/assets/lithermes-plugin/skills/autoconference/scripts/style_presets.py +104 -0
- package/assets/lithermes-plugin/skills/autoconference/templates/code-performance.md +59 -0
- package/assets/lithermes-plugin/skills/autoconference/templates/debate-mode.md +50 -0
- package/assets/lithermes-plugin/skills/autoconference/templates/prompt-optimization.md +58 -0
- package/assets/lithermes-plugin/skills/autoconference/templates/quick-conference.md +48 -0
- package/assets/lithermes-plugin/skills/autoconference/templates/research-synthesis.md +56 -0
- package/assets/lithermes-plugin/skills/autoconference/templates/survey-mode.md +63 -0
- package/assets/lithermes-plugin/skills/autoresearch/LICENSE +21 -0
- package/assets/lithermes-plugin/skills/autoresearch/ORIGIN.json +11 -0
- package/assets/lithermes-plugin/skills/autoresearch/SKILL.md +175 -0
- package/assets/lithermes-plugin/skills/autoresearch/assets/report_template.md +50 -0
- package/assets/lithermes-plugin/skills/autoresearch/assets/research_template.md +38 -0
- package/assets/lithermes-plugin/skills/autoresearch/assets/results_template.tsv +2 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/core/SKILL.md +204 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/core/evaluator-contract.md +108 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/core/stuck-detection.md +102 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/debug/SKILL.md +240 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/debug/investigation-techniques.md +254 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/fix/SKILL.md +176 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/learn/SKILL.md +96 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/plan/SKILL.md +291 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/predict/SKILL.md +271 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/predict/persona-templates.md +227 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/reason/SKILL.md +174 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/scenario/SKILL.md +168 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/scenario/dimensions.md +173 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/security/SKILL.md +287 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/security/owasp-checklist.md +156 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/security/stride-model.md +191 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/ship/SKILL.md +99 -0
- package/assets/lithermes-plugin/skills/autoresearch/modes/ship/type-checklists.md +158 -0
- package/assets/lithermes-plugin/skills/autoresearch/references/core-principles.md +75 -0
- package/assets/lithermes-plugin/skills/autoresearch/references/results-logging.md +55 -0
- package/assets/lithermes-plugin/skills/autoresearch/references/visualization-guide.md +90 -0
- package/assets/lithermes-plugin/skills/autoresearch/scripts/check_progress.sh +139 -0
- package/assets/lithermes-plugin/skills/autoresearch/scripts/init_research.py +219 -0
- package/assets/lithermes-plugin/skills/autoresearch/scripts/style_presets.py +104 -0
- package/assets/lithermes-plugin/skills/browser-drive/SKILL.md +147 -0
- package/assets/lithermes-plugin/skills/browser-drive/scripts/capability_probe.py +528 -0
- package/assets/lithermes-plugin/skills/comment-checker/SKILL.md +162 -0
- package/assets/lithermes-plugin/skills/debugging/SKILL.md +271 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/00-setup.md +108 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/02-investigate.md +122 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/04-oracle-triple.md +136 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/05-escalate.md +69 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/06-fix.md +116 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/08-qa.md +94 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/09-cleanup.md +164 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/partial-runtime-evidence.md +229 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/bundled-js-binary.md +415 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/go.md +252 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/native-binary.md +484 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/node.md +260 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/python.md +248 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/rust.md +234 -0
- package/assets/lithermes-plugin/skills/debugging/references/tools/ghidra.md +212 -0
- package/assets/lithermes-plugin/skills/debugging/references/tools/playwright-cli.md +194 -0
- package/assets/lithermes-plugin/skills/debugging/references/tools/pwndbg.md +263 -0
- package/assets/lithermes-plugin/skills/debugging/references/tools/pwntools.md +265 -0
- package/assets/lithermes-plugin/skills/deep-interview/SKILL.md +419 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/SKILL.md +49 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/.gitattributes +2 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/README.md +248 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/_INDEX.md +191 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/airbnb.md +393 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/airtable.md +92 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/apple.md +250 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/aside.md +209 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/binance.md +348 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/bmw.md +183 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/brutalist-skill.md +92 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/bugatti.md +271 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/cal.md +262 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/claude.md +315 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/clay.md +307 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/clickhouse.md +284 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/clone-from-url.md +65 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/cohere.md +269 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/coinbase.md +132 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/composio.md +310 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/cursor.md +312 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/design-system-architecture.md +244 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/elevenlabs.md +268 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/expo.md +284 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/ferrari.md +317 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/figma.md +223 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/framer.md +249 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/gpt-tasteskill.md +74 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/hashicorp.md +281 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/ibm.md +335 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/image-to-code-skill.md +1228 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/imagegen-brandkit.md +798 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/imagegen-frontend-mobile.md +1465 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/imagegen-frontend-web.md +987 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/intercom.md +149 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/kraken.md +128 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/lamborghini.md +291 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/layout-skill.md +107 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/lazyweb.md +77 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/linear.app.md +370 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/lovable.md +301 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/mastercard.md +368 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/meta.md +369 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/minimalist-skill.md +85 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/minimax.md +260 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/mintlify.md +329 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/miro.md +111 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/mistral.ai.md +264 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/mongodb.md +269 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/nike.md +366 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/notion.md +312 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/nvidia.md +296 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/ollama.md +270 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/opencode.ai.md +284 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/output-skill.md +49 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/pinterest.md +233 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/playstation.md +367 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/posthog.md +259 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/raycast.md +271 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/react-dev-tooling-skill.md +230 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/redesign-skill.md +178 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/renault.md +314 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/replicate.md +264 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/resend.md +306 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/revolut.md +188 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/runwayml.md +247 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/sanity.md +360 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/sentry.md +265 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/shopify.md +353 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/soft-skill.md +98 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/spacex.md +197 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/spotify.md +249 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/starbucks.md +583 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/stitch-design-example.md +121 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/stitch-skill.md +184 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/stripe.md +325 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/supabase.md +258 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/superhuman.md +255 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/taste-skill.md +1206 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/tesla.md +289 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/theverge.md +342 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/together.ai.md +266 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/uber.md +298 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/vercel.md +313 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/vodafone.md +426 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/voltagent.md +326 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/warp.md +256 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/webflow.md +95 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/wired.md +281 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/wise.md +176 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/x.ai.md +260 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/design/zapier.md +331 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/EVIDENCE.md +97 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/README.md +48 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/UPSTREAM.md +80 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/lane-a-direction.md +64 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/lane-b-execution.md +65 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/lane-c-review.md +65 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/lane-d-memory.md +83 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/orchestration.md +80 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/routing.md +79 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/LICENSE +21 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/content-writer.md +132 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/design-builder.md +109 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/design-critic.md +89 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/design-lead.md +113 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/design-scout.md +78 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/design-strategist.md +121 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/inspiration-scout.md +107 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/agents/motion-designer.md +120 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/accessible-content/reference.md +101 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/adaptive-interfaces/reference.md +109 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/cognitive-accessibility/reference.md +107 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/design-debate/reference.md +199 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/design-debt-tracker/reference.md +174 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/design-handoff/reference.md +125 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/design-md/reference.md +106 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/design-retrospective/reference.md +266 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/design-review/reference.md +123 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/design-system-alignment/reference.md +120 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/designpowers-critique/reference.md +164 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/heuristic-evaluation/reference.md +85 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/inclusive-personas/reference.md +98 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/inspiration-scouting/reference.md +165 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/interaction-design/reference.md +122 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/motion-choreography/reference.md +81 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/research-planning/reference.md +96 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/responsive-patterns/reference.md +77 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/synthetic-user-testing/reference.md +192 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/taste-feedback/reference.md +165 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/taste-report/reference.md +78 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/token-architecture/reference.md +75 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/ui-composition/reference.md +117 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/usability-testing/reference.md +78 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/verification-before-shipping/reference.md +125 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/voice-and-tone/reference.md +79 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/designpowers/vendor/skills/writing-design-plans/reference.md +119 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/perfection/README.md +160 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/perfection/react-perf-tooling.md +127 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/README.md +659 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/charts.csv +26 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/colors.csv +162 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/icons.csv +106 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/landing.csv +35 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/products.csv +162 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/react-performance.csv +45 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/astro.csv +54 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/react.csv +54 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/stacks/vue.csv +50 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/styles.csv +85 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/typography.csv +74 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/ui-reasoning.csv +162 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/data/web-interface.csv +31 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/scripts/core.py +262 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/scripts/design_system.py +1148 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/corpus/ui-ux-db/scripts/search.py +114 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/legal/ATTRIBUTION.md +217 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/legal/LICENSE +21 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/legal/LICENSE-Apache-2.0.txt +201 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/_canonical-corpus/manifest.json +876 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/adaptive-layout.md +81 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/brand-and-imagery.md +84 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/complete-contract.md +457 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/composition.md +89 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/creative-directions.md +81 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/evidence-review.md +113 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/implementation-platforms.md +92 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/inclusive-interface.md +85 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/interaction-motion.md +87 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/operating-lanes.md +85 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/performance-delivery.md +85 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/product-direction.md +86 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/redesign-playbook.md +91 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/system-foundations.md +82 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/taste-direction.md +86 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/visual-language.md +85 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/references/visual-reconstruction.md +94 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/resources/LICENSE +21 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/resources/PROVENANCE.json +38 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/resources/THIRD-PARTY-NOTICE.txt +14 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/resources/design-intelligence.json +1 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/resources/import-manifest.json +1060 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/schemas/design-contract-v1alpha1.schema.json +264 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/schemas/design-contract-v1beta1.schema.json +268 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/schemas/design-contract-v1beta2.schema.json +280 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/scripts/design_contract_validation.py +996 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/scripts/design_intelligence.py +128 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/scripts/design_runtime.py +98 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/scripts/import_design_intelligence.py +56 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/scripts/source_import.py +144 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/scripts/source_manifest.py +65 -0
- package/assets/lithermes-plugin/skills/lit-burnoff/SKILL.md +448 -0
- package/assets/lithermes-plugin/skills/lit-burnoff-file/SKILL.md +254 -0
- package/assets/lithermes-plugin/skills/lit-code/SKILL.md +609 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/README.md +90 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/backend-stack.md +641 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/bootstrap.md +328 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/bubbletea-v2.md +359 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/cobra-stack.md +468 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/concurrency.md +362 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/data-modeling.md +329 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/error-handling.md +359 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/golangci-strict.md +236 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/grpc-connect.md +375 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/libraries.md +337 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/one-liners.md +202 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/sqlc-pgx.md +471 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/testing.md +467 -0
- package/assets/lithermes-plugin/skills/lit-code/references/go/type-patterns.md +298 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/README.md +314 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/async-anyio.md +442 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/data-modeling.md +233 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/data-processing.md +133 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/error-handling.md +218 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/fastapi-stack.md +316 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/httpx2-optimization.md +360 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/libraries.md +307 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/one-liners.md +268 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/orjson-stack.md +378 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/pydantic-ai.md +285 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/pyproject-strict.md +232 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/textual-tui.md +201 -0
- package/assets/lithermes-plugin/skills/lit-code/references/python/type-patterns.md +176 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/README.md +317 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/async-tokio.md +299 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/axum-stack.md +467 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/cargo-strict.md +317 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/clap-stack.md +409 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/concurrency.md +375 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/libraries.md +439 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/one-liners.md +291 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/proptest-insta.md +429 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/type-state.md +354 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/unsafe-discipline.md +250 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust/zero-cost-safety.md +527 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust-ub/README.md +289 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust-ub/miri-sanitizers-loom.md +411 -0
- package/assets/lithermes-plugin/skills/lit-code/references/rust-ub/ub-taxonomy.md +269 -0
- package/assets/lithermes-plugin/skills/lit-code/references/typescript/README.md +195 -0
- package/assets/lithermes-plugin/skills/lit-code/references/typescript/backend-hono.md +672 -0
- package/assets/lithermes-plugin/skills/lit-code/references/typescript/bootstrap.md +199 -0
- package/assets/lithermes-plugin/skills/lit-code/references/typescript/data-modeling.md +202 -0
- package/assets/lithermes-plugin/skills/lit-code/references/typescript/error-handling.md +169 -0
- package/assets/lithermes-plugin/skills/lit-code/references/typescript/tsconfig-strict.md +152 -0
- package/assets/lithermes-plugin/skills/lit-code/references/typescript/type-patterns.md +196 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/check-no-excuse-rules.sh +173 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/new-project.py +138 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/.editorconfig +13 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/.golangci.yml +95 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/AGENTS.md.tmpl +24 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/README.md.tmpl +12 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/Taskfile.yml +40 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/ci.yml +37 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/config.go +24 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/gitignore +15 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/main.go.tmpl +22 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/go/templates/run.go +15 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/python/check-no-excuse-rules.py +687 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/python/new-project.py +172 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/python/new-script.py +116 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/rust/check-no-excuse-rules.py +296 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/rust/check-no-excuse-rules.sh +158 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/rust/new-project.py +175 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/typescript/check-no-excuse-rules.ts +282 -0
- package/assets/lithermes-plugin/skills/lit-code/scripts/typescript/new-project.ts +177 -0
- package/assets/lithermes-plugin/skills/lit-commit/SKILL.md +242 -0
- package/assets/lithermes-plugin/skills/lit-comprehend/SKILL.md +259 -0
- package/assets/lithermes-plugin/skills/lit-comprehend/assets/explainer-scaffold.html +123 -0
- package/assets/lithermes-plugin/skills/lit-comprehend/references/artifact-template.md +205 -0
- package/assets/lithermes-plugin/skills/lit-comprehend/references/micro-worlds.md +139 -0
- package/assets/lithermes-plugin/skills/lit-comprehend/scripts/verify-explainer.py +324 -0
- package/assets/lithermes-plugin/skills/lit-crucible/SKILL.md +315 -0
- package/assets/lithermes-plugin/skills/lit-handoff/ORIGIN.json +23 -0
- package/assets/lithermes-plugin/skills/lit-handoff/SKILL.md +145 -0
- package/assets/lithermes-plugin/skills/lit-init/SKILL.md +329 -0
- package/assets/lithermes-plugin/skills/lit-korean/SKILL.md +237 -0
- package/assets/lithermes-plugin/skills/lit-korean/references/quick-rules.md +24 -0
- package/assets/lithermes-plugin/skills/lit-korean/references/safety-checklist.md +23 -0
- package/assets/lithermes-plugin/skills/lit-plan/SKILL.md +596 -0
- package/assets/lithermes-plugin/skills/lit-recap/SKILL.md +183 -0
- package/assets/lithermes-plugin/skills/lit-scientific-visualization/ORIGIN.json +32 -0
- package/assets/lithermes-plugin/skills/lit-scientific-visualization/SKILL.md +170 -0
- package/assets/lithermes-plugin/skills/litgoal/.gitkeep +0 -0
- package/assets/lithermes-plugin/skills/litgoal/SKILL.md +372 -0
- package/assets/lithermes-plugin/skills/litresearch/ATTRIBUTION.md +50 -0
- package/assets/lithermes-plugin/skills/litresearch/SKILL.md +593 -0
- package/assets/lithermes-plugin/skills/litwork/SKILL.md +419 -0
- package/assets/lithermes-plugin/skills/lsp/SKILL.md +165 -0
- package/assets/lithermes-plugin/skills/lsp-setup/SKILL.md +265 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/bash/README.md +68 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/c-cpp/README.md +78 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/csharp/README.md +90 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/dart/README.md +59 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/elixir/README.md +61 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/go/README.md +63 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/haskell/README.md +69 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/java/README.md +70 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/julia/README.md +70 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/kotlin/README.md +72 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/lua/README.md +68 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/php/README.md +61 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/python/README.md +73 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/ruby/README.md +67 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/rust/README.md +65 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/swift/README.md +64 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/terraform/README.md +66 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/typescript/README.md +82 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/yaml/README.md +65 -0
- package/assets/lithermes-plugin/skills/lsp-setup/references/zig/README.md +59 -0
- package/assets/lithermes-plugin/skills/lsp-setup/scripts/detect-lsp.ts +221 -0
- package/assets/lithermes-plugin/skills/lsp-setup/scripts/lsp-server-table.ts +146 -0
- package/assets/lithermes-plugin/skills/lsp-setup/scripts/tsconfig.json +18 -0
- package/assets/lithermes-plugin/skills/lsp-setup/scripts/verify-lsp.ts +252 -0
- package/assets/lithermes-plugin/skills/refactor/SKILL.md +896 -0
- package/assets/lithermes-plugin/skills/review-work/SKILL.md +450 -0
- package/assets/lithermes-plugin/skills/rules/SKILL.md +194 -0
- package/assets/lithermes-plugin/skills/skill-observer/SKILL.md +190 -0
- package/assets/lithermes-plugin/skills/skill-observer/references/review-contract.md +77 -0
- package/assets/lithermes-plugin/skills/start-work/SKILL.md +550 -0
- package/assets/lithermes-plugin/skills/structural-search/SKILL.md +274 -0
- package/assets/lithermes-plugin/skills/visual-qa/SKILL.md +48 -0
- package/assets/lithermes-plugin/skills/visual-qa/references/capture-playbook.md +133 -0
- package/assets/lithermes-plugin/skills/visual-qa/references/complete-contract.md +522 -0
- package/assets/lithermes-plugin/skills/visual-qa/schemas/evidence-manifest-v1alpha1.schema.json +135 -0
- package/assets/lithermes-plugin/skills/visual-qa/schemas/evidence-manifest-v1beta1.schema.json +110 -0
- package/assets/lithermes-plugin/skills/visual-qa/schemas/review-receipt-v1alpha1.schema.json +49 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/contract_checks.py +71 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/evidence_contract.py +288 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/png_runtime.py +379 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/review_contract.py +151 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/tier_checks.py +190 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/tier_contract.py +103 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/tui_runtime.py +170 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/visual_contracts.py +31 -0
- package/assets/lithermes-plugin/skills/visual-qa/scripts/visual_qa.py +79 -0
- package/assets/lithermes-plugin/skills/wikify/LICENSE +21 -0
- package/assets/lithermes-plugin/skills/wikify/ORIGIN.json +12 -0
- package/assets/lithermes-plugin/skills/wikify/SKILL.md +192 -0
- package/assets/lithermes-plugin/skills/wikify/assets/home-template.md +44 -0
- package/assets/lithermes-plugin/skills/wikify/assets/maintenance-report-template.md +46 -0
- package/assets/lithermes-plugin/skills/wikify/assets/paper-source-note-template.md +138 -0
- package/assets/lithermes-plugin/skills/wikify/assets/source-note-template.md +45 -0
- package/assets/lithermes-plugin/skills/wikify/assets/wiki-rules-template.md +117 -0
- package/assets/lithermes-plugin/skills/wikify/modes/ingest/SKILL.md +24 -0
- package/assets/lithermes-plugin/skills/wikify/modes/init/SKILL.md +26 -0
- package/assets/lithermes-plugin/skills/wikify/modes/lint/SKILL.md +30 -0
- package/assets/lithermes-plugin/skills/wikify/modes/query/SKILL.md +22 -0
- package/assets/lithermes-plugin/skills/wikify/modes/save/SKILL.md +32 -0
- package/assets/lithermes-plugin/skills/wikify/references/full-contract.md +761 -0
- package/assets/lithermes-plugin/uiux_runtime_common.py +117 -0
- package/assets/lithermes-plugin/vendor/NOTICE.md +21 -0
- package/assets/lithermes-plugin/vendor/handoff/SKILL.md +199 -0
- package/assets/lithermes-plugin/vendor/handoff/evals/evals.json +154 -0
- package/assets/lithermes-plugin/vendor/handoff/examples/HANDOFF-example-generic-auth-refactor.md +97 -0
- package/assets/lithermes-plugin/vendor/handoff/templates/HANDOFF.md +121 -0
- package/assets/lithermes-plugin/vendor/licenses/022_handoff-MIT.txt +21 -0
- package/assets/lithermes-plugin/vendor/licenses/045_scientific-visualization-MIT.txt +21 -0
- package/assets/lithermes-plugin/vendor/provenance/022_handoff.md +16 -0
- package/assets/lithermes-plugin/vendor/provenance/045_scientific-visualization.md +18 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/SKILL.md +283 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/assets/color_palettes.py +197 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/assets/nature.mplstyle +75 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/assets/presentation.mplstyle +74 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/assets/publication.mplstyle +78 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/evals/evals.json +158 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/references/color_palettes.md +380 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/references/journal_requirements.md +359 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/references/matplotlib_examples.md +608 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/references/mdanalysis_martini_visualization.md +85 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/references/publication_guidelines.md +217 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/references/seaborn_for_publications.md +293 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/scripts/figure_export.py +238 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/scripts/style_presets.py +467 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/tests/test_figure_export.py +51 -0
- package/assets/lithermes-plugin/vendor/scientific-visualization/tests/test_style_presets.py +114 -0
- package/bin/lithermes.js +8 -0
- package/package.json +58 -0
- package/readme-assets/badge-license.svg +1 -0
- package/readme-assets/badge-version.svg +1 -0
- package/readme-assets/cover.webp +0 -0
- package/readme-assets/lithermes-clay-icon.png +0 -0
- package/readme-assets/lithermes-wordmark.svg +5 -0
- package/src/cli.js +396 -0
- package/src/lib/autoUpdate.js +4 -0
- package/src/lib/canonicalCorpus.js +436 -0
- package/src/lib/check.js +200 -0
- package/src/lib/config.js +229 -0
- package/src/lib/files.js +126 -0
- package/src/lib/hermesDiscovery.js +122 -0
- package/src/lib/hud.js +135 -0
- package/src/lib/install.js +559 -0
- package/src/lib/litMark.js +68 -0
- package/src/lib/modelConfig.js +431 -0
- package/src/lib/modelConfigBoundary.js +206 -0
- package/src/lib/modelPrompt.js +201 -0
- package/src/lib/modelRoutePolicy.js +379 -0
- package/src/lib/patch.js +153 -0
- package/src/lib/skillLoop.js +62 -0
- package/src/lib/skillPayload.js +306 -0
- package/src/lib/skins.js +274 -0
- package/src/lib/spinner.js +193 -0
- package/src/lib/updateNotifier.js +1133 -0
- package/src/lib/updateNotifierWorker.js +9 -0
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
|
|
6
|
+
try:
|
|
7
|
+
from .core_contract import KOREAN_PROSE_NATURAL_PHRASES, UI_SURFACE_NOUNS
|
|
8
|
+
from .core_runtime import _clamp_task
|
|
9
|
+
except (ImportError, ModuleNotFoundError):
|
|
10
|
+
from core_contract import KOREAN_PROSE_NATURAL_PHRASES, UI_SURFACE_NOUNS
|
|
11
|
+
from core_runtime import _clamp_task
|
|
12
|
+
|
|
13
|
+
# Fire on a standalone `lit`/`litwork` token delimited by whitespace, string
|
|
14
|
+
# edge, or punctuation — but NOT inside a larger word ("split", "literally"),
|
|
15
|
+
# NOT as a hyphen/underscore compound ("lit-review", "lit_loop"), and NOT when
|
|
16
|
+
# the token is path/slash-command embedded (`/lit`, `/tmp/lit.sock`). Path-like
|
|
17
|
+
# slash tokens elsewhere in the prompt do not suppress a valid standalone token.
|
|
18
|
+
LIT_PATTERN = re.compile(r"(?<![\w/-])(?:litwork|lit)(?![\w/-])", re.IGNORECASE)
|
|
19
|
+
DIRECT_LIT_PATTERN = re.compile(r"^\s*(?:lit|litwork)(?![\w-])\s+(?P<task>.+?)\s*$", re.IGNORECASE | re.DOTALL)
|
|
20
|
+
|
|
21
|
+
@dataclass(frozen=True)
|
|
22
|
+
class NaturalLitRoute:
|
|
23
|
+
mode: str
|
|
24
|
+
objective: str = ""
|
|
25
|
+
visible_message: str = ""
|
|
26
|
+
blocked: bool = False
|
|
27
|
+
block_message: str = ""
|
|
28
|
+
deprecation_note: str = ""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# One-release compatibility only; remove these aliases in the next minor.
|
|
32
|
+
SKILL_RENAME_ALIASES = {
|
|
33
|
+
"hyperplan": "lit-crucible",
|
|
34
|
+
"init-deep": "lit-init",
|
|
35
|
+
"git-master": "lit-commit",
|
|
36
|
+
"remove-ai-slops": "lit-burnoff",
|
|
37
|
+
"ai-slop-remover": "lit-burnoff-file",
|
|
38
|
+
"korean-ai-slop-remover": "lit-korean",
|
|
39
|
+
"programming": "lit-code",
|
|
40
|
+
}
|
|
41
|
+
_RENAMED_ROUTE_ALIASES = {**SKILL_RENAME_ALIASES, "teammode": "lit-team"}
|
|
42
|
+
_RENAMED_ROUTE_WORDS = {
|
|
43
|
+
**{name: name for name in _RENAMED_ROUTE_ALIASES.values()},
|
|
44
|
+
**_RENAMED_ROUTE_ALIASES,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def skill_rename_note(old: str) -> str:
|
|
49
|
+
new = _RENAMED_ROUTE_ALIASES[old]
|
|
50
|
+
return f"Note: `{old}` was renamed to `{new}`; the old name is removed in the next minor."
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _renamed_skill_route(text: str, visible: str, source: str, offset: int = 0) -> NaturalLitRoute | None:
|
|
54
|
+
for word, name in _RENAMED_ROUTE_WORDS.items():
|
|
55
|
+
match = re.match(rf"^\s*{re.escape(word)}(?![\w-])(?P<rest>.*)$", text, re.IGNORECASE | re.DOTALL)
|
|
56
|
+
if match is not None:
|
|
57
|
+
rest = match.group("rest").strip()
|
|
58
|
+
if name == "lit-korean":
|
|
59
|
+
# Only the trigger is parsed as instructions. Retain code spans
|
|
60
|
+
# and fences in the original prose for the escaped content path.
|
|
61
|
+
rest = source[offset + match.start("rest"):].strip()
|
|
62
|
+
return NaturalLitRoute(
|
|
63
|
+
mode={"lit-korean": "korean-prose-cleanup", "lit-team": "kanban-team"}.get(name, name),
|
|
64
|
+
objective=_clamp_task(rest),
|
|
65
|
+
visible_message=visible,
|
|
66
|
+
deprecation_note=skill_rename_note(word) if word in _RENAMED_ROUTE_ALIASES else "",
|
|
67
|
+
)
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
# Intent-shaped skill routes.
|
|
71
|
+
#
|
|
72
|
+
# A skill whose description is a statement of intent ("refactor", "MUST USE
|
|
73
|
+
# whenever a task needs a commit") has no event that can fire it, so the only
|
|
74
|
+
# honest route is the user naming it. These match at message start only —
|
|
75
|
+
# `_after_mode_word` anchors on `^` — so "can you refactor this" does not
|
|
76
|
+
# activate and "refactoring" does not either (`(?![\w-])` rejects the suffix).
|
|
77
|
+
_BARE_SKILL_PREFIXES = (
|
|
78
|
+
("autoconference", "autoconference"),
|
|
79
|
+
("autoresearch", "autoresearch"),
|
|
80
|
+
("wikify", "wikify"),
|
|
81
|
+
("litresearch", "litresearch"),
|
|
82
|
+
("lit-comprehend", "lit-comprehend"),
|
|
83
|
+
("comprehend", "lit-comprehend"),
|
|
84
|
+
("comment-checker", "comment-checker"),
|
|
85
|
+
("lsp-setup", "lsp-setup"),
|
|
86
|
+
("lsp", "lsp"),
|
|
87
|
+
("refactor", "refactor"),
|
|
88
|
+
("debugging", "debugging"),
|
|
89
|
+
("rules", "rules"),
|
|
90
|
+
# Design work needs its guidance at the moment the user SAYS they are designing,
|
|
91
|
+
# not after the first .css edit — the event route in core_contract.py covers the
|
|
92
|
+
# after case and stays. Both ids are hyphenated compounds, so neither can be
|
|
93
|
+
# reached by an ordinary English sentence; see the token-shape note below.
|
|
94
|
+
("frontend-ui-ux", "frontend-ui-ux"),
|
|
95
|
+
("visual-qa", "visual-qa"),
|
|
96
|
+
("structural-search", "structural-search"),
|
|
97
|
+
# Name-only, deliberately. A message that merely mentions a browser, a URL, or
|
|
98
|
+
# the web is not a request to drive one, and over-firing is a recorded defect
|
|
99
|
+
# shape in this family. The hyphenated compound cannot open an ordinary sentence.
|
|
100
|
+
("browser-drive", "browser-drive"),
|
|
101
|
+
# Name-only for the same reason as browser-drive: "observe", "review", and
|
|
102
|
+
# "the skill fell short" are ordinary English about ordinary work.
|
|
103
|
+
("skill-observer", "skill-observer"),
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# TOKEN SHAPE — why these two get a bare route and `design` / `ui` / `visual` do not.
|
|
107
|
+
#
|
|
108
|
+
# `_after_mode_word` anchors at message start and rejects a `[\w-]` continuation, so a
|
|
109
|
+
# bare token fires only when the message OPENS with it as a whole word. That makes a
|
|
110
|
+
# hyphenated compound id ("frontend-ui-ux", "visual-qa") safe: no ordinary sentence
|
|
111
|
+
# begins with one, and "frontend-ui-ux-team" / "visual-qa-runner" are rejected by the
|
|
112
|
+
# hyphen guard. Common words can open ordinary sentences, so `design`, `ui`, `ux`,
|
|
113
|
+
# and `visual` are NOT bare routes here; `design` is reachable only after an
|
|
114
|
+
# explicit `lit`, where intent is declared.
|
|
115
|
+
|
|
116
|
+
# The same skills after an explicit `lit` token, plus the natural single words a
|
|
117
|
+
# user reaches for there ("lit debug the parser"). Order is irrelevant to
|
|
118
|
+
# correctness — `_after_mode_word` requires a full-token match — but the
|
|
119
|
+
# hyphenated ids stay first so the intent reads in the same order as above.
|
|
120
|
+
_LIT_SKILL_SUFFIXES = (
|
|
121
|
+
("autoconference", "autoconference"),
|
|
122
|
+
("autoresearch", "autoresearch"),
|
|
123
|
+
("wikify", "wikify"),
|
|
124
|
+
("lit-comprehend", "lit-comprehend"),
|
|
125
|
+
("comprehend", "lit-comprehend"),
|
|
126
|
+
("comment-checker", "comment-checker"),
|
|
127
|
+
("lsp-setup", "lsp-setup"),
|
|
128
|
+
("lsp", "lsp"),
|
|
129
|
+
("refactor", "refactor"),
|
|
130
|
+
("debugging", "debugging"),
|
|
131
|
+
("debug", "debugging"),
|
|
132
|
+
("git", "lit-commit"),
|
|
133
|
+
("comments", "comment-checker"),
|
|
134
|
+
("slop", "lit-burnoff"),
|
|
135
|
+
("rules", "rules"),
|
|
136
|
+
("frontend-ui-ux", "frontend-ui-ux"),
|
|
137
|
+
("visual-qa", "visual-qa"),
|
|
138
|
+
# `design` is safe HERE and only here: the user already typed `lit`, so intent is
|
|
139
|
+
# declared. It is deliberately not a bare route.
|
|
140
|
+
("design", "frontend-ui-ux"),
|
|
141
|
+
("structural-search", "structural-search"),
|
|
142
|
+
("structural", "structural-search"),
|
|
143
|
+
# No bare `browser` alias here: unlike `design`, it names a Hermes toolset that
|
|
144
|
+
# already exists, so the short form would steal work from the host's own surface.
|
|
145
|
+
("browser-drive", "browser-drive"),
|
|
146
|
+
# Name-only for the same reason as browser-drive: "observe", "review", and
|
|
147
|
+
# "the skill fell short" are ordinary English about ordinary work.
|
|
148
|
+
("skill-observer", "skill-observer"),
|
|
149
|
+
)
|
|
150
|
+
_SEMANTIC_FAMILY_MODES = frozenset({"autoresearch", "autoconference", "wikify"})
|
|
151
|
+
|
|
152
|
+
# INTENT-SHAPED route for frontend-ui-ux.
|
|
153
|
+
#
|
|
154
|
+
# frontend-ui-ux is the one skill whose own name nobody types. Left name-only it is
|
|
155
|
+
# reachable only after editing has started, which is backwards for a skill that
|
|
156
|
+
# shapes what gets built. But no single word is a safe token: "design", "build" and
|
|
157
|
+
# "page" each fire on far too much.
|
|
158
|
+
#
|
|
159
|
+
# The conjunction is what makes it safe — a MAKING VERB and a USER-INTERFACE NOUN
|
|
160
|
+
# must BOTH appear. "build" alone would match everything; "build" plus a UI noun
|
|
161
|
+
# does not match "build the API client". Ported from the sibling product's routing
|
|
162
|
+
# module, which reached the same diagnosis independently.
|
|
163
|
+
# NOTE the mandatory whitespace in the two-word verbs. Written `lay ?out`, the
|
|
164
|
+
# verb also matches the NOUN "layout" — one word would then satisfy both halves
|
|
165
|
+
# by itself and the conjunction would collapse to a single common term. A negative
|
|
166
|
+
# test caught exactly that ("what does the layout algorithm do" fired).
|
|
167
|
+
UI_INTENT_VERBS = (
|
|
168
|
+
"design", "redesign", "restyle", "revamp", "polish", r"lay\s+out", r"mock\s+up",
|
|
169
|
+
"build", "create", "make", "implement", "style",
|
|
170
|
+
)
|
|
171
|
+
# The shared core comes from core_contract.UI_SURFACE_NOUNS so the chat route and
|
|
172
|
+
# the event-side regex cannot drift. These are the prose-only additions: they read
|
|
173
|
+
# as UI surfaces in a sentence but are not path/diff signals.
|
|
174
|
+
UI_INTENT_PROSE_NOUNS = (
|
|
175
|
+
"user interface", "screen", "page", "layout", "modal", "navbar", "sidebar",
|
|
176
|
+
"stylesheet", "css", "design system", "landing page", "theme", "styling",
|
|
177
|
+
)
|
|
178
|
+
UI_INTENT_NOUNS = tuple(UI_SURFACE_NOUNS) + UI_INTENT_PROSE_NOUNS
|
|
179
|
+
|
|
180
|
+
# ---- Korean ---------------------------------------------------------------
|
|
181
|
+
#
|
|
182
|
+
# The user writes Korean, so the capability has to be reachable in Korean. Same
|
|
183
|
+
# conjunction, same discrimination bar; only the matching rules differ, because
|
|
184
|
+
# the English sets lean on two properties Hangul does not have.
|
|
185
|
+
#
|
|
186
|
+
# 1. BOUNDARY. `\b` sits between a word char and a non-word char, and Hangul IS a
|
|
187
|
+
# word char, so `\bUI\b` does not match "UI를" and `\b페이지\b` does not match
|
|
188
|
+
# "페이지를" — a particle attaches directly to the stem. The boundary used here
|
|
189
|
+
# is instead "not adjacent to a LATIN letter, digit, or underscore":
|
|
190
|
+
# (?<![A-Za-z0-9_]) TERM (?![A-Za-z0-9_])
|
|
191
|
+
# For an ASCII term this keeps real protection — "UI" matches "UI를" and "the UI
|
|
192
|
+
# is fine" but NOT "guide", "GUIDE" or "UIKit". For a Hangul term the guard is
|
|
193
|
+
# a no-op and the match is effectively a SUBSTRING.
|
|
194
|
+
#
|
|
195
|
+
# ACCEPTED RISK, stated rather than left implicit: a Hangul noun can match
|
|
196
|
+
# inside a longer compound — 페이지 matches inside 홈페이지, 화면 inside 화면비.
|
|
197
|
+
# Every such compound seen so far is still a UI surface, so the failure mode is
|
|
198
|
+
# a slightly wider true positive rather than a false one. It is a real risk and
|
|
199
|
+
# the discrimination corpus below is what holds it down.
|
|
200
|
+
#
|
|
201
|
+
# 2. AGGLUTINATION. 디자인해줘 / 디자인하고 / 디자인할 / 디자인했다 are one verb. The
|
|
202
|
+
# verb entries therefore match a STEM plus a conjugation marker rather than
|
|
203
|
+
# enumerating inflections.
|
|
204
|
+
#
|
|
205
|
+
# 3. THE COLLISION, same shape as `lay ?out` vs the noun `layout`. 디자인 is both a
|
|
206
|
+
# verb stem and the head of the noun phrase 디자인 시스템. A bare 디자인 verb would
|
|
207
|
+
# let that noun phrase satisfy BOTH halves by itself and collapse the
|
|
208
|
+
# conjunction — "디자인 시스템 문서를 봐줘" would fire. So the colliding stem
|
|
209
|
+
# REQUIRES its 하다 marker: 디자인[하해할했함].
|
|
210
|
+
UI_INTENT_VERBS_KO = (
|
|
211
|
+
r"디자인[하해할했함]", # collides with the noun 디자인 시스템 — marker required
|
|
212
|
+
r"리디자인", r"재디자인",
|
|
213
|
+
r"설계[하해할했함]",
|
|
214
|
+
r"만들", r"만드", # 만들다: 만들어줘 / 만드는
|
|
215
|
+
r"제작[하해할했함]",
|
|
216
|
+
r"구현[하해할했함]",
|
|
217
|
+
r"개선[하해할했함]",
|
|
218
|
+
r"다듬",
|
|
219
|
+
r"꾸미",
|
|
220
|
+
r"리뉴얼",
|
|
221
|
+
)
|
|
222
|
+
# Hangul UI surfaces, plus the two ASCII terms that must survive an attached
|
|
223
|
+
# particle ("UI를"). These live here and NOT in UI_INTENT_NOUNS so no term is
|
|
224
|
+
# maintained in two places; test_no_term_is_maintained_in_two_places pins that.
|
|
225
|
+
UI_INTENT_NOUNS_KO = (
|
|
226
|
+
# NOTE: UI / UX deliberately absent — they live in UI_INTENT_NOUNS and the
|
|
227
|
+
# shared boundary below already matches them next to a Korean particle.
|
|
228
|
+
# Duplicating them here is the drift hazard this module already fought once.
|
|
229
|
+
"화면", "페이지", "레이아웃", "대시보드", "사이드바", "모달", "컴포넌트",
|
|
230
|
+
"프론트엔드", "스타일시트", "내비게이션", "네비게이션",
|
|
231
|
+
# 버튼 is the only component-level noun here and the only one with a MEASURED
|
|
232
|
+
# containment leak: "버튼식 잠금장치 만들어줘" (a physical push-button lock) fired.
|
|
233
|
+
# It still earns its place — "로그인 버튼 다시 디자인해줘" and "제출 버튼 색을
|
|
234
|
+
# 바꿔줘" carry no other UI noun — so the one measured compound is excluded
|
|
235
|
+
# rather than the term dropped. See ACCEPTED_KOREAN_CONTAINMENT_RISKS below for
|
|
236
|
+
# what remains unguarded and why.
|
|
237
|
+
r"버튼(?!식)",
|
|
238
|
+
r"디자인\s*시스템",
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
# Substring matching on Hangul has no word boundary to lean on, so a noun can match
|
|
242
|
+
# inside a longer compound. These are the cases measured and DELIBERATELY ACCEPTED.
|
|
243
|
+
# Each is a wider TRUE positive or a harmless one, never a wrong-domain match; the
|
|
244
|
+
# one wrong-domain case found (버튼식) is excluded above.
|
|
245
|
+
#
|
|
246
|
+
# Verb containment is a much smaller risk than noun containment and is not listed:
|
|
247
|
+
# a verb match alone never routes, so a verb inside an unrelated word is inert
|
|
248
|
+
# unless a UI noun is also present.
|
|
249
|
+
ACCEPTED_KOREAN_CONTAINMENT_RISKS = (
|
|
250
|
+
("페이지 ⊂ 홈페이지", "홈페이지 IS a UI surface — a true positive, not a leak."),
|
|
251
|
+
("페이지 ⊂ 페이지네이션",
|
|
252
|
+
"'페이지네이션 로직 만들어줘' routes. Pagination is a UI pattern, so design "
|
|
253
|
+
"guidance is not wrong here, only broader than asked."),
|
|
254
|
+
("컴포넌트 in a test request",
|
|
255
|
+
"'컴포넌트 테스트 만들어줘' routes. English behaves identically for 'build the "
|
|
256
|
+
"component tests', so this is a property of the noun set, not of Korean."),
|
|
257
|
+
("unmeasured Hangul compounds",
|
|
258
|
+
"The corpus below is finite. A compound nobody thought of can still contain a "
|
|
259
|
+
"noun stem. The conjunction is what bounds the damage: a containment only "
|
|
260
|
+
"matters when a making verb is also present."),
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
# ONE boundary for every term in both languages: "not adjacent to a Latin letter,
|
|
264
|
+
# digit, or underscore".
|
|
265
|
+
#
|
|
266
|
+
# For pure-ASCII text this is IDENTICAL to `\b` — "pages" still fails on `page`,
|
|
267
|
+
# "UIKit" still fails on `UI`. It differs only next to a NON-Latin character, and
|
|
268
|
+
# that difference is the whole point: `\b` treats Hangul as a word character, so
|
|
269
|
+
# `\bdashboard\b` does not match "dashboard를" and `\bUI\b` does not match "UI를".
|
|
270
|
+
# A Korean prompt carrying an English noun is the normal case, not an edge case.
|
|
271
|
+
_TERM_BOUNDARY = r"(?<![A-Za-z0-9_]){0}(?![A-Za-z0-9_])"
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def _term_alternation(terms):
|
|
275
|
+
return "|".join(
|
|
276
|
+
_TERM_BOUNDARY.format(term.replace(" ", r"\s+")) for term in terms
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
_UI_INTENT_VERB_RE = re.compile(_term_alternation(UI_INTENT_VERBS), re.IGNORECASE)
|
|
281
|
+
_UI_INTENT_NOUN_RE = re.compile(_term_alternation(UI_INTENT_NOUNS), re.IGNORECASE)
|
|
282
|
+
_UI_INTENT_VERB_KO_RE = re.compile(_term_alternation(UI_INTENT_VERBS_KO))
|
|
283
|
+
_UI_INTENT_NOUN_KO_RE = re.compile(_term_alternation(UI_INTENT_NOUNS_KO), re.IGNORECASE)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# ---------------------------------------------------------------------------
|
|
287
|
+
# Structural-search intent. Same shape as the UI conjunction above and for the
|
|
288
|
+
# same reason: `structural-search` is a name nobody types, so a name-only route
|
|
289
|
+
# is a route nobody reaches.
|
|
290
|
+
#
|
|
291
|
+
# THE DISCRIMINATOR IS THE OBJECT, NOT THE VERB. "find" is ordinary English; what
|
|
292
|
+
# separates a structural request from an ordinary one is whether the thing being
|
|
293
|
+
# found is a SYNTAX CONSTRUCT or a string. "find every call site" is structural.
|
|
294
|
+
# "find the login handler" is not, because a handler is not a syntax shape.
|
|
295
|
+
#
|
|
296
|
+
# ADAPTATIONS made to the shape list rather than copying it verbatim:
|
|
297
|
+
# - `grep` is deliberately NOT a verb. It names a textual tool, and a request
|
|
298
|
+
# phrased with it is asking for text search on purpose.
|
|
299
|
+
# - `refactor` is deliberately NOT a verb. It is already a bare skill token
|
|
300
|
+
# routing to lithermes:refactor; adding it here would put two routes in
|
|
301
|
+
# contention for the same word.
|
|
302
|
+
# - The nouns that are ordinary English on their own are kept as PHRASES:
|
|
303
|
+
# `usages of`, `references to`. A bare "reference" or "usage" fires on
|
|
304
|
+
# ordinary prose ("find the reference documentation").
|
|
305
|
+
# - `ast` stays a bare term because _TERM_BOUNDARY protects it: "fast", "last"
|
|
306
|
+
# and "past" cannot match.
|
|
307
|
+
STRUCTURAL_INTENT_VERBS = (
|
|
308
|
+
"find", "locate", "search", "rewrite", "replace", "migrate", "codemod",
|
|
309
|
+
)
|
|
310
|
+
STRUCTURAL_INTENT_SHAPES = (
|
|
311
|
+
r"call\s+sites?",
|
|
312
|
+
r"declarations?", r"imports?", r"import\s+statements?",
|
|
313
|
+
r"function\s+signatures?",
|
|
314
|
+
r"syntax\s+tree", r"syntax\s+shape", "ast",
|
|
315
|
+
)
|
|
316
|
+
# WHO-TERMS DELIBERATELY ABSENT: callers, call graph, invocations, usages of,
|
|
317
|
+
# every/all usages, references to.
|
|
318
|
+
#
|
|
319
|
+
# Ask the language server WHO and WHAT; ask a structural engine WHAT SHAPE. A
|
|
320
|
+
# call SITE is a syntax node — it can be matched without knowing what it resolves
|
|
321
|
+
# to. A CALLER is the enclosing function, and identifying it requires resolving
|
|
322
|
+
# the call target and the scope containing it. Same for "usages of X" and
|
|
323
|
+
# "references to X": both need X bound before the question even means anything.
|
|
324
|
+
#
|
|
325
|
+
# These were briefly present and are REMOVED rather than tuned, because keeping
|
|
326
|
+
# them would contradict the boundary this skill's own body now states in five
|
|
327
|
+
# places. A router must not outrun its skill's declared scope.
|
|
328
|
+
#
|
|
329
|
+
# THE HALVES ARE NOT SYMMETRIC. The shape half can be widened fairly freely
|
|
330
|
+
# because the verb half does the rejecting. The verb half cannot: adding `check`
|
|
331
|
+
# and `update` to the verbs turned 7 of 7 adversarial prompts in this repo's set
|
|
332
|
+
# into false positives ("check the imports", "update the function signature
|
|
333
|
+
# docs"). Widen shapes when a real miss is reported; leave the verbs alone.
|
|
334
|
+
# REMOVED: `references? to`. "find references to this symbol" is a SEMANTIC
|
|
335
|
+
# question — it needs a resolver that knows what the symbol binds to, which is
|
|
336
|
+
# lithermes:lsp, not a syntax matcher. "search for references to the old API in
|
|
337
|
+
# the docs" is worse still: prose, not source. Nothing real is lost, because
|
|
338
|
+
# "migrate the call sites to the new signature" still routes through `call
|
|
339
|
+
# sites`. The skill body now states this boundary explicitly; a router that
|
|
340
|
+
# silently outruns its own skill's declared scope is the defect this closes.
|
|
341
|
+
|
|
342
|
+
# What a vocabulary conjunction STRUCTURALLY cannot catch. Recorded because the
|
|
343
|
+
# fix for any single instance is trivial and the class is not — the next reader
|
|
344
|
+
# should extend the list knowing what extending it will never buy.
|
|
345
|
+
VOCABULARY_PREDICATE_LIMITS = (
|
|
346
|
+
("near-synonym split",
|
|
347
|
+
"A finite noun list separates requests by WORD CHOICE, not by intent. "
|
|
348
|
+
"'find all the callers' vs 'find every call site' was one instance, now "
|
|
349
|
+
"closed; 'consumers', 'dependents', 'who calls this' are the same miss "
|
|
350
|
+
"with different words. Every addition closes one instance and none of the "
|
|
351
|
+
"class."),
|
|
352
|
+
("paraphrase carrying no shape term",
|
|
353
|
+
"'where is this function used from?' is unambiguously structural and names "
|
|
354
|
+
"no term in any list. No vocabulary predicate reaches it, because there is "
|
|
355
|
+
"no noun to match. This is the largest silent gap and it is not fixable by "
|
|
356
|
+
"adding terms."),
|
|
357
|
+
("domain collision on a shared word",
|
|
358
|
+
"The same token is a syntax shape in one domain and an ordinary noun in "
|
|
359
|
+
"another. `caller` was the English case — 'find the caller\'s phone number' "
|
|
360
|
+
"routed — and it is now moot because who-terms were removed for a stronger "
|
|
361
|
+
"reason. Korean hit this harder and still stands: see "
|
|
362
|
+
"ACCEPTED_KOREAN_STRUCTURAL_RISKS, where 사용처 had to be dropped outright "
|
|
363
|
+
"because it ordinarily means card-merchant locations."),
|
|
364
|
+
("accepted misses, with the trade named",
|
|
365
|
+
"'show me the call graph' and 'list all callers' stay silent because `show` "
|
|
366
|
+
"and `list` are not search verbs, and because who-terms are out of scope "
|
|
367
|
+
"entirely. Accepted deliberately: A MISSED STRUCTURAL REQUEST COSTS THE USER "
|
|
368
|
+
"ONE REPHRASE; A FALSE POSITIVE INJECTS A SKILL INTO UNRELATED WORK. The "
|
|
369
|
+
"asymmetry of those two costs is why the verb half stays narrow."),
|
|
370
|
+
("discussing a construct vs wanting to match one",
|
|
371
|
+
"Interface nouns name an ARTIFACT the request is about (page, button, "
|
|
372
|
+
"dashboard). Compiler vocabulary names a CONCEPT the user may merely be "
|
|
373
|
+
"discussing. 'rewrite the declaration in this file' routes although it is a "
|
|
374
|
+
"single-file edit rather than a structural query. The verb half narrows "
|
|
375
|
+
"this but cannot resolve it, because the difference is in intent, not "
|
|
376
|
+
"words."),
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
# Korean. The conjunction survives translation, but the term set had to be
|
|
380
|
+
# rebuilt rather than translated — see ACCEPTED_KOREAN_STRUCTURAL_RISKS.
|
|
381
|
+
STRUCTURAL_INTENT_VERBS_KO = (
|
|
382
|
+
r"찾",
|
|
383
|
+
r"검색",
|
|
384
|
+
# 바꾸다 contracts to 바꿔 (바꾸 + 어), so the dictionary stem alone never
|
|
385
|
+
# matches the form people actually type. Both are required.
|
|
386
|
+
r"바꾸", r"바꿔",
|
|
387
|
+
r"다시\s*[써쓰]", r"재작성", r"치환", r"마이그레이션",
|
|
388
|
+
)
|
|
389
|
+
STRUCTURAL_INTENT_SHAPES_KO = (
|
|
390
|
+
r"호출부(?!서)", # 호출부서 = "calling department" — wrong domain
|
|
391
|
+
r"임포트",
|
|
392
|
+
r"선언부",
|
|
393
|
+
r"함수\s*시그니처", # bare 시그니처 is common marketing Korean
|
|
394
|
+
r"구문\s*트리",
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
ACCEPTED_KOREAN_STRUCTURAL_RISKS = (
|
|
398
|
+
("호출부 ⊂ 호출부서", "Excluded with a negative lookahead. 호출부서 is an ordinary "
|
|
399
|
+
"org-chart word ('calling department') and shares no meaning with a call site."),
|
|
400
|
+
("시그니처 requires the 함수 qualifier", "Bare 시그니처 is common consumer Korean — "
|
|
401
|
+
"시그니처 메뉴 is a restaurant's signature dish. Requiring 함수 loses bare "
|
|
402
|
+
"'시그니처를 찾아줘' in a code context and is the right trade: the false "
|
|
403
|
+
"positive is everyday speech, the loss is a phrasing with an easy alternative."),
|
|
404
|
+
("사용처 dropped entirely", "It looks like the exact counterpart of 'usages of', but "
|
|
405
|
+
"in ordinary Korean 사용처 means 'place where something is used' — 카드 사용처 is "
|
|
406
|
+
"the list of shops that take your card. No lookahead rescues it, so the term is "
|
|
407
|
+
"absent and Korean coverage relies on 호출부 instead."),
|
|
408
|
+
("임포트 ⊂ 임포트하기", "Accepted. The containment stays inside the same domain, so "
|
|
409
|
+
"'임포트하기' routing is a true positive rather than a leak."),
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
_STRUCTURAL_VERB_RE = re.compile(_term_alternation(STRUCTURAL_INTENT_VERBS), re.IGNORECASE)
|
|
413
|
+
_STRUCTURAL_SHAPE_RE = re.compile(_term_alternation(STRUCTURAL_INTENT_SHAPES), re.IGNORECASE)
|
|
414
|
+
_STRUCTURAL_VERB_KO_RE = re.compile("|".join(STRUCTURAL_INTENT_VERBS_KO))
|
|
415
|
+
_STRUCTURAL_SHAPE_KO_RE = re.compile("|".join(STRUCTURAL_INTENT_SHAPES_KO))
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
def detect_structural_intent(text: str) -> bool:
|
|
419
|
+
"""True only when a search/rewrite verb AND a syntax-shape noun both appear.
|
|
420
|
+
|
|
421
|
+
ONE conjunction, both halves load-bearing, either half satisfiable in either
|
|
422
|
+
language — Korean prompts routinely carry ASCII technical nouns.
|
|
423
|
+
"""
|
|
424
|
+
value = str(text or "")
|
|
425
|
+
has_verb = bool(_STRUCTURAL_VERB_RE.search(value)) or bool(_STRUCTURAL_VERB_KO_RE.search(value))
|
|
426
|
+
has_shape = bool(_STRUCTURAL_SHAPE_RE.search(value)) or bool(_STRUCTURAL_SHAPE_KO_RE.search(value))
|
|
427
|
+
return has_verb and has_shape
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
def detect_ui_intent(text: str) -> bool:
|
|
431
|
+
"""True only when a making verb AND a user-interface noun both appear.
|
|
432
|
+
|
|
433
|
+
ONE conjunction, not two mechanisms. Either half may be satisfied in either
|
|
434
|
+
language, because Korean prompts routinely mix in ASCII terms — "UI를
|
|
435
|
+
디자인해줘" is an English noun with a Korean verb and must route.
|
|
436
|
+
"""
|
|
437
|
+
value = str(text or "")
|
|
438
|
+
has_verb = bool(_UI_INTENT_VERB_RE.search(value)) or bool(_UI_INTENT_VERB_KO_RE.search(value))
|
|
439
|
+
has_noun = bool(_UI_INTENT_NOUN_RE.search(value)) or bool(_UI_INTENT_NOUN_KO_RE.search(value))
|
|
440
|
+
return has_verb and has_noun
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
_RUN_CONTEXT_TASK_PATTERN = re.compile(r"^task:\s*(?P<task>.+?)\s*$", re.MULTILINE)
|
|
444
|
+
|
|
445
|
+
_FENCED_CODE_RE = re.compile(r"(^|\n)(`{3,}|~{3,})[^\n]*\n.*?(?:\n\2(?=\n|$)|$)", re.DOTALL)
|
|
446
|
+
_INLINE_CODE_RE = re.compile(r"`[^`\n]*`")
|
|
447
|
+
_INDENTED_CODE_LINE_RE = re.compile(r"(?m)^(?: {4,}|\t).*$")
|
|
448
|
+
_MODE_LEAD_RE = re.compile(r"^[\s:;,\-—–]+")
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
def strip_markdown_code(text: str, *, preserve_offsets: bool = False) -> str:
|
|
452
|
+
"""Remove markdown code spans/fences before natural trigger parsing."""
|
|
453
|
+
if preserve_offsets:
|
|
454
|
+
masked = str(text or "")
|
|
455
|
+
for pattern in (_FENCED_CODE_RE, _INDENTED_CODE_LINE_RE, _INLINE_CODE_RE):
|
|
456
|
+
masked = pattern.sub(lambda match: re.sub(r"[^\n]", " ", match.group()), masked)
|
|
457
|
+
return masked
|
|
458
|
+
without_fences = _FENCED_CODE_RE.sub("\n", str(text or ""))
|
|
459
|
+
without_indented = _INDENTED_CODE_LINE_RE.sub("", without_fences)
|
|
460
|
+
return _INLINE_CODE_RE.sub(" ", without_indented)
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
def _after_mode_word(text: str, word: str) -> str | None:
|
|
464
|
+
m = re.match(rf"^\s*{re.escape(word)}(?![\w-])(?P<rest>.*)$", text, re.IGNORECASE | re.DOTALL)
|
|
465
|
+
if not m:
|
|
466
|
+
return None
|
|
467
|
+
return m.group("rest").strip()
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
def _after_semantic_family_word(text: str, word: str) -> str | None:
|
|
471
|
+
"""Match family ids only at end-of-input or before real whitespace.
|
|
472
|
+
|
|
473
|
+
Slash, backslash, dot, colon, and filename-style suffixes are data, not family
|
|
474
|
+
invocations. The stricter rule is scoped to the three imported families so it
|
|
475
|
+
does not change established punctuation handling for other LitHermes modes.
|
|
476
|
+
"""
|
|
477
|
+
m = re.match(rf"^\s*{re.escape(word)}(?=$|\s)(?P<rest>.*)$", text, re.IGNORECASE | re.DOTALL)
|
|
478
|
+
if not m:
|
|
479
|
+
return None
|
|
480
|
+
return m.group("rest").strip()
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
def _after_start_work(text: str) -> str | None:
|
|
484
|
+
m = re.match(r"^\s*start\s+work(?![\w-])(?P<rest>.*)$", text, re.IGNORECASE | re.DOTALL)
|
|
485
|
+
if not m:
|
|
486
|
+
return None
|
|
487
|
+
return m.group("rest").strip()
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
def _normalized_exact_phrase(text: str) -> str:
|
|
491
|
+
return re.sub(r"\s+", " ", text.strip()).lower()
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
def detect_lit_mode(message: str) -> NaturalLitRoute | None:
|
|
495
|
+
"""Route a natural-language LitHermes activation to a native mode.
|
|
496
|
+
|
|
497
|
+
The parser intentionally ignores code spans/fences and only treats standalone
|
|
498
|
+
`lit`/`litwork` tokens as activations. A token embedded in `/lit`,
|
|
499
|
+
`/tmp/lit.sock`, `split`, `lit-review`, or `lit_loop` is ignored; path-like
|
|
500
|
+
slash tokens elsewhere remain ordinary task text.
|
|
501
|
+
"""
|
|
502
|
+
visible = strip_markdown_code(message, preserve_offsets=True)
|
|
503
|
+
renamed = _renamed_skill_route(visible, visible, message)
|
|
504
|
+
if renamed is not None:
|
|
505
|
+
return renamed
|
|
506
|
+
for word, mode in (
|
|
507
|
+
("lit-plan", "lit-plan"),
|
|
508
|
+
("review-work", "review-work"),
|
|
509
|
+
("litgoal", "litgoal"),
|
|
510
|
+
("lit-loop", "litwork"),
|
|
511
|
+
):
|
|
512
|
+
rest = _after_mode_word(visible, word)
|
|
513
|
+
if rest is not None:
|
|
514
|
+
return NaturalLitRoute(mode=mode, objective=_clamp_task(rest), visible_message=visible)
|
|
515
|
+
start_rest = _after_mode_word(visible, "start-work")
|
|
516
|
+
if start_rest is not None:
|
|
517
|
+
block = (
|
|
518
|
+
"BLOCKED: bare `start-work` cannot switch Hermes into the native execution "
|
|
519
|
+
"command from the pre-LLM hook. Invoke `/start-work <approved-plan>` explicitly "
|
|
520
|
+
"after `/lit-plan` has produced an approved plan. No run state was created."
|
|
521
|
+
)
|
|
522
|
+
return NaturalLitRoute(
|
|
523
|
+
mode="start-work",
|
|
524
|
+
objective=_clamp_task(start_rest),
|
|
525
|
+
visible_message=visible,
|
|
526
|
+
blocked=True,
|
|
527
|
+
block_message=block,
|
|
528
|
+
)
|
|
529
|
+
for word, mode in _BARE_SKILL_PREFIXES:
|
|
530
|
+
matcher = _after_semantic_family_word if mode in _SEMANTIC_FAMILY_MODES else _after_mode_word
|
|
531
|
+
rest = matcher(visible, word)
|
|
532
|
+
if rest is not None:
|
|
533
|
+
return NaturalLitRoute(mode=mode, objective=_clamp_task(rest), visible_message=visible)
|
|
534
|
+
|
|
535
|
+
for match in LIT_PATTERN.finditer(visible):
|
|
536
|
+
token = match.group(0).lower()
|
|
537
|
+
lead = _MODE_LEAD_RE.match(visible[match.end():])
|
|
538
|
+
after_offset = match.end() + (lead.end() if lead else 0)
|
|
539
|
+
after = visible[after_offset:].strip()
|
|
540
|
+
nonleading_family_example = visible[:match.start()].strip() and any(
|
|
541
|
+
re.match(rf"^\s*{re.escape(family)}(?![\w-])", after, re.IGNORECASE)
|
|
542
|
+
for family in _SEMANTIC_FAMILY_MODES
|
|
543
|
+
)
|
|
544
|
+
if nonleading_family_example:
|
|
545
|
+
continue
|
|
546
|
+
if token == "litwork":
|
|
547
|
+
return NaturalLitRoute(mode="litwork", objective=_clamp_task(after), visible_message=visible)
|
|
548
|
+
|
|
549
|
+
renamed = _renamed_skill_route(after, visible, message, after_offset)
|
|
550
|
+
if renamed is not None:
|
|
551
|
+
return renamed
|
|
552
|
+
|
|
553
|
+
if _normalized_exact_phrase(after) in KOREAN_PROSE_NATURAL_PHRASES:
|
|
554
|
+
return NaturalLitRoute(mode="korean-prose-cleanup", visible_message=visible)
|
|
555
|
+
|
|
556
|
+
for word, mode in (
|
|
557
|
+
("litresearch", "litresearch"),
|
|
558
|
+
):
|
|
559
|
+
matcher = _after_semantic_family_word if mode in _SEMANTIC_FAMILY_MODES else _after_mode_word
|
|
560
|
+
rest = matcher(after, word)
|
|
561
|
+
if rest is not None:
|
|
562
|
+
return NaturalLitRoute(mode=mode, objective=_clamp_task(rest), visible_message=visible)
|
|
563
|
+
|
|
564
|
+
for word in ("workflow", "kanban"):
|
|
565
|
+
rest = _after_mode_word(after, word)
|
|
566
|
+
if rest is not None:
|
|
567
|
+
return NaturalLitRoute(mode="durable-workflow", objective=_clamp_task(rest), visible_message=visible)
|
|
568
|
+
|
|
569
|
+
team_rest = _after_mode_word(after, "team")
|
|
570
|
+
if team_rest is not None:
|
|
571
|
+
mode_rest = _after_mode_word(team_rest, "mode")
|
|
572
|
+
objective = mode_rest if mode_rest is not None else team_rest
|
|
573
|
+
return NaturalLitRoute(mode="kanban-team", objective=_clamp_task(objective), visible_message=visible)
|
|
574
|
+
|
|
575
|
+
start_rest = _after_start_work(after)
|
|
576
|
+
if start_rest is not None:
|
|
577
|
+
block = (
|
|
578
|
+
"BLOCKED: natural-language `lit start work` cannot switch Hermes into the "
|
|
579
|
+
"native execution command. Invoke `/start-work <approved-plan>` explicitly "
|
|
580
|
+
"after `/lit-plan` has produced an approved plan. No run state was created."
|
|
581
|
+
)
|
|
582
|
+
return NaturalLitRoute(
|
|
583
|
+
mode="start-work",
|
|
584
|
+
objective=_clamp_task(start_rest),
|
|
585
|
+
visible_message=visible,
|
|
586
|
+
blocked=True,
|
|
587
|
+
block_message=block,
|
|
588
|
+
)
|
|
589
|
+
|
|
590
|
+
for word, mode in (
|
|
591
|
+
("plan", "lit-plan"),
|
|
592
|
+
("review", "review-work"),
|
|
593
|
+
("research", "litresearch"),
|
|
594
|
+
("goal", "litgoal"),
|
|
595
|
+
*_LIT_SKILL_SUFFIXES,
|
|
596
|
+
):
|
|
597
|
+
matcher = _after_semantic_family_word if mode in _SEMANTIC_FAMILY_MODES else _after_mode_word
|
|
598
|
+
rest = matcher(after, word)
|
|
599
|
+
if rest is not None:
|
|
600
|
+
return NaturalLitRoute(mode=mode, objective=_clamp_task(rest), visible_message=visible)
|
|
601
|
+
return NaturalLitRoute(mode="litwork", objective=_clamp_task(after), visible_message=visible)
|
|
602
|
+
|
|
603
|
+
# Lowest precedence, deliberately: an explicit `lit` token or a named skill
|
|
604
|
+
# always wins. Only when nothing else matched does the UI intent conjunction
|
|
605
|
+
# get a say.
|
|
606
|
+
if detect_ui_intent(visible):
|
|
607
|
+
return NaturalLitRoute(
|
|
608
|
+
mode="frontend-ui-ux", objective=_clamp_task(visible), visible_message=visible
|
|
609
|
+
)
|
|
610
|
+
# Placed AFTER the UI conjunction deliberately. The two term sets are
|
|
611
|
+
# disjoint in practice, but on a sentence that satisfied both, the shipped
|
|
612
|
+
# and tested UI route should keep precedence rather than change behaviour.
|
|
613
|
+
if detect_structural_intent(visible):
|
|
614
|
+
return NaturalLitRoute(
|
|
615
|
+
mode="structural-search", objective=_clamp_task(visible), visible_message=visible
|
|
616
|
+
)
|
|
617
|
+
return None
|
|
618
|
+
|
|
619
|
+
def _extract_run_context_task(message: str) -> str:
|
|
620
|
+
m = _RUN_CONTEXT_TASK_PATTERN.search(message)
|
|
621
|
+
return _clamp_task(m.group("task")) if m else ""
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
# Slash-command handlers embed this legacy marker in their agent message so
|
|
625
|
+
# pre_llm_call can recognize the self-contained objective envelope and avoid
|
|
626
|
+
# duplicate routing. It is never converted into native /goal mutation: native
|
|
627
|
+
# state is user-managed and unobserved, while durable goal_* state is authoritative.
|
|
628
|
+
_BIND_GOAL_PATTERN = re.compile(
|
|
629
|
+
r"<lithermes-bind-goal>(?P<obj>.+?)</lithermes-bind-goal>", re.DOTALL
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
def _extract_bind_goal(message: str) -> str:
|
|
634
|
+
m = _BIND_GOAL_PATTERN.search(message)
|
|
635
|
+
return _clamp_task(m.group("obj")) if m else ""
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
def bind_goal_marker(objective: str) -> str:
|
|
639
|
+
"""Render the legacy objective marker recognized without native mutation."""
|
|
640
|
+
objective = _clamp_task(objective)
|
|
641
|
+
return f"<lithermes-bind-goal>{objective}</lithermes-bind-goal>" if objective else ""
|