@danieljvdm/dev-kit 1.0.2 → 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/README.md +6 -6
- package/package.json +1 -1
- package/skill-sources.jsonc +2 -33
- package/skill-sources.lock.json +15 -117
- package/skills/animate/LICENSE +21 -0
- package/skills/animate/NOTICE +10 -0
- package/skills/animate/SKILL.md +34 -0
- package/skills/animate/references/gestures.md +27 -0
- package/skills/animate/references/glossary.md +136 -0
- package/skills/animate/references/implementation.md +22 -0
- package/skills/animate/references/opportunities.md +18 -0
- package/skills/animate/references/principles.md +48 -0
- package/skills/animate/references/review.md +19 -0
- package/skills/cloudflare-workers/LICENSE +202 -0
- package/skills/cloudflare-workers/NOTICE +9 -0
- package/skills/cloudflare-workers/SKILL.md +26 -0
- package/skills/cloudflare-workers/references/durable-objects.md +68 -0
- package/skills/cloudflare-workers/references/sandbox.md +48 -0
- package/skills/cloudflare-workers/references/workers.md +63 -0
- package/skills/cloudflare-workers/references/wrangler.md +56 -0
- package/skills/design-ui/LICENSE +21 -0
- package/skills/design-ui/NOTICE +8 -0
- package/skills/design-ui/SKILL.md +29 -0
- package/skills/design-ui/references/appearance.md +22 -0
- package/skills/design-ui/references/components.md +33 -0
- package/skills/design-ui/references/exploration.md +50 -0
- package/skills/design-ui/references/libraries.md +39 -0
- package/skills/design-ui/references/themes.md +23 -0
- package/skills/dev-kit/SKILL.md +19 -38
- package/skills/dev-kit/references/cloudflare-worker-api.md +1 -1
- package/skills/dev-kit/references/skills.md +2 -2
- package/skills/effect-development/SKILL.md +27 -0
- package/skills/effect-development/agents/openai.yaml +4 -0
- package/skills/effect-development/references/api/index.md +32 -0
- package/skills/effect-development/references/api/schema-codecs.md +15 -0
- package/skills/{build-effect-apis/references → effect-development/references/api}/verification.md +10 -5
- package/skills/{effect-architecture-audit/SKILL.md → effect-development/references/architecture/index.md} +1 -6
- package/skills/{effect-atom-state/references → effect-development/references/atom}/effect-atom-client.md +8 -6
- package/skills/{effect-atom-state/references → effect-development/references/atom}/effect-atom-testing.md +7 -2
- package/skills/effect-development/references/atom/index.md +40 -0
- package/skills/{build-effect-clis/references → effect-development/references/cli}/entrypoints-and-testing.md +6 -2
- package/skills/effect-development/references/cli/index.md +39 -0
- package/skills/effect-development/references/setup.md +15 -0
- package/skills/open-pull-request/SKILL.md +10 -70
- package/skills/open-pull-request/references/evidence.md +22 -0
- package/skills/open-pull-request/references/explanation.md +21 -0
- package/skills/open-pull-request/references/publication.md +21 -0
- package/skills/sentry/LICENSE +202 -0
- package/skills/sentry/LICENSE-UPSTREAM +21 -0
- package/skills/sentry/NOTICE +14 -0
- package/skills/sentry/SKILL.md +33 -0
- package/skills/sentry/references/alert-payloads.md +105 -0
- package/skills/sentry/references/alerts.md +17 -0
- package/skills/sentry/references/artifacts.md +25 -0
- package/skills/sentry/references/auth-token.md +65 -0
- package/skills/sentry/references/concepts/ai-monitoring.md +131 -0
- package/skills/sentry/references/concepts/choosing-a-signal.md +78 -0
- package/skills/sentry/references/concepts/crons.md +50 -0
- package/skills/sentry/references/concepts/data-scrubbing.md +43 -0
- package/skills/sentry/references/concepts/errors.md +40 -0
- package/skills/sentry/references/concepts/logging.md +85 -0
- package/skills/sentry/references/concepts/metrics.md +49 -0
- package/skills/sentry/references/concepts/monitors.md +78 -0
- package/skills/sentry/references/concepts/profiling.md +38 -0
- package/skills/sentry/references/concepts/reduce-volume.md +49 -0
- package/skills/sentry/references/concepts/releases.md +43 -0
- package/skills/sentry/references/concepts/session-replay.md +35 -0
- package/skills/sentry/references/concepts/tracing.md +54 -0
- package/skills/sentry/references/concepts/user-feedback.md +36 -0
- package/skills/sentry/references/debug-artifacts/android.md +68 -0
- package/skills/sentry/references/debug-artifacts/apple.md +96 -0
- package/skills/sentry/references/debug-artifacts/dotnet.md +70 -0
- package/skills/sentry/references/debug-artifacts/flutter.md +65 -0
- package/skills/sentry/references/debug-artifacts/index.md +75 -0
- package/skills/sentry/references/debug-artifacts/javascript.md +94 -0
- package/skills/sentry/references/debug-artifacts/matching.md +73 -0
- package/skills/sentry/references/debug-artifacts/react-native.md +75 -0
- package/skills/sentry/references/first-error-setup.md +25 -0
- package/skills/sentry/references/instrumentation.md +30 -0
- package/skills/sentry/references/issues.md +32 -0
- package/skills/sentry/references/new-project.md +17 -0
- package/skills/sentry/references/otel-exporter.md +30 -0
- package/skills/sentry/references/release-workflow.md +31 -0
- package/skills/sentry/references/releases/ci-pipeline.md +214 -0
- package/skills/sentry/references/releases/index.md +93 -0
- package/skills/sentry/references/releases/suspect-commits.md +155 -0
- package/skills/sentry/references/releases/tagging.md +131 -0
- package/skills/sentry/references/releases/troubleshooting.md +67 -0
- package/skills/sentry/references/sdks/android/crons.md +305 -0
- package/skills/sentry/references/sdks/android/error-monitoring.md +800 -0
- package/skills/sentry/references/sdks/android/index.md +748 -0
- package/skills/sentry/references/sdks/android/integrations.md +48 -0
- package/skills/sentry/references/sdks/android/logging.md +374 -0
- package/skills/sentry/references/sdks/android/metrics.md +288 -0
- package/skills/sentry/references/sdks/android/profiling.md +397 -0
- package/skills/sentry/references/sdks/android/session-replay.md +406 -0
- package/skills/sentry/references/sdks/android/tracing.md +861 -0
- package/skills/sentry/references/sdks/browser/error-monitoring.md +861 -0
- package/skills/sentry/references/sdks/browser/index.md +714 -0
- package/skills/sentry/references/sdks/browser/logging.md +315 -0
- package/skills/sentry/references/sdks/browser/profiling.md +236 -0
- package/skills/sentry/references/sdks/browser/session-replay.md +586 -0
- package/skills/sentry/references/sdks/browser/tracing.md +561 -0
- package/skills/sentry/references/sdks/browser/user-feedback.md +354 -0
- package/skills/sentry/references/sdks/cloudflare/ai-monitoring.md +661 -0
- package/skills/sentry/references/sdks/cloudflare/crons.md +231 -0
- package/skills/sentry/references/sdks/cloudflare/durable-objects.md +381 -0
- package/skills/sentry/references/sdks/cloudflare/error-monitoring.md +329 -0
- package/skills/sentry/references/sdks/cloudflare/index.md +698 -0
- package/skills/sentry/references/sdks/cloudflare/logging.md +169 -0
- package/skills/sentry/references/sdks/cloudflare/nodejs-compat.md +134 -0
- package/skills/sentry/references/sdks/cloudflare/tracing.md +475 -0
- package/skills/sentry/references/sdks/cocoa/error-monitoring.md +394 -0
- package/skills/sentry/references/sdks/cocoa/index.md +497 -0
- package/skills/sentry/references/sdks/cocoa/logging.md +209 -0
- package/skills/sentry/references/sdks/cocoa/metrics.md +136 -0
- package/skills/sentry/references/sdks/cocoa/profiling.md +223 -0
- package/skills/sentry/references/sdks/cocoa/session-replay.md +257 -0
- package/skills/sentry/references/sdks/cocoa/tracing.md +524 -0
- package/skills/sentry/references/sdks/cocoa/user-feedback.md +310 -0
- package/skills/sentry/references/sdks/dotnet/crons.md +465 -0
- package/skills/sentry/references/sdks/dotnet/error-monitoring.md +1100 -0
- package/skills/sentry/references/sdks/dotnet/index.md +614 -0
- package/skills/sentry/references/sdks/dotnet/logging.md +556 -0
- package/skills/sentry/references/sdks/dotnet/metrics.md +229 -0
- package/skills/sentry/references/sdks/dotnet/profiling.md +296 -0
- package/skills/sentry/references/sdks/dotnet/tracing.md +897 -0
- package/skills/sentry/references/sdks/elixir/crons.md +371 -0
- package/skills/sentry/references/sdks/elixir/error-monitoring.md +335 -0
- package/skills/sentry/references/sdks/elixir/index.md +383 -0
- package/skills/sentry/references/sdks/elixir/logging.md +239 -0
- package/skills/sentry/references/sdks/elixir/tracing.md +233 -0
- package/skills/sentry/references/sdks/flutter/ecosystem-integrations.md +70 -0
- package/skills/sentry/references/sdks/flutter/error-monitoring.md +312 -0
- package/skills/sentry/references/sdks/flutter/index.md +728 -0
- package/skills/sentry/references/sdks/flutter/logging.md +387 -0
- package/skills/sentry/references/sdks/flutter/metrics.md +310 -0
- package/skills/sentry/references/sdks/flutter/profiling.md +214 -0
- package/skills/sentry/references/sdks/flutter/session-replay.md +308 -0
- package/skills/sentry/references/sdks/flutter/tracing.md +502 -0
- package/skills/sentry/references/sdks/go/crons.md +270 -0
- package/skills/sentry/references/sdks/go/error-monitoring.md +361 -0
- package/skills/sentry/references/sdks/go/index.md +324 -0
- package/skills/sentry/references/sdks/go/logging.md +354 -0
- package/skills/sentry/references/sdks/go/metrics.md +273 -0
- package/skills/sentry/references/sdks/go/profiling.md +46 -0
- package/skills/sentry/references/sdks/go/tracing.md +366 -0
- package/skills/sentry/references/sdks/index.md +41 -0
- package/skills/sentry/references/sdks/nestjs/ai-monitoring.md +410 -0
- package/skills/sentry/references/sdks/nestjs/crons.md +268 -0
- package/skills/sentry/references/sdks/nestjs/error-monitoring.md +729 -0
- package/skills/sentry/references/sdks/nestjs/index.md +699 -0
- package/skills/sentry/references/sdks/nestjs/logging.md +174 -0
- package/skills/sentry/references/sdks/nestjs/metrics.md +243 -0
- package/skills/sentry/references/sdks/nestjs/profiling.md +127 -0
- package/skills/sentry/references/sdks/nestjs/tracing.md +762 -0
- package/skills/sentry/references/sdks/nextjs/ai-monitoring.md +494 -0
- package/skills/sentry/references/sdks/nextjs/crons.md +383 -0
- package/skills/sentry/references/sdks/nextjs/error-monitoring.md +974 -0
- package/skills/sentry/references/sdks/nextjs/index.md +491 -0
- package/skills/sentry/references/sdks/nextjs/logging.md +381 -0
- package/skills/sentry/references/sdks/nextjs/metrics.md +411 -0
- package/skills/sentry/references/sdks/nextjs/profiling.md +403 -0
- package/skills/sentry/references/sdks/nextjs/session-replay.md +462 -0
- package/skills/sentry/references/sdks/nextjs/tracing.md +628 -0
- package/skills/sentry/references/sdks/node/ai-monitoring.md +303 -0
- package/skills/sentry/references/sdks/node/crons.md +432 -0
- package/skills/sentry/references/sdks/node/error-monitoring.md +1125 -0
- package/skills/sentry/references/sdks/node/index.md +942 -0
- package/skills/sentry/references/sdks/node/logging.md +380 -0
- package/skills/sentry/references/sdks/node/metrics.md +278 -0
- package/skills/sentry/references/sdks/node/profiling.md +373 -0
- package/skills/sentry/references/sdks/node/tracing.md +878 -0
- package/skills/sentry/references/sdks/php/ai-monitoring.md +310 -0
- package/skills/sentry/references/sdks/php/crons.md +265 -0
- package/skills/sentry/references/sdks/php/error-monitoring.md +626 -0
- package/skills/sentry/references/sdks/php/index.md +362 -0
- package/skills/sentry/references/sdks/php/laravel.md +542 -0
- package/skills/sentry/references/sdks/php/logging.md +242 -0
- package/skills/sentry/references/sdks/php/metrics.md +193 -0
- package/skills/sentry/references/sdks/php/profiling.md +115 -0
- package/skills/sentry/references/sdks/php/symfony.md +552 -0
- package/skills/sentry/references/sdks/php/tracing.md +516 -0
- package/skills/sentry/references/sdks/python/ai-monitoring.md +351 -0
- package/skills/sentry/references/sdks/python/crons.md +218 -0
- package/skills/sentry/references/sdks/python/error-monitoring.md +292 -0
- package/skills/sentry/references/sdks/python/index.md +361 -0
- package/skills/sentry/references/sdks/python/logging.md +234 -0
- package/skills/sentry/references/sdks/python/metrics.md +154 -0
- package/skills/sentry/references/sdks/python/profiling.md +120 -0
- package/skills/sentry/references/sdks/python/tracing.md +364 -0
- package/skills/sentry/references/sdks/react/error-monitoring.md +1607 -0
- package/skills/sentry/references/sdks/react/index.md +492 -0
- package/skills/sentry/references/sdks/react/logging.md +364 -0
- package/skills/sentry/references/sdks/react/profiling.md +322 -0
- package/skills/sentry/references/sdks/react/react-features.md +1272 -0
- package/skills/sentry/references/sdks/react/session-replay.md +1193 -0
- package/skills/sentry/references/sdks/react/tracing.md +1415 -0
- package/skills/sentry/references/sdks/react-native/error-monitoring.md +1481 -0
- package/skills/sentry/references/sdks/react-native/expo-config-plugin.md +45 -0
- package/skills/sentry/references/sdks/react-native/index.md +1030 -0
- package/skills/sentry/references/sdks/react-native/logging.md +444 -0
- package/skills/sentry/references/sdks/react-native/profiling.md +386 -0
- package/skills/sentry/references/sdks/react-native/session-replay.md +704 -0
- package/skills/sentry/references/sdks/react-native/tracing.md +1086 -0
- package/skills/sentry/references/sdks/react-native/user-feedback.md +815 -0
- package/skills/sentry/references/sdks/react-router-framework/error-monitoring.md +127 -0
- package/skills/sentry/references/sdks/react-router-framework/index.md +411 -0
- package/skills/sentry/references/sdks/react-router-framework/logging.md +66 -0
- package/skills/sentry/references/sdks/react-router-framework/profiling.md +57 -0
- package/skills/sentry/references/sdks/react-router-framework/react-router-framework-features.md +110 -0
- package/skills/sentry/references/sdks/react-router-framework/session-replay.md +67 -0
- package/skills/sentry/references/sdks/react-router-framework/tracing.md +96 -0
- package/skills/sentry/references/sdks/react-router-framework/user-feedback.md +71 -0
- package/skills/sentry/references/sdks/ruby/crons.md +184 -0
- package/skills/sentry/references/sdks/ruby/error-monitoring.md +248 -0
- package/skills/sentry/references/sdks/ruby/index.md +297 -0
- package/skills/sentry/references/sdks/ruby/logging.md +168 -0
- package/skills/sentry/references/sdks/ruby/metrics.md +196 -0
- package/skills/sentry/references/sdks/ruby/migration.md +321 -0
- package/skills/sentry/references/sdks/ruby/profiling.md +107 -0
- package/skills/sentry/references/sdks/ruby/tracing.md +388 -0
- package/skills/sentry/references/sdks/svelte/error-monitoring.md +456 -0
- package/skills/sentry/references/sdks/svelte/index.md +467 -0
- package/skills/sentry/references/sdks/svelte/logging.md +344 -0
- package/skills/sentry/references/sdks/svelte/session-replay.md +369 -0
- package/skills/sentry/references/sdks/svelte/tracing.md +406 -0
- package/skills/sentry/references/sdks/tanstack-start/error-monitoring.md +149 -0
- package/skills/sentry/references/sdks/tanstack-start/index.md +381 -0
- package/skills/sentry/references/sdks/tanstack-start/logging.md +74 -0
- package/skills/sentry/references/sdks/tanstack-start/session-replay.md +76 -0
- package/skills/sentry/references/sdks/tanstack-start/tanstackstart-features.md +128 -0
- package/skills/sentry/references/sdks/tanstack-start/tracing.md +123 -0
- package/skills/sentry/references/sdks/tanstack-start/user-feedback.md +81 -0
- package/skills/sentry/references/search-query-language.md +226 -0
- package/skills/sentry/references/semantics/angular.md +7 -0
- package/skills/sentry/references/semantics/app.md +28 -0
- package/skills/sentry/references/semantics/art.md +17 -0
- package/skills/sentry/references/semantics/aws.md +43 -0
- package/skills/sentry/references/semantics/browser.md +34 -0
- package/skills/sentry/references/semantics/cache.md +12 -0
- package/skills/sentry/references/semantics/client.md +8 -0
- package/skills/sentry/references/semantics/cloud.md +12 -0
- package/skills/sentry/references/semantics/cloudflare.md +23 -0
- package/skills/sentry/references/semantics/code.md +11 -0
- package/skills/sentry/references/semantics/culture.md +11 -0
- package/skills/sentry/references/semantics/db.md +21 -0
- package/skills/sentry/references/semantics/device.md +43 -0
- package/skills/sentry/references/semantics/error.md +7 -0
- package/skills/sentry/references/semantics/event.md +8 -0
- package/skills/sentry/references/semantics/exception.md +10 -0
- package/skills/sentry/references/semantics/faas.md +19 -0
- package/skills/sentry/references/semantics/file.md +8 -0
- package/skills/sentry/references/semantics/flag.md +7 -0
- package/skills/sentry/references/semantics/gcp.md +16 -0
- package/skills/sentry/references/semantics/gen_ai.md +53 -0
- package/skills/sentry/references/semantics/general.md +11 -0
- package/skills/sentry/references/semantics/graphql.md +9 -0
- package/skills/sentry/references/semantics/grpc.md +19 -0
- package/skills/sentry/references/semantics/http.md +34 -0
- package/skills/sentry/references/semantics/index.md +63 -0
- package/skills/sentry/references/semantics/jsonrpc.md +8 -0
- package/skills/sentry/references/semantics/jvm.md +12 -0
- package/skills/sentry/references/semantics/koa.md +7 -0
- package/skills/sentry/references/semantics/logger.md +7 -0
- package/skills/sentry/references/semantics/mcp.md +37 -0
- package/skills/sentry/references/semantics/mdc.md +7 -0
- package/skills/sentry/references/semantics/messaging.md +23 -0
- package/skills/sentry/references/semantics/middleware.md +7 -0
- package/skills/sentry/references/semantics/navigation.md +9 -0
- package/skills/sentry/references/semantics/nel.md +11 -0
- package/skills/sentry/references/semantics/network.md +17 -0
- package/skills/sentry/references/semantics/os.md +15 -0
- package/skills/sentry/references/semantics/otel.md +10 -0
- package/skills/sentry/references/semantics/params.md +7 -0
- package/skills/sentry/references/semantics/process.md +14 -0
- package/skills/sentry/references/semantics/react.md +7 -0
- package/skills/sentry/references/semantics/remix.md +7 -0
- package/skills/sentry/references/semantics/resource.md +7 -0
- package/skills/sentry/references/semantics/rpc.md +10 -0
- package/skills/sentry/references/semantics/score.md +10 -0
- package/skills/sentry/references/semantics/sentry.md +69 -0
- package/skills/sentry/references/semantics/server.md +8 -0
- package/skills/sentry/references/semantics/service.md +8 -0
- package/skills/sentry/references/semantics/session.md +7 -0
- package/skills/sentry/references/semantics/state.md +7 -0
- package/skills/sentry/references/semantics/thread.md +8 -0
- package/skills/sentry/references/semantics/timber.md +7 -0
- package/skills/sentry/references/semantics/trpc.md +8 -0
- package/skills/sentry/references/semantics/ui.md +18 -0
- package/skills/sentry/references/semantics/url.md +15 -0
- package/skills/sentry/references/semantics/user.md +17 -0
- package/skills/sentry/references/semantics/user_agent.md +7 -0
- package/skills/sentry/references/semantics/vercel.md +42 -0
- package/skills/sentry/references/setup-verification.md +39 -0
- package/skills/sentry/references/snapshots/github-actions-fanout.md +206 -0
- package/skills/sentry/references/snapshots/github-actions-simple.md +102 -0
- package/skills/sentry/references/snapshots/github-actions-swift-snapshot-testing.md +118 -0
- package/skills/sentry/references/snapshots/index.md +19 -0
- package/skills/sentry/references/snapshots/snapshot-previews.md +100 -0
- package/skills/sentry/references/snapshots/snapshots.md +123 -0
- package/skills/sentry/references/snapshots/wizard-setup.md +134 -0
- package/skills/testing/LICENSE +21 -0
- package/skills/testing/NOTICE +7 -0
- package/skills/testing/SKILL.md +13 -19
- package/skills/testing/agents/openai.yaml +1 -2
- package/skills/testing/references/selection.md +23 -0
- package/skills/testing/references/tdd.md +19 -0
- package/skills/testing/references/test-design.md +17 -0
- package/src/catalog.ts +1 -7
- package/skills/build-effect-apis/SKILL.md +0 -81
- package/skills/build-effect-apis/agents/openai.yaml +0 -4
- package/skills/build-effect-clis/SKILL.md +0 -92
- package/skills/build-effect-clis/agents/openai.yaml +0 -4
- package/skills/effect-architecture-audit/agents/openai.yaml +0 -4
- package/skills/effect-atom-state/SKILL.md +0 -97
- package/skills/effect-atom-state/agents/openai.yaml +0 -4
- package/skills/effect-ts/SKILL.md +0 -35
- package/skills/effect-ts/agents/openai.yaml +0 -4
- /package/skills/{build-effect-apis/references → effect-development/references/api}/cloudflare-workers.md +0 -0
- /package/skills/{build-effect-apis/references → effect-development/references/api}/runtime-assembly.md +0 -0
- /package/skills/{build-effect-apis/references → effect-development/references/api}/server-and-middleware.md +0 -0
- /package/skills/{build-effect-apis/references → effect-development/references/api}/shared-contracts.md +0 -0
- /package/skills/{effect-architecture-audit/references → effect-development/references/architecture}/service-and-boundary-audit.md +0 -0
- /package/skills/{effect-atom-state/references → effect-development/references/atom}/effect-atom-lifecycle.md +0 -0
- /package/skills/{effect-atom-state/references → effect-development/references/atom}/effect-atom-workflows.md +0 -0
- /package/skills/{effect-atom-state/references → effect-development/references/atom}/tanstack-start.md +0 -0
- /package/skills/{build-effect-clis/references → effect-development/references/cli}/command-design.md +0 -0
- /package/skills/{build-effect-clis/references → effect-development/references/cli}/processes-and-platform.md +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# SnapshotPreviews Wizard Setup
|
|
2
|
+
|
|
3
|
+
Use this only when no existing snapshot generator/setup exists and the user explicitly
|
|
4
|
+
wants Sentry’s first-party SnapshotPreviews image source.
|
|
5
|
+
|
|
6
|
+
## Flow
|
|
7
|
+
|
|
8
|
+
1. Run the non-interactive wizard first.
|
|
9
|
+
2. If the wizard succeeds, continue with the main skill’s completion checks.
|
|
10
|
+
3. If the wizard stops for a known recoverable reason, follow the matching section
|
|
11
|
+
below.
|
|
12
|
+
4. Use manual fallback only after the wizard is unavailable, rejects `appleSnapshots`,
|
|
13
|
+
or still cannot complete after requested disambiguation.
|
|
14
|
+
|
|
15
|
+
## Run the Wizard
|
|
16
|
+
|
|
17
|
+
Pass the directory that contains the selected `.xcodeproj` and let the wizard
|
|
18
|
+
auto-detect app targets, hosted XCTest targets, and Swift previews:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx @sentry/wizard@latest -i appleSnapshots --non-interactive \
|
|
22
|
+
--xcode-project-dir <path-to-xcode-project-dir>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Use `.` when the `.xcodeproj` is in the repository root.
|
|
26
|
+
Use the parent directory when detection returned a nested bundle path, for example `ios`
|
|
27
|
+
for `ios/MyApp.xcodeproj`.
|
|
28
|
+
|
|
29
|
+
## Handle Wizard Outcomes
|
|
30
|
+
|
|
31
|
+
| Outcome | Action |
|
|
32
|
+
| ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| Wizard completes | Continue with the main skill’s completion checks. |
|
|
34
|
+
| Dirty working tree blocks non-interactive mode | Inspect `git status --short`. If dirty files are pre-existing or expected for the user’s scenario, rerun the same command with `--ignore-git-changes`. Do not clean, stash, or revert user files just to satisfy the wizard safety check. |
|
|
35
|
+
| Wizard asks for app target or hosted XCTest target | Follow [Target Disambiguation](#target-disambiguation). |
|
|
36
|
+
| Wizard reports no hosted XCTest target | Follow [Target Disambiguation](#target-disambiguation) to confirm. If no hosted target exists, stop and ask the user to add or identify one. |
|
|
37
|
+
| Wizard reports no Swift previews | Stop and ask whether to add Swift previews or use another snapshot image source. Do not add, restore, or rewrite previews just to make SnapshotPreviews produce images unless the user explicitly approves that source change. |
|
|
38
|
+
| Wizard is unavailable, rejects `appleSnapshots`, or still fails after requested disambiguation | Follow [Manual Fallback](#manual-fallback) only if a hosted XCTest target exists. |
|
|
39
|
+
|
|
40
|
+
## Target Disambiguation
|
|
41
|
+
|
|
42
|
+
Use this only when the wizard asks for target values or reports that no hosted XCTest
|
|
43
|
+
target was found. Start from the wizard’s error output.
|
|
44
|
+
`--xcode-project-dir` should already be present.
|
|
45
|
+
|
|
46
|
+
Only gather values the wizard asked for.
|
|
47
|
+
Probe first; ask the user only if probing cannot identify a safe single target.
|
|
48
|
+
|
|
49
|
+
| Wizard asks for | How to investigate | Add flag |
|
|
50
|
+
| -------------------- | ------------------------------------------------------------------------------- | ------------------------------------------ |
|
|
51
|
+
| App target | `xcodebuild -list -project <Project>.xcodeproj 2>/dev/null` | `--app-target <AppTarget>` |
|
|
52
|
+
| Hosted XCTest target | `grep -rE "TEST_HOST\|BUNDLE_LOADER" --include='project.pbxproj' . 2>/dev/null` | `--hosted-test-target <HostedTestsTarget>` |
|
|
53
|
+
|
|
54
|
+
If the wizard asks for multiple values, gather all requested values through probing or
|
|
55
|
+
user clarification, then rerun once with the complete requested flag set.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx @sentry/wizard@latest -i appleSnapshots --non-interactive \
|
|
59
|
+
--xcode-project-dir <path-to-xcode-project-dir> \
|
|
60
|
+
--app-target <AppTarget> \
|
|
61
|
+
--hosted-test-target <HostedTestsTarget>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Use only the target flags the wizard requested.
|
|
65
|
+
|
|
66
|
+
If the hosted-target probe returns no `TEST_HOST` or `BUNDLE_LOADER` entries, stop and
|
|
67
|
+
ask the user to add a hosted Unit Testing Bundle target for the app or identify an
|
|
68
|
+
existing hosted test target.
|
|
69
|
+
Do not use the manual fallback until a hosted XCTest target exists; SnapshotPreviews
|
|
70
|
+
renders through `xcodebuild test`, and a standalone app target cannot run the generated
|
|
71
|
+
`SnapshotTest` class.
|
|
72
|
+
|
|
73
|
+
If the rerun still fails after requested disambiguation, use manual fallback only when a
|
|
74
|
+
hosted XCTest target exists.
|
|
75
|
+
|
|
76
|
+
## Manual Fallback
|
|
77
|
+
|
|
78
|
+
Use this only if the wizard is unavailable, rejects `appleSnapshots`, or cannot complete
|
|
79
|
+
after disambiguation and the project has a hosted XCTest target.
|
|
80
|
+
If no hosted XCTest target exists, stop and ask for one first.
|
|
81
|
+
|
|
82
|
+
1. Add the Swift package to the Xcode project/workspace that builds the app and hosted
|
|
83
|
+
snapshot test target:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
https://github.com/getsentry/SnapshotPreviews
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
1. Link products:
|
|
90
|
+
|
|
91
|
+
| Product | Target |
|
|
92
|
+
| --------------------- | ---------------------------------------------------------------------------- |
|
|
93
|
+
| `SnapshottingTests` | Hosted snapshot/layout XCTest target |
|
|
94
|
+
| `SnapshotPreferences` | Preview-declaring target only when custom tags/context/thresholds are needed |
|
|
95
|
+
| `PreviewGallery` | Internal app target only when an in-app preview gallery is requested |
|
|
96
|
+
|
|
97
|
+
2. Add or verify one hosted XCTest class importing `SnapshottingTests` and inheriting
|
|
98
|
+
from `SnapshotTest`.
|
|
99
|
+
3. Export images with `TEST_RUNNER_SNAPSHOTS_EXPORT_DIR` and `xcodebuild test`.
|
|
100
|
+
4. Upload with `sentry-cli snapshots upload`.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
TEST_RUNNER_SNAPSHOTS_EXPORT_DIR="$PWD/snapshot-images" \
|
|
104
|
+
xcodebuild test \
|
|
105
|
+
-scheme MyApp \
|
|
106
|
+
-sdk iphonesimulator \
|
|
107
|
+
-destination 'platform=iOS Simulator,name=iPhone 16 Pro' \
|
|
108
|
+
-only-testing:MyAppTests/MyAppSnapshotTest
|
|
109
|
+
|
|
110
|
+
sentry-cli snapshots upload "$PWD/snapshot-images" \
|
|
111
|
+
--org your-org \
|
|
112
|
+
--project your-ios-project \
|
|
113
|
+
--app-id com.example.MyApp
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Only after non-interactive wizard setup, requested target disambiguation, and manual
|
|
117
|
+
fallback all fail, tell the user they can run the wizard interactively and return with
|
|
118
|
+
the error output:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx @sentry/wizard@latest -i appleSnapshots --xcode-project-dir <path-to-xcode-project-dir>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Rules
|
|
125
|
+
|
|
126
|
+
- `--app-id` is a stable app identifier/bundle id, not the Sentry project slug.
|
|
127
|
+
- Use `sentry-cli snapshots upload`, not deprecated `sentry-cli build snapshots`.
|
|
128
|
+
- SnapshotPreviews test-runner environment variables use the `TEST_RUNNER_` prefix so
|
|
129
|
+
values are forwarded into the app/test process.
|
|
130
|
+
- Base branch uploads the full set.
|
|
131
|
+
- PR selective uploads require a full image-name manifest; read `snapshots.md`.
|
|
132
|
+
|
|
133
|
+
Completion for this route means the wizard completed, or manual fallback completed with
|
|
134
|
+
the same project changes.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matt Pocock
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Dev Kit adaptation of https://github.com/mattpocock/skills
|
|
2
|
+
Copyright (c) 2026 Matt Pocock. MIT license retained in LICENSE.
|
|
3
|
+
Source revision: 2ab958093e83e0ec752e6c1c5932da465bf23e0c
|
|
4
|
+
Includes the repository-owned TDD guidance previously distributed by Dev Kit.
|
|
5
|
+
|
|
6
|
+
Modified by Dev Kit to reuse user-selected boundaries, avoid redundant
|
|
7
|
+
confirmation, and let repository testing policy own committed test decisions.
|
package/skills/testing/SKILL.md
CHANGED
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: testing
|
|
3
|
-
description:
|
|
3
|
+
description: Decide whether committed tests are warranted, design regression tests, or follow explicitly requested TDD.
|
|
4
|
+
license: MIT
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Testing
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
Follow the repository's testing policy and the user's requested scope. Adding
|
|
10
|
+
source code does not by itself justify committed tests. Prefer the cheapest
|
|
11
|
+
verification that proves the changed behavior.
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
- Whether to add, retain, or remove a test: [test selection](references/selection.md).
|
|
14
|
+
- A test boundary, substitute, or mocking decision: [test design](references/test-design.md).
|
|
15
|
+
- An explicit TDD, red-green, or test-first request: [TDD](references/tdd.md).
|
|
16
|
+
Ordinary feature verification does not require this workflow.
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
Honor an explicit testing request within its scope. Express expectations
|
|
19
|
+
independently of implementation, exercise a stable public boundary, and follow
|
|
20
|
+
repository evidence and placement rules. Keep the final suite green.
|
|
13
21
|
|
|
14
|
-
|
|
15
|
-
- A regression is plausible and would be costly.
|
|
16
|
-
- The behavior is observable through a stable public seam.
|
|
17
|
-
- The test will survive likely refactors.
|
|
18
|
-
- The expected result is independent of the implementation.
|
|
19
|
-
- Existing tests, types, static checks, or a smoke check cannot cover the risk adequately.
|
|
20
|
-
|
|
21
|
-
If any condition fails, skip the test and use the cheapest sufficient verification instead. Moving MVP behavior often warrants no committed tests.
|
|
22
|
-
|
|
23
|
-
Test capabilities, not files. Use the fewest tests that protect the risk, and ignore coverage targets unless the user explicitly asks for them.
|
|
24
|
-
|
|
25
|
-
Never commit an intentionally failing or red-only suite. Keep time-driven tests
|
|
26
|
-
deterministic instead of stabilizing them with wall-clock sleeps. A shared fake
|
|
27
|
-
or in-memory implementation must fully provide the behavior its name promises;
|
|
28
|
-
keep partial substitutes local to the tests that need them.
|
|
22
|
+
TDD attribution is in [NOTICE](NOTICE); terms are in [LICENSE](LICENSE).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Testing
|
|
2
|
+
|
|
3
|
+
**If in doubt, don't test it.**
|
|
4
|
+
|
|
5
|
+
Committed tests must prove durable value. Tests are permanent product code, not a reflexive companion to each source file.
|
|
6
|
+
|
|
7
|
+
Write a test only when every condition holds:
|
|
8
|
+
|
|
9
|
+
- It protects stable product behavior rather than an implementation detail.
|
|
10
|
+
- A regression is plausible and would be costly.
|
|
11
|
+
- The behavior is observable through a stable public seam.
|
|
12
|
+
- The test will survive likely refactors.
|
|
13
|
+
- The expected result is independent of the implementation.
|
|
14
|
+
- Existing tests, types, static checks, or a smoke check cannot cover the risk adequately.
|
|
15
|
+
|
|
16
|
+
If any condition fails, skip the test and use the cheapest sufficient verification instead. Moving MVP behavior often warrants no committed tests.
|
|
17
|
+
|
|
18
|
+
Test capabilities, not files. Use the fewest tests that protect the risk, and ignore coverage targets unless the user explicitly asks for them.
|
|
19
|
+
|
|
20
|
+
Never commit an intentionally failing or red-only suite. Keep time-driven tests
|
|
21
|
+
deterministic instead of stabilizing them with wall-clock sleeps. A shared fake
|
|
22
|
+
or in-memory implementation must fully provide the behavior its name promises;
|
|
23
|
+
keep partial substitutes local to the tests that need them.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Test-driven development
|
|
2
|
+
|
|
3
|
+
Use the repository's testing policy, command authority, and public boundaries.
|
|
4
|
+
Reuse the behavior and test boundary the user already named. When those are
|
|
5
|
+
unspecified, choose the strongest relevant public boundary from the existing
|
|
6
|
+
design; ask only if the choice changes the intended behavior or scope.
|
|
7
|
+
|
|
8
|
+
Write a failing test that independently expresses the requested behavior.
|
|
9
|
+
Confirm the failure is meaningful, implement enough to pass, then refactor
|
|
10
|
+
when it improves the code while keeping the test green. Work in small slices
|
|
11
|
+
that can inform the next decision.
|
|
12
|
+
|
|
13
|
+
For a difficult choice of boundary or substitute, read
|
|
14
|
+
[test design](test-design.md). Avoid a new abstraction solely to
|
|
15
|
+
make implementation details easier to mock.
|
|
16
|
+
|
|
17
|
+
Keep the final suite green and obey the repository's evidence and placement
|
|
18
|
+
rules. A TDD request authorizes test-first work within the requested task; it
|
|
19
|
+
does not require a separate confirmation at every cycle.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Test design
|
|
2
|
+
|
|
3
|
+
Observe behavior through the public boundary that owns it. Assert an expected
|
|
4
|
+
result derived from the requirement, a worked example, or independent fixture,
|
|
5
|
+
rather than repeating the implementation's calculation.
|
|
6
|
+
|
|
7
|
+
Choose the boundary that exposes the failure with the fewest irrelevant moving
|
|
8
|
+
parts. Persistence requirements may need real storage and migrations; UI
|
|
9
|
+
interaction failures may need a browser. Follow the repository's substitutes
|
|
10
|
+
and avoid mocks of internal collaborators that only prove the current wiring.
|
|
11
|
+
|
|
12
|
+
Control nondeterministic inputs such as time or an external service when the
|
|
13
|
+
failure requires it. A substitute must faithfully provide the behavior its
|
|
14
|
+
interface promises. Keep its use local unless several justified tests need it.
|
|
15
|
+
|
|
16
|
+
Use assertions that distinguish the failure from success and survive unrelated
|
|
17
|
+
refactors. Do not add companion tests merely because a new source file exists.
|
package/src/catalog.ts
CHANGED
|
@@ -186,13 +186,7 @@ export const loadSkillCatalog = Effect.fn("loadSkillCatalog")(function* (
|
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
const families = {
|
|
189
|
-
effect: [
|
|
190
|
-
"effect-ts",
|
|
191
|
-
"effect-architecture-audit",
|
|
192
|
-
"build-effect-apis",
|
|
193
|
-
"effect-atom-state",
|
|
194
|
-
"build-effect-clis",
|
|
195
|
-
],
|
|
189
|
+
effect: ["effect-development"],
|
|
196
190
|
...Object.fromEntries(externalFamilies),
|
|
197
191
|
} satisfies Readonly<Record<string, ReadonlyArray<string>>>;
|
|
198
192
|
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build-effect-apis
|
|
3
|
-
description: Build contract-first Effect HTTP APIs. Use when defining shared HttpApiEndpoint/HttpApiGroup contracts, implementing HttpApiBuilder or HttpApiServer handlers and middleware, assembling server runtimes and OpenAPI docs, or serving on Cloudflare Workers/effect-cf. For consuming an API from client state, use $effect-atom-state.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Build Effect APIs
|
|
7
|
-
|
|
8
|
-
Treat the shared `HttpApi` value as the **contract spine**: schemas, server,
|
|
9
|
-
OpenAPI, and clients all derive from it. Keep transport contracts isomorphic;
|
|
10
|
-
keep runtime behavior in handlers, services, layers, and client state modules.
|
|
11
|
-
|
|
12
|
-
Effect HTTP APIs are version-sensitive. Read the target repository's manifests
|
|
13
|
-
and lockfile, inspect its existing imports, and confirm exact signatures from
|
|
14
|
-
the installed package declarations before editing. In current Effect v4 betas
|
|
15
|
-
the server module is `HttpApiBuilder`; a request that mentions `HttpApiServer`
|
|
16
|
-
may refer to the same server-building responsibility from another version.
|
|
17
|
-
|
|
18
|
-
## Build the contract spine
|
|
19
|
-
|
|
20
|
-
1. Inventory the existing API root, groups, endpoints, schemas, transport
|
|
21
|
-
errors, middleware, handler layers, client construction, and runtime edge.
|
|
22
|
-
Finish when every existing contract consumer and provider is identified.
|
|
23
|
-
2. Read [shared-contracts.md](references/shared-contracts.md), then change the
|
|
24
|
-
shared domain package first: schemas and errors, one endpoint contract,
|
|
25
|
-
group composition, root API composition, and public exports. Finish when
|
|
26
|
-
server and client can import the same API value without runtime-specific
|
|
27
|
-
dependencies entering the domain package.
|
|
28
|
-
3. Read [server-and-middleware.md](references/server-and-middleware.md), then
|
|
29
|
-
implement middleware and every changed group handler. Keep handlers as
|
|
30
|
-
decoded boundary adapters into application services and assemble all
|
|
31
|
-
requirements at the runtime edge. Finish when each endpoint identifier has
|
|
32
|
-
exactly one handler and every declared middleware has a provided layer.
|
|
33
|
-
4. Route consumer changes through the `$effect-atom-state` skill: deriving
|
|
34
|
-
`AtomHttpApi` or direct `HttpApiClient` clients, query and mutation atoms,
|
|
35
|
-
reactivity keys, and React integration all live there. Finish when consumers
|
|
36
|
-
call the shared contract rather than redefining wire types or using ad hoc
|
|
37
|
-
`fetch` for declared endpoints.
|
|
38
|
-
5. Read [verification.md](references/verification.md). Run the repository's
|
|
39
|
-
format, lint, typecheck, and test commands. Finish when changed schemas
|
|
40
|
-
round-trip, middleware failures use declared error channels, and server and
|
|
41
|
-
client agree on every request shape.
|
|
42
|
-
|
|
43
|
-
## Optional branches
|
|
44
|
-
|
|
45
|
-
- Read [runtime-assembly.md](references/runtime-assembly.md) when wiring a
|
|
46
|
-
conventional Node/Bun server, generated API docs, process entrypoint, or
|
|
47
|
-
serverless web handler.
|
|
48
|
-
- Read [cloudflare-workers.md](references/cloudflare-workers.md) when the server
|
|
49
|
-
runs on Cloudflare Workers or uses `effect-cf`, bindings, Durable Objects,
|
|
50
|
-
Queues, WebSockets, streaming, or raw byte routes.
|
|
51
|
-
|
|
52
|
-
## Choose typed Schema codecs by default
|
|
53
|
-
|
|
54
|
-
Match the codec to the static type at the call site. When decoding a value that
|
|
55
|
-
is already typed as the schema's `Encoded` type, use `Schema.decodeEffect` or
|
|
56
|
-
the typed `Schema.decodeSync`, `Schema.decodeExit`, `Schema.decodeOption`,
|
|
57
|
-
`Schema.decodeResult`, or `Schema.decodePromise` variant. When encoding a value
|
|
58
|
-
that is already typed as the schema's `Type`, use `Schema.encodeEffect` or the
|
|
59
|
-
corresponding typed `Schema.encodeSync`, `Schema.encodeExit`,
|
|
60
|
-
`Schema.encodeOption`, `Schema.encodeResult`, or `Schema.encodePromise` variant.
|
|
61
|
-
|
|
62
|
-
Reserve `Schema.decodeUnknown*` and `Schema.encodeUnknown*` for genuinely
|
|
63
|
-
untyped boundaries: values from `JSON.parse`, `Response.json`, external
|
|
64
|
-
messages, or persistence APIs whose declared result is actually `unknown`.
|
|
65
|
-
Never choose an unknown codec to bypass a `Schema.Class` or other static type
|
|
66
|
-
mismatch. Map the source value or construct the correct schema `Type` first,
|
|
67
|
-
then use the typed encoder; similarly, establish the correct `Encoded` value
|
|
68
|
-
before using a typed decoder.
|
|
69
|
-
|
|
70
|
-
This rule is toolchain-neutral. A repository may reinforce it with a lint
|
|
71
|
-
warning and a documented local suppression for a justified untyped boundary,
|
|
72
|
-
but the boundary and type reasoning remain the source of truth.
|
|
73
|
-
|
|
74
|
-
## Boundary rules
|
|
75
|
-
|
|
76
|
-
- Let schemas own wire validation, encoding, status metadata, and branded IDs.
|
|
77
|
-
- Let endpoint files own route inputs, success, and expected transport errors.
|
|
78
|
-
- Let middleware own cross-cutting request behavior and request-scoped services.
|
|
79
|
-
- Let handlers own transport-to-application mapping and boundary invariants.
|
|
80
|
-
- Let application services own orchestration, persistence, retries, and
|
|
81
|
-
transactions.
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build-effect-clis
|
|
3
|
-
description: Write and maintain every executable script and command-line application in an Effect repository as an Effect program. Use when creating or changing any script, one-off automation, CI check, deploy/release/build glue, package-script entrypoint, CLI command, arguments, flags, prompts, child process, filesystem or environment workflow, Node/Bun entrypoint, or integration test—including extending an existing plain-TypeScript script.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Build Effect Scripts and CLIs
|
|
7
|
-
|
|
8
|
-
## Effect-first scope
|
|
9
|
-
|
|
10
|
-
Every executable script and CLI in an Effect repository is an Effect program.
|
|
11
|
-
This includes one-off scripts, CI checks, deploy/release/build glue, files under
|
|
12
|
-
`scripts/`, package-script targets, migrations, and application entrypoints—not
|
|
13
|
-
only polished command-line tools.
|
|
14
|
-
|
|
15
|
-
Apply this rule when modifying code as well as when creating it. When a task
|
|
16
|
-
touches an existing plain-TypeScript script, convert the whole script to Effect
|
|
17
|
-
in the same change; matching the surrounding file's style or minimizing the
|
|
18
|
-
diff is not a valid exception. Prefer the repository's established Effect
|
|
19
|
-
patterns, including those in sibling scripts, over legacy patterns in the file
|
|
20
|
-
being converted.
|
|
21
|
-
|
|
22
|
-
Leave a script outside Effect only for a good, concrete technical or user
|
|
23
|
-
constraint that makes Effect unsuitable. Explicitly state that reason before
|
|
24
|
-
proceeding and in the final handoff, and keep the exception as narrow as
|
|
25
|
-
possible. Convenience, one-off status, and existing plain-TypeScript style are
|
|
26
|
-
not sufficient reasons.
|
|
27
|
-
|
|
28
|
-
Use Effect platform services for filesystem, path, environment, terminal, and
|
|
29
|
-
child-process work. Raw `node:*` or Bun runtime imports, `process.env`, `fs`,
|
|
30
|
-
`path`, `child_process`, and synchronous helpers such as `execFileSync` do not
|
|
31
|
-
belong in script workflows. If the installed Effect platform has no required
|
|
32
|
-
capability, isolate the runtime call in an explicit boundary adapter whose API
|
|
33
|
-
returns an Effect with typed errors, and document why that adapter is required.
|
|
34
|
-
|
|
35
|
-
Treat each executable as an Effect application. For a CLI, the `Command` tree
|
|
36
|
-
owns the user-facing contract, handlers adapt decoded input into application
|
|
37
|
-
workflows, services own capabilities, and the executable entrypoint supplies
|
|
38
|
-
platform Layers and runs the program. A fixed automation script with no public
|
|
39
|
-
arguments may export an Effect workflow directly instead of inventing a
|
|
40
|
-
`Command` tree. Do not introduce a separate CLI framework for command work.
|
|
41
|
-
|
|
42
|
-
Effect CLI and process APIs are version-sensitive. Read the target repository's
|
|
43
|
-
`node_modules/effect/AGENTS.md` completely, follow its CLI and child-process
|
|
44
|
-
references, and confirm exact signatures from the installed declarations before
|
|
45
|
-
editing.
|
|
46
|
-
|
|
47
|
-
## Build the executable boundary
|
|
48
|
-
|
|
49
|
-
1. Inventory the existing executable entrypoints, package scripts, command
|
|
50
|
-
tree, shared flags, prompts, application services, platform Layers, output
|
|
51
|
-
modes, and subprocess helpers. Finish when every way to invoke and test the
|
|
52
|
-
affected scripts or CLI is known, including sibling Effect scripts whose
|
|
53
|
-
patterns should replace legacy plain-TypeScript style.
|
|
54
|
-
2. When the executable accepts public arguments or flags, read
|
|
55
|
-
[command-design.md](references/command-design.md). Define arguments and flags
|
|
56
|
-
with `Argument` and `Flag`, compose commands with `Command`, and give every
|
|
57
|
-
public input useful help. Use `Effect.fn` handlers and yield the root command
|
|
58
|
-
when a subcommand needs shared parent input.
|
|
59
|
-
3. Keep handlers thin. Decode user and file input at the boundary, enforce
|
|
60
|
-
cross-input invariants, then call an application service. Keep persistence,
|
|
61
|
-
network calls, orchestration, retries, and transactions in services.
|
|
62
|
-
4. Keep expected operational failures typed with `Schema.TaggedError`; map
|
|
63
|
-
platform failures into application-owned errors near the adapter that knows
|
|
64
|
-
what the operation means. Let defects remain defects.
|
|
65
|
-
5. Read [entrypoints-and-testing.md](references/entrypoints-and-testing.md).
|
|
66
|
-
Export the command tree or fixed script workflow without running it, wire
|
|
67
|
-
one Node or Bun entrypoint, and verify the applicable success, expected
|
|
68
|
-
failure, help, parsing, JSON, dry-run, and confirmation paths.
|
|
69
|
-
|
|
70
|
-
## Optional branches
|
|
71
|
-
|
|
72
|
-
- Read [processes-and-platform.md](references/processes-and-platform.md) when a
|
|
73
|
-
script or command reads files, inspects the environment, starts child
|
|
74
|
-
processes, streams their output, or differs between Node and Bun.
|
|
75
|
-
- Use `Prompt` only for an intentionally interactive path. Keep required inputs
|
|
76
|
-
expressible as arguments or flags so automation never depends on a terminal.
|
|
77
|
-
- Add `--dry-run` for commands that mutate important state and `--yes` for
|
|
78
|
-
explicitly authorized non-interactive confirmation. Never prompt in JSON or
|
|
79
|
-
CI-oriented modes.
|
|
80
|
-
|
|
81
|
-
## CLI ownership rules
|
|
82
|
-
|
|
83
|
-
- Let `Command`, `Argument`, and `Flag` own syntax, defaults, aliases, examples,
|
|
84
|
-
and help text.
|
|
85
|
-
- Let schemas own untrusted structured input and machine-readable output.
|
|
86
|
-
- Let handlers own CLI-to-application mapping and presentation selection.
|
|
87
|
-
- Let services own reusable behavior and external capabilities.
|
|
88
|
-
- Let Layers own implementations and runtime dependencies.
|
|
89
|
-
- Let the executable entrypoint own `Command.run`, platform provisioning,
|
|
90
|
-
scopes, signal handling, and `NodeRuntime.runMain` or `BunRuntime.runMain`.
|
|
91
|
-
- Keep stdout stable for primary or machine-readable output. Send diagnostics
|
|
92
|
-
and progress elsewhere; never mix prose into JSON output.
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: effect-atom-state
|
|
3
|
-
description: Manage client-side state and server data in React with Effect Atom, which fills the role TanStack/React Query, SWR, Zustand, Redux, or Jotai play in other stacks — use this skill instead of reaching for those libraries or hand-rolled useEffect fetching whenever a component needs shared state, data fetching, caching, mutations, or optimistic updates. Also use when reading or dispatching atoms (useAtomValue, useAtomSet, useAtom), refactoring promise chains or useState-held server state into atom workflows, choosing reactivity keys and invalidation, deriving AtomHttpApi or HttpApiClient clients from a shared contract, deciding where the Effect→Promise boundary sits, or wiring RegistryProvider and SSR with TanStack Start.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Effect Atom State
|
|
7
|
-
|
|
8
|
-
Effect Atom is the client-state and server-data layer in an Effect repository:
|
|
9
|
-
the role other stacks give TanStack Query, SWR, Zustand, Redux, or Jotai.
|
|
10
|
-
Every need that would reach for one of those libraries — or for hand-rolled
|
|
11
|
-
`useEffect` fetching — is atom work; never introduce a second state or query
|
|
12
|
-
library beside it.
|
|
13
|
-
|
|
14
|
-
Business logic stays in Effect for as long as possible. Components read
|
|
15
|
-
`AsyncResult` values and dispatch actions; workflows, optimistic updates, and
|
|
16
|
-
cache invalidation live in atoms, not in promise chains at the React boundary.
|
|
17
|
-
|
|
18
|
-
Effect Atom APIs are version-sensitive. Read the target repository's manifests
|
|
19
|
-
and lockfile, inspect its existing imports, and confirm exact signatures from
|
|
20
|
-
the installed `effect` and `@effect/atom-react` declarations before editing.
|
|
21
|
-
In current Effect v4 betas the atom modules live in
|
|
22
|
-
`effect/unstable/reactivity` and the React hooks in `@effect/atom-react`.
|
|
23
|
-
|
|
24
|
-
## Build the client state graph
|
|
25
|
-
|
|
26
|
-
1. Inventory the existing `RegistryProvider`, runtime factories,
|
|
27
|
-
`AtomHttpApi.Service` clients, query atoms and families, mutation and
|
|
28
|
-
workflow atoms, reactivity-key constructors, state atoms, and promise-mode
|
|
29
|
-
dispatch sites. Finish when every consumer of the affected state is
|
|
30
|
-
identified.
|
|
31
|
-
2. Read [effect-atom-client.md](references/effect-atom-client.md), then derive
|
|
32
|
-
one `AtomHttpApi.Service` per contract, stable query atoms or families,
|
|
33
|
-
mutation atoms, and one reactivity-key vocabulary. For non-React Effect
|
|
34
|
-
code, use the direct `HttpApiClient` branch. Finish when consumers call the
|
|
35
|
-
shared contract rather than redefining wire types or using ad hoc `fetch`
|
|
36
|
-
for declared endpoints.
|
|
37
|
-
3. Read [effect-atom-workflows.md](references/effect-atom-workflows.md), then
|
|
38
|
-
express every multi-step action — mutate then invalidate, optimistic echo
|
|
39
|
-
then rollback — as an `Atom.fn` effect composing other atoms through the fn
|
|
40
|
-
context. Finish when no component or route chains `.then`/`.catch` on a
|
|
41
|
-
dispatch and no `useState` holds state a workflow atom must own.
|
|
42
|
-
4. Read [effect-atom-lifecycle.md](references/effect-atom-lifecycle.md) when
|
|
43
|
-
changing registry scope, atom identity, retention, freshness, polling,
|
|
44
|
-
cancellation, or aggregate stability.
|
|
45
|
-
5. Read [effect-atom-testing.md](references/effect-atom-testing.md), then give
|
|
46
|
-
changed atom behavior deterministic coverage below React first, with a
|
|
47
|
-
deterministic HTTP layer so request encoding, invalidation, and lifecycle
|
|
48
|
-
remain observable. Run the repository's format, lint, typecheck, and test
|
|
49
|
-
commands. Finish when changed queries, mutations, invalidation, and
|
|
50
|
-
workflow atoms have deterministic tests and every repository check passes.
|
|
51
|
-
|
|
52
|
-
## Optional branches
|
|
53
|
-
|
|
54
|
-
- Read [tanstack-start.md](references/tanstack-start.md) when the client is
|
|
55
|
-
TanStack Start, SSR, hydration, `ClientOnly`, loaders, server functions, or a
|
|
56
|
-
proxied separate API.
|
|
57
|
-
- Use the `$build-effect-apis` skill when the change reaches the contract or
|
|
58
|
-
server: shared `HttpApiEndpoint`/`HttpApiGroup` definitions, handlers,
|
|
59
|
-
middleware, or runtime assembly.
|
|
60
|
-
|
|
61
|
-
## Keep the Promise boundary logic-free
|
|
62
|
-
|
|
63
|
-
The Effect→Promise boundary sits at the outermost edge and carries no logic.
|
|
64
|
-
|
|
65
|
-
- Return a promise-mode dispatch (`useAtomSet(action, { mode: "promise" })`)
|
|
66
|
-
bare to a leaf component whose contract is promise-shaped — a pending
|
|
67
|
-
button, a composer that owns its in-flight state. A `.then` or `.catch`
|
|
68
|
-
chain in a component or route is a violation: move that logic into the
|
|
69
|
-
action's Effect.
|
|
70
|
-
- Express multi-step workflows as `Atom.fn` effects composing other atoms
|
|
71
|
-
through the fn context: `get.setResult` awaits another fn atom, `get.set`
|
|
72
|
-
writes state atoms. Reads through the fn context callable are untracked, so
|
|
73
|
-
mutating a state atom from inside the effect cannot re-trigger the workflow.
|
|
74
|
-
- Declare cross-query invalidation as reactivity keys on the mutation; never
|
|
75
|
-
chain a manual refresh at a call site. When several `AtomHttpApi` services
|
|
76
|
-
share one Atom runtime, one `Reactivity` instance spans them, so a mutation
|
|
77
|
-
on one client invalidates another client's query keys.
|
|
78
|
-
- Keep optimistic UI state in `Atom.family` state atoms keyed by the entity,
|
|
79
|
-
not `useState`, so the workflow atom that writes it owns its lifecycle.
|
|
80
|
-
- Genuine view state — controlled inputs, open/closed toggles, reconciling
|
|
81
|
-
optimistic rows against rendered props — stays in React; do not force it
|
|
82
|
-
into Effect.
|
|
83
|
-
|
|
84
|
-
A repository may reinforce the boundary with a lint warning on `then` scoped
|
|
85
|
-
to component and route modules, with a documented local suppression for a
|
|
86
|
-
genuinely promise-shaped contract, but the boundary reasoning remains the
|
|
87
|
-
source of truth.
|
|
88
|
-
|
|
89
|
-
## Boundary rules
|
|
90
|
-
|
|
91
|
-
- Let client data modules own API services, query identity, cache policy,
|
|
92
|
-
invalidation keys, mutation atoms, and workflow atoms.
|
|
93
|
-
- Let workflow atoms own orchestration, optimistic echo, rollback, and
|
|
94
|
-
cross-query invalidation.
|
|
95
|
-
- Let UI action owners own navigation, toasts, form reset, and presentation
|
|
96
|
-
derived from `AsyncResult` state.
|
|
97
|
-
- Let React own view state that no atom needs to write.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: effect-ts
|
|
3
|
-
description: Use this skill when setting up a repository that uses the Effect Typescript library.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 1: Install effect
|
|
7
|
-
|
|
8
|
-
Use the users preferred package manager:
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
pnpm add effect@beta
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
If in a monorepo, install it as a dev dependency at the root, so you can access
|
|
15
|
-
the source code from `node_modules/effect/src`.
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
pnpm add -D effect@beta
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
# Step 2: Update AGENTS.md / CLAUDE.md
|
|
22
|
-
|
|
23
|
-
Ensure that the agent instructions contain the following:
|
|
24
|
-
|
|
25
|
-
```md
|
|
26
|
-
# Learning more about the Effect
|
|
27
|
-
|
|
28
|
-
This repository uses the Effect Typescript library.
|
|
29
|
-
|
|
30
|
-
Before writing any Effect code, first read `node_modules/effect/AGENTS.md`
|
|
31
|
-
**completely**, and follow the links in the file when required.
|
|
32
|
-
|
|
33
|
-
If you need to learn more about particular Effect apis and concepts that the
|
|
34
|
-
guide doesn't cover, search through the source code in `node_modules/effect/src`.
|
|
35
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|