@litfamily/litgrok 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/.grok/agents/litgrok-executor.md +33 -0
- package/.grok/agents/litgrok-korean-prose-editor.md +32 -0
- package/.grok/agents/litgrok-korean-style-analyzer.md +30 -0
- package/.grok/agents/litgrok-librarian-researcher.md +31 -0
- package/.grok/agents/litgrok-meaning-preservation-auditor.md +30 -0
- package/.grok/agents/litgrok-native-flow-reviewer.md +30 -0
- package/.grok/agents/litgrok-planner.md +31 -0
- package/.grok/agents/litgrok-polish-orchestrator.md +30 -0
- package/.grok/agents/litgrok-qa-runner.md +33 -0
- package/.grok/agents/litgrok-quality-reviewer.md +33 -0
- package/.grok/agents/litgrok-verifier.md +32 -0
- package/.grok/hooks/deliverable-hedge-guard.json +16 -0
- package/.grok/hooks/deliverable-hedge-guard.mjs +148 -0
- package/.grok/hooks/lit-mark.mjs +142 -0
- package/.grok/hooks/plan-gate.mjs +81 -0
- package/.grok/hooks/post-compact.json +15 -0
- package/.grok/hooks/post-compact.mjs +6 -0
- package/.grok/hooks/post-tool-use-failure.json +15 -0
- package/.grok/hooks/post-tool-use-failure.mjs +6 -0
- package/.grok/hooks/post-tool-use.json +16 -0
- package/.grok/hooks/post-tool-use.mjs +7 -0
- package/.grok/hooks/pre-compact.json +15 -0
- package/.grok/hooks/pre-compact.mjs +6 -0
- package/.grok/hooks/record-passive-event.mjs +198 -0
- package/.grok/hooks/session-start.json +15 -0
- package/.grok/hooks/session-start.mjs +37 -0
- package/.grok/hooks/stop-failure.json +15 -0
- package/.grok/hooks/stop-failure.mjs +6 -0
- package/.grok/hooks/stop.json +15 -0
- package/.grok/hooks/stop.mjs +36 -0
- package/.grok/hooks/subagent-start.json +15 -0
- package/.grok/hooks/subagent-start.mjs +6 -0
- package/.grok/hooks/subagent-stop.json +15 -0
- package/.grok/hooks/subagent-stop.mjs +6 -0
- package/.grok/hooks/user-prompt-submit.json +15 -0
- package/.grok/hooks/user-prompt-submit.mjs +7 -0
- package/.grok/rules/00-litgrok.md +152 -0
- package/.grok/skills/autoconference/LICENSE +21 -0
- package/.grok/skills/autoconference/PROVENANCE.md +23 -0
- package/.grok/skills/autoconference/SKILL.md +140 -0
- package/.grok/skills/autoconference/assets/conference_template.md +76 -0
- package/.grok/skills/autoconference/assets/report_template.md +56 -0
- package/.grok/skills/autoconference/assets/synthesis_template.md +40 -0
- package/.grok/skills/autoconference/references/_canonical-corpus/manifest.json +138 -0
- package/.grok/skills/autoconference/references/agent-prompts.md +30 -0
- package/.grok/skills/autoconference/references/conference-protocol.md +21 -0
- package/.grok/skills/autoconference/references/core-principles.md +13 -0
- package/.grok/skills/autoconference/references/family-contract.md +26 -0
- package/.grok/skills/autoconference/references/modes/analyze.md +11 -0
- package/.grok/skills/autoconference/references/modes/core/convergence-guide.md +41 -0
- package/.grok/skills/autoconference/references/modes/core/crash-recovery.md +11 -0
- package/.grok/skills/autoconference/references/modes/core.md +26 -0
- package/.grok/skills/autoconference/references/modes/debate.md +11 -0
- package/.grok/skills/autoconference/references/modes/plan.md +12 -0
- package/.grok/skills/autoconference/references/modes/resume.md +11 -0
- package/.grok/skills/autoconference/references/modes/ship.md +11 -0
- package/.grok/skills/autoconference/references/modes/survey.md +11 -0
- package/.grok/skills/autoconference/references/results-logging.md +12 -0
- package/.grok/skills/autoconference/references/visualization-guide.md +10 -0
- package/.grok/skills/autoconference/scripts/init_conference.py +646 -0
- package/.grok/skills/autoconference/scripts/verify-canonical-corpus.mjs +177 -0
- package/.grok/skills/autoconference/templates/code-performance.md +59 -0
- package/.grok/skills/autoconference/templates/debate-mode.md +50 -0
- package/.grok/skills/autoconference/templates/prompt-optimization.md +58 -0
- package/.grok/skills/autoconference/templates/quick-conference.md +48 -0
- package/.grok/skills/autoconference/templates/research-synthesis.md +56 -0
- package/.grok/skills/autoconference/templates/survey-mode.md +63 -0
- package/.grok/skills/autoresearch/LICENSE +21 -0
- package/.grok/skills/autoresearch/PROVENANCE.md +22 -0
- package/.grok/skills/autoresearch/SKILL.md +149 -0
- package/.grok/skills/autoresearch/assets/report_template.md +52 -0
- package/.grok/skills/autoresearch/assets/research_template.md +38 -0
- package/.grok/skills/autoresearch/assets/results_template.tsv +2 -0
- package/.grok/skills/autoresearch/references/_canonical-corpus/manifest.json +148 -0
- package/.grok/skills/autoresearch/references/core-principles.md +16 -0
- package/.grok/skills/autoresearch/references/family-contract.md +36 -0
- package/.grok/skills/autoresearch/references/modes/core/evaluator-contract.md +12 -0
- package/.grok/skills/autoresearch/references/modes/core/stuck-detection.md +11 -0
- package/.grok/skills/autoresearch/references/modes/core.md +21 -0
- package/.grok/skills/autoresearch/references/modes/debug/investigation-techniques.md +11 -0
- package/.grok/skills/autoresearch/references/modes/debug.md +11 -0
- package/.grok/skills/autoresearch/references/modes/fix.md +11 -0
- package/.grok/skills/autoresearch/references/modes/learn.md +11 -0
- package/.grok/skills/autoresearch/references/modes/plan.md +14 -0
- package/.grok/skills/autoresearch/references/modes/predict/persona-templates.md +11 -0
- package/.grok/skills/autoresearch/references/modes/predict.md +11 -0
- package/.grok/skills/autoresearch/references/modes/reason.md +11 -0
- package/.grok/skills/autoresearch/references/modes/scenario/dimensions.md +11 -0
- package/.grok/skills/autoresearch/references/modes/scenario.md +11 -0
- package/.grok/skills/autoresearch/references/modes/security/owasp-checklist.md +11 -0
- package/.grok/skills/autoresearch/references/modes/security/stride-model.md +11 -0
- package/.grok/skills/autoresearch/references/modes/security.md +12 -0
- package/.grok/skills/autoresearch/references/modes/ship/type-checklists.md +12 -0
- package/.grok/skills/autoresearch/references/modes/ship.md +11 -0
- package/.grok/skills/autoresearch/references/results-logging.md +12 -0
- package/.grok/skills/autoresearch/references/visualization-guide.md +24 -0
- package/.grok/skills/autoresearch/scripts/init_research.py +391 -0
- package/.grok/skills/autoresearch/scripts/style_presets.py +123 -0
- package/.grok/skills/autoresearch/scripts/verify-canonical-corpus.mjs +179 -0
- package/.grok/skills/browser-drive/SKILL.md +194 -0
- package/.grok/skills/browser-drive/references/snapshot-act-loop.md +61 -0
- package/.grok/skills/comment-checker/SKILL.md +194 -0
- package/.grok/skills/debugging/SKILL.md +82 -0
- package/.grok/skills/debugging/references/methodology/00-setup.md +108 -0
- package/.grok/skills/debugging/references/methodology/02-investigate.md +126 -0
- package/.grok/skills/debugging/references/methodology/04-oracle-triple.md +106 -0
- package/.grok/skills/debugging/references/methodology/05-escalate.md +69 -0
- package/.grok/skills/debugging/references/methodology/06-fix.md +116 -0
- package/.grok/skills/debugging/references/methodology/08-qa.md +94 -0
- package/.grok/skills/debugging/references/methodology/09-cleanup.md +164 -0
- package/.grok/skills/debugging/references/methodology/partial-runtime-evidence.md +228 -0
- package/.grok/skills/debugging/references/post-tool-use-failure-taxonomy.md +55 -0
- package/.grok/skills/debugging/references/reproduction-recipes.md +182 -0
- package/.grok/skills/debugging/references/runtimes/bundled-js-binary.md +415 -0
- package/.grok/skills/debugging/references/runtimes/go.md +252 -0
- package/.grok/skills/debugging/references/runtimes/native-binary.md +484 -0
- package/.grok/skills/debugging/references/runtimes/node.md +260 -0
- package/.grok/skills/debugging/references/runtimes/python.md +248 -0
- package/.grok/skills/debugging/references/runtimes/rust.md +234 -0
- package/.grok/skills/debugging/references/tools/ghidra.md +212 -0
- package/.grok/skills/debugging/references/tools/playwright-cli.md +194 -0
- package/.grok/skills/debugging/references/tools/pwndbg.md +263 -0
- package/.grok/skills/debugging/references/tools/pwntools.md +265 -0
- package/.grok/skills/deep-interview/SKILL.md +216 -0
- package/.grok/skills/frontend-ui-ux/LICENSE +21 -0
- package/.grok/skills/frontend-ui-ux/PROVENANCE.json +38 -0
- package/.grok/skills/frontend-ui-ux/SKILL.md +58 -0
- package/.grok/skills/frontend-ui-ux/SOURCE-MANIFEST.json +1060 -0
- package/.grok/skills/frontend-ui-ux/THIRD-PARTY-NOTICE.txt +14 -0
- package/.grok/skills/frontend-ui-ux/data/design-intelligence.json +1 -0
- package/.grok/skills/frontend-ui-ux/references/_canonical-corpus/legal/frontend-ATTRIBUTION.md +217 -0
- package/.grok/skills/frontend-ui-ux/references/_canonical-corpus/legal/frontend-LICENSE-Apache-2.0.txt +201 -0
- package/.grok/skills/frontend-ui-ux/references/_canonical-corpus/legal/root-LICENSE +21 -0
- package/.grok/skills/frontend-ui-ux/references/_canonical-corpus/manifest.json +873 -0
- package/.grok/skills/frontend-ui-ux/references/adaptive-layout.md +92 -0
- package/.grok/skills/frontend-ui-ux/references/brand-and-imagery.md +93 -0
- package/.grok/skills/frontend-ui-ux/references/complete-contract.md +557 -0
- package/.grok/skills/frontend-ui-ux/references/composition.md +85 -0
- package/.grok/skills/frontend-ui-ux/references/creative-directions.md +80 -0
- package/.grok/skills/frontend-ui-ux/references/design/README.md +248 -0
- package/.grok/skills/frontend-ui-ux/references/design/_INDEX.md +191 -0
- package/.grok/skills/frontend-ui-ux/references/design/airbnb.md +393 -0
- package/.grok/skills/frontend-ui-ux/references/design/airtable.md +92 -0
- package/.grok/skills/frontend-ui-ux/references/design/apple.md +250 -0
- package/.grok/skills/frontend-ui-ux/references/design/aside.md +209 -0
- package/.grok/skills/frontend-ui-ux/references/design/binance.md +348 -0
- package/.grok/skills/frontend-ui-ux/references/design/bmw.md +183 -0
- package/.grok/skills/frontend-ui-ux/references/design/brutalist-skill.md +92 -0
- package/.grok/skills/frontend-ui-ux/references/design/bugatti.md +271 -0
- package/.grok/skills/frontend-ui-ux/references/design/cal.md +262 -0
- package/.grok/skills/frontend-ui-ux/references/design/claude.md +315 -0
- package/.grok/skills/frontend-ui-ux/references/design/clay.md +307 -0
- package/.grok/skills/frontend-ui-ux/references/design/clickhouse.md +284 -0
- package/.grok/skills/frontend-ui-ux/references/design/clone-from-url.md +65 -0
- package/.grok/skills/frontend-ui-ux/references/design/cohere.md +269 -0
- package/.grok/skills/frontend-ui-ux/references/design/coinbase.md +132 -0
- package/.grok/skills/frontend-ui-ux/references/design/composio.md +310 -0
- package/.grok/skills/frontend-ui-ux/references/design/cursor.md +312 -0
- package/.grok/skills/frontend-ui-ux/references/design/design-system-architecture.md +244 -0
- package/.grok/skills/frontend-ui-ux/references/design/elevenlabs.md +268 -0
- package/.grok/skills/frontend-ui-ux/references/design/expo.md +284 -0
- package/.grok/skills/frontend-ui-ux/references/design/ferrari.md +317 -0
- package/.grok/skills/frontend-ui-ux/references/design/figma.md +223 -0
- package/.grok/skills/frontend-ui-ux/references/design/framer.md +249 -0
- package/.grok/skills/frontend-ui-ux/references/design/gpt-tasteskill.md +74 -0
- package/.grok/skills/frontend-ui-ux/references/design/hashicorp.md +281 -0
- package/.grok/skills/frontend-ui-ux/references/design/ibm.md +335 -0
- package/.grok/skills/frontend-ui-ux/references/design/image-to-code-skill.md +1228 -0
- package/.grok/skills/frontend-ui-ux/references/design/imagegen-brandkit.md +798 -0
- package/.grok/skills/frontend-ui-ux/references/design/imagegen-frontend-mobile.md +1465 -0
- package/.grok/skills/frontend-ui-ux/references/design/imagegen-frontend-web.md +987 -0
- package/.grok/skills/frontend-ui-ux/references/design/intercom.md +149 -0
- package/.grok/skills/frontend-ui-ux/references/design/kraken.md +128 -0
- package/.grok/skills/frontend-ui-ux/references/design/lamborghini.md +291 -0
- package/.grok/skills/frontend-ui-ux/references/design/layout-skill.md +107 -0
- package/.grok/skills/frontend-ui-ux/references/design/lazyweb.md +77 -0
- package/.grok/skills/frontend-ui-ux/references/design/linear.app.md +370 -0
- package/.grok/skills/frontend-ui-ux/references/design/lovable.md +301 -0
- package/.grok/skills/frontend-ui-ux/references/design/mastercard.md +368 -0
- package/.grok/skills/frontend-ui-ux/references/design/meta.md +369 -0
- package/.grok/skills/frontend-ui-ux/references/design/minimalist-skill.md +85 -0
- package/.grok/skills/frontend-ui-ux/references/design/minimax.md +260 -0
- package/.grok/skills/frontend-ui-ux/references/design/mintlify.md +329 -0
- package/.grok/skills/frontend-ui-ux/references/design/miro.md +111 -0
- package/.grok/skills/frontend-ui-ux/references/design/mistral.ai.md +264 -0
- package/.grok/skills/frontend-ui-ux/references/design/mongodb.md +269 -0
- package/.grok/skills/frontend-ui-ux/references/design/nike.md +366 -0
- package/.grok/skills/frontend-ui-ux/references/design/notion.md +312 -0
- package/.grok/skills/frontend-ui-ux/references/design/nvidia.md +296 -0
- package/.grok/skills/frontend-ui-ux/references/design/ollama.md +270 -0
- package/.grok/skills/frontend-ui-ux/references/design/opencode.ai.md +284 -0
- package/.grok/skills/frontend-ui-ux/references/design/output-skill.md +49 -0
- package/.grok/skills/frontend-ui-ux/references/design/pinterest.md +233 -0
- package/.grok/skills/frontend-ui-ux/references/design/playstation.md +367 -0
- package/.grok/skills/frontend-ui-ux/references/design/posthog.md +259 -0
- package/.grok/skills/frontend-ui-ux/references/design/raycast.md +271 -0
- package/.grok/skills/frontend-ui-ux/references/design/react-dev-tooling-skill.md +230 -0
- package/.grok/skills/frontend-ui-ux/references/design/redesign-skill.md +178 -0
- package/.grok/skills/frontend-ui-ux/references/design/renault.md +314 -0
- package/.grok/skills/frontend-ui-ux/references/design/replicate.md +264 -0
- package/.grok/skills/frontend-ui-ux/references/design/resend.md +306 -0
- package/.grok/skills/frontend-ui-ux/references/design/revolut.md +188 -0
- package/.grok/skills/frontend-ui-ux/references/design/runwayml.md +247 -0
- package/.grok/skills/frontend-ui-ux/references/design/sanity.md +360 -0
- package/.grok/skills/frontend-ui-ux/references/design/sentry.md +265 -0
- package/.grok/skills/frontend-ui-ux/references/design/shopify.md +353 -0
- package/.grok/skills/frontend-ui-ux/references/design/soft-skill.md +98 -0
- package/.grok/skills/frontend-ui-ux/references/design/spacex.md +197 -0
- package/.grok/skills/frontend-ui-ux/references/design/spotify.md +249 -0
- package/.grok/skills/frontend-ui-ux/references/design/starbucks.md +583 -0
- package/.grok/skills/frontend-ui-ux/references/design/stitch-design-example.md +121 -0
- package/.grok/skills/frontend-ui-ux/references/design/stitch-skill.md +184 -0
- package/.grok/skills/frontend-ui-ux/references/design/stripe.md +325 -0
- package/.grok/skills/frontend-ui-ux/references/design/supabase.md +258 -0
- package/.grok/skills/frontend-ui-ux/references/design/superhuman.md +255 -0
- package/.grok/skills/frontend-ui-ux/references/design/taste-skill.md +1206 -0
- package/.grok/skills/frontend-ui-ux/references/design/tesla.md +289 -0
- package/.grok/skills/frontend-ui-ux/references/design/theverge.md +342 -0
- package/.grok/skills/frontend-ui-ux/references/design/together.ai.md +266 -0
- package/.grok/skills/frontend-ui-ux/references/design/uber.md +298 -0
- package/.grok/skills/frontend-ui-ux/references/design/vercel.md +313 -0
- package/.grok/skills/frontend-ui-ux/references/design/vodafone.md +426 -0
- package/.grok/skills/frontend-ui-ux/references/design/voltagent.md +326 -0
- package/.grok/skills/frontend-ui-ux/references/design/warp.md +256 -0
- package/.grok/skills/frontend-ui-ux/references/design/webflow.md +95 -0
- package/.grok/skills/frontend-ui-ux/references/design/wired.md +281 -0
- package/.grok/skills/frontend-ui-ux/references/design/wise.md +176 -0
- package/.grok/skills/frontend-ui-ux/references/design/x.ai.md +260 -0
- package/.grok/skills/frontend-ui-ux/references/design/zapier.md +331 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/EVIDENCE.md +97 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/README.md +48 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/UPSTREAM.md +80 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/lane-a-direction.md +64 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/lane-b-execution.md +65 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/lane-c-review.md +65 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/lane-d-memory.md +83 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/orchestration.md +80 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/routing.md +79 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/LICENSE +21 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/content-writer.md +132 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-builder.md +109 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-critic.md +89 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-lead.md +113 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-scout.md +78 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/design-strategist.md +121 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/inspiration-scout.md +107 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/agents/motion-designer.md +120 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/accessible-content/reference.md +101 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/adaptive-interfaces/reference.md +109 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/cognitive-accessibility/reference.md +107 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-debate/reference.md +199 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-debt-tracker/reference.md +174 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-handoff/reference.md +125 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-md/reference.md +106 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-retrospective/reference.md +266 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-review/reference.md +123 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/design-system-alignment/reference.md +120 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/designpowers-critique/reference.md +164 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/heuristic-evaluation/reference.md +85 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/inclusive-personas/reference.md +98 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/inspiration-scouting/reference.md +165 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/interaction-design/reference.md +122 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/motion-choreography/reference.md +81 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/research-planning/reference.md +96 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/responsive-patterns/reference.md +77 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/synthetic-user-testing/reference.md +192 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/taste-feedback/reference.md +165 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/taste-report/reference.md +78 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/token-architecture/reference.md +75 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/ui-composition/reference.md +117 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/usability-testing/reference.md +78 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/verification-before-shipping/reference.md +125 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/voice-and-tone/reference.md +79 -0
- package/.grok/skills/frontend-ui-ux/references/designpowers/vendor/skills/writing-design-plans/reference.md +119 -0
- package/.grok/skills/frontend-ui-ux/references/evidence-review.md +126 -0
- package/.grok/skills/frontend-ui-ux/references/implementation-platforms.md +109 -0
- package/.grok/skills/frontend-ui-ux/references/inclusive-interface.md +92 -0
- package/.grok/skills/frontend-ui-ux/references/interaction-motion.md +101 -0
- package/.grok/skills/frontend-ui-ux/references/operating-lanes.md +92 -0
- package/.grok/skills/frontend-ui-ux/references/perfection/README.md +160 -0
- package/.grok/skills/frontend-ui-ux/references/perfection/react-perf-tooling.md +127 -0
- package/.grok/skills/frontend-ui-ux/references/performance-delivery.md +93 -0
- package/.grok/skills/frontend-ui-ux/references/product-direction.md +84 -0
- package/.grok/skills/frontend-ui-ux/references/redesign-playbook.md +97 -0
- package/.grok/skills/frontend-ui-ux/references/system-foundations.md +84 -0
- package/.grok/skills/frontend-ui-ux/references/taste-direction.md +86 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/README.md +659 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/charts.csv +26 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/colors.csv +162 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/icons.csv +106 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/landing.csv +35 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/products.csv +162 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/react-performance.csv +45 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/styles.csv +85 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/typography.csv +74 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/ui-reasoning.csv +162 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/data/web-interface.csv +31 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/scripts/core.py +262 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/scripts/design_system.py +1148 -0
- package/.grok/skills/frontend-ui-ux/references/ui-ux-db/scripts/search.py +114 -0
- package/.grok/skills/frontend-ui-ux/references/visual-language.md +84 -0
- package/.grok/skills/frontend-ui-ux/references/visual-reconstruction.md +97 -0
- package/.grok/skills/frontend-ui-ux/schemas/design-contract-v1alpha1.schema.json +306 -0
- package/.grok/skills/frontend-ui-ux/schemas/design-contract-v1beta1.schema.json +291 -0
- package/.grok/skills/frontend-ui-ux/schemas/design-contract-v1beta2.schema.json +311 -0
- package/.grok/skills/frontend-ui-ux/scripts/design-contract-format.mjs +286 -0
- package/.grok/skills/frontend-ui-ux/scripts/design-contract-inventory-rules.mjs +354 -0
- package/.grok/skills/frontend-ui-ux/scripts/design-contract-rules.mjs +361 -0
- package/.grok/skills/frontend-ui-ux/scripts/design-contract-surface-rules.mjs +313 -0
- package/.grok/skills/frontend-ui-ux/scripts/design-data.mjs +68 -0
- package/.grok/skills/frontend-ui-ux/scripts/errors.mjs +12 -0
- package/.grok/skills/frontend-ui-ux/scripts/import-design-intelligence.mjs +124 -0
- package/.grok/skills/frontend-ui-ux/scripts/json-boundary.mjs +63 -0
- package/.grok/skills/frontend-ui-ux/scripts/query-design-intelligence.mjs +106 -0
- package/.grok/skills/frontend-ui-ux/scripts/search.mjs +43 -0
- package/.grok/skills/frontend-ui-ux/scripts/source-replay.mjs +153 -0
- package/.grok/skills/frontend-ui-ux/scripts/strict-json.mjs +143 -0
- package/.grok/skills/frontend-ui-ux/scripts/validate-design-contract.mjs +52 -0
- package/.grok/skills/frontend-ui-ux/scripts/verify-canonical-corpus.mjs +214 -0
- package/.grok/skills/lit-burnoff/SKILL.md +175 -0
- package/.grok/skills/lit-burnoff-file/SKILL.md +67 -0
- package/.grok/skills/lit-code/SKILL.md +531 -0
- package/.grok/skills/lit-code/references/go/README.md +90 -0
- package/.grok/skills/lit-code/references/go/backend-stack.md +641 -0
- package/.grok/skills/lit-code/references/go/bootstrap.md +328 -0
- package/.grok/skills/lit-code/references/go/bubbletea-v2.md +360 -0
- package/.grok/skills/lit-code/references/go/cobra-stack.md +468 -0
- package/.grok/skills/lit-code/references/go/concurrency.md +362 -0
- package/.grok/skills/lit-code/references/go/data-modeling.md +329 -0
- package/.grok/skills/lit-code/references/go/error-handling.md +359 -0
- package/.grok/skills/lit-code/references/go/golangci-strict.md +236 -0
- package/.grok/skills/lit-code/references/go/grpc-connect.md +375 -0
- package/.grok/skills/lit-code/references/go/libraries.md +337 -0
- package/.grok/skills/lit-code/references/go/one-liners.md +202 -0
- package/.grok/skills/lit-code/references/go/sqlc-pgx.md +471 -0
- package/.grok/skills/lit-code/references/go/testing.md +467 -0
- package/.grok/skills/lit-code/references/go/type-patterns.md +298 -0
- package/.grok/skills/lit-code/references/permission-sandbox-matrix.md +70 -0
- package/.grok/skills/lit-code/references/python/README.md +314 -0
- package/.grok/skills/lit-code/references/python/async-anyio.md +442 -0
- package/.grok/skills/lit-code/references/python/data-modeling.md +233 -0
- package/.grok/skills/lit-code/references/python/data-processing.md +133 -0
- package/.grok/skills/lit-code/references/python/error-handling.md +218 -0
- package/.grok/skills/lit-code/references/python/fastapi-stack.md +316 -0
- package/.grok/skills/lit-code/references/python/httpx2-optimization.md +360 -0
- package/.grok/skills/lit-code/references/python/libraries.md +307 -0
- package/.grok/skills/lit-code/references/python/one-liners.md +268 -0
- package/.grok/skills/lit-code/references/python/orjson-stack.md +378 -0
- package/.grok/skills/lit-code/references/python/pydantic-ai.md +285 -0
- package/.grok/skills/lit-code/references/python/pyproject-strict.md +232 -0
- package/.grok/skills/lit-code/references/python/textual-tui.md +201 -0
- package/.grok/skills/lit-code/references/python/type-patterns.md +176 -0
- package/.grok/skills/lit-code/references/rust/README.md +317 -0
- package/.grok/skills/lit-code/references/rust/async-tokio.md +299 -0
- package/.grok/skills/lit-code/references/rust/axum-stack.md +467 -0
- package/.grok/skills/lit-code/references/rust/cargo-strict.md +317 -0
- package/.grok/skills/lit-code/references/rust/clap-stack.md +409 -0
- package/.grok/skills/lit-code/references/rust/concurrency.md +375 -0
- package/.grok/skills/lit-code/references/rust/libraries.md +439 -0
- package/.grok/skills/lit-code/references/rust/one-liners.md +291 -0
- package/.grok/skills/lit-code/references/rust/proptest-insta.md +429 -0
- package/.grok/skills/lit-code/references/rust/type-state.md +354 -0
- package/.grok/skills/lit-code/references/rust/unsafe-discipline.md +250 -0
- package/.grok/skills/lit-code/references/rust/zero-cost-safety.md +527 -0
- package/.grok/skills/lit-code/references/rust-ub/README.md +289 -0
- package/.grok/skills/lit-code/references/rust-ub/miri-sanitizers-loom.md +411 -0
- package/.grok/skills/lit-code/references/rust-ub/ub-taxonomy.md +269 -0
- package/.grok/skills/lit-code/references/tool-boundaries.md +66 -0
- package/.grok/skills/lit-code/references/typescript/README.md +195 -0
- package/.grok/skills/lit-code/references/typescript/backend-hono.md +672 -0
- package/.grok/skills/lit-code/references/typescript/bootstrap.md +199 -0
- package/.grok/skills/lit-code/references/typescript/data-modeling.md +202 -0
- package/.grok/skills/lit-code/references/typescript/error-handling.md +169 -0
- package/.grok/skills/lit-code/references/typescript/tsconfig-strict.md +152 -0
- package/.grok/skills/lit-code/references/typescript/type-patterns.md +196 -0
- package/.grok/skills/lit-code/references/worked-cases.md +190 -0
- package/.grok/skills/lit-commit/SKILL.md +218 -0
- package/.grok/skills/lit-comprehend/SKILL.md +63 -0
- package/.grok/skills/lit-comprehend/references/artifact-format.md +58 -0
- package/.grok/skills/lit-comprehend/references/artifact-template.md +219 -0
- package/.grok/skills/lit-comprehend/references/honesty-ledger-contract.md +51 -0
- package/.grok/skills/lit-comprehend/references/micro-worlds.md +195 -0
- package/.grok/skills/lit-comprehend/references/worked-explainer.md +51 -0
- package/.grok/skills/lit-crucible/SKILL.md +231 -0
- package/.grok/skills/lit-handoff/SKILL.md +159 -0
- package/.grok/skills/lit-handoff/evals/evals.json +154 -0
- package/.grok/skills/lit-handoff/examples/HANDOFF-example-generic-auth-refactor.md +97 -0
- package/.grok/skills/lit-handoff/references/_canonical-corpus/manifest.json +17 -0
- package/.grok/skills/lit-handoff/references/source-pointer.md +31 -0
- package/.grok/skills/lit-handoff/scripts/verify-canonical-corpus.mjs +137 -0
- package/.grok/skills/lit-handoff/templates/HANDOFF.md +121 -0
- package/.grok/skills/lit-init/SKILL.md +244 -0
- package/.grok/skills/lit-korean/SKILL.md +176 -0
- package/.grok/skills/lit-plan/SKILL.md +71 -0
- package/.grok/skills/lit-plan/references/plan-schema.md +87 -0
- package/.grok/skills/lit-plan/references/start-work-handoff-contract.md +59 -0
- package/.grok/skills/lit-plan/scripts/scaffold-plan.mjs +259 -0
- package/.grok/skills/lit-plan/scripts/validate-plan.mjs +89 -0
- package/.grok/skills/lit-recap/SKILL.md +57 -0
- package/.grok/skills/lit-scientific-visualization/SKILL.md +213 -0
- package/.grok/skills/lit-scientific-visualization/scripts/verify-canonical-corpus.mjs +181 -0
- package/.grok/skills/lit-team/SKILL.md +73 -0
- package/.grok/skills/lit-team/references/explore-packet.md +70 -0
- package/.grok/skills/lit-team/references/general-purpose-packet.md +75 -0
- package/.grok/skills/lit-team/references/plan-packet.md +73 -0
- package/.grok/skills/litgoal/SKILL.md +98 -0
- package/.grok/skills/litgrok/SKILL.md +77 -0
- package/.grok/skills/litresearch/SKILL.md +60 -0
- package/.grok/skills/litresearch/references/mcp-tool-use-patterns.md +83 -0
- package/.grok/skills/litresearch/references/source-verdict-taxonomy.md +40 -0
- package/.grok/skills/litwork/SKILL.md +109 -0
- package/.grok/skills/lsp/SKILL.md +56 -0
- package/.grok/skills/lsp/references/built-in-lsp-contract.md +71 -0
- package/.grok/skills/lsp-setup/SKILL.md +82 -0
- package/.grok/skills/lsp-setup/references/bash/README.md +54 -0
- package/.grok/skills/lsp-setup/references/c-cpp/README.md +58 -0
- package/.grok/skills/lsp-setup/references/csharp/README.md +64 -0
- package/.grok/skills/lsp-setup/references/dart/README.md +48 -0
- package/.grok/skills/lsp-setup/references/elixir/README.md +51 -0
- package/.grok/skills/lsp-setup/references/go/README.md +53 -0
- package/.grok/skills/lsp-setup/references/haskell/README.md +57 -0
- package/.grok/skills/lsp-setup/references/java/README.md +55 -0
- package/.grok/skills/lsp-setup/references/julia/README.md +56 -0
- package/.grok/skills/lsp-setup/references/kotlin/README.md +58 -0
- package/.grok/skills/lsp-setup/references/lua/README.md +48 -0
- package/.grok/skills/lsp-setup/references/php/README.md +49 -0
- package/.grok/skills/lsp-setup/references/python/README.md +60 -0
- package/.grok/skills/lsp-setup/references/ruby/README.md +53 -0
- package/.grok/skills/lsp-setup/references/rust/README.md +55 -0
- package/.grok/skills/lsp-setup/references/swift/README.md +52 -0
- package/.grok/skills/lsp-setup/references/terraform/README.md +50 -0
- package/.grok/skills/lsp-setup/references/typescript/README.md +63 -0
- package/.grok/skills/lsp-setup/references/yaml/README.md +47 -0
- package/.grok/skills/lsp-setup/references/zig/README.md +49 -0
- package/.grok/skills/lsp-setup/scripts/detect-lsp.mjs +40 -0
- package/.grok/skills/lsp-setup/scripts/lsp-server-table.mjs +309 -0
- package/.grok/skills/lsp-setup/scripts/verify-lsp.mjs +54 -0
- package/.grok/skills/refactor/SKILL.md +210 -0
- package/.grok/skills/review-work/SKILL.md +515 -0
- package/.grok/skills/review-work/references/behavior-lane-contract.md +48 -0
- package/.grok/skills/review-work/references/documentation-lane-contract.md +49 -0
- package/.grok/skills/review-work/references/integration-lane-contract.md +51 -0
- package/.grok/skills/review-work/references/regression-lane-contract.md +48 -0
- package/.grok/skills/review-work/references/safety-lane-contract.md +48 -0
- package/.grok/skills/review-work/references/test-lane-contract.md +48 -0
- package/.grok/skills/review-work/scripts/check-lanes.mjs +63 -0
- package/.grok/skills/rules/SKILL.md +51 -0
- package/.grok/skills/rules/references/loading-order-contract.md +66 -0
- package/.grok/skills/rules/scripts/resolve-guidance.mjs +180 -0
- package/.grok/skills/skill-observer/SKILL.md +78 -0
- package/.grok/skills/skill-observer/references/review-contract.md +77 -0
- package/.grok/skills/skill-observer/scripts/curator.mjs +121 -0
- package/.grok/skills/skill-observer/scripts/review.mjs +347 -0
- package/.grok/skills/skill-observer/scripts/skill-loop.mjs +2087 -0
- package/.grok/skills/skill-observer/scripts/validate-skills.mjs +83 -0
- package/.grok/skills/start-work/SKILL.md +396 -0
- package/.grok/skills/structural-search/SKILL.md +195 -0
- package/.grok/skills/visual-qa/SKILL.md +50 -0
- package/.grok/skills/visual-qa/references/capture-playbook.md +47 -0
- package/.grok/skills/visual-qa/references/complete-contract.md +721 -0
- package/.grok/skills/visual-qa/references/verdict-taxonomy.md +34 -0
- package/.grok/skills/visual-qa/scripts/verify-evidence-manifest.mjs +91 -0
- package/.grok/skills/wikify/SKILL.md +65 -0
- package/.grok/skills/wikify/references/page-format.md +81 -0
- package/.grok/skills/wikify/references/provenance-contract.md +52 -0
- package/.grok/vendor/NOTICE.md +16 -0
- package/.grok/vendor/licenses/045_scientific-visualization-MIT.txt +21 -0
- package/.grok/vendor/provenance/045_scientific-visualization.md +37 -0
- package/.grok/vendor/scientific-visualization/assets/color_palettes.py +197 -0
- package/.grok/vendor/scientific-visualization/assets/nature.mplstyle +75 -0
- package/.grok/vendor/scientific-visualization/assets/presentation.mplstyle +74 -0
- package/.grok/vendor/scientific-visualization/assets/publication.mplstyle +78 -0
- package/.grok/vendor/scientific-visualization/evals/evals.json +158 -0
- package/.grok/vendor/scientific-visualization/references/_canonical-corpus/manifest.json +38 -0
- package/.grok/vendor/scientific-visualization/references/color_palettes.md +380 -0
- package/.grok/vendor/scientific-visualization/references/journal_requirements.md +359 -0
- package/.grok/vendor/scientific-visualization/references/matplotlib_examples.md +608 -0
- package/.grok/vendor/scientific-visualization/references/mdanalysis_martini_visualization.md +85 -0
- package/.grok/vendor/scientific-visualization/references/publication_guidelines.md +217 -0
- package/.grok/vendor/scientific-visualization/references/seaborn_for_publications.md +293 -0
- package/.grok/vendor/scientific-visualization/scripts/figure_export.py +238 -0
- package/.grok/vendor/scientific-visualization/scripts/style_presets.py +467 -0
- package/.grok/vendor/scientific-visualization/tests/test_figure_export.py +51 -0
- package/.grok/vendor/scientific-visualization/tests/test_style_presets.py +114 -0
- package/CHANGELOG.md +131 -0
- package/CODE_OF_CONDUCT.md +9 -0
- package/CONTRIBUTING.md +22 -0
- package/LICENSE +21 -0
- package/README.md +228 -0
- package/README_ko-KR.md +228 -0
- package/SECURITY.md +11 -0
- package/SUPPORT.md +9 -0
- package/bin/litgrok.mjs +860 -0
- package/docs/assets/cover.webp +0 -0
- package/docs/assets/litgrok-clay-icon.png +0 -0
- package/docs/assets/litgrok-continuity-1600.webp +0 -0
- package/docs/assets/litgrok-ignition-1600.webp +0 -0
- package/docs/assets/litgrok-wordmark.svg +5 -0
- package/docs/assets/readme/README.md +31 -0
- package/docs/assets/readme/badge-license.svg +1 -0
- package/docs/assets/readme/badge-version.svg +1 -0
- package/docs/privacy.md +13 -0
- package/docs/reference.md +271 -0
- package/docs/reference_ko-KR.md +267 -0
- package/package.json +50 -0
- package/plugin.json +27 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// Canonical rows and cell colors are generated from pinned Ignition B; do not edit glyphs.
|
|
2
|
+
// BEGIN CANONICAL ROWS
|
|
3
|
+
export const standard = Object.freeze([
|
|
4
|
+
" ▄▖ ▄█▄ ",
|
|
5
|
+
"▗▄▄▖ ▄██▌ ▜█▛ ",
|
|
6
|
+
"▐██▌ ▄████████████▜▛ ",
|
|
7
|
+
"▐██▌ ▐█▀▀▀▀▀▀▀▀▀▀▀▀▘ ",
|
|
8
|
+
"▐██▌ ▄█▌█████████▌ ",
|
|
9
|
+
"▐██▌ ▄██▛▘ ▗▄▄ ▗ ",
|
|
10
|
+
"▐██▌▐█▛▘ ▐██ ▝▀ ",
|
|
11
|
+
"▐██▌▝ ▐██ ",
|
|
12
|
+
"▐██████▘ ▐██ ",
|
|
13
|
+
"▝▀▀▀▀▀ ▝▀▀ "
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
export const banner = Object.freeze([
|
|
17
|
+
" ▄▄▄▄ ",
|
|
18
|
+
" ▗███▌ ▗██████▖ ",
|
|
19
|
+
" ▗▄▄▄▄▄ ▗▟████▌ ▝██████▘ ",
|
|
20
|
+
" ▐█████ ▗▟██████▌ ▝▀▜█▀▘ ",
|
|
21
|
+
" ▐█████ ▗▟███████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ",
|
|
22
|
+
" ▐█████ ▗▟█████████████████████████ ▐█▀ ",
|
|
23
|
+
" ▐█████ ████████████████████████████▀ ",
|
|
24
|
+
" ▐█████ ██▛▘ ▄ ▄▄▄▄▖▄▄▄▄▄▄▄▄▄▄▄▄▄▖ ",
|
|
25
|
+
" ▐█████ ▀ ▄██ ████▌█████████████▌ ",
|
|
26
|
+
" ▐█████ ▄████ ████▌█████████████▌ ",
|
|
27
|
+
" ▐█████ ▄█████▛ ",
|
|
28
|
+
" ▐█████ ▗▟█████▀▘ ▄▄▄▄▄ ▗▖ ",
|
|
29
|
+
" ▐█████ ▐█████▀ █████ ▐▛▀ ",
|
|
30
|
+
" ▐█████ ▐███▀ █████ ",
|
|
31
|
+
" ▐█████ ▐█▀ █████ ",
|
|
32
|
+
" ▐█████ ▝ █████ ",
|
|
33
|
+
" ▐█████▄▄▄▄▄▄▄▖ █████ ",
|
|
34
|
+
" ▐███████████▛ █████ ",
|
|
35
|
+
" ▐██████████▀ █████ ",
|
|
36
|
+
" "
|
|
37
|
+
]);
|
|
38
|
+
|
|
39
|
+
export const micro = Object.freeze([
|
|
40
|
+
"▗▖ ▄▄ █▌ ",
|
|
41
|
+
"▐▌▗█▀▀▀▀▀▀▘ ",
|
|
42
|
+
"▐▌ ▄▌▀▝▀▀▘ ",
|
|
43
|
+
"▐▌▛▘ ▐▌ ",
|
|
44
|
+
"▝▀▀▘ ▝▘ "
|
|
45
|
+
]);
|
|
46
|
+
|
|
47
|
+
const COLOR_KEYS = Object.freeze({
|
|
48
|
+
standard: Object.freeze([
|
|
49
|
+
"..........II..LLL.....",
|
|
50
|
+
"OOOO....IIII..LLL.....",
|
|
51
|
+
"OOOO..IIIIOOOOOOOOOOO.",
|
|
52
|
+
"OOOO.IIIOOOOOOOOOOOO..",
|
|
53
|
+
"OOOO...IIILLLIIIIIII..",
|
|
54
|
+
"OOOO.IIIII..III..I....",
|
|
55
|
+
"OOOOIIII....III..II...",
|
|
56
|
+
"OOOOI.......III.......",
|
|
57
|
+
"OOOOOOOO....III.......",
|
|
58
|
+
"OOOOOO......III......."
|
|
59
|
+
]),
|
|
60
|
+
banner: Object.freeze([
|
|
61
|
+
".............................LLLL...........",
|
|
62
|
+
"...................IIIII...LLLLLLLL.........",
|
|
63
|
+
".OOOOOO..........IIIIIII...LLLLLLLL.........",
|
|
64
|
+
".OOOOOO........IIIIIIIII....LLLLLL..........",
|
|
65
|
+
".OOOOOO......IIIIIIIIIOOOOOOOOOOOOOOOOOOOO..",
|
|
66
|
+
".OOOOOO....IIIIIIIIOOOOOOOOOOOOOOOOOOO.OOO..",
|
|
67
|
+
".OOOOOO....IIIIIIOOOOOOOOOOOOOOOOOOOOOOO....",
|
|
68
|
+
".OOOOOO....IIII...I.LLLLLIIIIIIIIIIIIII.....",
|
|
69
|
+
".OOOOOO....I....III.LLLLLIIIIIIIIIIIIII.....",
|
|
70
|
+
".OOOOOO.......IIIII.LLLLLIIIIIIIIIIIIII.....",
|
|
71
|
+
".OOOOOO.....IIIIIII.........................",
|
|
72
|
+
".OOOOOO..IIIIIIIII.......IIIII.....II.......",
|
|
73
|
+
".OOOOOO.IIIIIII..........IIIII.....III......",
|
|
74
|
+
".OOOOOO.IIIII............IIIII..............",
|
|
75
|
+
".OOOOOO.III..............IIIII..............",
|
|
76
|
+
".OOOOOO.I................IIIII..............",
|
|
77
|
+
".OOOOOOOOOOOOOO..........IIIII..............",
|
|
78
|
+
".OOOOOOOOOOOOO...........IIIII..............",
|
|
79
|
+
".OOOOOOOOOOOO............IIIII..............",
|
|
80
|
+
"............................................"
|
|
81
|
+
]),
|
|
82
|
+
micro: Object.freeze([
|
|
83
|
+
"OO..II.LL.......",
|
|
84
|
+
"OOIIIOOOOOO.....",
|
|
85
|
+
"OO.IILIIII......",
|
|
86
|
+
"OOII..II........",
|
|
87
|
+
"OOOO..II........"
|
|
88
|
+
]),
|
|
89
|
+
});
|
|
90
|
+
// END CANONICAL ROWS
|
|
91
|
+
|
|
92
|
+
const MARK_GLYPHS = new Set('█▀▄▌▐▖▗▘▝▙▛▜▟▚▞');
|
|
93
|
+
const RESET = '\x1b[0m';
|
|
94
|
+
const PALETTE = Object.freeze({ O: '255;99;55', L: '215;247;91', I: '242;239;223' });
|
|
95
|
+
const INDEXED_PALETTE = Object.freeze({ O: 203, L: 191, I: 230 });
|
|
96
|
+
|
|
97
|
+
function productLabel(productName) {
|
|
98
|
+
if (typeof productName !== 'string' || !/^[\p{L}\p{N} .·-]{1,80}$/u.test(productName)) throw new TypeError('Invalid product name');
|
|
99
|
+
return productName;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function lockup(productName) {
|
|
103
|
+
const label = productLabel(productName);
|
|
104
|
+
return standard.map((row, index) => row.padEnd(28) + (index === 5 ? ` ${label}` : ''));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function colorize(rows, { mode = 'none' } = {}) {
|
|
108
|
+
if (!['truecolor', '256', 'none'].includes(mode)) throw new TypeError('Invalid color mode');
|
|
109
|
+
if (mode === 'none') return [...rows];
|
|
110
|
+
const variants = { standard, banner, micro };
|
|
111
|
+
const variant = Object.keys(variants).find((name) => rows.length === variants[name].length && rows.every((row, index) => row.startsWith(variants[name][index])));
|
|
112
|
+
return rows.map((row, index) => {
|
|
113
|
+
return [...row].map((glyph, column) => {
|
|
114
|
+
if (!MARK_GLYPHS.has(glyph)) return glyph;
|
|
115
|
+
const key = variant ? COLOR_KEYS[variant][index][column] : 'I';
|
|
116
|
+
if (!Object.hasOwn(PALETTE, key)) return glyph;
|
|
117
|
+
const foreground = mode === '256' ? `\x1b[38;5;${INDEXED_PALETTE[key]}m` : `\x1b[38;2;${PALETTE[key]}m`;
|
|
118
|
+
return `${foreground}${glyph}${RESET}`;
|
|
119
|
+
}).join('');
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function unicodeTerminal(env) {
|
|
124
|
+
return env.TERM !== 'dumb' && /utf-?8/iu.test(env.LC_ALL || env.LC_CTYPE || env.LANG || '');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function terminalMode({ env = process.env, isTTY = process.stdout.isTTY, args = [] } = {}) {
|
|
128
|
+
if (!isTTY || Object.hasOwn(env, 'NO_COLOR') || Object.hasOwn(env, 'CI') || args.includes('--json') || args.includes('--no-color') || !unicodeTerminal(env)) return 'none';
|
|
129
|
+
return /truecolor|24bit/iu.test(env.COLORTERM || '') ? 'truecolor' : '256';
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function renderMark({ size = 'standard', productName, env = process.env, isTTY = process.stdout.isTTY, args = [] } = {}) {
|
|
133
|
+
if (!Object.hasOwn({ standard, banner, micro }, size)) throw new TypeError('Invalid mark size');
|
|
134
|
+
const label = productName === undefined ? undefined : productLabel(productName);
|
|
135
|
+
if (!unicodeTerminal(env)) return label ? ['LIT', label] : ['LIT'];
|
|
136
|
+
const rows = { standard, banner, micro }[size];
|
|
137
|
+
const painted = colorize(rows, { mode: terminalMode({ env, isTTY, args }) });
|
|
138
|
+
if (!label) return painted;
|
|
139
|
+
const width = size === 'banner' ? 50 : size === 'standard' ? 28 : 16;
|
|
140
|
+
const labelRow = size === 'banner' ? 10 : size === 'standard' ? 5 : 2;
|
|
141
|
+
return painted.map((row, index) => row + ' '.repeat(width - rows[index].length) + (index === labelRow ? ` ${label}` : ''));
|
|
142
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Stop plan gate: a planning turn must persist plans/<slug>.md with column-zero checkbox rows.
|
|
2
|
+
//
|
|
3
|
+
// Host contract (documented Stop decision control): stdout `{"decision":"block","reason"}` keeps
|
|
4
|
+
// the agent working; empty stdout with exit 0 allows the stop; failures fail open. The prompt text
|
|
5
|
+
// is never persisted, so the gate arms on `permissionMode === "plan"`, on the ledger's lit-plan
|
|
6
|
+
// discipline marker for the turn, and on a plan file written this turn that carries zero rows. At
|
|
7
|
+
// most two blocks per session; after that it passes with a stderr warning so a condition the model
|
|
8
|
+
// cannot resolve never loops.
|
|
9
|
+
|
|
10
|
+
import { existsSync, lstatSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
11
|
+
import { join } from 'node:path';
|
|
12
|
+
|
|
13
|
+
import { countImplementationRows } from '../skills/lit-plan/scripts/scaffold-plan.mjs';
|
|
14
|
+
|
|
15
|
+
export const PLAN_GATE_SIGNAL = 'plan-gate-block';
|
|
16
|
+
export const PLAN_GATE_MAX_BLOCKS = 2;
|
|
17
|
+
const SCAFFOLD = '.grok/skills/lit-plan/scripts/scaffold-plan.mjs';
|
|
18
|
+
const MAX_PLAN_BYTES = 256 * 1024;
|
|
19
|
+
|
|
20
|
+
function ledgerRecords(ledgerFile, sessionId) {
|
|
21
|
+
if (!existsSync(ledgerFile)) return [];
|
|
22
|
+
return readFileSync(ledgerFile, 'utf8')
|
|
23
|
+
.split(/\r?\n/)
|
|
24
|
+
.filter(Boolean)
|
|
25
|
+
.map((line) => JSON.parse(line))
|
|
26
|
+
.filter((record) => record.sessionId === sessionId);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function turnStart(records, promptId) {
|
|
30
|
+
const prompts = records.filter((record) => record.event === 'UserPromptSubmit');
|
|
31
|
+
const matching = typeof promptId === 'string' ? prompts.filter((record) => record.promptId === promptId) : [];
|
|
32
|
+
const start = (matching.length > 0 ? matching : prompts).at(-1);
|
|
33
|
+
return {
|
|
34
|
+
since: start ? Date.parse(start.recordedAt) : null,
|
|
35
|
+
litPlanTurn: start?.discipline === 'lit-plan',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function plansWrittenSince(workspaceRoot, since) {
|
|
40
|
+
const directory = join(workspaceRoot, 'plans');
|
|
41
|
+
if (!existsSync(directory) || lstatSync(directory).isSymbolicLink() || !statSync(directory).isDirectory()) return [];
|
|
42
|
+
const plans = [];
|
|
43
|
+
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
44
|
+
if (!entry.isFile() || !entry.name.endsWith('.md')) continue;
|
|
45
|
+
const path = join(directory, entry.name);
|
|
46
|
+
const status = statSync(path);
|
|
47
|
+
if (status.size > MAX_PLAN_BYTES) continue;
|
|
48
|
+
if (since !== null && status.mtimeMs < since) continue;
|
|
49
|
+
plans.push({ name: `plans/${entry.name}`, mtimeMs: status.mtimeMs, rows: countImplementationRows(readFileSync(path, 'utf8')) });
|
|
50
|
+
}
|
|
51
|
+
return plans.sort((left, right) => right.mtimeMs - left.mtimeMs);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Decide whether this Stop fire must block. Returns `{ block: false }`, `{ block: true, reason }`,
|
|
56
|
+
* or `{ block: false, warning }` when the per-session cap has been reached.
|
|
57
|
+
*/
|
|
58
|
+
export function evaluatePlanGate({ event, workspaceRoot, sessionId, ledgerFile }) {
|
|
59
|
+
if (event.reason !== undefined && event.reason !== 'end_turn') return { block: false };
|
|
60
|
+
if (event.subagentType !== undefined) return { block: false };
|
|
61
|
+
|
|
62
|
+
const records = ledgerRecords(ledgerFile, sessionId);
|
|
63
|
+
const { since, litPlanTurn } = turnStart(records, event.promptId);
|
|
64
|
+
const planMode = event.permissionMode === 'plan' || litPlanTurn;
|
|
65
|
+
const written = plansWrittenSince(workspaceRoot, since);
|
|
66
|
+
const newest = written[0];
|
|
67
|
+
|
|
68
|
+
let reason = null;
|
|
69
|
+
if (planMode && !newest) {
|
|
70
|
+
reason = `lit-plan must persist plans/<slug>.md before finishing this planning turn: run \`node ${SCAFFOLD} <slug>\` from the project root, append column-zero \`- [ ] N. <title>\` task rows under "## Todos", then run \`node ${SCAFFOLD} --check plans/<slug>.md\`.`;
|
|
71
|
+
} else if (newest && newest.rows === 0 && (planMode || since !== null)) {
|
|
72
|
+
reason = `${newest.name} was written this turn but has no column-zero \`- [ ] 1. <title>\` task row; start-work cannot execute it. Append the task rows under "## Todos", then run \`node ${SCAFFOLD} --check ${newest.name}\`.`;
|
|
73
|
+
}
|
|
74
|
+
if (reason === null) return { block: false };
|
|
75
|
+
|
|
76
|
+
const blocks = records.filter((record) => record.signal === PLAN_GATE_SIGNAL).length;
|
|
77
|
+
if (blocks >= PLAN_GATE_MAX_BLOCKS) {
|
|
78
|
+
return { block: false, warning: `LitGrok plan gate: ${blocks} blocks already issued this session; passing with a warning. ${reason}` };
|
|
79
|
+
}
|
|
80
|
+
return { block: true, reason };
|
|
81
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// A documented edited-file path or tool-result field would make this ledger richer; neither is documented.
|
|
4
|
+
// Record only toolName and a digest of the opaque documented toolInput, never its contents.
|
|
5
|
+
import { recordPassiveEvent } from './record-passive-event.mjs';
|
|
6
|
+
|
|
7
|
+
await recordPassiveEvent('PostToolUse');
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import {
|
|
3
|
+
closeSync,
|
|
4
|
+
constants,
|
|
5
|
+
existsSync,
|
|
6
|
+
fstatSync,
|
|
7
|
+
fsyncSync,
|
|
8
|
+
lstatSync,
|
|
9
|
+
mkdirSync,
|
|
10
|
+
openSync,
|
|
11
|
+
readFileSync,
|
|
12
|
+
realpathSync,
|
|
13
|
+
writeSync,
|
|
14
|
+
} from 'node:fs';
|
|
15
|
+
import { isAbsolute, join } from 'node:path';
|
|
16
|
+
|
|
17
|
+
const MAX_EVENT_BYTES = 1024 * 1024;
|
|
18
|
+
const MAX_LEDGER_BYTES = 8 * 1024 * 1024;
|
|
19
|
+
const TOOL_EVENTS = new Set(['PostToolUse', 'PostToolUseFailure']);
|
|
20
|
+
const RECORD_SCHEMA = 'litgrok.hook-event/v1';
|
|
21
|
+
|
|
22
|
+
class RecorderError extends Error {
|
|
23
|
+
constructor(code) {
|
|
24
|
+
super(code);
|
|
25
|
+
this.code = code;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function requireString(value, code) {
|
|
30
|
+
if (typeof value !== 'string' || value.length === 0 || value.includes('\0')) throw new RecorderError(code);
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function normalizedEventName(value) {
|
|
35
|
+
return requireString(value, 'EVENT_NAME_MISSING').replace(/[^A-Za-z0-9]/g, '').toLowerCase();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function readEvent() {
|
|
39
|
+
let input = '';
|
|
40
|
+
for await (const chunk of process.stdin) {
|
|
41
|
+
input += chunk;
|
|
42
|
+
if (Buffer.byteLength(input) > MAX_EVENT_BYTES) throw new RecorderError('EVENT_TOO_LARGE');
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const event = JSON.parse(input);
|
|
46
|
+
if (!event || typeof event !== 'object' || Array.isArray(event)) throw new Error();
|
|
47
|
+
return event;
|
|
48
|
+
} catch {
|
|
49
|
+
throw new RecorderError('EVENT_INVALID_JSON');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function verifiedEnvironment(event, expectedEvent) {
|
|
54
|
+
const environmentHookEvent = process.env.GROK_HOOK_EVENT;
|
|
55
|
+
const stdinHookEvent = event.hookEventName;
|
|
56
|
+
const hookEvent = requireString(environmentHookEvent || stdinHookEvent, 'EVENT_NAME_MISSING');
|
|
57
|
+
const hookName = requireString(process.env.GROK_HOOK_NAME, 'ENV_HOOK_NAME_MISSING');
|
|
58
|
+
const sessionId = requireString(process.env.GROK_SESSION_ID, 'ENV_SESSION_ID_MISSING');
|
|
59
|
+
const workspaceRoot = requireString(process.env.GROK_WORKSPACE_ROOT, 'ENV_WORKSPACE_ROOT_MISSING');
|
|
60
|
+
|
|
61
|
+
if (normalizedEventName(hookEvent) !== normalizedEventName(expectedEvent)) throw new RecorderError('EVENT_NAME_MISMATCH');
|
|
62
|
+
if (environmentHookEvent && stdinHookEvent && normalizedEventName(environmentHookEvent) !== normalizedEventName(stdinHookEvent)) {
|
|
63
|
+
throw new RecorderError('EVENT_NAME_MISMATCH');
|
|
64
|
+
}
|
|
65
|
+
if (event.sessionId !== sessionId) throw new RecorderError('SESSION_ID_MISMATCH');
|
|
66
|
+
if (event.workspaceRoot !== workspaceRoot) throw new RecorderError('WORKSPACE_ROOT_MISMATCH');
|
|
67
|
+
if (!isAbsolute(workspaceRoot)) throw new RecorderError('WORKSPACE_ROOT_NOT_ABSOLUTE');
|
|
68
|
+
|
|
69
|
+
const eventCwd = requireString(event.cwd, 'EVENT_CWD_MISSING');
|
|
70
|
+
if (!isAbsolute(eventCwd)) throw new RecorderError('EVENT_CWD_NOT_ABSOLUTE');
|
|
71
|
+
|
|
72
|
+
let realWorkspaceRoot;
|
|
73
|
+
try {
|
|
74
|
+
realWorkspaceRoot = realpathSync(workspaceRoot);
|
|
75
|
+
} catch {
|
|
76
|
+
throw new RecorderError('WORKSPACE_ROOT_UNAVAILABLE');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return { eventCwd, hookName, realWorkspaceRoot, sessionId, workspaceRoot };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function ensureDirectory(path) {
|
|
83
|
+
if (!existsSync(path)) {
|
|
84
|
+
try {
|
|
85
|
+
mkdirSync(path, { mode: 0o700 });
|
|
86
|
+
} catch (error) {
|
|
87
|
+
if (error?.code !== 'EEXIST') throw error;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const status = lstatSync(path);
|
|
91
|
+
if (!status.isDirectory() || status.isSymbolicLink()) throw new RecorderError('LEDGER_DIRECTORY_UNSAFE');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function ledgerPath(realWorkspaceRoot, sessionId) {
|
|
95
|
+
const grokDirectory = join(realWorkspaceRoot, '.grok');
|
|
96
|
+
const productDirectory = join(grokDirectory, 'litgrok');
|
|
97
|
+
const ledgerDirectory = join(productDirectory, 'session-ledger');
|
|
98
|
+
for (const path of [grokDirectory, productDirectory, ledgerDirectory]) ensureDirectory(path);
|
|
99
|
+
const sessionKey = createHash('sha256').update(sessionId).digest('hex').slice(0, 32);
|
|
100
|
+
return join(ledgerDirectory, `${sessionKey}.jsonl`);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function claimSessionIgnition(event) {
|
|
104
|
+
const environment = verifiedEnvironment(event, 'SessionStart');
|
|
105
|
+
if (environment.sessionId.length > 512) throw new RecorderError('SESSION_ID_INVALID');
|
|
106
|
+
const path = ledgerPath(environment.realWorkspaceRoot, environment.sessionId).replace(/\.jsonl$/u, '.ignited');
|
|
107
|
+
const noFollow = constants.O_NOFOLLOW ?? 0;
|
|
108
|
+
try {
|
|
109
|
+
// An empty exclusive marker claims this session atomically, including replays.
|
|
110
|
+
closeSync(openSync(path, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | noFollow, 0o600));
|
|
111
|
+
return true;
|
|
112
|
+
} catch (error) {
|
|
113
|
+
if (error?.code !== 'EEXIST') throw error;
|
|
114
|
+
const status = lstatSync(path);
|
|
115
|
+
if (!status.isFile() || status.isSymbolicLink() || status.size !== 0) throw new RecorderError('IGNITION_MARKER_UNSAFE');
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function validateExistingLedger(path, sessionId) {
|
|
121
|
+
if (!existsSync(path)) return;
|
|
122
|
+
const status = lstatSync(path);
|
|
123
|
+
if (!status.isFile() || status.isSymbolicLink() || status.size > MAX_LEDGER_BYTES) {
|
|
124
|
+
throw new RecorderError('LEDGER_FILE_UNSAFE');
|
|
125
|
+
}
|
|
126
|
+
const text = readFileSync(path, 'utf8');
|
|
127
|
+
for (const line of text.split(/\r?\n/).filter(Boolean)) {
|
|
128
|
+
try {
|
|
129
|
+
const record = JSON.parse(line);
|
|
130
|
+
if (record.schema !== RECORD_SCHEMA || record.sessionId !== sessionId) throw new Error();
|
|
131
|
+
} catch {
|
|
132
|
+
throw new RecorderError('LEDGER_IDENTITY_MISMATCH');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function toolRecord(event, expectedEvent) {
|
|
138
|
+
if (!TOOL_EVENTS.has(expectedEvent)) return undefined;
|
|
139
|
+
const name = requireString(event.toolName, 'TOOL_NAME_MISSING');
|
|
140
|
+
if (!Object.hasOwn(event, 'toolInput')) throw new RecorderError('TOOL_INPUT_MISSING');
|
|
141
|
+
return {
|
|
142
|
+
name,
|
|
143
|
+
inputSha256: createHash('sha256').update(JSON.stringify(event.toolInput)).digest('hex'),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function appendRecord(path, record) {
|
|
148
|
+
validateExistingLedger(path, record.sessionId);
|
|
149
|
+
const noFollow = constants.O_NOFOLLOW ?? 0;
|
|
150
|
+
const descriptor = openSync(
|
|
151
|
+
path,
|
|
152
|
+
constants.O_WRONLY | constants.O_APPEND | constants.O_CREAT | noFollow,
|
|
153
|
+
0o600,
|
|
154
|
+
);
|
|
155
|
+
try {
|
|
156
|
+
if (!fstatSync(descriptor).isFile()) throw new RecorderError('LEDGER_FILE_UNSAFE');
|
|
157
|
+
writeSync(descriptor, `${JSON.stringify(record)}\n`);
|
|
158
|
+
fsyncSync(descriptor);
|
|
159
|
+
} finally {
|
|
160
|
+
closeSync(descriptor);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function appendSessionRecord(ledgerFile, baseRecord, fields) {
|
|
165
|
+
appendRecord(ledgerFile, { ...baseRecord, ...fields, recordedAt: new Date().toISOString() });
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export async function recordPassiveEvent(expectedEvent) {
|
|
169
|
+
try {
|
|
170
|
+
const event = await readEvent();
|
|
171
|
+
const environment = verifiedEnvironment(event, expectedEvent);
|
|
172
|
+
const record = {
|
|
173
|
+
schema: RECORD_SCHEMA,
|
|
174
|
+
event: expectedEvent,
|
|
175
|
+
sessionId: environment.sessionId,
|
|
176
|
+
cwd: environment.eventCwd,
|
|
177
|
+
workspaceRoot: environment.workspaceRoot,
|
|
178
|
+
hookName: environment.hookName,
|
|
179
|
+
recordedAt: new Date().toISOString(),
|
|
180
|
+
};
|
|
181
|
+
const tool = toolRecord(event, expectedEvent);
|
|
182
|
+
if (tool) record.tool = tool;
|
|
183
|
+
if (typeof event.promptId === 'string') record.promptId = event.promptId;
|
|
184
|
+
if (expectedEvent === 'UserPromptSubmit' && typeof event.prompt === 'string'
|
|
185
|
+
&& /(?:^|[\s/])lit-plan(?:$|[^\w-])/iu.test(event.prompt)) {
|
|
186
|
+
record.discipline = 'lit-plan';
|
|
187
|
+
}
|
|
188
|
+
if (expectedEvent === 'Stop') record.signal = 'turn-ended';
|
|
189
|
+
const ledgerFile = ledgerPath(environment.realWorkspaceRoot, environment.sessionId);
|
|
190
|
+
appendRecord(ledgerFile, record);
|
|
191
|
+
return { environment, event, ledgerFile, record };
|
|
192
|
+
} catch (error) {
|
|
193
|
+
const code = error instanceof RecorderError ? error.code : 'RECORDER_FAILED';
|
|
194
|
+
process.stderr.write(`LitGrok passive hook recorder: ${code}\n`);
|
|
195
|
+
process.exitCode = 1;
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { pendingReviewState } from '../skills/skill-observer/scripts/skill-loop.mjs';
|
|
4
|
+
import { renderMark } from './lit-mark.mjs';
|
|
5
|
+
import { claimSessionIgnition } from './record-passive-event.mjs';
|
|
6
|
+
|
|
7
|
+
let input = '';
|
|
8
|
+
for await (const chunk of process.stdin) {
|
|
9
|
+
input += chunk;
|
|
10
|
+
if (Buffer.byteLength(input) > 1024 * 1024) break;
|
|
11
|
+
}
|
|
12
|
+
let event;
|
|
13
|
+
try {
|
|
14
|
+
if (Buffer.byteLength(input) > 1024 * 1024) throw new Error('EVENT_TOO_LARGE');
|
|
15
|
+
event = JSON.parse(input);
|
|
16
|
+
if (claimSessionIgnition(event)) process.stdout.write(`${renderMark({ args: process.argv.slice(2) }).join('\n')}\n`);
|
|
17
|
+
} catch (error) {
|
|
18
|
+
process.stderr.write(`LitGrok session-start: ${error.code || 'EVENT_INVALID'}\n`);
|
|
19
|
+
process.exitCode = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
process.stdout.write('LitGrok payload present: skills, project rules, hooks, and the npx installer.\n');
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
const sessionId = process.env.GROK_SESSION_ID || event.sessionId;
|
|
26
|
+
const workspaceRoot = process.env.GROK_WORKSPACE_ROOT || event.workspaceRoot;
|
|
27
|
+
if (!process.exitCode && sessionId && workspaceRoot && event.sessionId === sessionId && event.workspaceRoot === workspaceRoot) {
|
|
28
|
+
const state = pendingReviewState({
|
|
29
|
+
cwd: workspaceRoot,
|
|
30
|
+
env: { ...process.env, LITGROK_WORKSPACE_ROOT: workspaceRoot },
|
|
31
|
+
sessionId,
|
|
32
|
+
});
|
|
33
|
+
if (state.pending) process.stdout.write(`LitGrok: pending review for session ${sessionId} — run /skill-observer review\n`);
|
|
34
|
+
}
|
|
35
|
+
} catch {
|
|
36
|
+
// The installed-payload banner is still useful when optional event state is unavailable.
|
|
37
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// No completion-summary field is documented, so this records only the documented turn-end event and identity.
|
|
4
|
+
import { appendSessionRecord, recordPassiveEvent } from './record-passive-event.mjs';
|
|
5
|
+
import { recordTurnEnded } from '../skills/skill-observer/scripts/skill-loop.mjs';
|
|
6
|
+
import { PLAN_GATE_SIGNAL, evaluatePlanGate } from './plan-gate.mjs';
|
|
7
|
+
|
|
8
|
+
if (process.env.LITGROK_SKILL_REVIEW !== '1') {
|
|
9
|
+
const observed = await recordPassiveEvent('Stop');
|
|
10
|
+
if (observed) {
|
|
11
|
+
recordTurnEnded({
|
|
12
|
+
cwd: observed.environment.realWorkspaceRoot,
|
|
13
|
+
env: { ...process.env, LITGROK_WORKSPACE_ROOT: observed.environment.realWorkspaceRoot },
|
|
14
|
+
sessionId: observed.environment.sessionId,
|
|
15
|
+
});
|
|
16
|
+
// Plan gate: a planning turn must persist plans/<slug>.md; evaluated after the ledger record so a block is counted.
|
|
17
|
+
let gate;
|
|
18
|
+
try {
|
|
19
|
+
gate = evaluatePlanGate({
|
|
20
|
+
event: observed.event,
|
|
21
|
+
workspaceRoot: observed.environment.realWorkspaceRoot,
|
|
22
|
+
sessionId: observed.environment.sessionId,
|
|
23
|
+
ledgerFile: observed.ledgerFile,
|
|
24
|
+
});
|
|
25
|
+
} catch (error) {
|
|
26
|
+
process.stderr.write(`LitGrok plan gate: PLAN_GATE_FAILED ${error instanceof Error ? error.message : String(error)}\n`);
|
|
27
|
+
gate = { block: false };
|
|
28
|
+
}
|
|
29
|
+
if (gate.block) {
|
|
30
|
+
appendSessionRecord(observed.ledgerFile, observed.record, { signal: PLAN_GATE_SIGNAL, reason: gate.reason });
|
|
31
|
+
process.stdout.write(`${JSON.stringify({ decision: 'block', reason: gate.reason })}\n`);
|
|
32
|
+
} else if (gate.warning) {
|
|
33
|
+
process.stderr.write(`${gate.warning}\n`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|