@litfamily/litcodex 1.0.30 → 1.0.32
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/README-Ko-KR.md +13 -12
- package/README.md +13 -12
- package/TRADEMARK.md +12 -0
- package/dist/install/generated-skill-payload-hashes.d.ts +188 -82
- package/dist/install/generated-skill-payload-hashes.js +188 -82
- package/dist/install/skill-catalog.d.ts +1 -1
- package/dist/install/skill-catalog.js +12 -1
- package/dist/install/skill-resource-hashes.d.ts +1 -1
- package/dist/install/skill-resource-hashes.js +1 -1
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
- package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
- package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
- package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/directive.md +10 -4
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-adhd.md +194 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-handoff.md +2 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-hijack.md +219 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-plan.md +2 -1
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-recap.md +2 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-schematic.md +199 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/litwork.md +2 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/adhd-suggest.d.ts +10 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/adhd-suggest.js +67 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-html.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-html.js +128 -8
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-looks.d.ts +19 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-looks.js +58 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-status.d.ts +30 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-status.js +97 -7
- package/marketplace/plugins/litcodex/components/lit-loop/dist/cli.js +13 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.d.ts +2 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +8 -9
- package/marketplace/plugins/litcodex/components/lit-loop/dist/control-chars.d.ts +5 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/control-chars.js +23 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +8 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +126 -13
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hud.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hud.js +29 -13
- package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-events.d.ts +13 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-events.js +85 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-state.d.ts +55 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-state.js +227 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/live-step.d.ts +5 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/live-step.js +17 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.js +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.js +25 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-gate.d.ts +79 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-gate.js +310 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.js +5 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-persistence.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-persistence.js +38 -2
- package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-scope-roots.d.ts +7 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-scope-roots.js +76 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/redaction.js +18 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.d.ts +15 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.js +46 -9
- package/marketplace/plugins/litcodex/components/lit-loop/dist/restart-chip.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/restart-chip.js +59 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.d.ts +10 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.js +88 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.d.ts +20 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.js +94 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-look.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-look.js +41 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-redact.d.ts +3 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-redact.js +40 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-rollout.d.ts +48 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-rollout.js +292 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.d.ts +168 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.js +867 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +45 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/run-panel.js +1 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/schematic-route.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/schematic-route.js +35 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/screen-card.d.ts +3 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/screen-card.js +15 -5
- package/marketplace/plugins/litcodex/components/lit-loop/dist/session-liveness.d.ts +16 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/session-liveness.js +90 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-mention-scope.js +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/stack-hook.d.ts +8 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/stack-hook.js +57 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/statusline.js +8 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/threads.d.ts +50 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/threads.js +183 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.js +29 -5
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.d.ts +10 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.js +11 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.d.ts +139 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.js +518 -0
- package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
- package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.js +65 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
- package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
- package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
- package/marketplace/plugins/litcodex/hooks/hooks.json +24 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +6 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/components.css +414 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/fonts.json +22 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/ui.js +228 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/brand-and-imagery.md +1 -1
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/complete-contract.md +1 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/craft-floor.md +2 -2
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/default-editorial-pixel.json +15 -8
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/design-choice.md +19 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/house-styles.md +235 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/motion-guide.md +2 -2
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/probe-and-review.md +6 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/production-interview.md +2 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/slop-register.md +4 -4
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/lock-probe.mjs +196 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/page-probe.mjs +22 -4
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/probe.mjs +59 -13
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/rule-data.mjs +38 -4
- package/marketplace/plugins/litcodex/skills/lit-adhd/SKILL.md +185 -0
- package/marketplace/plugins/litcodex/skills/lit-adhd/agents/openai.yaml +6 -0
- package/marketplace/plugins/litcodex/skills/lit-adhd/references/card-examples.md +163 -0
- package/marketplace/plugins/litcodex/skills/lit-adhd/references/status-taxonomy.md +45 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +18 -7
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/style-guide.md +20 -11
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-swimlane.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree.md +3 -3
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/verifier-guide.md +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
- package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +12 -3
- package/marketplace/plugins/litcodex/skills/lit-docx/references/direction-step.md +6 -3
- package/marketplace/plugins/litcodex/skills/lit-hijack/SKILL.md +449 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/agents/openai.yaml +6 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/capture-and-provenance.md +100 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/clean-room-build.md +111 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/distil-and-licence.md +102 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/gap-and-port-design.md +125 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/parity-and-report.md +108 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/scripts/hijack.mjs +1050 -0
- package/marketplace/plugins/litcodex/skills/lit-loop/SKILL.md +13 -4
- package/marketplace/plugins/litcodex/skills/lit-plan/SKILL.md +9 -2
- package/marketplace/plugins/litcodex/skills/lit-plan/references/full-workflow.md +2 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/NOTICE +1 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +35 -8
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/SOURCE.md +21 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/anti-slop-checklist.md +5 -2
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/authoring-guide.md +3 -4
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/density-and-fill.md +20 -6
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/direction-step.md +26 -8
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/14-engineering-review-computational-brutalism-ko.md +173 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/15-launch-pitch-neo-brutalism-ko.md +154 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/16-design-lecture-bauhaus-ko.md +139 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/17-community-programme-riso-ko.md +158 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/18-public-data-briefing-newsroom-ko.md +179 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/layout-families.md +42 -27
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/title-treatments.md +31 -27
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/bauhaus.md +136 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/chalk.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/computational-brutalism.md +145 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/neo-brutalism.md +155 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/newsroom.md +141 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/riso.md +133 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/signal.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/studio.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/compile-deck.js +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/craft_extras.py +136 -94
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/embed_fonts.py +13 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-pack.js +386 -579
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/office-run.mjs +2 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/qa_deck.py +7 -13
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/render_pages.py +124 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +100 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-recap/SKILL.md +2 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/SKILL.md +198 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/agents/openai.yaml +6 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/cutaway-outputs.md +70 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/isometric-craft.md +101 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/journal-figures.md +72 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/kit-api.md +134 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/pfd-and-layout.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/pid-drafting.md +103 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/pid-symbols.md +163 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/verification.md +100 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/doctor.mjs +57 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/fonts.mjs +28 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/png.mjs +132 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/route.mjs +218 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/motion.mjs +129 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/qa.mjs +92 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/render.mjs +233 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/scaffold.mjs +60 -0
- package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +34 -8
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +18 -14
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +12 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/assets.mjs +388 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/blender/runner.py +221 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/blender.mjs +132 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/board.mjs +142 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/constants.mjs +6 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-assets.mjs +7 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-capture.mjs +8 -7
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-init.js +14 -2
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-treatment.mjs +38 -3
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover.mjs +19 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/driver.mjs +8 -8
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/gallery.mjs +147 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/house.mjs +45 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/image.mjs +89 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/look.mjs +58 -25
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/runtime.mjs +59 -14
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/safe-read.mjs +32 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/scaffold.mjs +208 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/score.mjs +668 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/sound.mjs +174 -31
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-gate.mjs +45 -3
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-kit.js +99 -1
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.js +8 -1
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.mjs +180 -11
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-render.mjs +42 -12
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-worker.mjs +7 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage.mjs +96 -10
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/styles.mjs +233 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/treatment.mjs +291 -14
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/hero-3d/expected.json +33 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/cover.md +44 -7
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/depth.md +156 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/design-choice.md +22 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/quality-gate.md +29 -7
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/runtime.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/sound.md +87 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/stage.md +19 -7
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/studio.md +246 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/style-bibles.md +2 -2
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/treatment.md +41 -21
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/render.mjs +51 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/paper.json +185 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/swiss-signal.json +188 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/terminalcore.json +182 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/tidal.json +187 -0
- package/marketplace/plugins/litcodex/skills/litresearch/SKILL.md +7 -0
- package/marketplace/plugins/litcodex/skills/litwork/SKILL.md +2 -1
- package/marketplace/plugins/litcodex/skills/readme-studio/SKILL.md +10 -0
- package/marketplace/plugins/litcodex/skills/review-work/SKILL.md +7 -1
- package/marketplace/plugins/litcodex/skills/start-work/SKILL.md +11 -1
- package/node_modules/@litcodex/lit-loop/directive.md +10 -4
- package/node_modules/@litcodex/lit-loop/directives/lit-adhd.md +194 -0
- package/node_modules/@litcodex/lit-loop/directives/lit-handoff.md +2 -0
- package/node_modules/@litcodex/lit-loop/directives/lit-hijack.md +219 -0
- package/node_modules/@litcodex/lit-loop/directives/lit-plan.md +2 -1
- package/node_modules/@litcodex/lit-loop/directives/lit-recap.md +2 -0
- package/node_modules/@litcodex/lit-loop/directives/lit-schematic.md +199 -0
- package/node_modules/@litcodex/lit-loop/directives/litwork.md +2 -1
- package/node_modules/@litcodex/lit-loop/dist/adhd-suggest.d.ts +10 -0
- package/node_modules/@litcodex/lit-loop/dist/adhd-suggest.js +67 -0
- package/node_modules/@litcodex/lit-loop/dist/card-html.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/card-html.js +128 -8
- package/node_modules/@litcodex/lit-loop/dist/card-looks.d.ts +19 -0
- package/node_modules/@litcodex/lit-loop/dist/card-looks.js +58 -0
- package/node_modules/@litcodex/lit-loop/dist/card-status.d.ts +30 -0
- package/node_modules/@litcodex/lit-loop/dist/card-status.js +97 -7
- package/node_modules/@litcodex/lit-loop/dist/cli.js +13 -3
- package/node_modules/@litcodex/lit-loop/dist/codex-hook.d.ts +2 -0
- package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +8 -9
- package/node_modules/@litcodex/lit-loop/dist/control-chars.d.ts +5 -0
- package/node_modules/@litcodex/lit-loop/dist/control-chars.js +23 -0
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +8 -0
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +126 -13
- package/node_modules/@litcodex/lit-loop/dist/hud.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/hud.js +29 -13
- package/node_modules/@litcodex/lit-loop/dist/lane-events.d.ts +13 -0
- package/node_modules/@litcodex/lit-loop/dist/lane-events.js +85 -0
- package/node_modules/@litcodex/lit-loop/dist/lane-state.d.ts +55 -0
- package/node_modules/@litcodex/lit-loop/dist/lane-state.js +227 -0
- package/node_modules/@litcodex/lit-loop/dist/live-step.d.ts +5 -1
- package/node_modules/@litcodex/lit-loop/dist/live-step.js +17 -1
- package/node_modules/@litcodex/lit-loop/dist/markers.d.ts +6 -0
- package/node_modules/@litcodex/lit-loop/dist/markers.js +6 -0
- package/node_modules/@litcodex/lit-loop/dist/modes.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/modes.js +25 -1
- package/node_modules/@litcodex/lit-loop/dist/motion-gate.d.ts +79 -0
- package/node_modules/@litcodex/lit-loop/dist/motion-gate.js +310 -0
- package/node_modules/@litcodex/lit-loop/dist/motion-route.js +5 -1
- package/node_modules/@litcodex/lit-loop/dist/plan-persistence.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/plan-persistence.js +38 -2
- package/node_modules/@litcodex/lit-loop/dist/plan-scope-roots.d.ts +7 -0
- package/node_modules/@litcodex/lit-loop/dist/plan-scope-roots.js +76 -0
- package/node_modules/@litcodex/lit-loop/dist/redaction.js +18 -0
- package/node_modules/@litcodex/lit-loop/dist/reentry.d.ts +15 -0
- package/node_modules/@litcodex/lit-loop/dist/reentry.js +46 -9
- package/node_modules/@litcodex/lit-loop/dist/restart-chip.d.ts +6 -0
- package/node_modules/@litcodex/lit-loop/dist/restart-chip.js +59 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-cli.d.ts +10 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-cli.js +88 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-go.d.ts +20 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-go.js +94 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-look.d.ts +6 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-look.js +41 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-redact.d.ts +3 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-redact.js +40 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-rollout.d.ts +48 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-rollout.js +292 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind.d.ts +168 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind.js +867 -0
- package/node_modules/@litcodex/lit-loop/dist/route-heads.js +45 -3
- package/node_modules/@litcodex/lit-loop/dist/run-panel.js +1 -0
- package/node_modules/@litcodex/lit-loop/dist/schematic-route.d.ts +6 -0
- package/node_modules/@litcodex/lit-loop/dist/schematic-route.js +35 -0
- package/node_modules/@litcodex/lit-loop/dist/screen-card.d.ts +3 -0
- package/node_modules/@litcodex/lit-loop/dist/screen-card.js +15 -5
- package/node_modules/@litcodex/lit-loop/dist/session-liveness.d.ts +16 -0
- package/node_modules/@litcodex/lit-loop/dist/session-liveness.js +90 -0
- package/node_modules/@litcodex/lit-loop/dist/skill-mention-scope.js +6 -0
- package/node_modules/@litcodex/lit-loop/dist/stack-hook.d.ts +8 -0
- package/node_modules/@litcodex/lit-loop/dist/stack-hook.js +57 -0
- package/node_modules/@litcodex/lit-loop/dist/statusline.js +8 -3
- package/node_modules/@litcodex/lit-loop/dist/threads.d.ts +50 -0
- package/node_modules/@litcodex/lit-loop/dist/threads.js +183 -0
- package/node_modules/@litcodex/lit-loop/dist/trigger.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/trigger.js +29 -5
- package/node_modules/@litcodex/lit-loop/dist/workflow-map.d.ts +10 -0
- package/node_modules/@litcodex/lit-loop/dist/workflow-map.js +11 -1
- package/node_modules/@litcodex/lit-loop/dist/workflow-stack.d.ts +139 -0
- package/node_modules/@litcodex/lit-loop/dist/workflow-stack.js +518 -0
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/node_modules/@litcodex/lit-loop/skills/lit-adhd/SKILL.md +185 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-hijack/SKILL.md +449 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-loop/SKILL.md +13 -4
- package/node_modules/@litcodex/lit-loop/skills/lit-plan/SKILL.md +9 -2
- package/node_modules/@litcodex/lit-loop/skills/lit-recap/SKILL.md +2 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-schematic/SKILL.md +198 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +34 -8
- package/node_modules/@litcodex/lit-loop/skills/litresearch/SKILL.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/litwork/SKILL.md +2 -1
- package/node_modules/@litcodex/lit-loop/skills/review-work/SKILL.md +7 -1
- package/node_modules/@litcodex/lit-loop/skills/start-work/SKILL.md +11 -1
- package/package.json +3 -2
- package/readme-assets/badge-version.svg +1 -1
- package/readme-assets/skills/lit-adhd.webp +0 -0
- package/readme-assets/skills/lit-hijack.webp +0 -0
- package/readme-assets/skills/lit-schematic.webp +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// src/threads.ts — the threads of a session as the card and the text HUD draw them.
|
|
2
|
+
//
|
|
3
|
+
// A thread is a frame of the session's workflow stack, a child agent (lane) running under its top frame, or
|
|
4
|
+
// the top frame of another session of the same project that moved lately or whose liveness record is fresh
|
|
5
|
+
// (running first, then idle; named `<skill> · <pane>` when herdr gave a pane). Each takes its `k/n` from the
|
|
6
|
+
// first source that really knows it: the count the frame recorded, the start-work run it drives, the
|
|
7
|
+
// checkboxes of the plan it works from, the open goal's criteria, the main thread's own `update_plan` list
|
|
8
|
+
// (top frame only), and for a lane its own `update_plan`. A gauge is drawn only when both numbers are real;
|
|
9
|
+
// otherwise the row says what is known in words (`step 4`, `3 steps`, `starting`) and the desktop card adds
|
|
10
|
+
// a moving pulse. No placeholder (`?/?`, `[???]`, `k/?`) is ever produced.
|
|
11
|
+
//
|
|
12
|
+
// `readThreads` returns null while the stack alone describes the work (the card's own paused-work row then
|
|
13
|
+
// stays as it was): it fires only when a lane or another session is live. At most THREAD_ROWS rows are kept
|
|
14
|
+
// (PARALLEL_ROWS for lanes under a deep chain); the rest are counted as `+N more`. Pure but for its reads.
|
|
15
|
+
import { LANE_IDLE_MS, readLanes, readMainPlan } from "./lane-state.js";
|
|
16
|
+
import { planProgress } from "./workflow-map.js";
|
|
17
|
+
import { frameNote, gaugeBar, pausedSpine, readOtherStacks, readStack } from "./workflow-stack.js";
|
|
18
|
+
/** The card shows at most this many thread rows; the rest are counted as `+N more`. */
|
|
19
|
+
export const THREAD_ROWS = 4;
|
|
20
|
+
/** A deep chain still leaves this many rows for the lanes under it. */
|
|
21
|
+
export const PARALLEL_ROWS = 3;
|
|
22
|
+
const SHORT_SESSION = 8;
|
|
23
|
+
const LOOP_SKILLS = ["lit-loop", "litgoal"];
|
|
24
|
+
const WORK_SKILLS = ["start-work", "litwork"];
|
|
25
|
+
function gaugeOf(counts) {
|
|
26
|
+
if (counts === null || counts.total <= 0)
|
|
27
|
+
return null;
|
|
28
|
+
return `${gaugeBar(Math.min(counts.done, counts.total), counts.total)} ${counts.done}/${counts.total}`;
|
|
29
|
+
}
|
|
30
|
+
/** The first source that knows a frame's `k/n`, or null. */
|
|
31
|
+
function frameCounts(frame, cwd, signals, mainPlan) {
|
|
32
|
+
if (frame.total !== undefined && frame.total > 0)
|
|
33
|
+
return { done: frame.n ?? 0, total: frame.total };
|
|
34
|
+
const work = signals?.work ?? null;
|
|
35
|
+
const worksPlan = frame.skill !== null &&
|
|
36
|
+
(WORK_SKILLS.includes(frame.skill) || (frame.family === "main" && frame.stage === "work"));
|
|
37
|
+
if (work !== null && work.total > 0 && worksPlan)
|
|
38
|
+
return { done: work.done, total: work.total };
|
|
39
|
+
const plan = frame.ref === undefined ? null : planProgress(cwd, frame.ref.plan);
|
|
40
|
+
if (plan !== null)
|
|
41
|
+
return plan;
|
|
42
|
+
const goals = signals?.goals ?? null;
|
|
43
|
+
if (goals !== null &&
|
|
44
|
+
goals.total > 0 &&
|
|
45
|
+
(frame.family === "loop" || (frame.skill !== null && LOOP_SKILLS.includes(frame.skill))))
|
|
46
|
+
return { done: goals.done, total: goals.total };
|
|
47
|
+
return mainPlan;
|
|
48
|
+
}
|
|
49
|
+
function frameRow(frame, key, counts, active, blocked) {
|
|
50
|
+
const gauge = gaugeOf(counts);
|
|
51
|
+
return {
|
|
52
|
+
key,
|
|
53
|
+
kind: "frame",
|
|
54
|
+
name: frame.skill ?? frame.family ?? "work",
|
|
55
|
+
stage: frame.stage,
|
|
56
|
+
gauge,
|
|
57
|
+
note: gauge === null ? frameNote(frame) : "",
|
|
58
|
+
state: frame.done === true ? "done" : frame.status === "paused" ? "paused" : blocked ? "blocked" : "running",
|
|
59
|
+
active,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function laneRow(lane, now) {
|
|
63
|
+
const gauge = gaugeOf(lane.plan);
|
|
64
|
+
const steps = lane.steps === 1 ? "1 step" : `${lane.steps} steps`;
|
|
65
|
+
return {
|
|
66
|
+
key: `lane-${lane.agentId}`,
|
|
67
|
+
kind: "lane",
|
|
68
|
+
name: lane.name ?? `${lane.kind ?? "agent"} ${lane.agentId.slice(-4)}`,
|
|
69
|
+
stage: lane.kind !== null && lane.kind !== "default" && lane.name !== null ? lane.kind : null,
|
|
70
|
+
gauge,
|
|
71
|
+
note: gauge === null ? (lane.steps > 0 ? steps : "starting") : "",
|
|
72
|
+
state: now - lane.at > LANE_IDLE_MS ? "idle" : "running",
|
|
73
|
+
active: false,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The thread rows of a session, or null while it has no lane and no other live session (the stack row
|
|
78
|
+
* then says what there is to say). `signals` are the session's saved work state, read once by the caller.
|
|
79
|
+
*/
|
|
80
|
+
export function readThreads(cwd, sessionId, now, signals) {
|
|
81
|
+
try {
|
|
82
|
+
const stack = readStack(cwd, sessionId);
|
|
83
|
+
const lanes = readLanes(cwd, sessionId, now);
|
|
84
|
+
const others = readOtherStacks(cwd, sessionId, now);
|
|
85
|
+
if (lanes.length === 0 && others.length === 0)
|
|
86
|
+
return null;
|
|
87
|
+
const frames = stack.frames;
|
|
88
|
+
if (frames.length + lanes.length + others.length < 2)
|
|
89
|
+
return null;
|
|
90
|
+
const mainPlan = readMainPlan(cwd, sessionId);
|
|
91
|
+
const chain = frames.map((frame, index) => {
|
|
92
|
+
const active = index === frames.length - 1;
|
|
93
|
+
const blocked = frame.skill === "start-work" && signals?.work?.status === "paused";
|
|
94
|
+
return frameRow(frame, `frame-${index}`, frameCounts(frame, cwd, signals, active ? mainPlan : null), active, blocked);
|
|
95
|
+
});
|
|
96
|
+
const laneRows = lanes.map((lane) => laneRow(lane, now));
|
|
97
|
+
const otherRows = others.map((other) => {
|
|
98
|
+
const top = other.frames.at(-1);
|
|
99
|
+
const row = frameRow(top, `session-${other.id.slice(0, SHORT_SESSION)}`, frameCounts(top, cwd, null, null), false, false);
|
|
100
|
+
return {
|
|
101
|
+
...row,
|
|
102
|
+
// A session whose turn has closed waits for its person, so it reads idle rather than running.
|
|
103
|
+
...(other.liveness === "idle" && row.state === "running" ? { state: "idle" } : {}),
|
|
104
|
+
...(other.pane === null ? {} : { name: `${row.name} · ${other.pane}` }),
|
|
105
|
+
kind: "session",
|
|
106
|
+
session: other.id.slice(0, SHORT_SESSION),
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
const room = Math.max(PARALLEL_ROWS, THREAD_ROWS - chain.length);
|
|
110
|
+
const keptLanes = laneRows.slice(0, room);
|
|
111
|
+
const keptOthers = otherRows.slice(0, Math.max(0, room - keptLanes.length));
|
|
112
|
+
return {
|
|
113
|
+
chain,
|
|
114
|
+
lanes: keptLanes,
|
|
115
|
+
others: keptOthers,
|
|
116
|
+
laneCount: laneRows.length,
|
|
117
|
+
more: laneRows.length + otherRows.length - keptLanes.length - keptOthers.length,
|
|
118
|
+
back: pausedSpine(stack) !== null,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// ── Text ────────────────────────────────────────────────────────────────────
|
|
126
|
+
/** Each state's glyph is ASCII or a plain geometric mark, and the state word always rides beside it. */
|
|
127
|
+
const STATE_GLYPH = {
|
|
128
|
+
running: "●",
|
|
129
|
+
paused: "|",
|
|
130
|
+
blocked: "!",
|
|
131
|
+
idle: "-",
|
|
132
|
+
done: "✓",
|
|
133
|
+
};
|
|
134
|
+
/** `3 lanes in parallel`, `1 lane in parallel`. */
|
|
135
|
+
export function forkLabel(laneCount) {
|
|
136
|
+
return `${laneCount} ${laneCount === 1 ? "lane" : "lanes"} in parallel`;
|
|
137
|
+
}
|
|
138
|
+
function rowText(row, lead, nameWidth) {
|
|
139
|
+
const name = row.name.length >= nameWidth ? row.name : row.name.padEnd(nameWidth);
|
|
140
|
+
const tail = row.gauge ?? row.note;
|
|
141
|
+
const parts = [`${lead}${STATE_GLYPH[row.state]} ${name}`];
|
|
142
|
+
if (row.stage !== null)
|
|
143
|
+
parts.push(row.stage);
|
|
144
|
+
if (tail !== "")
|
|
145
|
+
parts.push(tail);
|
|
146
|
+
parts.push(row.state);
|
|
147
|
+
if (row.session !== undefined)
|
|
148
|
+
parts.push(`· other session ${row.session}`);
|
|
149
|
+
return parts.join(" ");
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The thread rows as plain text, parent first, each child under the one before it; lanes hang under the top
|
|
153
|
+
* frame with a fork line over them when two or more run in parallel; other sessions come last.
|
|
154
|
+
*
|
|
155
|
+
* | lit-loop WORK [▉▉░░░░░░░░] 3/6 paused
|
|
156
|
+
* └─ ● lit-brainstorm interview step 2 running · back: lit continue
|
|
157
|
+
* ┬ 3 lanes in parallel
|
|
158
|
+
* ├─ ● Aquinas [▉▉░░░] 2/5 running
|
|
159
|
+
* ├─ ● Lagrange 3 steps running
|
|
160
|
+
* └─ ● Hume starting running
|
|
161
|
+
*/
|
|
162
|
+
export function threadLines(view) {
|
|
163
|
+
const rows = [...view.chain, ...view.lanes, ...view.others];
|
|
164
|
+
const nameWidth = Math.min(18, Math.max(0, ...rows.map((row) => row.name.length)));
|
|
165
|
+
const lines = [];
|
|
166
|
+
view.chain.forEach((row, index) => {
|
|
167
|
+
const lead = index === 0 ? "" : `${" ".repeat(index - 1)}└─ `;
|
|
168
|
+
const back = view.back && index === view.chain.length - 1 ? " · back: lit continue" : "";
|
|
169
|
+
lines.push(`${rowText(row, lead, nameWidth)}${back}`);
|
|
170
|
+
});
|
|
171
|
+
const under = " ".repeat(Math.max(0, view.chain.length - 1));
|
|
172
|
+
if (view.laneCount >= 2)
|
|
173
|
+
lines.push(`${under}┬ ${forkLabel(view.laneCount)}`);
|
|
174
|
+
view.lanes.forEach((row, index) => {
|
|
175
|
+
const branch = view.laneCount >= 2 ? (index === view.lanes.length - 1 ? "└─ " : "├─ ") : view.chain.length > 0 ? "└─ " : "";
|
|
176
|
+
lines.push(rowText(row, `${under}${branch}`, nameWidth));
|
|
177
|
+
});
|
|
178
|
+
for (const row of view.others)
|
|
179
|
+
lines.push(rowText(row, "", nameWidth));
|
|
180
|
+
if (view.more > 0 && lines.length > 0)
|
|
181
|
+
lines[lines.length - 1] += ` +${view.more} more`;
|
|
182
|
+
return lines;
|
|
183
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The accepted bounded lit-family tokens, longest-first (ordering is load-bearing — see below). */
|
|
2
|
-
export type LitTriggerToken = "lit-comprehend" | "lit-brainstorm" | "deep-interview" | "lit-crucible" | "lit-init" | "start-work" | "review-work" | "litresearch" | "lit-recap" | "lit-loop" | "lit-plan" | "litcodex" | "litgoal" | "litwork" | "lit";
|
|
2
|
+
export type LitTriggerToken = "lit-comprehend" | "lit-brainstorm" | "lit-schematic" | "lit-hijack" | "lit-adhd" | "deep-interview" | "lit-crucible" | "lit-init" | "start-work" | "review-work" | "litresearch" | "lit-recap" | "lit-loop" | "lit-plan" | "litcodex" | "litgoal" | "litwork" | "lit";
|
|
3
3
|
/**
|
|
4
4
|
* Frozen tuple of the accepted tokens in match-priority (longest-first) order.
|
|
5
5
|
* Exported so tests and the mode router (modes.ts) can enumerate without re-deriving.
|
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
// Recap aliases (`litrecap` / `recap` / `리캡`) normalize to the single `lit-recap` token.
|
|
9
9
|
// The bare `comprehend` alias normalizes to the `lit-comprehend` token. `lit` followed by an ideation
|
|
10
10
|
// word (brainstorm, brainstorming, ideation, ideate, idea, ideas) routes to `lit-brainstorm`; those words
|
|
11
|
-
// never route without the `lit` in front.
|
|
11
|
+
// never route without the `lit` in front. `lit schematic` and the glued `lit-schematic` route to the drawing
|
|
12
|
+
// skill; a bare `lit` with a P&ID, PFD or cutaway request reaches it through schematic-route.ts. `lit hijack`,
|
|
13
|
+
// `lit hijacking`, `lit 하이재킹`, `lit 하이잭` and the glued `lit-hijack` route to the porting skill; the route
|
|
14
|
+
// word has to sit directly after `lit`, so "lit debug the session hijack" stays elsewhere. `lit adhd`, `lit rewind`
|
|
15
|
+
// and the glued `lit-adhd` / `lit-rewind` route to the cross-session brief; the word has to end at a boundary, so
|
|
16
|
+
// "lit adhder" and "lit rewinding" keep their ordinary routes. Rejects
|
|
12
17
|
// every substring collision (`split`, `literal`, `litmus`, `lithium`, `glitter`, `flit`, `slit`,
|
|
13
18
|
// `litter`, `recapture`, …) while respecting Korean (Hangul) and English boundaries.
|
|
14
19
|
//
|
|
@@ -25,6 +30,9 @@ import { renamedSkillId } from "./skill-renames.js";
|
|
|
25
30
|
export const LIT_TRIGGER_TOKENS = Object.freeze([
|
|
26
31
|
"lit-comprehend",
|
|
27
32
|
"lit-brainstorm",
|
|
33
|
+
"lit-schematic",
|
|
34
|
+
"lit-hijack",
|
|
35
|
+
"lit-adhd",
|
|
28
36
|
"deep-interview",
|
|
29
37
|
"lit-crucible",
|
|
30
38
|
"lit-init",
|
|
@@ -57,7 +65,7 @@ export const LIT_TRIGGER_TOKENS = Object.freeze([
|
|
|
57
65
|
* (they are not members of the token union).
|
|
58
66
|
* No nested quantifiers / no backreferences ⇒ ReDoS-free.
|
|
59
67
|
*/
|
|
60
|
-
export const LIT_TRIGGER_PATTERN = /(?:^|[^\p{L}\p{N}_])(lit-comprehend|lit-brainstorm|deep-interview|lit-crucible|lit-init|hyperplan|init-deep|start-work|review-work|litresearch|comprehend|lit-recap|lit-loop|lit-plan|litcodex|litrecap|litgoal|litwork|recap|리캡|lit)(?![\p{L}\p{N}_-])/iu;
|
|
68
|
+
export const LIT_TRIGGER_PATTERN = /(?:^|[^\p{L}\p{N}_])(lit-comprehend|lit-brainstorm|lit-schematic|lit-hijack|lit-rewind|lit-adhd|deep-interview|lit-crucible|lit-init|hyperplan|init-deep|start-work|review-work|litresearch|comprehend|lit-recap|lit-loop|lit-plan|litcodex|litrecap|litgoal|litwork|recap|리캡|lit)(?![\p{L}\p{N}_-])/iu;
|
|
61
69
|
const NOT_A_STRING = "lit trigger: prompt must be a string";
|
|
62
70
|
/**
|
|
63
71
|
* Returns true iff `prompt` contains at least one bounded lit trigger.
|
|
@@ -91,7 +99,7 @@ export function matchLitTrigger(prompt) {
|
|
|
91
99
|
return { token: START_WORK, raw: explicitStartWork, index: 0 };
|
|
92
100
|
}
|
|
93
101
|
const searchable = maskMarkdownCode(prompt);
|
|
94
|
-
const scan = /(?:^|[^\p{L}\p{N}_])(lit-comprehend|lit-brainstorm|deep-interview|lit-crucible|lit-init|hyperplan|init-deep|start-work|review-work|litresearch|comprehend|lit-recap|lit-loop|lit-plan|litcodex|litrecap|litgoal|litwork|recap|리캡|lit)(?![\p{L}\p{N}_-])/giu;
|
|
102
|
+
const scan = /(?:^|[^\p{L}\p{N}_])(lit-comprehend|lit-brainstorm|lit-schematic|lit-hijack|lit-rewind|lit-adhd|deep-interview|lit-crucible|lit-init|hyperplan|init-deep|start-work|review-work|litresearch|comprehend|lit-recap|lit-loop|lit-plan|litcodex|litrecap|litgoal|litwork|recap|리캡|lit)(?![\p{L}\p{N}_-])/giu;
|
|
95
103
|
for (const m of searchable.matchAll(scan)) {
|
|
96
104
|
const raw = m[1];
|
|
97
105
|
if (raw === undefined) {
|
|
@@ -104,7 +112,9 @@ export function matchLitTrigger(prompt) {
|
|
|
104
112
|
? "lit-recap"
|
|
105
113
|
: lowered === "comprehend"
|
|
106
114
|
? "lit-comprehend"
|
|
107
|
-
:
|
|
115
|
+
: lowered === "lit-rewind"
|
|
116
|
+
? "lit-adhd"
|
|
117
|
+
: (renamedSkillId(lowered) ?? lowered);
|
|
108
118
|
if (isSlashCommandOrPathToken(prompt, index, token)) {
|
|
109
119
|
if (index === 1) {
|
|
110
120
|
return null;
|
|
@@ -176,7 +186,12 @@ function explicitStartWorkPrefix(prompt) {
|
|
|
176
186
|
function naturalPhraseAfterLit(prompt, searchable, index, rawLength) {
|
|
177
187
|
const start = index + rawLength;
|
|
178
188
|
const rest = searchable.slice(start);
|
|
179
|
-
|
|
189
|
+
// Korean route words take a particle ("하이재킹을"), so they use a boundary that only blocks Latin word characters.
|
|
190
|
+
const hangul = /^(\s+)(하이재킹|하이잭)(?![A-Za-z0-9_-])/u.exec(rest);
|
|
191
|
+
if (hangul?.[1] !== undefined && hangul[2] !== undefined) {
|
|
192
|
+
return { token: "lit-hijack", raw: prompt.slice(index, start + hangul[1].length + hangul[2].length), index };
|
|
193
|
+
}
|
|
194
|
+
const m = /^(\s+)(start\s+work|deep\s+interview|lit-brainstorm|lit-schematic|lit-hijack|lit-adhd|lit-rewind|lit-crucible|lit-init|hyperplan|init-deep|comprehend|brainstorming|brainstorm|ideation|ideate|ideas?|schematic|hijacking|hijack|adhd|rewind|plan|review|research|goal|recap)(?![\p{L}\p{N}_-])/iu.exec(rest);
|
|
180
195
|
if (m === null || m[1] === undefined || m[2] === undefined) {
|
|
181
196
|
return null;
|
|
182
197
|
}
|
|
@@ -185,6 +200,15 @@ function naturalPhraseAfterLit(prompt, searchable, index, rawLength) {
|
|
|
185
200
|
"start work": "start-work",
|
|
186
201
|
"deep interview": "deep-interview",
|
|
187
202
|
"lit-brainstorm": "lit-brainstorm",
|
|
203
|
+
"lit-schematic": "lit-schematic",
|
|
204
|
+
schematic: "lit-schematic",
|
|
205
|
+
"lit-hijack": "lit-hijack",
|
|
206
|
+
hijacking: "lit-hijack",
|
|
207
|
+
hijack: "lit-hijack",
|
|
208
|
+
"lit-adhd": "lit-adhd",
|
|
209
|
+
"lit-rewind": "lit-adhd",
|
|
210
|
+
adhd: "lit-adhd",
|
|
211
|
+
rewind: "lit-adhd",
|
|
188
212
|
"lit-crucible": "lit-crucible",
|
|
189
213
|
hyperplan: "lit-crucible",
|
|
190
214
|
"lit-init": "lit-init",
|
|
@@ -26,6 +26,16 @@ export interface StopContext {
|
|
|
26
26
|
* `## Todos` or `## Final verification wave` section only rows inside those sections count.
|
|
27
27
|
*/
|
|
28
28
|
export declare function countPlanRows(markdown: string): Progress;
|
|
29
|
+
/** Done and total checkbox rows of a project-relative plan file; null when it cannot be read or holds none. */
|
|
30
|
+
export declare function planProgress(repoRoot: string, rel: string): {
|
|
31
|
+
readonly done: number;
|
|
32
|
+
readonly total: number;
|
|
33
|
+
} | null;
|
|
34
|
+
/** The counted checkbox rows in order, as start-work reads them. */
|
|
35
|
+
export declare function planRows(markdown: string): {
|
|
36
|
+
readonly done: boolean;
|
|
37
|
+
readonly label: string;
|
|
38
|
+
}[];
|
|
29
39
|
/** One cell per task, at most ten; a partly done plan never draws as full or empty. */
|
|
30
40
|
export declare function progressBar(done: number, total: number): string;
|
|
31
41
|
/**
|
|
@@ -96,8 +96,18 @@ export function countPlanRows(markdown) {
|
|
|
96
96
|
next: rows.find((row) => !row.done)?.label ?? null,
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
+
/** Done and total checkbox rows of a project-relative plan file; null when it cannot be read or holds none. */
|
|
100
|
+
export function planProgress(repoRoot, rel) {
|
|
101
|
+
if (typeof repoRoot !== "string" || !isAbsolute(repoRoot) || rel.includes("..") || isAbsolute(rel))
|
|
102
|
+
return null;
|
|
103
|
+
const text = readText(repoRoot, join(repoRoot, rel));
|
|
104
|
+
if (text === null)
|
|
105
|
+
return null;
|
|
106
|
+
const { done, total } = countPlanRows(text);
|
|
107
|
+
return total > 0 ? { done, total } : null;
|
|
108
|
+
}
|
|
99
109
|
/** The counted checkbox rows in order, as start-work reads them. */
|
|
100
|
-
function planRows(markdown) {
|
|
110
|
+
export function planRows(markdown) {
|
|
101
111
|
const lines = markdown.split(/\r?\n/);
|
|
102
112
|
const visible = [];
|
|
103
113
|
let fence = null;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export declare const STACK_DIR = ".litcodex/workflow-stack";
|
|
2
|
+
export declare const MAX_FRAMES = 3;
|
|
3
|
+
export declare const MAX_HISTORY = 20;
|
|
4
|
+
export declare const MAX_STACK_BYTES: number;
|
|
5
|
+
/** A frame nobody touched for this long is dropped on the next event. */
|
|
6
|
+
export declare const STACK_DROP_MS: number;
|
|
7
|
+
/** Disciplines that only read: they neither pause the work under them nor appear as a frame. */
|
|
8
|
+
export declare const READ_ONLY_DISCIPLINES: readonly string[];
|
|
9
|
+
export declare const WORKFLOW_FAMILIES: Readonly<Record<string, readonly string[]>>;
|
|
10
|
+
export type FrameStatus = "active" | "paused";
|
|
11
|
+
export type FrameRole = "spine" | "side";
|
|
12
|
+
export interface StackFrame {
|
|
13
|
+
readonly skill: string | null;
|
|
14
|
+
readonly family: string | null;
|
|
15
|
+
readonly stage: string | null;
|
|
16
|
+
readonly role: FrameRole;
|
|
17
|
+
readonly status: FrameStatus;
|
|
18
|
+
readonly n?: number;
|
|
19
|
+
readonly total?: number;
|
|
20
|
+
readonly unit?: string;
|
|
21
|
+
readonly done?: boolean;
|
|
22
|
+
readonly ref?: {
|
|
23
|
+
readonly plan: string;
|
|
24
|
+
};
|
|
25
|
+
readonly verdicts: Readonly<Record<string, string>>;
|
|
26
|
+
readonly at: string;
|
|
27
|
+
readonly pausedAt?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface StackHistoryEntry {
|
|
30
|
+
readonly event: string;
|
|
31
|
+
readonly skill: string | null;
|
|
32
|
+
readonly at: string;
|
|
33
|
+
}
|
|
34
|
+
export interface WorkflowStack {
|
|
35
|
+
readonly version: 1;
|
|
36
|
+
readonly sessionId: string | null;
|
|
37
|
+
readonly frames: readonly StackFrame[];
|
|
38
|
+
readonly history: readonly StackHistoryEntry[];
|
|
39
|
+
}
|
|
40
|
+
export type StackTransitionType = "started" | "paused" | "resumed" | "side.done" | "finished" | "dropped";
|
|
41
|
+
export interface StackTransition {
|
|
42
|
+
readonly type: StackTransitionType;
|
|
43
|
+
readonly skill: string | null;
|
|
44
|
+
readonly stage: string | null;
|
|
45
|
+
readonly n?: number;
|
|
46
|
+
readonly total?: number;
|
|
47
|
+
}
|
|
48
|
+
interface StageFields {
|
|
49
|
+
readonly family?: string;
|
|
50
|
+
readonly stage?: string;
|
|
51
|
+
readonly n?: number;
|
|
52
|
+
readonly total?: number;
|
|
53
|
+
readonly unit?: string;
|
|
54
|
+
readonly done?: boolean;
|
|
55
|
+
readonly verdicts?: Readonly<Record<string, string>>;
|
|
56
|
+
readonly ref?: {
|
|
57
|
+
readonly plan?: string;
|
|
58
|
+
};
|
|
59
|
+
readonly scope?: string;
|
|
60
|
+
}
|
|
61
|
+
export type StackEvent = {
|
|
62
|
+
readonly type: "start";
|
|
63
|
+
readonly skill: string;
|
|
64
|
+
readonly ref?: {
|
|
65
|
+
readonly plan?: string;
|
|
66
|
+
};
|
|
67
|
+
readonly restart?: boolean;
|
|
68
|
+
} | {
|
|
69
|
+
readonly type: "continue";
|
|
70
|
+
} | ({
|
|
71
|
+
readonly type: "move";
|
|
72
|
+
} & StageFields) | ({
|
|
73
|
+
readonly type: "record";
|
|
74
|
+
} & StageFields);
|
|
75
|
+
export declare function emptyStack(sessionId?: string | null): WorkflowStack;
|
|
76
|
+
/** A known stage of a known family in its stored spelling, or null. */
|
|
77
|
+
export declare function normalizeStage(family: unknown, stage: unknown): string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Apply one event to the stack and return the next stack with the transitions it made (`started`,
|
|
80
|
+
* `paused`, `resumed`, `side.done`, `finished`, `dropped`), which the caller may log.
|
|
81
|
+
* Events: `start {skill, ref?, restart?}`, `continue`, `move {family, stage, n?, total?, unit?, done?,
|
|
82
|
+
* verdicts?, ref?, scope?}` (the hooks' observations) and `record {...same fields}` (the model's
|
|
83
|
+
* `loop stage` call, which updates the top frame or opens one).
|
|
84
|
+
*/
|
|
85
|
+
export declare function applyStackEvent(stack: WorkflowStack | null | undefined, event: StackEvent, now?: Date): {
|
|
86
|
+
stack: WorkflowStack;
|
|
87
|
+
transitions: StackTransition[];
|
|
88
|
+
};
|
|
89
|
+
export declare function stackPath(cwd: string, sessionId: string): string | null;
|
|
90
|
+
/** The session's stack; a link, a non-file, an oversized or malformed file reads as empty. */
|
|
91
|
+
export declare function readStack(cwd: string, sessionId: string): WorkflowStack;
|
|
92
|
+
/** Write the whole stack through a temporary file; a link at the destination is replaced, never followed. */
|
|
93
|
+
export declare function writeStack(cwd: string, sessionId: string, stack: WorkflowStack): void;
|
|
94
|
+
/** Read, apply one event and write back; returns the transitions it made. Never throws. */
|
|
95
|
+
export declare function recordStackEvent(cwd: string, sessionId: string, event: StackEvent, now?: Date): {
|
|
96
|
+
stack: WorkflowStack;
|
|
97
|
+
transitions: StackTransition[];
|
|
98
|
+
};
|
|
99
|
+
/** Another session of the project counts as live while its stack was written this recently. */
|
|
100
|
+
export declare const OTHER_SESSION_MS: number;
|
|
101
|
+
/** A finished start-work run stays on other sessions' views this long, then leaves. */
|
|
102
|
+
export declare const FINISHED_WORK_MS = 60000;
|
|
103
|
+
export interface OtherStack {
|
|
104
|
+
readonly id: string;
|
|
105
|
+
readonly frames: readonly StackFrame[];
|
|
106
|
+
/** The newest time any of its frames moved. */
|
|
107
|
+
readonly at: number;
|
|
108
|
+
/** What the session's liveness record says now (`ended` records are left out), or null without one. */
|
|
109
|
+
readonly liveness: "alive" | "idle" | null;
|
|
110
|
+
readonly pane: string | null;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The stacks of the project's other sessions that moved within OTHER_SESSION_MS, or whose liveness record is
|
|
114
|
+
* still fresh, running first, then idle, then the rest, newest first within each. A start-work run that
|
|
115
|
+
* finished leaves after FINISHED_WORK_MS. It only reads: a link, an oversized or malformed file reads as
|
|
116
|
+
* empty, and an older session is simply dropped.
|
|
117
|
+
*/
|
|
118
|
+
export declare function readOtherStacks(cwd: string, selfId: string, now?: number): OtherStack[];
|
|
119
|
+
/** The frame a bare `lit continue` should resume: the nearest spine below a side frame, else null. */
|
|
120
|
+
export declare function pausedSpine(stack: WorkflowStack): StackFrame | null;
|
|
121
|
+
/**
|
|
122
|
+
* `[▉▉▉░░] 3/5` when both counts are real, otherwise null. A count with no total is never drawn as a
|
|
123
|
+
* placeholder gauge: callers say what is known in words (`frameNote`) instead.
|
|
124
|
+
*/
|
|
125
|
+
export declare function stackGauge(frame: Pick<StackFrame, "n" | "total">): string | null;
|
|
126
|
+
/** Up to ten cells; a larger total is scaled down so the bar never grows past ten. */
|
|
127
|
+
export declare function gaugeBar(done: number, total: number): string;
|
|
128
|
+
/** What a frame knows when it has no real gauge, in words: `step 2`, or an empty string. */
|
|
129
|
+
export declare function frameNote(frame: Pick<StackFrame, "n" | "total">): string;
|
|
130
|
+
/** One frame as a short label: `lit-loop WORK [▉▉░░░] 2/5`, or `lit-loop WORK step 2` without a total. */
|
|
131
|
+
export declare function frameLabel(frame: StackFrame): string;
|
|
132
|
+
/** `lit-loop ‖ > lit-brainstorm`: paused frames, then the running one after `>`; null for one frame or none. */
|
|
133
|
+
export declare function breadcrumb(stack: WorkflowStack): string | null;
|
|
134
|
+
/**
|
|
135
|
+
* The stack as one card row: paused frames with their stage and gauge, then the running frame after `>`,
|
|
136
|
+
* then the way back. Null while there is a single frame or none, since the map already shows that.
|
|
137
|
+
*/
|
|
138
|
+
export declare function stackRow(stack: WorkflowStack): string | null;
|
|
139
|
+
export {};
|