@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,92 @@
|
|
|
1
|
+
Access is a property of the markup and the flow, not a layer applied at the end. Every rule here
|
|
2
|
+
belongs in `accessibility` or `localization` with a proof channel attached.
|
|
3
|
+
|
|
4
|
+
## Structure before styling
|
|
5
|
+
|
|
6
|
+
Build the outline first and read it as a plain document. A correct outline removes most ARIA.
|
|
7
|
+
|
|
8
|
+
- one `h1` per view, then ranks in order with no level skipped
|
|
9
|
+
- landmarks present and unique: banner, navigation, one `main`, complementary, contentinfo
|
|
10
|
+
- native `button`, `a`, `input`, `dialog`, `table` before any composite widget
|
|
11
|
+
- an element needing `role`, `tabindex`, and three key handlers is the wrong element
|
|
12
|
+
|
|
13
|
+
## Visual access
|
|
14
|
+
|
|
15
|
+
Measure contrast against the pixels actually painted behind the text, in every theme and state.
|
|
16
|
+
|
|
17
|
+
- 4.5:1 body text, 3:1 at 24px or 19px bold, 3:1 for icons and control boundaries
|
|
18
|
+
- focus indicator 2px or thicker, at 3:1 against control and surroundings
|
|
19
|
+
- state never carried by hue alone; add a label, glyph, shape, or position
|
|
20
|
+
- 200% zoom reflows without loss; 400% must not require scrolling on two axes
|
|
21
|
+
|
|
22
|
+
## Cognitive access
|
|
23
|
+
|
|
24
|
+
Cut what the user must remember, infer, or type twice.
|
|
25
|
+
|
|
26
|
+
- one primary action per view, everything else visibly subordinate
|
|
27
|
+
- say what happened, what it means now, and what to do next, in that order
|
|
28
|
+
|
|
29
|
+
## Names, errors, and announcements
|
|
30
|
+
|
|
31
|
+
Write names and messages that survive being heard alone, with no screen.
|
|
32
|
+
|
|
33
|
+
- the accessible name contains the visible label; on conflict the visible label wins
|
|
34
|
+
- an error names the field, the problem, and the correction
|
|
35
|
+
- bind errors with `aria-describedby`; focus the first invalid control
|
|
36
|
+
- announce async results through a live region; a visual change alone is silent
|
|
37
|
+
|
|
38
|
+
## Localization
|
|
39
|
+
|
|
40
|
+
Assume translation and mirroring from the first commit.
|
|
41
|
+
|
|
42
|
+
- interpolate whole sentences; never assemble copy from fragments
|
|
43
|
+
- logical properties (`margin-inline`, `inset-inline`) so `dir="rtl"` mirrors
|
|
44
|
+
- locale-aware dates, numbers, currency, pluralization, and collation
|
|
45
|
+
- `lang` on the root element and at every inline language change
|
|
46
|
+
|
|
47
|
+
## CJK and IME checklist
|
|
48
|
+
|
|
49
|
+
Latin-only testing hides these defects. Exercise Korean, Japanese, and Chinese copy.
|
|
50
|
+
|
|
51
|
+
- Korean prose: `word-break: keep-all` with `overflow-wrap: anywhere` for long tokens
|
|
52
|
+
- declare a per-script font stack; check for tofu, synthetic bold, shifted baselines
|
|
53
|
+
- read `event.isComposing`; hold validation, filtering, and submit until `compositionend`
|
|
54
|
+
- accept full-width digits and Latin in inputs; normalize with NFKC before comparison
|
|
55
|
+
|
|
56
|
+
## Adaptive preferences
|
|
57
|
+
|
|
58
|
+
Each preference is a stated requirement, not a hint. Verify all four.
|
|
59
|
+
|
|
60
|
+
- `prefers-reduced-motion: reduce` removes travel and parallax, keeps state
|
|
61
|
+
- `forced-colors: active` yields to system keywords; no hardcoded background survives
|
|
62
|
+
- `prefers-contrast: more` strengthens text and boundaries, not only the accent
|
|
63
|
+
- size in `rem` so OS text scaling applies; never pin the root to `px`
|
|
64
|
+
|
|
65
|
+
## Proof channels
|
|
66
|
+
|
|
67
|
+
Each channel finds defects the others cannot. Run all four and name them in `evidence_policy`
|
|
68
|
+
with the route and state each covered.
|
|
69
|
+
|
|
70
|
+
1. `keyboard`: full traversal, no trap, visible focus, every action reachable.
|
|
71
|
+
2. `screen-reader`: name, role, value, state, announcement order on one real reader.
|
|
72
|
+
3. `accessibility-tree`: the repository's automated audit per route and critical state.
|
|
73
|
+
4. `localization`: a second locale at 200% zoom, under forced colors and reduced motion.
|
|
74
|
+
|
|
75
|
+
## Severity ladder
|
|
76
|
+
|
|
77
|
+
Triage by what the user can no longer do, then order the queue.
|
|
78
|
+
|
|
79
|
+
- S1: a keyboard or screen-reader user cannot finish. Report `FAIL`; blocks release.
|
|
80
|
+
- S2: the task finishes with wrong or missing information. Fix before merge.
|
|
81
|
+
- S3: finishes at unreasonable cost. Record in `accepted_exceptions` with an owner.
|
|
82
|
+
- S4: cosmetic or preference-level. Record in `omissions` with a reason and owner.
|
|
83
|
+
|
|
84
|
+
## Failure patterns
|
|
85
|
+
|
|
86
|
+
Reject:
|
|
87
|
+
|
|
88
|
+
- an overlay widget or audit score offered in place of evidence
|
|
89
|
+
- `outline: none` with no replacement indicator reaching 3:1
|
|
90
|
+
- `aria-hidden` on anything focusable, or a role restating the native element
|
|
91
|
+
- a positive `tabindex`, or focus order diverging from reading order
|
|
92
|
+
- validation fired mid-composition, or CJK copy verified only with Latin strings
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
Every interactive surface must answer three questions: what can be done here, what is happening
|
|
2
|
+
now, what just happened. Settle all three in `inventory.interactions` and `inventory.states`
|
|
3
|
+
first.
|
|
4
|
+
|
|
5
|
+
## State inventory
|
|
6
|
+
|
|
7
|
+
List the states each element can occupy. A state nobody listed is a state nobody built.
|
|
8
|
+
|
|
9
|
+
- default, hover, active, focus-visible, disabled, read-only
|
|
10
|
+
- selected, expanded, current, checked, indeterminate
|
|
11
|
+
- loading, optimistic, retrying, succeeded, failed
|
|
12
|
+
- empty, partial, truncated, overflowing, stale
|
|
13
|
+
|
|
14
|
+
Each maps to one contract state kind: `loading`, `empty`, `error`, `success`, `disabled`,
|
|
15
|
+
`permission`, `offline`, `ready`.
|
|
16
|
+
|
|
17
|
+
## Feedback proportional to consequence
|
|
18
|
+
|
|
19
|
+
Weigh the response against what the action costs to undo. Cheap actions stay quiet.
|
|
20
|
+
|
|
21
|
+
| Consequence | Required feedback |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Reversible, local | Immediate change, no confirmation step |
|
|
24
|
+
| Reversible, remote | Inline pending state plus undo for 5-10s |
|
|
25
|
+
| Longer than 1s | Progress in place; skeleton only where layout is known |
|
|
26
|
+
| Irreversible | Confirmation naming object and effect; typed name for bulk delete |
|
|
27
|
+
| Failed | Persistent inline error, input preserved, retry within reach |
|
|
28
|
+
|
|
29
|
+
## Input and validation timing
|
|
30
|
+
|
|
31
|
+
Validate when the user can act on the answer, not while it is still being typed.
|
|
32
|
+
|
|
33
|
+
- one field: validate on blur; cross-field rules: validate on submit
|
|
34
|
+
- once a field has failed, revalidate on input so the error clears
|
|
35
|
+
- debounce remote checks at 300-500ms and cancel superseded requests
|
|
36
|
+
|
|
37
|
+
## Focus rules
|
|
38
|
+
|
|
39
|
+
Focus is application state. Move it on purpose and put it back exactly.
|
|
40
|
+
|
|
41
|
+
1. On open, focus the first meaningful control, not the container.
|
|
42
|
+
2. Contain focus in a modal surface; `Escape` closes unless it discards data silently.
|
|
43
|
+
3. On dismissal, return focus to the opener; if it is gone, focus its nearest surviving
|
|
44
|
+
ancestor, never `body`.
|
|
45
|
+
4. After deleting a row, focus the next row, or the list when none remains.
|
|
46
|
+
5. On route change, focus the new `h1` or the skip target.
|
|
47
|
+
|
|
48
|
+
## Gestures and their keyboard equivalents
|
|
49
|
+
|
|
50
|
+
Treat a gesture as an accelerator over a control that already exists. A touch-only path is a
|
|
51
|
+
defect.
|
|
52
|
+
|
|
53
|
+
- swipe to dismiss requires a close control
|
|
54
|
+
- drag to reorder requires up and down controls or a position field
|
|
55
|
+
- pull to refresh requires a refresh control
|
|
56
|
+
|
|
57
|
+
## The motion test
|
|
58
|
+
|
|
59
|
+
Answer all three before adding motion. One "no" removes it.
|
|
60
|
+
|
|
61
|
+
1. Which relationship does it explain: origin, continuity, hierarchy, or outcome?
|
|
62
|
+
2. Does removing it lose information rather than polish?
|
|
63
|
+
3. Does it finish within 400ms, with completion never waiting on it?
|
|
64
|
+
|
|
65
|
+
## Choreography and sequencing
|
|
66
|
+
|
|
67
|
+
Sequence movement to direct attention. Specify trigger, property, duration, easing, interruption.
|
|
68
|
+
|
|
69
|
+
- 100-150ms direct feedback, 200-300ms entry and exit, 300-400ms layout change
|
|
70
|
+
- stagger 20-40ms per item, capped at five; the remainder arrive together
|
|
71
|
+
- animate `transform` and `opacity` only, and never queue a transition
|
|
72
|
+
|
|
73
|
+
## Reduced motion without lost meaning
|
|
74
|
+
|
|
75
|
+
Under `prefers-reduced-motion: reduce`, keep the information and drop the travel.
|
|
76
|
+
|
|
77
|
+
- replace slide and scale with a 100ms opacity change or an instant swap
|
|
78
|
+
- keep progress indicators; make them determinate or a static pending label
|
|
79
|
+
- the reduced path still shows every confirmation and result announcement
|
|
80
|
+
|
|
81
|
+
## The record handed to review
|
|
82
|
+
|
|
83
|
+
Give the independent review pass one entry per interaction, keyed to the design contract hash.
|
|
84
|
+
Anything missing counts as untested.
|
|
85
|
+
|
|
86
|
+
- trigger and target element with its accessible name
|
|
87
|
+
- every state, with its visual and its announced change
|
|
88
|
+
- keyboard sequence: keys, focus after each, exit path
|
|
89
|
+
- async contract: pending threshold, timeout, error text, retry
|
|
90
|
+
- motion: property, duration, easing, interruption, reduced path
|
|
91
|
+
- evidence: route, viewport, state, and how the state was reached
|
|
92
|
+
|
|
93
|
+
## Failure patterns
|
|
94
|
+
|
|
95
|
+
Reject:
|
|
96
|
+
|
|
97
|
+
- an interaction with no pending, empty, or failure state named
|
|
98
|
+
- validation on every keystroke, or an error that discards user input
|
|
99
|
+
- focus dropped to `body` after dismissal, or a dialog with no return target
|
|
100
|
+
- a gesture, hover, or drag as the only route to an action
|
|
101
|
+
- motion longer than 400ms, or completion gated on an animation callback
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Every interface request runs in exactly one lane. The lane fixes the evidence you gather, what
|
|
2
|
+
you may edit, what stays frozen, and what closes the work.
|
|
3
|
+
|
|
4
|
+
## Selecting a lane
|
|
5
|
+
|
|
6
|
+
Pick from observable repository facts, not from phrasing. Name the lane before the first edit.
|
|
7
|
+
|
|
8
|
+
1. No production UI exists for the surface: `new-build`.
|
|
9
|
+
2. UI exists and the request repairs or extends it: `brownfield`.
|
|
10
|
+
3. UI exists and the request replaces its visual language: `redesign`.
|
|
11
|
+
4. A screenshot, mockup, or live product is the acceptance target: `reference-fidelity`.
|
|
12
|
+
5. The deliverable is primitives other surfaces consume: `design-system`.
|
|
13
|
+
|
|
14
|
+
## Lane: new-build
|
|
15
|
+
|
|
16
|
+
Settle the system before drawing screens. Your first component becomes the convention.
|
|
17
|
+
|
|
18
|
+
- Evidence: package boundaries, routing, data layer, global styles, locales, device classes.
|
|
19
|
+
- Permitted: every file in the new surface, plus new tokens and primitives.
|
|
20
|
+
- Frozen: file layout, naming, import boundaries, test placement, data-fetching pattern.
|
|
21
|
+
- Failure mode: a second styling system grows beside the one already in the repository.
|
|
22
|
+
- Exit: inventory finite, every declared state renders, no raw value a token already names.
|
|
23
|
+
|
|
24
|
+
## Lane: brownfield
|
|
25
|
+
|
|
26
|
+
Audit before editing. The existing system is the specification until told otherwise.
|
|
27
|
+
|
|
28
|
+
- Evidence: covering primitives, their variants and call sites, untouched captures at two widths.
|
|
29
|
+
- Permitted: the named defect and its direct call sites.
|
|
30
|
+
- Frozen: exported props, imported token and class names, keyboard model, test assertions.
|
|
31
|
+
- Failure mode: a local fix mutates a shared primitive and breaks surfaces nobody opened.
|
|
32
|
+
- Exit: defect gone, and every other consumer of the touched code has parity evidence.
|
|
33
|
+
|
|
34
|
+
## Lane: redesign
|
|
35
|
+
|
|
36
|
+
Current behavior is the specification. Only the visual language is negotiable.
|
|
37
|
+
|
|
38
|
+
- Evidence: baseline capture of every affected route and state, the debt map, keyboard paths.
|
|
39
|
+
- Permitted: tokens, spacing, typography, density, motion, component internals.
|
|
40
|
+
- Frozen: task paths and step counts, URLs and parameters, data meaning, permissions, copy.
|
|
41
|
+
- Failure mode: old and new surfaces coexist with no owner for the remainder.
|
|
42
|
+
- Exit: parity holds at every stage boundary; no route stranded on the superseded system.
|
|
43
|
+
|
|
44
|
+
## Lane: reference-fidelity
|
|
45
|
+
|
|
46
|
+
Separate what the reference proves from what you supplied. Only observed claims are criteria.
|
|
47
|
+
|
|
48
|
+
- Evidence: provenance and permission, pixel dimensions, device scale, the exact state depicted.
|
|
49
|
+
- Permitted: the depicted surface, to the agreed fidelity level.
|
|
50
|
+
- Frozen: the repository stack, the accessibility floor, licensing of every mark and asset.
|
|
51
|
+
- Failure mode: one width matches while responsive and interaction behavior is invented.
|
|
52
|
+
- Exit: every observed claim checked; every inference recorded as an assumption with an owner.
|
|
53
|
+
|
|
54
|
+
## Lane: design-system
|
|
55
|
+
|
|
56
|
+
The consumers are the deliverable, not the gallery. Specify the contract first.
|
|
57
|
+
|
|
58
|
+
- Evidence: duplicated implementations across consumers, variants in use, call sites.
|
|
59
|
+
- Permitted: primitive internals, token definitions, documented variants, migration paths.
|
|
60
|
+
- Frozen: published prop contracts until a migration exists; keyboard model of replaced controls.
|
|
61
|
+
- Failure mode: a gallery ships that no production route adopts.
|
|
62
|
+
- Exit: two representative consumers migrated and passing, with a dated removal plan.
|
|
63
|
+
|
|
64
|
+
## Requests spanning two lanes
|
|
65
|
+
|
|
66
|
+
Split it; never average it.
|
|
67
|
+
|
|
68
|
+
1. Name both lanes and assign each surface to exactly one.
|
|
69
|
+
2. Write one contract per lane, each with its own inventory, budgets, and exit.
|
|
70
|
+
3. Sequence them: repairs before a redesign of the same surface, primitives before consumers.
|
|
71
|
+
4. If the split is refused, apply the stricter lane's frozen list to the whole scope.
|
|
72
|
+
5. Re-declare the lane as soon as discovery changes it, then revalidate the contract.
|
|
73
|
+
|
|
74
|
+
## Where the lane is recorded
|
|
75
|
+
|
|
76
|
+
The lane is a required, machine-checkable `lane` field of the authoritative
|
|
77
|
+
`litfamily.design-contract/v1beta2` artifact. A valid `litfamily.design-contract/v1beta1` artifact
|
|
78
|
+
remains a compatibility input for existing implementation paths. The validator rejects a missing lane,
|
|
79
|
+
an unknown lane, or a prose synonym. The review package repeats the same value beside the contract hash;
|
|
80
|
+
it does not substitute for the field. A v1alpha1 contract has no lane and is migration-only, so its
|
|
81
|
+
otherwise valid report carries `LEGACY_SCHEMA_V1ALPHA1` and `evidence_eligible: false`.
|
|
82
|
+
|
|
83
|
+
## Failure patterns
|
|
84
|
+
|
|
85
|
+
Reject:
|
|
86
|
+
|
|
87
|
+
- A change whose review package names no lane.
|
|
88
|
+
- A `brownfield` or `redesign` lane opened with no baseline capture.
|
|
89
|
+
- A lane switch first visible in the diff.
|
|
90
|
+
- A `reference-fidelity` verdict claimed from a general visual review.
|
|
91
|
+
- An unlaned change entering the independent review pass, leaving the reviewer to guess which
|
|
92
|
+
frozen list the design contract hash covers.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
|
|
2
|
+
# Frontend Perfectionist
|
|
3
|
+
|
|
4
|
+
You are a senior frontend engineer with one binding standard: **every page hits 100 in EVERY Lighthouse category, measured on a REAL browser, without sacrificing a single drop of UX quality.**
|
|
5
|
+
|
|
6
|
+
## TENETS. NON-NEGOTIABLE.
|
|
7
|
+
|
|
8
|
+
### 1. AUDIT THROUGH A REAL BROWSER. NEVER THROUGH THE CLI.
|
|
9
|
+
|
|
10
|
+
The `lighthouse` CLI runs `chrome-headless-shell` with default settings. That is **NOT** what your users see, and the number it produces will lie to you. **REJECT** any report based on the CLI, even if the CI shows green.
|
|
11
|
+
|
|
12
|
+
The correct path:
|
|
13
|
+
|
|
14
|
+
1. Build the app in production mode (`next build && next start`, `vite build && vite preview`, `astro build && astro preview`, `bun run build && bun run start`). **NEVER** measure a dev server.
|
|
15
|
+
2. Launch Playwright with `channel: "chrome"` (real Chrome stable, not the headless-shell binary).
|
|
16
|
+
3. Run Lighthouse against the Playwright-controlled page via `playwright-lighthouse` OR via `chrome-launcher` + the `lighthouse` Node API, attaching to the Playwright CDP endpoint so cookies, auth state, and warmed caches mirror what a real returning user sees.
|
|
17
|
+
4. Use the **mobile** preset (4x CPU throttle, Fast 3G) for the primary number, AND the **desktop** preset for the secondary number. Report both.
|
|
18
|
+
|
|
19
|
+
If the `playwright` skill is not loaded in this session, load it now via the `skill` tool.
|
|
20
|
+
|
|
21
|
+
### 2. 100 IN EVERY CATEGORY IS THE FLOOR.
|
|
22
|
+
|
|
23
|
+
A 99 is a regression. A 95 is a fire. You do NOT report "performance 93, accessibility 100, SEO 100, best-practices 100" as a pass. You diagnose what cost the 7 points, fix the root cause, re-run, and only report when all four panels show 100. On mobile AND desktop.
|
|
24
|
+
|
|
25
|
+
### 3. WIN THE SCORE IN THE ARCHITECTURE.
|
|
26
|
+
|
|
27
|
+
Performance is decided at architecture and code-quality level. Bundle size, render path, hydration strategy, asset pipeline, image format and dimensions, font loading, third-party scripts, critical CSS, deferred JS, route-level code splitting. These are the LEVERS that move the score. Slapping `loading="lazy"` on a hero image is not optimization. It is panic.
|
|
28
|
+
|
|
29
|
+
For EVERY failing audit, trace it back to a SPECIFIC line of code or a SPECIFIC build-config choice. Fix it at the source. No band-aids.
|
|
30
|
+
|
|
31
|
+
### 4. NEVER WEAKEN UX TO BUY POINTS.
|
|
32
|
+
|
|
33
|
+
If your fix removes a hover state, drops a CSS transition, replaces an animated mount with an abrupt one, swaps a smooth scroll-into-view for an instant jump, degrades a 60fps interaction to 30fps, or hides content you would normally render, **REJECT THE FIX**. The animation language, motion design, and tactile feel of the product are load-bearing.
|
|
34
|
+
|
|
35
|
+
Find another way:
|
|
36
|
+
|
|
37
|
+
- Split the bundle further (route-level, then component-level, then feature-flag-level).
|
|
38
|
+
- Defer non-critical paint work to `requestIdleCallback`.
|
|
39
|
+
- Move expensive work off the main thread via Web Workers (use Comlink for ergonomics).
|
|
40
|
+
- Use the `View Transitions API` for cross-route transitions.
|
|
41
|
+
- Use `content-visibility: auto` plus `contain-intrinsic-size` for offscreen sections.
|
|
42
|
+
- Use `will-change` precisely, ONLY on the property actually animating, ONLY for the duration of the animation.
|
|
43
|
+
- Preload the LCP image: `<link rel="preload" as="image" fetchpriority="high" imagesrcset="...">`.
|
|
44
|
+
- HTTP/2 server-push or `<link rel="modulepreload">` for the critical chunk.
|
|
45
|
+
- GPU-composited animations only (`transform`, `opacity`, `filter`). NEVER animate `width`, `height`, `top`, `left`, `margin`, `padding`.
|
|
46
|
+
|
|
47
|
+
### 5. LOAD THE DESIGN RULESET IN LOCKSTEP.
|
|
48
|
+
|
|
49
|
+
You **MUST** read the design ruleset (`../design/README.md`) alongside this one for any visual or layout work. That skill carries the brand-grade taste references (Apple, Stripe, Linear, Vercel, Claude, Notion, Airbnb, Figma, etc.) and the anti-AI-SaaS-slop posture.
|
|
50
|
+
|
|
51
|
+
A page that scores 100 but looks like AI SaaS slop has failed. Speed serves design; design rides on speed. **Both win or neither does.**
|
|
52
|
+
|
|
53
|
+
Use the design ruleset:
|
|
54
|
+
|
|
55
|
+
- BEFORE writing JSX/CSS: pull a relevant brand reference to ground the visual direction.
|
|
56
|
+
- DURING implementation: cross-check against the anti-slop guardrails.
|
|
57
|
+
- BEFORE declaring done: verify the page passes the design taste bar, not just the Lighthouse bar.
|
|
58
|
+
|
|
59
|
+
### 6. DESIGN SYSTEM COMPLIANCE IS NOT OPTIONAL.
|
|
60
|
+
|
|
61
|
+
The design ruleset (`../design/README.md`) enforces a **Phase 0 Design System Gate** — every project must have a `DESIGN.md` before any UI work begins. This skill enforces the other side: **every audit must verify compliance.**
|
|
62
|
+
|
|
63
|
+
During the audit loop, after Lighthouse scores pass, run a Design System Compliance check:
|
|
64
|
+
|
|
65
|
+
- **Colors**: grep the codebase for raw hex/rgb values not declared in `DESIGN.md`. Each is a violation.
|
|
66
|
+
- **Typography**: every font-size in CSS/Tailwind must map to the type scale in `DESIGN.md`. No arbitrary sizes.
|
|
67
|
+
- **Spacing**: every margin/padding/gap value must be a multiple of the base unit (4px) and ideally use a declared token.
|
|
68
|
+
- **Components**: any component used 2+ times must be documented in `DESIGN.md` Section 5. If it isn't, add it.
|
|
69
|
+
- **Depth**: if `DESIGN.md` says "borders-only", there must be zero `box-shadow` declarations. If "tonal-shift", zero borders for surface separation.
|
|
70
|
+
|
|
71
|
+
A page that scores Lighthouse 100 but uses 14 undeclared hex codes and 8 magic spacing values is **NOT DONE**. The design system is the architecture — Lighthouse measures the performance of that architecture.
|
|
72
|
+
|
|
73
|
+
### 7. REACT-SPECIFIC PERF TOOLING IS PART OF THE AUDIT.
|
|
74
|
+
|
|
75
|
+
If the project ships React, Lighthouse alone does NOT see render-layer issues by component. You MUST also run:
|
|
76
|
+
|
|
77
|
+
- **`react-doctor`** (static): cheapest. `npx react-doctor@latest --json` before any browser audit. Treat perf-category findings as audit failures.
|
|
78
|
+
- **`react-scan/lite`** (runtime, headless): injected via `page.addInitScript` in the Playwright run. Drain its `onEvent` stream and fail the audit if any commit is classified `unnecessary`.
|
|
79
|
+
|
|
80
|
+
The full recipe — including the Playwright + `playwright-lighthouse` + `react-scan/lite` integration, the per-route render budget assertion, and the React-specific root-cause checklist that EXTENDS the one below — lives in **[react-perf-tooling.md](react-perf-tooling.md)**. Read it before any React audit.
|
|
81
|
+
|
|
82
|
+
Lighthouse 100 with `react-scan` reporting 30+ unnecessary renders per route is **NOT DONE**. Both gates must clear: synthetic score AND render quality. The synthetic score lies under real load if the React layer is thrashing.
|
|
83
|
+
|
|
84
|
+
For initial install of react-scan + react-doctor (and react-grab) in a fresh React project, the canonical install snippets live in `../design/react-dev-tooling-skill.md`. Use them if the project doesn't yet have the tools wired.
|
|
85
|
+
|
|
86
|
+
## AUDIT WORKFLOW
|
|
87
|
+
|
|
88
|
+
Quick audit via the cross-platform Python CLI (macOS, Linux, Windows):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
uv run $SKILL_DIR/scripts/perfection/lighthouse-audit.py https://localhost:3000
|
|
92
|
+
uv run $SKILL_DIR/scripts/perfection/lighthouse-audit.py https://localhost:3000 --threshold 95
|
|
93
|
+
uv run $SKILL_DIR/scripts/perfection/lighthouse-audit.py https://localhost:3000 --desktop-only
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Or use the TypeScript approach directly in your test suite:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
// scripts/audit.ts
|
|
100
|
+
import { chromium } from "playwright";
|
|
101
|
+
import { playAudit } from "playwright-lighthouse";
|
|
102
|
+
|
|
103
|
+
const browser = await chromium.launch({ channel: "chrome" });
|
|
104
|
+
const context = await browser.newContext();
|
|
105
|
+
const page = await context.newPage();
|
|
106
|
+
await page.goto("http://localhost:3000/<route>");
|
|
107
|
+
|
|
108
|
+
await playAudit({
|
|
109
|
+
page,
|
|
110
|
+
port: 9222,
|
|
111
|
+
thresholds: { performance: 100, accessibility: 100, "best-practices": 100, seo: 100 },
|
|
112
|
+
reports: { formats: { html: true, json: true }, name: "lighthouse-<route>" },
|
|
113
|
+
config: { extends: "lighthouse:default", settings: { formFactor: "mobile" } },
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
await browser.close();
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Run twice per route: once `formFactor: "mobile"`, once `formFactor: "desktop"`. Both must hit 100/100/100/100.
|
|
120
|
+
|
|
121
|
+
**Diagnose from the JSON report, not the HTML.** Parse `audits[*].score < 1` programmatically to find the offenders. Do not eyeball the HTML report.
|
|
122
|
+
|
|
123
|
+
**Run 3-5 times and take the median.** A single audit can be noisy. CI must enforce the threshold on every PR.
|
|
124
|
+
|
|
125
|
+
## ROOT-CAUSE CHECKLIST (HIT THESE FIRST, ALMOST ALWAYS THE CULPRIT)
|
|
126
|
+
|
|
127
|
+
- **Render-blocking JS/CSS in the critical path.** Defer, code-split by route, inline critical CSS only.
|
|
128
|
+
- **Unsized media.** Every `<img>`, `<video>`, `<iframe>` MUST have explicit `width`/`height` or an aspect-ratio container. Unsized media causes CLS.
|
|
129
|
+
- **Wrong image format or dimensions.** Serve AVIF first, WebP fallback, JPEG last. Generate ALL responsive sizes in the build. NEVER ship an image larger than the rendered box. Use `fetchpriority="high"` on the LCP image.
|
|
130
|
+
- **Fonts.** `font-display: swap` minimum, `optional` for non-critical fonts, preload the one critical font, subset to only the characters actually used.
|
|
131
|
+
- **Third-party scripts in `<head>` synchronously.** Defer, lazy-load on first interaction, OR proxy through your own origin to remove a third-party DNS + TLS handshake from the critical path.
|
|
132
|
+
- **Hydration on routes that do not need it.** React Server Components, islands, `client:load`, ONLY where the interactivity is real. Static routes ship zero JS.
|
|
133
|
+
- **Missing semantic HTML.** `<button>` for buttons, `<a href>` for links, `<nav>` / `<main>` / `<header>` / `<footer>` landmarks, label every form input, alt-text every meaningful image, unique `<title>` per route.
|
|
134
|
+
- **Tab order, focus rings, contrast ratios, prefers-reduced-motion, ARIA correctness.** Accessibility 100 means a screen-reader user can drive the page end-to-end without help.
|
|
135
|
+
- **Meta tags.** `<title>`, `<meta name="description">`, OpenGraph, Twitter cards, structured data (JSON-LD), `lang` on `<html>`, `viewport`, canonical URL.
|
|
136
|
+
|
|
137
|
+
## ANTI-PATTERNS. REJECT ON SIGHT.
|
|
138
|
+
|
|
139
|
+
- Reporting a CLI Lighthouse score. **REJECT.** Tenet 1.
|
|
140
|
+
- Removing an animation to fix INP. **REJECT.** Switch to a CSS-only transform/opacity animation. Debounce listeners. Move heavy work off the main thread.
|
|
141
|
+
- Replacing a hero image with a placeholder to "fix" LCP. **REJECT.** Properly sized AVIF + `fetchpriority="high"` + preconnect to the image CDN is the actual fix.
|
|
142
|
+
- Disabling JS for a route to "score 100". **REJECT.** Score 100 ON the JS-enabled production build, on a real user device profile.
|
|
143
|
+
- Setting `display: none` on offscreen content to dodge audits. **REJECT.** Use `content-visibility: auto` plus proper lazy mounting. Never lie about the page.
|
|
144
|
+
- Declaring victory after a single audit run. **REJECT.** Run 3-5 times, take the median. CI must enforce the threshold.
|
|
145
|
+
- Scoring 100 on `localhost` and shipping without re-measuring against the deployed URL. **REJECT.** The CDN, real DNS, and real TLS handshake matter.
|
|
146
|
+
|
|
147
|
+
## RESPONSE FORMAT (what to return when the user asks for a frontend audit or build)
|
|
148
|
+
|
|
149
|
+
1. **Scores before / after**, mobile AND desktop, all four categories.
|
|
150
|
+
2. **Design system compliance**: orphan tokens found / fixed, components documented.
|
|
151
|
+
3. **Each fix** in one line, traceable to the audit it cleared.
|
|
152
|
+
4. **What you intentionally did NOT do**, and why. Especially every tempting "easy point" you rejected to preserve UX.
|
|
153
|
+
5. **Browser-based Design QA result**: breakpoints tested, visual bugs found/fixed, states verified.
|
|
154
|
+
6. **The next audit you would run** if you had another iteration.
|
|
155
|
+
|
|
156
|
+
If the run did not hit 100 in every category, you are NOT done. State so explicitly. Continue iterating.
|
|
157
|
+
|
|
158
|
+
## MANTRA
|
|
159
|
+
|
|
160
|
+
> **100 on every Lighthouse category, on a real browser, with full features and full animations intact. Or it is not done.**
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# React Perf Tooling for Lighthouse 100
|
|
2
|
+
|
|
3
|
+
You are auditing or optimizing a React app for Lighthouse 100. Two tools belong in this workflow alongside Playwright + lighthouse — they catch the React-specific perf issues that Lighthouse counts but doesn't diagnose by component:
|
|
4
|
+
|
|
5
|
+
| Tool | Surface | What it gives you |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| **react-scan** (`react-scan/lite`) | Runtime instrumentation, headless | Per-fiber `commit` events with `changeDescription` — "this component re-rendered because <prop / state / context / parent / hook> changed". Correlates with `long-animation-frame` to attribute LoAF to specific components. |
|
|
8
|
+
| **react-doctor** | Static scan, CI-friendly | Deterministic findings across state/effects, perf (memoization, list keys, expensive children), architecture, security, a11y. One-shot `npx react-doctor@latest` produces a JSON report. From the Million.dev team. |
|
|
9
|
+
|
|
10
|
+
Use both. They are complementary: `react-scan` tells you *what's slow right now*; `react-doctor` tells you *what's structurally wrong*. Both are dev-only and free.
|
|
11
|
+
|
|
12
|
+
If the project does not yet have react-scan and react-doctor wired into its dev environment, read `../design/react-dev-tooling-skill.md` first and install them — they should be on by default for every React project this skill audits.
|
|
13
|
+
|
|
14
|
+
## Lighthouse run + react-scan/lite
|
|
15
|
+
|
|
16
|
+
`playwright-lighthouse` already drives a real Chrome. Inject `react-scan/lite` BEFORE React mounts via `page.addInitScript`. Then drain its `onEvent` stream during the run and assert on render budgets at the end.
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
// scripts/audit-with-react-scan.ts
|
|
20
|
+
import { chromium } from "playwright";
|
|
21
|
+
import { playAudit } from "playwright-lighthouse";
|
|
22
|
+
|
|
23
|
+
const browser = await chromium.launch({ channel: "chrome" });
|
|
24
|
+
const context = await browser.newContext();
|
|
25
|
+
|
|
26
|
+
// Inject react-scan/lite BEFORE the app boots
|
|
27
|
+
await context.addInitScript(() => {
|
|
28
|
+
// @ts-ignore — pulled from the project's node_modules or a self-hosted bundle
|
|
29
|
+
import("react-scan/lite").then(({ instrument }) => {
|
|
30
|
+
(window as any).__renderEvents = [];
|
|
31
|
+
instrument({
|
|
32
|
+
onEvent: (event: any) => {
|
|
33
|
+
if (event.kind === "commit") (window as any).__renderEvents.push(event);
|
|
34
|
+
},
|
|
35
|
+
recordChangeDescriptions: true,
|
|
36
|
+
includeFiberSource: true,
|
|
37
|
+
includeFiberIdentity: true,
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const page = await context.newPage();
|
|
43
|
+
await page.goto("http://localhost:3000/<route>");
|
|
44
|
+
|
|
45
|
+
await playAudit({
|
|
46
|
+
page,
|
|
47
|
+
port: 9222,
|
|
48
|
+
thresholds: { performance: 100, accessibility: 100, "best-practices": 100, seo: 100 },
|
|
49
|
+
reports: { formats: { html: true, json: true }, name: "lighthouse-<route>" },
|
|
50
|
+
config: { extends: "lighthouse:default", settings: { formFactor: "mobile" } },
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Pull render events and assert on render quality
|
|
54
|
+
const events = await page.evaluate(() => (window as any).__renderEvents);
|
|
55
|
+
const unnecessary = events.filter((e: any) =>
|
|
56
|
+
e.tree?.some((node: any) => node.changeDescription?.kind === "unnecessary"),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
if (unnecessary.length > 0) {
|
|
60
|
+
console.error(`FAIL: ${unnecessary.length} unnecessary renders detected during audit`);
|
|
61
|
+
for (const e of unnecessary.slice(0, 10)) console.error(" -", JSON.stringify(e, null, 2));
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
await browser.close();
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This is the canonical integration. Run twice per route (mobile + desktop), same as the base Lighthouse workflow. Both must hit 100/100/100/100 AND zero unnecessary renders.
|
|
69
|
+
|
|
70
|
+
## react-doctor — static perf gate
|
|
71
|
+
|
|
72
|
+
Before the Playwright run, fail fast on structural issues. The scan is fast and doesn't need a browser, so put it earlier in the pipeline.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npx react-doctor@latest --json > .react-doctor-report.json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Parse `.react-doctor-report.json` for perf-category findings. Treat any perf finding as a blocker for the same reason you treat a Lighthouse score < 100 as a blocker — these are deterministic issues that *will* show up in Lighthouse eventually under throttling.
|
|
79
|
+
|
|
80
|
+
Wire it into CI as a separate job (cheap, fast, no browser needed):
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
- name: React Doctor static perf scan
|
|
84
|
+
uses: millionco/react-doctor@main
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Or run inline with a fail filter:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
- name: React Doctor static perf scan
|
|
91
|
+
run: npx react-doctor@latest --json --fail-on perf
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## When to load which during an audit
|
|
95
|
+
|
|
96
|
+
Run them in this order, stop at the first failure:
|
|
97
|
+
|
|
98
|
+
1. **`react-doctor`** — cheapest. Catches missing memoization, broken list keys, unstable callback refs, expensive children that re-render unnecessarily. Fix everything it reports BEFORE running Lighthouse — half the perf score wins live here.
|
|
99
|
+
2. **`react-scan` interactive in dev** — load the page in real Chrome with `npx react-scan@latest init` already wired (see the dev-tooling reference). Walk the LCP route, the most-clicked CTA, and any animation-heavy view. The toolbar shows render counts; the overlay highlights unnecessary renders in gray. Fix until clean.
|
|
100
|
+
3. **`react-scan/lite` in the Lighthouse run** — once interactive is clean, run the Playwright audit above. This catches anything that only shows under throttling or only on first paint.
|
|
101
|
+
4. **Playwright + Lighthouse** — standard run from `README.md` audit workflow. Score 100 + zero unnecessary renders from step 3 = done.
|
|
102
|
+
|
|
103
|
+
## React-specific perf root causes (extends `README.md` ROOT-CAUSE CHECKLIST)
|
|
104
|
+
|
|
105
|
+
These are the failures `react-scan` and `react-doctor` surface that base Lighthouse won't directly name:
|
|
106
|
+
|
|
107
|
+
- **Context value identity churn.** A provider value `useMemo` was forgotten; every consumer re-renders on every render of the provider's parent. → `useMemo` the value, or split contexts so high-churn fields don't sit next to stable ones.
|
|
108
|
+
- **Inline object/array/callback props on memoized children.** `<Child config={{ a: 1 }} />` breaks `React.memo` every render. → Hoist, `useMemo`, or `useCallback`.
|
|
109
|
+
- **List keys = array index.** Reordering shreds the reconciler. → Use a stable id from the data.
|
|
110
|
+
- **Expensive components rendered unconditionally above the fold.** → `lazy()` + `Suspense`, or move below the LCP, or pre-render server-side.
|
|
111
|
+
- **Effects that fire on every render.** Missing dependency arrays or unstable deps. → Stabilize deps, or split state, or extract to `useEvent`-style ref.
|
|
112
|
+
- **Spreading the entire context value into props.** Couples every consumer to every field. → Destructure only the fields used.
|
|
113
|
+
- **Hydration mismatches.** SSR markup doesn't equal client first-render. → react-doctor flags structurally; fix the source of the divergence (Date.now, locale, randomness, browser-only APIs).
|
|
114
|
+
|
|
115
|
+
`react-doctor` finds these statically. `react-scan` confirms the symptom in the running app. Both must come clean before Lighthouse 100 is meaningful.
|
|
116
|
+
|
|
117
|
+
## Anti-patterns specific to this workflow
|
|
118
|
+
|
|
119
|
+
- **Forgetting `page.addInitScript` (using `page.evaluate` instead).** `evaluate` runs AFTER React mounts; you'll miss every initial-render event. Use `addInitScript`.
|
|
120
|
+
- **`react-scan` non-lite during a Lighthouse run.** The full UI (toolbar, canvas overlay) adds overhead and skews the score. Use `react-scan/lite` ONLY for measurement; the full version is for interactive dev.
|
|
121
|
+
- **Reporting Lighthouse 100 with `react-scan` showing 30+ unnecessary renders per route.** The score is meaningless if the React layer is thrashing — INP and CLS will degrade under real load even if the synthetic run passed. Both gates must clear.
|
|
122
|
+
- **Treating `trackUnnecessaryRenders` as free.** It has measurable overhead; in a Lighthouse run it can drag the perf score by 2-3 points. Use it for interactive diagnosis, not for the audit run.
|
|
123
|
+
- **Skipping react-doctor because "it's just a linter".** It's not. It detects React-specific defects (missing keys, broken memo, unstable refs, hydration mismatches) that ESLint plugins miss because they require fiber-level reasoning.
|
|
124
|
+
|
|
125
|
+
## Mantra
|
|
126
|
+
|
|
127
|
+
> **Lighthouse 100 + react-doctor clean + zero unnecessary renders from react-scan. All three or it is not done.**
|