@cubis/foundry 0.3.70 → 0.3.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cli/core.js +4 -18
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +4 -18
- package/workflows/powers/accessibility/POWER.md +83 -94
- package/workflows/powers/accessibility/SKILL.md +82 -94
- package/workflows/powers/agent-design/POWER.md +201 -0
- package/workflows/powers/agent-design/SKILL.md +198 -0
- package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/powers/agent-design/references/skill-testing.md +164 -0
- package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/powers/agentic-eval/POWER.md +62 -0
- package/workflows/powers/agentic-eval/SKILL.md +59 -0
- package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
- package/workflows/powers/api-designer/POWER.md +43 -71
- package/workflows/powers/api-designer/SKILL.md +43 -71
- package/workflows/powers/api-patterns/POWER.md +42 -56
- package/workflows/powers/api-patterns/SKILL.md +42 -57
- package/workflows/powers/architecture-designer/POWER.md +43 -60
- package/workflows/powers/architecture-designer/SKILL.md +43 -60
- package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
- package/workflows/powers/ask-questions-if-underspecified/SKILL.md +51 -3
- package/workflows/powers/auth-architect/POWER.md +69 -0
- package/workflows/powers/auth-architect/SKILL.md +66 -0
- package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
- package/workflows/powers/behavioral-modes/POWER.md +100 -9
- package/workflows/powers/behavioral-modes/SKILL.md +100 -9
- package/workflows/powers/c-pro/POWER.md +105 -0
- package/workflows/powers/c-pro/SKILL.md +102 -0
- package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
- package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
- package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
- package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
- package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
- package/workflows/powers/changelog-generator/POWER.md +127 -63
- package/workflows/powers/changelog-generator/SKILL.md +126 -63
- package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
- package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
- package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
- package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
- package/workflows/powers/cli-developer/POWER.md +152 -95
- package/workflows/powers/cli-developer/SKILL.md +152 -95
- package/workflows/powers/cpp-pro/POWER.md +111 -0
- package/workflows/powers/cpp-pro/SKILL.md +108 -0
- package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
- package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
- package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
- package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
- package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
- package/workflows/powers/csharp-pro/POWER.md +47 -22
- package/workflows/powers/csharp-pro/SKILL.md +47 -22
- package/workflows/powers/dart-pro/POWER.md +68 -0
- package/workflows/powers/dart-pro/SKILL.md +65 -0
- package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
- package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
- package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
- package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
- package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
- package/workflows/powers/database-design/POWER.md +47 -33
- package/workflows/powers/database-design/SKILL.md +47 -33
- package/workflows/powers/database-optimizer/POWER.md +43 -64
- package/workflows/powers/database-optimizer/SKILL.md +43 -64
- package/workflows/powers/database-skills/POWER.md +59 -93
- package/workflows/powers/database-skills/SKILL.md +59 -93
- package/workflows/powers/debugging-strategies/POWER.md +69 -0
- package/workflows/powers/debugging-strategies/SKILL.md +66 -0
- package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
- package/workflows/powers/deep-research/POWER.md +67 -0
- package/workflows/powers/deep-research/SKILL.md +64 -0
- package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
- package/workflows/powers/design-system-builder/POWER.md +130 -116
- package/workflows/powers/design-system-builder/SKILL.md +130 -116
- package/workflows/powers/devops-engineer/POWER.md +120 -57
- package/workflows/powers/devops-engineer/SKILL.md +120 -57
- package/workflows/powers/docker-kubernetes/POWER.md +94 -0
- package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
- package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
- package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
- package/workflows/powers/documentation-templates/POWER.md +158 -127
- package/workflows/powers/documentation-templates/SKILL.md +158 -127
- package/workflows/powers/drizzle-expert/POWER.md +66 -0
- package/workflows/powers/drizzle-expert/SKILL.md +63 -0
- package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
- package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
- package/workflows/powers/error-ux-observability/POWER.md +144 -131
- package/workflows/powers/error-ux-observability/SKILL.md +143 -131
- package/workflows/powers/fastapi-expert/POWER.md +46 -60
- package/workflows/powers/fastapi-expert/SKILL.md +46 -60
- package/workflows/powers/firebase/POWER.md +65 -0
- package/workflows/powers/firebase/SKILL.md +62 -0
- package/workflows/powers/firebase/references/platform-routing.md +16 -0
- package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
- package/workflows/powers/flutter-design-system/POWER.md +63 -0
- package/workflows/powers/flutter-design-system/SKILL.md +60 -0
- package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
- package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
- package/workflows/powers/flutter-drift/POWER.md +65 -0
- package/workflows/powers/flutter-drift/SKILL.md +62 -0
- package/workflows/powers/flutter-drift/references/migrations.md +22 -0
- package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
- package/workflows/powers/flutter-feature/POWER.md +65 -0
- package/workflows/powers/flutter-feature/SKILL.md +62 -0
- package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
- package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
- package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
- package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
- package/workflows/powers/flutter-go-router/POWER.md +64 -0
- package/workflows/powers/flutter-go-router/SKILL.md +61 -0
- package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
- package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
- package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
- package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
- package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
- package/workflows/powers/flutter-repository/POWER.md +64 -0
- package/workflows/powers/flutter-repository/SKILL.md +61 -0
- package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
- package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
- package/workflows/powers/flutter-riverpod/POWER.md +70 -0
- package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
- package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
- package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
- package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
- package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
- package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
- package/workflows/powers/flutter-state-machine/POWER.md +62 -0
- package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
- package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
- package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
- package/workflows/powers/flutter-testing/POWER.md +64 -0
- package/workflows/powers/flutter-testing/SKILL.md +61 -0
- package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
- package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
- package/workflows/powers/frontend-code-review/POWER.md +137 -0
- package/workflows/powers/frontend-code-review/SKILL.md +134 -0
- package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
- package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
- package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
- package/workflows/powers/frontend-design/POWER.md +163 -362
- package/workflows/powers/frontend-design/SKILL.md +163 -362
- package/workflows/powers/game-development/POWER.md +57 -140
- package/workflows/powers/game-development/SKILL.md +57 -140
- package/workflows/powers/geo-fundamentals/POWER.md +64 -126
- package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
- package/workflows/powers/git-workflow/POWER.md +135 -0
- package/workflows/powers/git-workflow/SKILL.md +132 -0
- package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
- package/workflows/powers/golang-pro/POWER.md +46 -35
- package/workflows/powers/golang-pro/SKILL.md +46 -35
- package/workflows/powers/graphql-architect/POWER.md +44 -62
- package/workflows/powers/graphql-architect/SKILL.md +44 -62
- package/workflows/powers/i18n-localization/POWER.md +118 -103
- package/workflows/powers/i18n-localization/SKILL.md +118 -103
- package/workflows/powers/java-pro/POWER.md +47 -22
- package/workflows/powers/java-pro/SKILL.md +47 -22
- package/workflows/powers/javascript-pro/POWER.md +47 -34
- package/workflows/powers/javascript-pro/SKILL.md +47 -34
- package/workflows/powers/kotlin-pro/POWER.md +46 -23
- package/workflows/powers/kotlin-pro/SKILL.md +46 -23
- package/workflows/powers/legacy-modernizer/POWER.md +43 -60
- package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
- package/workflows/powers/mcp-builder/POWER.md +65 -0
- package/workflows/powers/mcp-builder/SKILL.md +62 -0
- package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
- package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
- package/workflows/powers/microservices-architect/POWER.md +43 -70
- package/workflows/powers/microservices-architect/SKILL.md +43 -70
- package/workflows/powers/mobile-design/POWER.md +110 -345
- package/workflows/powers/mobile-design/SKILL.md +110 -345
- package/workflows/powers/mongodb/POWER.md +67 -0
- package/workflows/powers/mongodb/SKILL.md +64 -0
- package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
- package/workflows/powers/mysql/POWER.md +67 -0
- package/workflows/powers/mysql/SKILL.md +64 -0
- package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
- package/workflows/powers/neki/POWER.md +67 -0
- package/workflows/powers/neki/SKILL.md +64 -0
- package/workflows/powers/neki/references/neki-checklist.md +18 -0
- package/workflows/powers/nestjs-expert/POWER.md +45 -91
- package/workflows/powers/nestjs-expert/SKILL.md +45 -91
- package/workflows/powers/nextjs-developer/POWER.md +51 -44
- package/workflows/powers/nextjs-developer/SKILL.md +51 -44
- package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
- package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
- package/workflows/powers/observability/POWER.md +109 -0
- package/workflows/powers/observability/SKILL.md +106 -0
- package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
- package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
- package/workflows/powers/openai-docs/POWER.md +61 -0
- package/workflows/powers/openai-docs/SKILL.md +58 -0
- package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
- package/workflows/powers/performance-profiling/POWER.md +61 -114
- package/workflows/powers/performance-profiling/SKILL.md +61 -114
- package/workflows/powers/php-pro/POWER.md +116 -0
- package/workflows/powers/php-pro/SKILL.md +113 -0
- package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
- package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
- package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
- package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
- package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
- package/workflows/powers/playwright-e2e/POWER.md +85 -0
- package/workflows/powers/playwright-e2e/SKILL.md +82 -0
- package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
- package/workflows/powers/postgres/POWER.md +67 -0
- package/workflows/powers/postgres/SKILL.md +64 -0
- package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
- package/workflows/powers/prompt-engineer/POWER.md +47 -30
- package/workflows/powers/prompt-engineer/SKILL.md +47 -30
- package/workflows/powers/python-pro/POWER.md +47 -36
- package/workflows/powers/python-pro/SKILL.md +47 -36
- package/workflows/powers/react-best-practices/POWER.md +56 -33
- package/workflows/powers/react-best-practices/SKILL.md +56 -33
- package/workflows/powers/react-expert/POWER.md +47 -37
- package/workflows/powers/react-expert/SKILL.md +47 -37
- package/workflows/powers/redis/POWER.md +67 -0
- package/workflows/powers/redis/SKILL.md +64 -0
- package/workflows/powers/redis/references/redis-checklist.md +19 -0
- package/workflows/powers/ruby-pro/POWER.md +118 -0
- package/workflows/powers/ruby-pro/SKILL.md +115 -0
- package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
- package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
- package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
- package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
- package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
- package/workflows/powers/rust-pro/POWER.md +45 -31
- package/workflows/powers/rust-pro/SKILL.md +45 -31
- package/workflows/powers/security-engineer/POWER.md +129 -0
- package/workflows/powers/security-engineer/SKILL.md +126 -0
- package/workflows/powers/seo-fundamentals/POWER.md +59 -102
- package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
- package/workflows/powers/serverless-patterns/POWER.md +171 -0
- package/workflows/powers/serverless-patterns/SKILL.md +168 -0
- package/workflows/powers/skill-creator/POWER.md +90 -0
- package/workflows/powers/skill-creator/SKILL.md +87 -0
- package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
- package/workflows/powers/skill-creator/references/schemas.md +430 -0
- package/workflows/powers/spec-miner/POWER.md +49 -57
- package/workflows/powers/spec-miner/SKILL.md +49 -57
- package/workflows/powers/sqlite/POWER.md +67 -0
- package/workflows/powers/sqlite/SKILL.md +64 -0
- package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
- package/workflows/powers/sre-engineer/POWER.md +123 -64
- package/workflows/powers/sre-engineer/SKILL.md +123 -64
- package/workflows/powers/static-analysis/POWER.md +121 -77
- package/workflows/powers/static-analysis/SKILL.md +121 -77
- package/workflows/powers/stripe-best-practices/POWER.md +140 -17
- package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
- package/workflows/powers/supabase/POWER.md +67 -0
- package/workflows/powers/supabase/SKILL.md +64 -0
- package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
- package/workflows/powers/swift-pro/POWER.md +118 -0
- package/workflows/powers/swift-pro/SKILL.md +115 -0
- package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
- package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
- package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
- package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
- package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
- package/workflows/powers/tailwind-patterns/POWER.md +71 -240
- package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
- package/workflows/powers/testing-patterns/POWER.md +155 -10
- package/workflows/powers/testing-patterns/SKILL.md +155 -10
- package/workflows/powers/typescript-pro/POWER.md +47 -38
- package/workflows/powers/typescript-pro/SKILL.md +47 -38
- package/workflows/powers/vitess/POWER.md +67 -0
- package/workflows/powers/vitess/SKILL.md +64 -0
- package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
- package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
- package/workflows/powers/web-perf/POWER.md +43 -170
- package/workflows/powers/web-perf/SKILL.md +43 -170
- package/workflows/powers/webapp-testing/POWER.md +43 -164
- package/workflows/powers/webapp-testing/SKILL.md +43 -164
- package/workflows/skills/agent-design/SKILL.md +198 -0
- package/workflows/skills/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/skills/agent-design/references/skill-testing.md +164 -0
- package/workflows/skills/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/skills/deep-research/SKILL.md +25 -20
- package/workflows/skills/deep-research/references/multi-round-research-loop.md +73 -8
- package/workflows/skills/frontend-design/SKILL.md +37 -32
- package/workflows/skills/frontend-design/commands/brand.md +167 -0
- package/workflows/skills/frontend-design/references/brand-presets.md +228 -0
- package/workflows/skills/generated/skill-audit.json +11 -2
- package/workflows/skills/generated/skill-catalog.json +37 -5
- package/workflows/skills/skills_index.json +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/SKILL.md +198 -0
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/skill-testing.md +164 -0
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/SKILL.md +25 -20
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/references/multi-round-research-loop.md +73 -8
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/SKILL.md +37 -32
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/commands/brand.md +167 -0
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/references/brand-presets.md +228 -0
- package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skills_index.json +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/SKILL.md +197 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/skill-testing.md +164 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/SKILL.md +25 -20
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/references/multi-round-research-loop.md +73 -8
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/SKILL.md +37 -32
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/commands/brand.md +167 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/references/brand-presets.md +228 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Drift Patterns
|
|
2
|
+
|
|
3
|
+
## Local Table Checklist
|
|
4
|
+
|
|
5
|
+
- stable primary key,
|
|
6
|
+
- timestamps when the domain needs ordering or sync,
|
|
7
|
+
- `syncStatus` and `operationId` when offline sync exists,
|
|
8
|
+
- indexes for common filters or joins.
|
|
9
|
+
|
|
10
|
+
## DAO Checklist
|
|
11
|
+
|
|
12
|
+
- `watchAll()` or other reactive streams for UI-facing reads
|
|
13
|
+
- detail reads such as `getById`
|
|
14
|
+
- insert, update, upsert, and delete helpers
|
|
15
|
+
- targeted status updates such as `markSynced` or `markDead` when needed
|
|
16
|
+
|
|
17
|
+
## Performance Rules
|
|
18
|
+
|
|
19
|
+
- Prefer `count()` queries over loading whole rows to test emptiness at scale.
|
|
20
|
+
- Use batch writes for bulk sync.
|
|
21
|
+
- Use transactions for multi-table writes.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Retrofit Patterns
|
|
2
|
+
|
|
3
|
+
## DTO Rules
|
|
4
|
+
|
|
5
|
+
- DTOs mirror the wire contract.
|
|
6
|
+
- Use explicit JSON keys when backend naming differs.
|
|
7
|
+
- Keep DTOs separate from domain models.
|
|
8
|
+
|
|
9
|
+
## API Interface Rules
|
|
10
|
+
|
|
11
|
+
- Keep the interface thin and transport-oriented.
|
|
12
|
+
- Return typed DTOs, not raw maps, when the shape is known.
|
|
13
|
+
- Keep auth, base URL, and interceptors outside the generated interface.
|
|
14
|
+
|
|
15
|
+
## Repository Rules
|
|
16
|
+
|
|
17
|
+
- Reads return local data first.
|
|
18
|
+
- Remote refresh populates local storage.
|
|
19
|
+
- Writes persist locally, enqueue sync work, and return early.
|
|
20
|
+
- Mappers convert DTOs to companions/domain types instead of building them inline everywhere.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: flutter-riverpod
|
|
5
|
+
description: "Use when creating, refactoring, or auditing Riverpod 3 providers and notifiers in Flutter with code generation and correct lifecycle boundaries. Do not use for widget-local ephemeral state that should stay inside the UI."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Flutter Riverpod
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Guide production Riverpod usage in Flutter with code generation, correct
|
|
18
|
+
lifecycle boundaries, explicit side-effect handling, and testable provider
|
|
19
|
+
design.
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- Adding a provider or notifier
|
|
24
|
+
- Refactoring provider lifecycles
|
|
25
|
+
- Fixing rebuild storms or dependency loops
|
|
26
|
+
- Designing async loading and mutation flows
|
|
27
|
+
- Writing or reviewing Riverpod tests
|
|
28
|
+
|
|
29
|
+
## Instructions
|
|
30
|
+
|
|
31
|
+
1. Confirm the current package set before making version-sensitive changes. When the task touches `pubspec.yaml` or migration guidance, verify Riverpod package versions against the official docs and the project's Flutter SDK constraints instead of assuming an old example is current.
|
|
32
|
+
2. Choose the narrowest provider type that matches the problem.
|
|
33
|
+
3. Default to generated providers for app code.
|
|
34
|
+
4. Keep business logic in repositories and services behind injected providers.
|
|
35
|
+
5. Use `ref.watch` for build-time dependency tracking, `ref.read` for callbacks and mutation methods, and `ref.listen` for UI side effects.
|
|
36
|
+
6. Default to auto-dispose and opt into `keepAlive` only when the state clearly needs it.
|
|
37
|
+
7. Guard post-`await` writes with `ref.mounted` when disposal is possible.
|
|
38
|
+
8. Prefer targeted invalidation and rebuilds over broad refresh behavior.
|
|
39
|
+
9. Treat experimental Riverpod features as optional and follow project conventions if they are already in use.
|
|
40
|
+
10. Test provider behavior directly with overrides and `ProviderContainer` or scoped widget tests.
|
|
41
|
+
|
|
42
|
+
## Output Format
|
|
43
|
+
|
|
44
|
+
Produce Riverpod guidance or code that:
|
|
45
|
+
|
|
46
|
+
- uses provider types intentionally,
|
|
47
|
+
- keeps side effects out of build paths,
|
|
48
|
+
- exposes clear override points for repositories and services,
|
|
49
|
+
- includes verification guidance where behavior is non-trivial.
|
|
50
|
+
|
|
51
|
+
## References
|
|
52
|
+
|
|
53
|
+
Load only what the current step needs.
|
|
54
|
+
|
|
55
|
+
| File | Load when |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `references/version-matrix.md` | You need package-selection guidance or need to verify Riverpod versions against current docs and Flutter SDK constraints. |
|
|
58
|
+
| `references/provider-selection.md` | You need to choose provider types, keep-alive policy, family inputs, or side-effect boundaries. |
|
|
59
|
+
| `references/async-lifecycle.md` | You are designing async flows, refresh or retry behavior, stream-backed state, invalidation, or disposal boundaries. |
|
|
60
|
+
| `references/testing.md` | You need `ProviderContainer`, widget test, or provider override patterns. |
|
|
61
|
+
|
|
62
|
+
## Scripts
|
|
63
|
+
|
|
64
|
+
No helper scripts are required for this skill right now.
|
|
65
|
+
|
|
66
|
+
## Examples
|
|
67
|
+
|
|
68
|
+
- "Refactor this feature from manual providers to generated `AsyncNotifier` providers."
|
|
69
|
+
- "Choose the right Riverpod provider types for auth, paging, and per-item state."
|
|
70
|
+
````
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flutter-riverpod
|
|
3
|
+
description: "Use when creating, refactoring, or auditing Riverpod 3 providers and notifiers in Flutter with code generation and correct lifecycle boundaries. Do not use for widget-local ephemeral state that should stay inside the UI."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Flutter Riverpod
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Guide production Riverpod usage in Flutter with code generation, correct
|
|
16
|
+
lifecycle boundaries, explicit side-effect handling, and testable provider
|
|
17
|
+
design.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- Adding a provider or notifier
|
|
22
|
+
- Refactoring provider lifecycles
|
|
23
|
+
- Fixing rebuild storms or dependency loops
|
|
24
|
+
- Designing async loading and mutation flows
|
|
25
|
+
- Writing or reviewing Riverpod tests
|
|
26
|
+
|
|
27
|
+
## Instructions
|
|
28
|
+
|
|
29
|
+
1. Confirm the current package set before making version-sensitive changes. When the task touches `pubspec.yaml` or migration guidance, verify Riverpod package versions against the official docs and the project's Flutter SDK constraints instead of assuming an old example is current.
|
|
30
|
+
2. Choose the narrowest provider type that matches the problem.
|
|
31
|
+
3. Default to generated providers for app code.
|
|
32
|
+
4. Keep business logic in repositories and services behind injected providers.
|
|
33
|
+
5. Use `ref.watch` for build-time dependency tracking, `ref.read` for callbacks and mutation methods, and `ref.listen` for UI side effects.
|
|
34
|
+
6. Default to auto-dispose and opt into `keepAlive` only when the state clearly needs it.
|
|
35
|
+
7. Guard post-`await` writes with `ref.mounted` when disposal is possible.
|
|
36
|
+
8. Prefer targeted invalidation and rebuilds over broad refresh behavior.
|
|
37
|
+
9. Treat experimental Riverpod features as optional and follow project conventions if they are already in use.
|
|
38
|
+
10. Test provider behavior directly with overrides and `ProviderContainer` or scoped widget tests.
|
|
39
|
+
|
|
40
|
+
## Output Format
|
|
41
|
+
|
|
42
|
+
Produce Riverpod guidance or code that:
|
|
43
|
+
|
|
44
|
+
- uses provider types intentionally,
|
|
45
|
+
- keeps side effects out of build paths,
|
|
46
|
+
- exposes clear override points for repositories and services,
|
|
47
|
+
- includes verification guidance where behavior is non-trivial.
|
|
48
|
+
|
|
49
|
+
## References
|
|
50
|
+
|
|
51
|
+
Load only what the current step needs.
|
|
52
|
+
|
|
53
|
+
| File | Load when |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| `references/version-matrix.md` | You need package-selection guidance or need to verify Riverpod versions against current docs and Flutter SDK constraints. |
|
|
56
|
+
| `references/provider-selection.md` | You need to choose provider types, keep-alive policy, family inputs, or side-effect boundaries. |
|
|
57
|
+
| `references/async-lifecycle.md` | You are designing async flows, refresh or retry behavior, stream-backed state, invalidation, or disposal boundaries. |
|
|
58
|
+
| `references/testing.md` | You need `ProviderContainer`, widget test, or provider override patterns. |
|
|
59
|
+
|
|
60
|
+
## Scripts
|
|
61
|
+
|
|
62
|
+
No helper scripts are required for this skill right now.
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
- "Refactor this feature from manual providers to generated `AsyncNotifier` providers."
|
|
67
|
+
- "Choose the right Riverpod provider types for auth, paging, and per-item state."
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Async and Mutations
|
|
2
|
+
|
|
3
|
+
## Async Rules
|
|
4
|
+
|
|
5
|
+
- Use `ref.watch` inside build methods.
|
|
6
|
+
- In mutation methods, use `ref.read` for dependencies.
|
|
7
|
+
- Guard post-`await` state updates with `ref.mounted` when disposal is possible.
|
|
8
|
+
- Prefer invalidate-and-rebuild over bespoke refresh state machines unless the UX needs something custom.
|
|
9
|
+
|
|
10
|
+
## Stream Rules
|
|
11
|
+
|
|
12
|
+
- Prefer streams for local reactive data such as Drift watches.
|
|
13
|
+
- Map raw repository output into a UI-friendly state shape at the provider boundary.
|
|
14
|
+
|
|
15
|
+
## Mutation Rules
|
|
16
|
+
|
|
17
|
+
- Keep mutation methods thin.
|
|
18
|
+
- Do not trigger UI side effects directly from the provider unless the project has a dedicated side-effect channel.
|
|
19
|
+
- If the project already uses experimental Riverpod mutation helpers, follow existing conventions instead of mixing styles.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Async Lifecycle
|
|
2
|
+
|
|
3
|
+
## Async Rules
|
|
4
|
+
|
|
5
|
+
- Use `ref.watch` inside build methods.
|
|
6
|
+
- In mutation methods, use `ref.read` for dependencies.
|
|
7
|
+
- Guard post-`await` state updates with `ref.mounted` when disposal is possible.
|
|
8
|
+
- Prefer invalidate-and-rebuild over bespoke refresh state machines unless the UX needs something custom.
|
|
9
|
+
|
|
10
|
+
## Stream Rules
|
|
11
|
+
|
|
12
|
+
- Prefer streams for local reactive data such as Drift watches.
|
|
13
|
+
- Map raw repository output into a UI-friendly state shape at the provider boundary.
|
|
14
|
+
|
|
15
|
+
## Mutation Rules
|
|
16
|
+
|
|
17
|
+
- Keep mutation methods thin.
|
|
18
|
+
- Do not trigger UI side effects directly from the provider unless the project has a dedicated side-effect channel.
|
|
19
|
+
- If the project already uses experimental Riverpod mutation helpers, follow existing conventions instead of mixing styles.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Provider Selection
|
|
2
|
+
|
|
3
|
+
## Decision Guide
|
|
4
|
+
|
|
5
|
+
- pure derived value -> function provider
|
|
6
|
+
- mutable synchronous UI/domain state -> `Notifier`
|
|
7
|
+
- async load with mutations -> `AsyncNotifier`
|
|
8
|
+
- reactive database or socket stream -> stream-backed provider or notifier
|
|
9
|
+
|
|
10
|
+
## Lifecycle Rules
|
|
11
|
+
|
|
12
|
+
- auto-dispose by default for screen or parameter-scoped state
|
|
13
|
+
- `keepAlive: true` only for low-cardinality, app-wide, expensive state
|
|
14
|
+
- avoid unbounded keep-alive families
|
|
15
|
+
|
|
16
|
+
## Boundary Rules
|
|
17
|
+
|
|
18
|
+
- providers stay top-level,
|
|
19
|
+
- widgets do not own business state transitions,
|
|
20
|
+
- repositories and services remain injectable dependencies.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Riverpod Testing
|
|
2
|
+
|
|
3
|
+
## Test What Matters
|
|
4
|
+
|
|
5
|
+
- initial state,
|
|
6
|
+
- success transition,
|
|
7
|
+
- empty transition,
|
|
8
|
+
- error transition,
|
|
9
|
+
- mutation side effects or invalidation behavior.
|
|
10
|
+
|
|
11
|
+
## Test Tools
|
|
12
|
+
|
|
13
|
+
- `ProviderContainer` for provider-level tests
|
|
14
|
+
- widget tests for UI reactions to provider state
|
|
15
|
+
- repository/service fakes or mocks through overrides
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- dispose the container,
|
|
20
|
+
- override dependencies explicitly,
|
|
21
|
+
- assert transitions instead of only final values when behavior matters.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Version Matrix
|
|
2
|
+
|
|
3
|
+
Do not treat this file as a hardcoded source of truth for package numbers.
|
|
4
|
+
|
|
5
|
+
## When Version Guidance Is Needed
|
|
6
|
+
|
|
7
|
+
Before recommending or editing Riverpod package versions:
|
|
8
|
+
|
|
9
|
+
1. Inspect the project's current Flutter and Dart SDK constraints.
|
|
10
|
+
2. Check the official Riverpod packages and migration notes.
|
|
11
|
+
3. Prefer a version set that is internally compatible with the project's SDK and existing generator tooling.
|
|
12
|
+
|
|
13
|
+
## Packages to Check Together
|
|
14
|
+
|
|
15
|
+
- `flutter_riverpod`
|
|
16
|
+
- `riverpod_annotation`
|
|
17
|
+
- `riverpod_generator`
|
|
18
|
+
- `riverpod_lint`
|
|
19
|
+
- `build_runner`
|
|
20
|
+
|
|
21
|
+
## Output Rule
|
|
22
|
+
|
|
23
|
+
When the task is version-sensitive, state the versions you verified and why
|
|
24
|
+
they fit the project instead of copying a stale example blindly.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: flutter-state-machine
|
|
5
|
+
description: "Use when implementing or auditing the shared Flutter screen-state contract: loading, data, empty, error, and dead-letter rendering plus consistent error mapping. Do not use for generic Riverpod work when the project does not use this AppState pattern."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Flutter State Machine
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Guide a consistent Flutter screen-state contract so loading, data, empty,
|
|
18
|
+
error, and dead-letter behavior are handled predictably across features.
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- Adding app-state infrastructure
|
|
23
|
+
- Refactoring a screen away from ad hoc async branching
|
|
24
|
+
- Auditing notifier state transitions
|
|
25
|
+
- Standardizing error and dead-letter rendering
|
|
26
|
+
|
|
27
|
+
## Instructions
|
|
28
|
+
|
|
29
|
+
1. Identify whether the screen is list, detail, or mutation-heavy.
|
|
30
|
+
2. Map repository or service output into the shared app-state contract.
|
|
31
|
+
3. Keep notifier transition logic small and explicit.
|
|
32
|
+
4. Keep AppError typed and request-ID aware.
|
|
33
|
+
5. Render through a shared state widget or equivalent adapter where possible.
|
|
34
|
+
6. Ensure every failure path carries enough context for support and debugging.
|
|
35
|
+
|
|
36
|
+
## Output Format
|
|
37
|
+
|
|
38
|
+
Produce app-state guidance or code that:
|
|
39
|
+
|
|
40
|
+
- names the expected state cases,
|
|
41
|
+
- shows where notifier mapping stops and widget rendering starts,
|
|
42
|
+
- keeps error and dead-letter behavior distinct,
|
|
43
|
+
- includes the shared rendering expectations for state-specific UI.
|
|
44
|
+
|
|
45
|
+
## References
|
|
46
|
+
|
|
47
|
+
Load only what the current step needs.
|
|
48
|
+
|
|
49
|
+
| File | Load when |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `references/app-state-contract.md` | Defining `AppState`, `AppError`, and notifier mapping rules. |
|
|
52
|
+
| `references/ui-rendering.md` | Building or reviewing the shared widget that renders each state consistently. |
|
|
53
|
+
|
|
54
|
+
## Scripts
|
|
55
|
+
|
|
56
|
+
No helper scripts are required for this skill right now.
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
- "Standardize this Flutter screen on the shared AppState contract."
|
|
61
|
+
- "Review these notifier transitions for missing error or dead-letter cases."
|
|
62
|
+
````
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flutter-state-machine
|
|
3
|
+
description: "Use when implementing or auditing the shared Flutter screen-state contract: loading, data, empty, error, and dead-letter rendering plus consistent error mapping. Do not use for generic Riverpod work when the project does not use this AppState pattern."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Flutter State Machine
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Guide a consistent Flutter screen-state contract so loading, data, empty,
|
|
16
|
+
error, and dead-letter behavior are handled predictably across features.
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
- Adding app-state infrastructure
|
|
21
|
+
- Refactoring a screen away from ad hoc async branching
|
|
22
|
+
- Auditing notifier state transitions
|
|
23
|
+
- Standardizing error and dead-letter rendering
|
|
24
|
+
|
|
25
|
+
## Instructions
|
|
26
|
+
|
|
27
|
+
1. Identify whether the screen is list, detail, or mutation-heavy.
|
|
28
|
+
2. Map repository or service output into the shared app-state contract.
|
|
29
|
+
3. Keep notifier transition logic small and explicit.
|
|
30
|
+
4. Keep AppError typed and request-ID aware.
|
|
31
|
+
5. Render through a shared state widget or equivalent adapter where possible.
|
|
32
|
+
6. Ensure every failure path carries enough context for support and debugging.
|
|
33
|
+
|
|
34
|
+
## Output Format
|
|
35
|
+
|
|
36
|
+
Produce app-state guidance or code that:
|
|
37
|
+
|
|
38
|
+
- names the expected state cases,
|
|
39
|
+
- shows where notifier mapping stops and widget rendering starts,
|
|
40
|
+
- keeps error and dead-letter behavior distinct,
|
|
41
|
+
- includes the shared rendering expectations for state-specific UI.
|
|
42
|
+
|
|
43
|
+
## References
|
|
44
|
+
|
|
45
|
+
Load only what the current step needs.
|
|
46
|
+
|
|
47
|
+
| File | Load when |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `references/app-state-contract.md` | Defining `AppState`, `AppError`, and notifier mapping rules. |
|
|
50
|
+
| `references/ui-rendering.md` | Building or reviewing the shared widget that renders each state consistently. |
|
|
51
|
+
|
|
52
|
+
## Scripts
|
|
53
|
+
|
|
54
|
+
No helper scripts are required for this skill right now.
|
|
55
|
+
|
|
56
|
+
## Examples
|
|
57
|
+
|
|
58
|
+
- "Standardize this Flutter screen on the shared AppState contract."
|
|
59
|
+
- "Review these notifier transitions for missing error or dead-letter cases."
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# App State Contract
|
|
2
|
+
|
|
3
|
+
## Expected States
|
|
4
|
+
|
|
5
|
+
- `loading`
|
|
6
|
+
- `data`
|
|
7
|
+
- `empty`
|
|
8
|
+
- `error`
|
|
9
|
+
- `deadLetter`
|
|
10
|
+
|
|
11
|
+
## Error Contract
|
|
12
|
+
|
|
13
|
+
Errors should carry enough context for:
|
|
14
|
+
|
|
15
|
+
- user-facing messaging,
|
|
16
|
+
- developer debugging,
|
|
17
|
+
- support follow-up through a request or correlation ID.
|
|
18
|
+
|
|
19
|
+
## Notifier Rules
|
|
20
|
+
|
|
21
|
+
- Start from a deliberate initial state.
|
|
22
|
+
- Map repository/service failures into typed app errors.
|
|
23
|
+
- Keep mutation methods thin and consistent with the same error contract.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# UI Rendering
|
|
2
|
+
|
|
3
|
+
## Shared Rendering Rules
|
|
4
|
+
|
|
5
|
+
- Render app state through one shared abstraction when possible.
|
|
6
|
+
- Use shared design-system widgets for loading, empty, error, and dead-letter states.
|
|
7
|
+
- Keep the data branch focused on actual content, not error plumbing.
|
|
8
|
+
|
|
9
|
+
## Review Checklist
|
|
10
|
+
|
|
11
|
+
- error state exposes request ID when available,
|
|
12
|
+
- empty state has helpful next-step messaging,
|
|
13
|
+
- dead-letter state does not masquerade as a retryable transient error,
|
|
14
|
+
- loading state matches the design system.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: flutter-testing
|
|
5
|
+
description: "Use when adding or refactoring Flutter tests for repositories, services, Riverpod notifiers, widgets, and golden coverage around a feature. Do not use for production feature implementation unless the task is explicitly test-focused."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Flutter Testing
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Guide layered Flutter verification so repositories, services, notifiers,
|
|
18
|
+
widgets, and high-value UI surfaces are tested at the right level.
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- Adding missing test coverage
|
|
23
|
+
- Writing tests for a new feature
|
|
24
|
+
- Verifying offline-sync behavior
|
|
25
|
+
- Testing provider state transitions
|
|
26
|
+
- Adding widget or golden regression coverage
|
|
27
|
+
|
|
28
|
+
## Instructions
|
|
29
|
+
|
|
30
|
+
1. Identify which feature layers actually exist before generating tests.
|
|
31
|
+
2. Cover repository behavior with local persistence and sync expectations.
|
|
32
|
+
3. Cover service rules separately when business logic exists.
|
|
33
|
+
4. Cover notifier or provider transitions directly.
|
|
34
|
+
5. Cover widgets for state-specific rendering and interaction.
|
|
35
|
+
6. Add goldens only where visual regression risk is real.
|
|
36
|
+
7. Assert transitions and side effects, not only final snapshots.
|
|
37
|
+
|
|
38
|
+
## Output Format
|
|
39
|
+
|
|
40
|
+
Produce test guidance or code that:
|
|
41
|
+
|
|
42
|
+
- identifies the right layers to test,
|
|
43
|
+
- names the behaviors that must be verified,
|
|
44
|
+
- distinguishes unit, provider, widget, and golden coverage,
|
|
45
|
+
- includes offline-sync expectations when the feature needs them.
|
|
46
|
+
|
|
47
|
+
## References
|
|
48
|
+
|
|
49
|
+
Load only what the current step needs.
|
|
50
|
+
|
|
51
|
+
| File | Load when |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `references/test-layers.md` | Choosing which repository, service, notifier, widget, or golden tests to generate. |
|
|
54
|
+
| `references/offline-sync-tests.md` | Verifying outbox, retry, conflict, or dead-letter behavior. |
|
|
55
|
+
|
|
56
|
+
## Scripts
|
|
57
|
+
|
|
58
|
+
No helper scripts are required for this skill right now.
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
- "Add repository, notifier, and widget tests for this Flutter feature."
|
|
63
|
+
- "Review the offline-sync tests for retry and dead-letter coverage gaps."
|
|
64
|
+
````
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flutter-testing
|
|
3
|
+
description: "Use when adding or refactoring Flutter tests for repositories, services, Riverpod notifiers, widgets, and golden coverage around a feature. Do not use for production feature implementation unless the task is explicitly test-focused."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Flutter Testing
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Guide layered Flutter verification so repositories, services, notifiers,
|
|
16
|
+
widgets, and high-value UI surfaces are tested at the right level.
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
- Adding missing test coverage
|
|
21
|
+
- Writing tests for a new feature
|
|
22
|
+
- Verifying offline-sync behavior
|
|
23
|
+
- Testing provider state transitions
|
|
24
|
+
- Adding widget or golden regression coverage
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
1. Identify which feature layers actually exist before generating tests.
|
|
29
|
+
2. Cover repository behavior with local persistence and sync expectations.
|
|
30
|
+
3. Cover service rules separately when business logic exists.
|
|
31
|
+
4. Cover notifier or provider transitions directly.
|
|
32
|
+
5. Cover widgets for state-specific rendering and interaction.
|
|
33
|
+
6. Add goldens only where visual regression risk is real.
|
|
34
|
+
7. Assert transitions and side effects, not only final snapshots.
|
|
35
|
+
|
|
36
|
+
## Output Format
|
|
37
|
+
|
|
38
|
+
Produce test guidance or code that:
|
|
39
|
+
|
|
40
|
+
- identifies the right layers to test,
|
|
41
|
+
- names the behaviors that must be verified,
|
|
42
|
+
- distinguishes unit, provider, widget, and golden coverage,
|
|
43
|
+
- includes offline-sync expectations when the feature needs them.
|
|
44
|
+
|
|
45
|
+
## References
|
|
46
|
+
|
|
47
|
+
Load only what the current step needs.
|
|
48
|
+
|
|
49
|
+
| File | Load when |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `references/test-layers.md` | Choosing which repository, service, notifier, widget, or golden tests to generate. |
|
|
52
|
+
| `references/offline-sync-tests.md` | Verifying outbox, retry, conflict, or dead-letter behavior. |
|
|
53
|
+
|
|
54
|
+
## Scripts
|
|
55
|
+
|
|
56
|
+
No helper scripts are required for this skill right now.
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
- "Add repository, notifier, and widget tests for this Flutter feature."
|
|
61
|
+
- "Review the offline-sync tests for retry and dead-letter coverage gaps."
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Offline Sync Tests
|
|
2
|
+
|
|
3
|
+
## Cover These Behaviors
|
|
4
|
+
|
|
5
|
+
- write succeeds locally before network success,
|
|
6
|
+
- outbox entry is queued correctly,
|
|
7
|
+
- remote sync upserts data idempotently,
|
|
8
|
+
- retry count changes on failure,
|
|
9
|
+
- dead-letter state appears after retry exhaustion,
|
|
10
|
+
- conflict handling follows the declared feature policy.
|
|
11
|
+
|
|
12
|
+
## Useful Test Shapes
|
|
13
|
+
|
|
14
|
+
- in-memory Drift database for repository tests
|
|
15
|
+
- mocked API and connectivity services
|
|
16
|
+
- notifier tests that assert sync-status or dead-letter transitions
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Test Layers
|
|
2
|
+
|
|
3
|
+
## Repository Tests
|
|
4
|
+
|
|
5
|
+
Cover:
|
|
6
|
+
|
|
7
|
+
- local writes,
|
|
8
|
+
- remote sync import,
|
|
9
|
+
- outbox enqueue behavior when applicable,
|
|
10
|
+
- stream/read correctness.
|
|
11
|
+
|
|
12
|
+
## Service Tests
|
|
13
|
+
|
|
14
|
+
Cover:
|
|
15
|
+
|
|
16
|
+
- business-rule success paths,
|
|
17
|
+
- each meaningful failure path,
|
|
18
|
+
- edge cases around validation and policy.
|
|
19
|
+
|
|
20
|
+
## Notifier or Provider Tests
|
|
21
|
+
|
|
22
|
+
Cover:
|
|
23
|
+
|
|
24
|
+
- initial state,
|
|
25
|
+
- success,
|
|
26
|
+
- empty,
|
|
27
|
+
- error,
|
|
28
|
+
- mutation-triggered refresh or invalidation.
|
|
29
|
+
|
|
30
|
+
## Widget and Golden Tests
|
|
31
|
+
|
|
32
|
+
- Widget tests verify state-specific rendering and interaction.
|
|
33
|
+
- Golden tests verify stable shared or high-value UI surfaces.
|