sera-code 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE-SERA.md +25 -0
- package/README.md +27 -2
- package/THIRD_PARTY_NOTICES.md +68 -0
- package/bin/sera.mjs +137 -0
- package/dist/bundle/chunks/anthropic-messages-RD7GXOQL.js +6 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-CJT3KTVK.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +89 -0
- package/dist/bundle/chunks/chunk-46WGNYIE.js +82 -0
- package/dist/bundle/chunks/chunk-4UNN5OGR.js +4 -0
- package/dist/bundle/chunks/chunk-53H5DPHA.js +16 -0
- package/dist/bundle/chunks/chunk-5AGIVGSV.js +6 -0
- package/dist/bundle/chunks/chunk-6JXVX6Q2.js +2 -0
- package/dist/bundle/chunks/chunk-6QGV3IWD.js +6 -0
- package/dist/bundle/chunks/chunk-7CBJINYJ.js +20 -0
- package/dist/bundle/chunks/chunk-7DDKXS2Q.js +2 -0
- package/dist/bundle/chunks/chunk-7RZ5BS7U.js +2 -0
- package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
- package/dist/bundle/chunks/chunk-BPHHHEET.js +9 -0
- package/dist/bundle/chunks/chunk-BSS6T6KQ.js +2 -0
- package/dist/bundle/chunks/chunk-CF5GWZHW.js +31 -0
- package/dist/bundle/chunks/chunk-EDSQGWII.js +44 -0
- package/dist/bundle/chunks/chunk-FFMDRXC4.js +10 -0
- package/dist/bundle/chunks/chunk-GUGC72EB.js +1222 -0
- package/dist/bundle/chunks/chunk-HODJBMOY.js +9 -0
- package/dist/bundle/chunks/chunk-HQBQWHLD.js +7 -0
- package/dist/bundle/chunks/chunk-HQJBN2MC.js +2 -0
- package/dist/bundle/chunks/chunk-JXWJOIH4.js +2 -0
- package/dist/bundle/chunks/chunk-KXU77PUU.js +4 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
- package/dist/bundle/chunks/chunk-LVVZS2NO.js +12 -0
- package/dist/bundle/chunks/chunk-M3LEVT3X.js +2 -0
- package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/bundle/chunks/chunk-PMRZO46Y.js +2 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/bundle/chunks/chunk-QTM7S6TH.js +2 -0
- package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
- package/dist/bundle/chunks/chunk-TLNP2BSO.js +2 -0
- package/dist/bundle/chunks/chunk-TMKHGABX.js +2 -0
- package/dist/bundle/chunks/chunk-TMTOQ7H7.js +2 -0
- package/dist/bundle/chunks/chunk-UKVNB6C4.js +2 -0
- package/dist/bundle/chunks/chunk-USJZMAIR.js +2 -0
- package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
- package/dist/bundle/chunks/chunk-ZLAHUYDW.js +131 -0
- package/dist/bundle/chunks/chunk-ZNCN2NGY.js +60 -0
- package/dist/bundle/chunks/cli-MML2DU4A.js +51 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-QPZQRBK5.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +478 -0
- package/dist/bundle/chunks/dist-ZNZCJI7B.js +7 -0
- package/dist/bundle/chunks/easter-egg-3d-VOETWRJO.js +2 -0
- package/dist/bundle/chunks/execute-HXDNZ26B.js +505 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-generative-ai-SJXMIEPZ.js +2 -0
- package/dist/bundle/chunks/google-vertex-VSXQ3BDH.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/jiti-loader-GL4HJFAD.js +21 -0
- package/dist/bundle/chunks/jiti-static-loader-2RCDI6B4.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-4AVRLBHM.js +9 -0
- package/dist/bundle/chunks/llama-cpp-classify-4KFSGAMH.js +22 -0
- package/dist/bundle/chunks/meta.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-JYWDZV2K.js +5 -0
- package/dist/bundle/chunks/multipart-parser-FMGQ7342.js +3 -0
- package/dist/bundle/chunks/node-AUOGOBCN.js +2 -0
- package/dist/bundle/chunks/node-KCMANYC2.js +16 -0
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/openai-codex-responses-OQV5DCFA.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-RFDJM2W5.js +7 -0
- package/dist/bundle/chunks/openai-decisions-O6PHBSCB.js +5 -0
- package/dist/bundle/chunks/openai-responses-LVNAPALQ.js +4 -0
- package/dist/bundle/chunks/openrouter-images-4WG6OOLH.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pdfjs-BETXZQ7A.js +108 -0
- package/dist/bundle/chunks/pdfjs-decoders-37HBPYHX.js +2 -0
- package/dist/bundle/chunks/pdfjs-jbig2-MH7WRXUP.js +2 -0
- package/dist/bundle/chunks/pdfjs-jbig2_nowasm_fallback-UVK7AQLA.js +2 -0
- package/dist/bundle/chunks/pdfjs-openjpeg-TC2QHC4G.js +2 -0
- package/dist/bundle/chunks/pdfjs-openjpeg_nowasm_fallback-ZC2FTHCZ.js +3 -0
- package/dist/bundle/chunks/pi-messages-EZXKVRR6.js +8 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/runtime-JAH75CB5.js +2 -0
- package/dist/bundle/chunks/src-QKGKDFSU.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-X3JT6ECA.js +2 -0
- package/dist/bundle/chunks/virtual-modules-I5QRIHN6.js +2 -0
- package/dist/bundle/chunks/xai.js +2 -0
- package/dist/bundle/cli-runtime.js +3 -0
- package/dist/bundle/cli.js +5 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +249 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +228 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1085 -0
- package/dist/core/export-html/template.html +56 -0
- package/dist/core/export-html/template.js +2044 -0
- package/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +110 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
- package/dist/core/export-html/vendor/marked.min.js +79 -0
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/theme/dark.json +81 -0
- package/dist/modes/interactive/theme/light.json +81 -0
- package/dist/modes/interactive/theme/system-theme.d.ts +55 -0
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/system-theme.js +546 -0
- package/dist/modes/interactive/theme/system-theme.js.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +81 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.js +210 -0
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.js +105 -0
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.js +94 -0
- package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
- package/dist/modes/interactive/theme/theme.d.ts +155 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +905 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -0
- package/docs/cli-integration.md +106 -0
- package/docs/cli.md +333 -0
- package/docs/codemode.md +230 -0
- package/docs/compaction.md +463 -0
- package/docs/configuration.md +47 -0
- package/docs/containerization.md +183 -0
- package/docs/custom-provider.md +227 -0
- package/docs/docs.json +220 -0
- package/docs/environment-variables.md +102 -0
- package/docs/extensions.md +400 -0
- package/docs/how-pi-works.md +49 -0
- package/docs/index.md +39 -0
- package/docs/json.md +226 -0
- package/docs/keybindings.md +195 -0
- package/docs/llama-cpp.md +121 -0
- package/docs/mcp.md +272 -0
- package/docs/message-types.md +279 -0
- package/docs/models-configuration.md +196 -0
- package/docs/models.md +225 -0
- package/docs/nvidia-rtx-llama-cpp.md +96 -0
- package/docs/packages.md +131 -0
- package/docs/prompt-templates.md +59 -0
- package/docs/providers.md +247 -0
- package/docs/quickstart.md +136 -0
- package/docs/rpc-commands.md +860 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +193 -0
- package/docs/sdk.md +147 -0
- package/docs/security.md +99 -0
- package/docs/session-format.md +293 -0
- package/docs/sessions.md +66 -0
- package/docs/settings.md +172 -0
- package/docs/shell-aliases.md +93 -0
- package/docs/skills.md +93 -0
- package/docs/slash-commands.md +61 -0
- package/docs/terminal-setup.md +233 -0
- package/docs/termux.md +117 -0
- package/docs/themes.md +138 -0
- package/docs/tmux.md +55 -0
- package/docs/tui.md +195 -0
- package/docs/usage.md +94 -0
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +81 -0
- package/lib/auth.js +190 -0
- package/lib/provider.js +52 -0
- package/package.json +43 -5
- package/sera-core/skills/apple-tasarim/SKILL.md +48 -0
- package/sera-core/skills/apple-tasarim/referanslar/apple-hig.md +55 -0
- package/sera-core/skills/belge-yarat/SKILL.md +64 -0
- package/sera-core/skills/belge-yarat/referanslar/belge-yazim.md +60 -0
- package/sera-core/skills/derin-arastirma/SKILL.md +52 -0
- package/sera-core/skills/derin-arastirma/referanslar/arastirma-yontem.md +50 -0
- package/sera-core/skills/dusunme-dogrulama/SKILL.md +59 -0
- package/sera-core/skills/dusunme-dogrulama/referanslar/dusunme-kontrol.md +54 -0
- package/sera-core/skills/film-stilleri/SKILL.md +51 -0
- package/sera-core/skills/hyperframes/LICENSE-UPSTREAM +190 -0
- package/sera-core/skills/hyperframes/SKILL.md +79 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/biennale-yellow/FRAME.md +289 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/blockframe/FRAME.md +275 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/blue-professional/FRAME.md +307 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/bold-poster/FRAME.md +275 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/broadside/FRAME.md +284 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/capsule/FRAME.md +284 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/cartesian/FRAME.md +278 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/cobalt-grid/FRAME.md +265 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/code-editorial/FRAME.md +277 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/coral/FRAME.md +314 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/creative-mode/FRAME.md +333 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/daisy-days/FRAME.md +274 -0
- package/sera-core/skills/hyperframes/assets/frame-presets/editorial-forest/FRAME.md +265 -0
- package/sera-core/skills/hyperframes/references/captions.md +46 -0
- package/sera-core/skills/hyperframes/references/film.md +48 -0
- package/sera-core/skills/hyperframes/references/format.md +159 -0
- package/sera-core/skills/hyperframes/references/look.md +69 -0
- package/sera-core/skills/hyperframes/references/motion.md +95 -0
- package/sera-core/skills/hyperframes/references/overlays.md +39 -0
- package/sera-core/skills/hyperframes/references/path-tracing.md +36 -0
- package/sera-core/skills/hyperframes/references/plugin-installation.md +42 -0
- package/sera-core/skills/hyperframes/references/review.md +51 -0
- package/sera-core/skills/hyperframes/references/runtimes.md +69 -0
- package/sera-core/skills/hyperframes/references/skill-lifecycle.md +54 -0
- package/sera-core/skills/hyperframes/references/sound.md +43 -0
- package/sera-core/skills/hyperframes/references/spec.md +76 -0
- package/sera-core/skills/hyperframes/references/story.md +103 -0
- package/sera-core/skills/hyperframes/references/storyboard-format.md +107 -0
- package/sera-core/skills/hyperframes/references/storyboard.md +36 -0
- package/sera-core/skills/hyperframes/references/types/3d.md +25 -0
- package/sera-core/skills/hyperframes/references/types/character.md +20 -0
- package/sera-core/skills/hyperframes/references/types/data.md +19 -0
- package/sera-core/skills/hyperframes/references/types/explainer.md +34 -0
- package/sera-core/skills/hyperframes/references/types/launch.md +41 -0
- package/sera-core/skills/hyperframes/references/types/music.md +24 -0
- package/sera-core/skills/hyperframes/references/types/vertical.md +23 -0
- package/sera-core/skills/hyperframes-cli/LICENSE-UPSTREAM +190 -0
- package/sera-core/skills/hyperframes-cli/SKILL.md +99 -0
- package/sera-core/skills/hyperframes-cli/references/beats.md +17 -0
- package/sera-core/skills/hyperframes-cli/references/compare-and-batch.md +105 -0
- package/sera-core/skills/hyperframes-cli/references/conventions.md +16 -0
- package/sera-core/skills/hyperframes-cli/references/doctor-browser.md +80 -0
- package/sera-core/skills/hyperframes-cli/references/feedback.md +14 -0
- package/sera-core/skills/hyperframes-cli/references/init-and-scaffold.md +75 -0
- package/sera-core/skills/hyperframes-cli/references/lint-validate-inspect.md +164 -0
- package/sera-core/skills/hyperframes-cli/references/preview-render.md +204 -0
- package/sera-core/skills/hyperframes-cli/references/upgrade-info-misc.md +134 -0
- package/sera-core/skills/impeccable/LICENSE-UPSTREAM +191 -0
- package/sera-core/skills/impeccable/NOTICE-UPSTREAM.md +11 -0
- package/sera-core/skills/impeccable/SKILL.md +89 -0
- package/sera-core/skills/impeccable/reference/adapt.md +318 -0
- package/sera-core/skills/impeccable/reference/adapt.native.md +58 -0
- package/sera-core/skills/impeccable/reference/android.md +46 -0
- package/sera-core/skills/impeccable/reference/animate.md +89 -0
- package/sera-core/skills/impeccable/reference/audit.md +139 -0
- package/sera-core/skills/impeccable/reference/audit.native.md +139 -0
- package/sera-core/skills/impeccable/reference/bolder.md +33 -0
- package/sera-core/skills/impeccable/reference/clarify.md +94 -0
- package/sera-core/skills/impeccable/reference/colorize.md +86 -0
- package/sera-core/skills/impeccable/reference/component-review.md +63 -0
- package/sera-core/skills/impeccable/reference/craft-floor.md +44 -0
- package/sera-core/skills/impeccable/reference/craft.md +5 -0
- package/sera-core/skills/impeccable/reference/critique.md +819 -0
- package/sera-core/skills/impeccable/reference/degraded/asset-producer.md +42 -0
- package/sera-core/skills/impeccable/reference/degraded/documenter.md +24 -0
- package/sera-core/skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
- package/sera-core/skills/impeccable/reference/degraded/manual-edit-applier.md +93 -0
- package/sera-core/skills/impeccable/reference/delight.md +70 -0
- package/sera-core/skills/impeccable/reference/distill.md +111 -0
- package/sera-core/skills/impeccable/reference/doctor.md +54 -0
- package/sera-core/skills/impeccable/reference/document.md +416 -0
- package/sera-core/skills/impeccable/reference/extract.md +69 -0
- package/sera-core/skills/impeccable/reference/generate.md +101 -0
- package/sera-core/skills/impeccable/reference/harden.md +362 -0
- package/sera-core/skills/impeccable/reference/hooks.md +120 -0
- package/sera-core/skills/impeccable/reference/init.md +133 -0
- package/sera-core/skills/impeccable/reference/ios.md +51 -0
- package/sera-core/skills/impeccable/reference/layout.md +84 -0
- package/sera-core/skills/impeccable/reference/live-setup.md +104 -0
- package/sera-core/skills/impeccable/reference/live.md +327 -0
- package/sera-core/skills/impeccable/reference/mode-operate.md +21 -0
- package/sera-core/skills/impeccable/reference/mode-persuade.md +19 -0
- package/sera-core/skills/impeccable/reference/mode-read.md +21 -0
- package/sera-core/skills/impeccable/reference/new-work.md +152 -0
- package/sera-core/skills/impeccable/reference/onboard.md +234 -0
- package/sera-core/skills/impeccable/reference/operate.md +61 -0
- package/sera-core/skills/impeccable/reference/optimize.md +257 -0
- package/sera-core/skills/impeccable/reference/overdrive.md +127 -0
- package/sera-core/skills/impeccable/reference/polish.md +105 -0
- package/sera-core/skills/impeccable/reference/quieter.md +99 -0
- package/sera-core/skills/impeccable/reference/region-map.md +26 -0
- package/sera-core/skills/impeccable/reference/routing.md +24 -0
- package/sera-core/skills/impeccable/reference/shape.md +59 -0
- package/sera-core/skills/impeccable/reference/typeset.md +90 -0
- package/sera-core/skills/impeccable/reference/visualize.md +47 -0
- package/sera-core/skills/oyun-yarat/SKILL.md +106 -0
- package/sera-core/skills/oyun-yarat/referanslar/3b-yaris.md +74 -0
- package/sera-core/skills/oyun-yarat/referanslar/kaplay.md +99 -0
- package/sera-core/skills/oyun-yarat/referanslar/oyun-desenleri.md +73 -0
- package/sera-core/skills/oyun-yarat/sablonlar/kaplay-2d.html +164 -0
- package/sera-core/skills/oyun-yarat/sablonlar/three-yaris.html +149 -0
- package/sera-core/skills/oyun-yarat/sablonlar/tuval-minimal.html +77 -0
- package/sera-core/skills/receiving-code-review/LICENSE-UPSTREAM +21 -0
- package/sera-core/skills/receiving-code-review/SKILL.md +205 -0
- package/sera-core/skills/refero-design/LICENSE-UPSTREAM +21 -0
- package/sera-core/skills/refero-design/SKILL.md +534 -0
- package/sera-core/skills/refero-design/references/anti-ai-slop.md +292 -0
- package/sera-core/skills/refero-design/references/color.md +563 -0
- package/sera-core/skills/refero-design/references/copywriting.md +222 -0
- package/sera-core/skills/refero-design/references/craft-details.md +525 -0
- package/sera-core/skills/refero-design/references/example-workflow.md +264 -0
- package/sera-core/skills/refero-design/references/icons.md +166 -0
- package/sera-core/skills/refero-design/references/mcp-tools.md +258 -0
- package/sera-core/skills/refero-design/references/motion.md +504 -0
- package/sera-core/skills/refero-design/references/typography.md +737 -0
- package/sera-core/skills/refero-design/references/visual-workflow.md +105 -0
- package/sera-core/skills/requesting-code-review/LICENSE-UPSTREAM +21 -0
- package/sera-core/skills/requesting-code-review/SKILL.md +95 -0
- package/sera-core/skills/requesting-code-review/code-reviewer.md +198 -0
- package/sera-core/skills/reverse-engineer-anything/DISCLAIMER.md +136 -0
- package/sera-core/skills/reverse-engineer-anything/LICENSE-REA-MIT +21 -0
- package/sera-core/skills/reverse-engineer-anything/SKILL.md +363 -0
- package/sera-core/skills/reverse-engineer-anything/THIRD_PARTY_NOTICES.md +135 -0
- package/sera-core/skills/reverse-engineer-anything/references/android-applications.md +36 -0
- package/sera-core/skills/reverse-engineer-anything/references/connection-and-recovery.md +127 -0
- package/sera-core/skills/reverse-engineer-anything/references/evidence-workflows.md +71 -0
- package/sera-core/skills/reverse-engineer-anything/references/javascript-applications.md +218 -0
- package/sera-core/skills/reverse-engineer-anything/references/native-and-artifacts.md +297 -0
- package/sera-core/skills/reverse-engineer-anything/references/runtime-observation.md +78 -0
- package/sera-core/skills/seo-audit/LICENSE-UPSTREAM +21 -0
- package/sera-core/skills/seo-audit/SKILL.md +210 -0
- package/sera-core/skills/sera-guvenlik-denetim/SKILL.md +44 -0
- package/sera-core/skills/sera-guvenlik-denetim/referanslar/guvenlik-listesi.md +33 -0
- package/sera-core/skills/sera-hata-ayikla/SKILL.md +27 -0
- package/sera-core/skills/sera-hata-ayikla/referanslar/hata-ayiklama.md +37 -0
- package/sera-core/skills/sera-kod-inceleme/SKILL.md +44 -0
- package/sera-core/skills/sera-kod-inceleme/referanslar/inceleme-listesi.md +62 -0
- package/sera-core/skills/sera-ofis-dosya/SKILL.md +27 -0
- package/sera-core/skills/sera-ofis-dosya/referanslar/ofis-dosya.md +93 -0
- package/sera-core/skills/sera-research/SKILL.md +90 -0
- package/sera-core/skills/sera-tasarim/SKILL.md +149 -0
- package/sera-core/skills/sera-teslim-sozlesmesi/SKILL.md +592 -0
- package/sera-core/skills/sera-test-yaz/SKILL.md +26 -0
- package/sera-core/skills/sera-test-yaz/referanslar/test-yazimi.md +35 -0
- package/sera-core/skills/sera-veri-gorsel/SKILL.md +65 -0
- package/sera-core/skills/sera-web-test/SKILL.md +26 -0
- package/sera-core/skills/sera-web-test/referanslar/web-test.md +44 -0
- package/sera-core/skills/sera-zamanli-gorev/SKILL.md +22 -0
- package/sera-core/skills/sera-zamanli-gorev/referanslar/zamanli-gorev.md +58 -0
- package/sera-core/skills/systematic-debugging/LICENSE-UPSTREAM +21 -0
- package/sera-core/skills/systematic-debugging/SKILL.md +283 -0
- package/sera-core/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/sera-core/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/sera-core/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/sera-core/skills/test-driven-development/LICENSE-UPSTREAM +21 -0
- package/sera-core/skills/test-driven-development/SKILL.md +330 -0
- package/sera-core/skills/test-driven-development/writing-good-tests.md +198 -0
- package/sera-core/skills/ticaret-icerik/SKILL.md +49 -0
- package/sera-core/skills/ticaret-icerik/referanslar/ticaret-icerik.md +54 -0
- package/sera-core/skills/uygulama-yarat/SKILL.md +95 -0
- package/sera-core/skills/uygulama-yarat/referanslar/uygulama-desenleri.md +63 -0
- package/sera-core/skills/uygulama-yarat/sablonlar/uygulama-tek-dosya.html +121 -0
- package/sera-core/skills/uyumluluk-denetim/SKILL.md +56 -0
- package/sera-core/skills/uyumluluk-denetim/referanslar/mevzuat-tablosu.md +65 -0
- package/sera-core/skills/veri-analizi/SKILL.md +54 -0
- package/sera-core/skills/veri-analizi/referanslar/veri-analizi-yontem.md +49 -0
- package/sera-core/skills/veri-analizi/sablonlar/profil.mjs +79 -0
- package/sera-core/skills/video-duzen/SKILL.md +50 -0
- package/sera-core/skills/video-duzen/referanslar/video-duzen.md +100 -0
- package/sera-core/skills/web-yayin-listesi/SKILL.md +115 -0
- package/sera-core/skills/writing-plans/LICENSE-UPSTREAM +21 -0
- package/sera-core/skills/writing-plans/SKILL.md +204 -0
- package/sera-core/src/action-nudge.ts +200 -0
- package/sera-core/src/agent-mode.ts +143 -0
- package/sera-core/src/agents.ts +185 -0
- package/sera-core/src/app-master.ts +275 -0
- package/sera-core/src/app-verify.ts +551 -0
- package/sera-core/src/approval.ts +131 -0
- package/sera-core/src/budget.ts +136 -0
- package/sera-core/src/command-policy.ts +808 -0
- package/sera-core/src/config.ts +135 -0
- package/sera-core/src/context-diet.ts +272 -0
- package/sera-core/src/device-id.ts +48 -0
- package/sera-core/src/dogal-arac.ts +203 -0
- package/sera-core/src/dogal-niyet.ts +173 -0
- package/sera-core/src/egress-allow.ts +52 -0
- package/sera-core/src/export.ts +124 -0
- package/sera-core/src/exposure.ts +8 -0
- package/sera-core/src/extension.ts +2416 -0
- package/sera-core/src/fs-tools.ts +444 -0
- package/sera-core/src/generated/build-rules.ts +26 -0
- package/sera-core/src/generated/zero-knowledge.ts +170 -0
- package/sera-core/src/github-agent-command.ts +133 -0
- package/sera-core/src/github-agent-engine.ts +198 -0
- package/sera-core/src/github-agent-schedule.ts +180 -0
- package/sera-core/src/github-agent.ts +669 -0
- package/sera-core/src/github-ajan-akis.ts +193 -0
- package/sera-core/src/github-ajan-gercek.ts +102 -0
- package/sera-core/src/github-tick.ts +78 -0
- package/sera-core/src/github-yedek.ts +269 -0
- package/sera-core/src/goal.ts +119 -0
- package/sera-core/src/handoff.ts +132 -0
- package/sera-core/src/hooks.ts +284 -0
- package/sera-core/src/image-tool.ts +118 -0
- package/sera-core/src/intake-brief.ts +82 -0
- package/sera-core/src/intake-core.ts +1152 -0
- package/sera-core/src/intake-hook.ts +88 -0
- package/sera-core/src/ios-build-tool.ts +134 -0
- package/sera-core/src/lazy-capability.ts +125 -0
- package/sera-core/src/lazy-mcp.ts +300 -0
- package/sera-core/src/limit-command.ts +51 -0
- package/sera-core/src/loop-brake.ts +129 -0
- package/sera-core/src/lsp.ts +618 -0
- package/sera-core/src/mcp-bridge.ts +159 -0
- package/sera-core/src/mcp-pin.ts +105 -0
- package/sera-core/src/mcp-ssrf.ts +124 -0
- package/sera-core/src/message-cap.ts +45 -0
- package/sera-core/src/no-progress.ts +177 -0
- package/sera-core/src/notebook-tool.ts +179 -0
- package/sera-core/src/ofis.ts +473 -0
- package/sera-core/src/path-guard.ts +139 -0
- package/sera-core/src/permission-bridge.ts +228 -0
- package/sera-core/src/policy-chain.ts +122 -0
- package/sera-core/src/pricing.ts +71 -0
- package/sera-core/src/proc.ts +149 -0
- package/sera-core/src/rea.ts +188 -0
- package/sera-core/src/repo-map.ts +230 -0
- package/sera-core/src/research.ts +347 -0
- package/sera-core/src/rules-memory.ts +227 -0
- package/sera-core/src/sandbox.ts +445 -0
- package/sera-core/src/server-error.ts +78 -0
- package/sera-core/src/skills.ts +268 -0
- package/sera-core/src/snapshot.ts +143 -0
- package/sera-core/src/spec-gate.ts +112 -0
- package/sera-core/src/subagent.ts +261 -0
- package/sera-core/src/teslim.ts +120 -0
- package/sera-core/src/test-fix.ts +184 -0
- package/sera-core/src/todo-question.ts +163 -0
- package/sera-core/src/turn-snapshots.ts +126 -0
- package/sera-core/src/tuval/arac.ts +338 -0
- package/sera-core/src/tuval/arsiv.ts +106 -0
- package/sera-core/src/tuval/belge.ts +216 -0
- package/sera-core/src/tuval/birlestir.ts +282 -0
- package/sera-core/src/tuval/disa.ts +235 -0
- package/sera-core/src/tuval/editor.ts +583 -0
- package/sera-core/src/tuval/film-cekirdek.ts +170 -0
- package/sera-core/src/tuval/film-disa.ts +188 -0
- package/sera-core/src/tuval/film-oynatici.ts +307 -0
- package/sera-core/src/tuval/kimlik.ts +156 -0
- package/sera-core/src/tuval/pano.ts +763 -0
- package/sera-core/src/tuval/proje.ts +728 -0
- package/sera-core/src/tuval/sistem-cekirdek.ts +167 -0
- package/sera-core/src/tuval/sistem.ts +328 -0
- package/sera-core/src/tuval/sunucu.ts +413 -0
- package/sera-core/src/tuval/uretim.ts +24 -0
- package/sera-core/src/tuval/veri-cekirdek.ts +477 -0
- package/sera-core/src/tuval/xlsx.ts +215 -0
- package/sera-core/src/tuval/zip.ts +163 -0
- package/sera-core/src/untrusted.ts +201 -0
- package/sera-core/src/video-edit-tool.ts +411 -0
- package/sera-core/src/video-tool.ts +217 -0
- package/sera-core/src/web-tools.ts +257 -0
- package/sera-core/src/zk.ts +104 -0
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
# Craft Details Guide
|
|
2
|
+
|
|
3
|
+
Implementation details that separate polished products from rough ones. Most AI models miss these.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Focus States
|
|
8
|
+
|
|
9
|
+
Focus states are for keyboard navigation. Get them wrong and your app feels broken.
|
|
10
|
+
|
|
11
|
+
### The Rule: `:focus-visible`, Not `:focus`
|
|
12
|
+
|
|
13
|
+
```css
|
|
14
|
+
/* ❌ Shows focus ring on mouse click — annoying */
|
|
15
|
+
.button:focus {
|
|
16
|
+
outline: 2px solid var(--primary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* ✅ Shows focus ring only on keyboard navigation */
|
|
20
|
+
.button:focus-visible {
|
|
21
|
+
outline: 2px solid var(--primary);
|
|
22
|
+
outline-offset: 2px;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Why:** `:focus` triggers on any focus (including mouse click). `:focus-visible` only triggers when user is navigating with keyboard.
|
|
27
|
+
|
|
28
|
+
### Never Remove Focus Without Replacement
|
|
29
|
+
|
|
30
|
+
```css
|
|
31
|
+
/* ❌ NEVER — breaks keyboard navigation */
|
|
32
|
+
.button:focus {
|
|
33
|
+
outline: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ✅ Replace default with custom visible focus */
|
|
37
|
+
.button:focus-visible {
|
|
38
|
+
outline: none;
|
|
39
|
+
box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary);
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Compound Controls: `:focus-within`
|
|
44
|
+
|
|
45
|
+
For groups where focus on any child should highlight the parent:
|
|
46
|
+
|
|
47
|
+
```css
|
|
48
|
+
/* Search input with icon */
|
|
49
|
+
.search-wrapper:focus-within {
|
|
50
|
+
border-color: var(--primary);
|
|
51
|
+
box-shadow: 0 0 0 3px var(--primary-tint);
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 2. Forms
|
|
58
|
+
|
|
59
|
+
Forms are where users struggle most. These details reduce friction.
|
|
60
|
+
|
|
61
|
+
### Input Types and Attributes
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<!-- ✅ Correct types trigger right keyboard on mobile -->
|
|
65
|
+
<input type="email" inputmode="email" autocomplete="email">
|
|
66
|
+
<input type="tel" inputmode="tel" autocomplete="tel">
|
|
67
|
+
<input type="url" inputmode="url">
|
|
68
|
+
<input type="number" inputmode="numeric">
|
|
69
|
+
|
|
70
|
+
<!-- ✅ Meaningful names help password managers -->
|
|
71
|
+
<input name="email" type="email" autocomplete="email">
|
|
72
|
+
<input name="password" type="password" autocomplete="current-password">
|
|
73
|
+
<input name="new-password" type="password" autocomplete="new-password">
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Autocomplete Matters
|
|
77
|
+
|
|
78
|
+
| Field | `autocomplete` value |
|
|
79
|
+
|-------|---------------------|
|
|
80
|
+
| Email | `email` |
|
|
81
|
+
| Password (login) | `current-password` |
|
|
82
|
+
| Password (signup) | `new-password` |
|
|
83
|
+
| Name | `name` |
|
|
84
|
+
| Phone | `tel` |
|
|
85
|
+
| Address | `street-address` |
|
|
86
|
+
| Credit card | `cc-number`, `cc-exp`, `cc-csc` |
|
|
87
|
+
| Non-auth fields | `off` (prevents password manager triggers) |
|
|
88
|
+
|
|
89
|
+
### Never Block Paste
|
|
90
|
+
|
|
91
|
+
```jsx
|
|
92
|
+
/* ❌ NEVER — accessibility violation, user hostile */
|
|
93
|
+
<input onPaste={(e) => e.preventDefault()} />
|
|
94
|
+
|
|
95
|
+
/* ✅ Let users paste */
|
|
96
|
+
<input />
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Disable Spellcheck Where Appropriate
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<!-- Spellcheck off for: emails, codes, usernames, URLs -->
|
|
103
|
+
<input type="email" spellcheck="false">
|
|
104
|
+
<input name="username" spellcheck="false">
|
|
105
|
+
<input name="verification-code" spellcheck="false">
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Labels and Hit Targets
|
|
109
|
+
|
|
110
|
+
```html
|
|
111
|
+
<!-- ✅ Clickable label (explicit) -->
|
|
112
|
+
<label for="email">Email</label>
|
|
113
|
+
<input id="email" type="email">
|
|
114
|
+
|
|
115
|
+
<!-- ✅ Clickable label (implicit) -->
|
|
116
|
+
<label>
|
|
117
|
+
Email
|
|
118
|
+
<input type="email">
|
|
119
|
+
</label>
|
|
120
|
+
|
|
121
|
+
<!-- ✅ Checkbox: label + control share single hit target -->
|
|
122
|
+
<label class="checkbox-wrapper">
|
|
123
|
+
<input type="checkbox">
|
|
124
|
+
<span>Accept terms</span>
|
|
125
|
+
</label>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```css
|
|
129
|
+
/* No dead zones between checkbox and label */
|
|
130
|
+
.checkbox-wrapper {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
gap: 8px;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Placeholder Formatting
|
|
139
|
+
|
|
140
|
+
```html
|
|
141
|
+
<!-- ✅ Placeholders end with … and show format -->
|
|
142
|
+
<input placeholder="name@company.com…">
|
|
143
|
+
<input placeholder="(555) 123-4567…">
|
|
144
|
+
<input placeholder="Search products…">
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Submit Button States
|
|
148
|
+
|
|
149
|
+
```jsx
|
|
150
|
+
/* ✅ Button enabled until request starts, then shows spinner */
|
|
151
|
+
<button
|
|
152
|
+
type="submit"
|
|
153
|
+
disabled={isSubmitting}
|
|
154
|
+
>
|
|
155
|
+
{isSubmitting ? <Spinner /> : 'Save Changes'}
|
|
156
|
+
</button>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Error Handling
|
|
160
|
+
|
|
161
|
+
```jsx
|
|
162
|
+
/* ✅ Errors inline, focus first error on submit */
|
|
163
|
+
<form onSubmit={handleSubmit}>
|
|
164
|
+
<input
|
|
165
|
+
ref={emailRef}
|
|
166
|
+
aria-invalid={errors.email ? 'true' : 'false'}
|
|
167
|
+
aria-describedby={errors.email ? 'email-error' : undefined}
|
|
168
|
+
/>
|
|
169
|
+
{errors.email && (
|
|
170
|
+
<span id="email-error" role="alert">
|
|
171
|
+
{errors.email}
|
|
172
|
+
</span>
|
|
173
|
+
)}
|
|
174
|
+
</form>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Unsaved Changes Warning
|
|
178
|
+
|
|
179
|
+
```js
|
|
180
|
+
// Warn before leaving with unsaved changes
|
|
181
|
+
useEffect(() => {
|
|
182
|
+
const handleBeforeUnload = (e) => {
|
|
183
|
+
if (hasUnsavedChanges) {
|
|
184
|
+
e.preventDefault();
|
|
185
|
+
e.returnValue = '';
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
window.addEventListener('beforeunload', handleBeforeUnload);
|
|
189
|
+
return () => window.removeEventListener('beforeunload', handleBeforeUnload);
|
|
190
|
+
}, [hasUnsavedChanges]);
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 3. Images
|
|
196
|
+
|
|
197
|
+
Images are the #1 cause of layout shift (CLS). Fix them.
|
|
198
|
+
|
|
199
|
+
### Always Set Dimensions
|
|
200
|
+
|
|
201
|
+
```html
|
|
202
|
+
<!-- ❌ Causes layout shift as image loads -->
|
|
203
|
+
<img src="photo.jpg" alt="Product">
|
|
204
|
+
|
|
205
|
+
<!-- ✅ Reserves space, no layout shift -->
|
|
206
|
+
<img src="photo.jpg" alt="Product" width="400" height="300">
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Loading Strategy
|
|
210
|
+
|
|
211
|
+
```html
|
|
212
|
+
<!-- Above the fold: load immediately -->
|
|
213
|
+
<img src="hero.jpg" fetchpriority="high" alt="Hero">
|
|
214
|
+
|
|
215
|
+
<!-- Below the fold: lazy load -->
|
|
216
|
+
<img src="feature.jpg" loading="lazy" alt="Feature">
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### In React/Next.js
|
|
220
|
+
|
|
221
|
+
```jsx
|
|
222
|
+
// Critical hero image
|
|
223
|
+
<Image src="/hero.jpg" priority alt="Hero" />
|
|
224
|
+
|
|
225
|
+
// Below fold
|
|
226
|
+
<Image src="/feature.jpg" loading="lazy" alt="Feature" />
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## 4. Touch & Mobile
|
|
232
|
+
|
|
233
|
+
Details that make mobile feel native.
|
|
234
|
+
|
|
235
|
+
### Tap Delay Removal
|
|
236
|
+
|
|
237
|
+
```css
|
|
238
|
+
/* Remove 300ms tap delay on mobile */
|
|
239
|
+
* {
|
|
240
|
+
touch-action: manipulation;
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Tap Highlight
|
|
245
|
+
|
|
246
|
+
```css
|
|
247
|
+
/* Set intentionally, don't just disable */
|
|
248
|
+
button, a {
|
|
249
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Modal Scroll Lock
|
|
254
|
+
|
|
255
|
+
```css
|
|
256
|
+
/* Prevent scroll chaining in modals/drawers */
|
|
257
|
+
.modal, .drawer, .sheet {
|
|
258
|
+
overscroll-behavior: contain;
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### AutoFocus Rules
|
|
263
|
+
|
|
264
|
+
- Desktop only — avoid on mobile (opens keyboard unexpectedly)
|
|
265
|
+
- Single primary input per page maximum
|
|
266
|
+
- Must be justified — not "just because"
|
|
267
|
+
|
|
268
|
+
```jsx
|
|
269
|
+
/* ✅ Desktop-only autofocus */
|
|
270
|
+
<input autoFocus={!isMobile} />
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 5. Performance Patterns
|
|
276
|
+
|
|
277
|
+
Patterns that prevent jank.
|
|
278
|
+
|
|
279
|
+
### Virtualize Large Lists
|
|
280
|
+
|
|
281
|
+
Lists with 50+ items should be virtualized:
|
|
282
|
+
|
|
283
|
+
```jsx
|
|
284
|
+
// Use virtua, react-window, or similar
|
|
285
|
+
import { VList } from 'virtua';
|
|
286
|
+
|
|
287
|
+
<VList style={{ height: 400 }}>
|
|
288
|
+
{items.map(item => <Row key={item.id} data={item} />)}
|
|
289
|
+
</VList>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Or CSS-only for simpler cases:**
|
|
293
|
+
|
|
294
|
+
```css
|
|
295
|
+
.long-list {
|
|
296
|
+
content-visibility: auto;
|
|
297
|
+
contain-intrinsic-size: 0 50px; /* estimated item height */
|
|
298
|
+
}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Avoid Layout Reads in Render
|
|
302
|
+
|
|
303
|
+
```jsx
|
|
304
|
+
/* ❌ Forces synchronous layout recalculation */
|
|
305
|
+
function Component() {
|
|
306
|
+
const height = elementRef.current.offsetHeight; // BAD
|
|
307
|
+
return <div style={{ marginTop: height }} />;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* ✅ Use ResizeObserver or CSS */
|
|
311
|
+
function Component() {
|
|
312
|
+
const [height, setHeight] = useState(0);
|
|
313
|
+
useLayoutEffect(() => {
|
|
314
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
315
|
+
setHeight(entry.contentRect.height);
|
|
316
|
+
});
|
|
317
|
+
observer.observe(elementRef.current);
|
|
318
|
+
return () => observer.disconnect();
|
|
319
|
+
}, []);
|
|
320
|
+
return <div style={{ marginTop: height }} />;
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Uncontrolled Inputs When Possible
|
|
325
|
+
|
|
326
|
+
```jsx
|
|
327
|
+
/* ❌ Re-renders on every keystroke */
|
|
328
|
+
const [value, setValue] = useState('');
|
|
329
|
+
<input value={value} onChange={e => setValue(e.target.value)} />
|
|
330
|
+
|
|
331
|
+
/* ✅ No re-renders during typing */
|
|
332
|
+
<input defaultValue="" ref={inputRef} />
|
|
333
|
+
|
|
334
|
+
/* Get value on submit */
|
|
335
|
+
const handleSubmit = () => {
|
|
336
|
+
const value = inputRef.current.value;
|
|
337
|
+
};
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Preconnect to CDNs
|
|
341
|
+
|
|
342
|
+
```html
|
|
343
|
+
<head>
|
|
344
|
+
<!-- Preconnect to asset domains -->
|
|
345
|
+
<link rel="preconnect" href="https://cdn.example.com">
|
|
346
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
347
|
+
|
|
348
|
+
<!-- Preload critical fonts -->
|
|
349
|
+
<link
|
|
350
|
+
rel="preload"
|
|
351
|
+
href="/fonts/inter.woff2"
|
|
352
|
+
as="font"
|
|
353
|
+
type="font/woff2"
|
|
354
|
+
crossorigin
|
|
355
|
+
>
|
|
356
|
+
</head>
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## 6. Accessibility Quick Wins
|
|
362
|
+
|
|
363
|
+
High-impact, low-effort accessibility fixes.
|
|
364
|
+
|
|
365
|
+
### Semantic Elements
|
|
366
|
+
|
|
367
|
+
```html
|
|
368
|
+
<!-- ❌ Div with click handler -->
|
|
369
|
+
<div onClick={handleClick}>Click me</div>
|
|
370
|
+
|
|
371
|
+
<!-- ✅ Proper button -->
|
|
372
|
+
<button onClick={handleClick}>Click me</button>
|
|
373
|
+
|
|
374
|
+
<!-- ❌ Span styled as link -->
|
|
375
|
+
<span onClick={navigate} className="link">Go here</span>
|
|
376
|
+
|
|
377
|
+
<!-- ✅ Proper link -->
|
|
378
|
+
<a href="/page">Go here</a>
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Keyboard Handlers
|
|
382
|
+
|
|
383
|
+
Interactive custom elements need keyboard support:
|
|
384
|
+
|
|
385
|
+
```jsx
|
|
386
|
+
<div
|
|
387
|
+
role="button"
|
|
388
|
+
tabIndex={0}
|
|
389
|
+
onClick={handleClick}
|
|
390
|
+
onKeyDown={(e) => {
|
|
391
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
392
|
+
e.preventDefault();
|
|
393
|
+
handleClick();
|
|
394
|
+
}
|
|
395
|
+
}}
|
|
396
|
+
>
|
|
397
|
+
Custom button
|
|
398
|
+
</div>
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Heading Hierarchy
|
|
402
|
+
|
|
403
|
+
```html
|
|
404
|
+
<!-- ✅ Proper heading order -->
|
|
405
|
+
<h1>Page Title</h1>
|
|
406
|
+
<h2>Section</h2>
|
|
407
|
+
<h3>Subsection</h3>
|
|
408
|
+
<h2>Another Section</h2>
|
|
409
|
+
|
|
410
|
+
<!-- ❌ Skipping levels -->
|
|
411
|
+
<h1>Page Title</h1>
|
|
412
|
+
<h4>Section</h4> <!-- Wrong: skipped h2, h3 -->
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Scroll Margin for Anchors
|
|
416
|
+
|
|
417
|
+
```css
|
|
418
|
+
/* Prevents fixed header from covering anchor targets */
|
|
419
|
+
[id] {
|
|
420
|
+
scroll-margin-top: 80px; /* height of fixed header + buffer */
|
|
421
|
+
}
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### Async Updates Need Announcements
|
|
425
|
+
|
|
426
|
+
```jsx
|
|
427
|
+
/* Toast notifications, validation messages */
|
|
428
|
+
<div role="status" aria-live="polite">
|
|
429
|
+
{message}
|
|
430
|
+
</div>
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## 7. Navigation & State
|
|
436
|
+
|
|
437
|
+
URL should reflect app state. Users expect to bookmark, share, and use back button.
|
|
438
|
+
|
|
439
|
+
### URL Reflects State
|
|
440
|
+
|
|
441
|
+
```jsx
|
|
442
|
+
/* ✅ Filters, tabs, pagination in URL */
|
|
443
|
+
// /products?category=shoes&sort=price&page=2
|
|
444
|
+
|
|
445
|
+
/* Use nuqs or similar for easy URL state sync */
|
|
446
|
+
import { useQueryState } from 'nuqs';
|
|
447
|
+
const [category, setCategory] = useQueryState('category');
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Links Support Browser Features
|
|
451
|
+
|
|
452
|
+
```jsx
|
|
453
|
+
/* ❌ onClick navigation — breaks Cmd+click, middle-click */
|
|
454
|
+
<div onClick={() => navigate('/page')}>Go</div>
|
|
455
|
+
|
|
456
|
+
/* ✅ Proper link — all browser features work */
|
|
457
|
+
<Link href="/page">Go</Link>
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### Destructive Actions Need Confirmation
|
|
461
|
+
|
|
462
|
+
```jsx
|
|
463
|
+
/* ❌ Immediate destructive action */
|
|
464
|
+
<button onClick={deleteAccount}>Delete Account</button>
|
|
465
|
+
|
|
466
|
+
/* ✅ With confirmation */
|
|
467
|
+
<button onClick={() => setShowConfirmModal(true)}>Delete Account</button>
|
|
468
|
+
|
|
469
|
+
/* Or with undo window */
|
|
470
|
+
<button onClick={deleteWithUndo}>Delete Account</button>
|
|
471
|
+
// Toast: "Account deleted. Undo (10s)"
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## 8. Content Copy Rules
|
|
477
|
+
|
|
478
|
+
Writing that converts.
|
|
479
|
+
|
|
480
|
+
| Rule | Example |
|
|
481
|
+
|------|---------|
|
|
482
|
+
| **Active voice** | "Install the CLI" not "The CLI will be installed" |
|
|
483
|
+
| **Title Case for headings/buttons** | "Save Changes" not "Save changes" |
|
|
484
|
+
| **Numerals for counts** | "8 deployments" not "eight deployments" |
|
|
485
|
+
| **Specific labels** | "Save API Key" not "Continue" |
|
|
486
|
+
| **Error messages include fix** | "Email invalid. Use format: name@domain.com" |
|
|
487
|
+
| **Second person** | "Your account" not "My account" |
|
|
488
|
+
| **& over "and"** (space-constrained) | "Terms & Privacy" |
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
## 9. Anti-Patterns Checklist
|
|
493
|
+
|
|
494
|
+
Flag these during code review:
|
|
495
|
+
|
|
496
|
+
- [ ] `user-scalable=no` or `maximum-scale=1` — disables zoom, accessibility violation
|
|
497
|
+
- [ ] `onPaste` with `preventDefault` — blocks paste, user hostile
|
|
498
|
+
- [ ] `transition: all` — performance killer, unpredictable
|
|
499
|
+
- [ ] `outline: none` without `:focus-visible` replacement — breaks keyboard nav
|
|
500
|
+
- [ ] `<div onClick>` for navigation — use `<a>` or `<Link>`
|
|
501
|
+
- [ ] `<div>` or `<span>` as buttons — use `<button>`
|
|
502
|
+
- [ ] Images without `width`/`height` — causes CLS
|
|
503
|
+
- [ ] Large arrays `.map()` without virtualization (50+ items)
|
|
504
|
+
- [ ] Form inputs without labels — accessibility fail
|
|
505
|
+
- [ ] Icon buttons without `aria-label`
|
|
506
|
+
- [ ] Hardcoded date/number formats — use `Intl.DateTimeFormat`, `Intl.NumberFormat`
|
|
507
|
+
- [ ] `autoFocus` without clear justification
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
## Pre-Ship Checklist
|
|
512
|
+
|
|
513
|
+
- [ ] **Focus:** `:focus-visible` not `:focus`, never bare `outline: none`
|
|
514
|
+
- [ ] **Forms:** Correct `type`, `inputmode`, `autocomplete` attributes
|
|
515
|
+
- [ ] **Forms:** Labels on all inputs, no paste blocking
|
|
516
|
+
- [ ] **Images:** `width`/`height` set, `loading="lazy"` below fold
|
|
517
|
+
- [ ] **Touch:** `touch-action: manipulation`, `overscroll-behavior: contain` in modals
|
|
518
|
+
- [ ] **Performance:** Large lists virtualized, no layout reads in render
|
|
519
|
+
- [ ] **A11y:** Semantic HTML, keyboard handlers, heading hierarchy
|
|
520
|
+
- [ ] **URLs:** State reflected in URL, proper `<a>`/`<Link>` for navigation
|
|
521
|
+
- [ ] **Copy:** Active voice, specific labels, errors include fix
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
*Details matter. These patterns are the difference between "works" and "feels right."*
|