buildanything 1.8.0 → 2.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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +9 -3
- package/CHANGELOG.md +57 -0
- package/README.md +2 -2
- package/agents/a11y-architect.md +166 -0
- package/agents/business-model.md +80 -29
- package/agents/code-architect.md +75 -0
- package/agents/code-reviewer.md +255 -0
- package/agents/code-simplifier.md +64 -0
- package/agents/design-brand-guardian.md +293 -53
- package/agents/design-critic.md +139 -0
- package/agents/design-inclusive-visuals-specialist.md +6 -19
- package/agents/design-ui-designer.md +335 -56
- package/agents/design-ux-architect.md +403 -55
- package/agents/design-ux-researcher.md +264 -49
- package/agents/engineering-ai-engineer.md +26 -36
- package/agents/engineering-backend-architect.md +185 -36
- package/agents/engineering-data-engineer.md +225 -43
- package/agents/engineering-devops-automator.md +227 -74
- package/agents/engineering-frontend-developer.md +210 -34
- package/agents/engineering-mobile-app-builder.md +6 -1
- package/agents/engineering-rapid-prototyper.md +30 -9
- package/agents/engineering-security-engineer.md +263 -61
- package/agents/engineering-senior-developer.md +128 -19
- package/agents/engineering-sre.md +84 -0
- package/agents/engineering-technical-writer.md +285 -41
- package/agents/feature-intel.md +110 -0
- package/agents/ios-app-review-guardian.md +19 -2
- package/agents/ios-foundation-models-specialist.md +20 -2
- package/agents/ios-storekit-specialist.md +9 -2
- package/agents/ios-swift-architect.md +28 -1
- package/agents/ios-swift-search.md +8 -1
- package/agents/ios-swift-ui-design.md +33 -1
- package/agents/marketing-app-store-optimizer.md +246 -64
- package/agents/planner.md +216 -0
- package/agents/pr-test-analyzer.md +63 -0
- package/agents/product-feedback-synthesizer.md +8 -2
- package/agents/refactor-cleaner.md +102 -0
- package/agents/security-reviewer.md +128 -0
- package/agents/silent-failure-hunter.md +54 -0
- package/agents/swift-build-resolver.md +119 -0
- package/agents/swift-reviewer.md +112 -0
- package/agents/tech-feasibility.md +21 -1
- package/agents/testing-api-tester.md +236 -59
- package/agents/testing-evidence-collector.md +26 -1
- package/agents/testing-performance-benchmarker.md +21 -1
- package/agents/testing-reality-checker.md +6 -1
- package/agents/visual-research.md +116 -0
- package/bin/adapters/cycle-counter-tool.ts +155 -0
- package/bin/adapters/scribe-tool.ts +71 -0
- package/bin/adapters/state-save-tool.ts +130 -0
- package/bin/adapters/write-lease-tool.ts +127 -0
- package/bin/buildanything-runtime.js +15 -0
- package/bin/buildanything-runtime.ts +328 -0
- package/bin/setup.js +83 -8
- package/commands/add-feature.md +2 -0
- package/commands/build.md +782 -266
- package/commands/fix.md +1 -1
- package/commands/self-check.md +121 -0
- package/commands/setup.md +50 -9
- package/commands/ux-review.md +2 -2
- package/commands/verify.md +6 -9
- package/docs/migration/agents.yaml +729 -0
- package/docs/migration/phase-graph.yaml +1088 -0
- package/docs/migration/sdk-host-compat.md +18 -0
- package/hooks/compile-writer-owner-cache.ts +171 -0
- package/hooks/hooks.json +36 -0
- package/hooks/pre-tool-use +19 -0
- package/hooks/pre-tool-use.ts +776 -0
- package/hooks/record-mode-transitions.ts +178 -0
- package/hooks/session-start +71 -1
- package/hooks/subagent-start +17 -0
- package/hooks/subagent-start.ts +471 -0
- package/hooks/subagent-stop +17 -0
- package/hooks/subagent-stop.ts +153 -0
- package/package.json +24 -4
- package/protocols/architecture-schema.md +171 -0
- package/protocols/decision-log.md +131 -0
- package/protocols/ios-context.md +10 -11
- package/protocols/ios-phase-branches.md +208 -33
- package/protocols/launch-readiness.md +258 -0
- package/protocols/metric-loop.md +62 -2
- package/protocols/smoke-test.md +9 -1
- package/protocols/state-schema.json +388 -0
- package/protocols/state-schema.md +172 -0
- package/protocols/verify.md +62 -2
- package/protocols/visual-dna.md +185 -0
- package/protocols/web-phase-branches.md +222 -72
- package/skills/ios/_VENDORED.md +2 -0
- package/skills/ios/app-store-connect-metadata/SKILL.md +148 -0
- package/skills/ios/asc-privacy-manifest/SKILL.md +350 -0
- package/skills/ios/hig-components-content/SKILL.md +86 -0
- package/skills/ios/hig-components-content/references/activity-views.md +79 -0
- package/skills/ios/hig-components-content/references/charts.md +180 -0
- package/skills/ios/hig-components-content/references/collections.md +48 -0
- package/skills/ios/hig-components-content/references/color-wells.md +42 -0
- package/skills/ios/hig-components-content/references/image-views.md +82 -0
- package/skills/ios/hig-components-content/references/image-wells.md +34 -0
- package/skills/ios/hig-components-content/references/lockups.md +78 -0
- package/skills/ios/hig-components-content/references/web-views.md +36 -0
- package/skills/ios/hig-components-controls/SKILL.md +88 -0
- package/skills/ios/hig-components-controls/references/combo-boxes.md +40 -0
- package/skills/ios/hig-components-controls/references/controls.md +112 -0
- package/skills/ios/hig-components-controls/references/gauges.md +74 -0
- package/skills/ios/hig-components-controls/references/labels.md +92 -0
- package/skills/ios/hig-components-controls/references/pickers.md +128 -0
- package/skills/ios/hig-components-controls/references/rating-indicators.md +38 -0
- package/skills/ios/hig-components-controls/references/segmented-controls.md +94 -0
- package/skills/ios/hig-components-controls/references/sliders.md +92 -0
- package/skills/ios/hig-components-controls/references/steppers.md +40 -0
- package/skills/ios/hig-components-controls/references/text-fields.md +88 -0
- package/skills/ios/hig-components-controls/references/text-views.md +56 -0
- package/skills/ios/hig-components-controls/references/toggles.md +127 -0
- package/skills/ios/hig-components-controls/references/token-fields.md +48 -0
- package/skills/ios/hig-components-controls/references/virtual-keyboards.md +156 -0
- package/skills/ios/hig-components-dialogs/SKILL.md +76 -0
- package/skills/ios/hig-components-dialogs/references/action-sheets.md +74 -0
- package/skills/ios/hig-components-dialogs/references/alerts.md +158 -0
- package/skills/ios/hig-components-dialogs/references/digit-entry-views.md +32 -0
- package/skills/ios/hig-components-dialogs/references/popovers.md +81 -0
- package/skills/ios/hig-components-dialogs/references/sheets.md +157 -0
- package/skills/ios/hig-components-layout/SKILL.md +99 -0
- package/skills/ios/hig-components-layout/references/boxes.md +48 -0
- package/skills/ios/hig-components-layout/references/column-views.md +44 -0
- package/skills/ios/hig-components-layout/references/lists-and-tables.md +99 -0
- package/skills/ios/hig-components-layout/references/ornaments.md +56 -0
- package/skills/ios/hig-components-layout/references/outline-views.md +64 -0
- package/skills/ios/hig-components-layout/references/panels.md +75 -0
- package/skills/ios/hig-components-layout/references/scroll-views.md +123 -0
- package/skills/ios/hig-components-layout/references/sidebars.md +109 -0
- package/skills/ios/hig-components-layout/references/split-views.md +110 -0
- package/skills/ios/hig-components-layout/references/tab-bars.md +173 -0
- package/skills/ios/hig-components-layout/references/tab-views.md +68 -0
- package/skills/ios/hig-components-layout/references/windows.md +188 -0
- package/skills/ios/hig-components-menus/SKILL.md +81 -0
- package/skills/ios/hig-components-menus/references/action-button.md +61 -0
- package/skills/ios/hig-components-menus/references/buttons.md +261 -0
- package/skills/ios/hig-components-menus/references/context-menus.md +105 -0
- package/skills/ios/hig-components-menus/references/disclosure-controls.md +84 -0
- package/skills/ios/hig-components-menus/references/dock-menus.md +40 -0
- package/skills/ios/hig-components-menus/references/edit-menus.md +88 -0
- package/skills/ios/hig-components-menus/references/menus.md +171 -0
- package/skills/ios/hig-components-menus/references/pop-up-buttons.md +70 -0
- package/skills/ios/hig-components-menus/references/pull-down-buttons.md +77 -0
- package/skills/ios/hig-components-menus/references/the-menu-bar.md +303 -0
- package/skills/ios/hig-components-menus/references/toolbars.md +256 -0
- package/skills/ios/hig-components-search/SKILL.md +68 -0
- package/skills/ios/hig-components-search/references/page-controls.md +120 -0
- package/skills/ios/hig-components-search/references/path-controls.md +40 -0
- package/skills/ios/hig-components-search/references/search-fields.md +189 -0
- package/skills/ios/hig-components-status/SKILL.md +80 -0
- package/skills/ios/hig-components-status/references/activity-rings.md +105 -0
- package/skills/ios/hig-components-status/references/progress-indicators.md +116 -0
- package/skills/ios/hig-components-status/references/status-bars.md +38 -0
- package/skills/ios/hig-components-system/SKILL.md +88 -0
- package/skills/ios/hig-components-system/references/app-clips.md +387 -0
- package/skills/ios/hig-components-system/references/app-shortcuts.md +114 -0
- package/skills/ios/hig-components-system/references/complications.md +425 -0
- package/skills/ios/hig-components-system/references/home-screen-quick-actions.md +42 -0
- package/skills/ios/hig-components-system/references/live-activities.md +442 -0
- package/skills/ios/hig-components-system/references/notifications.md +153 -0
- package/skills/ios/hig-components-system/references/top-shelf.md +135 -0
- package/skills/ios/hig-components-system/references/watch-faces.md +40 -0
- package/skills/ios/hig-components-system/references/widgets.md +517 -0
- package/skills/ios/hig-foundations/SKILL.md +98 -0
- package/skills/ios/hig-foundations/references/accessibility.md +291 -0
- package/skills/ios/hig-foundations/references/app-icons.md +210 -0
- package/skills/ios/hig-foundations/references/branding.md +44 -0
- package/skills/ios/hig-foundations/references/color.md +274 -0
- package/skills/ios/hig-foundations/references/dark-mode.md +116 -0
- package/skills/ios/hig-foundations/references/icons.md +263 -0
- package/skills/ios/hig-foundations/references/images.md +176 -0
- package/skills/ios/hig-foundations/references/immersive-experiences.md +174 -0
- package/skills/ios/hig-foundations/references/inclusion.md +189 -0
- package/skills/ios/hig-foundations/references/layout.md +425 -0
- package/skills/ios/hig-foundations/references/materials.md +238 -0
- package/skills/ios/hig-foundations/references/motion.md +103 -0
- package/skills/ios/hig-foundations/references/privacy.md +231 -0
- package/skills/ios/hig-foundations/references/right-to-left.md +206 -0
- package/skills/ios/hig-foundations/references/sf-symbols.md +310 -0
- package/skills/ios/hig-foundations/references/spatial-layout.md +142 -0
- package/skills/ios/hig-foundations/references/typography.md +1146 -0
- package/skills/ios/hig-foundations/references/writing.md +91 -0
- package/skills/ios/hig-inputs/SKILL.md +94 -0
- package/skills/ios/hig-inputs/references/apple-pencil-and-scribble.md +148 -0
- package/skills/ios/hig-inputs/references/camera-control.md +107 -0
- package/skills/ios/hig-inputs/references/digital-crown.md +83 -0
- package/skills/ios/hig-inputs/references/eyes.md +120 -0
- package/skills/ios/hig-inputs/references/focus-and-selection.md +120 -0
- package/skills/ios/hig-inputs/references/game-controls.md +156 -0
- package/skills/ios/hig-inputs/references/gestures.md +208 -0
- package/skills/ios/hig-inputs/references/gyro-and-accelerometer.md +40 -0
- package/skills/ios/hig-inputs/references/keyboards.md +234 -0
- package/skills/ios/hig-inputs/references/nearby-interactions.md +70 -0
- package/skills/ios/hig-inputs/references/pointing-devices.md +237 -0
- package/skills/ios/hig-inputs/references/remotes.md +67 -0
- package/skills/ios/hig-inputs/references/spatial-interactions.md +70 -0
- package/skills/ios/hig-patterns/SKILL.md +104 -0
- package/skills/ios/hig-patterns/references/charting-data.md +81 -0
- package/skills/ios/hig-patterns/references/collaboration-and-sharing.md +86 -0
- package/skills/ios/hig-patterns/references/drag-and-drop.md +134 -0
- package/skills/ios/hig-patterns/references/entering-data.md +69 -0
- package/skills/ios/hig-patterns/references/feedback.md +67 -0
- package/skills/ios/hig-patterns/references/file-management.md +135 -0
- package/skills/ios/hig-patterns/references/going-full-screen.md +79 -0
- package/skills/ios/hig-patterns/references/launching.md +81 -0
- package/skills/ios/hig-patterns/references/live-viewing-apps.md +79 -0
- package/skills/ios/hig-patterns/references/loading.md +59 -0
- package/skills/ios/hig-patterns/references/managing-accounts.md +107 -0
- package/skills/ios/hig-patterns/references/managing-notifications.md +99 -0
- package/skills/ios/hig-patterns/references/modality.md +82 -0
- package/skills/ios/hig-patterns/references/multitasking.md +131 -0
- package/skills/ios/hig-patterns/references/offering-help.md +117 -0
- package/skills/ios/hig-patterns/references/onboarding.md +69 -0
- package/skills/ios/hig-patterns/references/playing-audio.md +124 -0
- package/skills/ios/hig-patterns/references/playing-haptics.md +280 -0
- package/skills/ios/hig-patterns/references/playing-video.md +180 -0
- package/skills/ios/hig-patterns/references/printing.md +50 -0
- package/skills/ios/hig-patterns/references/ratings-and-reviews.md +48 -0
- package/skills/ios/hig-patterns/references/searching.md +70 -0
- package/skills/ios/hig-patterns/references/settings.md +84 -0
- package/skills/ios/hig-patterns/references/undo-and-redo.md +58 -0
- package/skills/ios/hig-patterns/references/workouts.md +76 -0
- package/skills/ios/hig-platforms/SKILL.md +84 -0
- package/skills/ios/hig-platforms/references/designing-for-games.md +159 -0
- package/skills/ios/hig-platforms/references/designing-for-ios.md +66 -0
- package/skills/ios/hig-platforms/references/designing-for-ipados.md +64 -0
- package/skills/ios/hig-platforms/references/designing-for-macos.md +70 -0
- package/skills/ios/hig-platforms/references/designing-for-tvos.md +68 -0
- package/skills/ios/hig-platforms/references/designing-for-visionos.md +85 -0
- package/skills/ios/hig-platforms/references/designing-for-watchos.md +74 -0
- package/skills/ios/hig-project-context/SKILL.md +133 -0
- package/skills/ios/hig-technologies/SKILL.md +107 -0
- package/skills/ios/hig-technologies/references/airplay.md +125 -0
- package/skills/ios/hig-technologies/references/always-on.md +62 -0
- package/skills/ios/hig-technologies/references/apple-pay.md +441 -0
- package/skills/ios/hig-technologies/references/augmented-reality.md +247 -0
- package/skills/ios/hig-technologies/references/carekit.md +224 -0
- package/skills/ios/hig-technologies/references/carplay.md +119 -0
- package/skills/ios/hig-technologies/references/game-center.md +343 -0
- package/skills/ios/hig-technologies/references/generative-ai.md +110 -0
- package/skills/ios/hig-technologies/references/healthkit.md +120 -0
- package/skills/ios/hig-technologies/references/homekit.md +343 -0
- package/skills/ios/hig-technologies/references/icloud.md +52 -0
- package/skills/ios/hig-technologies/references/id-verifier.md +73 -0
- package/skills/ios/hig-technologies/references/imessage-apps-and-stickers.md +105 -0
- package/skills/ios/hig-technologies/references/in-app-purchase.md +263 -0
- package/skills/ios/hig-technologies/references/live-photos.md +54 -0
- package/skills/ios/hig-technologies/references/mac-catalyst.md +216 -0
- package/skills/ios/hig-technologies/references/machine-learning.md +394 -0
- package/skills/ios/hig-technologies/references/maps.md +221 -0
- package/skills/ios/hig-technologies/references/nfc.md +51 -0
- package/skills/ios/hig-technologies/references/photo-editing.md +40 -0
- package/skills/ios/hig-technologies/references/researchkit.md +134 -0
- package/skills/ios/hig-technologies/references/shareplay.md +142 -0
- package/skills/ios/hig-technologies/references/shazamkit.md +47 -0
- package/skills/ios/hig-technologies/references/sign-in-with-apple.md +288 -0
- package/skills/ios/hig-technologies/references/siri.md +523 -0
- package/skills/ios/hig-technologies/references/tap-to-pay-on-iphone.md +208 -0
- package/skills/ios/hig-technologies/references/voiceover.md +90 -0
- package/skills/ios/hig-technologies/references/wallet.md +420 -0
- package/skills/ios/ios-bootstrap/SKILL.md +16 -7
- package/skills/ios/swift-actor-persistence/SKILL.md +143 -0
- package/skills/ios/swift-concurrency-6-2/SKILL.md +216 -0
- package/skills/ios/swift-protocol-di-testing/SKILL.md +190 -0
- package/skills/ios/swiftui-design-tokens/SKILL.md +475 -0
- package/skills/ios/writing-for-interfaces/SKILL.md +75 -0
- package/skills/web/accessibility/SKILL.md +146 -0
- package/skills/web/aceternity-ui/SKILL.md +719 -0
- package/skills/web/aceternity-ui/metadata.json +10 -0
- package/skills/web/api-design/SKILL.md +523 -0
- package/skills/web/chart-accessibility/SKILL.md +332 -0
- package/skills/web/composition-patterns/AGENTS.md +946 -0
- package/skills/web/composition-patterns/README.md +60 -0
- package/skills/web/composition-patterns/SKILL.md +89 -0
- package/skills/web/composition-patterns/metadata.json +11 -0
- package/skills/web/composition-patterns/rules/_sections.md +29 -0
- package/skills/web/composition-patterns/rules/_template.md +24 -0
- package/skills/web/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/skills/web/composition-patterns/rules/architecture-compound-components.md +112 -0
- package/skills/web/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/skills/web/composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/skills/web/composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/skills/web/composition-patterns/rules/state-context-interface.md +191 -0
- package/skills/web/composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/skills/web/composition-patterns/rules/state-lift-state.md +125 -0
- package/skills/web/cost-aware-llm-pipeline/SKILL.md +183 -0
- package/skills/web/database-migrations/SKILL.md +429 -0
- package/skills/web/deployment-patterns/SKILL.md +427 -0
- package/skills/web/docker-patterns/SKILL.md +364 -0
- package/skills/web/e2e-testing/SKILL.md +326 -0
- package/skills/web/lighthouse-ci/SKILL.md +361 -0
- package/skills/web/mcp-server-patterns/SKILL.md +69 -0
- package/skills/web/next-best-practices/SKILL.md +153 -0
- package/skills/web/next-best-practices/async-patterns.md +87 -0
- package/skills/web/next-best-practices/bundling.md +180 -0
- package/skills/web/next-best-practices/data-patterns.md +297 -0
- package/skills/web/next-best-practices/debug-tricks.md +105 -0
- package/skills/web/next-best-practices/directives.md +73 -0
- package/skills/web/next-best-practices/error-handling.md +227 -0
- package/skills/web/next-best-practices/file-conventions.md +140 -0
- package/skills/web/next-best-practices/font.md +245 -0
- package/skills/web/next-best-practices/functions.md +108 -0
- package/skills/web/next-best-practices/hydration-error.md +91 -0
- package/skills/web/next-best-practices/image.md +173 -0
- package/skills/web/next-best-practices/metadata.md +301 -0
- package/skills/web/next-best-practices/parallel-routes.md +287 -0
- package/skills/web/next-best-practices/route-handlers.md +146 -0
- package/skills/web/next-best-practices/rsc-boundaries.md +159 -0
- package/skills/web/next-best-practices/runtime-selection.md +39 -0
- package/skills/web/next-best-practices/scripts.md +141 -0
- package/skills/web/next-best-practices/self-hosting.md +371 -0
- package/skills/web/next-best-practices/suspense-boundaries.md +67 -0
- package/skills/web/next-cache-components/SKILL.md +411 -0
- package/skills/web/postgres-best-practices/SKILL.md +14 -0
- package/skills/web/postgres-best-practices/references/schema-design.md +9 -0
- package/skills/web/react-best-practices/AGENTS.md +3810 -0
- package/skills/web/react-best-practices/README.md +123 -0
- package/skills/web/react-best-practices/SKILL.md +149 -0
- package/skills/web/react-best-practices/metadata.json +15 -0
- package/skills/web/react-best-practices/rules/_sections.md +46 -0
- package/skills/web/react-best-practices/rules/_template.md +28 -0
- package/skills/web/react-best-practices/rules/advanced-effect-event-deps.md +56 -0
- package/skills/web/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/skills/web/react-best-practices/rules/advanced-init-once.md +42 -0
- package/skills/web/react-best-practices/rules/advanced-use-latest.md +39 -0
- package/skills/web/react-best-practices/rules/async-api-routes.md +38 -0
- package/skills/web/react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
- package/skills/web/react-best-practices/rules/async-defer-await.md +82 -0
- package/skills/web/react-best-practices/rules/async-dependencies.md +51 -0
- package/skills/web/react-best-practices/rules/async-parallel.md +28 -0
- package/skills/web/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/skills/web/react-best-practices/rules/bundle-analyzable-paths.md +63 -0
- package/skills/web/react-best-practices/rules/bundle-barrel-imports.md +60 -0
- package/skills/web/react-best-practices/rules/bundle-conditional.md +31 -0
- package/skills/web/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/skills/web/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/skills/web/react-best-practices/rules/bundle-preload.md +50 -0
- package/skills/web/react-best-practices/rules/client-event-listeners.md +74 -0
- package/skills/web/react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/skills/web/react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/skills/web/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/skills/web/react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/skills/web/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/skills/web/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/skills/web/react-best-practices/rules/js-cache-storage.md +70 -0
- package/skills/web/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/skills/web/react-best-practices/rules/js-early-exit.md +50 -0
- package/skills/web/react-best-practices/rules/js-flatmap-filter.md +60 -0
- package/skills/web/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/skills/web/react-best-practices/rules/js-index-maps.md +37 -0
- package/skills/web/react-best-practices/rules/js-length-check-first.md +49 -0
- package/skills/web/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/skills/web/react-best-practices/rules/js-request-idle-callback.md +105 -0
- package/skills/web/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/skills/web/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/skills/web/react-best-practices/rules/rendering-activity.md +26 -0
- package/skills/web/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/skills/web/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/skills/web/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/skills/web/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/skills/web/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/skills/web/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/skills/web/react-best-practices/rules/rendering-resource-hints.md +85 -0
- package/skills/web/react-best-practices/rules/rendering-script-defer-async.md +68 -0
- package/skills/web/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/skills/web/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/skills/web/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/skills/web/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/skills/web/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/skills/web/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/skills/web/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/skills/web/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/skills/web/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/skills/web/react-best-practices/rules/rerender-memo.md +44 -0
- package/skills/web/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/skills/web/react-best-practices/rules/rerender-no-inline-components.md +82 -0
- package/skills/web/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/skills/web/react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
- package/skills/web/react-best-practices/rules/rerender-transitions.md +40 -0
- package/skills/web/react-best-practices/rules/rerender-use-deferred-value.md +59 -0
- package/skills/web/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/skills/web/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/skills/web/react-best-practices/rules/server-auth-actions.md +96 -0
- package/skills/web/react-best-practices/rules/server-cache-lru.md +41 -0
- package/skills/web/react-best-practices/rules/server-cache-react.md +76 -0
- package/skills/web/react-best-practices/rules/server-dedup-props.md +65 -0
- package/skills/web/react-best-practices/rules/server-hoist-static-io.md +149 -0
- package/skills/web/react-best-practices/rules/server-no-shared-module-state.md +50 -0
- package/skills/web/react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/skills/web/react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
- package/skills/web/react-best-practices/rules/server-serialization.md +38 -0
- package/skills/web/seo/SKILL.md +154 -0
- package/skills/web/web-design-guidelines/SKILL.md +39 -0
- package/skills/web/zap-scan-config/SKILL.md +444 -0
- package/skills/web/zap-scan-config/assets/.gitkeep +9 -0
- package/skills/web/zap-scan-config/assets/github_action.yml +207 -0
- package/skills/web/zap-scan-config/assets/gitlab_ci.yml +226 -0
- package/skills/web/zap-scan-config/assets/zap_automation.yaml +196 -0
- package/skills/web/zap-scan-config/assets/zap_context.xml +192 -0
- package/skills/web/zap-scan-config/references/EXAMPLE.md +40 -0
- package/skills/web/zap-scan-config/references/api_testing_guide.md +475 -0
- package/skills/web/zap-scan-config/references/authentication_guide.md +431 -0
- package/skills/web/zap-scan-config/references/false_positive_handling.md +427 -0
- package/skills/web/zap-scan-config/references/owasp_mapping.md +255 -0
- package/src/lrr/aggregator.ts +80 -0
- package/src/orchestrator/hooks/context-header.ts +95 -0
- package/src/orchestrator/hooks/token-accounting-emitter.ts +77 -0
- package/src/orchestrator/hooks/token-accounting.ts +101 -0
- package/src/orchestrator/mcp/cycle-counter.ts +129 -0
- package/src/orchestrator/mcp/scribe.ts +283 -0
- package/src/orchestrator/mcp/state-save.ts +149 -0
- package/src/orchestrator/mcp/write-lease.ts +167 -0
- package/src/orchestrator/phase4-shared-context.ts +41 -0
- package/src/orchestrator/schemas/backward-edge.ts +46 -0
- package/agents/agentic-identity-trust.md +0 -121
- package/agents/data-consolidation-agent.md +0 -39
- package/agents/design-image-prompt-engineer.md +0 -105
- package/agents/design-visual-storyteller.md +0 -147
- package/agents/design-whimsy-injector.md +0 -89
- package/agents/engineering-autonomous-optimization-architect.md +0 -105
- package/agents/market-intel.md +0 -35
- package/agents/marketing-instagram-curator.md +0 -111
- package/agents/marketing-reddit-community-builder.md +0 -121
- package/agents/marketing-social-media-strategist.md +0 -74
- package/agents/marketing-tiktok-strategist.md +0 -123
- package/agents/marketing-twitter-engager.md +0 -124
- package/agents/marketing-wechat-official-account.md +0 -143
- package/agents/marketing-xiaohongshu-specialist.md +0 -136
- package/agents/marketing-zhihu-strategist.md +0 -160
- package/agents/product-behavioral-nudge-engine.md +0 -78
- package/agents/project-management-experiment-tracker.md +0 -102
- package/agents/report-distribution-agent.md +0 -43
- package/agents/risk-analysis.md +0 -45
- package/agents/sales-data-extraction-agent.md +0 -46
- package/agents/specialized-cultural-intelligence-strategist.md +0 -65
- package/agents/specialized-developer-advocate.md +0 -146
- package/agents/support-analytics-reporter.md +0 -133
- package/agents/support-executive-summary-generator.md +0 -64
- package/agents/support-finance-tracker.md +0 -145
- package/agents/support-legal-compliance-checker.md +0 -129
- package/agents/support-support-responder.md +0 -91
- package/agents/testing-accessibility-auditor.md +0 -110
- package/agents/testing-test-results-analyzer.md +0 -97
- package/agents/testing-tool-evaluator.md +0 -76
- package/agents/testing-workflow-optimizer.md +0 -99
- package/agents/user-research.md +0 -40
- package/protocols/brainstorm.md +0 -99
- package/protocols/design.md +0 -269
- package/protocols/planning.md +0 -87
- package/skills/ios/ios-hig/SKILL.md +0 -41
- package/skills/ios/ios-hig/references/accessibility.md +0 -81
- package/skills/ios/ios-hig/references/content.md +0 -142
- package/skills/ios/ios-hig/references/feedback.md +0 -123
- package/skills/ios/ios-hig/references/interaction.md +0 -199
- package/skills/ios/ios-hig/references/performance-platform.md +0 -129
- package/skills/ios/ios-hig/references/privacy-permissions.md +0 -181
- package/skills/ios/ios-hig/references/visual-design.md +0 -84
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# Accessibility
|
|
2
|
-
|
|
3
|
-
Apple Human Interface Guidelines for accessible iOS app design.
|
|
4
|
-
|
|
5
|
-
## Critical Rules
|
|
6
|
-
|
|
7
|
-
- Provide meaningful accessibility labels/hints for icon-only controls and custom components
|
|
8
|
-
- Ensure Dynamic Type works end-to-end; avoid layouts that collapse at larger sizes
|
|
9
|
-
- Maintain readable contrast and avoid conveying meaning by color alone
|
|
10
|
-
- Respect platform accessibility settings (Reduce Motion/Transparency) when relevant
|
|
11
|
-
- Prefer system controls that come with good accessibility defaults
|
|
12
|
-
|
|
13
|
-
## Examples
|
|
14
|
-
|
|
15
|
-
### Icon-Only Buttons
|
|
16
|
-
|
|
17
|
-
```swift
|
|
18
|
-
// ✅ Icon-only button with accessible label
|
|
19
|
-
Button(action: model.refresh) {
|
|
20
|
-
Image(systemName: "arrow.clockwise")
|
|
21
|
-
}
|
|
22
|
-
.accessibilityLabel("Refresh")
|
|
23
|
-
.accessibilityHint("Reloads the list")
|
|
24
|
-
|
|
25
|
-
// ❌ Icon-only control with no label; VoiceOver reads "arrow.clockwise"
|
|
26
|
-
Button(action: model.refresh) {
|
|
27
|
-
Image(systemName: "arrow.clockwise")
|
|
28
|
-
}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Dynamic Type Support
|
|
32
|
-
|
|
33
|
-
```swift
|
|
34
|
-
// ✅ Dynamic Type with proper layout
|
|
35
|
-
VStack(alignment: .leading, spacing: 8) {
|
|
36
|
-
Text(item.title)
|
|
37
|
-
.font(.headline)
|
|
38
|
-
.lineLimit(2)
|
|
39
|
-
|
|
40
|
-
if let summary = item.summary {
|
|
41
|
-
Text(summary)
|
|
42
|
-
.font(.body)
|
|
43
|
-
.foregroundStyle(.secondary)
|
|
44
|
-
.lineLimit(3)
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// ❌ Hard-coded sizes that don't scale
|
|
49
|
-
VStack(alignment: .leading) {
|
|
50
|
-
Text(item.title)
|
|
51
|
-
.font(.system(size: 14))
|
|
52
|
-
.lineLimit(1)
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Reduce Motion
|
|
57
|
-
|
|
58
|
-
```swift
|
|
59
|
-
// ✅ Respect Reduce Motion setting
|
|
60
|
-
@Environment(\.accessibilityReduceMotion) var reduceMotion
|
|
61
|
-
|
|
62
|
-
var body: some View {
|
|
63
|
-
content
|
|
64
|
-
.animation(reduceMotion ? .none : .spring, value: isExpanded)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// ❌ Always animate regardless of setting
|
|
68
|
-
var body: some View {
|
|
69
|
-
content
|
|
70
|
-
.animation(.spring, value: isExpanded)
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Summary
|
|
75
|
-
|
|
76
|
-
**Key Principles**:
|
|
77
|
-
1. Use `.accessibilityLabel()` and `.accessibilityHint()` for icon-only controls
|
|
78
|
-
2. Support Dynamic Type with system font styles
|
|
79
|
-
3. Maintain sufficient color contrast
|
|
80
|
-
4. Respect accessibility settings like Reduce Motion
|
|
81
|
-
5. Prefer system controls with built-in accessibility
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Content
|
|
2
|
-
|
|
3
|
-
Apple Human Interface Guidelines for content, empty states, writing, and typography.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
1. [Empty States](#empty-states)
|
|
7
|
-
2. [Writing and Labels](#writing-and-labels)
|
|
8
|
-
3. [Typography and Dynamic Type](#typography-and-dynamic-type)
|
|
9
|
-
|
|
10
|
-
## Empty States
|
|
11
|
-
|
|
12
|
-
### Critical Rules
|
|
13
|
-
|
|
14
|
-
- Use empty states to **explain what this screen is** and **what to do next**
|
|
15
|
-
- Prefer lightweight guidance (one sentence + primary action) over multi-step tutorials
|
|
16
|
-
- Keep onboarding contextual: explain features at the moment the user needs them
|
|
17
|
-
- Avoid placeholder junk content that looks real; make it obvious when content is sample/demo
|
|
18
|
-
|
|
19
|
-
### Examples
|
|
20
|
-
|
|
21
|
-
```swift
|
|
22
|
-
// ✅ Helpful empty state with a clear next step
|
|
23
|
-
ContentUnavailableView {
|
|
24
|
-
Label("No links yet", systemImage: "link")
|
|
25
|
-
} description: {
|
|
26
|
-
Text("Save links to find them quickly later.")
|
|
27
|
-
} actions: {
|
|
28
|
-
Button("Add link", systemImage: "plus") { model.presentAddLink() }
|
|
29
|
-
.buttonStyle(.borderedProminent)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// ❌ Empty UI with no explanation
|
|
33
|
-
List { }
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Writing and Labels
|
|
37
|
-
|
|
38
|
-
### Critical Rules
|
|
39
|
-
|
|
40
|
-
- Prefer **plain language** and short phrases; avoid jargon and developer terms
|
|
41
|
-
- Buttons should describe the action ("Save", "Add link"), not vague labels ("OK", "Yes")
|
|
42
|
-
- Keep terminology consistent across the app (e.g., "Link" vs "URL"); choose one and stick to it
|
|
43
|
-
- Error messages should explain the problem and the next step, without blame
|
|
44
|
-
|
|
45
|
-
### Examples
|
|
46
|
-
|
|
47
|
-
```swift
|
|
48
|
-
// ✅ Clear action labels and consistent terminology
|
|
49
|
-
Button("Add link", systemImage: "plus") { model.addLink() }
|
|
50
|
-
Button("Save", action: model.save)
|
|
51
|
-
|
|
52
|
-
// Error message example
|
|
53
|
-
Text("Could not save link. Check your connection and try again.")
|
|
54
|
-
|
|
55
|
-
// ❌ Vague and inconsistent
|
|
56
|
-
Button("OK") { model.save() }
|
|
57
|
-
Button("Add URL") { model.addLink() }
|
|
58
|
-
|
|
59
|
-
// Error message without guidance
|
|
60
|
-
Text("Error: Save failed")
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Writing Guidelines
|
|
64
|
-
|
|
65
|
-
**Button Labels**:
|
|
66
|
-
- ✅ "Delete", "Save", "Add link"
|
|
67
|
-
- ❌ "OK", "Yes", "No"
|
|
68
|
-
|
|
69
|
-
**Error Messages**:
|
|
70
|
-
- ✅ "Could not load items. Pull to refresh."
|
|
71
|
-
- ❌ "Error code 404"
|
|
72
|
-
|
|
73
|
-
**Terminology Consistency**:
|
|
74
|
-
- Choose one term and use it throughout
|
|
75
|
-
- "Link" not "URL" or "Website"
|
|
76
|
-
- "Save" not "Add" or "Create" interchangeably
|
|
77
|
-
|
|
78
|
-
## Typography and Dynamic Type
|
|
79
|
-
|
|
80
|
-
### Critical Rules
|
|
81
|
-
|
|
82
|
-
- Use **Dynamic Type** styles (`.body`, `.headline`, `.caption`) instead of hard-coded sizes
|
|
83
|
-
- Prefer **short, scannable labels**; use secondary text (`.secondary`) for supporting detail
|
|
84
|
-
- Avoid truncation for critical info; if truncation can happen, provide an alternative (multi-line, disclosure, copy)
|
|
85
|
-
- Use appropriate alignment and line limits; avoid overly dense paragraphs
|
|
86
|
-
- Ensure text remains legible in accessibility sizes (test with larger sizes)
|
|
87
|
-
|
|
88
|
-
### Examples
|
|
89
|
-
|
|
90
|
-
```swift
|
|
91
|
-
// ✅ Dynamic Type + predictable wrapping for important content
|
|
92
|
-
VStack(alignment: .leading, spacing: 8) {
|
|
93
|
-
Text(item.title)
|
|
94
|
-
.font(.headline)
|
|
95
|
-
.lineLimit(2)
|
|
96
|
-
|
|
97
|
-
if let summary = item.summary {
|
|
98
|
-
Text(summary)
|
|
99
|
-
.font(.body)
|
|
100
|
-
.foregroundStyle(.secondary)
|
|
101
|
-
.lineLimit(3)
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// ❌ Hard-coded sizes and single-line truncation for critical info
|
|
106
|
-
VStack(alignment: .leading) {
|
|
107
|
-
Text(item.title)
|
|
108
|
-
.font(.system(size: 14))
|
|
109
|
-
.lineLimit(1)
|
|
110
|
-
Text(item.summary ?? "")
|
|
111
|
-
.font(.system(size: 11))
|
|
112
|
-
.lineLimit(1)
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Dynamic Type Styles
|
|
117
|
-
|
|
118
|
-
Use system text styles that scale with Dynamic Type:
|
|
119
|
-
- `.largeTitle`, `.title`, `.title2`, `.title3`
|
|
120
|
-
- `.headline`, `.body`, `.callout`
|
|
121
|
-
- `.subheadline`, `.footnote`, `.caption`, `.caption2`
|
|
122
|
-
|
|
123
|
-
```swift
|
|
124
|
-
// ✅ System styles that scale
|
|
125
|
-
Text("Main heading")
|
|
126
|
-
.font(.title2)
|
|
127
|
-
Text("Body content")
|
|
128
|
-
.font(.body)
|
|
129
|
-
Text("Supporting detail")
|
|
130
|
-
.font(.caption)
|
|
131
|
-
.foregroundStyle(.secondary)
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Summary
|
|
135
|
-
|
|
136
|
-
**Key Principles**:
|
|
137
|
-
1. Use `ContentUnavailableView` for helpful empty states
|
|
138
|
-
2. Write clear, action-oriented button labels
|
|
139
|
-
3. Keep terminology consistent throughout the app
|
|
140
|
-
4. Error messages explain the problem and next step
|
|
141
|
-
5. Use Dynamic Type styles, never hard-coded sizes
|
|
142
|
-
6. Allow important text to wrap (don't truncate critical info)
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# Feedback
|
|
2
|
-
|
|
3
|
-
Apple Human Interface Guidelines for motion, haptics, loading states, and error handling.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
1. [Motion and Haptics](#motion-and-haptics)
|
|
7
|
-
2. [Status and Error Feedback](#status-and-error-feedback)
|
|
8
|
-
|
|
9
|
-
## Motion and Haptics
|
|
10
|
-
|
|
11
|
-
### Critical Rules
|
|
12
|
-
|
|
13
|
-
- Motion should be **purposeful**: reinforce state change, hierarchy, or causality—not decoration
|
|
14
|
-
- Keep animations **subtle and consistent**; avoid stacking multiple effects (scale + rotate + blur) for routine interactions
|
|
15
|
-
- Respect accessibility settings (Reduce Motion); don't rely on animation as the only feedback
|
|
16
|
-
- Use haptics sparingly for meaningful moments (confirmations, errors), not for every tap
|
|
17
|
-
|
|
18
|
-
### Examples
|
|
19
|
-
|
|
20
|
-
```swift
|
|
21
|
-
// ✅ Subtle animation tied to state change
|
|
22
|
-
withAnimation(.spring(response: 0.35, dampingFraction: 0.85)) {
|
|
23
|
-
model.isExpanded.toggle()
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// ❌ Excessive motion for routine UI; feels noisy and fatiguing
|
|
27
|
-
withAnimation(.easeInOut(duration: 2.0)) {
|
|
28
|
-
model.isExpanded.toggle()
|
|
29
|
-
}
|
|
30
|
-
// Plus additional scale/rotation/blur effects on the entire screen
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### Motion Guidelines
|
|
34
|
-
|
|
35
|
-
**Purposeful Animation**:
|
|
36
|
-
- State transitions (expanding/collapsing)
|
|
37
|
-
- Hierarchy changes (list reordering)
|
|
38
|
-
- Causality (deletion leading to list reflow)
|
|
39
|
-
|
|
40
|
-
**Animation Parameters**:
|
|
41
|
-
- Spring response: 0.3-0.4 seconds
|
|
42
|
-
- Damping fraction: 0.8-0.9 (less bouncy)
|
|
43
|
-
- Easing: Prefer springs over linear or custom curves
|
|
44
|
-
|
|
45
|
-
**Accessibility**:
|
|
46
|
-
- Always respect `@Environment(\.accessibilityReduceMotion)`
|
|
47
|
-
- Provide non-animated alternatives
|
|
48
|
-
- Don't use motion as the only feedback mechanism
|
|
49
|
-
|
|
50
|
-
## Status and Error Feedback
|
|
51
|
-
|
|
52
|
-
### Critical Rules
|
|
53
|
-
|
|
54
|
-
- Always show **state feedback** for async work: loading, success, failure, and empty
|
|
55
|
-
- Prefer **inline** status for local issues (validation) and **alerts** for exceptional interruptions
|
|
56
|
-
- Make errors **actionable**: explain what happened in plain language and offer a next step (retry, fix input, dismiss)
|
|
57
|
-
- Avoid blaming the user; avoid exposing raw system error text
|
|
58
|
-
- Use system patterns for empty states (`ContentUnavailableView`) and progress (`ProgressView`)
|
|
59
|
-
|
|
60
|
-
### Examples
|
|
61
|
-
|
|
62
|
-
```swift
|
|
63
|
-
// ✅ Clear empty state and recoverable error with retry
|
|
64
|
-
Group {
|
|
65
|
-
if model.isLoading {
|
|
66
|
-
ProgressView("Loading…")
|
|
67
|
-
} else if model.items.isEmpty {
|
|
68
|
-
ContentUnavailableView(
|
|
69
|
-
"No items",
|
|
70
|
-
systemImage: "tray",
|
|
71
|
-
description: Text("Add your first item to get started.")
|
|
72
|
-
)
|
|
73
|
-
} else {
|
|
74
|
-
List(model.items) { item in Text(item.title) }
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
.alert("Couldn't load items", isPresented: $model.isShowingError) {
|
|
78
|
-
Button("Retry", action: model.reload)
|
|
79
|
-
Button("Cancel", role: .cancel) {}
|
|
80
|
-
} message: {
|
|
81
|
-
Text("Check your connection and try again.")
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// ❌ Silent failures and raw errors; no next step
|
|
85
|
-
List(model.items) { item in Text(item.title) }
|
|
86
|
-
// On error: print(error) and keep stale UI with no feedback
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Status Guidelines
|
|
90
|
-
|
|
91
|
-
**Loading States**:
|
|
92
|
-
- Use `ProgressView` for async operations
|
|
93
|
-
- Show progress for operations >1 second
|
|
94
|
-
- Provide context ("Loading items…")
|
|
95
|
-
|
|
96
|
-
**Empty States**:
|
|
97
|
-
- Use `ContentUnavailableView` for empty collections
|
|
98
|
-
- Explain what the view is for
|
|
99
|
-
- Provide a primary action to get started
|
|
100
|
-
|
|
101
|
-
**Error States**:
|
|
102
|
-
- Use alerts for unexpected errors that interrupt flow
|
|
103
|
-
- Use inline validation for expected errors (form fields)
|
|
104
|
-
- Always provide a recovery action
|
|
105
|
-
|
|
106
|
-
**Error Messages**:
|
|
107
|
-
- ✅ "Couldn't save item. Check your connection and try again."
|
|
108
|
-
- ❌ "Error: NetworkError.timeout"
|
|
109
|
-
|
|
110
|
-
**Next Steps**:
|
|
111
|
-
- Retry button for transient failures
|
|
112
|
-
- Fix input guidance for validation errors
|
|
113
|
-
- Dismiss or cancel for unrecoverable errors
|
|
114
|
-
|
|
115
|
-
## Summary
|
|
116
|
-
|
|
117
|
-
**Key Principles**:
|
|
118
|
-
1. Keep motion subtle, purposeful, and tied to state changes
|
|
119
|
-
2. Respect Reduce Motion accessibility setting
|
|
120
|
-
3. Always show feedback for async operations (loading, empty, error)
|
|
121
|
-
4. Make errors actionable with plain language and recovery steps
|
|
122
|
-
5. Use system patterns (`ProgressView`, `ContentUnavailableView`, alerts)
|
|
123
|
-
6. Prefer inline validation for expected errors, alerts for exceptional interruptions
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
# Interaction
|
|
2
|
-
|
|
3
|
-
Apple Human Interface Guidelines for touch targets, input, navigation, layout, and hierarchy.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
1. [Touch Targets and Input](#touch-targets-and-input)
|
|
7
|
-
2. [Navigation and Flows](#navigation-and-flows)
|
|
8
|
-
3. [Layout, Hierarchy, and Grouping](#layout-hierarchy-and-grouping)
|
|
9
|
-
|
|
10
|
-
## Touch Targets and Input
|
|
11
|
-
|
|
12
|
-
### Critical Rules
|
|
13
|
-
|
|
14
|
-
- Use system controls (`Button`, `Toggle`, `TextField`, `Picker`) rather than custom hit-testing
|
|
15
|
-
- Ensure **comfortable hit targets**; avoid tiny icons-only tap areas
|
|
16
|
-
- Prefer **clear labels** over icon-only actions; use SF Symbols consistently with text where appropriate
|
|
17
|
-
- Use appropriate keyboard/input behaviors (submit labels, autocorrection/capitalization) for the field's purpose
|
|
18
|
-
- Avoid gesture-only interactions for primary actions; make actions discoverable
|
|
19
|
-
|
|
20
|
-
### Examples
|
|
21
|
-
|
|
22
|
-
```swift
|
|
23
|
-
// ✅ Tappable control with label + icon; clear intent
|
|
24
|
-
Button("Add item", systemImage: "plus") {
|
|
25
|
-
model.add()
|
|
26
|
-
}
|
|
27
|
-
.buttonStyle(.borderedProminent)
|
|
28
|
-
|
|
29
|
-
// ✅ TextField with appropriate keyboard
|
|
30
|
-
TextField("Email", text: $email)
|
|
31
|
-
.keyboardType(.emailAddress)
|
|
32
|
-
.textInputAutocapitalization(.never)
|
|
33
|
-
.autocorrectionDisabled()
|
|
34
|
-
|
|
35
|
-
// ❌ Tiny icon-only tap target; poor discoverability
|
|
36
|
-
Image(systemName: "plus")
|
|
37
|
-
.onTapGesture {
|
|
38
|
-
model.add()
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Navigation and Flows
|
|
43
|
-
|
|
44
|
-
### Critical Rules
|
|
45
|
-
|
|
46
|
-
- Prefer **NavigationStack + navigationDestination** for drill-in flows; keep navigation shallow where possible
|
|
47
|
-
- Use **modals** for short, self-contained tasks (create, edit, pick); always provide a clear way to dismiss
|
|
48
|
-
- Keep **back behavior predictable**: don't override system expectations; preserve navigation state when reasonable
|
|
49
|
-
- Avoid "choice paralysis": limit top-level destinations; group related settings and utilities
|
|
50
|
-
- Prefer system placements: `.confirmationAction` for Save/Done, `.cancellationAction` for Cancel
|
|
51
|
-
|
|
52
|
-
### Examples
|
|
53
|
-
|
|
54
|
-
```swift
|
|
55
|
-
// ✅ Predictable drill-in navigation; modal only for creation
|
|
56
|
-
NavigationStack {
|
|
57
|
-
List(items) { item in
|
|
58
|
-
NavigationLink(item.title, value: item.id)
|
|
59
|
-
}
|
|
60
|
-
.navigationDestination(for: Item.ID.self) { id in
|
|
61
|
-
ItemDetailView(id: id)
|
|
62
|
-
}
|
|
63
|
-
.toolbar {
|
|
64
|
-
ToolbarItem(placement: .primaryAction) {
|
|
65
|
-
Button("Add", systemImage: "plus") { model.isPresentingCreate = true }
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
.sheet(isPresented: $model.isPresentingCreate) {
|
|
69
|
-
NavigationStack { CreateItemView() }
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// ✅ Modal with clear dismiss path
|
|
74
|
-
NavigationStack {
|
|
75
|
-
CreateItemView()
|
|
76
|
-
.navigationTitle("New Item")
|
|
77
|
-
.toolbar {
|
|
78
|
-
ToolbarItem(placement: .cancellationAction) {
|
|
79
|
-
Button("Cancel", action: dismiss)
|
|
80
|
-
}
|
|
81
|
-
ToolbarItem(placement: .confirmationAction) {
|
|
82
|
-
Button("Save", action: model.save)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// ❌ Everything is a modal; unclear back/exit paths
|
|
88
|
-
VStack {
|
|
89
|
-
Button("Open item") { model.showItem.toggle() }
|
|
90
|
-
}
|
|
91
|
-
.sheet(isPresented: $model.showItem) {
|
|
92
|
-
ItemDetailView(id: model.selectedID)
|
|
93
|
-
.toolbar { Button("Save") {} } // no Cancel, no navigation context
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Navigation Guidelines
|
|
98
|
-
|
|
99
|
-
**Use NavigationStack for**:
|
|
100
|
-
- Browsing hierarchical content
|
|
101
|
-
- Drill-down patterns
|
|
102
|
-
- Main app navigation
|
|
103
|
-
|
|
104
|
-
**Use Modals (.sheet, .fullScreenCover) for**:
|
|
105
|
-
- Creating new content
|
|
106
|
-
- Editing existing content
|
|
107
|
-
- Short, self-contained tasks
|
|
108
|
-
- Pickers and selections
|
|
109
|
-
|
|
110
|
-
**Always provide**:
|
|
111
|
-
- Clear dismiss buttons for modals
|
|
112
|
-
- Consistent back button behavior
|
|
113
|
-
- Confirmation for destructive actions
|
|
114
|
-
|
|
115
|
-
## Layout, Hierarchy, and Grouping
|
|
116
|
-
|
|
117
|
-
### Critical Rules
|
|
118
|
-
|
|
119
|
-
- Design around **content first**: prioritize the primary task and content; remove decorative UI that doesn't help comprehension
|
|
120
|
-
- Create **clear hierarchy**: one primary action per screen; secondary actions are visually subordinate
|
|
121
|
-
- Use **consistent spacing and alignment** to communicate grouping; avoid "random" padding values across the app
|
|
122
|
-
- Prefer system containers (`List`, `Form`, `Section`, `Toolbar`, `NavigationStack`) that encode platform layout conventions
|
|
123
|
-
- Avoid dense UI: keep line lengths readable and allow whitespace for scanning
|
|
124
|
-
|
|
125
|
-
### Examples
|
|
126
|
-
|
|
127
|
-
```swift
|
|
128
|
-
// ✅ Hierarchy + grouping via Sections; one primary action in toolbar
|
|
129
|
-
NavigationStack {
|
|
130
|
-
List {
|
|
131
|
-
Section("Details") {
|
|
132
|
-
TextField("Title", text: $model.title)
|
|
133
|
-
TextField("Notes", text: $model.notes, axis: .vertical)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
Section("Metadata") {
|
|
137
|
-
Toggle("Pinned", isOn: $model.isPinned)
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
.navigationTitle("New item")
|
|
141
|
-
.toolbar {
|
|
142
|
-
ToolbarItem(placement: .confirmationAction) {
|
|
143
|
-
Button("Save", action: model.save)
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// ✅ Clear visual hierarchy with system components
|
|
149
|
-
VStack(spacing: 16) {
|
|
150
|
-
// Primary action
|
|
151
|
-
Button("Continue", action: model.continue)
|
|
152
|
-
.buttonStyle(.borderedProminent)
|
|
153
|
-
.controlSize(.large)
|
|
154
|
-
|
|
155
|
-
// Secondary action
|
|
156
|
-
Button("Skip for now", action: model.skip)
|
|
157
|
-
.buttonStyle(.borderless)
|
|
158
|
-
.foregroundStyle(.secondary)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// ❌ Flat wall-of-controls with unclear priority
|
|
162
|
-
VStack(spacing: 3) {
|
|
163
|
-
Text("New item").font(.title2)
|
|
164
|
-
TextField("Title", text: $model.title).padding(1)
|
|
165
|
-
TextField("Notes", text: $model.notes).padding(23)
|
|
166
|
-
Toggle("Pinned", isOn: $model.isPinned)
|
|
167
|
-
Button("Save", action: model.save)
|
|
168
|
-
Button("Delete", action: model.delete)
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Layout Guidelines
|
|
173
|
-
|
|
174
|
-
**Visual Hierarchy**:
|
|
175
|
-
- One primary action per screen (prominent button style)
|
|
176
|
-
- Secondary actions are visually subordinate (borderless, smaller)
|
|
177
|
-
- Destructive actions are clearly marked (`.destructive` role)
|
|
178
|
-
|
|
179
|
-
**Spacing and Grouping**:
|
|
180
|
-
- Use `Section` in `List` or `Form` to group related controls
|
|
181
|
-
- Consistent spacing values (8, 12, 16, 20, 24)
|
|
182
|
-
- Whitespace communicates relationships
|
|
183
|
-
|
|
184
|
-
**System Containers**:
|
|
185
|
-
- `List` for browsable content
|
|
186
|
-
- `Form` for data entry
|
|
187
|
-
- `Section` for grouping
|
|
188
|
-
- `Toolbar` for actions
|
|
189
|
-
- `NavigationStack` for hierarchies
|
|
190
|
-
|
|
191
|
-
## Summary
|
|
192
|
-
|
|
193
|
-
**Key Principles**:
|
|
194
|
-
1. Use system controls with comfortable hit targets
|
|
195
|
-
2. NavigationStack for drill-down, modals for tasks
|
|
196
|
-
3. Always provide clear dismiss paths
|
|
197
|
-
4. One primary action per screen
|
|
198
|
-
5. Use sections and spacing for grouping
|
|
199
|
-
6. Prefer system containers over custom layouts
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Performance and Platform Conventions
|
|
2
|
-
|
|
3
|
-
Apple Human Interface Guidelines for performance, responsiveness, and platform-native patterns.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
1. [Performance and Responsiveness](#performance-and-responsiveness)
|
|
7
|
-
2. [Platform Conventions](#platform-conventions)
|
|
8
|
-
|
|
9
|
-
## Performance and Responsiveness
|
|
10
|
-
|
|
11
|
-
### Critical Rules
|
|
12
|
-
|
|
13
|
-
- Optimize for **perceived performance**: show progress quickly, keep interactions responsive, and avoid blocking the main actor
|
|
14
|
-
- Use incremental loading patterns where appropriate; avoid doing heavy work during view rendering
|
|
15
|
-
- Prefer clear placeholder/progress UI over a frozen screen
|
|
16
|
-
- Avoid unnecessary animations, shadows, and effects that degrade scrolling performance
|
|
17
|
-
|
|
18
|
-
### Examples
|
|
19
|
-
|
|
20
|
-
```swift
|
|
21
|
-
// ✅ Immediate feedback and non-blocking load
|
|
22
|
-
VStack {
|
|
23
|
-
if model.isLoading {
|
|
24
|
-
ProgressView("Loading…")
|
|
25
|
-
} else {
|
|
26
|
-
List(model.items) { item in Text(item.title) }
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
.task { await model.loadIfNeeded() }
|
|
30
|
-
|
|
31
|
-
// ❌ Heavy synchronous work during view body; causes jank
|
|
32
|
-
var body: some View {
|
|
33
|
-
let items = model.computeExpensiveListSynchronously()
|
|
34
|
-
return List(items) { item in Text(item.title) }
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Performance Guidelines
|
|
39
|
-
|
|
40
|
-
**Perceived Performance**:
|
|
41
|
-
- Show UI immediately, even if data isn't ready
|
|
42
|
-
- Use `ProgressView` or skeleton states while loading
|
|
43
|
-
- Keep interactions responsive (<100ms feedback)
|
|
44
|
-
- Avoid blocking the main thread
|
|
45
|
-
|
|
46
|
-
**Async Work**:
|
|
47
|
-
- Use `.task { }` for async loading in views
|
|
48
|
-
- Move heavy computation to background tasks
|
|
49
|
-
- Never do expensive work in `body` or computed properties
|
|
50
|
-
|
|
51
|
-
**Rendering Performance**:
|
|
52
|
-
- Avoid heavy shadows, blurs, or complex gradients in scrolling views
|
|
53
|
-
- Use `LazyVStack`/`LazyHStack` for large lists
|
|
54
|
-
- Profile with Instruments if scrolling feels janky
|
|
55
|
-
|
|
56
|
-
**Loading Patterns**:
|
|
57
|
-
- Show skeleton/placeholder UI immediately
|
|
58
|
-
- Load data incrementally when appropriate
|
|
59
|
-
- Provide progress indication for operations >1 second
|
|
60
|
-
|
|
61
|
-
## Platform Conventions
|
|
62
|
-
|
|
63
|
-
### Critical Rules
|
|
64
|
-
|
|
65
|
-
- Prefer system components before custom UI (Lists, Forms, toolbars, menus, context menus)
|
|
66
|
-
- Use SF Symbols consistently and pair icons with text for clarity when appropriate
|
|
67
|
-
- Keep controls and terminology consistent with iOS conventions (Done/Cancel, Back, Edit)
|
|
68
|
-
- Avoid recreating iOS UI patterns with bespoke visuals unless you have a strong UX reason
|
|
69
|
-
|
|
70
|
-
### Examples
|
|
71
|
-
|
|
72
|
-
```swift
|
|
73
|
-
// ✅ System toolbar placements and familiar labels
|
|
74
|
-
.toolbar {
|
|
75
|
-
ToolbarItem(placement: .cancellationAction) {
|
|
76
|
-
Button("Cancel", role: .cancel) { model.cancel() }
|
|
77
|
-
}
|
|
78
|
-
ToolbarItem(placement: .confirmationAction) {
|
|
79
|
-
Button("Done", action: model.done)
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// ❌ Custom "Close" / "Okay" in random placements; inconsistent with platform
|
|
84
|
-
.toolbar {
|
|
85
|
-
ToolbarItem(placement: .automatic) { Button("Okay") {} }
|
|
86
|
-
ToolbarItem(placement: .automatic) { Button("Close") {} }
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### Platform Guidelines
|
|
91
|
-
|
|
92
|
-
**System Components**:
|
|
93
|
-
- `List` for browsable content
|
|
94
|
-
- `Form` for settings and data entry
|
|
95
|
-
- `Toolbar` for actions
|
|
96
|
-
- `NavigationStack` for hierarchical navigation
|
|
97
|
-
- `Menu` and context menus for secondary actions
|
|
98
|
-
|
|
99
|
-
**SF Symbols**:
|
|
100
|
-
- Use SF Symbols for icons (system-provided, adapts to Dynamic Type)
|
|
101
|
-
- Pair icons with text labels for clarity
|
|
102
|
-
- Use consistent symbols throughout the app
|
|
103
|
-
- Prefer standard symbols over custom icons
|
|
104
|
-
|
|
105
|
-
**Platform Terminology**:
|
|
106
|
-
- ✅ "Done", "Cancel", "Save", "Delete", "Edit"
|
|
107
|
-
- ❌ "Okay", "Close", "Submit", "Remove", "Modify"
|
|
108
|
-
|
|
109
|
-
**Standard Placements**:
|
|
110
|
-
- `.cancellationAction` - Cancel/Back (leading on modals)
|
|
111
|
-
- `.confirmationAction` - Done/Save (trailing on modals)
|
|
112
|
-
- `.destructive` role for Delete actions
|
|
113
|
-
- `.primaryAction` for main toolbar actions
|
|
114
|
-
|
|
115
|
-
**Consistency**:
|
|
116
|
-
- Follow iOS patterns for common flows (creation, editing, deletion)
|
|
117
|
-
- Use standard gestures (swipe to delete, pull to refresh)
|
|
118
|
-
- Respect system settings (Dynamic Type, Reduce Motion, Reduce Transparency)
|
|
119
|
-
|
|
120
|
-
## Summary
|
|
121
|
-
|
|
122
|
-
**Key Principles**:
|
|
123
|
-
1. Show UI immediately; load data asynchronously
|
|
124
|
-
2. Use `ProgressView` and skeleton states while loading
|
|
125
|
-
3. Avoid heavy work during view rendering
|
|
126
|
-
4. Prefer system components over custom UI
|
|
127
|
-
5. Use SF Symbols and standard terminology
|
|
128
|
-
6. Follow platform conventions for toolbar placements and actions
|
|
129
|
-
7. Keep controls and terminology consistent with iOS
|