showdar-skills 0.2.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/LICENSE +9 -0
- package/README.md +322 -0
- package/bin/showdar.js +118 -0
- package/bundles/bugfix.yaml +4 -0
- package/bundles/design.yaml +4 -0
- package/bundles/feature.yaml +4 -0
- package/bundles/release.yaml +4 -0
- package/bundles/upgrade.yaml +4 -0
- package/commands/opencode/showdar/build.md +6 -0
- package/commands/opencode/showdar/debug.md +6 -0
- package/commands/opencode/showdar/design.md +6 -0
- package/commands/opencode/showdar/git.md +6 -0
- package/commands/opencode/showdar/ops.md +7 -0
- package/commands/opencode/showdar/plan.md +6 -0
- package/commands/opencode/showdar/quality.md +7 -0
- package/commands/opencode/showdar/recover.md +6 -0
- package/commands/opencode/showdar/requirements.md +7 -0
- package/commands/opencode/showdar/review.md +6 -0
- package/commands/opencode/showdar/security.md +7 -0
- package/commands/opencode/showdar/ship.md +6 -0
- package/commands/opencode/showdar/skill.md +6 -0
- package/commands/opencode/showdar/test.md +6 -0
- package/commands/opencode/showdar/understand.md +6 -0
- package/commands/opencode/showdar/upgrade.md +6 -0
- package/engine/csv.mjs +45 -0
- package/engine/detect-stack.mjs +48 -0
- package/engine/rank.mjs +40 -0
- package/engine/search.mjs +20 -0
- package/package.json +28 -0
- package/profiles/backend.json +1 -0
- package/profiles/developer.json +1 -0
- package/profiles/full.json +1 -0
- package/profiles/minimal.json +1 -0
- package/profiles/product.json +1 -0
- package/profiles/qa.json +1 -0
- package/router/conflicts.yaml +50 -0
- package/router/skill-map.yaml +54 -0
- package/router/triggers.yaml +30 -0
- package/skills/showdar-build/SKILL.md +154 -0
- package/skills/showdar-build/data/change-smells.csv +24 -0
- package/skills/showdar-build/data/index.json +14 -0
- package/skills/showdar-build/examples/change-surface.md +18 -0
- package/skills/showdar-build/references/architecture-boundaries.md +3 -0
- package/skills/showdar-build/references/error-handling.md +3 -0
- package/skills/showdar-build/references/feature-flags.md +3 -0
- package/skills/showdar-build/references/minimal-change.md +3 -0
- package/skills/showdar-build/scripts/change-surface.mjs +5 -0
- package/skills/showdar-build/stacks/dart.md +3 -0
- package/skills/showdar-build/stacks/flutter.md +3 -0
- package/skills/showdar-build/stacks/kotlin.md +3 -0
- package/skills/showdar-build/stacks/nextjs.md +3 -0
- package/skills/showdar-build/stacks/node-fastify.md +3 -0
- package/skills/showdar-build/stacks/node-nestjs.md +3 -0
- package/skills/showdar-build/stacks/react-native.md +3 -0
- package/skills/showdar-build/stacks/react.md +3 -0
- package/skills/showdar-build/stacks/rust-tauri.md +3 -0
- package/skills/showdar-build/stacks/swift.md +3 -0
- package/skills/showdar-build/stacks/typescript.md +3 -0
- package/skills/showdar-debug/SKILL.md +179 -0
- package/skills/showdar-debug/data/failure-patterns.csv +34 -0
- package/skills/showdar-debug/data/index.json +14 -0
- package/skills/showdar-debug/examples/evidence-log.md +19 -0
- package/skills/showdar-debug/references/async-races.md +3 -0
- package/skills/showdar-debug/references/build-failures.md +3 -0
- package/skills/showdar-debug/references/hypothesis-driven-debugging.md +3 -0
- package/skills/showdar-debug/references/memory.md +3 -0
- package/skills/showdar-debug/references/networking.md +3 -0
- package/skills/showdar-debug/references/performance.md +3 -0
- package/skills/showdar-debug/scripts/collect-context.mjs +8 -0
- package/skills/showdar-debug/scripts/lib/detect-stack.mjs +48 -0
- package/skills/showdar-debug/stacks/android.md +21 -0
- package/skills/showdar-debug/stacks/docker.md +21 -0
- package/skills/showdar-debug/stacks/flutter.md +21 -0
- package/skills/showdar-debug/stacks/ios.md +21 -0
- package/skills/showdar-debug/stacks/nextjs.md +21 -0
- package/skills/showdar-debug/stacks/node.md +21 -0
- package/skills/showdar-debug/stacks/react-native.md +21 -0
- package/skills/showdar-debug/stacks/react.md +21 -0
- package/skills/showdar-debug/stacks/tauri.md +21 -0
- package/skills/showdar-design/SKILL.md +179 -0
- package/skills/showdar-design/data/accessibility.csv +16 -0
- package/skills/showdar-design/data/colors.csv +13 -0
- package/skills/showdar-design/data/components.csv +20 -0
- package/skills/showdar-design/data/index.json +25 -0
- package/skills/showdar-design/data/motion.csv +13 -0
- package/skills/showdar-design/data/products.csv +19 -0
- package/skills/showdar-design/data/stacks/compose.csv +9 -0
- package/skills/showdar-design/data/stacks/flutter.csv +9 -0
- package/skills/showdar-design/data/stacks/html-tailwind.csv +9 -0
- package/skills/showdar-design/data/stacks/nextjs.csv +9 -0
- package/skills/showdar-design/data/stacks/nuxt.csv +9 -0
- package/skills/showdar-design/data/stacks/react-native.csv +9 -0
- package/skills/showdar-design/data/stacks/react.csv +9 -0
- package/skills/showdar-design/data/stacks/svelte.csv +9 -0
- package/skills/showdar-design/data/stacks/swiftui.csv +9 -0
- package/skills/showdar-design/data/stacks/tauri.csv +9 -0
- package/skills/showdar-design/data/stacks/vue.csv +9 -0
- package/skills/showdar-design/data/styles.csv +13 -0
- package/skills/showdar-design/data/typography.csv +13 -0
- package/skills/showdar-design/data/ui-patterns.csv +19 -0
- package/skills/showdar-design/examples/design-brief.md +19 -0
- package/skills/showdar-design/references/accessibility.md +5 -0
- package/skills/showdar-design/references/anti-ai-ui.md +5 -0
- package/skills/showdar-design/references/architecture.md +12 -0
- package/skills/showdar-design/references/interaction.md +5 -0
- package/skills/showdar-design/references/layout.md +5 -0
- package/skills/showdar-design/references/release-readiness.md +12 -0
- package/skills/showdar-design/references/responsive.md +5 -0
- package/skills/showdar-design/references/security.md +12 -0
- package/skills/showdar-design/references/visual-hierarchy.md +7 -0
- package/skills/showdar-design/scripts/lib/csv.mjs +40 -0
- package/skills/showdar-design/scripts/lib/rank.mjs +35 -0
- package/skills/showdar-design/scripts/lib/search.mjs +20 -0
- package/skills/showdar-design/scripts/search.mjs +38 -0
- package/skills/showdar-design/stacks/flutter.md +13 -0
- package/skills/showdar-design/stacks/html-tailwind.md +12 -0
- package/skills/showdar-design/stacks/jetpack-compose.md +13 -0
- package/skills/showdar-design/stacks/nextjs.md +12 -0
- package/skills/showdar-design/stacks/nuxt.md +11 -0
- package/skills/showdar-design/stacks/react-native.md +13 -0
- package/skills/showdar-design/stacks/react.md +12 -0
- package/skills/showdar-design/stacks/svelte.md +11 -0
- package/skills/showdar-design/stacks/swiftui.md +12 -0
- package/skills/showdar-design/stacks/tauri.md +12 -0
- package/skills/showdar-design/stacks/vue.md +12 -0
- package/skills/showdar-git/SKILL.md +291 -0
- package/skills/showdar-git/data/git-workflows.csv +7 -0
- package/skills/showdar-git/data/index.json +14 -0
- package/skills/showdar-git/examples/commit-task-only.md +15 -0
- package/skills/showdar-git/examples/conflict-stop.md +7 -0
- package/skills/showdar-git/examples/explicit-push.md +7 -0
- package/skills/showdar-git/examples/feature-merge-no-push.md +13 -0
- package/skills/showdar-git/references/operation-safety.md +34 -0
- package/skills/showdar-git/scripts/inspect-git-state.mjs +53 -0
- package/skills/showdar-ops/SKILL.md +160 -0
- package/skills/showdar-ops/data/index.json +14 -0
- package/skills/showdar-ops/data/ops-patterns.csv +12 -0
- package/skills/showdar-ops/examples/explicit-deployment.md +5 -0
- package/skills/showdar-ops/examples/fix-existing-ci.md +5 -0
- package/skills/showdar-ops/examples/inspect-ci-readonly.md +7 -0
- package/skills/showdar-ops/examples/rollback-plan.md +5 -0
- package/skills/showdar-ops/examples/staging-plan.md +5 -0
- package/skills/showdar-ops/references/ci-cd.md +5 -0
- package/skills/showdar-ops/references/containers.md +5 -0
- package/skills/showdar-ops/references/deployment.md +5 -0
- package/skills/showdar-ops/references/desktop-release.md +3 -0
- package/skills/showdar-ops/references/environments.md +5 -0
- package/skills/showdar-ops/references/mobile-release.md +3 -0
- package/skills/showdar-ops/references/observability.md +5 -0
- package/skills/showdar-ops/references/rollback.md +5 -0
- package/skills/showdar-ops/scripts/inspect-ops-state.mjs +54 -0
- package/skills/showdar-plan/SKILL.md +159 -0
- package/skills/showdar-plan/data/index.json +14 -0
- package/skills/showdar-plan/data/planning-checklists.csv +25 -0
- package/skills/showdar-plan/examples/feature-plan.md +19 -0
- package/skills/showdar-plan/references/architecture.md +5 -0
- package/skills/showdar-plan/references/requirements.md +5 -0
- package/skills/showdar-plan/references/risk-analysis.md +5 -0
- package/skills/showdar-plan/references/scope.md +5 -0
- package/skills/showdar-plan/references/task-decomposition.md +5 -0
- package/skills/showdar-plan/scripts/collect-planning-context.mjs +9 -0
- package/skills/showdar-plan/scripts/lib/detect-stack.mjs +48 -0
- package/skills/showdar-plan/stacks/backend.md +3 -0
- package/skills/showdar-plan/stacks/mobile.md +3 -0
- package/skills/showdar-plan/stacks/web.md +3 -0
- package/skills/showdar-quality/SKILL.md +166 -0
- package/skills/showdar-quality/data/index.json +14 -0
- package/skills/showdar-quality/data/quality-patterns.csv +11 -0
- package/skills/showdar-quality/references/qa-guide.md +20 -0
- package/skills/showdar-recover/SKILL.md +164 -0
- package/skills/showdar-recover/data/index.json +14 -0
- package/skills/showdar-recover/data/recovery-signals.csv +23 -0
- package/skills/showdar-recover/examples/recovery-report.md +18 -0
- package/skills/showdar-recover/references/failed-runs.md +3 -0
- package/skills/showdar-recover/references/interrupted-session.md +3 -0
- package/skills/showdar-recover/references/merge-conflicts.md +3 -0
- package/skills/showdar-recover/references/partial-implementation.md +3 -0
- package/skills/showdar-recover/scripts/inspect-state.mjs +5 -0
- package/skills/showdar-requirements/SKILL.md +172 -0
- package/skills/showdar-requirements/data/index.json +14 -0
- package/skills/showdar-requirements/data/requirements-patterns.csv +11 -0
- package/skills/showdar-requirements/references/analysis-guide.md +30 -0
- package/skills/showdar-review/SKILL.md +155 -0
- package/skills/showdar-review/data/index.json +14 -0
- package/skills/showdar-review/data/review-patterns.csv +27 -0
- package/skills/showdar-review/examples/finding.md +16 -0
- package/skills/showdar-review/references/architecture.md +3 -0
- package/skills/showdar-review/references/correctness.md +3 -0
- package/skills/showdar-review/references/maintainability.md +3 -0
- package/skills/showdar-review/references/performance.md +3 -0
- package/skills/showdar-review/references/security.md +3 -0
- package/skills/showdar-review/references/testing.md +3 -0
- package/skills/showdar-review/scripts/collect-diff.mjs +5 -0
- package/skills/showdar-review/stacks/android.md +3 -0
- package/skills/showdar-review/stacks/flutter.md +3 -0
- package/skills/showdar-review/stacks/ios.md +3 -0
- package/skills/showdar-review/stacks/nextjs.md +3 -0
- package/skills/showdar-review/stacks/node-backend.md +3 -0
- package/skills/showdar-review/stacks/react-native.md +3 -0
- package/skills/showdar-review/stacks/react.md +3 -0
- package/skills/showdar-review/stacks/swift-kotlin.md +3 -0
- package/skills/showdar-review/stacks/typescript.md +3 -0
- package/skills/showdar-security/SKILL.md +169 -0
- package/skills/showdar-security/data/index.json +14 -0
- package/skills/showdar-security/data/security-patterns.csv +13 -0
- package/skills/showdar-security/examples/api-authorization-review.md +9 -0
- package/skills/showdar-security/examples/mobile-deeplink-review.md +7 -0
- package/skills/showdar-security/examples/secret-exposure-review.md +5 -0
- package/skills/showdar-security/examples/threat-model-open-assumptions.md +11 -0
- package/skills/showdar-security/references/authz-secrets.md +7 -0
- package/skills/showdar-security/references/mobile-security.md +7 -0
- package/skills/showdar-security/references/supply-chain.md +5 -0
- package/skills/showdar-security/references/threat-modeling.md +12 -0
- package/skills/showdar-security/scripts/inspect-security-surface.mjs +47 -0
- package/skills/showdar-ship/SKILL.md +234 -0
- package/skills/showdar-ship/data/index.json +14 -0
- package/skills/showdar-ship/data/release-checks.csv +28 -0
- package/skills/showdar-ship/examples/release-report.md +25 -0
- package/skills/showdar-ship/references/migrations.md +12 -0
- package/skills/showdar-ship/references/post-deploy.md +12 -0
- package/skills/showdar-ship/references/release-readiness.md +13 -0
- package/skills/showdar-ship/references/rollback.md +12 -0
- package/skills/showdar-ship/references/secrets.md +3 -0
- package/skills/showdar-ship/scripts/detect-targets.mjs +5 -0
- package/skills/showdar-ship/scripts/lib/detect-stack.mjs +48 -0
- package/skills/showdar-ship/scripts/release-check.mjs +6 -0
- package/skills/showdar-ship/stacks/android.md +33 -0
- package/skills/showdar-ship/stacks/docker.md +30 -0
- package/skills/showdar-ship/stacks/electron.md +7 -0
- package/skills/showdar-ship/stacks/ios.md +34 -0
- package/skills/showdar-ship/stacks/nextjs.md +30 -0
- package/skills/showdar-ship/stacks/node-backend.md +37 -0
- package/skills/showdar-ship/stacks/orchestration.md +12 -0
- package/skills/showdar-ship/stacks/tauri.md +35 -0
- package/skills/showdar-ship/stacks/web.md +35 -0
- package/skills/showdar-test/SKILL.md +164 -0
- package/skills/showdar-test/data/index.json +14 -0
- package/skills/showdar-test/data/test-strategy.csv +22 -0
- package/skills/showdar-test/examples/regression.md +14 -0
- package/skills/showdar-test/references/e2e.md +3 -0
- package/skills/showdar-test/references/integration.md +3 -0
- package/skills/showdar-test/references/regression.md +3 -0
- package/skills/showdar-test/references/test-smells.md +3 -0
- package/skills/showdar-test/references/unit.md +3 -0
- package/skills/showdar-test/scripts/detect-test-tools.mjs +6 -0
- package/skills/showdar-test/stacks/android-testing.md +13 -0
- package/skills/showdar-test/stacks/detox.md +13 -0
- package/skills/showdar-test/stacks/flutter-test.md +13 -0
- package/skills/showdar-test/stacks/integration-test.md +13 -0
- package/skills/showdar-test/stacks/jest.md +13 -0
- package/skills/showdar-test/stacks/playwright.md +13 -0
- package/skills/showdar-test/stacks/react-native-testing.md +17 -0
- package/skills/showdar-test/stacks/react-testing-library.md +13 -0
- package/skills/showdar-test/stacks/vitest.md +13 -0
- package/skills/showdar-test/stacks/xctest.md +13 -0
- package/skills/showdar-understand/SKILL.md +159 -0
- package/skills/showdar-understand/data/architecture-signals.csv +28 -0
- package/skills/showdar-understand/data/index.json +14 -0
- package/skills/showdar-understand/examples/repository-audit.md +17 -0
- package/skills/showdar-understand/references/architecture-signals.md +25 -0
- package/skills/showdar-understand/references/dependency-analysis.md +9 -0
- package/skills/showdar-understand/references/repository-analysis.md +24 -0
- package/skills/showdar-understand/scripts/inspect-repo.mjs +16 -0
- package/skills/showdar-understand/scripts/lib/detect-stack.mjs +48 -0
- package/skills/showdar-understand/stacks/android.md +3 -0
- package/skills/showdar-understand/stacks/backend.md +5 -0
- package/skills/showdar-understand/stacks/electron.md +3 -0
- package/skills/showdar-understand/stacks/fastify.md +3 -0
- package/skills/showdar-understand/stacks/flutter.md +3 -0
- package/skills/showdar-understand/stacks/ios.md +3 -0
- package/skills/showdar-understand/stacks/mobile.md +5 -0
- package/skills/showdar-understand/stacks/nestjs.md +3 -0
- package/skills/showdar-understand/stacks/nextjs.md +3 -0
- package/skills/showdar-understand/stacks/node.md +3 -0
- package/skills/showdar-understand/stacks/react-native.md +3 -0
- package/skills/showdar-understand/stacks/react.md +3 -0
- package/skills/showdar-understand/stacks/tauri.md +3 -0
- package/skills/showdar-upgrade/SKILL.md +162 -0
- package/skills/showdar-upgrade/data/compatibility-checklist.csv +24 -0
- package/skills/showdar-upgrade/data/index.json +14 -0
- package/skills/showdar-upgrade/examples/upgrade-report.md +18 -0
- package/skills/showdar-upgrade/references/breaking-changes.md +3 -0
- package/skills/showdar-upgrade/references/compatibility.md +3 -0
- package/skills/showdar-upgrade/references/dependency-resolution.md +3 -0
- package/skills/showdar-upgrade/references/migration-strategy.md +3 -0
- package/skills/showdar-upgrade/references/rollback.md +3 -0
- package/skills/showdar-upgrade/scripts/inspect-dependencies.mjs +6 -0
- package/skills/showdar-upgrade/scripts/lib/detect-stack.mjs +48 -0
- package/skills/showdar-upgrade/stacks/android.md +15 -0
- package/skills/showdar-upgrade/stacks/cocoapods-spm.md +17 -0
- package/skills/showdar-upgrade/stacks/expo.md +17 -0
- package/skills/showdar-upgrade/stacks/flutter.md +17 -0
- package/skills/showdar-upgrade/stacks/gradle.md +13 -0
- package/skills/showdar-upgrade/stacks/ios.md +15 -0
- package/skills/showdar-upgrade/stacks/nextjs.md +17 -0
- package/skills/showdar-upgrade/stacks/node.md +17 -0
- package/skills/showdar-upgrade/stacks/react-native.md +17 -0
- package/skills/showdar-upgrade/stacks/react.md +17 -0
- package/skills/showdar-upgrade/stacks/tauri-rust.md +15 -0
- package/src/adapters.js +44 -0
- package/src/catalog.js +57 -0
- package/src/project.js +287 -0
- package/src/runtime.js +9 -0
- package/src/validate.js +310 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Node backend delivery verification
|
|
2
|
+
|
|
3
|
+
Verify the artifact and release-like local runtime by default. Deployment,
|
|
4
|
+
traffic changes, and production data operations require an explicit task.
|
|
5
|
+
|
|
6
|
+
## Artifact and runtime
|
|
7
|
+
|
|
8
|
+
Record Node version/engine, package-manager lockfile, start command, process model, image/base runtime, port, and environment names. Verify the production artifact contains the intended source/generated files and no development-only dependency or secret. Test with the same module mode, CPU architecture, TLS/CA setup, and resource limits as the target; a passing local dev server is not runtime parity.
|
|
9
|
+
|
|
10
|
+
## Data compatibility assessment
|
|
11
|
+
|
|
12
|
+
Classify migrations as additive, backfill, lock-heavy, destructive, or
|
|
13
|
+
irreversible. Assess an expand/contract sequence: compatible readers/writers,
|
|
14
|
+
observable backfill, then removal after old consumers are gone. Confirm old and
|
|
15
|
+
new versions can coexist and that queues, caches, and retries do not duplicate
|
|
16
|
+
side effects. Read `references/migrations.md` and `references/rollback.md`
|
|
17
|
+
without applying production changes.
|
|
18
|
+
|
|
19
|
+
## Health and operations
|
|
20
|
+
|
|
21
|
+
Separate liveness from readiness: readiness must fail when required dependencies are unavailable, while liveness must not restart a process for a temporary downstream outage. Verify graceful shutdown drains requests, stops consumers, closes pools, and respects the termination window. Check structured logs, request IDs, metrics, traces, alert thresholds, secret references by name, and startup config validation.
|
|
22
|
+
|
|
23
|
+
## Wrong turns and rollback
|
|
24
|
+
|
|
25
|
+
Do not use a health endpoint that returns 200 while the application cannot
|
|
26
|
+
serve its critical path, hide config errors with defaults, or claim rollback
|
|
27
|
+
safety without checking schema compatibility. Record prior artifact/config,
|
|
28
|
+
feature-flag state, rollback trigger, queued-message handling, and any
|
|
29
|
+
execution-only checks as unverified.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run tests, static checks, production build, migration dry-run/validation where
|
|
34
|
+
supported, and a release-like local start. Smoke readiness, authentication, one
|
|
35
|
+
critical read/write, dependency outage, timeout, and graceful termination.
|
|
36
|
+
Observe a deployed version only when explicit deployment verification was
|
|
37
|
+
requested.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Container orchestration delivery verification
|
|
2
|
+
|
|
3
|
+
Use this only when the task explicitly concerns orchestration execution or
|
|
4
|
+
review of an existing orchestration configuration. In ordinary Ship mode,
|
|
5
|
+
inspect the files read-only; do not create manifests, modify deployment config,
|
|
6
|
+
change traffic, or operate a cluster.
|
|
7
|
+
|
|
8
|
+
For explicit scope, verify image digest, resource limits, readiness/liveness
|
|
9
|
+
behavior, secret references, rollout strategy, replica availability, and
|
|
10
|
+
rollback target. A rollout is not healthy until new replicas serve the critical
|
|
11
|
+
smoke path and old replicas drain as intended. Keep migration compatibility and
|
|
12
|
+
previous image/config available before changing traffic.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Tauri/desktop delivery verification
|
|
2
|
+
|
|
3
|
+
Verify bundles, signing inputs, and local install/update behavior by default.
|
|
4
|
+
Notarization submission, updater publication, and release-channel changes are
|
|
5
|
+
explicit execution scopes.
|
|
6
|
+
|
|
7
|
+
## Artifact and identity
|
|
8
|
+
|
|
9
|
+
Record Tauri/Rust/frontend versions, target triples, bundle identifier, product name, marketing/build version, updater channel, and artifact formats (`.app`/DMG/PKG, MSI/NSIS, or other configured targets). Verify the packaged frontend assets, Rust release binary, resources, capabilities, icons, and platform-specific paths; a dev-server launch does not validate the bundle.
|
|
10
|
+
|
|
11
|
+
## Signing and updater
|
|
12
|
+
|
|
13
|
+
For macOS verify Developer ID signing, entitlements, hardened runtime, notarization, stapling, and Gatekeeper launch on a clean machine. For Windows verify the configured code-signing identity, timestamping, installer metadata, and SmartScreen-relevant artifact. Check updater endpoint/channel, public key/signature, version ordering, delta/full artifact availability, and failure behavior. Never put signing or updater private keys in the repository or logs.
|
|
14
|
+
|
|
15
|
+
## Artifact and local recovery verification
|
|
16
|
+
|
|
17
|
+
Build each intended target in release mode, inspect artifact names/checksums,
|
|
18
|
+
install without the development checkout, and smoke startup, IPC commands,
|
|
19
|
+
filesystem/network capabilities, deep links, restart, upgrade, and failed-update
|
|
20
|
+
recovery locally. Notarization, updater publication, and release-channel
|
|
21
|
+
verification require explicit execution intent. Keep previous signed artifacts
|
|
22
|
+
and define whether recovery means reinstalling an older version, disabling a
|
|
23
|
+
channel, or shipping a forward fix; already-updated clients and incompatible
|
|
24
|
+
local data can limit rollback.
|
|
25
|
+
|
|
26
|
+
## Wrong turns and caveats
|
|
27
|
+
|
|
28
|
+
Do not grant all capabilities, use absolute developer paths, or call packaging/upload success a release. WebView/WebView2/WebKit, Rust/Tauri APIs, target architectures, OS signing rules, and updater schemas are version-sensitive; verify the current toolchain's supported targets.
|
|
29
|
+
|
|
30
|
+
## Verification
|
|
31
|
+
|
|
32
|
+
Run frontend tests, `cargo test`, the configured release bundle command,
|
|
33
|
+
signature verification, and clean-machine install/update smoke for every
|
|
34
|
+
affected platform. Run notarization or external updater verification only when
|
|
35
|
+
explicitly requested.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Web/static web delivery verification
|
|
2
|
+
|
|
3
|
+
Use this as a local readiness checklist by default. Do not publish the artifact
|
|
4
|
+
or change hosting/CDN configuration unless the request explicitly asks for that
|
|
5
|
+
execution.
|
|
6
|
+
|
|
7
|
+
## Choose the delivery model
|
|
8
|
+
|
|
9
|
+
Identify whether the artifact is static HTML/assets, a Node server, or an edge runtime. A static export cannot read a new server environment variable after build and has no server health endpoint; a Node/edge deployment has startup, runtime API, and scaling constraints. Record framework version, build command, output directory, hosting target, public base path, and the exact artifact or commit being promoted. Use `stacks/nextjs.md` for Next-specific rendering/cache behavior.
|
|
10
|
+
|
|
11
|
+
## Build and configuration
|
|
12
|
+
|
|
13
|
+
Run the production build from a clean dependency install and inspect the output for source maps, routes, asset URLs, redirects, headers, and accidental secret values. Classify every environment variable as build-time public configuration or runtime private configuration. Verify base URL, trailing-slash, locale, image/font handling, CSP, and cache headers against the target CDN; a successful local preview does not prove the deployed path works.
|
|
14
|
+
|
|
15
|
+
## Artifact and local smoke
|
|
16
|
+
|
|
17
|
+
Inspect the immutable artifact and record its digest/version for handoff; do
|
|
18
|
+
not publish it by default. Smoke a local production preview or equivalent:
|
|
19
|
+
homepage, authenticated/critical route, 404/error path, assets,
|
|
20
|
+
redirect/HTTPS behavior, and API origin if present. Check CDN invalidation or
|
|
21
|
+
cache freshness only when the task explicitly concerns delivery execution. Use
|
|
22
|
+
`references/release-readiness.md` for local evidence; use
|
|
23
|
+
`references/post-deploy.md` only for explicit external verification.
|
|
24
|
+
|
|
25
|
+
## Wrong turns and edge cases
|
|
26
|
+
|
|
27
|
+
Do not call a static upload “healthy” because files exist, bake secrets into client bundles, or rely on a dev server to validate production routing. Watch for SPA fallback differences, stale service workers, immutable asset naming, edge-incompatible Node APIs, preview/prod environment drift, and rollback that requires restoring both HTML and referenced assets.
|
|
28
|
+
|
|
29
|
+
## Verification
|
|
30
|
+
|
|
31
|
+
Run the repository's test/typecheck/build commands, inspect the actual artifact,
|
|
32
|
+
and smoke the local production preview from a clean browser/session. A
|
|
33
|
+
deployed URL is not required for ordinary readiness. Record provider, DNS, CDN,
|
|
34
|
+
analytics, and monitoring checks as external/unverified unless explicitly
|
|
35
|
+
requested.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: showdar-test
|
|
3
|
+
description: Use when choosing or implementing automated tests for behavior, regressions, integration, E2E, or coverage.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Showdar Test
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
- Match test level to the boundary/risk being proven.
|
|
11
|
+
- Produce tests that fail for real regressions rather than implementation rearrangement.
|
|
12
|
+
- Use unit, integration, component/widget, E2E, and regression tests deliberately.
|
|
13
|
+
- Keep coverage fast and deterministic while preserving realistic contracts where they matter.
|
|
14
|
+
- Read `references/test-smells.md` before expanding an already-fragile test suite.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- Designing test strategy for a feature or migration.
|
|
19
|
+
- Adding regression coverage for a confirmed bug.
|
|
20
|
+
- Reviewing whether existing tests prove changed behavior.
|
|
21
|
+
- Choosing between unit, integration, widget/component, and E2E levels.
|
|
22
|
+
- Stabilizing flaky tests when the test itself obscures the invariant.
|
|
23
|
+
|
|
24
|
+
## When not to use
|
|
25
|
+
|
|
26
|
+
- Root cause is unknown; debug first so the regression test targets the real defect.
|
|
27
|
+
- The user only wants code review without test implementation.
|
|
28
|
+
- Do not create E2E coverage for every branch already proven cheaply at lower levels.
|
|
29
|
+
- Do not redesign production architecture solely to make mocks easier.
|
|
30
|
+
|
|
31
|
+
## Inputs and assumptions
|
|
32
|
+
|
|
33
|
+
- Behavior/invariant to prove and the boundary where it can fail.
|
|
34
|
+
- Existing test framework and project commands; detect with `scripts/detect-test-tools.mjs` when useful.
|
|
35
|
+
- Existing fixtures/helpers should be reused when they improve clarity, not because they are available.
|
|
36
|
+
- External systems should be real/ephemeral at the level where their semantics are under test.
|
|
37
|
+
|
|
38
|
+
## Non-negotiable rules
|
|
39
|
+
|
|
40
|
+
- A test must name the production behavior that would make it fail.
|
|
41
|
+
- Prefer observable output/state/side effect over private implementation calls.
|
|
42
|
+
- Avoid mocks unless the dependency is external, nondeterministic, expensive, or not the contract under test.
|
|
43
|
+
- No arbitrary sleeps for async synchronization.
|
|
44
|
+
- Regression tests must reproduce the defect before the fix when feasible.
|
|
45
|
+
- Tests must be independently repeatable and not depend on execution order.
|
|
46
|
+
- Keep test-only shortcuts out of production APIs.
|
|
47
|
+
- Do not use snapshot-only assertions for critical behavior.
|
|
48
|
+
|
|
49
|
+
## Workflow
|
|
50
|
+
|
|
51
|
+
### Phase 1 — state the invariant
|
|
52
|
+
- Write one sentence describing what must remain true from the user/system perspective.
|
|
53
|
+
- Identify inputs, state, side effects, errors, and concurrency/time boundaries.
|
|
54
|
+
|
|
55
|
+
### Phase 2 — choose the lowest effective level
|
|
56
|
+
- Query `data/test-strategy.csv` for similar risk. Use indexed categories for unit, component, integration, contract, E2E, regression, property, snapshot, mocking, flaky, concurrency, and performance decisions.
|
|
57
|
+
- Pure policy/parser -> unit.
|
|
58
|
+
- Persistence/HTTP/service boundary -> integration.
|
|
59
|
+
- UI state/interaction -> component/widget.
|
|
60
|
+
- Critical cross-system user journey -> E2E.
|
|
61
|
+
- Production defect -> lowest reliable regression level, plus higher smoke only when additional integration risk exists.
|
|
62
|
+
|
|
63
|
+
### Phase 3 — design the test
|
|
64
|
+
- Use realistic inputs and explicit setup.
|
|
65
|
+
- Control clock/network/process only at the true nondeterministic boundary.
|
|
66
|
+
- Assert behavior and important side effects/errors.
|
|
67
|
+
- Include the smallest meaningful edge cases.
|
|
68
|
+
|
|
69
|
+
### Phase 4 — red proof
|
|
70
|
+
- Run the new regression/behavior test before production change when possible.
|
|
71
|
+
- Confirm it fails for the intended missing behavior, not syntax/fixture error.
|
|
72
|
+
|
|
73
|
+
### Phase 5 — green and refactor
|
|
74
|
+
- Apply/verify implementation until the test passes.
|
|
75
|
+
- Refactor test helpers only after behavior is proven.
|
|
76
|
+
|
|
77
|
+
### Phase 6 — broaden verification
|
|
78
|
+
- Run affected suite and static/build checks relevant to the boundary.
|
|
79
|
+
- Check runtime and flake characteristics for integration/E2E tests.
|
|
80
|
+
|
|
81
|
+
## Decision points
|
|
82
|
+
|
|
83
|
+
- Can unit test fully prove external contract? If persistence/protocol semantics matter, use integration.
|
|
84
|
+
- Does UI issue depend on navigation/native/keyboard? Component test may be insufficient; add targeted integration/E2E.
|
|
85
|
+
- Is timing the bug? Use deterministic barriers/fake clock/event control, not sleep.
|
|
86
|
+
- Is dependency behavior the risk? Do not mock it away.
|
|
87
|
+
- Large matrix? Prefer table/property tests when it improves clarity and failure localization.
|
|
88
|
+
|
|
89
|
+
## Stack detection
|
|
90
|
+
|
|
91
|
+
- Vitest: read `stacks/vitest.md`.
|
|
92
|
+
- Jest: read `stacks/jest.md`.
|
|
93
|
+
- React Testing Library: read `stacks/react-testing-library.md`.
|
|
94
|
+
- React Native testing: read `stacks/react-native-testing.md`.
|
|
95
|
+
- Flutter: read `stacks/flutter-test.md`.
|
|
96
|
+
- Flutter `integration_test`: read `stacks/integration-test.md`.
|
|
97
|
+
- Playwright: read `stacks/playwright.md`.
|
|
98
|
+
- Detox: read `stacks/detox.md`.
|
|
99
|
+
- XCTest: read `stacks/xctest.md`.
|
|
100
|
+
- Android testing: read `stacks/android-testing.md`.
|
|
101
|
+
- Unsupported tools follow the same behavior-first rules and repository-specific commands.
|
|
102
|
+
|
|
103
|
+
## Failure modes
|
|
104
|
+
|
|
105
|
+
- Test asserts that a mock was called but never proves user/system behavior.
|
|
106
|
+
- Flake hidden by retries or longer timeouts.
|
|
107
|
+
- Huge fixture makes failure cause unclear.
|
|
108
|
+
- E2E test duplicates dozens of unit branches and becomes slow/brittle.
|
|
109
|
+
- Snapshot changes are accepted without understanding behavior difference.
|
|
110
|
+
- Regression test passes before the fix because it never reproduces the defect.
|
|
111
|
+
- Test relies on private method/implementation structure.
|
|
112
|
+
|
|
113
|
+
## Stop conditions
|
|
114
|
+
|
|
115
|
+
- Stop when the requested outcome is outside this skill and hand off to the more appropriate workflow.
|
|
116
|
+
- Stop before destructive, irreversible, production, credential, publishing, or deployment actions unless the user explicitly approved them.
|
|
117
|
+
- Stop when required evidence is unavailable and proceeding would require guessing about behavior, ownership, or safety.
|
|
118
|
+
- Stop when a repository instruction conflicts with this playbook; repository/user instructions win.
|
|
119
|
+
- Stop when the targeted invariant is proven at the lowest effective level and affected broader verification is green.
|
|
120
|
+
|
|
121
|
+
## Escalation conditions
|
|
122
|
+
|
|
123
|
+
- Ask when the required external dependency cannot be reproduced locally and mocking it would remove the semantics under test.
|
|
124
|
+
- Escalate flaky infrastructure separately from product regressions.
|
|
125
|
+
- If the bug needs unavailable device/service behavior, define the exact manual/CI scenario instead of inventing a passing local test.
|
|
126
|
+
- Split massive test matrices by invariant/boundary.
|
|
127
|
+
|
|
128
|
+
## Verification
|
|
129
|
+
|
|
130
|
+
- Confirm new test fails for the missing/buggy behavior when possible.
|
|
131
|
+
- Confirm it passes after the correct implementation.
|
|
132
|
+
- For regression proof, revert/disable the causal fix and ensure the test fails when practical.
|
|
133
|
+
- Run affected suite and check zero unexpected warnings/errors.
|
|
134
|
+
- Ensure no arbitrary timing sleeps or leaked resources remain.
|
|
135
|
+
- Report levels/environments not run.
|
|
136
|
+
|
|
137
|
+
## Output contract
|
|
138
|
+
|
|
139
|
+
- **Invariant** being proven.
|
|
140
|
+
- **Chosen test level** and reason.
|
|
141
|
+
- **Cases** including important edge/error behavior.
|
|
142
|
+
- **Test files/fixtures** changed.
|
|
143
|
+
- **Red/green evidence** where applicable.
|
|
144
|
+
- **Broader verification** commands/results.
|
|
145
|
+
- **Known gaps** requiring device/CI/external environment.
|
|
146
|
+
|
|
147
|
+
## Anti-patterns
|
|
148
|
+
|
|
149
|
+
- “100% coverage” as a quality goal detached from behavior.
|
|
150
|
+
- Mocking the database/network/parser when its actual semantics are the risk.
|
|
151
|
+
- One giant E2E test for all product behavior.
|
|
152
|
+
- Sleeping to wait for async work.
|
|
153
|
+
- Snapshot-only regression proof.
|
|
154
|
+
- Testing implementation details to make refactors painful.
|
|
155
|
+
- Adding tests after code only to mirror current implementation without proving intent.
|
|
156
|
+
|
|
157
|
+
## Example
|
|
158
|
+
|
|
159
|
+
Bug: duplicate payment submission after rapid retry.
|
|
160
|
+
- Invariant: same idempotency key cannot create two payment effects.
|
|
161
|
+
- Preferred proof: integration test around request/service/persistence boundary.
|
|
162
|
+
- Add UI/E2E only if client retry/navigation behavior also caused duplicate requests.
|
|
163
|
+
- Verify regression test fails when idempotency enforcement is disabled.
|
|
164
|
+
- See `examples/regression.md`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"skill": "showdar-test",
|
|
4
|
+
"datasets": [
|
|
5
|
+
{
|
|
6
|
+
"file": "data/test-strategy.csv",
|
|
7
|
+
"idField": "id",
|
|
8
|
+
"requiredColumns": ["id", "category", "preferred_level", "when", "reason", "example", "anti_pattern", "verification", "tags", "reference", "stack"],
|
|
9
|
+
"searchableFields": ["category", "preferred_level", "when", "reason", "example", "anti_pattern", "verification", "tags"],
|
|
10
|
+
"filterFields": ["category", "preferred_level", "stack"],
|
|
11
|
+
"reference": "references/unit.md"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
id,category,preferred_level,when,reason,example,anti_pattern,verification,tags,reference,stack
|
|
2
|
+
unit-policy,unit,unit,pure deterministic policy,rule has no external semantics,fee calculation or reducer transition,mocking the function under test,assert inputs outputs and boundary cases,unit invariant,references/unit.md,*
|
|
3
|
+
unit-parser,unit,unit,parser or serializer,format and error cases are local; enumerable boundary behavior,date token or config parser,snapshot only for parser output,malformed and representative fixtures,parser boundary,references/unit.md,*
|
|
4
|
+
unit-property,property-based,property-based,large input domain or algebraic invariant,examples alone leave broad cases; find counterexamples automatically,parser round trip or idempotent normalization,random uncontrolled generator,seeded generators and minimal counterexample,property invariant,references/unit.md,vitest
|
|
5
|
+
component-state,component,component,UI state and interaction,rendering plus local event ownership is the risk,form validation or selector rebuild,mock every child and assert calls,assert role text state and user action,component behavior,references/integration.md,react-testing-library
|
|
6
|
+
component-accessibility,component,component,semantic UI contract,accessible name role focus and error are behavior,keyboard form flow or custom control,assert only class names,query by role or name and inspect focus,error semantics,references/integration.md,react-testing-library
|
|
7
|
+
integration-http,integration,integration,HTTP route and service,validation auth mapping and persistence cross boundary,POST creates resource or returns typed error,mock service and assert handler call,real request plus response and durable effect,http contract,references/integration.md,node
|
|
8
|
+
integration-database,integration,integration,persistence semantics,transaction constraints isolation or query behavior matters,unique constraint and rollback,in-memory object fake for DB semantics,ephemeral DB or repository integration test,database semantics,references/integration.md,node
|
|
9
|
+
integration-cache,integration,integration,cache and source interaction,invalidation freshness and key ownership matter,mutation then query returns fresh result,clear cache in setup after every action,assert targeted and unrelated keys,cache consistency,references/integration.md,*
|
|
10
|
+
contract-api,contract,contract,public API compatibility,independent producer and consumer must agree,OpenAPI or JSON response fixture,duplicated type assertion with no wire fixture,consumer/provider contract check,api compatibility,references/integration.md,node
|
|
11
|
+
contract-native,contract,contract,native bridge payload,serialization and platform error mapping matter,MethodChannel or IPC command response,testing only platform mock shape,real bridge fixture or platform test,bridge contract,references/integration.md,ios
|
|
12
|
+
e2e-critical,e2e,e2e,critical user journey,system integration and navigation risk remains,login then purchase then confirmation,all branches duplicated in E2E,deterministic seed and user-visible assertions,critical journey,references/e2e.md,playwright
|
|
13
|
+
e2e-mobile,e2e,e2e,native mobile journey,keyboard permissions lifecycle or deep links cross layers,launch then permission then submit,arbitrary tap sleeps,Detox synchronization and stable semantics,native journey,references/e2e.md,detox
|
|
14
|
+
regression-lowest,regression,regression,known production defect,reported invariant needs permanent proof,duplicate payment submission,write a broad E2E without reproducer,red before fix and green after,regression proof,references/regression.md,*
|
|
15
|
+
regression-revert,regression,regression,causal fix must be guarded,fix could be removed in future,stale cache or race,assert test after implementation only,revert or disable fix and confirm red when practical,regression proof,references/regression.md,*
|
|
16
|
+
mock-boundary,mocking,mocking,unavailable external service,dependency is not the semantics under test,clock provider or payment gateway boundary,mock database for transaction behavior,contract-shaped fake and one real integration path,mocking boundary,references/test-smells.md,*
|
|
17
|
+
mock-restore,mocking,mocking,module or timer replacement,tests mutate global or module state,isolated clock or browser API,leaked mocks affect later tests,restore in teardown and run repeatably,test isolation,references/test-smells.md,jest
|
|
18
|
+
flaky-order,flaky,flaky,order-dependent test,passes alone but fails in suite,shared mutable fixture or leaked server,parallel-safe test data,repeat in random or parallel order without retry,flaky order,references/test-smells.md,*
|
|
19
|
+
flaky-timing,flaky,flaky,timing-dependent async,uses sleep or guessed timeout,eventual UI or queue completion,arbitrary sleep,wait on state barrier or event with bounded timeout,flaky timing,references/test-smells.md,playwright
|
|
20
|
+
concurrency,concurrency,concurrency,race or duplicate effect,ordering and idempotency are the invariant,release two requests in controlled order,run sequentially only,barriers force both interleavings,concurrency invariant,references/integration.md,*
|
|
21
|
+
performance,performance,performance,latency memory or frame budget,scale changes user experience,10000 row query or list scroll,assert duration on noisy shared host,benchmark stable path and regression threshold,performance budget,references/test-smells.md,*
|
|
22
|
+
snapshot,snapshot,snapshot,stable structural output,large static structure is costly to assert manually,accessibility tree or generated config,snapshot is sole proof of behavior,review diff and pair with semantic assertions,snapshot review,references/test-smells.md,*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Example regression choice
|
|
2
|
+
|
|
3
|
+
Bug: rapid retry creates two payment records.
|
|
4
|
+
|
|
5
|
+
Observed contract: one logical checkout has one idempotency key, and the server
|
|
6
|
+
must return the original result for repeated requests even when requests overlap.
|
|
7
|
+
|
|
8
|
+
Lowest reliable proof: an integration test sends two concurrent requests with the
|
|
9
|
+
same key, asserts one persisted payment, and asserts both responses identify the
|
|
10
|
+
same result. Include the database uniqueness constraint in the test environment.
|
|
11
|
+
|
|
12
|
+
Avoid making tap timing the only proof; an E2E test is appropriate only if the
|
|
13
|
+
client retry/navigation behavior is also part of the defect. Add the E2E smoke
|
|
14
|
+
after the deterministic server regression is green.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# End-to-end tests
|
|
2
|
+
|
|
3
|
+
Reserve E2E for critical user journeys and integration risk that lower levels cannot prove. Keep flows deterministic, seed state deliberately, use role/label semantics, and assert user-visible outcomes plus recovery. Cover one happy path and the highest-risk failure/permission/navigation path. Do not duplicate every unit case through E2E, hide flakes with retries, or use arbitrary sleeps.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Integration tests
|
|
2
|
+
|
|
3
|
+
Use when correctness depends on boundaries working together: HTTP plus validation plus service, persistence adapter plus real database semantics, component plus state provider, cache invalidation, or native bridge wrapper. Prefer realistic or ephemeral dependencies for the contract under risk. Control time and concurrency with barriers, seed isolated data, assert response plus durable side effect, and clean resources at their owner. Do not mock away the boundary being proven.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Regression tests
|
|
2
|
+
|
|
3
|
+
First reproduce the reported symptom with a focused test or executable scenario. Verify it fails for the original defect rather than a fixture error, passes with the causal fix, and ideally fails again when the fix is disabled or reverted. Encode the user/system invariant, including negative and ordering cases, not the implementation accident. Keep one higher-level smoke only when an additional boundary is part of the defect.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Test smells
|
|
2
|
+
|
|
3
|
+
Warning signs: mocks that assert mocks, sleeps for timing, snapshot-only behavior proof, huge shared fixtures, tests coupled to private methods, duplicate E2E coverage, environment-dependent order, leaked resources, blanket retries, and tests that can pass while the user-visible bug remains. Replace sleeps with state/barrier/event synchronization; replace mock choreography with observable behavior; retain snapshots only as reviewed structural evidence paired with semantic assertions.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Unit tests
|
|
2
|
+
|
|
3
|
+
Use for deterministic policy, parsing, calculations, reducers/state transitions, and small components/functions where dependencies are not the behavior under test. State the invariant first, use table/property cases for meaningful boundaries, and assert observable output/state or error—not internal call choreography. Keep fixtures local and deterministic. Move upward to integration when persistence, protocol, cache, lifecycle, or native semantics are the risk.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { access, readFile } from 'node:fs/promises'; import path from 'node:path';
|
|
3
|
+
const root=path.resolve(process.argv[2]??process.cwd()); const out=[];
|
|
4
|
+
try{const p=JSON.parse(await readFile(path.join(root,'package.json'),'utf8'));const d={...(p.dependencies??{}),...(p.devDependencies??{})};for(const [pkg,name] of [['vitest','vitest'],['jest','jest'],['@playwright/test','playwright'],['detox','detox']])if(d[pkg])out.push(name)}catch{}
|
|
5
|
+
try{await access(path.join(root,'pubspec.yaml'));const s=await readFile(path.join(root,'pubspec.yaml'),'utf8');if(/flutter_test/.test(s))out.push('flutter-test');if(/integration_test/.test(s))out.push('flutter-integration-test')}catch{}
|
|
6
|
+
console.log(JSON.stringify({root,tools:[...new Set(out)]},null,2));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Android testing
|
|
2
|
+
|
|
3
|
+
## Choose the boundary
|
|
4
|
+
|
|
5
|
+
Use JVM unit tests for pure Kotlin policy, repository/Room or service integration for real persistence/protocol semantics, and instrumented/UI tests for Android lifecycle, permissions, resources, navigation, process restoration, Compose/View rendering, and device APIs. Robolectric can speed framework-adjacent tests but is not proof of device behavior; use an emulator/device for native timing, ABI, or release configuration risk.
|
|
6
|
+
|
|
7
|
+
## Deterministic lifecycle
|
|
8
|
+
|
|
9
|
+
Control coroutine dispatchers, virtual time, lifecycle state, and test data explicitly. Assert semantics, visible UI/accessibility, navigation, durable state, and recovery after process death—not only mock calls. Use real Room/serialization/network boundaries when those are the contract; fake external services at a controlled server boundary instead of mocking the repository under test. Reset permissions, files, databases, and app state per test owner.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Watch for main-thread violations, leaked coroutines, idling-resource gaps, animation/Compose recomposition timing, API/OEM differences, manifest variant drift, and emulator state pollution. Run the focused Gradle test task, then the affected instrumentation/UI task on the supported API/ABI matrix; collect Logcat, screenshots, and test artifacts. Include a release-like/R8 configuration when that is part of the risk. See `references/unit.md`, `references/integration.md`, and `references/e2e.md`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Detox
|
|
2
|
+
|
|
3
|
+
## Boundary and suitability
|
|
4
|
+
|
|
5
|
+
Use Detox for React Native journeys whose risk is native lifecycle, navigation, permissions, keyboard, deep links, real networking, or release-like packaging. Keep pure reducer/component behavior in Jest/React Native Testing Library; do not turn every JavaScript branch into a device journey.
|
|
6
|
+
|
|
7
|
+
## Synchronization and setup
|
|
8
|
+
|
|
9
|
+
Detox relies on app idling/resource synchronization. Drive the app to a known state with deterministic fixtures, launch arguments, deep links, or a test-only reset boundary. Use stable accessibility labels/test IDs only where semantic queries are unavailable or ambiguous. Wait for visible state/idle conditions and explicit native events; never add `sleep` to mask an unsatisfied synchronization contract. Control permissions, animations, network, and clock at the actual nondeterministic boundary.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Watch for infinite timers, animations, background tasks, image/network requests, native modules, and dev-server dependencies that keep the app busy or make it look idle too soon. Run the same debug/release-like build and architecture relevant to the issue, capture device logs/artifacts, and distinguish app crash from Detox synchronization failure. Keep failed screenshots/logs and rerun the focused journey before the full device suite; use retries only as diagnostic evidence, never as flake removal. See `references/e2e.md` and `references/test-smells.md`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Flutter test
|
|
2
|
+
|
|
3
|
+
## Choose the boundary
|
|
4
|
+
|
|
5
|
+
Use pure Dart tests for deterministic policy/parsing, widget tests for build/layout/interaction and provider/Bloc/Cubit state, and `integration_test` for real platform channels, plugins, navigation, permissions, and device lifecycle. Do not use a widget test to claim native integration works.
|
|
6
|
+
|
|
7
|
+
## Synchronization and doubles
|
|
8
|
+
|
|
9
|
+
Pump only the frames required by the invariant: `pump`, `pumpAndSettle`, or an explicit frame/event barrier. `pumpAndSettle` can hang or hide an animation/timer leak, so use a bounded explicit pump when the app intentionally remains busy. Control clocks and async work deterministically; inject repositories/services rather than mocking the widget tree. Assert semantics, visible state, error/recovery, and important side effects rather than private widget fields.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Watch for `BuildContext` used after disposal, provider scope that differs from production, unconstrained `pumpAndSettle`, golden tests that vary by font/renderer, leaked timers/streams, and platform calls replaced by mocks in a test that claims plugin behavior. Run `flutter test` for focused unit/widget cases and the repository's analyzer; use profile/release-like integration coverage for performance or native risk. Read `references/unit.md`, `references/integration.md`, and `references/test-smells.md`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Flutter integration_test
|
|
2
|
+
|
|
3
|
+
## Boundary and suitability
|
|
4
|
+
|
|
5
|
+
Use Flutter `integration_test` for a real app process on a simulator, emulator, or device when correctness depends on platform plugins, channels, navigation, permissions, persistence, lifecycle, or rendering beyond widget tests. Keep pure Dart and widget state at lower levels so device tests remain a small risk-focused set.
|
|
6
|
+
|
|
7
|
+
## Deterministic setup
|
|
8
|
+
|
|
9
|
+
Seed isolated accounts/files/databases, launch with explicit test configuration, and reset state at the owner boundary. Use real request/repository/cache/bridge semantics when they are under test; fake only external services whose behavior is not the invariant. Synchronize on app state, frame completion, or an explicit event—not arbitrary sleeps—and control network/clock only when that boundary is the source of nondeterminism. Assert visible outcome plus durable side effect or rollback.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Watch for permissions left from a previous run, process death/background state, animations and pending timers, device locale/timezone, flaky network fixtures, leaked ports/files, and tests that pass on one platform because a plugin has different native behavior. Run `flutter test integration_test`, capture device logs/screenshots, and repeat failed cases on the supported device/API matrix. Report simulator-only or unavailable physical-device coverage. See `references/integration.md`, `references/e2e.md`, and `references/test-smells.md`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Jest
|
|
2
|
+
|
|
3
|
+
## Choose the boundary
|
|
4
|
+
|
|
5
|
+
Use Jest for unit/module tests and framework integrations already supported by the repository's preset. Select `node`, `jsdom`, or the React Native preset deliberately; the environment changes globals, timers, module resolution, and native shims. Use integration tests for real persistence/HTTP/cache behavior and Detox or another E2E tool for native lifecycle, permissions, and device rendering.
|
|
6
|
+
|
|
7
|
+
## Doubles and lifecycle
|
|
8
|
+
|
|
9
|
+
Avoid webs of `jest.mock`; mock only external or nondeterministic boundaries and keep one real path for the contract under test. Reset/restore spies, mocks, fake timers, module registry, and global state in the owning teardown. Await user/data promises and use `act`/library async helpers for React updates. In React Native assert visible behavior and navigation/state effects, not instance methods or private component fields.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Watch for hoisted module mocks, stale singleton modules, fake timers that leave promises pending, `jsdom` behavior that differs from native, and tests that depend on file/order or worker state. Do not fix flakes with retries or a larger timeout before finding the leaked resource or missing barrier. Run the focused test, affected Jest project/preset, then the normal parallel suite; rerun the failed file in band when diagnosing isolation, not as the final proof. See `references/unit.md`, `references/integration.md`, and `references/test-smells.md`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Playwright
|
|
2
|
+
|
|
3
|
+
## Boundary and suitability
|
|
4
|
+
|
|
5
|
+
Use Playwright for critical browser journeys, cross-page/session behavior, real routing, browser APIs, and integration risk that lower-level tests cannot prove. Keep business-rule matrices in unit/component tests. Choose the target browsers/projects intentionally and record whether the risk is Chromium-only, cross-browser, mobile viewport, or server/runtime behavior.
|
|
6
|
+
|
|
7
|
+
## Deterministic flow
|
|
8
|
+
|
|
9
|
+
Seed isolated data and authenticate through a supported fixture/API boundary rather than clicking a long setup path in every test. Prefer role/label/test-id locators with stable semantics, user-visible assertions, and explicit `expect` retries. Use `waitForResponse`/network assertions only when the protocol is the contract; otherwise wait for the rendered state. Capture trace/video/screenshot on failure and isolate accounts, files, and storage per worker.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Avoid arbitrary sleeps, CSS selectors tied to styling, shared mutable users, blanket retries, and tests that pass against mocked responses while the real app wiring is broken. Watch for service-worker/cache pollution, missing web-server readiness, timezone/locale drift, popup/download cleanup, and parallel port collisions. Run the focused project with its normal web server, then the affected browser matrix; use trace evidence to classify product failure versus test/environment flake. See `references/e2e.md` and `references/test-smells.md`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# React Native testing
|
|
2
|
+
|
|
3
|
+
## Choose the boundary
|
|
4
|
+
|
|
5
|
+
Use React Native Testing Library/Jest for JavaScript behavior, rendered semantics, navigation state, and provider integration. Use Detox for native lifecycle, permissions, deep links, keyboard, real layout, native modules, and release-like packaging. A component test cannot prove Hermes, JSI/TurboModule, Fabric, Android/iOS configuration, or process-death behavior.
|
|
6
|
+
|
|
7
|
+
## Rendering and async
|
|
8
|
+
|
|
9
|
+
Render through the smallest realistic provider/navigation boundary and query by role, label, text, or test ID only when semantics are unavailable. Use `act`, `findBy*`, and explicit event/state barriers for updates; do not sleep or call private component methods. Wait for navigation focus/blur, async data, and animations through the library/native synchronization that represents the contract. Test loading, error, cancellation, stale-response, unmount, and retry paths when lifecycle is involved.
|
|
10
|
+
|
|
11
|
+
## Doubles and native edges
|
|
12
|
+
|
|
13
|
+
Mock only external services or native APIs whose semantics are outside the current test, and keep a real integration path for caches, serializers, and native bridge wrappers. Watch for fake timers blocking promises, Reanimated/gesture mocks hiding UI-thread behavior, Metro transform differences, leaked subscriptions, and platform-specific accessibility/permission behavior. Keep fixtures deterministic and reset storage/query caches per test.
|
|
14
|
+
|
|
15
|
+
## Verification
|
|
16
|
+
|
|
17
|
+
Run the focused Jest/RN Testing Library test, affected JS suite, and Detox journey for native risk. Repeat with the repository's normal Metro/Hermes configuration and capture device logs for native failures; report platform/architecture coverage that was not run. See `references/integration.md`, `references/e2e.md`, and `references/test-smells.md`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# React Testing Library
|
|
2
|
+
|
|
3
|
+
## Boundary and setup
|
|
4
|
+
|
|
5
|
+
Use React Testing Library for component behavior, accessibility, state transitions, and provider integration that can run in a deterministic DOM environment. Render through the smallest realistic provider boundary: include router/query/auth providers when their behavior is part of the invariant, but do not mount the entire application for every unit case. Use `screen` queries by role, label, or visible text and drive user events, not component instances.
|
|
6
|
+
|
|
7
|
+
## Async and assertions
|
|
8
|
+
|
|
9
|
+
Await user interactions and use `findBy*`/`waitFor` for observable state transitions. Assert loading, success, error, focus, accessible name, navigation, and important side effects; also assert that stale/aborted data does not overwrite current UI when that is the risk. Mock only network or external services when their semantics are outside the test, and keep a real cache/data-provider integration path. Do not use arbitrary sleeps or snapshots as the only behavior proof.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Watch for missing `act`, over-broad providers, leaked query caches, ambiguous queries, fake timers that block transitions, and tests that pass because a mock bypassed validation/cache behavior. Use a deterministic server/fixture boundary, clear state per test, and run the focused component test followed by the affected suite. Read `references/integration.md`, `references/e2e.md`, and `references/test-smells.md` when deciding whether the browser boundary belongs elsewhere.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Vitest
|
|
2
|
+
|
|
3
|
+
## Choose the boundary
|
|
4
|
+
|
|
5
|
+
Use Vitest for fast deterministic unit tests, pure utilities, and module-level integration when the Vite/ESM transform is part of the contract. Move to a browser/component or E2E tool when DOM layout, real navigation, browser APIs, or cross-process behavior is the risk. Keep one test focused on the invariant rather than mirroring every implementation branch.
|
|
6
|
+
|
|
7
|
+
## Doubles and async
|
|
8
|
+
|
|
9
|
+
Prefer real modules and in-memory deterministic inputs. Mock only external, nondeterministic, expensive, or unavailable boundaries; do not mock the parser, cache, or adapter whose semantics the test claims to prove. Use `await` on the real promise, fake timers only when time is the boundary, and flush the specific event/barrier rather than sleeping. Reset modules/globals/timers in teardown so environment-dependent imports do not leak across tests.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Watch for ESM/CJS transform differences, shared singleton state, tests that pass in isolation but fail in parallel, unhandled promise rejections, and fake timers that prevent promise/microtask progress. Run the focused file first, then the affected project command; repeat with the repository's normal worker/concurrency setting when isolation or flake is suspected. Read `references/unit.md`, `references/integration.md`, and `references/test-smells.md` for boundary decisions.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# XCTest
|
|
2
|
+
|
|
3
|
+
## Choose the boundary
|
|
4
|
+
|
|
5
|
+
Use XCTest unit tests for pure Swift policy and async transformations, target/integration tests for persistence, networking, dependency injection, and native framework boundaries, and XCUITest for critical user journeys, permissions, deep links, and lifecycle. Keep UI tests small; they are not a substitute for deterministic model tests.
|
|
6
|
+
|
|
7
|
+
## Async and platform setup
|
|
8
|
+
|
|
9
|
+
Use structured concurrency, async test methods, expectations, or notification/predicate waits tied to a real event. Do not sleep to wait for a network, animation, or actor. Assert user-visible/accessibility outcomes and durable effects, not private view hierarchy details. Select the affected scheme/target, deployment target, simulator/device, locale, and permissions explicitly; reset keychain/files/database state at the owner boundary.
|
|
10
|
+
|
|
11
|
+
## Failure modes and verification
|
|
12
|
+
|
|
13
|
+
Watch for expectations fulfilled twice, main-actor violations, unstructured tasks outliving the test, shared simulator state, animation timing, network dependence, and tests that pass on simulator but fail with device entitlements or hardware. Run the focused XCTest/XCUITest scheme, then the normal test plan; collect diagnostics/screenshots and record simulator/device, OS, and signing limitations. Read `references/integration.md`, `references/e2e.md`, and `references/test-smells.md`.
|