@mmerterden/multi-agent-pipeline 20.37.0 → 20.38.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/CHANGELOG.md +123 -49
- package/README.md +12 -10
- package/README.tr.md +12 -10
- package/docs/adr/0006-skills-core-external-split.md +5 -5
- package/docs/adr/0010-own-code-graph.md +6 -7
- package/docs/adr/0013-lsp-code-intelligence.md +6 -8
- package/docs/adr/0017-change-impact-from-the-graph.md +4 -5
- package/docs/adr/0018-cross-repo-links-not-a-global-graph.md +1 -1
- package/docs/adr/README.md +1 -1
- package/docs/ecosystem.md +53 -41
- package/docs/facts.json +15 -13
- package/docs/features.md +2 -2
- package/docs/recovery-guide.md +1 -1
- package/install/_dev-only-files.mjs +3 -0
- package/install/_platform-filter.mjs +1 -23
- package/install/catalog-history.json +1 -1
- package/install/claude.mjs +8 -1
- package/install/codex.mjs +0 -2
- package/install/copilot.mjs +0 -2
- package/install/templates/claude-hooks.json +47 -1
- package/manifest.json +455 -332
- package/package.json +5 -2
- package/pipeline/agents/security-auditor.md +58 -6
- package/pipeline/commands/multi-agent/build-optimize/SKILL.md +1 -2
- package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/design-check/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/graph/SKILL.md +12 -3
- package/pipeline/commands/multi-agent/manual-test/SKILL.md +12 -7
- package/pipeline/commands/multi-agent/research/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/search/SKILL.md +10 -1
- package/pipeline/commands/multi-agent/security-review/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/setup/SKILL.md +1 -0
- package/pipeline/commands/multi-agent/stack/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/store-ready/SKILL.md +1 -1
- package/pipeline/commands/sim-test.md +34 -1
- package/pipeline/lib/context-budget.mjs +103 -0
- package/pipeline/lib/credential-inventory.sh +2 -3
- package/pipeline/lib/identifier-scan.mjs +145 -0
- package/pipeline/lib/outbound-gate.mjs +28 -1
- package/pipeline/lib/unattended-profile-check.mjs +13 -4
- package/pipeline/multi-agent-refs/analysis/locked.md +1 -1
- package/pipeline/multi-agent-refs/analysis/redesign.md +17 -3
- package/pipeline/multi-agent-refs/analysis-template-corporate.md +8 -4
- package/pipeline/multi-agent-refs/analysis-template.md +7 -5
- package/pipeline/multi-agent-refs/audit-guide.md +20 -0
- package/pipeline/multi-agent-refs/complaint-analysis/phases.md +1 -0
- package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +1 -1
- package/pipeline/multi-agent-refs/features/code-graph.md +25 -0
- package/pipeline/multi-agent-refs/features/commit-multi-repo.md +63 -0
- package/pipeline/multi-agent-refs/features/design-conformance.md +20 -4
- package/pipeline/multi-agent-refs/features/dev-multi-repo.md +51 -0
- package/pipeline/multi-agent-refs/features/free-models.md +10 -3
- package/pipeline/multi-agent-refs/features/research.md +4 -3
- package/pipeline/multi-agent-refs/features/security-audit.md +25 -3
- package/pipeline/multi-agent-refs/features/test-gap.md +40 -0
- package/pipeline/multi-agent-refs/features/unattended-security.md +20 -0
- package/pipeline/multi-agent-refs/features/worktree-finalize.md +1 -1
- package/pipeline/multi-agent-refs/help/en.md +15 -9
- package/pipeline/multi-agent-refs/help/tr.md +15 -9
- package/pipeline/multi-agent-refs/knowledge.md +17 -0
- package/pipeline/multi-agent-refs/orchestrator/phase-3-user-test.md +12 -9
- package/pipeline/multi-agent-refs/outside-the-pipeline.md +9 -0
- package/pipeline/multi-agent-refs/phases/log-format.md +5 -0
- package/pipeline/multi-agent-refs/phases/operations.md +3 -5
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +4 -4
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +8 -47
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +21 -65
- package/pipeline/multi-agent-refs/phases/phase-4-commit.md +9 -59
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +0 -31
- package/pipeline/multi-agent-refs/picker-contract.md +1 -1
- package/pipeline/multi-agent-refs/research/engine.md +2 -1
- package/pipeline/multi-agent-refs/rules.md +1 -1
- package/pipeline/multi-agent-refs/setup/free-models.md +10 -0
- package/pipeline/multi-agent-refs/store-ready/gate-3-policy.md +15 -0
- package/pipeline/multi-agent-refs/web-guide.md +2 -1
- package/pipeline/office/index.html +8 -9
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/rules/figma-pipeline.md +6 -3
- package/pipeline/rules/outside-the-pipeline.md +1 -1
- package/pipeline/schemas/learnings-ledger.schema.json +7 -2
- package/pipeline/schemas/prefs.schema.json +17 -4
- package/pipeline/schemas/reviewer-output.schema.json +113 -5
- package/pipeline/schemas/secret-patterns.json +49 -0
- package/pipeline/schemas/security-finding.schema.json +49 -5
- package/pipeline/scripts/_code-graph.mjs +3 -3
- package/pipeline/scripts/_graph-analysis.mjs +51 -0
- package/pipeline/scripts/_memory-policy.mjs +37 -7
- package/pipeline/scripts/_secret-scan.mjs +1 -1
- package/pipeline/scripts/_skill-practices.mjs +178 -0
- package/pipeline/scripts/_stack-routing.mjs +1 -0
- package/pipeline/scripts/autopilot-runner.mjs +8 -3
- package/pipeline/scripts/build-stack-plugins.mjs +8 -44
- package/pipeline/scripts/capture-resume.sh +19 -0
- package/pipeline/scripts/checkpoint-fold.sh +59 -0
- package/pipeline/scripts/file-context.mjs +306 -70
- package/pipeline/scripts/gate-ledger.mjs +1 -1
- package/pipeline/scripts/gen-skills-index.mjs +1 -1
- package/pipeline/scripts/graph-hint.mjs +197 -0
- package/pipeline/scripts/graph-hint.sh +20 -0
- package/pipeline/scripts/graph-query.mjs +306 -11
- package/pipeline/scripts/graph-report.mjs +29 -1
- package/pipeline/scripts/learnings-ledger.mjs +71 -15
- package/pipeline/scripts/note-agent-event.mjs +160 -0
- package/pipeline/scripts/note-agent-event.sh +19 -0
- package/pipeline/scripts/office-control.mjs +41 -15
- package/pipeline/scripts/offload-ref.sh +1 -1
- package/pipeline/scripts/parity-score.mjs +139 -0
- package/pipeline/scripts/pre-commit-check.sh +25 -4
- package/pipeline/scripts/pre-push-check.sh +3 -0
- package/pipeline/scripts/repo-recommend.mjs +321 -0
- package/pipeline/scripts/rework-rulings.mjs +5 -3
- package/pipeline/scripts/scan-agent-config.sh +1 -2
- package/pipeline/scripts/scope-check-gate.mjs +15 -2
- package/pipeline/scripts/security-evidence-gate.mjs +282 -0
- package/pipeline/scripts/unattended_policy.py +3 -2
- package/pipeline/scripts/user-test-handoff.sh +203 -0
- package/pipeline/scripts/validate-analysis-doc.mjs +17 -1
- package/pipeline/scripts/validate-planning.mjs +5 -3
- package/pipeline/scripts/validate-triage.mjs +2 -1
- package/pipeline/scripts/write-state.mjs +13 -4
- package/pipeline/skills/.skill-manifest.json +73 -69
- package/pipeline/skills/shared/README.md +41 -40
- package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +6 -6
- package/pipeline/skills/shared/core/apple-archive-compliance/references/examples.md +1 -1
- package/pipeline/skills/shared/core/apple-archive-compliance/references/version-history.md +1 -1
- package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +1 -1
- package/pipeline/skills/shared/core/google-play-compliance/references/notes.md +1 -1
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +0 -1
- package/pipeline/skills/shared/core/multi-agent-complaint-analysis/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +5 -5
- package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +10 -0
- package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +12 -7
- package/pipeline/skills/shared/core/multi-agent-research/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-search/SKILL.md +9 -0
- package/pipeline/skills/shared/core/multi-agent-security-review/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -0
- package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +4 -3
- package/pipeline/skills/shared/core/multi-agent-test/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-accessibility/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-dark-mode/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-dynamic-type/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-screenshots/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-testflight-validation/SKILL.md +2 -2
- package/pipeline/skills/shared/external/accessibility-compliance-accessibility-audit/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/agent-introspection-debugging/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/android-architecture/SKILL.md +1 -1
- package/pipeline/skills/shared/external/android-architecture/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/android-build-quality-gates/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/android-datastore/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/android-design-tokens-codegen/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/android-jetpack-compose-expert/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/android-mvi-viewmodel/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/android-performance/SKILL.md +1 -1
- package/pipeline/skills/shared/external/android-performance/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/android-security/SKILL.md +1 -1
- package/pipeline/skills/shared/external/android-security/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/api-patterns/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/api-security-best-practices/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/app-store-changelog/SKILL.md +65 -49
- package/pipeline/skills/shared/external/app-store-changelog/evals/evals.json +40 -0
- package/pipeline/skills/shared/external/app-store-changelog/references/release-notes-guidelines.md +64 -34
- package/pipeline/skills/shared/external/app-store-changelog/scripts/collect_release_changes.sh +21 -23
- package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +4 -1
- package/pipeline/skills/shared/external/app-store-review/SKILL.md +6 -0
- package/pipeline/skills/shared/external/architecture/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/backlog/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/ci-cd-pipelines/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/clean-code/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/compose-components/SKILL.md +1 -1
- package/pipeline/skills/shared/external/compose-components/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/compose-navigation/SKILL.md +1 -1
- package/pipeline/skills/shared/external/compose-navigation/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/compose-testing/SKILL.md +1 -1
- package/pipeline/skills/shared/external/compose-testing/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/context-compression/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/core-data/SKILL.md +1 -1
- package/pipeline/skills/shared/external/council/evals/evals.json +41 -0
- package/pipeline/skills/shared/external/css-modern/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/css-modern/references/code-examples.md +5 -0
- package/pipeline/skills/shared/external/database-patterns/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/database-patterns/references/orm-examples.md +5 -0
- package/pipeline/skills/shared/external/debugging-strategies/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/docker-expert/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/e2e-testing/SKILL.md +21 -21
- package/pipeline/skills/shared/external/e2e-testing/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/e2e-testing/references/document-fixtures.md +5 -5
- package/pipeline/skills/shared/external/evidence-github/evals/evals.json +41 -0
- package/pipeline/skills/shared/external/evidence-registry/SKILL.md +1 -1
- package/pipeline/skills/shared/external/evidence-registry/evals/evals.json +41 -0
- package/pipeline/skills/shared/external/fastapi-pro/evals/evals.json +57 -0
- package/pipeline/skills/shared/external/firebase/SKILL.md +132 -54
- package/pipeline/skills/shared/external/firebase/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/firebase/references/functions-and-products.md +51 -0
- package/pipeline/skills/shared/external/firebase/references/security-rules.md +59 -0
- package/pipeline/skills/shared/external/fix-review-verdicts/evals/evals.json +57 -0
- package/pipeline/skills/shared/external/free-llm-apis/SKILL.md +70 -0
- package/pipeline/skills/shared/external/free-llm-apis/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/free-llm-apis/references/providers.md +33 -0
- package/pipeline/skills/shared/external/github-actions-templates/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/gradle-kotlin-dsl/SKILL.md +1 -1
- package/pipeline/skills/shared/external/gradle-kotlin-dsl/evals/evals.json +58 -0
- package/pipeline/skills/shared/external/handle-request/SKILL.md +2 -2
- package/pipeline/skills/shared/external/handle-request/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/hig-app-icons/SKILL.md +2 -2
- package/pipeline/skills/shared/external/hig-app-icons/references/icon-workflow.md +1 -1
- package/pipeline/skills/shared/external/hig-components-content/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/hig-components-status/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/hig-components-system/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/hig-inputs/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/hig-patterns/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/hig-platforms/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/hig-technologies/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/html-semantic/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/humanizer/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/ios-coding-standard/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/ios-debugger-agent/SKILL.md +91 -52
- package/pipeline/skills/shared/external/ios-debugger-agent/evals/evals.json +41 -0
- package/pipeline/skills/shared/external/ios-design-review/SKILL.md +12 -12
- package/pipeline/skills/shared/external/ios-design-review/references/appearance-matrix.md +16 -16
- package/pipeline/skills/shared/external/ios-design-review/references/checklist.md +1 -1
- package/pipeline/skills/shared/external/ios-iphone-duo/SKILL.md +0 -1
- package/pipeline/skills/shared/external/ios-module-structure/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/ios-security/SKILL.md +1 -1
- package/pipeline/skills/shared/external/ios-security/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/kotlin-coroutines-expert/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/localization-reuse-map/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/macos-menubar-tuist-app/SKILL.md +170 -74
- package/pipeline/skills/shared/external/macos-menubar-tuist-app/evals/evals.json +52 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/SKILL.md +119 -77
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Package.swift +5 -5
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Sources/MyApp/MyApp.swift +24 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/version.env +2 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/build_icon.sh +46 -39
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/compile_and_run.sh +70 -49
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/launch.sh +24 -17
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/make_appcast.sh +74 -59
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/package_app.sh +201 -170
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/setup_dev_signing.sh +50 -42
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/sign-and-notarize.sh +65 -35
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/version.env +2 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/references/packaging.md +49 -17
- package/pipeline/skills/shared/external/macos-spm-app-packaging/references/release.md +48 -23
- package/pipeline/skills/shared/external/macos-spm-app-packaging/references/scaffold.md +74 -44
- package/pipeline/skills/shared/external/monorepo-architect/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +14 -3
- package/pipeline/skills/shared/external/nextjs-app-router/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/nextjs-app-router/references/app-router-examples.md +3 -0
- package/pipeline/skills/shared/external/nodejs-backend-patterns/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/observability-engineer/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +10 -0
- package/pipeline/skills/shared/external/photos-camera-media/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/play-store-review/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/python-patterns/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/react-best-practices/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/rest-api-design/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/retrofit-networking/SKILL.md +1 -1
- package/pipeline/skills/shared/external/retrofit-networking/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/room-database/SKILL.md +1 -1
- package/pipeline/skills/shared/external/room-database/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/scenario-gap-analysis/SKILL.md +1 -1
- package/pipeline/skills/shared/external/scenario-gap-analysis/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/search-first/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/security-review/SKILL.md +14 -3
- package/pipeline/skills/shared/external/security-review/evals/evals.json +48 -0
- package/pipeline/skills/shared/external/security-review/references/agentic-systems.md +93 -0
- package/pipeline/skills/shared/external/security-review/references/firebase-rules.md +100 -0
- package/pipeline/skills/shared/external/security-review/references/graphql.md +82 -0
- package/pipeline/skills/shared/external/security-review/references/llm-prompt-injection.md +93 -0
- package/pipeline/skills/shared/external/security-review/references/oauth-oidc.md +100 -0
- package/pipeline/skills/shared/external/security-review/references/owasp-mobile-top10-2024.md +1 -1
- package/pipeline/skills/shared/external/security-review/references/owasp-web-api-top10-2021.md +1 -1
- package/pipeline/skills/shared/external/security-review/references/supabase.md +73 -0
- package/pipeline/skills/shared/external/signal-community/SKILL.md +29 -10
- package/pipeline/skills/shared/external/signal-community/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/skill-creator/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/skill-creator/template.md +1 -3
- package/pipeline/skills/shared/external/spm-build-analysis/SKILL.md +80 -61
- package/pipeline/skills/shared/external/spm-build-analysis/evals/evals.json +56 -0
- package/pipeline/skills/shared/external/spm-build-analysis/references/build-optimization-sources.md +83 -133
- package/pipeline/skills/shared/external/spm-build-analysis/references/recommendation-format.md +41 -40
- package/pipeline/skills/shared/external/spm-build-analysis/references/spm-analysis-checks.md +89 -87
- package/pipeline/skills/shared/external/spm-build-analysis/scripts/check_spm_pins.py +90 -85
- package/pipeline/skills/shared/external/swift-concurrency-expert/SKILL.md +78 -69
- package/pipeline/skills/shared/external/swift-concurrency-expert/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/swift-concurrency-expert/references/approachable-concurrency.md +52 -48
- package/pipeline/skills/shared/external/swift-concurrency-expert/references/swift-6-2-concurrency.md +118 -184
- package/pipeline/skills/shared/external/swift-concurrency-expert/references/swiftui-concurrency-tour-wwdc.md +68 -22
- package/pipeline/skills/shared/external/swift-concurrency-pro/SKILL.md +117 -94
- package/pipeline/skills/shared/external/swift-concurrency-pro/evals/evals.json +57 -0
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/actors.md +102 -97
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/async-streams.md +36 -37
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/bridging.md +82 -34
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/bug-patterns.md +90 -52
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/cancellation.md +55 -55
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/diagnostics.md +66 -43
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/hotspots.md +39 -23
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/interop.md +66 -68
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/new-features.md +152 -131
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/structured.md +60 -57
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/testing.md +131 -118
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/unstructured.md +37 -29
- package/pipeline/skills/shared/external/swift-formatstyle/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/swift-testing-pro/SKILL.md +77 -58
- package/pipeline/skills/shared/external/swift-testing-pro/evals/evals.json +59 -0
- package/pipeline/skills/shared/external/swift-testing-pro/references/async-tests.md +139 -144
- package/pipeline/skills/shared/external/swift-testing-pro/references/core-rules.md +90 -28
- package/pipeline/skills/shared/external/swift-testing-pro/references/migrating-from-xctest.md +38 -21
- package/pipeline/skills/shared/external/swift-testing-pro/references/new-features.md +139 -156
- package/pipeline/skills/shared/external/swift-testing-pro/references/writing-better-tests.md +173 -147
- package/pipeline/skills/shared/external/swiftdata-pro/SKILL.md +75 -59
- package/pipeline/skills/shared/external/swiftdata-pro/evals/evals.json +50 -0
- package/pipeline/skills/shared/external/swiftdata-pro/references/cloudkit.md +34 -7
- package/pipeline/skills/shared/external/swiftdata-pro/references/indexing.md +20 -14
- package/pipeline/skills/shared/external/swiftdata-pro/references/inheritance.md +127 -0
- package/pipeline/skills/shared/external/swiftdata-pro/references/model-rules.md +141 -0
- package/pipeline/skills/shared/external/swiftdata-pro/references/predicates.md +37 -44
- package/pipeline/skills/shared/external/swiftlint/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-expert-skill/SKILL.md +89 -88
- package/pipeline/skills/shared/external/swiftui-expert-skill/evals/evals.json +55 -0
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/accessibility-patterns.md +104 -122
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-advanced.md +73 -93
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-basics.md +144 -169
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-transitions.md +122 -133
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/charts-accessibility.md +141 -99
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/charts.md +273 -333
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/image-optimization.md +105 -128
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/latest-apis.md +199 -312
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/layout-best-practices.md +129 -169
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/liquid-glass.md +17 -30
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/list-patterns.md +198 -258
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-scenes.md +145 -218
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-views.md +150 -249
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-window-styling.md +109 -208
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/performance-patterns.md +225 -271
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/scroll-patterns.md +117 -210
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/sheet-navigation-patterns.md +171 -237
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/state-management.md +196 -260
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/view-structure.md +167 -230
- package/pipeline/skills/shared/external/swiftui-gestures/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/swiftui-layout-components/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/swiftui-navigation/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +1 -2
- package/pipeline/skills/shared/external/swiftui-patterns/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/swiftui-performance/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/SKILL.md +71 -79
- package/pipeline/skills/shared/external/swiftui-performance-audit/evals/evals.json +55 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/audit-layout.md +50 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/capture-checklist.md +51 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/hangs.md +34 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/instruments-guide.md +68 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/smell-catalog.md +191 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/update-model.md +69 -0
- package/pipeline/skills/shared/external/swiftui-pro/SKILL.md +65 -63
- package/pipeline/skills/shared/external/swiftui-pro/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/swiftui-pro/references/accessibility.md +40 -13
- package/pipeline/skills/shared/external/swiftui-pro/references/api.md +74 -29
- package/pipeline/skills/shared/external/swiftui-pro/references/data.md +44 -24
- package/pipeline/skills/shared/external/swiftui-pro/references/design.md +45 -31
- package/pipeline/skills/shared/external/swiftui-pro/references/hygiene.md +17 -8
- package/pipeline/skills/shared/external/swiftui-pro/references/navigation.md +19 -9
- package/pipeline/skills/shared/external/swiftui-pro/references/performance.md +50 -34
- package/pipeline/skills/shared/external/swiftui-pro/references/swift.md +73 -45
- package/pipeline/skills/shared/external/swiftui-pro/references/views.md +48 -23
- package/pipeline/skills/shared/external/swiftui-ui-patterns/SKILL.md +89 -83
- package/pipeline/skills/shared/external/swiftui-ui-patterns/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/app-wiring.md +119 -114
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/async-state.md +76 -61
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/components-index.md +63 -46
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/controls.md +32 -31
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/deeplinks.md +49 -38
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/focus.md +77 -49
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/form.md +61 -44
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/grids.md +40 -42
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/input-toolbar.md +44 -31
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/lightweight-clients.md +90 -64
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/list.md +48 -49
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/loading-placeholders.md +36 -25
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/macos-settings.md +30 -30
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/matched-transitions.md +49 -32
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/media.md +49 -41
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/menu-bar.md +52 -48
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/navigationstack.md +119 -104
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/overlay.md +30 -27
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/performance.md +33 -31
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/previews.md +27 -27
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/scroll-reveal.md +79 -86
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/scrollview.md +47 -40
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/searchable.md +55 -40
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/sheets.md +113 -84
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/split-views.md +37 -34
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/tabview.md +75 -75
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/theming.md +37 -32
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/title-menus.md +41 -51
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/top-bar.md +46 -30
- package/pipeline/skills/shared/external/swiftui-uikit-interop/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-view-refactor/SKILL.md +152 -121
- package/pipeline/skills/shared/external/swiftui-view-refactor/evals/evals.json +56 -0
- package/pipeline/skills/shared/external/swiftui-view-refactor/references/mv-patterns.md +107 -98
- package/pipeline/skills/shared/external/swiftui-webkit/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/tailwind-css/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/test-result-triage/SKILL.md +2 -2
- package/pipeline/skills/shared/external/test-result-triage/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/testing-backend/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/tipkit/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/typescript-patterns/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/valven-rules/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/vision-framework/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/vue-composition/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/weatherkit/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/web-accessibility/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/web-performance/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/web-testing/SKILL.md +2 -2
- package/pipeline/skills/shared/external/web-testing/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/web-testing/references/testing-examples.md +2 -2
- package/pipeline/skills/shared/external/widgetkit/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/xcode-build-benchmark/SKILL.md +61 -55
- package/pipeline/skills/shared/external/xcode-build-benchmark/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/xcode-build-benchmark/references/benchmark-artifacts.md +69 -67
- package/pipeline/skills/shared/external/xcode-build-benchmark/references/benchmarking-workflow.md +39 -47
- package/pipeline/skills/shared/external/xcode-build-benchmark/schemas/build-benchmark.schema.json +72 -154
- package/pipeline/skills/shared/external/xcode-build-benchmark/scripts/benchmark_builds.py +207 -245
- package/pipeline/skills/shared/external/xcode-build-fixer/SKILL.md +145 -139
- package/pipeline/skills/shared/external/xcode-build-fixer/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/xcode-build-fixer/references/build-settings-best-practices.md +81 -175
- package/pipeline/skills/shared/external/xcode-build-fixer/references/fix-patterns.md +188 -143
- package/pipeline/skills/shared/external/xcode-build-fixer/references/recommendation-format.md +41 -40
- package/pipeline/skills/shared/external/xcode-build-fixer/scripts/benchmark_builds.py +207 -245
- package/pipeline/skills/shared/external/xcode-build-orchestrator/SKILL.md +107 -98
- package/pipeline/skills/shared/external/xcode-build-orchestrator/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/xcode-build-orchestrator/references/benchmark-artifacts.md +69 -67
- package/pipeline/skills/shared/external/xcode-build-orchestrator/references/build-settings-best-practices.md +81 -175
- package/pipeline/skills/shared/external/xcode-build-orchestrator/references/orchestration-report-template.md +81 -69
- package/pipeline/skills/shared/external/xcode-build-orchestrator/references/recommendation-format.md +41 -40
- package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/benchmark_builds.py +207 -245
- package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/diagnose_compilation.py +155 -210
- package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/generate_optimization_report.py +355 -480
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/SKILL.md +70 -69
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/build-optimization-sources.md +83 -133
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/code-compilation-checks.md +85 -73
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/recommendation-format.md +41 -40
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/scripts/diagnose_compilation.py +155 -210
- package/pipeline/skills/shared/external/xcode-project-analyzer/SKILL.md +54 -52
- package/pipeline/skills/shared/external/xcode-project-analyzer/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/xcode-project-analyzer/references/build-optimization-sources.md +83 -133
- package/pipeline/skills/shared/external/xcode-project-analyzer/references/build-settings-best-practices.md +81 -175
- package/pipeline/skills/shared/external/xcode-project-analyzer/references/project-audit-checks.md +115 -83
- package/pipeline/skills/shared/external/xcode-project-analyzer/references/recommendation-format.md +41 -40
- package/pipeline/scripts/_notices.mjs +0 -171
- package/pipeline/skills/shared/external/NOTICE-avdlee-swiftui-agent-skill.md +0 -48
- package/pipeline/skills/shared/external/NOTICE-dimillian-skills.md +0 -63
- package/pipeline/skills/shared/external/NOTICE-paul-hudson-skills.md +0 -54
- package/pipeline/skills/shared/external/NOTICE-vibeship-spawner-skills.md +0 -203
- package/pipeline/skills/shared/external/NOTICE-xcode-build-skills.md +0 -60
- package/pipeline/skills/shared/external/ios-iphone-duo/NOTICE.md +0 -53
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Sources/MyApp/main.swift +0 -11
- package/pipeline/skills/shared/external/swiftdata-pro/references/class-inheritance.md +0 -104
- package/pipeline/skills/shared/external/swiftdata-pro/references/core-rules.md +0 -20
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/code-smells.md +0 -158
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/demystify-swiftui-performance-wwdc23.md +0 -46
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/optimizing-swiftui-performance-instruments.md +0 -29
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/profiling-intake.md +0 -44
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/report-template.md +0 -47
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/understanding-hangs-in-your-app.md +0 -33
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/understanding-improving-swiftui-performance.md +0 -52
|
@@ -1,39 +1,84 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
# Modern API replacements
|
|
2
|
+
|
|
3
|
+
Each row names an older call and what replaces it. Any occurrence of the left
|
|
4
|
+
column is a finding.
|
|
5
|
+
|
|
6
|
+
| Older or discouraged | Use instead |
|
|
7
|
+
|----------------------|-------------|
|
|
8
|
+
| `foregroundColor()` | `foregroundStyle()` |
|
|
9
|
+
| `cornerRadius()` | `clipShape(.rect(cornerRadius:))` |
|
|
10
|
+
| `tabItem()` | the `Tab` API |
|
|
11
|
+
| one-parameter `onChange()` | the two-parameter or zero-parameter variant |
|
|
12
|
+
| `overlay(_:alignment:)` (deprecated), e.g. `.overlay(Badge())` | `overlay(alignment:content:)`, e.g. `.overlay { Badge() }` |
|
|
13
|
+
| `.navigationBarLeading` / `.navigationBarTrailing` toolbar placement (deprecated) | `.topBarLeading` / `.topBarTrailing` |
|
|
14
|
+
| `ScrollView(showsIndicators: false)` | `.scrollIndicators(.hidden)` |
|
|
15
|
+
| `UIImpactFeedbackGenerator` and other UIKit haptics | `sensoryFeedback()` |
|
|
16
|
+
| `Image("logo")` string lookup | `Image(.logo)` generated asset symbols, when the project enables them |
|
|
17
|
+
| `WKWebView` wrapped in `UIViewRepresentable` | native `WebView` on iOS 26 and later (needs `import WebKit`) |
|
|
18
|
+
|
|
19
|
+
## Layout without GeometryReader
|
|
20
|
+
|
|
21
|
+
`GeometryReader` is a finding whenever a newer tool does the job:
|
|
22
|
+
`containerRelativeFrame()`, `visualEffect()` or a custom `Layout`. Name the
|
|
23
|
+
alternative in the report.
|
|
24
|
+
|
|
25
|
+
## Custom environment and container keys
|
|
26
|
+
|
|
27
|
+
Define keys for `EnvironmentValues`, `FocusValues`, `Transaction` and
|
|
28
|
+
`ContainerValues` with the `@Entry` macro. It replaces the old two-step
|
|
29
|
+
pattern of a type conforming to `EnvironmentKey` (or similar) with a
|
|
30
|
+
`defaultValue`, plus a computed property in an extension.
|
|
21
31
|
|
|
22
32
|
```swift
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
extension EnvironmentValues {
|
|
34
|
+
@Entry var accentPalette: Palette = .standard
|
|
35
|
+
}
|
|
26
36
|
```
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
## Shapes
|
|
39
|
+
|
|
40
|
+
Filling and stroking a shape needs two chained modifiers, not an overlay for
|
|
41
|
+
the stroke. The overlay workaround stopped being necessary in iOS 17.
|
|
29
42
|
|
|
30
43
|
```swift
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
Capsule()
|
|
45
|
+
.fill(.orange)
|
|
46
|
+
.stroke(.brown, lineWidth: 3)
|
|
34
47
|
```
|
|
35
48
|
|
|
49
|
+
## Enumerated ForEach
|
|
50
|
+
|
|
51
|
+
Pass the enumerated sequence straight in, without wrapping it in an array
|
|
52
|
+
first: `ForEach(players.enumerated(), id: \.element.id) { index, player in ... }`.
|
|
53
|
+
|
|
54
|
+
## Pluralization
|
|
55
|
+
|
|
56
|
+
For English, French, German, Portuguese, Spanish and Italian, let automatic
|
|
57
|
+
grammar agreement handle plurals:
|
|
58
|
+
|
|
59
|
+
```swift
|
|
60
|
+
Text("^[\(unreadCount) message](inflect: true)")
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Text concatenation
|
|
64
|
+
|
|
65
|
+
Joining `Text` values with `+` is deprecated and a finding. Interpolate styled
|
|
66
|
+
`Text` values instead.
|
|
67
|
+
|
|
68
|
+
```swift
|
|
69
|
+
// Finding
|
|
70
|
+
Text("Total: ").bold()
|
|
71
|
+
+
|
|
72
|
+
Text(priceLabel).foregroundStyle(.green)
|
|
73
|
+
|
|
74
|
+
// Fix
|
|
75
|
+
let caption = Text("Total: ").bold()
|
|
76
|
+
let amount = Text(priceLabel).foregroundStyle(.green)
|
|
77
|
+
Text("\(caption)\(amount)")
|
|
78
|
+
```
|
|
36
79
|
|
|
37
|
-
##
|
|
80
|
+
## ObservableObject and Combine
|
|
38
81
|
|
|
39
|
-
|
|
82
|
+
When `ObservableObject` genuinely cannot be avoided (a Combine-based debounce
|
|
83
|
+
pipeline is the typical case), the file must `import Combine` itself. SwiftUI
|
|
84
|
+
no longer re-exports it.
|
|
@@ -1,43 +1,63 @@
|
|
|
1
|
-
# Data flow
|
|
2
|
-
|
|
3
|
-
It is important that SwiftUI body code and logic code be kept separate in order to make code easier to read, write, and maintain. That usually means placing code into methods rather than inline in the `body` property, but often also means carving functionality out into separate `@Observable` classes.
|
|
4
|
-
|
|
5
|
-
These rules help ensure code is efficient and works well in the long term.
|
|
1
|
+
# Data flow and state
|
|
6
2
|
|
|
3
|
+
Keep layout and logic apart. The `body` describes the screen; behaviour lives
|
|
4
|
+
in methods and, for anything substantial, in `@Observable` classes. Code
|
|
5
|
+
written that way is easier to read, change and test.
|
|
7
6
|
|
|
8
7
|
## Shared state
|
|
9
8
|
|
|
10
|
-
- `@Observable`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
- Every `@Observable` class needs `@MainActor`, unless the project already
|
|
10
|
+
sets Main Actor as its default actor isolation. A missing annotation is a
|
|
11
|
+
finding.
|
|
12
|
+
- Shared data lives in `@Observable` classes. The owning view holds it in
|
|
13
|
+
`@State`; descendants receive it through `@Bindable` or `@Environment`.
|
|
14
|
+
- `ObservableObject`, `@Published`, `@StateObject`, `@ObservedObject` and
|
|
15
|
+
`@EnvironmentObject` are to be avoided. Accept them only where nothing else
|
|
16
|
+
works, or in legacy and integration code where moving away would be costly.
|
|
14
17
|
|
|
15
18
|
## Local state
|
|
16
19
|
|
|
17
|
-
- `@State`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
- `@State` properties are `private` and belong only to the view that created
|
|
21
|
+
them.
|
|
22
|
+
- `@State` can also act as a cache for a class instance that is costly to
|
|
23
|
+
build, such as a `CIContext`, even though that class is not observable.
|
|
24
|
+
The instance persists across body evaluations and no change tracking
|
|
25
|
+
happens.
|
|
20
26
|
|
|
21
27
|
## Bindings
|
|
22
28
|
|
|
23
|
-
-
|
|
24
|
-
|
|
29
|
+
- A `Binding(get:set:)` built inside the body is a finding. Bind to a
|
|
30
|
+
property from `@State`, `@Binding` or `@Bindable`, and run side effects in
|
|
31
|
+
`onChange()`.
|
|
32
|
+
- Numeric input in a `TextField` binds to a number (`Int`, `Double`) through
|
|
33
|
+
the `format` initializer, plus the matching keyboard. The keyboard modifier
|
|
34
|
+
on its own is not enough.
|
|
25
35
|
|
|
36
|
+
```swift
|
|
37
|
+
TextField("Servings", value: $servings, format: .number)
|
|
38
|
+
.keyboardType(.numberPad)
|
|
26
39
|
|
|
27
|
-
|
|
40
|
+
TextField("Weight (kg)", value: $weight, format: .number)
|
|
41
|
+
.keyboardType(.decimalPad)
|
|
42
|
+
```
|
|
28
43
|
|
|
29
|
-
|
|
30
|
-
- Never attempt to use `@AppStorage` inside an `@Observable` class, even if marked `@ObservationIgnored` - it will *not* trigger view updates when a change happens.
|
|
44
|
+
## Model types
|
|
31
45
|
|
|
46
|
+
- Conform model structs to `Identifiable` instead of passing
|
|
47
|
+
`id: \.someProperty` at each call site.
|
|
48
|
+
- `@AppStorage` inside an `@Observable` class does not work, even with
|
|
49
|
+
`@ObservationIgnored`: changes never refresh the views. Flag it.
|
|
32
50
|
|
|
33
51
|
## SwiftData
|
|
34
52
|
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
- When only a count of matching rows is needed, `ModelContext.fetchCount()`
|
|
54
|
+
with a `FetchDescriptor` is an option. It does not refresh by itself when
|
|
55
|
+
data changes; something else, such as a `@Query`, must trigger the update.
|
|
56
|
+
Use it with care.
|
|
57
|
+
- For deeper SwiftData work, point to the swiftdata-pro skill.
|
|
38
58
|
|
|
39
|
-
|
|
59
|
+
### SwiftData backed by CloudKit
|
|
40
60
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
61
|
+
- No `@Attribute(.unique)` anywhere.
|
|
62
|
+
- Every model property has a default value or is optional.
|
|
63
|
+
- Every relationship is optional.
|
|
@@ -1,31 +1,45 @@
|
|
|
1
|
-
# Design
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
1
|
+
# Design checks
|
|
2
|
+
|
|
3
|
+
## One source for design values
|
|
4
|
+
|
|
5
|
+
Fonts, sizes, colors, stack spacing, padding, corner radii, animation timings
|
|
6
|
+
and similar values belong in a shared enum of constants that every view
|
|
7
|
+
reads. The app then looks consistent and can be retuned in one place.
|
|
8
|
+
|
|
9
|
+
## Flexible layout
|
|
10
|
+
|
|
11
|
+
- Reading `UIScreen.main.bounds` for available space is a finding. Use
|
|
12
|
+
`containerRelativeFrame()` or `visualEffect()`, and `GeometryReader` only
|
|
13
|
+
when neither fits.
|
|
14
|
+
- Fixed frames break across device sizes and Dynamic Type settings. Keep them
|
|
15
|
+
for content that is certain to fit, and otherwise give the frame room to
|
|
16
|
+
grow.
|
|
17
|
+
- Every interactive element on iOS needs a hit area of at least 44x44 points,
|
|
18
|
+
Apple's minimum. Enforce it strictly.
|
|
19
|
+
|
|
20
|
+
## System components first
|
|
21
|
+
|
|
22
|
+
- Empty or missing data is shown with `ContentUnavailableView`, not a custom
|
|
23
|
+
placeholder.
|
|
24
|
+
- Under `searchable()`, `ContentUnavailableView.search` already includes the
|
|
25
|
+
query the user typed. Passing the text yourself, as in
|
|
26
|
+
`ContentUnavailableView.search(text: query)`, is unnecessary.
|
|
27
|
+
- An icon beside a piece of text is a `Label`, not an `HStack`.
|
|
28
|
+
- Use hierarchical styles (`.secondary`, `.tertiary`) rather than lowering
|
|
29
|
+
opacity by hand, so the system adapts them to context.
|
|
30
|
+
- Inside a `Form`, wrap controls such as `Slider` in `LabeledContent` so title
|
|
31
|
+
and control line up.
|
|
32
|
+
- `RoundedRectangle` already defaults to `.continuous` corners; spelling it out
|
|
33
|
+
adds nothing.
|
|
34
|
+
|
|
35
|
+
## Type and color
|
|
36
|
+
|
|
37
|
+
- Prefer `bold()` to `fontWeight(.bold)`; `bold()` lets the system pick the
|
|
38
|
+
right weight for the context.
|
|
39
|
+
- Other weights such as `.medium` or `.semibold` need a real reason. Scattering
|
|
40
|
+
them around works against a consistent look.
|
|
41
|
+
- Hard-coded padding and stack spacing are a finding unless the user asked for
|
|
42
|
+
specific values.
|
|
43
|
+
- `UIColor` does not belong in SwiftUI code. Use `Color` or asset catalog colors.
|
|
44
|
+
- `.caption2` is very small and usually best avoided; `.caption` is also small
|
|
45
|
+
and should be used sparingly.
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
# Hygiene
|
|
1
|
+
# Hygiene checks
|
|
2
2
|
|
|
3
|
-
-
|
|
4
|
-
-
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
3
|
+
- Secrets such as API keys stay out of the repository.
|
|
4
|
+
- Logic that is not obvious from the code itself carries a comment or a
|
|
5
|
+
documentation comment.
|
|
6
|
+
- Core app logic has unit tests. UI tests are reserved for what unit tests
|
|
7
|
+
cannot reach.
|
|
8
|
+
- `@AppStorage` never holds usernames, passwords or anything else sensitive;
|
|
9
|
+
that goes in the keychain.
|
|
10
|
+
- When SwiftLint is set up, it reports zero warnings and zero errors.
|
|
11
|
+
- In a project with `Localizable.xcstrings`, add user-facing strings to the
|
|
12
|
+
catalog under symbol keys (for example `welcomeTitle`) with
|
|
13
|
+
`extractionState` set to `manual`, and read them through generated symbols
|
|
14
|
+
such as `Text(.welcomeTitle)`. Offer to translate new keys into every
|
|
15
|
+
language the project supports.
|
|
16
|
+
- When the Xcode MCP server is available, use its tools ahead of generic ones:
|
|
17
|
+
`RenderPreview` captures rendered SwiftUI previews for inspection and
|
|
18
|
+
`DocumentationSearch` looks up current Apple documentation.
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
# Navigation and presentation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
- Strongly prefer to use `navigationDestination(for:)` to specify destinations; flag all use of the old `NavigationLink(destination:)` pattern where it should be replaced.
|
|
5
|
-
- Never mix `navigationDestination(for:)` and `NavigationLink(destination:)` in the same navigation hierarchy; it causes significant problems.
|
|
6
|
-
- `navigationDestination(for:)` must be registered once per data type; flag duplicates.
|
|
3
|
+
## Stacks and destinations
|
|
7
4
|
|
|
5
|
+
- `NavigationView` is deprecated; any use is a finding. Replace it with
|
|
6
|
+
`NavigationStack` or `NavigationSplitView`, whichever fits.
|
|
7
|
+
- Destinations are declared with `navigationDestination(for:)`. The older
|
|
8
|
+
`NavigationLink(destination:)` form is a finding wherever it can be replaced.
|
|
9
|
+
- One hierarchy must not mix `navigationDestination(for:)` with
|
|
10
|
+
`NavigationLink(destination:)`; the combination causes serious problems.
|
|
11
|
+
- Each data type gets exactly one `navigationDestination(for:)` registration.
|
|
12
|
+
Duplicates are a finding.
|
|
8
13
|
|
|
9
|
-
##
|
|
14
|
+
## Sheets, alerts and dialogs
|
|
10
15
|
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
16
|
+
- Attach `confirmationDialog()` to the control that opens it, so the Liquid
|
|
17
|
+
Glass animation starts from the right place.
|
|
18
|
+
- An alert whose only button is an "OK" that just dismisses can drop the
|
|
19
|
+
button entirely: `.alert("Saved", isPresented: $showsSavedAlert) { }`.
|
|
20
|
+
- A sheet that presents an optional value uses `sheet(item:)` rather than
|
|
21
|
+
`sheet(isPresented:)`, so the value is unwrapped safely.
|
|
22
|
+
- When the presented view takes the item as its only initializer argument,
|
|
23
|
+
pass the initializer directly: `sheet(item: $editingNote, content: NoteEditor.init)`
|
|
24
|
+
instead of `sheet(item: $editingNote) { note in NoteEditor(note: note) }`.
|
|
@@ -1,46 +1,62 @@
|
|
|
1
|
-
# Performance
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Example:
|
|
1
|
+
# Performance checks
|
|
2
|
+
|
|
3
|
+
## View identity and structure
|
|
4
|
+
|
|
5
|
+
- To switch a modifier value, use a ternary rather than an `if`/`else` that
|
|
6
|
+
produces two view branches. The branch form creates `_ConditionalContent`,
|
|
7
|
+
loses structural identity and keeps rebuilding the underlying platform views.
|
|
8
|
+
- `AnyView` is a last resort. `@ViewBuilder`, `Group` or generics usually do
|
|
9
|
+
the job.
|
|
10
|
+
- Split large views into dedicated `View` structs. Computed properties or
|
|
11
|
+
methods returning views, even marked `@ViewBuilder`, do not give the same
|
|
12
|
+
benefit.
|
|
13
|
+
- Do not keep an escaping `@ViewBuilder` closure as a stored property. Store
|
|
14
|
+
the built view instead and let the synthesized initializer call the builder.
|
|
17
15
|
|
|
18
16
|
```swift
|
|
19
|
-
//
|
|
20
|
-
struct
|
|
21
|
-
let
|
|
17
|
+
// Finding: keeps the closure around and calls it on every body pass.
|
|
18
|
+
struct Panel<Body: View>: View {
|
|
19
|
+
let makeContent: () -> Body
|
|
22
20
|
|
|
23
21
|
var body: some View {
|
|
24
|
-
VStack(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.padding()
|
|
28
|
-
.background(.ultraThinMaterial)
|
|
29
|
-
.clipShape(.rect(cornerRadius: 8))
|
|
22
|
+
VStack(spacing: 8) { makeContent() }
|
|
23
|
+
.padding()
|
|
24
|
+
.background(.regularMaterial, in: .rect(cornerRadius: 12))
|
|
30
25
|
}
|
|
31
26
|
}
|
|
32
27
|
|
|
33
|
-
//
|
|
34
|
-
struct
|
|
35
|
-
@ViewBuilder let content:
|
|
28
|
+
// Fix: the stored value is the built view.
|
|
29
|
+
struct Panel<Body: View>: View {
|
|
30
|
+
@ViewBuilder let content: Body
|
|
36
31
|
|
|
37
32
|
var body: some View {
|
|
38
|
-
VStack(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
.padding()
|
|
42
|
-
.background(.ultraThinMaterial)
|
|
43
|
-
.clipShape(.rect(cornerRadius: 8))
|
|
33
|
+
VStack(spacing: 8) { content }
|
|
34
|
+
.padding()
|
|
35
|
+
.background(.regularMaterial, in: .rect(cornerRadius: 12))
|
|
44
36
|
}
|
|
45
37
|
}
|
|
46
38
|
```
|
|
39
|
+
|
|
40
|
+
## Work done too often
|
|
41
|
+
|
|
42
|
+
- View initializers stay small and cheap. Anything non-trivial that can run in
|
|
43
|
+
a `task()` modifier when the view appears is a finding.
|
|
44
|
+
- Treat `body` as something that runs constantly. Sorting, filtering and
|
|
45
|
+
similar logic that can easily move out of it should.
|
|
46
|
+
- Inline transforms in `List` or `ForEach` initializers, such as
|
|
47
|
+
`orders.filter { ... }`, are costly when re-evaluated often.
|
|
48
|
+
- Derive transformed data from the source of truth with `let`, or cache it in
|
|
49
|
+
`@State`. Cache a derived collection in `@State` only when there is explicit
|
|
50
|
+
invalidation logic, otherwise the UI goes stale.
|
|
51
|
+
- Stored formatter properties such as a `DateFormatter` are rarely needed.
|
|
52
|
+
Format inside `Text`: `Text(dueDate, format: .dateTime.day().month().year())`
|
|
53
|
+
or `Text(total, format: .currency(code: "EUR"))`.
|
|
54
|
+
|
|
55
|
+
## Scrolling and async work
|
|
56
|
+
|
|
57
|
+
- A `ScrollView` with many children uses `LazyVStack` or `LazyHStack`. Eager
|
|
58
|
+
stacks with large child counts are a finding.
|
|
59
|
+
- When the scroll view sits on an opaque, static, solid background,
|
|
60
|
+
`scrollContentBackground(.visible)` makes scroll-edge rendering cheaper.
|
|
61
|
+
- Async work starts in `task()`, not `onAppear()`, because `task()` is
|
|
62
|
+
cancelled automatically when the view goes away.
|
|
@@ -1,56 +1,84 @@
|
|
|
1
|
-
# Swift
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# Swift language checks
|
|
2
|
+
|
|
3
|
+
## Strings, numbers and dates
|
|
4
|
+
|
|
5
|
+
- Use Swift string methods ahead of Foundation ones:
|
|
6
|
+
`title.replacing("_", with: " ")` instead of
|
|
7
|
+
`replacingOccurrences(of:with:)`.
|
|
8
|
+
- Search text the user typed with `localizedStandardContains()`, not
|
|
9
|
+
`contains()` or `localizedCaseInsensitiveContains()`.
|
|
10
|
+
- C-style formatting such as `String(format: "%.1f", rating)` is a finding.
|
|
11
|
+
Use `FormatStyle`, for example
|
|
12
|
+
`Text(rating, format: .number.precision(.fractionLength(1)))`.
|
|
13
|
+
- Write `Date.now`, not `Date()`.
|
|
14
|
+
- Parse dates with the modern initializers, for example
|
|
15
|
+
`Date(timestamp, strategy: .iso8601)`.
|
|
16
|
+
- Avoid hand-written date format strings. When one is used for display, years
|
|
17
|
+
are `y`, not `yyyy`, so every locale shows the right year. Format strings for
|
|
18
|
+
API data exchange are exempt.
|
|
19
|
+
- Display people's names with `PersonNameComponents` and its formatting, not
|
|
20
|
+
`Text("\(given) \(family)")`.
|
|
21
|
+
|
|
22
|
+
## Foundation and types
|
|
23
|
+
|
|
24
|
+
- Use modern Foundation: `URL.documentsDirectory` instead of a `FileManager`
|
|
25
|
+
directory lookup, and `appending(path:)` to extend a URL.
|
|
26
|
+
- Prefer `Double` to `CGFloat`. The two bridge freely except for optionals and
|
|
27
|
+
`inout`, where `CGFloat` is still needed.
|
|
28
|
+
- Use static member lookup where it exists: `.capsule` rather than
|
|
29
|
+
`Capsule()`, `.bordered` rather than `BorderedButtonStyle()`.
|
|
30
|
+
- `import SwiftUI` already brings in UIKit or AppKit on the right platform.
|
|
31
|
+
A separate import just to use `UIImage` or `NSImage` is unnecessary.
|
|
32
|
+
- When one type is sorted with the same closure in several places, such as
|
|
33
|
+
`tracks.sorted { $0.duration < $1.duration }`, conform it to `Comparable`
|
|
34
|
+
so the ordering lives in one place.
|
|
35
|
+
- Count matches with `count(where:)`, not `filter()` followed by `.count`.
|
|
36
|
+
|
|
37
|
+
## Control flow and errors
|
|
38
|
+
|
|
39
|
+
- Force unwraps and `try!` are only acceptable for truly unrecoverable
|
|
40
|
+
failures, and even then `fatalError()` with a clear message is better.
|
|
41
|
+
Prefer `if let`, `guard let`, `??`, `try?` or `do`/`catch`.
|
|
42
|
+
- An error from a user action that is swallowed, for example only printed
|
|
43
|
+
with `print(error.localizedDescription)`, is a finding. Surface it, for
|
|
44
|
+
instance with an alert.
|
|
45
|
+
- Use the shorthand `if let session {` instead of `if let session = session {`.
|
|
46
|
+
- Single-expression functions and properties drop `return`, and `if` and
|
|
47
|
+
`switch` work as expressions for returns and assignments.
|
|
22
48
|
|
|
23
49
|
```swift
|
|
24
|
-
|
|
25
|
-
|
|
50
|
+
// Finding
|
|
51
|
+
var badgeTint: Color {
|
|
52
|
+
switch status {
|
|
53
|
+
case .active:
|
|
26
54
|
return .green
|
|
27
|
-
|
|
28
|
-
return .
|
|
55
|
+
case .paused:
|
|
56
|
+
return .orange
|
|
29
57
|
}
|
|
30
58
|
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Should be written like this:
|
|
34
59
|
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
.red
|
|
60
|
+
// Fix
|
|
61
|
+
var badgeTint: Color {
|
|
62
|
+
switch status {
|
|
63
|
+
case .active: .green
|
|
64
|
+
case .paused: .orange
|
|
41
65
|
}
|
|
42
66
|
}
|
|
43
67
|
```
|
|
44
68
|
|
|
69
|
+
## Concurrency
|
|
45
70
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
71
|
+
- When an API has both an `async` version and a completion-handler version,
|
|
72
|
+
use the `async` one.
|
|
73
|
+
- Grand Central Dispatch (`DispatchQueue.main.async()`,
|
|
74
|
+
`DispatchQueue.global()` and the rest) is a finding. Use `async`/`await`,
|
|
75
|
+
actors and `Task`.
|
|
76
|
+
- `Task.sleep(nanoseconds:)` is a finding; use `Task.sleep(for:)`.
|
|
77
|
+
- Mutable shared state not protected by an actor or `@MainActor` is a finding,
|
|
78
|
+
unless the project defaults to Main Actor isolation.
|
|
79
|
+
- Assume strict concurrency checking. Flag `@Sendable` violations and data
|
|
80
|
+
races.
|
|
81
|
+
- Before judging a `MainActor.run()` call, check whether the project already
|
|
82
|
+
defaults to Main Actor isolation; if so, the call may be redundant.
|
|
83
|
+
- `Task.detached()` is frequently a mistake. Examine every use closely.
|
|
84
|
+
- For deeper concurrency questions, point to the swift-concurrency-pro skill.
|