agemon 0.1.0 → 6.3.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/README.md +983 -30
- package/assets/skills/architecture/agemon-architecture/LICENSE +21 -0
- package/assets/skills/architecture/agemon-architecture/NOTICE.md +9 -0
- package/assets/skills/architecture/agemon-architecture/SKILL.md +275 -0
- package/assets/skills/code-quality/agemon-clean-code/LICENSE +21 -0
- package/assets/skills/code-quality/agemon-clean-code/NOTICE.md +9 -0
- package/assets/skills/code-quality/agemon-clean-code/SKILL.md +78 -0
- package/assets/skills/code-quality/agemon-house-rules/SKILL.md +103 -0
- package/assets/skills/commit/agemon-commit/SKILL.md +87 -0
- package/assets/skills/design/agemon-design/LICENSE +21 -0
- package/assets/skills/design/agemon-design/NOTICE.md +43 -0
- package/assets/skills/design/agemon-design/SKILL.md +128 -0
- package/assets/skills/design/agemon-design/references/accessibility.md +182 -0
- package/assets/skills/design/agemon-design/references/actions.md +215 -0
- package/assets/skills/design/agemon-design/references/ai-chat.md +158 -0
- package/assets/skills/design/agemon-design/references/brief.md +190 -0
- package/assets/skills/design/agemon-design/references/color.md +216 -0
- package/assets/skills/design/agemon-design/references/components.md +91 -0
- package/assets/skills/design/agemon-design/references/copy.md +300 -0
- package/assets/skills/design/agemon-design/references/core-rules.md +166 -0
- package/assets/skills/design/agemon-design/references/craft-intent.md +162 -0
- package/assets/skills/design/agemon-design/references/dashboard.md +131 -0
- package/assets/skills/design/agemon-design/references/dataviz.md +197 -0
- package/assets/skills/design/agemon-design/references/finish-bar.md +243 -0
- package/assets/skills/design/agemon-design/references/forms.md +192 -0
- package/assets/skills/design/agemon-design/references/heuristics.md +319 -0
- package/assets/skills/design/agemon-design/references/inspiration.md +287 -0
- package/assets/skills/design/agemon-design/references/layout.md +236 -0
- package/assets/skills/design/agemon-design/references/loops.md +155 -0
- package/assets/skills/design/agemon-design/references/metadata.md +98 -0
- package/assets/skills/design/agemon-design/references/modern-css.md +448 -0
- package/assets/skills/design/agemon-design/references/motion.md +434 -0
- package/assets/skills/design/agemon-design/references/personas.md +206 -0
- package/assets/skills/design/agemon-design/references/preset-dashboard.md +109 -0
- package/assets/skills/design/agemon-design/references/preset-editorial.md +94 -0
- package/assets/skills/design/agemon-design/references/preset-minimal.md +93 -0
- package/assets/skills/design/agemon-design/references/principles-catalog.md +299 -0
- package/assets/skills/design/agemon-design/references/recipe-auth.md +88 -0
- package/assets/skills/design/agemon-design/references/recipe-dashboard.md +130 -0
- package/assets/skills/design/agemon-design/references/recipe-landing.md +120 -0
- package/assets/skills/design/agemon-design/references/responsive.md +168 -0
- package/assets/skills/design/agemon-design/references/review.md +340 -0
- package/assets/skills/design/agemon-design/references/routing.md +143 -0
- package/assets/skills/design/agemon-design/references/sound.md +150 -0
- package/assets/skills/design/agemon-design/references/spec.md +123 -0
- package/assets/skills/design/agemon-design/references/stack.md +522 -0
- package/assets/skills/design/agemon-design/references/stage-assets.md +106 -0
- package/assets/skills/design/agemon-design/references/stage-build.md +46 -0
- package/assets/skills/design/agemon-design/references/stage-critique.md +34 -0
- package/assets/skills/design/agemon-design/references/stage-directions.md +44 -0
- package/assets/skills/design/agemon-design/references/stage-intake.md +34 -0
- package/assets/skills/design/agemon-design/references/stage-verify.md +44 -0
- package/assets/skills/design/agemon-design/references/state-design.md +188 -0
- package/assets/skills/design/agemon-design/references/tells-2026-11.md +32 -0
- package/assets/skills/design/agemon-design/references/themes.md +233 -0
- package/assets/skills/design/agemon-design/references/third-party-licenses.md +323 -0
- package/assets/skills/design/agemon-design/references/tokens.md +350 -0
- package/assets/skills/design/agemon-design/references/typography.md +248 -0
- package/assets/skills/design/agemon-design/scripts/audit-page.js +532 -0
- package/assets/skills/design/agemon-design/scripts/check-source.mjs +358 -0
- package/assets/skills/design/agemon-design/scripts/deal.mjs +231 -0
- package/assets/skills/design/agemon-design/scripts/inventory.mjs +676 -0
- package/assets/skills/essentials/web-design-guidelines/LICENSE +21 -0
- package/assets/skills/essentials/web-design-guidelines/NOTICE.md +14 -0
- package/assets/skills/essentials/web-design-guidelines/SKILL.md +18 -0
- package/assets/skills/essentials/web-design-guidelines/references/guidelines.md +184 -0
- package/assets/skills/essentials/writing-guidelines/LICENSE +21 -0
- package/assets/skills/essentials/writing-guidelines/NOTICE.md +14 -0
- package/assets/skills/essentials/writing-guidelines/SKILL.md +18 -0
- package/assets/skills/essentials/writing-guidelines/references/guidelines.md +250 -0
- package/assets/skills/founder/agemon-founder-board/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-board/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-board/SKILL.md +111 -0
- package/assets/skills/founder/agemon-founder-board/lenses.md +84 -0
- package/assets/skills/founder/agemon-founder-brand/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-brand/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-brand/SKILL.md +77 -0
- package/assets/skills/founder/agemon-founder-cfo/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-cfo/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-cfo/SKILL.md +109 -0
- package/assets/skills/founder/agemon-founder-cfo/example.json +27 -0
- package/assets/skills/founder/agemon-founder-cfo/unit_economics.py +270 -0
- package/assets/skills/founder/agemon-founder-competitors/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-competitors/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-competitors/SKILL.md +84 -0
- package/assets/skills/founder/agemon-founder-consumer/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-consumer/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-consumer/SKILL.md +126 -0
- package/assets/skills/founder/agemon-founder-consumer/customer.example.json +34 -0
- package/assets/skills/founder/agemon-founder-consumer/panel.py +424 -0
- package/assets/skills/founder/agemon-founder-consumer/pitch.example.md +3 -0
- package/assets/skills/founder/agemon-founder-launch/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-launch/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-launch/SKILL.md +65 -0
- package/assets/skills/founder/agemon-founder-marketing/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-marketing/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-marketing/SKILL.md +80 -0
- package/assets/skills/founder/agemon-founder-offer/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-offer/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-offer/SKILL.md +75 -0
- package/assets/skills/founder/agemon-founder-ops/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-ops/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-ops/SKILL.md +77 -0
- package/assets/skills/founder/agemon-founder-plan/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-plan/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-plan/SKILL.md +88 -0
- package/assets/skills/founder/agemon-founder-plan/compile.py +178 -0
- package/assets/skills/founder/agemon-founder-pricing/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-pricing/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-pricing/SKILL.md +92 -0
- package/assets/skills/founder/agemon-founder-pricing/van_westendorp.py +172 -0
- package/assets/skills/geo-seo/geo/LICENSE +21 -0
- package/assets/skills/geo-seo/geo/NOTICE.md +18 -0
- package/assets/skills/geo-seo/geo/SKILL.md +145 -0
- package/assets/skills/geo-seo/geo-audit/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-audit/NOTICE.md +17 -0
- package/assets/skills/geo-seo/geo-audit/SKILL.md +371 -0
- package/assets/skills/geo-seo/geo-audit/references/ai-visibility.md +233 -0
- package/assets/skills/geo-seo/geo-audit/references/content.md +329 -0
- package/assets/skills/geo-seo/geo-audit/references/platform-analysis.md +294 -0
- package/assets/skills/geo-seo/geo-audit/references/schema.md +383 -0
- package/assets/skills/geo-seo/geo-audit/references/technical.md +368 -0
- package/assets/skills/geo-seo/geo-brand-mentions/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-brand-mentions/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-brand-mentions/SKILL.md +459 -0
- package/assets/skills/geo-seo/geo-citability/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-citability/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-citability/SKILL.md +320 -0
- package/assets/skills/geo-seo/geo-content/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-content/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-content/SKILL.md +352 -0
- package/assets/skills/geo-seo/geo-crawlers/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-crawlers/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-crawlers/SKILL.md +388 -0
- package/assets/skills/geo-seo/geo-llmstxt/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-llmstxt/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-llmstxt/SKILL.md +433 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/SKILL.md +282 -0
- package/assets/skills/geo-seo/geo-report/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-report/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-report/SKILL.md +406 -0
- package/assets/skills/geo-seo/geo-report-pdf/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-report-pdf/NOTICE.md +20 -0
- package/assets/skills/geo-seo/geo-report-pdf/SKILL.md +153 -0
- package/assets/skills/geo-seo/geo-report-pdf/templates/geo-report-template.html +548 -0
- package/assets/skills/geo-seo/geo-schema/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-schema/NOTICE.md +16 -0
- package/assets/skills/geo-seo/geo-schema/SKILL.md +396 -0
- package/assets/skills/geo-seo/geo-technical/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-technical/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-technical/SKILL.md +566 -0
- package/assets/skills/output-style/agemon-adhd/LICENSE +21 -0
- package/assets/skills/output-style/agemon-adhd/NOTICE.md +13 -0
- package/assets/skills/output-style/agemon-adhd/SKILL.md +138 -0
- package/assets/skills/performance/agemon-performance/NOTICE.md +1 -0
- package/assets/skills/performance/agemon-performance/SKILL.md +76 -0
- package/assets/skills/security/agemon-security/LICENSE +21 -0
- package/assets/skills/security/agemon-security/NOTICE.md +8 -0
- package/assets/skills/security/agemon-security/SKILL.md +356 -0
- package/assets/skills/security/agemon-security-audit/AI-AND-LLM.md +83 -0
- package/assets/skills/security/agemon-security-audit/ATTACK-CLASSES.md +130 -0
- package/assets/skills/security/agemon-security-audit/CLIENT-SIDE.md +83 -0
- package/assets/skills/security/agemon-security-audit/CLOUD-AND-DEPLOYMENT.md +86 -0
- package/assets/skills/security/agemon-security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -0
- package/assets/skills/security/agemon-security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -0
- package/assets/skills/security/agemon-security-audit/HUNTING.md +251 -0
- package/assets/skills/security/agemon-security-audit/LICENSE +21 -0
- package/assets/skills/security/agemon-security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -0
- package/assets/skills/security/agemon-security-audit/NOTICE.md +12 -0
- package/assets/skills/security/agemon-security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -0
- package/assets/skills/security/agemon-security-audit/RECONNAISSANCE.md +156 -0
- package/assets/skills/security/agemon-security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -0
- package/assets/skills/security/agemon-security-audit/SKILL.md +192 -0
- package/assets/skills/security/agemon-security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -0
- package/assets/skills/security/agemon-security-audit/VALIDATION-AND-REPORTING.md +186 -0
- package/assets/skills/security/agemon-security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -0
- package/assets/skills/security/agemon-security-audit/report-schema.json +461 -0
- package/assets/skills/security/agemon-security-audit/validate-coverage-ledger.cjs +872 -0
- package/assets/skills/security/agemon-security-audit/validate-findings.cjs +773 -0
- package/assets/skills/self-review/agemon-review-intake/LICENSE +21 -0
- package/assets/skills/self-review/agemon-review-intake/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-review-intake/SKILL.md +205 -0
- package/assets/skills/self-review/agemon-review-request/LICENSE +21 -0
- package/assets/skills/self-review/agemon-review-request/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-review-request/SKILL.md +104 -0
- package/assets/skills/self-review/agemon-review-request/code-reviewer.md +188 -0
- package/assets/skills/self-review/agemon-root-cause/LICENSE +21 -0
- package/assets/skills/self-review/agemon-root-cause/NOTICE.md +10 -0
- package/assets/skills/self-review/agemon-root-cause/SKILL.md +283 -0
- package/assets/skills/self-review/agemon-root-cause/condition-based-waiting-example.ts +158 -0
- package/assets/skills/self-review/agemon-root-cause/condition-based-waiting.md +115 -0
- package/assets/skills/self-review/agemon-root-cause/defense-in-depth.md +122 -0
- package/assets/skills/self-review/agemon-root-cause/find-polluter.sh +72 -0
- package/assets/skills/self-review/agemon-root-cause/root-cause-tracing.md +169 -0
- package/assets/skills/self-review/agemon-root-cause/test-academic.md +14 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-1.md +58 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-2.md +68 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-3.md +69 -0
- package/assets/skills/self-review/agemon-verify-before-done/LICENSE +21 -0
- package/assets/skills/self-review/agemon-verify-before-done/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-verify-before-done/SKILL.md +120 -0
- package/assets/skills/team-lead/agemon-plan-rfc/SKILL.md +317 -0
- package/assets/skills/team-lead/prd-generator/SKILL.md +437 -0
- package/assets/skills/team-lead/skill-headofit-audit/SKILL.md +72 -0
- package/assets/skills/team-lead/skill-incident-rca/SKILL.md +66 -0
- package/assets/skills/team-lead/skill-meeting-lifecycle/SKILL.md +63 -0
- package/assets/skills/team-lead/skill-obsidian-vault-sync/SKILL.md +69 -0
- package/assets/skills/team-lead/skill-prd-decomposer/SKILL.md +71 -0
- package/assets/skills/team-lead/skill-sec-check/SKILL.md +70 -0
- package/assets/skills/team-lead/skill-task-extractor/SKILL.md +79 -0
- package/assets/skills/team-lead/skill-tech-spike/SKILL.md +57 -0
- package/assets/skills/team-lead/skill-techlead-reviewer/SKILL.md +81 -0
- package/assets/skills/workflow/agemon-brainstorming/LICENSE +21 -0
- package/assets/skills/workflow/agemon-brainstorming/NOTICE.md +14 -0
- package/assets/skills/workflow/agemon-brainstorming/SKILL.md +287 -0
- package/assets/skills/workflow/agemon-brainstorming/builder-check-prompt.md +23 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/LICENSE +21 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/SKILL.md +167 -0
- package/assets/skills/workflow/agemon-executing-plans/LICENSE +21 -0
- package/assets/skills/workflow/agemon-executing-plans/NOTICE.md +15 -0
- package/assets/skills/workflow/agemon-executing-plans/SKILL.md +322 -0
- package/assets/skills/workflow/agemon-executing-plans/scripts/task-done +55 -0
- package/assets/skills/workflow/agemon-executing-plans/scripts/task-start +32 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/LICENSE +21 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/SKILL.md +225 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/LICENSE +21 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/NOTICE.md +15 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/SKILL.md +339 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/code-reviewer.md +198 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/implementer-prompt.md +154 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/re-review-prompt.md +116 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/batching.md +11 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/cannot-verify.md +10 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/final-review.md +49 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/fix-loop.md +77 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/handling-reports.md +15 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/preflight.md +26 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/resuming.md +12 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/role-scout.md +18 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/role-worker.md +19 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/review-package +64 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/sdd-repo +54 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/sdd-workspace +110 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/task-brief +108 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/task-reviewer-prompt.md +209 -0
- package/assets/skills/workflow/agemon-test-driven-development/LICENSE +21 -0
- package/assets/skills/workflow/agemon-test-driven-development/NOTICE.md +14 -0
- package/assets/skills/workflow/agemon-test-driven-development/SKILL.md +330 -0
- package/assets/skills/workflow/agemon-test-driven-development/writing-good-tests.md +198 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/LICENSE +21 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/SKILL.md +167 -0
- package/assets/skills/workflow/agemon-writing-plans/LICENSE +21 -0
- package/assets/skills/workflow/agemon-writing-plans/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-writing-plans/SKILL.md +204 -0
- package/assets/tools/code-review-graph-constraints.txt +1418 -0
- package/assets/tools/package-lock.json +111 -0
- package/assets/tools/package.json +6 -0
- package/dist/chunk-ZZBF3GOV.js +3451 -0
- package/dist/chunk-ZZBF3GOV.js.map +1 -0
- package/dist/fake-subprocess-IV4ML77S.js +636 -0
- package/dist/fake-subprocess-IV4ML77S.js.map +1 -0
- package/dist/index.js +23836 -1945
- package/dist/index.js.map +1 -1
- package/package.json +37 -17
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# Finish Bar
|
|
2
|
+
|
|
3
|
+
Ten finishing passes, each with measurable criteria. Run before shipping. Gated to `CRAFT_LEVEL ≥ 8`, or when the user asks for a full pre-ship pass. The point is not more rules — each pass surfaces a class of failure the others can't catch. Passes share no blind spots by design.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## How to Run the Bar
|
|
8
|
+
|
|
9
|
+
Run passes in order. Earlier passes (hierarchy, type system, surface stack) are foundational — changing them after later passes would invalidate findings downstream. Sequence is not arbitrary.
|
|
10
|
+
|
|
11
|
+
For each pass: collect findings, assign severity (Critical / Major / Minor), then fix or defer with a written reason. "Defer" without a reason is not a defer, it's a skip.
|
|
12
|
+
|
|
13
|
+
**Done** means each pass returns zero Critical and zero Major findings. Minor findings are explicitly accepted — write them down and ship anyway, or address them. Unwritten Minor findings are ignored findings.
|
|
14
|
+
|
|
15
|
+
Time budget: one screen with a single primary action takes 15–30 minutes. A full multi-screen flow takes hours. Don't try to run the bar on the whole app at once — run it on a vertical slice, ship, repeat.
|
|
16
|
+
|
|
17
|
+
The bar is opinionated about what matters. When a pass conflicts with a recorded project decision (e.g., the project deliberately uses dense data tables that violate Pass 4's spacing rhythm), the pass yields. Cite the principle in `brief.md` that overrides. If no brief principle covers it, the conflict is a finding, not a defer.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Pass 1 — Hierarchy
|
|
22
|
+
|
|
23
|
+
**Goal:** the surface resolves to one primary thing on first glance. The rest reads as supporting.
|
|
24
|
+
|
|
25
|
+
**Criteria:**
|
|
26
|
+
- Squint test passes: blur the screen or squint for 200ms. One element dominates. (Perceptual basis in `layout.md` — Squint Test section.)
|
|
27
|
+
- Primary / Secondary / Tertiary / Quaternary named explicitly for this surface before touching pixels. Write them down.
|
|
28
|
+
- Adjacent hierarchy levels differ by ≥1.5× in at least one signal: size, weight, contrast, surface area, or position.
|
|
29
|
+
- One focal point per viewport. Two elements at the same visual weight means one is wrong.
|
|
30
|
+
- Navigation, footers, and sidebars sit below content in perceived weight — they are infrastructure, not content.
|
|
31
|
+
|
|
32
|
+
**How to verify:** apply `filter: blur(8px)` in DevTools or squint physically. If the layout reads as a flat field of similar shapes, hierarchy failed. If two things fight for dominance, name which one wins and why; the loser gets demoted.
|
|
33
|
+
|
|
34
|
+
**When it doesn't apply:** purely transactional confirmations (a single action + summary) legitimately collapse to two levels — the action versus everything else. That's correct.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Pass 2 — Type System
|
|
39
|
+
|
|
40
|
+
**Goal:** typography is a system, not a collection of styles that happen to coexist.
|
|
41
|
+
|
|
42
|
+
**Criteria:**
|
|
43
|
+
- ≤3 font weights in the visible viewport. More signals indecision, not richness.
|
|
44
|
+
- Tabular numerals on every cell, badge, or display element containing numerical data (`font-variant-numeric: tabular-nums`).
|
|
45
|
+
- OpenType features active where the font supports them: discretionary ligatures off in UI, contextual alternates on for serif headlines, kerning always on.
|
|
46
|
+
- Prose body line-length: 50–75 characters. UI labels, badges, and tables are exempt.
|
|
47
|
+
- Letter-spacing scoped per role: Latin sans-serif display tightens at large sizes; small utility labels widen. Never adjust CJK or Arabic spacing — those scripts have their own optical metrics.
|
|
48
|
+
- One body face, optionally one display face, optionally one mono. No fourth face.
|
|
49
|
+
|
|
50
|
+
**How to verify:** grep rendered `font-weight` declarations on the surface — count distinct values. Inspect numbers in DevTools computed styles for `font-variant-numeric`. Measure a prose container by pasting its text into a character-count tool.
|
|
51
|
+
|
|
52
|
+
**When it doesn't apply:** single-screen experiences with no prose (a confirmation dialog, a product card) skip the line-length criterion. The weight and numeral criteria still apply.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Pass 3 — Surface Stack
|
|
57
|
+
|
|
58
|
+
**Goal:** at least three distinguishable elevation levels, both modes intentional.
|
|
59
|
+
|
|
60
|
+
**Criteria:**
|
|
61
|
+
- Canvas, raised, and overlay surfaces are visually distinct: ≥2% luminance delta in light mode, ≥4% in dark mode.
|
|
62
|
+
- Semantic naming in tokens: `--surface-canvas`, `--surface-raised`, `--surface-overlay` (or equivalent). No unnamed magic values.
|
|
63
|
+
- Dark mode surfaces are not inverted light primitives. Canvas in dark sits at a near-black with a hue tint — not `#000000`. Raised surfaces add luminance, not just reduce it.
|
|
64
|
+
- `color-scheme` declared so native form controls follow the mode.
|
|
65
|
+
- Shadows fall back to border tints in dark mode where shadow-on-dark loses effect. A 10% opacity drop shadow on a near-black background is invisible — replace it.
|
|
66
|
+
|
|
67
|
+
**How to verify:** render side-by-side in both modes. Toggle rapidly. Dark should not look like a photo-inverted version of the light surface — it should look like a deliberate reinterpretation. Cross-ref the intentional-dark test in `tokens.md`.
|
|
68
|
+
|
|
69
|
+
**When it doesn't apply:** single-mode embedded UIs (a terminal panel, an e-ink reader context) where dark mode is not a product requirement.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Pass 4 — Spacing Rhythm
|
|
74
|
+
|
|
75
|
+
**Goal:** within < between < section, at every nesting level without exception.
|
|
76
|
+
|
|
77
|
+
**Criteria:**
|
|
78
|
+
- Every spacing value comes from the token scale. No arbitrary px values. (`layout.md` — Spacing Rhythm section.)
|
|
79
|
+
- The rhythm invariant holds at every nesting level: label 4px above its input, inputs 16px apart within the form, form 48px from the next section. Check three nesting levels minimum.
|
|
80
|
+
- Section breaks are ≥2× the inter-block spacing. If they are not, sections blur into blocks.
|
|
81
|
+
- Optical adjustments noted explicitly: icon vertical nudge to optical center, modal vertical offset for visual weight. Document these as intentional, not accidents.
|
|
82
|
+
|
|
83
|
+
**How to verify:** scroll the surface slowly. At each nested group, check that the surrounding space is visibly larger than the internal space. If you cannot tell which level you are in from spacing alone, the rhythm broke.
|
|
84
|
+
|
|
85
|
+
**When it doesn't apply:** dense data tables and command palettes deliberately compress. The proportion still holds — the absolute values shrink. Never collapse two adjacent levels to the same value regardless of density.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Pass 5 — Iconography
|
|
90
|
+
|
|
91
|
+
**Goal:** one icon family, stroke weight matched to type, geometry coherent across the surface.
|
|
92
|
+
|
|
93
|
+
**Criteria:**
|
|
94
|
+
- Single icon family throughout the surface. No mixing families from different systems.
|
|
95
|
+
- Icon stroke weight visually matches body type weight: 1.5px stroke for `font-weight: 400`, 2px for 500. Mismatched weights read as elements from different UIs.
|
|
96
|
+
- Icon-to-type size ratio is consistent: if a 24px icon appears beside a 16px label, that ratio holds throughout. A 20px icon beside a 16px label elsewhere is a finding.
|
|
97
|
+
- Container shape is one of: circle, rounded square, squircle. Chosen once, held throughout. No surface where some icons have circle containers and others have rounded squares.
|
|
98
|
+
- No non-icon characters standing in for designed icons anywhere outside user-generated content contexts.
|
|
99
|
+
|
|
100
|
+
**How to verify:** collect every icon instance on the surface in a contact sheet (screenshot + arrange). They should look like siblings from one family. Any that don't match immediately is a finding. Cross-ref `inspiration.md` — "What Mature Interfaces Never Do" section.
|
|
101
|
+
|
|
102
|
+
**When it doesn't apply:** emoji as user content (chat reactions, message-thread rosters) are content, not icons — they are exempt from family and stroke criteria.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Pass 6 — State Coverage
|
|
107
|
+
|
|
108
|
+
**Goal:** every state designed, not defaulted or missing.
|
|
109
|
+
|
|
110
|
+
**Criteria — all eight states must have explicit designs:**
|
|
111
|
+
- **Idle** — the resting state is intentional, not just the absence of everything else.
|
|
112
|
+
- **Loading** — skeleton matches the final layout geometry; shown after ~200ms to avoid flash on fast connections.
|
|
113
|
+
- **Empty** — one line explaining why it's empty + one primary action. Never "No items found" with no next step.
|
|
114
|
+
- **Error** — inline, actionable: what failed + what the user does next. Never a modal for a recoverable field error.
|
|
115
|
+
- **Success** — visible beyond color change: icon swap, position shift, or explicit confirmation text.
|
|
116
|
+
- **Partial** — unknown values rendered as em-dash; never `null`, `N/A`, or `0` for a value that isn't actually zero.
|
|
117
|
+
- **Conflict** — concurrent-edit or stale-data scenarios handled with explicit UI, not silent overwrites.
|
|
118
|
+
- **Offline** — skeleton persists past the loading timeout with an affordance that explains the surface is stale.
|
|
119
|
+
|
|
120
|
+
**How to verify:** write the eight state names on paper. For each interactive surface, mark which states have explicit designs. Unmarked states are Critical findings. Cross-ref `state-design.md`.
|
|
121
|
+
|
|
122
|
+
**When it doesn't apply:** read-only static surfaces (an embedded widget, a printed report) genuinely have only idle and loading. Conflict and offline states are not applicable.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Pass 7 — Motion Tuning
|
|
127
|
+
|
|
128
|
+
**Goal:** every transition is purposeful, sub-400ms for UI, and motion-gap-clean.
|
|
129
|
+
|
|
130
|
+
**Criteria:**
|
|
131
|
+
- UI transitions use the duration scale's transition band: 100–400ms. Nothing outside this range for interactive state changes.
|
|
132
|
+
- Easings have perceptual basis: no `linear` for spatial motion, no symmetric `ease-in-out` on hover — spatial motion should ease out. (Cross-ref `motion.md` — Duration and Easing Scale.)
|
|
133
|
+
- Motion-gap audit clean: no interactive state changes that snap without a transition where the change is visually significant (appearance, disappearance, repositioning).
|
|
134
|
+
- Reduced-motion contract honored: `prefers-reduced-motion: reduce` collapses durations to ≤80ms or removes entrance animations entirely. The surface must be fully usable without motion.
|
|
135
|
+
- Custom curves where the surface demands character. The four named CSS easing keywords are a starting point, not a destination.
|
|
136
|
+
|
|
137
|
+
**How to verify:** trigger every interactive state in sequence and watch the transitions. Anything that snaps where a transition is expected is a Pass 7 Critical. Verify `prefers-reduced-motion` in DevTools by emulating the media feature.
|
|
138
|
+
|
|
139
|
+
**When it doesn't apply:** static surfaces with no state changes have no motion to audit. Skip the motion-gap pass, but the reduced-motion contract still applies if any CSS animation exists.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Pass 8 — Microcopy Voice
|
|
144
|
+
|
|
145
|
+
**Goal:** every string has voice, specificity, and a single author.
|
|
146
|
+
|
|
147
|
+
**Criteria:**
|
|
148
|
+
- Verbs consistent across primary actions throughout the surface. Pick one form and hold it.
|
|
149
|
+
- No placeholder copy in production paths: no lorem ipsum, no generic names, no TODO comments, no XXX strings.
|
|
150
|
+
- No generic CTAs — every call to action names the specific outcome of the action.
|
|
151
|
+
- Error messages name what operation failed and offer a concrete next step. "Something went wrong" is not an error message.
|
|
152
|
+
- Empty states contain exactly one primary action — not three suggestions, not a paragraph, not a link list.
|
|
153
|
+
- Voice axes locked per the brief: formality, expertise level, and relationship position documented in `brief.md`. All strings on this surface should sound like the same product.
|
|
154
|
+
|
|
155
|
+
**How to verify:** extract every visible string from the surface. Read each one out of context — stripped of layout and visual hierarchy. Each should still communicate clearly and sound like the same product. Cross-ref `copy.md` voice matrix and `brief.md`.
|
|
156
|
+
|
|
157
|
+
**When it doesn't apply:** legal text (terms, privacy notices, regulatory copy) is locked to compliance language and exempt from product voice criteria.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Pass 9 — Pixel Honesty
|
|
162
|
+
|
|
163
|
+
**Goal:** small details match the resolution intent of the design.
|
|
164
|
+
|
|
165
|
+
**Criteria:**
|
|
166
|
+
- Borders use sub-pixel approaches where a hairline is intended: `border: 1px solid color-mix(in oklch, var(--text-primary) 8%, transparent)` reads as a separator; a solid `neutral-200` border reads as a structural edge. Use the right one.
|
|
167
|
+
- Shadow stacks use 2–3 layers for depth perception. A single shadow at one blur value looks flat and unconvincing.
|
|
168
|
+
- Corner radii vary by element role: buttons, cards, and inputs each have a distinct radius. Uniform radius on every element is an AI-template tell — the single most recognizable signal of generated UI. (Cross-ref `inspiration.md` — Reference Token Values section.)
|
|
169
|
+
- Overflow handled on every text container: truncation includes a `title` tooltip, no `text-overflow: ellipsis` without a `max-width` set.
|
|
170
|
+
- Icon containers use squircles where the design language calls for it — circle and rounded square are not interchangeable.
|
|
171
|
+
|
|
172
|
+
**How to verify:** zoom to 200%+ and inspect details. Anything that "looks slightly off" at that zoom is a finding worth naming. The test is not whether it looks perfect at 100% — it's whether the details hold up under scrutiny.
|
|
173
|
+
|
|
174
|
+
**When it doesn't apply:** utility surfaces (internal tooling, admin dashboards) where the brief explicitly records that polish is deferred in favor of completeness. The decision must be in `brief.md`, not assumed.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Pass 10 — Data Formatting
|
|
179
|
+
|
|
180
|
+
**Goal:** every number, date, and currency communicates the right thing at the right precision.
|
|
181
|
+
|
|
182
|
+
**Criteria:**
|
|
183
|
+
- Tabular numerals on all data display: cells, KPIs, badges, inline metrics (`font-variant-numeric: tabular-nums`).
|
|
184
|
+
- Counts abbreviated where the absolute value isn't the point: `1.2k`, `3.4M`, `12.5h`. Unabbreviated where the exact value matters.
|
|
185
|
+
- Relative time where the user cares about recency (`2m ago`, `yesterday`). Absolute time where provenance matters (`Mar 4, 14:32 UTC`). Never use one format everywhere — they answer different questions.
|
|
186
|
+
- Currency formatted to locale. Negative values distinguished by at least two signals: sign + color, or sign + parentheses for accounting contexts.
|
|
187
|
+
- Precision matches the decision granularity the user needs. A percentage to five decimal places is noise. A stock price rounded to the dollar is misleading. Match the precision to the question the number answers.
|
|
188
|
+
|
|
189
|
+
**How to verify:** inspect every numeric value on the surface. For each: what question does this number answer, and is the format right for that question? A count that could be `1,248` but shows `1.2k` when the user needs the exact number is a finding. Cross-ref `dataviz.md` for number formatting in chart contexts.
|
|
190
|
+
|
|
191
|
+
**When it doesn't apply:** integer-only surfaces (step counts, indices, item counts) skip currency and decimal precision criteria. Tabular numerals still apply.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## How Findings Map to Severity
|
|
196
|
+
|
|
197
|
+
**Critical — block ship:**
|
|
198
|
+
- Pass 1: no discernible hierarchy (flat field of equal-weight elements)
|
|
199
|
+
- Pass 6: states missing explicit designs (loading, empty, or error undefined)
|
|
200
|
+
- Pass 8: placeholder copy in production paths (lorem ipsum, TODO strings, generic names)
|
|
201
|
+
|
|
202
|
+
**Major — fix before ship when time allows; document if not:**
|
|
203
|
+
- Pass 3: surface stack incomplete or dark mode is an inverted light layer
|
|
204
|
+
- Pass 7: motion-gap failures on visible state changes; `prefers-reduced-motion` contract not honored
|
|
205
|
+
- Pass 9: uniform border-radius across all element types
|
|
206
|
+
- Pass 2: proportional numerals on tabular data (misaligned columns, impossible to compare)
|
|
207
|
+
|
|
208
|
+
**Minor — polish; ship-okay if explicitly accepted:**
|
|
209
|
+
- Pass 2: single weight-count violation (four weights, not three)
|
|
210
|
+
- Pass 5: icon stroke weight off by a half-unit
|
|
211
|
+
- Pass 10: currency format missing locale
|
|
212
|
+
- Pass 4: one spacing value that skips a token (an arbitrary 20px in an otherwise clean scale)
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## When to Skip the Bar
|
|
217
|
+
|
|
218
|
+
- Internal tools where `brief.md` explicitly defers polish to product completeness. The deferral must be written, not assumed.
|
|
219
|
+
- Throwaway prototypes that will be discarded after a user test. If there is no brief, there is no bar.
|
|
220
|
+
- Single-screen confirmation flows where only 2–3 passes have anything to evaluate. Run those passes only, note the others as N/A.
|
|
221
|
+
|
|
222
|
+
The bar is a tool, not a ritual. Skipping it without recording why is the only wrong answer.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Convergence mode
|
|
227
|
+
|
|
228
|
+
When invoked under a loop preset (e.g., `visual-anti-slop` from `loops.md`), the bar re-runs from **Pass 1** after each single highest-impact fix — full, not partial (passes are order-dependent). Repeat until Done (zero Critical, zero Major) or the loop budget is exhausted. The loop controls iteration count and stop conditions; the bar supplies the evaluative lens only.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Cross-References
|
|
233
|
+
|
|
234
|
+
- `brief.md` — which passes can be deferred and which are non-negotiable for this product; voice axes for Pass 8.
|
|
235
|
+
- `tokens.md` — Passes 3, 4, 7, and 9 require token discipline; intentional-dark test in Pass 3.
|
|
236
|
+
- `layout.md` — Pass 1 (hierarchy and squint test) and Pass 4 (spacing rhythm) primary references.
|
|
237
|
+
- `typography.md` — Pass 2 (type system) primary reference.
|
|
238
|
+
- `motion.md` — Pass 7 (motion tuning) primary reference; duration and easing scale.
|
|
239
|
+
- `state-design.md` — Pass 6 (state coverage) primary reference; state lattice.
|
|
240
|
+
- `copy.md` — Pass 8 (microcopy) primary reference; voice matrix, error copy, empty states.
|
|
241
|
+
- `dataviz.md` — Pass 10 (data formatting) primary reference for numeric display in chart contexts.
|
|
242
|
+
- `inspiration.md` — Pass 5 (iconography) and Pass 9 (pixel honesty); "What Mature Interfaces Never Do" and Reference Token Values sections.
|
|
243
|
+
- `accessibility.md` — every pass assumes a11y is satisfied at the floor. The finish bar is the ceiling, not the floor. Run `accessibility.md` first.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Forms — System Design
|
|
2
|
+
|
|
3
|
+
Holistic form design: timing, placement, progressive disclosure, multi-step flows, autosave, optimistic submit, keyboard contract, and field-specific patterns. Input labels and ARIA requirements live in `accessibility.md`; error message tone lives in `copy.md`. This file is the system that ties those tactical pieces together.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When to Read This
|
|
8
|
+
|
|
9
|
+
Read when building any form longer than 2 fields, any multi-step flow, any form with conditional logic, any surface with autosave, or any destructive confirmation. A single search input doesn't need this file; a checkout, onboarding, settings page, or record editor does.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Input Basics
|
|
14
|
+
|
|
15
|
+
Two rules that belong at the input level, before any validation or layout decision:
|
|
16
|
+
|
|
17
|
+
- **Never block paste.** Full rule and rationale live in `accessibility.md`.
|
|
18
|
+
- **Mobile input text sits at 16px minimum on small viewports.** Below that, Safari on iOS zooms the whole page in the moment the input gets focus, and getting back to the prior zoom level is on the user, not the page. Set 16px as the floor and size down from `sm:` breakpoints upward, never the reverse. Do not "fix" this by capping zoom in the viewport meta (`maximum-scale=1`, `user-scalable=no`) — most mobile browsers actually honor that cap, so the workaround takes the user's own pinch-to-zoom with it. That swaps a minor iOS quirk for a real WCAG 1.4.4 (Resize Text) failure.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Validation Timing
|
|
23
|
+
|
|
24
|
+
The most-botched decision in form UX. Wrong timing feels punitive; right timing feels invisible.
|
|
25
|
+
|
|
26
|
+
| Trigger | When to use | When not to |
|
|
27
|
+
|---------|-------------|-------------|
|
|
28
|
+
| On blur | Format-checkable fields (email, URL, credit card, phone) | Required-only check — don't punish leaving a field |
|
|
29
|
+
| On submit | Required fields, inter-field dependencies, server-side uniqueness | Format checks that could fire earlier |
|
|
30
|
+
| Inline (as-you-type) | Password strength, character count, username availability | Email format (too noisy); most other fields |
|
|
31
|
+
| On mount | Never | Ever |
|
|
32
|
+
|
|
33
|
+
**Rules:**
|
|
34
|
+
- Validate on blur only after the user has interacted with the field at least once. Never validate on mount — nothing is wrong yet, and red borders on a fresh form read as hostile.
|
|
35
|
+
- Inline validation: debounce 300ms before showing error states. **Why:** without debounce, users see flickering error→success cycles as they type. Jittery feedback breaks the typing flow and reduces trust. 300ms is the threshold where users perceive feedback as "after I stopped" rather than "while I'm typing". (See Debounce Timings below.)
|
|
36
|
+
- Server-side uniqueness checks (username, slug) show a tiny spinner in the field during the check, then a green check or red error on resolve.
|
|
37
|
+
- On submit, surface ALL errors at once, not one at a time. Users want to fix everything in one pass.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Error Placement
|
|
42
|
+
|
|
43
|
+
Where error messages live on the page. Details on copy tone are in `copy.md`.
|
|
44
|
+
|
|
45
|
+
- **Errors below the input; hints and help text ABOVE it.** Errors appear after typing, so below-field placement follows reading order. Hints are needed *while* typing — below the field they get covered by autofill menus and the mobile keyboard; above the field they stay visible.
|
|
46
|
+
- **Red border on the input itself**, plus message, plus icon (`⚠` or field-specific). Color alone fails WCAG and color-blind users — pair color with shape/text.
|
|
47
|
+
- **Scroll to first error on submit** if not in view. Focus it so screen readers announce it immediately.
|
|
48
|
+
- **Summary at the top is additive, not a replacement.** For long forms, an aria-live summary box ("3 fields need attention") helps — but every field still has its own inline error.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Field Layout
|
|
53
|
+
|
|
54
|
+
- **Single column.** Multi-column forms break downward momentum, create fill-order ambiguity, and screen-magnifier users miss the second column entirely. Exception: short, intrinsically paired fields (MM/YY + CVC) sit side by side.
|
|
55
|
+
- **Labels above inputs, within ~16px.** Top labels eliminate the zig-zag eye path of side labels; more distance than that and the label detaches from its field.
|
|
56
|
+
- **Selection widgets by option count:** 2-5 → radios or segmented control, stacked vertically (horizontal invites mis-taps); 6-10 → radios if vertical space allows, dropdown if tight; >10 → autocomplete/type-ahead; huge taxonomies (1000+ occupations) → cascade two fields (category → item) to avoid choice paralysis. Numeric nudges → stepper with horizontal +/- and 48px targets, never a dropdown of numbers.
|
|
57
|
+
- **Checkbox vs toggle:** checkbox = applies on submit; toggle = applies immediately. Label checkboxes positively ("Allow automatic updates", never "Don't allow…") — test by replacing the checked box with "yes": the sentence must still make sense.
|
|
58
|
+
- **Submit button aligns with the fields' left edge** in stacked forms — the eye travels straight down the column and lands on it. Exception: single inline field (search, newsletter) → button attached to the field's right.
|
|
59
|
+
- **Never remove an error until the user changes the field.** Clearing it on re-focus without re-validation hides the problem.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Progressive Disclosure
|
|
64
|
+
|
|
65
|
+
Show fields only when relevant. A form with 20 visible fields reads as homework; the same form with 6 visible and 14 revealed-on-relevance feels considerate.
|
|
66
|
+
|
|
67
|
+
- **Conditional fields appear smoothly** — use a 200ms height/opacity transition (`interpolate-size: allow-keywords` enables height-to-auto), not a pop-in. See `modern-css.md`.
|
|
68
|
+
- **Group related fields under a shared section header** — billing address separate from shipping address separate from payment.
|
|
69
|
+
- **Optional fields behind a "More options" toggle** if there are more than 2. Most users don't need them; showing them upfront adds cognitive load for no gain.
|
|
70
|
+
- **Never make users guess which fields are required.** Two valid schools: mark only the optional minority with "(optional)" (lighter), or mark both — asterisk on required plus "(optional)" (most explicit; favors scanners and screen-reader users). Pick per audience and form length — but never rely on intro text ("all fields required unless noted"): users scan forms, they don't read preambles. If you use asterisks, they're black/neutral, never red — red is reserved for error states. Skip marking entirely in single-field familiar forms (login, newsletter).
|
|
71
|
+
- **Field width hints at expected content length** — postal code and CVC narrow, full name and address wide. Uniform full-width fields discard a free affordance.
|
|
72
|
+
- **Inputs sit on solid surfaces** — never semi-translucent fills over imagery; legibility collapses for low-vision users and in bright ambient light.
|
|
73
|
+
- **Mobile multi-step forms: max 5-7 fields per step.** **Why:** Hick's Law — decision time grows logarithmically with options on-screen, and mobile reading width amplifies the effect. Forms longer than 7 fields exceed the page-scanning time (~7 seconds) before the user begins typing. Desktop tolerates higher density when the form has a clear scan structure (left-aligned labels, grouped fieldsets).
|
|
74
|
+
- **Conditional reveal is one-way** until submit — don't hide a field the user has filled, even if the condition changes. Instead, disable it with a note.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Multi-Step / Wizard Patterns
|
|
79
|
+
|
|
80
|
+
When a form is too long for one screen, or the steps represent logical phases (account → plan → payment → confirm).
|
|
81
|
+
|
|
82
|
+
- **Progress indicator.** Numbered steps + current/total + short label per step. Not just "Step 3 of 5" — "Step 3 of 5: Payment."
|
|
83
|
+
- **State the cost upfront.** "3 steps, about 2 minutes, you'll need your ID" before step 1 — unknown length is why users abandon at step 2.
|
|
84
|
+
- **Order steps easy → hard.** Name and email before payment details: early wins build completion momentum; opening with the hardest ask maximizes abandonment.
|
|
85
|
+
- **Back button always available.** Moving back preserves all state; never re-fetch or reset.
|
|
86
|
+
- **Prefer an always-enabled "Next" that validates on press.** A disabled button can't say why it's disabled, gives no feedback when pressed, and is invisible to some assistive tech. If you do gate, the explanation must be visible inline — never tooltip-only, never silent.
|
|
87
|
+
- **Save draft automatically** between steps. See Autosave below.
|
|
88
|
+
- **Resume on return.** If the user leaves and comes back, restore to the last completed step, not step 1.
|
|
89
|
+
- **Review step before final submit.** Summary of all entries grouped by section, with an "Edit" link per section that jumps back to that step and returns. Users catch their own errors cheaper than servers do.
|
|
90
|
+
- **Never more than ~5 steps.** See Miller's Law in `heuristics.md` — beyond 5, the user loses the map.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Save-Draft / Autosave
|
|
95
|
+
|
|
96
|
+
For any form that takes longer than ~30 seconds to fill.
|
|
97
|
+
|
|
98
|
+
- **Autosave debounce: 1-2s** after the last keystroke across the form, not per keystroke. (See Debounce Timings below.)
|
|
99
|
+
- **Visible "Saved" indicator with timestamp** — "Saved 2s ago" near the fields, quiet typography. Match `copy.md` restraint: "Saved" beats "Your draft has been saved successfully!"
|
|
100
|
+
- **Network loss.** Show "Reconnecting… Your draft is safe locally" and queue the save. When back online, sync and update the indicator.
|
|
101
|
+
- **Conflict resolution.** If another tab or user edited the same resource, offer "Keep mine / Keep theirs / Merge." See `state-design.md` for the conflict-state pattern.
|
|
102
|
+
- **Never show a spinner for autosave.** The whole point is invisibility. A check mark or timestamp is enough.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Debounce Timings
|
|
107
|
+
|
|
108
|
+
Two debounces, two purposes:
|
|
109
|
+
|
|
110
|
+
- **Validation debounce: 300ms.** Triggers after the user pauses typing in a field. Prevents flicker; lets the user see the field's final state before judging it.
|
|
111
|
+
- **Autosave debounce: 1-2s.** Triggers after the user pauses across the form. Reduces network cost; lets the user settle on a value before persisting.
|
|
112
|
+
|
|
113
|
+
These never share the same timer. Validation runs per-field; autosave runs per-form.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Optimistic Submit
|
|
118
|
+
|
|
119
|
+
Forms that look instant. Use for low-risk writes (likes, toggles, comment posts, small field edits).
|
|
120
|
+
|
|
121
|
+
- **Show success state immediately on submit** — don't wait for server ack.
|
|
122
|
+
- **Roll back with a clear undo prompt if the server rejects.** "Couldn't save — undo or retry?" Never silently revert.
|
|
123
|
+
- **Queue on offline; sync on reconnect** with a visible indicator.
|
|
124
|
+
- **Never double-submit.** Disable the button OR swap its label to "Sending…" with a spinner inside. Both — belt and suspenders.
|
|
125
|
+
- **Non-optimistic submits** (payments, destructive actions, high-stakes writes) — always wait for server confirmation before showing success.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Keyboard Affordances
|
|
130
|
+
|
|
131
|
+
Basics most forms miss. The keyboard contract is non-negotiable on any form a user will fill more than once.
|
|
132
|
+
|
|
133
|
+
- **Enter submits from any single-line input.** Textareas get `Cmd/Ctrl + Enter` for submit; plain Enter inserts a newline.
|
|
134
|
+
- **Tab order matches visual order.** No DOM-order surprises. Never `tabindex > 0` to hack the order — fix the DOM.
|
|
135
|
+
- **Submit button is focus-reachable** without `tabindex` tricks.
|
|
136
|
+
- **Escape closes form modals** and prompts a "Discard changes?" if the form is dirty.
|
|
137
|
+
- **Autofocus the first field on form open** — but with caveats on mobile (may trigger the keyboard to pop up before the user sees the form). Test on real devices; consider autofocus only on desktop.
|
|
138
|
+
- **Cmd/Ctrl + S saves** on long-form editors. Common expectation from native apps.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Field-Specific Patterns
|
|
143
|
+
|
|
144
|
+
The fields that AI-generated forms get wrong.
|
|
145
|
+
|
|
146
|
+
| Field | Pattern |
|
|
147
|
+
|-------|---------|
|
|
148
|
+
| Phone | Country code picker + mask + formatted display. Store E.164 internally; display local format ("(415) 555-1234") |
|
|
149
|
+
| Date | Prefer native `<input type="date">` where UX is tolerable. For ranges or complex pickers, a dedicated accessible component |
|
|
150
|
+
| Time zone | Pre-fill from browser (`Intl.DateTimeFormat().resolvedOptions().timeZone`); let user override; display user-facing name ("9:00 AM PT") not IANA ID |
|
|
151
|
+
| Credit card | Autoformat with a space every 4 digits; detect brand from first digits; move focus to expiry when card number is valid |
|
|
152
|
+
| Currency | Format per locale via `Intl.NumberFormat`; never let users type the currency symbol — render it as a prefix affordance |
|
|
153
|
+
| Password | Show/hide toggle (eye icon + `aria-label`). Strength indicator relative, not absolute. Skip the "1 uppercase, 1 number, 1 special" dance unless compliance requires it — long is better than complex |
|
|
154
|
+
| Magic link | "Check your email" state with explicit "Didn't receive? Resend in 30s" countdown; cooldown visible |
|
|
155
|
+
| File upload | Drag-and-drop with dashed border indicator on drag-over; per-file progress (bar + filename + size + cancel); per-file retry on failure; `accept` hints + descriptive copy ("PDF, PNG, JPG up to 10MB") |
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Destructive Actions Inside Forms
|
|
160
|
+
|
|
161
|
+
Deleting accounts, subscriptions, workspaces, or data from within a settings form.
|
|
162
|
+
|
|
163
|
+
- **Separate section** — a "Danger zone" block, visually distinct, at the bottom. Never primary-button-style for the delete action; Cancel is the primary.
|
|
164
|
+
- **Type-to-confirm** for irreversible deletions: require the user to type the resource name.
|
|
165
|
+
- Copy tone and confirmshaming rules: see `copy.md` — Banned Patterns (Dark UX).
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Anti-Patterns
|
|
170
|
+
|
|
171
|
+
Form sins that invalidate the rest of the work:
|
|
172
|
+
|
|
173
|
+
- **Placeholder as the only label.** Disappears on focus → user forgets what the field was. Accessibility and memory fail.
|
|
174
|
+
- **Red required asterisks, or marking convention explained nowhere.** Red is the error color — a field can't be "in error" before the user touches it. Asterisks are black; the marking scheme is self-evident or legended. See Progressive Disclosure for the optional-vs-required marking decision.
|
|
175
|
+
- **Red validation on mount.** Nothing is wrong yet — don't punish arrival.
|
|
176
|
+
- **Disabled submit button with no explanation.** User can't fix what they can't see. Tooltip or inline hint explains what's missing.
|
|
177
|
+
- **Clearing the whole form on one error.** Preserve every valid field; only reset the invalid one.
|
|
178
|
+
- **Captcha before form submission.** Captcha runs after the user expressed intent, not before.
|
|
179
|
+
- **"Are you sure?" after every step** in a wizard. Users desensitize and click through; save the confirm for the last, destructive moment.
|
|
180
|
+
- **Reset button next to submit.** Users accidentally click it. Almost never worth shipping.
|
|
181
|
+
- **Two password fields** ("confirm password") without a show/hide toggle. Everyone types the same typo twice.
|
|
182
|
+
- **Blocking paste** on any field — especially password confirm, order IDs, credit cards. See `accessibility.md`.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Cross-References
|
|
187
|
+
|
|
188
|
+
- `accessibility.md` — ARIA, label requirements, keyboard non-negotiables, `aria-describedby` for errors.
|
|
189
|
+
- `copy.md` — voice/tone across form states, reading level, locale-aware strings, inclusive language, error message tone, empty states, CTA discipline.
|
|
190
|
+
- `state-design.md` — form states (idle / submitting / success / error / partial / offline); autosave conflict state.
|
|
191
|
+
- `heuristics.md` — Error Prevention heuristic, Miller's Law for step counts, Tesler's Law for progressive disclosure.
|
|
192
|
+
- `modern-css.md` — `interpolate-size: allow-keywords` for revealed fields, `<dialog>` for confirm modals, Anchor Positioning for inline help popovers.
|