@wazir-dev/cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +111 -0
- package/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +101 -0
- package/LICENSE +21 -0
- package/README.md +314 -0
- package/assets/composition-engine.mmd +34 -0
- package/assets/demo-script.sh +17 -0
- package/assets/logo-dark.svg +14 -0
- package/assets/logo.svg +14 -0
- package/assets/pipeline.mmd +39 -0
- package/assets/record-demo.sh +51 -0
- package/docs/README.md +51 -0
- package/docs/adapters/context-mode.md +60 -0
- package/docs/concepts/architecture.md +87 -0
- package/docs/concepts/artifact-model.md +60 -0
- package/docs/concepts/composition-engine.md +36 -0
- package/docs/concepts/indexing-and-recall.md +160 -0
- package/docs/concepts/observability.md +41 -0
- package/docs/concepts/roles-and-workflows.md +59 -0
- package/docs/concepts/terminology-policy.md +27 -0
- package/docs/getting-started/01-installation.md +78 -0
- package/docs/getting-started/02-first-run.md +102 -0
- package/docs/getting-started/03-adding-to-project.md +15 -0
- package/docs/getting-started/04-host-setup.md +15 -0
- package/docs/guides/ci-integration.md +15 -0
- package/docs/guides/creating-skills.md +15 -0
- package/docs/guides/expertise-module-authoring.md +15 -0
- package/docs/guides/hook-development.md +15 -0
- package/docs/guides/memory-and-learnings.md +34 -0
- package/docs/guides/multi-host-export.md +15 -0
- package/docs/guides/troubleshooting.md +101 -0
- package/docs/guides/writing-custom-roles.md +15 -0
- package/docs/plans/2026-03-15-cli-pipeline-integration-design.md +592 -0
- package/docs/plans/2026-03-15-cli-pipeline-integration-plan.md +598 -0
- package/docs/plans/2026-03-15-docs-enforcement-plan.md +238 -0
- package/docs/readmes/INDEX.md +99 -0
- package/docs/readmes/features/expertise/README.md +171 -0
- package/docs/readmes/features/exports/README.md +222 -0
- package/docs/readmes/features/hooks/README.md +103 -0
- package/docs/readmes/features/hooks/loop-cap-guard.md +133 -0
- package/docs/readmes/features/hooks/post-tool-capture.md +121 -0
- package/docs/readmes/features/hooks/post-tool-lint.md +130 -0
- package/docs/readmes/features/hooks/pre-compact-summary.md +122 -0
- package/docs/readmes/features/hooks/pre-tool-capture-route.md +100 -0
- package/docs/readmes/features/hooks/protected-path-write-guard.md +128 -0
- package/docs/readmes/features/hooks/session-start.md +119 -0
- package/docs/readmes/features/hooks/stop-handoff-harvest.md +125 -0
- package/docs/readmes/features/roles/README.md +157 -0
- package/docs/readmes/features/roles/clarifier.md +152 -0
- package/docs/readmes/features/roles/content-author.md +190 -0
- package/docs/readmes/features/roles/designer.md +193 -0
- package/docs/readmes/features/roles/executor.md +184 -0
- package/docs/readmes/features/roles/learner.md +210 -0
- package/docs/readmes/features/roles/planner.md +182 -0
- package/docs/readmes/features/roles/researcher.md +164 -0
- package/docs/readmes/features/roles/reviewer.md +184 -0
- package/docs/readmes/features/roles/specifier.md +162 -0
- package/docs/readmes/features/roles/verifier.md +215 -0
- package/docs/readmes/features/schemas/README.md +178 -0
- package/docs/readmes/features/skills/README.md +63 -0
- package/docs/readmes/features/skills/brainstorming.md +96 -0
- package/docs/readmes/features/skills/debugging.md +148 -0
- package/docs/readmes/features/skills/design.md +120 -0
- package/docs/readmes/features/skills/prepare-next.md +109 -0
- package/docs/readmes/features/skills/run-audit.md +159 -0
- package/docs/readmes/features/skills/scan-project.md +109 -0
- package/docs/readmes/features/skills/self-audit.md +176 -0
- package/docs/readmes/features/skills/tdd.md +137 -0
- package/docs/readmes/features/skills/using-skills.md +92 -0
- package/docs/readmes/features/skills/verification.md +120 -0
- package/docs/readmes/features/skills/writing-plans.md +104 -0
- package/docs/readmes/features/tooling/README.md +320 -0
- package/docs/readmes/features/workflows/README.md +186 -0
- package/docs/readmes/features/workflows/author.md +181 -0
- package/docs/readmes/features/workflows/clarify.md +154 -0
- package/docs/readmes/features/workflows/design-review.md +171 -0
- package/docs/readmes/features/workflows/design.md +169 -0
- package/docs/readmes/features/workflows/discover.md +162 -0
- package/docs/readmes/features/workflows/execute.md +173 -0
- package/docs/readmes/features/workflows/learn.md +167 -0
- package/docs/readmes/features/workflows/plan-review.md +165 -0
- package/docs/readmes/features/workflows/plan.md +170 -0
- package/docs/readmes/features/workflows/prepare-next.md +167 -0
- package/docs/readmes/features/workflows/review.md +169 -0
- package/docs/readmes/features/workflows/run-audit.md +191 -0
- package/docs/readmes/features/workflows/spec-challenge.md +159 -0
- package/docs/readmes/features/workflows/specify.md +160 -0
- package/docs/readmes/features/workflows/verify.md +177 -0
- package/docs/readmes/packages/README.md +50 -0
- package/docs/readmes/packages/ajv.md +117 -0
- package/docs/readmes/packages/context-mode.md +118 -0
- package/docs/readmes/packages/gray-matter.md +116 -0
- package/docs/readmes/packages/node-test.md +137 -0
- package/docs/readmes/packages/yaml.md +112 -0
- package/docs/reference/configuration-reference.md +159 -0
- package/docs/reference/expertise-index.md +52 -0
- package/docs/reference/git-flow.md +43 -0
- package/docs/reference/hooks.md +87 -0
- package/docs/reference/host-exports.md +50 -0
- package/docs/reference/launch-checklist.md +172 -0
- package/docs/reference/marketplace-listings.md +76 -0
- package/docs/reference/release-process.md +34 -0
- package/docs/reference/roles-reference.md +77 -0
- package/docs/reference/skills.md +33 -0
- package/docs/reference/templates.md +29 -0
- package/docs/reference/tooling-cli.md +94 -0
- package/docs/truth-claims.yaml +222 -0
- package/expertise/PROGRESS.md +63 -0
- package/expertise/README.md +18 -0
- package/expertise/antipatterns/PROGRESS.md +56 -0
- package/expertise/antipatterns/backend/api-design-antipatterns.md +1271 -0
- package/expertise/antipatterns/backend/auth-antipatterns.md +1195 -0
- package/expertise/antipatterns/backend/caching-antipatterns.md +622 -0
- package/expertise/antipatterns/backend/database-antipatterns.md +1038 -0
- package/expertise/antipatterns/backend/index.md +24 -0
- package/expertise/antipatterns/backend/microservices-antipatterns.md +850 -0
- package/expertise/antipatterns/code/architecture-antipatterns.md +919 -0
- package/expertise/antipatterns/code/async-antipatterns.md +622 -0
- package/expertise/antipatterns/code/code-smells.md +1186 -0
- package/expertise/antipatterns/code/dependency-antipatterns.md +1209 -0
- package/expertise/antipatterns/code/error-handling-antipatterns.md +1360 -0
- package/expertise/antipatterns/code/index.md +27 -0
- package/expertise/antipatterns/code/naming-and-abstraction.md +1118 -0
- package/expertise/antipatterns/code/state-management-antipatterns.md +1076 -0
- package/expertise/antipatterns/code/testing-antipatterns.md +1053 -0
- package/expertise/antipatterns/design/accessibility-antipatterns.md +1136 -0
- package/expertise/antipatterns/design/dark-patterns.md +1121 -0
- package/expertise/antipatterns/design/index.md +22 -0
- package/expertise/antipatterns/design/ui-antipatterns.md +1202 -0
- package/expertise/antipatterns/design/ux-antipatterns.md +680 -0
- package/expertise/antipatterns/frontend/css-layout-antipatterns.md +691 -0
- package/expertise/antipatterns/frontend/flutter-antipatterns.md +1827 -0
- package/expertise/antipatterns/frontend/index.md +23 -0
- package/expertise/antipatterns/frontend/mobile-antipatterns.md +573 -0
- package/expertise/antipatterns/frontend/react-antipatterns.md +1128 -0
- package/expertise/antipatterns/frontend/spa-antipatterns.md +1235 -0
- package/expertise/antipatterns/index.md +31 -0
- package/expertise/antipatterns/performance/index.md +20 -0
- package/expertise/antipatterns/performance/performance-antipatterns.md +1013 -0
- package/expertise/antipatterns/performance/premature-optimization.md +623 -0
- package/expertise/antipatterns/performance/scaling-antipatterns.md +785 -0
- package/expertise/antipatterns/process/ai-coding-antipatterns.md +853 -0
- package/expertise/antipatterns/process/code-review-antipatterns.md +656 -0
- package/expertise/antipatterns/process/deployment-antipatterns.md +920 -0
- package/expertise/antipatterns/process/index.md +23 -0
- package/expertise/antipatterns/process/technical-debt-antipatterns.md +647 -0
- package/expertise/antipatterns/security/index.md +20 -0
- package/expertise/antipatterns/security/secrets-antipatterns.md +849 -0
- package/expertise/antipatterns/security/security-theater.md +843 -0
- package/expertise/antipatterns/security/vulnerability-patterns.md +801 -0
- package/expertise/architecture/PROGRESS.md +70 -0
- package/expertise/architecture/data/caching-architecture.md +671 -0
- package/expertise/architecture/data/data-consistency.md +574 -0
- package/expertise/architecture/data/data-modeling.md +536 -0
- package/expertise/architecture/data/event-streams-and-queues.md +634 -0
- package/expertise/architecture/data/index.md +25 -0
- package/expertise/architecture/data/search-architecture.md +663 -0
- package/expertise/architecture/data/sql-vs-nosql.md +708 -0
- package/expertise/architecture/decisions/architecture-decision-records.md +640 -0
- package/expertise/architecture/decisions/build-vs-buy.md +616 -0
- package/expertise/architecture/decisions/index.md +23 -0
- package/expertise/architecture/decisions/monolith-to-microservices.md +790 -0
- package/expertise/architecture/decisions/technology-selection.md +616 -0
- package/expertise/architecture/distributed/cap-theorem-and-tradeoffs.md +800 -0
- package/expertise/architecture/distributed/circuit-breaker-bulkhead.md +741 -0
- package/expertise/architecture/distributed/consensus-and-coordination.md +796 -0
- package/expertise/architecture/distributed/distributed-systems-fundamentals.md +564 -0
- package/expertise/architecture/distributed/idempotency-and-retry.md +796 -0
- package/expertise/architecture/distributed/index.md +25 -0
- package/expertise/architecture/distributed/saga-pattern.md +797 -0
- package/expertise/architecture/foundations/architectural-thinking.md +460 -0
- package/expertise/architecture/foundations/coupling-and-cohesion.md +770 -0
- package/expertise/architecture/foundations/design-principles-solid.md +649 -0
- package/expertise/architecture/foundations/domain-driven-design.md +719 -0
- package/expertise/architecture/foundations/index.md +25 -0
- package/expertise/architecture/foundations/separation-of-concerns.md +472 -0
- package/expertise/architecture/foundations/twelve-factor-app.md +797 -0
- package/expertise/architecture/index.md +34 -0
- package/expertise/architecture/integration/api-design-graphql.md +638 -0
- package/expertise/architecture/integration/api-design-grpc.md +804 -0
- package/expertise/architecture/integration/api-design-rest.md +892 -0
- package/expertise/architecture/integration/index.md +25 -0
- package/expertise/architecture/integration/third-party-integration.md +795 -0
- package/expertise/architecture/integration/webhooks-and-callbacks.md +1152 -0
- package/expertise/architecture/integration/websockets-realtime.md +791 -0
- package/expertise/architecture/mobile-architecture/index.md +22 -0
- package/expertise/architecture/mobile-architecture/mobile-app-architecture.md +780 -0
- package/expertise/architecture/mobile-architecture/mobile-backend-for-frontend.md +670 -0
- package/expertise/architecture/mobile-architecture/offline-first.md +719 -0
- package/expertise/architecture/mobile-architecture/push-and-sync.md +782 -0
- package/expertise/architecture/patterns/cqrs-event-sourcing.md +717 -0
- package/expertise/architecture/patterns/event-driven.md +797 -0
- package/expertise/architecture/patterns/hexagonal-clean-architecture.md +870 -0
- package/expertise/architecture/patterns/index.md +27 -0
- package/expertise/architecture/patterns/layered-architecture.md +736 -0
- package/expertise/architecture/patterns/microservices.md +753 -0
- package/expertise/architecture/patterns/modular-monolith.md +692 -0
- package/expertise/architecture/patterns/monolith.md +626 -0
- package/expertise/architecture/patterns/plugin-architecture.md +735 -0
- package/expertise/architecture/patterns/serverless.md +780 -0
- package/expertise/architecture/scaling/database-scaling.md +615 -0
- package/expertise/architecture/scaling/feature-flags-and-rollouts.md +757 -0
- package/expertise/architecture/scaling/horizontal-vs-vertical.md +606 -0
- package/expertise/architecture/scaling/index.md +24 -0
- package/expertise/architecture/scaling/multi-tenancy.md +800 -0
- package/expertise/architecture/scaling/stateless-design.md +787 -0
- package/expertise/backend/embedded-firmware.md +625 -0
- package/expertise/backend/go.md +853 -0
- package/expertise/backend/index.md +24 -0
- package/expertise/backend/java-spring.md +448 -0
- package/expertise/backend/node-typescript.md +625 -0
- package/expertise/backend/python-fastapi.md +724 -0
- package/expertise/backend/rust.md +458 -0
- package/expertise/backend/solidity.md +711 -0
- package/expertise/composition-map.yaml +443 -0
- package/expertise/content/foundations/content-modeling.md +395 -0
- package/expertise/content/foundations/editorial-standards.md +449 -0
- package/expertise/content/foundations/index.md +24 -0
- package/expertise/content/foundations/microcopy.md +455 -0
- package/expertise/content/foundations/terminology-governance.md +509 -0
- package/expertise/content/index.md +34 -0
- package/expertise/content/patterns/accessibility-copy.md +518 -0
- package/expertise/content/patterns/index.md +24 -0
- package/expertise/content/patterns/notification-content.md +433 -0
- package/expertise/content/patterns/sample-content.md +486 -0
- package/expertise/content/patterns/state-copy.md +439 -0
- package/expertise/design/PROGRESS.md +58 -0
- package/expertise/design/disciplines/dark-mode-theming.md +577 -0
- package/expertise/design/disciplines/design-systems.md +595 -0
- package/expertise/design/disciplines/index.md +25 -0
- package/expertise/design/disciplines/information-architecture.md +800 -0
- package/expertise/design/disciplines/interaction-design.md +788 -0
- package/expertise/design/disciplines/responsive-design.md +552 -0
- package/expertise/design/disciplines/usability-testing.md +516 -0
- package/expertise/design/disciplines/user-research.md +792 -0
- package/expertise/design/foundations/accessibility-design.md +796 -0
- package/expertise/design/foundations/color-theory.md +797 -0
- package/expertise/design/foundations/iconography.md +795 -0
- package/expertise/design/foundations/index.md +26 -0
- package/expertise/design/foundations/motion-and-animation.md +653 -0
- package/expertise/design/foundations/rtl-design.md +585 -0
- package/expertise/design/foundations/spacing-and-layout.md +607 -0
- package/expertise/design/foundations/typography.md +800 -0
- package/expertise/design/foundations/visual-hierarchy.md +761 -0
- package/expertise/design/index.md +32 -0
- package/expertise/design/patterns/authentication-flows.md +474 -0
- package/expertise/design/patterns/content-consumption.md +789 -0
- package/expertise/design/patterns/data-display.md +618 -0
- package/expertise/design/patterns/e-commerce.md +1494 -0
- package/expertise/design/patterns/feedback-and-states.md +642 -0
- package/expertise/design/patterns/forms-and-input.md +819 -0
- package/expertise/design/patterns/gamification.md +801 -0
- package/expertise/design/patterns/index.md +31 -0
- package/expertise/design/patterns/microinteractions.md +449 -0
- package/expertise/design/patterns/navigation.md +800 -0
- package/expertise/design/patterns/notifications.md +705 -0
- package/expertise/design/patterns/onboarding.md +700 -0
- package/expertise/design/patterns/search-and-filter.md +601 -0
- package/expertise/design/patterns/settings-and-preferences.md +768 -0
- package/expertise/design/patterns/social-and-community.md +748 -0
- package/expertise/design/platforms/desktop-native.md +612 -0
- package/expertise/design/platforms/index.md +25 -0
- package/expertise/design/platforms/mobile-android.md +825 -0
- package/expertise/design/platforms/mobile-cross-platform.md +983 -0
- package/expertise/design/platforms/mobile-ios.md +699 -0
- package/expertise/design/platforms/tablet.md +794 -0
- package/expertise/design/platforms/web-dashboard.md +790 -0
- package/expertise/design/platforms/web-responsive.md +550 -0
- package/expertise/design/psychology/behavioral-nudges.md +449 -0
- package/expertise/design/psychology/cognitive-load.md +1191 -0
- package/expertise/design/psychology/error-psychology.md +778 -0
- package/expertise/design/psychology/index.md +22 -0
- package/expertise/design/psychology/persuasive-design.md +736 -0
- package/expertise/design/psychology/user-mental-models.md +623 -0
- package/expertise/design/tooling/open-pencil.md +266 -0
- package/expertise/frontend/angular.md +1073 -0
- package/expertise/frontend/desktop-electron.md +546 -0
- package/expertise/frontend/flutter.md +782 -0
- package/expertise/frontend/index.md +27 -0
- package/expertise/frontend/native-android.md +409 -0
- package/expertise/frontend/native-ios.md +490 -0
- package/expertise/frontend/react-native.md +1160 -0
- package/expertise/frontend/react.md +808 -0
- package/expertise/frontend/vue.md +1089 -0
- package/expertise/humanize/domain-rules-code.md +79 -0
- package/expertise/humanize/domain-rules-content.md +67 -0
- package/expertise/humanize/domain-rules-technical-docs.md +56 -0
- package/expertise/humanize/index.md +35 -0
- package/expertise/humanize/self-audit-checklist.md +87 -0
- package/expertise/humanize/sentence-patterns.md +218 -0
- package/expertise/humanize/vocabulary-blacklist.md +105 -0
- package/expertise/i18n/PROGRESS.md +65 -0
- package/expertise/i18n/advanced/accessibility-and-i18n.md +28 -0
- package/expertise/i18n/advanced/bidirectional-text-algorithm.md +38 -0
- package/expertise/i18n/advanced/complex-scripts.md +30 -0
- package/expertise/i18n/advanced/performance-and-i18n.md +27 -0
- package/expertise/i18n/advanced/testing-i18n.md +28 -0
- package/expertise/i18n/content/content-adaptation.md +23 -0
- package/expertise/i18n/content/locale-specific-formatting.md +23 -0
- package/expertise/i18n/content/machine-translation-integration.md +28 -0
- package/expertise/i18n/content/translation-management.md +29 -0
- package/expertise/i18n/foundations/date-time-calendars.md +67 -0
- package/expertise/i18n/foundations/i18n-architecture.md +272 -0
- package/expertise/i18n/foundations/locale-and-language-tags.md +79 -0
- package/expertise/i18n/foundations/numbers-currency-units.md +61 -0
- package/expertise/i18n/foundations/pluralization-and-gender.md +109 -0
- package/expertise/i18n/foundations/string-externalization.md +236 -0
- package/expertise/i18n/foundations/text-direction-bidi.md +241 -0
- package/expertise/i18n/foundations/unicode-and-encoding.md +86 -0
- package/expertise/i18n/index.md +38 -0
- package/expertise/i18n/platform/backend-i18n.md +31 -0
- package/expertise/i18n/platform/flutter-i18n.md +148 -0
- package/expertise/i18n/platform/native-android-i18n.md +36 -0
- package/expertise/i18n/platform/native-ios-i18n.md +36 -0
- package/expertise/i18n/platform/react-i18n.md +103 -0
- package/expertise/i18n/platform/web-css-i18n.md +81 -0
- package/expertise/i18n/rtl/arabic-specific.md +175 -0
- package/expertise/i18n/rtl/hebrew-specific.md +149 -0
- package/expertise/i18n/rtl/rtl-animations-and-transitions.md +111 -0
- package/expertise/i18n/rtl/rtl-forms-and-input.md +161 -0
- package/expertise/i18n/rtl/rtl-fundamentals.md +211 -0
- package/expertise/i18n/rtl/rtl-icons-and-images.md +181 -0
- package/expertise/i18n/rtl/rtl-layout-mirroring.md +252 -0
- package/expertise/i18n/rtl/rtl-navigation-and-gestures.md +107 -0
- package/expertise/i18n/rtl/rtl-testing-and-qa.md +147 -0
- package/expertise/i18n/rtl/rtl-typography.md +160 -0
- package/expertise/index.md +113 -0
- package/expertise/index.yaml +216 -0
- package/expertise/infrastructure/cloud-aws.md +597 -0
- package/expertise/infrastructure/cloud-gcp.md +599 -0
- package/expertise/infrastructure/cybersecurity.md +816 -0
- package/expertise/infrastructure/database-mongodb.md +447 -0
- package/expertise/infrastructure/database-postgres.md +400 -0
- package/expertise/infrastructure/devops-cicd.md +787 -0
- package/expertise/infrastructure/index.md +27 -0
- package/expertise/performance/PROGRESS.md +50 -0
- package/expertise/performance/backend/api-latency.md +1204 -0
- package/expertise/performance/backend/background-jobs.md +506 -0
- package/expertise/performance/backend/connection-pooling.md +1209 -0
- package/expertise/performance/backend/database-query-optimization.md +515 -0
- package/expertise/performance/backend/index.md +23 -0
- package/expertise/performance/backend/rate-limiting-and-throttling.md +971 -0
- package/expertise/performance/foundations/algorithmic-complexity.md +954 -0
- package/expertise/performance/foundations/caching-strategies.md +489 -0
- package/expertise/performance/foundations/concurrency-and-parallelism.md +847 -0
- package/expertise/performance/foundations/index.md +24 -0
- package/expertise/performance/foundations/measuring-and-profiling.md +440 -0
- package/expertise/performance/foundations/memory-management.md +964 -0
- package/expertise/performance/foundations/performance-budgets.md +1314 -0
- package/expertise/performance/index.md +31 -0
- package/expertise/performance/infrastructure/auto-scaling.md +1059 -0
- package/expertise/performance/infrastructure/cdn-and-edge.md +1081 -0
- package/expertise/performance/infrastructure/index.md +22 -0
- package/expertise/performance/infrastructure/load-balancing.md +1081 -0
- package/expertise/performance/infrastructure/observability.md +1079 -0
- package/expertise/performance/mobile/index.md +23 -0
- package/expertise/performance/mobile/mobile-animations.md +544 -0
- package/expertise/performance/mobile/mobile-memory-battery.md +416 -0
- package/expertise/performance/mobile/mobile-network.md +452 -0
- package/expertise/performance/mobile/mobile-rendering.md +599 -0
- package/expertise/performance/mobile/mobile-startup-time.md +505 -0
- package/expertise/performance/platform-specific/flutter-performance.md +647 -0
- package/expertise/performance/platform-specific/index.md +22 -0
- package/expertise/performance/platform-specific/node-performance.md +1307 -0
- package/expertise/performance/platform-specific/postgres-performance.md +1366 -0
- package/expertise/performance/platform-specific/react-performance.md +1403 -0
- package/expertise/performance/web/bundle-optimization.md +1239 -0
- package/expertise/performance/web/image-and-media.md +636 -0
- package/expertise/performance/web/index.md +24 -0
- package/expertise/performance/web/network-optimization.md +1133 -0
- package/expertise/performance/web/rendering-performance.md +1098 -0
- package/expertise/performance/web/ssr-and-hydration.md +918 -0
- package/expertise/performance/web/web-vitals.md +1374 -0
- package/expertise/quality/accessibility.md +985 -0
- package/expertise/quality/evidence-based-verification.md +499 -0
- package/expertise/quality/index.md +24 -0
- package/expertise/quality/ml-model-audit.md +614 -0
- package/expertise/quality/performance.md +600 -0
- package/expertise/quality/testing-api.md +891 -0
- package/expertise/quality/testing-mobile.md +496 -0
- package/expertise/quality/testing-web.md +849 -0
- package/expertise/security/PROGRESS.md +54 -0
- package/expertise/security/agentic-identity.md +540 -0
- package/expertise/security/compliance-frameworks.md +601 -0
- package/expertise/security/data/data-encryption.md +364 -0
- package/expertise/security/data/data-privacy-gdpr.md +692 -0
- package/expertise/security/data/database-security.md +1171 -0
- package/expertise/security/data/index.md +22 -0
- package/expertise/security/data/pii-handling.md +531 -0
- package/expertise/security/foundations/authentication.md +1041 -0
- package/expertise/security/foundations/authorization.md +603 -0
- package/expertise/security/foundations/cryptography.md +1001 -0
- package/expertise/security/foundations/index.md +25 -0
- package/expertise/security/foundations/owasp-top-10.md +1354 -0
- package/expertise/security/foundations/secrets-management.md +1217 -0
- package/expertise/security/foundations/secure-sdlc.md +700 -0
- package/expertise/security/foundations/supply-chain-security.md +698 -0
- package/expertise/security/index.md +31 -0
- package/expertise/security/infrastructure/cloud-security-aws.md +1296 -0
- package/expertise/security/infrastructure/cloud-security-gcp.md +1376 -0
- package/expertise/security/infrastructure/container-security.md +721 -0
- package/expertise/security/infrastructure/incident-response.md +1295 -0
- package/expertise/security/infrastructure/index.md +24 -0
- package/expertise/security/infrastructure/logging-and-monitoring.md +1618 -0
- package/expertise/security/infrastructure/network-security.md +1337 -0
- package/expertise/security/mobile/index.md +23 -0
- package/expertise/security/mobile/mobile-android-security.md +1218 -0
- package/expertise/security/mobile/mobile-binary-protection.md +1229 -0
- package/expertise/security/mobile/mobile-data-storage.md +1265 -0
- package/expertise/security/mobile/mobile-ios-security.md +1401 -0
- package/expertise/security/mobile/mobile-network-security.md +1520 -0
- package/expertise/security/smart-contract-security.md +594 -0
- package/expertise/security/testing/index.md +22 -0
- package/expertise/security/testing/penetration-testing.md +1258 -0
- package/expertise/security/testing/security-code-review.md +1765 -0
- package/expertise/security/testing/threat-modeling.md +1074 -0
- package/expertise/security/testing/vulnerability-scanning.md +1062 -0
- package/expertise/security/web/api-security.md +586 -0
- package/expertise/security/web/cors-and-headers.md +433 -0
- package/expertise/security/web/csrf.md +562 -0
- package/expertise/security/web/file-upload.md +1477 -0
- package/expertise/security/web/index.md +25 -0
- package/expertise/security/web/injection.md +1375 -0
- package/expertise/security/web/session-management.md +1101 -0
- package/expertise/security/web/xss.md +1158 -0
- package/exports/README.md +17 -0
- package/exports/hosts/claude/.claude/agents/clarifier.md +42 -0
- package/exports/hosts/claude/.claude/agents/content-author.md +63 -0
- package/exports/hosts/claude/.claude/agents/designer.md +55 -0
- package/exports/hosts/claude/.claude/agents/executor.md +55 -0
- package/exports/hosts/claude/.claude/agents/learner.md +51 -0
- package/exports/hosts/claude/.claude/agents/planner.md +53 -0
- package/exports/hosts/claude/.claude/agents/researcher.md +43 -0
- package/exports/hosts/claude/.claude/agents/reviewer.md +54 -0
- package/exports/hosts/claude/.claude/agents/specifier.md +47 -0
- package/exports/hosts/claude/.claude/agents/verifier.md +71 -0
- package/exports/hosts/claude/.claude/commands/author.md +42 -0
- package/exports/hosts/claude/.claude/commands/clarify.md +38 -0
- package/exports/hosts/claude/.claude/commands/design-review.md +46 -0
- package/exports/hosts/claude/.claude/commands/design.md +44 -0
- package/exports/hosts/claude/.claude/commands/discover.md +37 -0
- package/exports/hosts/claude/.claude/commands/execute.md +48 -0
- package/exports/hosts/claude/.claude/commands/learn.md +38 -0
- package/exports/hosts/claude/.claude/commands/plan-review.md +42 -0
- package/exports/hosts/claude/.claude/commands/plan.md +39 -0
- package/exports/hosts/claude/.claude/commands/prepare-next.md +37 -0
- package/exports/hosts/claude/.claude/commands/review.md +40 -0
- package/exports/hosts/claude/.claude/commands/run-audit.md +41 -0
- package/exports/hosts/claude/.claude/commands/spec-challenge.md +41 -0
- package/exports/hosts/claude/.claude/commands/specify.md +38 -0
- package/exports/hosts/claude/.claude/commands/verify.md +37 -0
- package/exports/hosts/claude/.claude/settings.json +34 -0
- package/exports/hosts/claude/CLAUDE.md +19 -0
- package/exports/hosts/claude/export.manifest.json +38 -0
- package/exports/hosts/claude/host-package.json +67 -0
- package/exports/hosts/codex/AGENTS.md +19 -0
- package/exports/hosts/codex/export.manifest.json +38 -0
- package/exports/hosts/codex/host-package.json +41 -0
- package/exports/hosts/cursor/.cursor/hooks.json +16 -0
- package/exports/hosts/cursor/.cursor/rules/wazir-core.mdc +19 -0
- package/exports/hosts/cursor/export.manifest.json +38 -0
- package/exports/hosts/cursor/host-package.json +42 -0
- package/exports/hosts/gemini/GEMINI.md +19 -0
- package/exports/hosts/gemini/export.manifest.json +38 -0
- package/exports/hosts/gemini/host-package.json +41 -0
- package/hooks/README.md +18 -0
- package/hooks/definitions/loop_cap_guard.yaml +21 -0
- package/hooks/definitions/post_tool_capture.yaml +24 -0
- package/hooks/definitions/pre_compact_summary.yaml +19 -0
- package/hooks/definitions/pre_tool_capture_route.yaml +19 -0
- package/hooks/definitions/protected_path_write_guard.yaml +19 -0
- package/hooks/definitions/session_start.yaml +19 -0
- package/hooks/definitions/stop_handoff_harvest.yaml +20 -0
- package/hooks/loop-cap-guard +17 -0
- package/hooks/post-tool-lint +36 -0
- package/hooks/protected-path-write-guard +17 -0
- package/hooks/session-start +41 -0
- package/llms-full.txt +2355 -0
- package/llms.txt +43 -0
- package/package.json +79 -0
- package/roles/README.md +20 -0
- package/roles/clarifier.md +42 -0
- package/roles/content-author.md +63 -0
- package/roles/designer.md +55 -0
- package/roles/executor.md +55 -0
- package/roles/learner.md +51 -0
- package/roles/planner.md +53 -0
- package/roles/researcher.md +43 -0
- package/roles/reviewer.md +54 -0
- package/roles/specifier.md +47 -0
- package/roles/verifier.md +71 -0
- package/schemas/README.md +24 -0
- package/schemas/accepted-learning.schema.json +20 -0
- package/schemas/author-artifact.schema.json +156 -0
- package/schemas/clarification.schema.json +19 -0
- package/schemas/design-artifact.schema.json +80 -0
- package/schemas/docs-claim.schema.json +18 -0
- package/schemas/export-manifest.schema.json +20 -0
- package/schemas/hook.schema.json +67 -0
- package/schemas/host-export-package.schema.json +18 -0
- package/schemas/implementation-plan.schema.json +19 -0
- package/schemas/proposed-learning.schema.json +19 -0
- package/schemas/research.schema.json +18 -0
- package/schemas/review.schema.json +29 -0
- package/schemas/run-manifest.schema.json +18 -0
- package/schemas/spec-challenge.schema.json +18 -0
- package/schemas/spec.schema.json +20 -0
- package/schemas/usage.schema.json +102 -0
- package/schemas/verification-proof.schema.json +29 -0
- package/schemas/wazir-manifest.schema.json +173 -0
- package/skills/README.md +40 -0
- package/skills/brainstorming/SKILL.md +77 -0
- package/skills/debugging/SKILL.md +50 -0
- package/skills/design/SKILL.md +61 -0
- package/skills/dispatching-parallel-agents/SKILL.md +128 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/finishing-a-development-branch/SKILL.md +169 -0
- package/skills/humanize/SKILL.md +123 -0
- package/skills/init-pipeline/SKILL.md +124 -0
- package/skills/prepare-next/SKILL.md +20 -0
- package/skills/receiving-code-review/SKILL.md +123 -0
- package/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/requesting-code-review/code-reviewer.md +108 -0
- package/skills/run-audit/SKILL.md +197 -0
- package/skills/scan-project/SKILL.md +41 -0
- package/skills/self-audit/SKILL.md +153 -0
- package/skills/subagent-driven-development/SKILL.md +154 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/skills/subagent-driven-development/implementer-prompt.md +102 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/tdd/SKILL.md +23 -0
- package/skills/using-git-worktrees/SKILL.md +163 -0
- package/skills/using-skills/SKILL.md +95 -0
- package/skills/verification/SKILL.md +22 -0
- package/skills/wazir/SKILL.md +463 -0
- package/skills/writing-plans/SKILL.md +30 -0
- package/skills/writing-skills/SKILL.md +157 -0
- package/skills/writing-skills/anthropic-best-practices.md +122 -0
- package/skills/writing-skills/persuasion-principles.md +50 -0
- package/templates/README.md +20 -0
- package/templates/artifacts/README.md +10 -0
- package/templates/artifacts/accepted-learning.md +19 -0
- package/templates/artifacts/accepted-learning.template.json +12 -0
- package/templates/artifacts/author.md +74 -0
- package/templates/artifacts/author.template.json +19 -0
- package/templates/artifacts/clarification.md +21 -0
- package/templates/artifacts/clarification.template.json +12 -0
- package/templates/artifacts/execute-notes.md +19 -0
- package/templates/artifacts/implementation-plan.md +21 -0
- package/templates/artifacts/implementation-plan.template.json +11 -0
- package/templates/artifacts/learning-proposal.md +19 -0
- package/templates/artifacts/next-run-handoff.md +21 -0
- package/templates/artifacts/plan-review.md +19 -0
- package/templates/artifacts/proposed-learning.template.json +12 -0
- package/templates/artifacts/research.md +21 -0
- package/templates/artifacts/research.template.json +12 -0
- package/templates/artifacts/review-findings.md +19 -0
- package/templates/artifacts/review.template.json +11 -0
- package/templates/artifacts/run-manifest.template.json +8 -0
- package/templates/artifacts/spec-challenge.md +19 -0
- package/templates/artifacts/spec-challenge.template.json +11 -0
- package/templates/artifacts/spec.md +21 -0
- package/templates/artifacts/spec.template.json +12 -0
- package/templates/artifacts/verification-proof.md +19 -0
- package/templates/artifacts/verification-proof.template.json +11 -0
- package/templates/examples/accepted-learning.example.json +14 -0
- package/templates/examples/author.example.json +152 -0
- package/templates/examples/clarification.example.json +15 -0
- package/templates/examples/docs-claim.example.json +8 -0
- package/templates/examples/export-manifest.example.json +7 -0
- package/templates/examples/host-export-package.example.json +11 -0
- package/templates/examples/implementation-plan.example.json +17 -0
- package/templates/examples/proposed-learning.example.json +13 -0
- package/templates/examples/research.example.json +15 -0
- package/templates/examples/research.example.md +6 -0
- package/templates/examples/review.example.json +17 -0
- package/templates/examples/run-manifest.example.json +9 -0
- package/templates/examples/spec-challenge.example.json +14 -0
- package/templates/examples/spec.example.json +21 -0
- package/templates/examples/verification-proof.example.json +21 -0
- package/templates/examples/wazir-manifest.example.yaml +65 -0
- package/templates/task-definition-schema.md +99 -0
- package/tooling/README.md +20 -0
- package/tooling/src/adapters/context-mode.js +50 -0
- package/tooling/src/capture/command.js +376 -0
- package/tooling/src/capture/store.js +99 -0
- package/tooling/src/capture/usage.js +270 -0
- package/tooling/src/checks/branches.js +50 -0
- package/tooling/src/checks/brand-truth.js +110 -0
- package/tooling/src/checks/changelog.js +231 -0
- package/tooling/src/checks/command-registry.js +36 -0
- package/tooling/src/checks/commits.js +102 -0
- package/tooling/src/checks/docs-drift.js +103 -0
- package/tooling/src/checks/docs-truth.js +201 -0
- package/tooling/src/checks/runtime-surface.js +156 -0
- package/tooling/src/cli.js +116 -0
- package/tooling/src/command-options.js +56 -0
- package/tooling/src/commands/validate.js +320 -0
- package/tooling/src/doctor/command.js +91 -0
- package/tooling/src/export/command.js +77 -0
- package/tooling/src/export/compiler.js +498 -0
- package/tooling/src/guards/loop-cap-guard.js +52 -0
- package/tooling/src/guards/protected-path-write-guard.js +67 -0
- package/tooling/src/index/command.js +152 -0
- package/tooling/src/index/storage.js +1061 -0
- package/tooling/src/index/summarizers.js +261 -0
- package/tooling/src/loaders.js +18 -0
- package/tooling/src/project-root.js +22 -0
- package/tooling/src/recall/command.js +225 -0
- package/tooling/src/schema-validator.js +30 -0
- package/tooling/src/state-root.js +40 -0
- package/tooling/src/status/command.js +71 -0
- package/wazir.manifest.yaml +135 -0
- package/workflows/README.md +19 -0
- package/workflows/author.md +42 -0
- package/workflows/clarify.md +38 -0
- package/workflows/design-review.md +46 -0
- package/workflows/design.md +44 -0
- package/workflows/discover.md +37 -0
- package/workflows/execute.md +48 -0
- package/workflows/learn.md +38 -0
- package/workflows/plan-review.md +42 -0
- package/workflows/plan.md +39 -0
- package/workflows/prepare-next.md +37 -0
- package/workflows/review.md +40 -0
- package/workflows/run-audit.md +41 -0
- package/workflows/spec-challenge.md +41 -0
- package/workflows/specify.md +38 -0
- package/workflows/verify.md +37 -0
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
# Interaction Design (IxD) — Expertise Module
|
|
2
|
+
|
|
3
|
+
> An interaction designer defines how users engage with digital products through behavior, motion, feedback, and state transitions. The scope spans micro-interactions, gesture vocabularies, state modeling, animation specification, input method design, progressive disclosure, and the translation of interactive behavior into implementable specifications. Interaction design bridges user intent and system response — every tap, swipe, hover, and keypress must feel intentional, responsive, and predictable.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. What This Discipline Covers
|
|
8
|
+
|
|
9
|
+
### Scope Definition
|
|
10
|
+
|
|
11
|
+
Interaction design is the practice of designing interactive digital products, environments, systems, and services. While visual design addresses what a product looks like, interaction design addresses how it behaves — the dialogue between a person and a product.
|
|
12
|
+
|
|
13
|
+
**Core domains:**
|
|
14
|
+
|
|
15
|
+
- **Interactive behavior** — Defining what happens when a user acts: clicks, taps, hovers, swipes, drags, types, speaks. Every user action requires a system reaction.
|
|
16
|
+
- **Micro-interactions** — Small, contained product moments that accomplish a single task: toggling a setting, liking a post, refreshing a feed, entering a password. Dan Saffer's framework decomposes these into triggers, rules, feedback, and loops/modes.
|
|
17
|
+
- **State machines and statecharts** — Formal modeling of every state a UI component or flow can occupy, the transitions between states, and the events that cause transitions. Prevents impossible states and undefined behavior.
|
|
18
|
+
- **Gesture design** — Defining touch, motion, and spatial input vocabularies: tap, long-press, swipe, pinch, rotate, drag, edge-swipe, force-touch, and emerging sensor-driven gestures.
|
|
19
|
+
- **Input methods** — Designing for mouse, keyboard, touch, stylus, voice, game controllers, screen readers, switch devices, eye tracking, and hybrid input contexts.
|
|
20
|
+
- **Animation and motion** — Specifying transitions, easing curves, durations, and choreography that communicate spatial relationships, hierarchy, causality, and state changes.
|
|
21
|
+
- **Feedback systems** — Visual, auditory, haptic, and multimodal feedback that confirms actions, communicates progress, signals errors, and maintains the user's sense of control.
|
|
22
|
+
- **Progressive disclosure** — Sequencing information and functionality to match the user's current need, reducing cognitive load while preserving access to advanced capabilities.
|
|
23
|
+
|
|
24
|
+
### Relationship to Adjacent Disciplines
|
|
25
|
+
|
|
26
|
+
IxD overlaps with but is distinct from: **Visual Design** (IxD defines states; visual design defines appearance per state), **UX Research** (research informs patterns; IxD operationalizes findings), **Information Architecture** (IA defines structure; IxD defines navigation behavior within it), **Motion Design** (IxD specifies functional motion; motion design handles expressive/brand motion), **Front-End Engineering** (IxD specifies behavior; engineering implements it), and **Content Design** (content informs microcopy; IxD defines when/how it appears).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 2. Core Methods & Frameworks
|
|
31
|
+
|
|
32
|
+
### 2.1 Don Norman's Interaction Design Principles
|
|
33
|
+
|
|
34
|
+
Don Norman's principles from *The Design of Everyday Things* (1988, revised 2013) remain the foundational vocabulary for interaction design. Every interaction decision should be evaluated against these six principles.
|
|
35
|
+
|
|
36
|
+
**Affordances**
|
|
37
|
+
An affordance is a relationship between the properties of an object and the capabilities of the agent that determines how the object could possibly be used. A button affords pressing. A slider affords dragging. A text field affords typing. Digital affordances are perceived, not physical — they depend on visual and behavioral cues.
|
|
38
|
+
|
|
39
|
+
- Design controls whose appearance communicates their interactive behavior
|
|
40
|
+
- Flat design stripped affordances; ensure interactive elements are visually distinguishable from static content
|
|
41
|
+
- Test affordance perception: can a new user identify what is interactive within 3 seconds?
|
|
42
|
+
|
|
43
|
+
**Signifiers**
|
|
44
|
+
Signifiers are perceivable cues that indicate where and how to act. Affordances determine what actions are possible; signifiers communicate where the action should take place.
|
|
45
|
+
|
|
46
|
+
- Cursor changes (pointer, grab, text, resize) are signifiers on desktop
|
|
47
|
+
- Touch targets need visual signifiers because there is no hover state on mobile
|
|
48
|
+
- Scroll indicators, drag handles, chevrons, and underlines are all signifiers
|
|
49
|
+
- Absence of signifiers is the most common cause of "hidden" features
|
|
50
|
+
|
|
51
|
+
**Mapping**
|
|
52
|
+
The relationship between controls and their effects. Natural mapping leverages spatial correspondence and cultural standards.
|
|
53
|
+
|
|
54
|
+
- A volume slider that moves right to increase maps naturally to "more"
|
|
55
|
+
- Scroll direction should match the mental model (content-based vs. viewport-based)
|
|
56
|
+
- Group related controls spatially near the content they affect
|
|
57
|
+
- When mappings are arbitrary, they must be learned — minimize arbitrary mappings
|
|
58
|
+
|
|
59
|
+
**Constraints**
|
|
60
|
+
Constraints limit the range of possible interactions at any moment, preventing errors before they occur.
|
|
61
|
+
|
|
62
|
+
- Disable buttons when their action is not available (but always explain why)
|
|
63
|
+
- Use input masks to prevent invalid data entry (date pickers over free text)
|
|
64
|
+
- Physical constraints: touch target boundaries. Logical constraints: form validation rules
|
|
65
|
+
- Forcing functions: interlocks (confirm before delete), lock-ins (save before close), lock-outs (cooldown periods)
|
|
66
|
+
|
|
67
|
+
**Feedback**
|
|
68
|
+
Every action requires an appropriate, immediate, and informative reaction from the system.
|
|
69
|
+
|
|
70
|
+
- **Immediate feedback** (< 100ms): Button press states, toggle animations, ripple effects
|
|
71
|
+
- **Progress feedback** (100ms-10s): Loading spinners, progress bars, skeleton screens
|
|
72
|
+
- **Completion feedback** (> 1s operations): Success messages, confetti, check marks, toast notifications
|
|
73
|
+
- Feedback must be proportional — a minor action gets subtle feedback; a major/destructive action gets prominent confirmation
|
|
74
|
+
- Absence of feedback is the single most frustrating interaction failure
|
|
75
|
+
|
|
76
|
+
**Conceptual Model**
|
|
77
|
+
The user's internal understanding of how a system works. Good interaction design builds accurate mental models through consistent behavior.
|
|
78
|
+
|
|
79
|
+
- File/folder metaphors provide a conceptual model for data organization
|
|
80
|
+
- Undo/redo builds a model of reversible actions (linear history)
|
|
81
|
+
- Drag-and-drop builds a model of direct spatial manipulation
|
|
82
|
+
- When the conceptual model breaks (e.g., "save" does not persist), trust collapses
|
|
83
|
+
|
|
84
|
+
### 2.2 Cooper's Goal-Directed Design Process
|
|
85
|
+
|
|
86
|
+
Alan Cooper's methodology, detailed in *About Face: The Essentials of Interaction Design* (4th edition, 2014), centers interaction design on user goals rather than features or tasks. Goals are stable end conditions; tasks are transient means to achieve them.
|
|
87
|
+
|
|
88
|
+
**Phase 1 — Research:** Ethnographic interviews, contextual inquiry, stakeholder interviews. Observe what users do, not what they say.
|
|
89
|
+
|
|
90
|
+
**Phase 2 — Modeling:** Create personas (behavioral archetypes, not demographics) and map their goals: experience goals (how they want to feel), end goals (what they want to accomplish), and life goals (who they want to be).
|
|
91
|
+
|
|
92
|
+
**Phase 3 — Requirements Definition:** Define interaction requirements from persona goals. Context scenarios describe ideal future interactions without specifying UI. Key-path scenarios trace the most common flows.
|
|
93
|
+
|
|
94
|
+
**Phase 4 — Framework Design:** Define the interaction framework — structure, flow, and primary patterns. Classify product posture: sovereign (primary tool, full attention), transient (brief, occasional use), or daemonic (background, no UI).
|
|
95
|
+
|
|
96
|
+
**Phase 5 — Detail Design:** Specify every interaction state, edge case, error condition, and micro-interaction. This is where state machines, animation specs, and gesture maps are produced.
|
|
97
|
+
|
|
98
|
+
### 2.3 State Machines and Statecharts for UI
|
|
99
|
+
|
|
100
|
+
State machines provide a formal, visual, and executable model of interaction behavior. David Harel's statecharts (1987) extend basic state machines with hierarchy, parallelism, and history — making them practical for complex UIs.
|
|
101
|
+
|
|
102
|
+
**Why state machines for interaction design:**
|
|
103
|
+
- Every UI component exists in a finite number of states
|
|
104
|
+
- Transitions between states are triggered by specific events
|
|
105
|
+
- Actions (side effects) occur on transitions or on entering/exiting states
|
|
106
|
+
- Impossible states become structurally impossible, not just "shouldn't happen"
|
|
107
|
+
|
|
108
|
+
**Core concepts:**
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
States: idle | loading | success | error | disabled
|
|
112
|
+
Events: SUBMIT | CANCEL | RETRY | RESET | TIMEOUT
|
|
113
|
+
Transitions: idle + SUBMIT → loading
|
|
114
|
+
loading + SUCCESS_RESPONSE → success
|
|
115
|
+
loading + ERROR_RESPONSE → error
|
|
116
|
+
loading + TIMEOUT → error
|
|
117
|
+
error + RETRY → loading
|
|
118
|
+
success + RESET → idle
|
|
119
|
+
Guards: idle + SUBMIT [if form valid] → loading
|
|
120
|
+
idle + SUBMIT [if form invalid] → idle (show validation)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Statechart extensions:**
|
|
124
|
+
|
|
125
|
+
- **Hierarchical states** (nested): A "form" state contains sub-states "editing", "validating", "submitting"
|
|
126
|
+
- **Parallel states** (orthogonal regions): A media player has independent "playback" (playing/paused/stopped) and "volume" (muted/unmuted) regions
|
|
127
|
+
- **History states**: Returning to a parent state resumes at the last active child (e.g., wizard resumes at last step)
|
|
128
|
+
- **Guards**: Conditional transitions — same event may lead to different states based on context
|
|
129
|
+
- **Entry/exit actions**: Side effects on state boundaries (e.g., start timer on entering "loading")
|
|
130
|
+
|
|
131
|
+
**Practical examples:**
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Button: enabled → hovered → pressed → loading → success|error → enabled
|
|
135
|
+
Modal: closed → opening → open → closing → closed
|
|
136
|
+
Guards: CLOSE [unsaved changes?] → confirm-discard (nested)
|
|
137
|
+
Wizard: step1 ↔ step2 ↔ step3 → review → submitting → complete|error
|
|
138
|
+
History: returning preserves current step
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### 2.4 Gesture Vocabulary
|
|
142
|
+
|
|
143
|
+
Touch and gesture interactions require a defined vocabulary — a consistent set of gestures mapped to consistent behaviors throughout the product.
|
|
144
|
+
|
|
145
|
+
**Standard touch gesture vocabulary:**
|
|
146
|
+
|
|
147
|
+
| Gesture | Description | Common Mapping | Platform Standard |
|
|
148
|
+
|---|---|---|---|
|
|
149
|
+
| Tap | Single touch, quick release | Select, activate, toggle | Universal |
|
|
150
|
+
| Double-tap | Two taps in quick succession | Zoom in, select word | iOS, Android |
|
|
151
|
+
| Long-press | Touch and hold (> 500ms) | Context menu, drag initiation | iOS (haptic), Android |
|
|
152
|
+
| Swipe | Touch and slide in one direction | Navigate, dismiss, reveal actions | Universal |
|
|
153
|
+
| Pinch | Two fingers moving together | Zoom out | Maps, photos, web |
|
|
154
|
+
| Spread | Two fingers moving apart | Zoom in | Maps, photos, web |
|
|
155
|
+
| Rotate | Two fingers rotating | Rotate content | Maps, photo editing |
|
|
156
|
+
| Drag | Touch, hold, and move | Reorder, move objects | Universal |
|
|
157
|
+
| Edge swipe | Swipe from screen edge | Back navigation, reveal drawer | iOS (back), Android |
|
|
158
|
+
| Force touch / 3D touch | Pressure-sensitive press | Quick actions, peek/pop | iOS (deprecated on newer) |
|
|
159
|
+
| Multi-finger swipe | 3-4 finger swipe | App switching, desktop switching | iOS, macOS trackpad |
|
|
160
|
+
|
|
161
|
+
**Gesture design principles:**
|
|
162
|
+
|
|
163
|
+
1. **Discoverability** — Gestures are invisible by default. Provide onboarding hints, coach marks, or visual affordances (drag handles, swipe indicators) for non-obvious gestures
|
|
164
|
+
2. **Reversibility** — Every gesture should be undoable. Swipe-to-delete must offer undo. Drag-to-reorder must allow dragging back
|
|
165
|
+
3. **Tolerance** — Accept imprecise input. A "swipe" should work at angles up to 30 degrees off-axis. A "tap" should tolerate minor finger movement (< 10px)
|
|
166
|
+
4. **Conflict avoidance** — Never map conflicting gestures to overlapping areas. Horizontal swipe in a vertically scrolling list requires careful threshold tuning
|
|
167
|
+
5. **Platform respect** — Never override system-level gestures (iOS swipe-from-left-edge for back, Android back gesture, three-finger screenshot). Users expect these to work everywhere
|
|
168
|
+
6. **Accessibility** — Every gesture must have a non-gesture alternative: a button, a menu item, or a keyboard shortcut. Single-pointer alternatives are required by WCAG 2.2 SC 2.5.7
|
|
169
|
+
|
|
170
|
+
### 2.5 Fitts's Law
|
|
171
|
+
|
|
172
|
+
Formulated by Paul Fitts in 1954, Fitts's Law predicts the time required to move to a target based on the target's size and distance from the current position. It is the most validated model in human motor behavior.
|
|
173
|
+
|
|
174
|
+
**The model:**
|
|
175
|
+
```
|
|
176
|
+
T = a + b * log2(1 + D/W)
|
|
177
|
+
|
|
178
|
+
T = time to reach the target
|
|
179
|
+
D = distance from starting point to target center
|
|
180
|
+
W = width (size) of the target along the axis of movement
|
|
181
|
+
a, b = empirically derived constants
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Design implications:**
|
|
185
|
+
|
|
186
|
+
- **Make important targets large.** Primary actions (Submit, Save, Next) should have generous touch/click targets. WCAG 2.2 requires minimum 24x24 CSS pixels; Apple HIG recommends 44x44 points; Material Design recommends 48x48 dp
|
|
187
|
+
- **Reduce distance to frequent targets.** Place primary actions near the user's current focus area. Contextual menus, inline editing, and floating action buttons reduce travel distance
|
|
188
|
+
- **Exploit screen edges and corners.** On desktop, targets at screen edges have effectively infinite depth — the cursor stops at the edge. macOS places the menu bar at the top edge; Windows places the Start button at a corner. Both leverage Fitts's Law
|
|
189
|
+
- **The "magic pixel" at edges.** On desktop, elements flush to screen edges are fastest to acquire. On mobile, bottom-of-screen placement is fastest for thumb reach (thumb zone)
|
|
190
|
+
- **Avoid tiny targets near large targets.** A small "cancel" link next to a large "delete" button is a Fitts's Law error — users will accidentally hit delete
|
|
191
|
+
|
|
192
|
+
### 2.6 Hick's Law (Hick-Hyman Law)
|
|
193
|
+
|
|
194
|
+
Hick's Law states that the time to make a decision increases logarithmically with the number of choices.
|
|
195
|
+
|
|
196
|
+
**The model:**
|
|
197
|
+
```
|
|
198
|
+
T = b * log2(n + 1)
|
|
199
|
+
|
|
200
|
+
T = decision time
|
|
201
|
+
n = number of equally probable choices
|
|
202
|
+
b = empirically derived constant
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Design implications:**
|
|
206
|
+
|
|
207
|
+
- **Limit choices in navigation menus.** 5-7 top-level navigation items is a well-tested range. Beyond 7, group into categories
|
|
208
|
+
- **Progressive disclosure over flat display.** Present 3-5 options now; reveal more on demand. This is the foundation of wizards, staged forms, and drill-down menus
|
|
209
|
+
- **Highlight the recommended option.** When choices cannot be reduced, visually distinguish the most common or recommended choice (primary button vs. secondary buttons)
|
|
210
|
+
- **Hick's Law applies less to familiar, ordered lists.** A scrollable alphabetical contact list does not impose Hick's Law overhead because users use search/scan strategies rather than evaluating each option
|
|
211
|
+
- **Reduce choices through smart defaults.** Pre-selecting the most common option (shipping method, country, currency) eliminates a decision for the majority of users
|
|
212
|
+
|
|
213
|
+
### 2.7 Progressive Disclosure
|
|
214
|
+
|
|
215
|
+
Coined by JM Keller and refined by Jakob Nielsen at NNG, progressive disclosure is the practice of deferring advanced or secondary information and functionality to secondary screens, expandable sections, or on-demand reveals.
|
|
216
|
+
|
|
217
|
+
**Implementation patterns:**
|
|
218
|
+
|
|
219
|
+
| Pattern | When to Use | Example |
|
|
220
|
+
|---|---|---|
|
|
221
|
+
| Staged form (wizard) | Multi-step processes with > 7 fields | Checkout: shipping, payment, review |
|
|
222
|
+
| Expandable sections (accordion) | Reference content with clear categories | FAQ pages, settings panels |
|
|
223
|
+
| Tabs | Parallel categories of equal importance | Profile: Overview, Activity, Settings |
|
|
224
|
+
| Tooltips / popovers | Supplementary explanation on demand | Info icon next to a form label |
|
|
225
|
+
| "Show more" / "Advanced" | Power-user options that most users skip | Print dialog, search filters |
|
|
226
|
+
| Drill-down navigation | Hierarchical content with depth > 2 levels | File browsers, category trees |
|
|
227
|
+
| Inline expansion | Detail within a list without leaving context | Email preview in inbox list |
|
|
228
|
+
| Modal / dialog | Focused sub-task requiring attention | Confirmation, complex input |
|
|
229
|
+
|
|
230
|
+
**Design rules:**
|
|
231
|
+
|
|
232
|
+
1. The primary/default view must be self-sufficient for the most common task
|
|
233
|
+
2. Disclosed content must be clearly reachable — never hide critical functionality
|
|
234
|
+
3. The trigger for disclosure must be visible and labeled (not just an icon)
|
|
235
|
+
4. Disclosed content should appear near its trigger (spatial proximity)
|
|
236
|
+
5. Users must be able to collapse/dismiss disclosed content
|
|
237
|
+
6. State of disclosure should persist within a session (do not collapse on scroll)
|
|
238
|
+
|
|
239
|
+
### 2.8 Direct Manipulation
|
|
240
|
+
|
|
241
|
+
Introduced by Ben Shneiderman in 1983, direct manipulation interfaces allow users to act on visible objects through physical actions rather than abstract commands.
|
|
242
|
+
|
|
243
|
+
**Core properties (Shneiderman):**
|
|
244
|
+
1. Continuous representation of objects and actions of interest
|
|
245
|
+
2. Physical actions (clicking, dragging, resizing) instead of typed commands
|
|
246
|
+
3. Rapid, incremental, reversible operations
|
|
247
|
+
4. Immediate visible feedback of results
|
|
248
|
+
|
|
249
|
+
**Modern applications:**
|
|
250
|
+
|
|
251
|
+
- **Drag-and-drop**: Reordering lists, moving items between containers, file management
|
|
252
|
+
- **Inline editing**: Click text to edit in place, no modal form required
|
|
253
|
+
- **Resize handles**: Drag edges/corners to resize images, columns, panels
|
|
254
|
+
- **Direct-on-canvas editing**: Design tools (Figma), spreadsheets, map editors
|
|
255
|
+
- **Slider controls**: Continuous value adjustment with immediate preview
|
|
256
|
+
- **WYSIWYG editors**: Rich text editing where formatting is immediately visible
|
|
257
|
+
|
|
258
|
+
**Design requirements:** The object must be visually identifiable and selectable. Manipulation must have continuous visible effect (not just start/end). Undo must be available. Constraints must be communicated during manipulation (snap guides, boundary indicators). The final state must be clearly distinguished from the original.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## 3. Deliverables
|
|
263
|
+
|
|
264
|
+
### 3.1 Interaction Specifications
|
|
265
|
+
|
|
266
|
+
The interaction specification (interaction spec) is the primary deliverable — a detailed document describing every interactive behavior in the product.
|
|
267
|
+
|
|
268
|
+
**Structure of an interaction spec:**
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
Component: [Name]
|
|
272
|
+
Description: [What it does, when it appears]
|
|
273
|
+
|
|
274
|
+
States:
|
|
275
|
+
- Default: [description + visual reference]
|
|
276
|
+
- Hover: [description + visual reference]
|
|
277
|
+
- Active/Pressed: [description + visual reference]
|
|
278
|
+
- Focused: [description + visual reference]
|
|
279
|
+
- Disabled: [description + visual reference]
|
|
280
|
+
- Loading: [description + visual reference]
|
|
281
|
+
- Error: [description + visual reference]
|
|
282
|
+
- Success: [description + visual reference]
|
|
283
|
+
|
|
284
|
+
Interactions:
|
|
285
|
+
- Click/Tap: [behavior description]
|
|
286
|
+
- Keyboard: [Tab order, Enter/Space activation, Escape dismissal]
|
|
287
|
+
- Long-press: [if applicable]
|
|
288
|
+
- Swipe: [if applicable]
|
|
289
|
+
|
|
290
|
+
Transitions:
|
|
291
|
+
- Default → Hover: [trigger, duration, easing]
|
|
292
|
+
- Default → Active: [trigger, duration, easing]
|
|
293
|
+
- Default → Loading: [trigger, animation description]
|
|
294
|
+
- Loading → Success: [trigger, duration, animation]
|
|
295
|
+
- Loading → Error: [trigger, error message location, retry behavior]
|
|
296
|
+
|
|
297
|
+
Edge Cases:
|
|
298
|
+
- Rapid double-click: [debounce? second action ignored?]
|
|
299
|
+
- Network failure during loading: [timeout duration, retry logic]
|
|
300
|
+
- Content overflow: [truncation, scroll, expansion]
|
|
301
|
+
|
|
302
|
+
Accessibility:
|
|
303
|
+
- ARIA role: [role]
|
|
304
|
+
- ARIA states: [aria-pressed, aria-expanded, etc.]
|
|
305
|
+
- Screen reader announcement: [what is read on state change]
|
|
306
|
+
- Keyboard shortcut: [if applicable]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### 3.2 State Diagrams
|
|
310
|
+
|
|
311
|
+
State diagrams visualize the complete lifecycle of a component or flow. They serve as the single source of truth for "what can happen from here."
|
|
312
|
+
|
|
313
|
+
**Deliverable requirements:**
|
|
314
|
+
- Every state must be named and visually distinct
|
|
315
|
+
- Every transition must be labeled with the triggering event
|
|
316
|
+
- Guard conditions must be noted on conditional transitions
|
|
317
|
+
- Entry and exit actions must be documented
|
|
318
|
+
- Error states and recovery paths must be explicitly modeled
|
|
319
|
+
- "Happy path" should be visually emphasized (thicker lines, color coding)
|
|
320
|
+
|
|
321
|
+
**Formats:**
|
|
322
|
+
- Mermaid or PlantUML statechart diagrams (version-controllable, embeddable in docs)
|
|
323
|
+
- XState visual editor exports (executable and visual)
|
|
324
|
+
- Figma/FigJam diagram boards (collaborative, but not executable)
|
|
325
|
+
- Stately.ai visual editor (generates XState code)
|
|
326
|
+
|
|
327
|
+
**Example in Mermaid syntax:**
|
|
328
|
+
```mermaid
|
|
329
|
+
stateDiagram-v2
|
|
330
|
+
[*] --> Idle
|
|
331
|
+
Idle --> Validating: SUBMIT
|
|
332
|
+
Validating --> Submitting: VALID
|
|
333
|
+
Validating --> Idle: INVALID
|
|
334
|
+
Submitting --> Success: RESPONSE_OK
|
|
335
|
+
Submitting --> Error: RESPONSE_FAIL
|
|
336
|
+
Submitting --> Error: TIMEOUT
|
|
337
|
+
Error --> Submitting: RETRY
|
|
338
|
+
Error --> Idle: RESET
|
|
339
|
+
Success --> [*]
|
|
340
|
+
|
|
341
|
+
note right of Validating
|
|
342
|
+
Entry: run validation rules
|
|
343
|
+
Exit: display validation errors if INVALID
|
|
344
|
+
end note
|
|
345
|
+
|
|
346
|
+
note right of Submitting
|
|
347
|
+
Entry: show loading indicator
|
|
348
|
+
Entry: disable submit button
|
|
349
|
+
Entry: start 30s timeout
|
|
350
|
+
Exit: hide loading indicator
|
|
351
|
+
end note
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### 3.3 Animation Specifications
|
|
355
|
+
|
|
356
|
+
Animation specs translate motion intent into implementable parameters. Every animated transition requires a specification.
|
|
357
|
+
|
|
358
|
+
**Required parameters per animation:**
|
|
359
|
+
|
|
360
|
+
| Parameter | Description | Example |
|
|
361
|
+
|---|---|---|
|
|
362
|
+
| Property | What CSS/native property changes | opacity, transform, height |
|
|
363
|
+
| Duration | How long the animation takes | 200ms |
|
|
364
|
+
| Easing | Acceleration curve | ease-out, cubic-bezier(0.4, 0, 0.2, 1) |
|
|
365
|
+
| Delay | Time before animation starts | 0ms, 50ms (staggered) |
|
|
366
|
+
| Direction | Forward, reverse, or alternate | forward |
|
|
367
|
+
| Trigger | What initiates the animation | on-mount, on-click, on-scroll |
|
|
368
|
+
| Fill mode | State after animation ends | forwards (maintain end state) |
|
|
369
|
+
|
|
370
|
+
**Duration guidelines (NNG and Material Design 3):**
|
|
371
|
+
|
|
372
|
+
| Interaction Type | Duration Range | Rationale |
|
|
373
|
+
|---|---|---|
|
|
374
|
+
| Micro-feedback (ripple, press) | 50-100ms | Must feel instantaneous |
|
|
375
|
+
| Small transitions (fade, color) | 100-200ms | Quick but perceivable |
|
|
376
|
+
| Medium transitions (slide, expand) | 200-350ms | Readable motion path |
|
|
377
|
+
| Large transitions (page, modal) | 300-500ms | Complex spatial change |
|
|
378
|
+
| Complex choreography | 400-700ms | Multiple coordinated elements |
|
|
379
|
+
| Never exceed | 1000ms | Feels sluggish; blocks user flow |
|
|
380
|
+
|
|
381
|
+
**Easing curve vocabulary (Material Design 3):**
|
|
382
|
+
|
|
383
|
+
- **Standard (ease-in-out)**: `cubic-bezier(0.2, 0, 0, 1)` — Elements moving between on-screen positions
|
|
384
|
+
- **Emphasized**: `cubic-bezier(0.2, 0, 0, 1)` with longer duration — Large, dramatic transitions
|
|
385
|
+
- **Emphasized decelerate**: `cubic-bezier(0.05, 0.7, 0.1, 1)` — Elements entering the screen
|
|
386
|
+
- **Emphasized accelerate**: `cubic-bezier(0.3, 0, 0.8, 0.15)` — Elements leaving the screen
|
|
387
|
+
- **Standard decelerate**: `cubic-bezier(0, 0, 0, 1)` — Elements entering from off-screen
|
|
388
|
+
- **Standard accelerate**: `cubic-bezier(0.3, 0, 1, 1)` — Elements leaving to off-screen
|
|
389
|
+
- **Linear**: `cubic-bezier(0, 0, 1, 1)` — Only for progress bars and continuous rotation
|
|
390
|
+
|
|
391
|
+
**Anti-pattern: decorative motion without purpose.** Every animation must answer: "What does this help the user understand?" If the answer is "nothing — it just looks cool," remove it.
|
|
392
|
+
|
|
393
|
+
### 3.4 Gesture Maps
|
|
394
|
+
|
|
395
|
+
A gesture map documents every gesture recognized by the product, organized by context/screen.
|
|
396
|
+
|
|
397
|
+
**Format:**
|
|
398
|
+
|
|
399
|
+
```
|
|
400
|
+
Screen/Context: [Name]
|
|
401
|
+
|
|
402
|
+
| Gesture | Target Area | Action | Feedback | Undo |
|
|
403
|
+
|---------------|-----------------|---------------------------|-----------------------|----------------|
|
|
404
|
+
| Tap | List item | Open detail view | Ripple + navigate | Back button |
|
|
405
|
+
| Swipe left | List item | Reveal delete action | Red background slides | Swipe right |
|
|
406
|
+
| Swipe right | List item | Reveal archive action | Green background | Swipe left |
|
|
407
|
+
| Long-press | List item | Enter selection mode | Haptic + checkbox | Tap to deselect|
|
|
408
|
+
| Pinch | Image | Zoom out | Smooth scale | Spread |
|
|
409
|
+
| Pull down | List (top) | Refresh content | Pull indicator + spin | N/A |
|
|
410
|
+
| Edge swipe | Left edge | Navigate back | Page peek animation | N/A |
|
|
411
|
+
|
|
412
|
+
Conflicts: None. Swipe gestures require > 50px horizontal movement before activating,
|
|
413
|
+
preventing conflict with vertical scroll.
|
|
414
|
+
|
|
415
|
+
Accessibility alternatives:
|
|
416
|
+
- Swipe actions: overflow menu (three-dot) on each list item
|
|
417
|
+
- Long-press: checkbox visible in toolbar "Select" mode
|
|
418
|
+
- Pinch: zoom buttons overlay in bottom-right corner
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### 3.5 Prototype Specifications
|
|
422
|
+
|
|
423
|
+
Prototype specs define what the prototype must demonstrate, at what fidelity, and for what audience.
|
|
424
|
+
|
|
425
|
+
| Level | Purpose | Tools |
|
|
426
|
+
|---|---|---|
|
|
427
|
+
| Paper / sketch | Explore concepts, test flow | Paper, whiteboard |
|
|
428
|
+
| Low-fidelity wireframe | Validate IA and flow | Figma, Balsamiq |
|
|
429
|
+
| Mid-fidelity interactive | Test core interactions | Figma prototyping, ProtoPie |
|
|
430
|
+
| High-fidelity interaction | Validate micro-interactions, animation, gesture | ProtoPie, Principle, Framer |
|
|
431
|
+
| Code prototype | Test real performance, data, gestures | HTML/CSS/JS, React, SwiftUI |
|
|
432
|
+
|
|
433
|
+
**Prototype spec must include:** Scope (which flows), fidelity (real vs. simulated elements), data source (static/seeded/live), target devices and input methods, success criteria (usability metrics), and known limitations.
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## 4. Tools & Techniques
|
|
438
|
+
|
|
439
|
+
### 4.1 Prototyping Tools
|
|
440
|
+
|
|
441
|
+
**Figma Prototyping**
|
|
442
|
+
- Native prototyping within design files — no context switch
|
|
443
|
+
- Supports smart animate (auto-interpolation between frames), component variants for state changes, conditional logic (variables), and mathematical expressions
|
|
444
|
+
- Best for: Mid-fidelity flows, component state demonstrations, stakeholder walkthroughs
|
|
445
|
+
- Limitation: Limited physics simulation, no sensor input, gesture support is basic
|
|
446
|
+
|
|
447
|
+
**ProtoPie**
|
|
448
|
+
- Code-free interaction prototyping with formula-based logic
|
|
449
|
+
- Supports sensor inputs (tilt, sound, compass), multi-device prototyping (phone-to-watch), conditional logic, and variables
|
|
450
|
+
- Best for: Complex multi-step interactions, IoT prototypes, usability testing of advanced interactions
|
|
451
|
+
- Exports interaction recordings and can run on real devices via ProtoPie Player
|
|
452
|
+
|
|
453
|
+
**Principle**
|
|
454
|
+
- Timeline-based animation tool for macOS
|
|
455
|
+
- Excels at transition design between screens with fine-grained easing and keyframe control
|
|
456
|
+
- Best for: Animated transitions, motion design exploration, hero animations
|
|
457
|
+
- Limitation: macOS only, limited logic/conditions, less active development in recent years
|
|
458
|
+
|
|
459
|
+
**Framer**
|
|
460
|
+
- Code-aware prototyping platform with React-based components
|
|
461
|
+
- Supports real code components, API integration, responsive layouts
|
|
462
|
+
- Best for: Teams with frontend developers, production-like prototypes, design-to-code workflow
|
|
463
|
+
- Higher learning curve; requires comfort with code concepts
|
|
464
|
+
|
|
465
|
+
**Origami Studio (Meta)**
|
|
466
|
+
- Patch-based visual programming with physics simulations and state management
|
|
467
|
+
- Best for: Complex gesture-driven interactions, VR/AR prototyping
|
|
468
|
+
|
|
469
|
+
### 4.2 State Machine Tools
|
|
470
|
+
|
|
471
|
+
**XState / Stately.ai**
|
|
472
|
+
- JavaScript/TypeScript library implementing statecharts (Harel formalism)
|
|
473
|
+
- Visual editor at stately.ai generates executable XState code
|
|
474
|
+
- Integrations: React (`@xstate/react`), Vue (`@xstate/vue`), Svelte (`@xstate/svelte`)
|
|
475
|
+
- Use for: Modeling complex component behavior, form flows, multi-step processes, authentication flows
|
|
476
|
+
- Designers can use the visual editor; engineers get executable code
|
|
477
|
+
|
|
478
|
+
**State machine design process:**
|
|
479
|
+
1. List all possible states the component/flow can be in
|
|
480
|
+
2. List all events that can occur in each state
|
|
481
|
+
3. Define transitions: state + event = new state
|
|
482
|
+
4. Add guard conditions for conditional transitions
|
|
483
|
+
5. Add entry/exit actions for side effects
|
|
484
|
+
6. Validate: is every state reachable? Is every state escapable? Are there dead ends?
|
|
485
|
+
7. Test: walk through every path with the team
|
|
486
|
+
|
|
487
|
+
### 4.3 Interaction Documentation Techniques
|
|
488
|
+
|
|
489
|
+
**Annotated screen specifications:**
|
|
490
|
+
- Screenshot or mockup with numbered callouts
|
|
491
|
+
- Each callout references a detailed interaction behavior note
|
|
492
|
+
- Include state variations as additional annotated screens
|
|
493
|
+
- Tools: Figma annotation plugins, Zeplin, Specify
|
|
494
|
+
|
|
495
|
+
**Interactive documentation:** Storybook with interaction tests (`play` functions), live component playgrounds showing every state, embedded ProtoPie or Figma prototypes in documentation pages.
|
|
496
|
+
|
|
497
|
+
**Video walkthroughs:** Screen recordings narrated with interaction intent. Useful for async handoff but always supplement with written specs — video is not searchable or diffable.
|
|
498
|
+
|
|
499
|
+
**Decision tables for complex logic:**
|
|
500
|
+
|
|
501
|
+
```
|
|
502
|
+
| Condition A | Condition B | Condition C | Result |
|
|
503
|
+
|--------------------|---------------------|------------------|---------------------|
|
|
504
|
+
| User logged in | Has saved items | Cart not empty | Show checkout CTA |
|
|
505
|
+
| User logged in | Has saved items | Cart empty | Show saved items |
|
|
506
|
+
| User logged in | No saved items | Cart empty | Show recommendations|
|
|
507
|
+
| User not logged in | — | Cart not empty | Show login prompt |
|
|
508
|
+
| User not logged in | — | Cart empty | Show sign-up CTA |
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## 5. Common Failures
|
|
514
|
+
|
|
515
|
+
### 5.1 Over-Animation
|
|
516
|
+
|
|
517
|
+
**Symptoms:** Every element bounces/fades/slides on every interaction. Animations exceed 500ms for simple changes. Multiple simultaneous animations compete for attention. Decorative motion that communicates no meaning.
|
|
518
|
+
|
|
519
|
+
**Consequences:** Perceived slowness. Motion-sensitive users experience discomfort (vestibular disorders affect ~35% of adults over 40). Accumulated animation delays degrade task completion time. Users disable animations system-wide via `prefers-reduced-motion`, losing functional transitions too.
|
|
520
|
+
|
|
521
|
+
**Fixes:** Apply the "does this help the user understand?" test. Respect `prefers-reduced-motion`. Use animation only for spatial relationships, state changes, cause-and-effect, and continuity. Limit simultaneous animations to 2-3 elements. Target 150-250ms for most transitions.
|
|
522
|
+
|
|
523
|
+
### 5.2 Inconsistent Interactions
|
|
524
|
+
|
|
525
|
+
**Symptoms:** Same gesture does different things across contexts. Swipe works in some lists but not others. Back button behavior varies between screens. Tap sometimes selects, sometimes navigates, sometimes expands.
|
|
526
|
+
|
|
527
|
+
**Consequences:** Users cannot build reliable mental models. Error rates increase. Trust erodes.
|
|
528
|
+
|
|
529
|
+
**Fixes:** Create an interaction pattern library documenting every gesture and its consistent meaning. Audit the full product with a gesture map. When context-dependent behavior is necessary, provide clear visual/spatial differentiation. Adopt platform conventions (Material Design, Apple HIG) as baseline.
|
|
530
|
+
|
|
531
|
+
### 5.3 No Feedback (Silent Failures)
|
|
532
|
+
|
|
533
|
+
**Symptoms:** Button tap produces no visible change. Form submission fails silently. Background save completes without confirmation. Loading state is not indicated. Toggles change state but nothing else visibly responds.
|
|
534
|
+
|
|
535
|
+
**Consequences:** Users repeat actions (double-submit, duplicate purchases). Users assume broken system and abandon. Support tickets increase.
|
|
536
|
+
|
|
537
|
+
**Fixes:** Every interactive element needs a visible pressed/active state (< 100ms). Every async action shows a loading indicator. Every completion shows success confirmation. Every failure shows what happened, why, and what to do next. Test with network throttling and airplane mode.
|
|
538
|
+
|
|
539
|
+
### 5.4 Breaking Platform Gestures
|
|
540
|
+
|
|
541
|
+
**Symptoms:** Custom swipe overrides iOS back-swipe. Custom scroll conflicts with browser pull-to-refresh. Keyboard shortcuts override browser shortcuts (Cmd+W, Cmd+T).
|
|
542
|
+
|
|
543
|
+
**Consequences:** Users feel trapped. Accessibility features break. App store rejection risk (Apple).
|
|
544
|
+
|
|
545
|
+
**Fixes:** Never override system-level gestures. Test on real devices with system gestures enabled. Use platform gesture recognizer APIs for priority/conflict resolution. iOS: `UIScreenEdgePanGestureRecognizer`. Android: predictive back gesture API (Android 14+). Web: never `preventDefault` on touch events at document level.
|
|
546
|
+
|
|
547
|
+
### 5.5 Cognitive Overload from Excessive Interactions
|
|
548
|
+
|
|
549
|
+
**Symptoms:** Every element on screen is interactive (no visual rest areas). Multiple competing CTAs with equal visual weight. Complex multi-gesture sequences for basic tasks. No clear primary action.
|
|
550
|
+
|
|
551
|
+
**Consequences:** Decision paralysis (Hick's Law). Users default to familiar paths only. Accidental triggers increase. Task completion time suffers.
|
|
552
|
+
|
|
553
|
+
**Fixes:** Apply visual hierarchy: one primary action, one or two secondary, everything else tertiary. Use progressive disclosure. Limit interactive elements to current need. Provide "do nothing" safe zones. Test with the five-second test: can users identify the primary action within 5 seconds?
|
|
554
|
+
|
|
555
|
+
### 5.6 Ignoring Keyboard and Non-Pointer Input
|
|
556
|
+
|
|
557
|
+
**Symptoms:** Custom components not focusable via Tab. No visible focus indicators. Enter/Space do not activate custom buttons. Escape does not close modals. Arrow keys do not navigate composite widgets.
|
|
558
|
+
|
|
559
|
+
**Consequences:** Keyboard-only users are blocked. WCAG 2.1 SC 2.1.1 failure — legal risk. Screen reader users cannot operate the interface.
|
|
560
|
+
|
|
561
|
+
**Fixes:** Use native HTML elements (`<button>`, `<input>`, `<select>`, `<a>`) for built-in keyboard behavior. Follow WAI-ARIA Authoring Practices for custom widgets. Match every `:hover` style with `:focus-visible`. Test every flow keyboard-only. Implement focus management: move focus into modals on open, return to trigger on close.
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
## 6. Integration with Development
|
|
566
|
+
|
|
567
|
+
### 6.1 Translating Interaction Specs to Code
|
|
568
|
+
|
|
569
|
+
**The handoff gap:** Interaction specs describe behavior; code implements it. The gap between the two is the most common source of interaction defects. Close it with these practices.
|
|
570
|
+
|
|
571
|
+
**Specification format for engineers:**
|
|
572
|
+
|
|
573
|
+
```
|
|
574
|
+
Component: SearchField
|
|
575
|
+
Trigger: User types in search field
|
|
576
|
+
|
|
577
|
+
Behavior:
|
|
578
|
+
1. On keyup (debounced 300ms), fire search request
|
|
579
|
+
2. Show loading spinner inside field (right side)
|
|
580
|
+
3. If results returned within 2s:
|
|
581
|
+
- Fade in results dropdown (200ms, ease-out)
|
|
582
|
+
- Highlight first result
|
|
583
|
+
4. If no results:
|
|
584
|
+
- Show "No results for [query]" message in dropdown
|
|
585
|
+
5. If error:
|
|
586
|
+
- Show inline error message below field
|
|
587
|
+
- Do NOT show dropdown
|
|
588
|
+
6. On Escape key: close dropdown, clear field
|
|
589
|
+
7. On ArrowDown: move highlight to next result
|
|
590
|
+
8. On Enter: select highlighted result
|
|
591
|
+
9. On blur (field loses focus): close dropdown after 150ms delay
|
|
592
|
+
(delay allows click on dropdown item to register first)
|
|
593
|
+
|
|
594
|
+
State machine: idle → searching → results | no-results | error → idle
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
**Key translation points:**
|
|
598
|
+
- Durations must be in milliseconds (not frames or seconds)
|
|
599
|
+
- Easing curves must be CSS `cubic-bezier()` values or named equivalents
|
|
600
|
+
- Breakpoints for responsive interaction changes must be specified in pixels/rems
|
|
601
|
+
- Touch target sizes must be in platform-native units (dp for Android, pt for iOS, px/rem for web)
|
|
602
|
+
- Debounce and throttle values must be specified for input handlers
|
|
603
|
+
|
|
604
|
+
### 6.2 Animation Libraries by Platform
|
|
605
|
+
|
|
606
|
+
**Web:**
|
|
607
|
+
- **CSS Transitions/Animations**: For simple state transitions (hover, focus, visibility). Zero dependency. Best performance for transform and opacity
|
|
608
|
+
- **Web Animations API (WAAPI)**: Native browser API for programmatic animation. Good for sequencing and dynamic values
|
|
609
|
+
- **Framer Motion** (React): Declarative animation with `animate`, `exit`, layout animations, gesture handlers, and `useReducedMotion` hook
|
|
610
|
+
- **GSAP (GreenSock)**: Professional-grade timeline animation. Complex choreography, scroll-triggered animation, morphing. License required for some plugins
|
|
611
|
+
- **Motion One**: Lightweight (< 5KB) animation library built on WAAPI. Good balance of power and bundle size
|
|
612
|
+
- **View Transitions API**: Native browser API for page-to-page transitions. Progressive enhancement approach
|
|
613
|
+
|
|
614
|
+
**iOS/macOS:**
|
|
615
|
+
- **UIView.animate / SwiftUI .animation**: Built-in animation system with spring, easing, and keyframe support
|
|
616
|
+
- **Core Animation (CAAnimation)**: Lower-level, higher control for complex layer animations
|
|
617
|
+
- **Lottie (iOS)**: Render After Effects animations natively
|
|
618
|
+
|
|
619
|
+
**Android:**
|
|
620
|
+
- **Jetpack Compose animation**: Declarative animations with `animateXAsState`, `AnimatedVisibility`, `Crossfade`
|
|
621
|
+
- **MotionLayout**: Complex motion and widget animation in XML-based layouts
|
|
622
|
+
- **Lottie (Android)**: Render After Effects animations natively
|
|
623
|
+
|
|
624
|
+
**Cross-platform (Flutter):**
|
|
625
|
+
- **Implicit animations**: `AnimatedContainer`, `AnimatedOpacity` — declare end state, Flutter interpolates
|
|
626
|
+
- **Explicit animations**: `AnimationController` + `Tween` for precise control
|
|
627
|
+
- **Hero animations**: Shared element transitions between screens
|
|
628
|
+
- **Rive**: Runtime animation engine with state machine support
|
|
629
|
+
|
|
630
|
+
### 6.3 Gesture Handlers by Platform
|
|
631
|
+
|
|
632
|
+
**Web:**
|
|
633
|
+
- Native `PointerEvent` API (unified mouse, touch, pen input)
|
|
634
|
+
- `touch-action` CSS property to control which gestures the browser handles vs. JavaScript
|
|
635
|
+
- Libraries: Hammer.js (legacy), `use-gesture` (React), `@vueuse/gesture` (Vue)
|
|
636
|
+
- Intersection Observer for scroll-triggered interactions
|
|
637
|
+
|
|
638
|
+
**iOS:**
|
|
639
|
+
- `UIGestureRecognizer` subclasses: `UITapGestureRecognizer`, `UIPanGestureRecognizer`, `UIPinchGestureRecognizer`, `UISwipeGestureRecognizer`, `UILongPressGestureRecognizer`, `UIRotationGestureRecognizer`
|
|
640
|
+
- SwiftUI: `.gesture()` modifier with `DragGesture`, `TapGesture`, `LongPressGesture`, `MagnificationGesture`, `RotationGesture`
|
|
641
|
+
- Gesture recognizer delegation for conflict resolution (`shouldRecognizeSimultaneouslyWith`)
|
|
642
|
+
|
|
643
|
+
**Android:**
|
|
644
|
+
- `GestureDetector`, `ScaleGestureDetector` in View system
|
|
645
|
+
- Jetpack Compose: `Modifier.pointerInput()`, `detectTapGestures`, `detectDragGestures`, `detectTransformGestures`
|
|
646
|
+
- `MotionEvent` for raw touch data
|
|
647
|
+
|
|
648
|
+
**Flutter:**
|
|
649
|
+
- `GestureDetector` widget: `onTap`, `onDoubleTap`, `onLongPress`, `onPanUpdate`, `onScaleUpdate`
|
|
650
|
+
- `Dismissible` widget for swipe-to-dismiss
|
|
651
|
+
- `Draggable` and `DragTarget` for drag-and-drop
|
|
652
|
+
- Custom gesture recognizers via `GestureRecognizer` subclasses
|
|
653
|
+
|
|
654
|
+
### 6.4 State Management Mapping
|
|
655
|
+
|
|
656
|
+
The interaction designer's state diagram must map directly to the developer's state management implementation. Misalignment here causes "works in the prototype, breaks in production."
|
|
657
|
+
|
|
658
|
+
**Mapping table:**
|
|
659
|
+
|
|
660
|
+
| IxD Concept | React | SwiftUI | Jetpack Compose | Flutter |
|
|
661
|
+
|---|---|---|---|---|
|
|
662
|
+
| State | `useState`, XState context | `@State`, `@StateObject` | `mutableStateOf` | `ValueNotifier`, `Bloc state` |
|
|
663
|
+
| Transition | XState transition, `useReducer` dispatch | Binding + onChange | `LaunchedEffect` | `Bloc event` → `emit` |
|
|
664
|
+
| Guard condition | XState guard, conditional dispatch | `if` in action closure | `if` in event handler | `Bloc` conditional emit |
|
|
665
|
+
| Side effect (entry action) | `useEffect`, XState `entry` action | `.onAppear`, `.task` | `LaunchedEffect` | `BlocListener`, `initState` |
|
|
666
|
+
| Parallel states | Multiple XState actors, multiple `useState` | Multiple `@State` properties | Multiple state holders | Multiple `Bloc` instances |
|
|
667
|
+
| Derived state | `useMemo`, XState selectors | Computed properties | `derivedStateOf` | `BlocBuilder` with `buildWhen` |
|
|
668
|
+
|
|
669
|
+
**Best practice:** When using XState, the state machine is the single source of truth. UI components read state from the machine and send events to it. No local UI state should contradict the machine's state. This guarantees that the implemented interaction matches the designed interaction.
|
|
670
|
+
|
|
671
|
+
### 6.5 Design-Development Collaboration Model
|
|
672
|
+
|
|
673
|
+
**Shared language:** Use identical state names in design specs and code (`idle`, `loading`, `error` — not "default", "spinner screen", "red state"). Use identical event names (`SUBMIT`, `CANCEL`, `RETRY`). Reference easing curves by shared design token names (`$motion-ease-out`, `$duration-fast`).
|
|
674
|
+
|
|
675
|
+
**Review checkpoints:** At spec handoff, engineers confirm feasibility while designers confirm completeness. During implementation, designers review on real devices while engineers flag deviations with rationale. At QA, designers participate in interaction-specific test cases. Post-launch, track interaction success rates and animation frame rate performance.
|
|
676
|
+
|
|
677
|
+
---
|
|
678
|
+
|
|
679
|
+
## 7. Key References
|
|
680
|
+
|
|
681
|
+
### Foundational Texts
|
|
682
|
+
|
|
683
|
+
- **Norman, Don.** *The Design of Everyday Things* (revised 2013). The foundational text on affordances, signifiers, mappings, constraints, feedback, and conceptual models.
|
|
684
|
+
- **Cooper, Alan; Reimann, Robert; Cronin, David; Noessel, Christopher.** *About Face: The Essentials of Interaction Design* (4th edition, 2014). Goal-directed design, personas, postures, and the complete interaction design process.
|
|
685
|
+
- **Saffer, Dan.** *Microinteractions: Designing with Details* (2013). The definitive framework for triggers, rules, feedback, and loops/modes in micro-interactions.
|
|
686
|
+
- **Shneiderman, Ben.** *Designing the User Interface* (6th edition, 2016). Direct manipulation, eight golden rules of interface design.
|
|
687
|
+
- **Harel, David.** "Statecharts: A Visual Formalism for Complex Systems" (1987). The formal foundation for hierarchical, parallel state modeling.
|
|
688
|
+
|
|
689
|
+
### Research and Guidelines
|
|
690
|
+
|
|
691
|
+
- **Nielsen Norman Group (NNG)**: Ongoing research on interaction patterns, usability heuristics, animation guidelines. [nngroup.com](https://www.nngroup.com/topic/interaction-design/)
|
|
692
|
+
- **Material Design 3 — Motion**: Google's motion and easing guidelines. [m3.material.io/styles/motion](https://m3.material.io/styles/motion/easing-and-duration)
|
|
693
|
+
- **Apple Human Interface Guidelines — Inputs**: Gesture and input design for Apple platforms. [developer.apple.com/design](https://developer.apple.com/design/human-interface-guidelines/)
|
|
694
|
+
- **Laws of UX**: Concise reference for Fitts's Law, Hick's Law, and other psychological principles applied to design. [lawsofux.com](https://lawsofux.com/)
|
|
695
|
+
|
|
696
|
+
### Tools
|
|
697
|
+
|
|
698
|
+
- **XState / Stately.ai**: State machine modeling and code generation. [stately.ai](https://stately.ai/)
|
|
699
|
+
- **ProtoPie**: Advanced interaction prototyping. [protopie.io](https://www.protopie.io/)
|
|
700
|
+
- **Framer**: Code-aware design and prototyping. [framer.com](https://www.framer.com/)
|
|
701
|
+
- **Principle**: Motion and transition design for macOS. [principleformac.com](https://principleformac.com/)
|
|
702
|
+
|
|
703
|
+
---
|
|
704
|
+
|
|
705
|
+
## Quick Reference Checklist
|
|
706
|
+
|
|
707
|
+
Use this checklist to evaluate any interaction design before handoff.
|
|
708
|
+
|
|
709
|
+
### Feedback & Response
|
|
710
|
+
|
|
711
|
+
- [ ] Every interactive element has a visible pressed/active state
|
|
712
|
+
- [ ] Response to user input is visible within 100ms
|
|
713
|
+
- [ ] Loading states are shown for any operation > 1 second
|
|
714
|
+
- [ ] Success is confirmed visually after every completed action
|
|
715
|
+
- [ ] Errors explain what happened, why, and what to do next
|
|
716
|
+
- [ ] Feedback intensity is proportional to action significance
|
|
717
|
+
|
|
718
|
+
### States & Transitions
|
|
719
|
+
|
|
720
|
+
- [ ] Every component has all states defined: default, hover, active, focused, disabled, loading, error, success
|
|
721
|
+
- [ ] State diagram exists for every multi-state component or flow
|
|
722
|
+
- [ ] No impossible states exist (cannot be both "loading" and "error" simultaneously)
|
|
723
|
+
- [ ] Every state is reachable and escapable (no dead ends)
|
|
724
|
+
- [ ] Transitions between states have defined duration and easing
|
|
725
|
+
- [ ] Guard conditions are documented for conditional transitions
|
|
726
|
+
|
|
727
|
+
### Gestures & Input
|
|
728
|
+
|
|
729
|
+
- [ ] Every gesture has a non-gesture alternative (button, menu, keyboard shortcut)
|
|
730
|
+
- [ ] Platform system gestures are never overridden
|
|
731
|
+
- [ ] Touch targets meet minimum size (24x24px WCAG, 44x44pt iOS, 48x48dp Android)
|
|
732
|
+
- [ ] Gesture conflicts are identified and resolved (swipe vs. scroll, etc.)
|
|
733
|
+
- [ ] Keyboard navigation works for every interactive flow
|
|
734
|
+
- [ ] Focus order is logical and follows visual layout
|
|
735
|
+
- [ ] Focus indicators are visible and meet WCAG contrast requirements
|
|
736
|
+
|
|
737
|
+
### Animation & Motion
|
|
738
|
+
|
|
739
|
+
- [ ] Every animation serves a functional purpose (not purely decorative)
|
|
740
|
+
- [ ] Durations are appropriate: 100-200ms for micro, 200-350ms for medium, 300-500ms for large
|
|
741
|
+
- [ ] No animation exceeds 1000ms (unless progress indicator or deliberate storytelling)
|
|
742
|
+
- [ ] `prefers-reduced-motion` is respected — reduced or eliminated non-essential motion
|
|
743
|
+
- [ ] Easing curves are specified as CSS cubic-bezier values
|
|
744
|
+
- [ ] Simultaneous animations are limited to 2-3 elements maximum
|
|
745
|
+
|
|
746
|
+
### Progressive Disclosure
|
|
747
|
+
|
|
748
|
+
- [ ] Default view is self-sufficient for the primary task
|
|
749
|
+
- [ ] Advanced options are accessible but not competing for attention
|
|
750
|
+
- [ ] Disclosure triggers are visible and labeled (not hidden behind unlabeled icons)
|
|
751
|
+
- [ ] Disclosed content appears near its trigger
|
|
752
|
+
- [ ] Users can collapse disclosed content
|
|
753
|
+
- [ ] Disclosure state persists within session
|
|
754
|
+
|
|
755
|
+
### Consistency
|
|
756
|
+
|
|
757
|
+
- [ ] Same gesture = same action throughout the product
|
|
758
|
+
- [ ] Same action = same feedback throughout the product
|
|
759
|
+
- [ ] Interaction patterns align with platform conventions (Material, HIG)
|
|
760
|
+
- [ ] Interaction pattern library is documented and referenced
|
|
761
|
+
- [ ] Edge cases and error states are handled consistently across features
|
|
762
|
+
|
|
763
|
+
### Cognitive Load (Norman + Hick + Fitts)
|
|
764
|
+
|
|
765
|
+
- [ ] Primary action is visually dominant (Fitts: large and close)
|
|
766
|
+
- [ ] Number of choices per view is limited to 5-7 where decisions are required (Hick)
|
|
767
|
+
- [ ] Controls map naturally to their effects (Norman: mapping)
|
|
768
|
+
- [ ] Constraints prevent errors before they occur (Norman: constraints)
|
|
769
|
+
- [ ] Conceptual model is consistent and learnable (Norman: conceptual model)
|
|
770
|
+
- [ ] Affordances and signifiers clearly communicate interactivity (Norman: affordances + signifiers)
|
|
771
|
+
|
|
772
|
+
### Accessibility
|
|
773
|
+
|
|
774
|
+
- [ ] All custom widgets follow WAI-ARIA Authoring Practices keyboard patterns
|
|
775
|
+
- [ ] ARIA roles and states are specified for custom components
|
|
776
|
+
- [ ] Screen reader announcements are defined for dynamic state changes
|
|
777
|
+
- [ ] No interaction depends solely on color, hover, or precise motor control
|
|
778
|
+
- [ ] Every drag operation has a single-pointer alternative (WCAG 2.2 SC 2.5.7)
|
|
779
|
+
|
|
780
|
+
### Handoff Readiness
|
|
781
|
+
|
|
782
|
+
- [ ] Interaction spec covers every state, transition, and edge case
|
|
783
|
+
- [ ] State names and event names match between design spec and code
|
|
784
|
+
- [ ] Animation specs include duration (ms), easing (cubic-bezier), and property
|
|
785
|
+
- [ ] Gesture map documents all gestures per screen with conflict analysis
|
|
786
|
+
- [ ] Prototype demonstrates the most complex interaction flows
|
|
787
|
+
- [ ] Design tokens for motion (duration, easing) are defined in shared token system
|
|
788
|
+
- [ ] Engineer has reviewed spec for feasibility before implementation begins
|