oh-my-agent-commandcode 0.0.0-stage → 20.38.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -2
- package/filter-test-output.sh +52 -0
- package/mods/oma.ts +347 -0
- package/package.json +30 -4
- package/skills/_shared/conditional/experiment-ledger.md +28 -0
- package/skills/_shared/conditional/exploration-loop.md +22 -0
- package/skills/_shared/conditional/quality-score.md +33 -0
- package/skills/_shared/core/anti-ai-prose.md +191 -0
- package/skills/_shared/core/api-contracts/README.md +28 -0
- package/skills/_shared/core/api-contracts/template.md +90 -0
- package/skills/_shared/core/clarification-protocol.md +23 -0
- package/skills/_shared/core/code-intelligence.md +46 -0
- package/skills/_shared/core/collaboration-policy.md +28 -0
- package/skills/_shared/core/common-checklist.md +28 -0
- package/skills/_shared/core/context-budget.md +22 -0
- package/skills/_shared/core/context-loading.md +34 -0
- package/skills/_shared/core/difficulty-guide.md +26 -0
- package/skills/_shared/core/execution-policy.md +31 -0
- package/skills/_shared/core/lessons-learned.md +33 -0
- package/skills/_shared/core/prompt-structure.md +18 -0
- package/skills/_shared/core/quality-principles.md +11 -0
- package/skills/_shared/core/session-metrics.md +35 -0
- package/skills/_shared/core/skill-routing.md +39 -0
- package/skills/_shared/core/test-approach.md +54 -0
- package/skills/_shared/core/vendor-detection.md +52 -0
- package/skills/_shared/runtime/memory-protocol.md +118 -0
- package/skills/_shared/runtime/result-contract.md +64 -0
- package/skills/_shared/ui-interaction-quality.md +133 -0
- package/skills/oma-academic-writing/SKILL.md +181 -0
- package/skills/oma-academic-writing/resources/abstract-guide.md +51 -0
- package/skills/oma-academic-writing/resources/academic-verb-tiers.md +42 -0
- package/skills/oma-academic-writing/resources/anti-ai-checklist.md +52 -0
- package/skills/oma-academic-writing/resources/hedging-guide.md +132 -0
- package/skills/oma-academic-writing/resources/sentence-structure-reference.md +151 -0
- package/skills/oma-architecture/SKILL.md +203 -0
- package/skills/oma-architecture/resources/api-evolution.md +41 -0
- package/skills/oma-architecture/resources/checklist.md +42 -0
- package/skills/oma-architecture/resources/execution-protocol.md +115 -0
- package/skills/oma-architecture/resources/methodology-selection.md +92 -0
- package/skills/oma-architecture/resources/migration-patterns.md +28 -0
- package/skills/oma-architecture/resources/output-templates.md +111 -0
- package/skills/oma-architecture/resources/stakeholder-synthesis.md +80 -0
- package/skills/oma-backend/SKILL.md +202 -0
- package/skills/oma-backend/resources/checklist.md +45 -0
- package/skills/oma-backend/resources/error-playbook.md +97 -0
- package/skills/oma-backend/resources/execution-protocol.md +39 -0
- package/skills/oma-backend/resources/orm-reference.md +61 -0
- package/skills/oma-backend/variants/node/api-template.ts +315 -0
- package/skills/oma-backend/variants/node/snippets.md +475 -0
- package/skills/oma-backend/variants/node/stack.yaml +21 -0
- package/skills/oma-backend/variants/node/tech-stack.md +33 -0
- package/skills/oma-backend/variants/python/api-template.py +378 -0
- package/skills/oma-backend/variants/python/snippets.md +199 -0
- package/skills/oma-backend/variants/python/stack.yaml +18 -0
- package/skills/oma-backend/variants/python/tech-stack.md +45 -0
- package/skills/oma-backend/variants/rust/api-template.rs +635 -0
- package/skills/oma-backend/variants/rust/snippets.md +471 -0
- package/skills/oma-backend/variants/rust/stack.yaml +20 -0
- package/skills/oma-backend/variants/rust/tech-stack.md +36 -0
- package/skills/oma-backend/variants/stack.schema.json +73 -0
- package/skills/oma-brainstorm/SKILL.md +166 -0
- package/skills/oma-brainstorm/resources/triz-lite.md +117 -0
- package/skills/oma-coordination/SKILL.md +171 -0
- package/skills/oma-db/SKILL.md +201 -0
- package/skills/oma-db/resources/anti-patterns.md +177 -0
- package/skills/oma-db/resources/checklist.md +67 -0
- package/skills/oma-db/resources/document-templates.md +107 -0
- package/skills/oma-db/resources/error-playbook.md +50 -0
- package/skills/oma-db/resources/examples.md +170 -0
- package/skills/oma-db/resources/execution-protocol.md +127 -0
- package/skills/oma-db/resources/iso-controls.md +98 -0
- package/skills/oma-db/resources/migration-playbook.md +93 -0
- package/skills/oma-db/resources/query-tuning.md +57 -0
- package/skills/oma-db/resources/vector-db.md +159 -0
- package/skills/oma-debug/SKILL.md +146 -0
- package/skills/oma-debug/resources/bug-report-template.md +327 -0
- package/skills/oma-debug/resources/checklist.md +31 -0
- package/skills/oma-debug/resources/common-patterns.md +734 -0
- package/skills/oma-debug/resources/debugging-checklist.md +364 -0
- package/skills/oma-debug/resources/error-playbook.md +94 -0
- package/skills/oma-debug/resources/execution-protocol.md +40 -0
- package/skills/oma-design/SKILL.md +135 -0
- package/skills/oma-design/resources/asset-strategy.md +34 -0
- package/skills/oma-design/resources/checklist.md +63 -0
- package/skills/oma-design/resources/data-grid.md +48 -0
- package/skills/oma-design/resources/design-md-spec.md +107 -0
- package/skills/oma-design/resources/design-tokens.md +53 -0
- package/skills/oma-design/resources/error-playbook.md +18 -0
- package/skills/oma-design/resources/execution-protocol.md +95 -0
- package/skills/oma-design/resources/external-design-skills.md +130 -0
- package/skills/oma-design/resources/getdesign-fetcher.md +104 -0
- package/skills/oma-design/resources/product-interface-review.md +59 -0
- package/skills/oma-design/resources/redesign-protocol.md +52 -0
- package/skills/oma-design/resources/stitch-integration.md +244 -0
- package/skills/oma-dev-workflow/SKILL.md +375 -0
- package/skills/oma-dev-workflow/resources/affected-checks.py +58 -0
- package/skills/oma-dev-workflow/resources/api-workflows.md +58 -0
- package/skills/oma-dev-workflow/resources/database-patterns.md +107 -0
- package/skills/oma-dev-workflow/resources/i18n-patterns.md +63 -0
- package/skills/oma-dev-workflow/resources/release-coordination.md +240 -0
- package/skills/oma-dev-workflow/resources/tooling-profiles.md +217 -0
- package/skills/oma-dev-workflow/resources/troubleshooting.md +78 -0
- package/skills/oma-dev-workflow/resources/validation-pipeline.md +246 -0
- package/skills/oma-docs/SKILL.md +77 -0
- package/skills/oma-docs/resources/commands.md +76 -0
- package/skills/oma-explanation/SKILL.md +212 -0
- package/skills/oma-explanation/resources/document-structure.md +115 -0
- package/skills/oma-explanation/resources/draft-format.md +199 -0
- package/skills/oma-explanation/resources/html-contract.md +102 -0
- package/skills/oma-frontend/SKILL.md +227 -0
- package/skills/oma-frontend/resources/angular-rules.md +110 -0
- package/skills/oma-frontend/resources/checklist.md +76 -0
- package/skills/oma-frontend/resources/error-playbook.md +125 -0
- package/skills/oma-frontend/resources/execution-protocol.md +46 -0
- package/skills/oma-frontend/resources/snippets.md +354 -0
- package/skills/oma-frontend/resources/specialized-visual-implementation.md +193 -0
- package/skills/oma-frontend/resources/tailwind-rules.md +83 -0
- package/skills/oma-frontend/resources/tech-stack.md +156 -0
- package/skills/oma-hwp/SKILL.md +166 -0
- package/skills/oma-hwp/config/hwp-config.yaml +35 -0
- package/skills/oma-hwp/resources/balanced-tables.ts +39 -0
- package/skills/oma-hwp/resources/execution-protocol.md +145 -0
- package/skills/oma-hwp/resources/flatten-tables.ts +101 -0
- package/skills/oma-hwp/resources/package.json +13 -0
- package/skills/oma-hwp/resources/troubleshooting.md +70 -0
- package/skills/oma-hwp/resources/tsconfig.json +10 -0
- package/skills/oma-hwp/resources/turndown-plugin-gfm.d.ts +9 -0
- package/skills/oma-image/SKILL.md +142 -0
- package/skills/oma-image/config/image-config.yaml +70 -0
- package/skills/oma-image/resources/checklist.md +18 -0
- package/skills/oma-image/resources/execution-protocol.md +117 -0
- package/skills/oma-image/resources/invocation.md +105 -0
- package/skills/oma-image/resources/prompt-tips.md +71 -0
- package/skills/oma-image/resources/vendor-matrix.md +90 -0
- package/skills/oma-market/SKILL.md +142 -0
- package/skills/oma-market/resources/checklist.md +12 -0
- package/skills/oma-market/resources/error-playbook.md +12 -0
- package/skills/oma-market/resources/execution-protocol.md +60 -0
- package/skills/oma-market/resources/frameworks/pestel.md +101 -0
- package/skills/oma-market/resources/frameworks/porters-5f.md +90 -0
- package/skills/oma-market/resources/frameworks/swot.md +61 -0
- package/skills/oma-market/resources/intent-rules.md +35 -0
- package/skills/oma-market/resources/output-laws.md +53 -0
- package/skills/oma-mobile/SKILL.md +168 -0
- package/skills/oma-mobile/resources/checklist.md +77 -0
- package/skills/oma-mobile/resources/error-playbook.md +198 -0
- package/skills/oma-mobile/resources/execution-protocol.md +47 -0
- package/skills/oma-mobile/resources/screen-template.dart +331 -0
- package/skills/oma-mobile/resources/screen-template.swift +239 -0
- package/skills/oma-mobile/resources/screen-template.tsx +179 -0
- package/skills/oma-mobile/resources/tech-stack.md +69 -0
- package/skills/oma-mobile/variants/README.md +45 -0
- package/skills/oma-mobile/variants/flutter/api-template.dart +461 -0
- package/skills/oma-mobile/variants/flutter/snippets.md +1353 -0
- package/skills/oma-mobile/variants/flutter/stack.yaml +21 -0
- package/skills/oma-mobile/variants/flutter/tech-stack.md +201 -0
- package/skills/oma-mobile/variants/kotlin-android/api-template.kt +182 -0
- package/skills/oma-mobile/variants/kotlin-android/snippets.md +871 -0
- package/skills/oma-mobile/variants/kotlin-android/stack.yaml +32 -0
- package/skills/oma-mobile/variants/kotlin-android/tech-stack.md +159 -0
- package/skills/oma-mobile/variants/react-native/api-template.ts +531 -0
- package/skills/oma-mobile/variants/react-native/snippets.md +1014 -0
- package/skills/oma-mobile/variants/react-native/stack.yaml +22 -0
- package/skills/oma-mobile/variants/react-native/tech-stack.md +192 -0
- package/skills/oma-mobile/variants/stack.schema.json +68 -0
- package/skills/oma-mobile/variants/swift-ios/api-template.swift +165 -0
- package/skills/oma-mobile/variants/swift-ios/snippets.md +1028 -0
- package/skills/oma-mobile/variants/swift-ios/stack.yaml +25 -0
- package/skills/oma-mobile/variants/swift-ios/tech-stack.md +174 -0
- package/skills/oma-observability/SKILL.md +225 -0
- package/skills/oma-observability/resources/anti-patterns.md +555 -0
- package/skills/oma-observability/resources/boundaries/cross-application.md +348 -0
- package/skills/oma-observability/resources/boundaries/multi-tenant.md +290 -0
- package/skills/oma-observability/resources/boundaries/release.md +372 -0
- package/skills/oma-observability/resources/boundaries/slo.md +225 -0
- package/skills/oma-observability/resources/checklist.md +123 -0
- package/skills/oma-observability/resources/examples.md +448 -0
- package/skills/oma-observability/resources/execution-protocol.md +166 -0
- package/skills/oma-observability/resources/incident-forensics.md +348 -0
- package/skills/oma-observability/resources/intent-rules.md +307 -0
- package/skills/oma-observability/resources/layers/L3-network.md +281 -0
- package/skills/oma-observability/resources/layers/L4-transport.md +299 -0
- package/skills/oma-observability/resources/layers/L7-application/crash-analytics.md +359 -0
- package/skills/oma-observability/resources/layers/L7-application/mobile-rum.md +278 -0
- package/skills/oma-observability/resources/layers/L7-application/waf.md +246 -0
- package/skills/oma-observability/resources/layers/L7-application/web-rum.md +350 -0
- package/skills/oma-observability/resources/layers/mesh.md +368 -0
- package/skills/oma-observability/resources/matrix.md +177 -0
- package/skills/oma-observability/resources/meta-observability.md +605 -0
- package/skills/oma-observability/resources/observability-as-code.md +666 -0
- package/skills/oma-observability/resources/signals/audit.md +310 -0
- package/skills/oma-observability/resources/signals/cost.md +303 -0
- package/skills/oma-observability/resources/signals/logs.md +263 -0
- package/skills/oma-observability/resources/signals/metrics.md +478 -0
- package/skills/oma-observability/resources/signals/privacy.md +351 -0
- package/skills/oma-observability/resources/signals/profiles.md +245 -0
- package/skills/oma-observability/resources/signals/traces.md +360 -0
- package/skills/oma-observability/resources/standards.md +214 -0
- package/skills/oma-observability/resources/transport/collector-topology.md +308 -0
- package/skills/oma-observability/resources/transport/otlp-grpc-vs-http.md +256 -0
- package/skills/oma-observability/resources/transport/sampling-recipes.md +297 -0
- package/skills/oma-observability/resources/transport/udp-statsd-mtu.md +167 -0
- package/skills/oma-observability/resources/vendor-categories.md +352 -0
- package/skills/oma-orchestration/SKILL.md +302 -0
- package/skills/oma-orchestration/config/cli-config.yaml +92 -0
- package/skills/oma-orchestration/resources/memory-schema.md +232 -0
- package/skills/oma-orchestration/resources/subagent-prompt-template.md +30 -0
- package/skills/oma-orchestration/scripts/parallel-run.sh +6 -0
- package/skills/oma-orchestration/scripts/spawn-agent.sh +5 -0
- package/skills/oma-orchestration/scripts/verify.sh +20 -0
- package/skills/oma-orchestration/templates/backend-task.md +19 -0
- package/skills/oma-orchestration/templates/debug-task.md +16 -0
- package/skills/oma-orchestration/templates/frontend-task.md +18 -0
- package/skills/oma-orchestration/templates/mobile-task.md +18 -0
- package/skills/oma-orchestration/templates/qa-task.md +16 -0
- package/skills/oma-orchestration/templates/tasks-example.yaml +15 -0
- package/skills/oma-pdf/SKILL.md +162 -0
- package/skills/oma-pdf/config/pdf-config.yaml +27 -0
- package/skills/oma-pdf/resources/execution-protocol.md +127 -0
- package/skills/oma-pm/SKILL.md +157 -0
- package/skills/oma-pm/resources/error-playbook.md +75 -0
- package/skills/oma-pm/resources/examples.md +439 -0
- package/skills/oma-pm/resources/execution-protocol.md +62 -0
- package/skills/oma-pm/resources/iso-planning.md +110 -0
- package/skills/oma-pm/resources/plan-phase-protocol.md +66 -0
- package/skills/oma-pm/resources/task-template.json +86 -0
- package/skills/oma-qa/SKILL.md +141 -0
- package/skills/oma-qa/resources/checklist.md +339 -0
- package/skills/oma-qa/resources/error-playbook.md +98 -0
- package/skills/oma-qa/resources/execution-protocol.md +169 -0
- package/skills/oma-qa/resources/iso-quality.md +82 -0
- package/skills/oma-qa/resources/verify-ship-protocol.md +116 -0
- package/skills/oma-recap/SKILL.md +245 -0
- package/skills/oma-recap/resources/output-formats.md +83 -0
- package/skills/oma-refactor/SKILL.md +184 -0
- package/skills/oma-refactor/resources/definition.md +108 -0
- package/skills/oma-refactor/resources/governance.md +33 -0
- package/skills/oma-refactor/resources/hotspots.py +44 -0
- package/skills/oma-refactor/resources/measurement.md +93 -0
- package/skills/oma-scholar/SKILL.md +276 -0
- package/skills/oma-scholar/config/scholar-config.yaml +79 -0
- package/skills/oma-scholar/resources/api-endpoints.md +174 -0
- package/skills/oma-scholar/resources/checklist.md +92 -0
- package/skills/oma-scholar/resources/execution-protocol.md +224 -0
- package/skills/oma-scholar/resources/fallback-providers.md +143 -0
- package/skills/oma-scholar/resources/setup-openalex.md +85 -0
- package/skills/oma-scholar/resources/sidecar-spec.md +341 -0
- package/skills/oma-scholar/resources/upstream-spec-cache.md +972 -0
- package/skills/oma-scm/SKILL.md +103 -0
- package/skills/oma-scm/resources/cm-operations.md +56 -0
- package/skills/oma-scm/resources/codeowners-playbook.md +45 -0
- package/skills/oma-scm/resources/conventional-commits.md +108 -0
- package/skills/oma-scm/resources/merge-risk.md +76 -0
- package/skills/oma-scm/resources/onboarding-risk-signals.md +71 -0
- package/skills/oma-search/SKILL.md +125 -0
- package/skills/oma-search/resources/checklist.md +36 -0
- package/skills/oma-search/resources/error-playbook.md +66 -0
- package/skills/oma-search/resources/examples.md +80 -0
- package/skills/oma-search/resources/execution-protocol.md +86 -0
- package/skills/oma-search/resources/intent-rules.md +47 -0
- package/skills/oma-search/resources/trust-registry.md +53 -0
- package/skills/oma-security/SKILL.md +172 -0
- package/skills/oma-security/resources/artex.md +108 -0
- package/skills/oma-security/resources/ci.md +134 -0
- package/skills/oma-security/resources/cisco-source.md +108 -0
- package/skills/oma-security/resources/deepsec-config.md +45 -0
- package/skills/oma-security/resources/deepsec-matchers.md +35 -0
- package/skills/oma-security/resources/deepsec-scanning.md +45 -0
- package/skills/oma-security/resources/deepsec-setup.md +41 -0
- package/skills/oma-security/resources/findings-contract.md +408 -0
- package/skills/oma-security/resources/mcp-scanning.md +122 -0
- package/skills/oma-security/resources/skill-scanning.md +106 -0
- package/skills/oma-security/resources/validation.md +71 -0
- package/skills/oma-skill-creation/SKILL.md +84 -0
- package/skills/oma-skill-creation/resources/prompt-evaluation.md +36 -0
- package/skills/oma-skill-creation/resources/ssl-lite-template.md +108 -0
- package/skills/oma-skill-creation/resources/validation-checklist.md +101 -0
- package/skills/oma-slide/SKILL.md +277 -0
- package/skills/oma-slide/resources/animation-patterns.md +245 -0
- package/skills/oma-slide/resources/assets/deck-stage.js +514 -0
- package/skills/oma-slide/resources/assets/viewport-base.css +257 -0
- package/skills/oma-slide/resources/canva-integration.md +203 -0
- package/skills/oma-slide/resources/checklist.md +46 -0
- package/skills/oma-slide/resources/design-doctrine.md +260 -0
- package/skills/oma-slide/resources/fixed-stage.md +232 -0
- package/skills/oma-slide/resources/generation-protocol.md +393 -0
- package/skills/oma-slide/resources/native-pptx.md +84 -0
- package/skills/oma-slide/resources/selection-index.json +461 -0
- package/skills/oma-slide/resources/style-presets.LICENSE +10 -0
- package/skills/oma-slide/resources/style-presets.md +520 -0
- package/skills/oma-tf-infra/SKILL.md +201 -0
- package/skills/oma-tf-infra/resources/checklist.md +53 -0
- package/skills/oma-tf-infra/resources/cost-optimization.md +574 -0
- package/skills/oma-tf-infra/resources/error-playbook.md +68 -0
- package/skills/oma-tf-infra/resources/examples.md +38 -0
- package/skills/oma-tf-infra/resources/execution-protocol.md +129 -0
- package/skills/oma-tf-infra/resources/iso-42001-infra.md +229 -0
- package/skills/oma-tf-infra/resources/multi-cloud-examples.md +241 -0
- package/skills/oma-tf-infra/resources/policy-testing-examples.md +332 -0
- package/skills/oma-translation/SKILL.md +229 -0
- package/skills/oma-translation/resources/anti-ai-patterns.md +104 -0
- package/skills/oma-translation/resources/lang/_template.md +73 -0
- package/skills/oma-translation/resources/lang/en.md +123 -0
- package/skills/oma-translation/resources/lang/ja.md +274 -0
- package/skills/oma-translation/resources/lang/ko.md +228 -0
- package/skills/oma-translation/resources/lang/zh.md +285 -0
- package/skills/oma-translation/resources/style-skills.md +104 -0
- package/skills/oma-translation/resources/translation-rubric.md +126 -0
- package/skills/oma-video/SKILL.md +229 -0
- package/skills/oma-video/config/video-config.yaml +60 -0
- package/skills/oma-video/resources/checklist.md +26 -0
- package/skills/oma-video/resources/execution-protocol.md +122 -0
- package/skills/oma-video/resources/existing-media.md +185 -0
- package/skills/oma-video/resources/hyperframes-authoring/README.md +44 -0
- package/skills/oma-video/resources/hyperframes-authoring/demo.md +31 -0
- package/skills/oma-video/resources/hyperframes-authoring/explainer.md +10 -0
- package/skills/oma-video/resources/hyperframes-authoring/shorts.md +10 -0
- package/skills/oma-video/resources/motion-principles.md +81 -0
- package/skills/oma-video/resources/mpt/driver.py +301 -0
- package/skills/oma-video/resources/prompt-tips.md +75 -0
- package/skills/oma-video/resources/script-schema.md +81 -0
- package/skills/oma-video/resources/sound-design.md +127 -0
- package/skills/oma-video/resources/strudel/package.json +11 -0
- package/skills/oma-video/resources/strudel/page.html +87 -0
- package/skills/oma-video/resources/strudel/render.mjs +295 -0
- package/skills/oma-video/resources/vendor-matrix.md +124 -0
- package/skills/oma-voice/SKILL.md +249 -0
- package/skills/oma-voice/config/voice-config.yaml +30 -0
- package/skills/oma-voice/resources/audio-processing.md +119 -0
- package/skills/oma-voice/resources/checklist.md +47 -0
- package/skills/oma-voice/resources/execution-protocol.md +215 -0
- package/skills/oma-voice/resources/prompt-tips.md +43 -0
- package/skills/oma-voice/resources/voice-matrix.md +51 -0
- package/skills/oma-voice/resources/voicestudio.md +87 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Output LAWs — oma-market
|
|
2
|
+
|
|
3
|
+
The upstream `last30days` engine owns the output contract: it emits the badge
|
|
4
|
+
as the first line of `--emit=compact` output and its SKILL.md defines LAWs
|
|
5
|
+
1–8 (no `Sources:` block, no invented title, no em/en-dash, no `##` headers in
|
|
6
|
+
a GENERAL-query body, inline `[name](url)` citations, engine footer, …). Read
|
|
7
|
+
them there — they are the authority and change with each release.
|
|
8
|
+
|
|
9
|
+
This file lists only the oma-side obligations that sit on top.
|
|
10
|
+
|
|
11
|
+
## O1 — Pass the engine's structure through
|
|
12
|
+
|
|
13
|
+
Badge first line, cluster structure, and footer come from the engine. Do not
|
|
14
|
+
re-title, re-section, or reorder them. Framework sections are appended
|
|
15
|
+
**after** the engine body and **before** nothing else — the engine footer stays
|
|
16
|
+
last only if the upstream contract says so; otherwise place frameworks after
|
|
17
|
+
the footer under the exact headers `## SWOT`, `## Porter's Five Forces`,
|
|
18
|
+
`## PESTEL` (these `##` headers are the one sanctioned exception to LAW 4, as
|
|
19
|
+
COMPARISON sections already are upstream).
|
|
20
|
+
|
|
21
|
+
## O2 — Frameworks cite clusters, never invent
|
|
22
|
+
|
|
23
|
+
Every framework cell references a cluster or representative that exists in
|
|
24
|
+
the engine output, as `[name](url)`. Missing URL → plain text, never `[name]()`.
|
|
25
|
+
|
|
26
|
+
## O3 — Coverage transparency
|
|
27
|
+
|
|
28
|
+
If the engine footer or stderr lists skipped / failed sources, keep that list
|
|
29
|
+
visible in the brief and say it in the chat summary.
|
|
30
|
+
|
|
31
|
+
## O4 — One brief, one date
|
|
32
|
+
|
|
33
|
+
`.agents/results/market/{topic-slug}-{YYYYMMDD}.md`. Same-day rerun overwrites.
|
|
34
|
+
|
|
35
|
+
## O5 — Personal-data refuse
|
|
36
|
+
|
|
37
|
+
Refuse research that targets a private individual's personal data before
|
|
38
|
+
running the engine. Founders, creators, and public handles are allowed
|
|
39
|
+
(upstream person mode).
|
|
40
|
+
|
|
41
|
+
## Self-check (after writing the draft)
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Write the candidate brief first; these checks read its actual bytes.
|
|
45
|
+
f=".agents/results/market/<slug>-<date>.md"
|
|
46
|
+
head -1 "$f" | grep -q '^🌐 last30days v' || echo "FAIL: badge not first line"
|
|
47
|
+
grep -nE '—|–' "$f" && echo "FAIL: em/en-dash"
|
|
48
|
+
grep -niE '^(Sources|References|Citations):' "$f" && echo "FAIL: sources block"
|
|
49
|
+
grep -nE '\[[^]]+\]\(\)' "$f" && echo "FAIL: empty citation"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Check the newly written draft, not an older output at the same path. Fix and re-check until clean; do not deliver a brief that fails the badge or
|
|
53
|
+
empty-citation checks.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oma-mobile
|
|
3
|
+
description: Implement Flutter, React Native, native Swift, or native Kotlin
|
|
4
|
+
Android apps. Use for mobile screens, widgets, platform integrations, and
|
|
5
|
+
application data flows.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Mobile Agent - Cross-Platform Mobile Specialist
|
|
9
|
+
|
|
10
|
+
## Scheduling
|
|
11
|
+
|
|
12
|
+
### Goal
|
|
13
|
+
Build, modify, and verify cross-platform mobile application features with clean architecture, platform-appropriate UI, state management, performance, and E2E coverage.
|
|
14
|
+
|
|
15
|
+
### Intent signature
|
|
16
|
+
- User asks for mobile app, Flutter, Dart, React Native, iOS, Android, Jetpack Compose, Kotlin, Riverpod, widgets, camera, GPS, push notifications, or offline-first work.
|
|
17
|
+
- User needs native or cross-platform mobile behavior rather than web frontend work.
|
|
18
|
+
|
|
19
|
+
### When to use
|
|
20
|
+
- Building native mobile applications (iOS + Android)
|
|
21
|
+
- Mobile-specific UI patterns
|
|
22
|
+
- Platform features (camera, GPS, push notifications)
|
|
23
|
+
- Offline-first architecture
|
|
24
|
+
|
|
25
|
+
### When NOT to use
|
|
26
|
+
- Web frontend -> use Frontend Agent
|
|
27
|
+
- Backend APIs -> use Backend Agent
|
|
28
|
+
|
|
29
|
+
### Expected inputs
|
|
30
|
+
- Target screen, widget, feature, platform capability, or mobile flow
|
|
31
|
+
- Existing app architecture, state management pattern, API contract, and platform constraints
|
|
32
|
+
- Test expectations for unit, widget, integration, or Maestro E2E coverage
|
|
33
|
+
|
|
34
|
+
### Expected outputs
|
|
35
|
+
- Mobile code changes in domain, data, presentation, platform, or test files
|
|
36
|
+
- UI aligned with Material Design 3 and iOS HIG as applicable
|
|
37
|
+
- Verification results from mobile checks and critical-flow tests
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
- Flutter/Dart, React Native, Swift, or Kotlin/Gradle toolchain as detected from the project
|
|
41
|
+
- Riverpod/Bloc, Dio, Hilt, Ktor, platform SDKs, and Maestro where applicable
|
|
42
|
+
- `resources/execution-protocol.md`, examples, snippets, checklist, and screen template
|
|
43
|
+
|
|
44
|
+
### Control-flow features
|
|
45
|
+
- Branches by platform, state management pattern, offline requirement, native permission, and test level
|
|
46
|
+
- Reads and writes mobile codebase files
|
|
47
|
+
- May call build, test, simulator, emulator, or E2E commands
|
|
48
|
+
|
|
49
|
+
## Structural Flow
|
|
50
|
+
|
|
51
|
+
### Entry
|
|
52
|
+
1. Identify target platform(s), screen/feature, architecture layer, and state boundary.
|
|
53
|
+
2. Inspect existing mobile patterns and dependencies.
|
|
54
|
+
3. Determine test level and verification environment.
|
|
55
|
+
|
|
56
|
+
### Scenes
|
|
57
|
+
1. **PREPARE**: Load app architecture, platform constraints, and acceptance criteria.
|
|
58
|
+
2. **ACQUIRE**: Read existing widgets/screens, providers/blocs, API clients, and tests.
|
|
59
|
+
3. **ACT**: Implement mobile UI, state, platform integration, offline handling, and tests.
|
|
60
|
+
4. **VERIFY**: Run relevant unit/widget/integration/E2E checks.
|
|
61
|
+
5. **FINALIZE**: Report behavior, platforms covered, and verification results.
|
|
62
|
+
|
|
63
|
+
### Transitions
|
|
64
|
+
- If business logic is complex, keep it in domain/data layers before presentation.
|
|
65
|
+
- If network calls are needed, use the variant transport (Dio / axios / generated Swift `Client` / generated Kotlin `*Api` over Ktor) with interceptors and offline handling.
|
|
66
|
+
- If a critical user flow changes, add or update Maestro E2E coverage.
|
|
67
|
+
- If backend contracts are missing, coordinate with backend/API work.
|
|
68
|
+
|
|
69
|
+
### Failure and recovery
|
|
70
|
+
- If platform SDK or emulator is unavailable, report verification limits.
|
|
71
|
+
- If a permission or native capability is missing, add explicit platform configuration or document blocker.
|
|
72
|
+
- If tests fail, fix before handoff or report the failing check.
|
|
73
|
+
|
|
74
|
+
### Exit
|
|
75
|
+
- Success: mobile feature works for target platforms and passes relevant checks.
|
|
76
|
+
- Partial success: platform, simulator, dependency, or verification gaps are explicit.
|
|
77
|
+
|
|
78
|
+
## Logical Operations
|
|
79
|
+
|
|
80
|
+
### Actions
|
|
81
|
+
| Action | SSL primitive | Evidence |
|
|
82
|
+
|--------|---------------|----------|
|
|
83
|
+
| Inspect mobile architecture | `READ` | Domain/data/presentation files |
|
|
84
|
+
| Select state and platform strategy | `SELECT` | Riverpod/Bloc and platform constraints |
|
|
85
|
+
| Implement mobile code | `WRITE` | Widgets, screens, providers, clients |
|
|
86
|
+
| Validate lifecycle and permissions | `VALIDATE` | Dispose, permissions, offline behavior |
|
|
87
|
+
| Call verification tools | `CALL_TOOL` | Tests, builds, Maestro |
|
|
88
|
+
| Report result | `NOTIFY` | Final summary |
|
|
89
|
+
|
|
90
|
+
### Tools and instruments
|
|
91
|
+
- Flutter/Dart, React Native, Swift, or Kotlin Android stack
|
|
92
|
+
- Riverpod/Bloc, Dio, Hilt, Ktor, platform SDKs, Maestro
|
|
93
|
+
- Unit, widget, integration, and E2E test commands
|
|
94
|
+
|
|
95
|
+
### Canonical workflow path
|
|
96
|
+
Use the configured code-intelligence provider to locate files and inspect symbols
|
|
97
|
+
or content. For Serena, use `find_file`, `search_for_pattern`,
|
|
98
|
+
`get_symbols_overview`, and `find_symbol`. Native search is limited to the
|
|
99
|
+
provider exclusions and non-code paths permitted by the project's search policy.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
Then run the project's mobile verification commands, typically unit/widget tests and Maestro E2E for critical flows.
|
|
103
|
+
|
|
104
|
+
### Resource scope
|
|
105
|
+
| Scope | Resource target |
|
|
106
|
+
|-------|-----------------|
|
|
107
|
+
| `CODEBASE` | Mobile source, tests, platform config |
|
|
108
|
+
| `LOCAL_FS` | Templates, snippets, resources |
|
|
109
|
+
| `PROCESS` | Build, test, emulator, simulator, E2E commands |
|
|
110
|
+
| `NETWORK` | Backend APIs when the feature integrates remotely |
|
|
111
|
+
|
|
112
|
+
### Preconditions
|
|
113
|
+
- Target mobile feature and platform scope are identifiable.
|
|
114
|
+
- Required SDKs, permissions, and API contracts are available or assumptions are stated.
|
|
115
|
+
|
|
116
|
+
### Effects and side effects
|
|
117
|
+
- Mutates mobile source, tests, and platform configuration.
|
|
118
|
+
- May affect permissions, app lifecycle, offline data, or performance.
|
|
119
|
+
|
|
120
|
+
### Guardrails
|
|
121
|
+
Apply framework, library, architecture, and data-model defaults only when the target project has no established choice. Scoped edits do not authorize a stack migration or unrelated infrastructure.
|
|
122
|
+
1. Clean Architecture: domain -> data -> presentation
|
|
123
|
+
2. Riverpod/Bloc for state management (no raw setState for complex logic)
|
|
124
|
+
3. Material Design 3 (Android) + iOS HIG (iOS)
|
|
125
|
+
4. All controllers disposed in `dispose()` method
|
|
126
|
+
5. Use the platform transport with auth/retry/logging interception and offline handling: Flutter uses Dio, React Native uses axios behind TanStack Query, Swift uses generated `Client` middleware, and Kotlin uses Ktor plugins on the generated `*Api` client.
|
|
127
|
+
6. 60fps target; verify supported target platforms (Swift iOS needs iOS only; Kotlin Android needs Android only)
|
|
128
|
+
7. Use Maestro for E2E testing of critical user flows
|
|
129
|
+
8. Swift native: SwiftUI + `@MainActor @Observable` view models (Observation framework, iOS 17+) — non-isolated VMs mutating observed state from a `Task` are a Swift 6 strict-concurrency error
|
|
130
|
+
9. Swift native: use the existing API layer. When the project adopts OpenAPI generation, use its generated Client for covered endpoints; a UI-only edit does not introduce a generator.
|
|
131
|
+
10. Swift native: when response caching is required, use the existing Repository cache; for a new hyperoslo/Cache implementation, use a ResponseCache actor — cache DECODED models (never `HTTPBody`), serve stale-while-revalidate on reads, invalidate keys on writes; view models depend on a protocol seam, not the concrete service (see `variants/swift-ios/snippets.md` §10)
|
|
132
|
+
11. Swift native: follow `App/Core/Features/Shared` project layout
|
|
133
|
+
12. Swift native: iOS Human Interface Guidelines for all UI decisions
|
|
134
|
+
13. Swift native: XCTest or Swift Testing for units, XCUITest for critical flows; cancel work via structured `.task {}` (auto-cancels on disappear) — never in `deinit`, which is nonisolated and cannot touch `@MainActor` state under Swift 6 (isolated deinit requires Swift 6.2+)
|
|
135
|
+
14. Swift native: restore edge swipe-back at the route layer — nav-bar-hidden screens (`.toolbar(.hidden, for: .navigationBar)`) lose it, so register push routes via a `swipeBackDestination` wrapper, not per-screen (see `variants/swift-ios/snippets.md` §9)
|
|
136
|
+
15. Flutter: when offline response caching is required, use the existing repository cache; if adding Drift, read cached entities then revalidate (stale-while-revalidate), and invalidate/refresh affected rows on every write; cache decoded entities at the data layer, never at the Dio transport (see `variants/flutter/snippets.md` §3, §10)
|
|
137
|
+
16. React Native: preserve the existing server-state layer; for TanStack Query with explicit `staleTime`/`gcTime` — invalidate affected query keys on every mutation, persist account-scoped cache to MMKV only when offline persistence is required; screens consume query/mutation hooks, never call axios directly (see `variants/react-native/snippets.md`)
|
|
138
|
+
17. Kotlin native: Jetpack Compose + `@HiltViewModel` exposing one `StateFlow<UiState>` collected with `collectAsStateWithLifecycle`; network work in `viewModelScope`, `CancellationException` always rethrown
|
|
139
|
+
18. Kotlin native: use the existing API layer. When the project adopts OpenAPI generation (`org.openapi.generator`, `kotlin` / `jvm-ktor`), call the generated `*Api` for covered endpoints and keep the Ktor engine (OkHttp on device, `MockEngine` in tests) injected where the client is constructed — Ktor is an engine-agnostic layer, not an OkHttp replacement; a UI-only edit does not introduce a generator (see `variants/kotlin-android/snippets.md` §1, §3)
|
|
140
|
+
19. Kotlin native: when response caching is required, use the existing repository cache; for a new Room implementation cache DECODED models with explicit TTL, stale-while-revalidate on reads, upsert/delete on writes — never OkHttp `Cache` or Ktor `HttpCache`; view models depend on an interface seam, not the concrete repository (see `variants/kotlin-android/snippets.md` §8)
|
|
141
|
+
20. Kotlin native: follow the `app/{ui,data,di}` + `api-client` layout; type-safe Navigation Compose routes; Material Design 3; JUnit + `ktor-client-mock` contract tests, Compose UI tests or Maestro for critical flows
|
|
142
|
+
|
|
143
|
+
## References
|
|
144
|
+
- Execution steps (follow for the selected task): `resources/execution-protocol.md`
|
|
145
|
+
- Code snippets (Swift): `variants/swift-ios/snippets.md`
|
|
146
|
+
- Code snippets (Kotlin Android): `variants/kotlin-android/snippets.md`
|
|
147
|
+
- Code snippets (Flutter): `variants/flutter/snippets.md`
|
|
148
|
+
- Code snippets (React Native): `variants/react-native/snippets.md`
|
|
149
|
+
- Checklist (run before handoff): `resources/checklist.md`
|
|
150
|
+
- Error recovery: `resources/error-playbook.md`
|
|
151
|
+
- Tech stack index (all platforms): `resources/tech-stack.md`
|
|
152
|
+
- Tech stack (Swift): `variants/swift-ios/tech-stack.md`
|
|
153
|
+
- Tech stack (Kotlin Android): `variants/kotlin-android/tech-stack.md`
|
|
154
|
+
- Tech stack (Flutter): `variants/flutter/tech-stack.md`
|
|
155
|
+
- Tech stack (React Native): `variants/react-native/tech-stack.md`
|
|
156
|
+
- Screen template (Flutter): `resources/screen-template.dart`
|
|
157
|
+
- Screen template (Swift): `resources/screen-template.swift`
|
|
158
|
+
- Screen template (React Native): `resources/screen-template.tsx`
|
|
159
|
+
- API service template (Swift): `variants/swift-ios/api-template.swift`
|
|
160
|
+
- API service template (Kotlin Android): `variants/kotlin-android/api-template.kt`
|
|
161
|
+
- API service template (Flutter): `variants/flutter/api-template.dart`
|
|
162
|
+
- API service template (React Native): `variants/react-native/api-template.ts`
|
|
163
|
+
- Variant registry: `variants/README.md`
|
|
164
|
+
- Context loading: `../_shared/core/context-loading.md`
|
|
165
|
+
- Clarification: `../_shared/core/clarification-protocol.md`
|
|
166
|
+
- Context budget: `../_shared/core/context-budget.md`
|
|
167
|
+
- Lessons learned: `../_shared/core/lessons-learned.md` (matching prior failure or requested retrospective)
|
|
168
|
+
- Observability handoff: `../oma-observability/SKILL.md` §Integrations — offline queuing, crash analytics, battery-aware sampling
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Mobile Agent - Self-Verification Checklist
|
|
2
|
+
|
|
3
|
+
Run through every item before submitting your work.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
- [ ] Clean Architecture layers: domain -> data -> presentation (App/Core/Features/Shared on Swift; `app/{ui,data,di}` + `api-client` on Kotlin)
|
|
7
|
+
- [ ] Entities/models are framework-free (pure Dart / plain TS types / plain Swift structs / plain Kotlin data classes)
|
|
8
|
+
- [ ] Repository pattern with interface + implementation (RN: TanStack Query hooks are the repository layer)
|
|
9
|
+
- [ ] Variant state solution used (Flutter: Riverpod/Bloc; RN: Zustand + TanStack Query; Swift: `@MainActor @Observable`; Kotlin: `@HiltViewModel` + `StateFlow`) — no ad-hoc state for complex logic
|
|
10
|
+
|
|
11
|
+
## Platform
|
|
12
|
+
- [ ] Material Design 3 for Android
|
|
13
|
+
- [ ] iOS Human Interface Guidelines followed
|
|
14
|
+
- [ ] Platform-specific code guarded (Flutter: `Platform.isIOS`/`Platform.isAndroid`; RN: `Platform.OS`)
|
|
15
|
+
- [ ] Tested on supported target platforms (iOS only for native Swift; Android only for native Kotlin)
|
|
16
|
+
- [ ] Dark mode supported
|
|
17
|
+
|
|
18
|
+
## Performance
|
|
19
|
+
- [ ] 60fps scrolling (no jank)
|
|
20
|
+
- [ ] Controllers disposed in `dispose()` method
|
|
21
|
+
- [ ] No memory leaks (listeners, subscriptions cleaned up)
|
|
22
|
+
- [ ] Images cached and sized appropriately
|
|
23
|
+
- [ ] Cold start < 2s
|
|
24
|
+
|
|
25
|
+
## API Integration
|
|
26
|
+
- [ ] Transport client with interceptors for auth/error handling (Flutter: Dio; RN: axios; Swift: generated Client middleware; Kotlin: Ktor plugins on the generated `*Api` client)
|
|
27
|
+
- [ ] Loading states shown during API calls
|
|
28
|
+
- [ ] Error states with retry action
|
|
29
|
+
- [ ] Offline handling (graceful degradation or offline-first)
|
|
30
|
+
- [ ] Tokens/secrets in secure storage (flutter_secure_storage / Keychain / react-native-keychain / Android Keystore-backed storage) — never plain prefs or MMKV
|
|
31
|
+
|
|
32
|
+
## Testing
|
|
33
|
+
- [ ] Unit tests for domain logic and providers
|
|
34
|
+
- [ ] Widget tests for key screens
|
|
35
|
+
- [ ] E2E tests with Maestro for critical user flows
|
|
36
|
+
- [ ] Edge cases: empty lists, error states, offline mode
|
|
37
|
+
- [ ] Applicable tests pass on supported target platforms
|
|
38
|
+
|
|
39
|
+
## React Native
|
|
40
|
+
> Applies when `package.json` declares a `react-native` dependency. Skip for Flutter/Swift native.
|
|
41
|
+
- [ ] Server state via TanStack Query hooks (query key factory shared between queries and mutations); screens never import axios directly
|
|
42
|
+
- [ ] Explicit `staleTime`/`gcTime` on queries; `gcTime` >= persister `maxAge` so the MMKV-persisted cache survives restarts
|
|
43
|
+
- [ ] Every mutation invalidates affected query keys (list AND detail); optimistic updates roll back on error and never fabricate cache entries
|
|
44
|
+
- [ ] `onlineManager` wired to NetInfo so offline pause/resume works
|
|
45
|
+
- [ ] Client state (auth/UI) in Zustand stores under `src/store/`; tokens hydrated from `react-native-keychain`, held in memory — never plain MMKV
|
|
46
|
+
- [ ] Typed React Navigation v7 routes (`RootStackParamList`); no `any` in navigation props
|
|
47
|
+
- [ ] `npx tsc --noEmit` and `npx jest --ci` pass
|
|
48
|
+
- [ ] Maestro flow updated for critical user flows (`e2e/`)
|
|
49
|
+
|
|
50
|
+
## Swift Native (iOS)
|
|
51
|
+
> Applies when the project is Swift native (`Package.swift` / `.xcodeproj` present). Skip for Flutter/RN.
|
|
52
|
+
- [ ] `App/Core/Features/Shared` layout respected (App = entry/DI, Core = networking/generated client, Features = view+`@Observable` VM slices, Shared = reusable UI/util)
|
|
53
|
+
- [ ] API access goes through the generated `Client` from `swift-openapi-generator` — no hand-rolled `URLRequest`/`JSONDecoder` for spec-covered endpoints
|
|
54
|
+
<!-- oma-docs:ignore-start -->
|
|
55
|
+
- [ ] OpenAPI document present at `Core/Networking/openapi.yaml` and synced from the backend before build
|
|
56
|
+
<!-- oma-docs:ignore-end -->
|
|
57
|
+
- [ ] SwiftUI state via `@MainActor @Observable` (Observation framework); async work cancelled via structured `.task {}` (not `deinit` — see `variants/swift-ios/snippets.md`)
|
|
58
|
+
- [ ] Loading / error (with retry) / empty / data states handled in views
|
|
59
|
+
- [ ] iOS Human Interface Guidelines followed
|
|
60
|
+
- [ ] Push routes registered via a `swipeBackDestination` wrapper (not bare `navigationDestination`), so nav-bar-hidden screens keep edge swipe-back; guarded pops (unsaved edits) override explicitly — see `variants/swift-ios/snippets.md` §9
|
|
61
|
+
- [ ] Run build/generation only when the user explicitly requested a build. Otherwise perform authorized checks without triggering compilation and report verification limits; do not run swift test when it would require a prohibited build.
|
|
62
|
+
- [ ] XCTest/XCUITest coverage for critical flows
|
|
63
|
+
|
|
64
|
+
## Kotlin Native (Android)
|
|
65
|
+
> Applies when the project is Kotlin native (`settings.gradle.kts` + `com.android.application` plugin, no `pubspec.yaml` / `react-native`). Skip for Flutter/RN/Swift.
|
|
66
|
+
- [ ] `app/{ui,data,di}` + `api-client` layout respected (ui = Compose screens + `@HiltViewModel` slices, data = repositories/Room/failures, di = Hilt modules, api-client = generated srcDir + shared `Json` + contract tests)
|
|
67
|
+
- [ ] API access goes through the generated `*Api` from `openapi-generator` (`kotlin` / `jvm-ktor`) — no hand-assembled URL paths or JSON bodies for spec-covered endpoints
|
|
68
|
+
- [ ] Ktor engine is injected where the `*Api` is constructed (OkHttp in the app's Hilt module, `MockEngine` in tests) — repositories and composables never reference an engine
|
|
69
|
+
- [ ] Shared `Json` codec registers the `BigDecimal` contextual serializer and is the same instance in DI and contract tests
|
|
70
|
+
- [ ] `preBuild` depends on `openApiGenerate`; generated sources under `build/generated/openapi` are never committed or hand-edited
|
|
71
|
+
- [ ] Compose state via `collectAsStateWithLifecycle` on a single `StateFlow<UiState>`; network work lives in `viewModelScope`, never `GlobalScope`
|
|
72
|
+
- [ ] Loading / error (with retry) / empty / data states handled in composables; `CancellationException` is rethrown, never swallowed
|
|
73
|
+
- [ ] Material Design 3 followed; dark theme and dynamic color honoured
|
|
74
|
+
- [ ] Type-safe Navigation Compose routes (`@Serializable` + `composable<Route>`); screens receive callbacks, not the `NavController`
|
|
75
|
+
- [ ] When caching is required: Room repository caches DECODED models with explicit TTL, stale-while-revalidate on reads, upsert/delete on writes — never OkHttp `Cache` or Ktor `HttpCache` (see `variants/kotlin-android/snippets.md` §8)
|
|
76
|
+
- [ ] Run Gradle test/compile tasks only when the user explicitly authorised a build or test run; otherwise report the verification limit
|
|
77
|
+
- [ ] `:api-client:test` contract test exercises the generated client against `MockEngine`; Compose UI test or Maestro flow for critical flows
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Mobile Agent - Error Recovery Playbook
|
|
2
|
+
|
|
3
|
+
When you encounter a failure, find the matching scenario and follow the recovery steps.
|
|
4
|
+
Use the relevant recovery steps. If required information or authority is missing, pause the dependent action and continue independent work.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Dart Analysis Error
|
|
9
|
+
|
|
10
|
+
**Symptoms**: `flutter analyze` errors, type mismatch, null safety issues
|
|
11
|
+
|
|
12
|
+
1. Read the error: file, line, expected type vs actual
|
|
13
|
+
2. Null safety issue: add `?` for nullable, `!` only if you're certain it's non-null
|
|
14
|
+
3. Type mismatch: check the model class to see if it matches the API response
|
|
15
|
+
4. Missing override: add `@override` annotation
|
|
16
|
+
5. **NEVER do this**: `// ignore:` comments to suppress analysis warnings
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Build Failure
|
|
21
|
+
|
|
22
|
+
**Symptoms**: `flutter build` fails, Gradle/Xcode errors
|
|
23
|
+
|
|
24
|
+
1. **Gradle (Android)**:
|
|
25
|
+
- `Could not resolve`: dependency version conflict → check `pubspec.yaml`
|
|
26
|
+
- `minSdkVersion`: update `android/app/build.gradle` minimum SDK
|
|
27
|
+
2. **Xcode (iOS)**:
|
|
28
|
+
- `Pod install` failure: note in result; may need `pod repo update`
|
|
29
|
+
- Minimum deployment target: check `ios/Podfile`
|
|
30
|
+
3. Clean and retry: `flutter clean && flutter pub get`
|
|
31
|
+
4. If persists: note in result with full error; may be an environment issue
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Test Failure
|
|
36
|
+
|
|
37
|
+
**Symptoms**: `flutter test` FAILED, widget test assertion errors
|
|
38
|
+
|
|
39
|
+
1. Read the error: which test, which widget, expected vs actual
|
|
40
|
+
2. Widget test: check if `pumpAndSettle()` is needed (async operations)
|
|
41
|
+
3. Provider not found: wrap test widget with `ProviderScope` (Riverpod)
|
|
42
|
+
4. Mock missing: ensure all dependencies are mocked
|
|
43
|
+
5. Re-run specific test: `flutter test test/path/to_test.dart`
|
|
44
|
+
6. **After 3 failures**: Try a different approach
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## State Management Issue
|
|
49
|
+
|
|
50
|
+
**Symptoms**: UI not updating, stale state, provider errors
|
|
51
|
+
|
|
52
|
+
1. **Riverpod**: Check provider type (`StateNotifierProvider` vs `FutureProvider` vs `AsyncNotifierProvider`)
|
|
53
|
+
2. Is the widget watching correctly? (`ref.watch` not `ref.read` for UI)
|
|
54
|
+
3. Is the state being mutated instead of replaced? (create new state object)
|
|
55
|
+
4. Add debug print in provider to trace state changes
|
|
56
|
+
5. Check: is `dispose` being called prematurely?
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Platform-Specific Crash
|
|
61
|
+
|
|
62
|
+
**Symptoms**: Works on one platform, crashes on another
|
|
63
|
+
|
|
64
|
+
1. Check for `Platform.isIOS` / `Platform.isAndroid` guards
|
|
65
|
+
2. Check permissions: camera, location, storage (different per platform)
|
|
66
|
+
3. Check native plugin compatibility; some plugins don't support both platforms
|
|
67
|
+
4. If plugin issue: note in result with platform and version info
|
|
68
|
+
5. Test on emulator for the failing platform
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Memory Leak
|
|
73
|
+
|
|
74
|
+
**Symptoms**: App slows down over time, `flutter run` shows increasing memory
|
|
75
|
+
|
|
76
|
+
1. Check: are all controllers disposed? (`TextEditingController`, `AnimationController`)
|
|
77
|
+
2. Check: are streams closed? (`StreamSubscription.cancel()`)
|
|
78
|
+
3. Check: are listeners removed? (`removeListener` in `dispose`)
|
|
79
|
+
4. Check: are `Timer` / `Timer.periodic` cancelled?
|
|
80
|
+
5. Use `DevTools` memory tab to identify leak source
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## API Integration Error
|
|
85
|
+
|
|
86
|
+
**Symptoms**: Dio errors, `DioException`, wrong response parsing
|
|
87
|
+
|
|
88
|
+
1. **Connection refused**: backend running? correct URL/port?
|
|
89
|
+
2. **401**: auth interceptor sending token? token expired?
|
|
90
|
+
3. **Parse error**: `response.data` shape doesn't match model → log raw response
|
|
91
|
+
4. **Timeout**: increase Dio timeout or check network conditions
|
|
92
|
+
5. If backend issue: document expected contract in result
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## React Native: Metro / Build Failure
|
|
97
|
+
|
|
98
|
+
**Symptoms**: Metro bundler errors, `Unable to resolve module`, pod install failures, Gradle errors
|
|
99
|
+
|
|
100
|
+
1. **Unable to resolve module**: check the import path and `tsconfig.json`/`babel.config.js` path aliases (`@api`, `@store`, ...) agree; then `npx react-native start --reset-cache`
|
|
101
|
+
2. **iOS pod failure**: `cd ios && pod install --repo-update`; New Architecture (0.76+) requires up-to-date pods for Nitro/TurboModules (e.g., react-native-mmkv v4 needs RN 0.76+)
|
|
102
|
+
3. **Gradle failure**: check `android/build.gradle` versions match the RN release template; clean with `cd android && ./gradlew clean`
|
|
103
|
+
4. **Native module mismatch after upgrade**: rebuild the app binary — JS-only reload cannot load new native modules
|
|
104
|
+
5. If persists: note in result with full error; may be an environment issue
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## React Native: TypeScript / Test Failure
|
|
109
|
+
|
|
110
|
+
**Symptoms**: `npx tsc --noEmit` errors, jest failures, RNTL matcher errors
|
|
111
|
+
|
|
112
|
+
1. Read the error: file, line, expected vs actual type
|
|
113
|
+
2. Navigation typing: screens must use the typed props from `RootStackParamList` — never `any`
|
|
114
|
+
3. Matcher not found (`toBeOnTheScreen` etc.): matchers are built into `@testing-library/react-native` ≥12.4 — remove any `@testing-library/jest-native` residue from jest setup
|
|
115
|
+
4. Query hook tests: wrap in a fresh `QueryClientProvider` per test (`retry: false`); async UI needs `await screen.findBy...`, not `getBy...`
|
|
116
|
+
5. **NEVER**: `@ts-ignore` / `as any` to silence type errors
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## React Native: Stale Cache / Offline Issues
|
|
121
|
+
|
|
122
|
+
**Symptoms**: UI shows old data, mutations don't refresh lists, cache gone after restart
|
|
123
|
+
|
|
124
|
+
1. Mutation missing invalidation? Every mutation must invalidate the affected query keys (list AND detail) via the shared key factory
|
|
125
|
+
2. Cache not surviving restart: `gcTime` must be >= the persister's `maxAge` (default 24h); a short `gcTime` lets GC prune entries from the persisted MMKV snapshot
|
|
126
|
+
3. Offline behavior dead: confirm `onlineManager.setEventListener` is wired to NetInfo — RN has no default online detection
|
|
127
|
+
4. Optimistic update ghosts: `setQueryData` must return `old` unchanged when the cache entry is absent — never fabricate `[]`
|
|
128
|
+
5. Persisted schema drift after model changes: bump the persister `buster` string to drop the old snapshot
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Rate Limit / Quota / Memory Fallback
|
|
133
|
+
|
|
134
|
+
Same as the backend playbook: see `../../oma-backend/resources/error-playbook.md` §"Rate Limit / Quota Error (LLM runtime)" and the configured code-intelligence or memory fallback guidance.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Swift: `swift build` Fails — Missing or Invalid OpenAPI Document
|
|
139
|
+
|
|
140
|
+
**Symptoms**: Build error from the `swift-openapi-generator` plugin such as `error: openapi.yaml not found` or YAML parse error; the build fails before any Swift file is compiled.
|
|
141
|
+
|
|
142
|
+
<!-- oma-docs:ignore-start -->
|
|
143
|
+
1. Confirm the spec exists at `Core/Networking/openapi.yaml` — this is where the build plugin looks.
|
|
144
|
+
<!-- oma-docs:ignore-end -->
|
|
145
|
+
2. If the file is absent: re-sync it from the backend (`curl -o Sources/Core/Networking/openapi.yaml https://<backend>/api-docs/openapi.yaml` or copy from the CI artifact). The iOS project is a **consumer** of the spec; never edit `openapi.yaml` directly.
|
|
146
|
+
3. If the file is present but the error is a parse error: validate the YAML (`python3 -c "import yaml, sys; yaml.safe_load(open(sys.argv[1]))" Sources/Core/Networking/openapi.yaml`); fix the upstream spec and re-sync.
|
|
147
|
+
4. After syncing, `swift build` will regenerate `Client`, `Operations`, and `Components` automatically — no manual code-gen step needed.
|
|
148
|
+
5. **NEVER**: commit a placeholder or empty `openapi.yaml` just to silence the build; it will produce an incomplete `Client` and cause compile errors downstream.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Swift: Generated `Client`/`Operations` Symbols Not Found
|
|
153
|
+
|
|
154
|
+
**Symptoms**: Compile errors such as `cannot find type 'Client' in scope` or `use of unresolved identifier 'Operations'`; the generator plugin appears not to have run.
|
|
155
|
+
|
|
156
|
+
1. Confirm the build plugin is attached in `Package.swift`:
|
|
157
|
+
- The target must list `.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator")` under its `plugins:` key.
|
|
158
|
+
- The target's dependencies must include `OpenAPIRuntime` and `OpenAPIURLSession`.
|
|
159
|
+
2. Confirm `openapi-generator-config.yaml` exists **in the same directory** as `openapi.yaml` (`Core/Networking/`). Without this file the plugin silently skips generation.
|
|
160
|
+
3. Check that both config files are inside the target's declared source directory (the directory that contains the `.target` in `Package.swift`). Files outside the source root are invisible to the build plugin.
|
|
161
|
+
4. Run `swift package clean && swift build` to force a full regeneration.
|
|
162
|
+
5. If Xcode is used: Product → Clean Build Folder, then build again. Derived data caching sometimes hides generation failures.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Swift: Compile Error for Undocumented Response Case
|
|
167
|
+
|
|
168
|
+
**Symptoms**: Compile error such as `expression pattern of type 'Operations.CreateTodo.Output.conflict' cannot match values of type '...'`; a response case (e.g., `.conflict`, `.created`, `.unprocessableContent`) referenced in the Swift code does not exist on the generated `Output` enum.
|
|
169
|
+
|
|
170
|
+
1. The root cause is that the OpenAPI spec does not declare that HTTP status code for the operation. The generator only emits cases for status codes listed in the spec.
|
|
171
|
+
2. Do NOT add the case manually to the generated file — it will be overwritten on the next `swift build`.
|
|
172
|
+
3. Ask the backend team to add the missing status code to the spec (e.g., add `409: description: Conflict` under the operation's `responses:`).
|
|
173
|
+
<!-- oma-docs:ignore-start -->
|
|
174
|
+
4. Re-sync `Core/Networking/openapi.yaml` once the spec is updated.
|
|
175
|
+
<!-- oma-docs:ignore-end -->
|
|
176
|
+
5. Run `swift build` to regenerate; the new response case will appear and the compile error will resolve.
|
|
177
|
+
6. Update the Swift `switch` in the service layer to handle the new case explicitly.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Swift: `@Observable` State Not Updating the SwiftUI View
|
|
182
|
+
|
|
183
|
+
**Symptoms**: Mutating a property on the view model has no visual effect; the view does not re-render even though the value changed.
|
|
184
|
+
|
|
185
|
+
1. Confirm the view model class is annotated with `@Observable` (Observation framework, **not** `ObservableObject`). Without the macro the view has no tracking infrastructure.
|
|
186
|
+
2. Check framework availability against supported OS versions. SwiftUI Observation integration requires iOS 17+. Preserve an older target using its supported observation mechanism or availability-gated implementation; changing minimum support requires a product decision.
|
|
187
|
+
3. Check that body reads the observable properties that should trigger an update and that those properties are not @ObservationIgnored. Plain let/var references to @Observable models can be observed. Use @State when the view owns the instance lifetime.
|
|
188
|
+
4. Use @Bindable when the child needs bindings such as $viewModel.title. Passing an observable reference as a plain argument does not prevent property observation or direct mutation.
|
|
189
|
+
5. Confirm properties are mutated on the **main actor**. Mutations from a background `Task` without `await MainActor.run { … }` (or `@MainActor` on the method) can update state off-main and miss the SwiftUI render pass.
|
|
190
|
+
6. When adapting an existing ObservableObject boundary, verify which layer owns and publishes the values read by the view instead of assuming the mechanisms automatically bridge.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## General Principles
|
|
195
|
+
|
|
196
|
+
- **After 3 failures**: If same approach fails 3 times, must try a different method
|
|
197
|
+
- **Blocked**: If no progress after 5 turns, save current state, `Status: blocked`
|
|
198
|
+
- **Out of scope**: Backend/frontend issues; only record in result
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Mobile Agent - Execution Protocol
|
|
2
|
+
|
|
3
|
+
## Preparation
|
|
4
|
+
Use the task's scope, existing project conventions, and acceptance criteria. Follow `../../_shared/core/execution-policy.md` when it has not already been supplied. Read only references needed by the selected operation; consult lessons or recovery guides for an observed issue. Expand planning depth only when the change requires it.
|
|
5
|
+
|
|
6
|
+
## Step 1: Analyze
|
|
7
|
+
- Read the task requirements carefully
|
|
8
|
+
- Identify target platform: check for `Package.swift` (Swift iOS), `settings.gradle.kts` + `com.android.application` plugin (Kotlin Android), `pubspec.yaml` (Flutter), or `package.json` + `react-native` dep (React Native)
|
|
9
|
+
<!-- oma-docs:ignore-start -->
|
|
10
|
+
- **If Swift (Package.swift detected)**: identify which `Features/` modules are affected; check for `Core/Networking/openapi.yaml`
|
|
11
|
+
<!-- oma-docs:ignore-end -->
|
|
12
|
+
- **If Kotlin Android**: identify which `ui/<feature>` slices are affected; read the `openApiGenerate {}` block in `app/build.gradle.kts` for the spec path and generated packages; find the Hilt module that constructs the generated `*Api` (Ktor engine lives there, not in repositories)
|
|
13
|
+
- **If Flutter**: identify screens, widgets, and Riverpod/Bloc providers
|
|
14
|
+
- **If React Native**: identify screens, query/mutation hooks (`src/features/*/queries.ts`), Zustand stores, and navigation types
|
|
15
|
+
- Explore existing code through the configured `code_intelligence` capability. If it is unavailable or times out, do not native-search feature roots. Native search is only for paths outside this project or ignored paths; record that limit.
|
|
16
|
+
- Determine platform-specific requirements (iOS HIG vs Material Design 3)
|
|
17
|
+
- List assumptions; ask if unclear
|
|
18
|
+
|
|
19
|
+
## Step 2: Plan
|
|
20
|
+
- **Swift**: plan using `App/Core/Features/Shared` layers; define the `@Observable` view model state enum; identify which `Operations` + `Components` types the feature needs from the generated `Client`
|
|
21
|
+
- **Kotlin Android**: plan using `app/{ui,data,di}`; define the sealed `UiState` the `@HiltViewModel` exposes through `StateFlow`; identify which generated `*Api` operations and `…generated.model` types the feature needs; decide whether a Room-backed repository cache is required
|
|
22
|
+
- **Flutter**: decide on feature structure using Clean Architecture; define entities (domain) and repository interfaces; plan state management (Riverpod providers); identify navigation routes (GoRouter)
|
|
23
|
+
- **React Native**: define the query key factory and query/mutation hooks (TanStack Query = repository layer); decide Zustand store shape for client state; plan typed React Navigation routes; decide persistence needs (MMKV persister, keychain for secrets)
|
|
24
|
+
- Plan offline-first strategy if required
|
|
25
|
+
- Note platform differences (iOS HIG vs Material Design 3)
|
|
26
|
+
|
|
27
|
+
## Step 3: Implement
|
|
28
|
+
- **Honor the task's `test_approach`** (see `../../_shared/core/test-approach.md`): for `tdd` tasks, write and run the focused test first (record the RED failure), make the minimal change (GREEN), then continue
|
|
29
|
+
- Create/modify files in this order (Flutter shown; Swift maps to Core → Features → Tests, Kotlin to data → di → ui/<feature> → ui/navigation → tests, RN to api → queries/mutations → store → ui → navigation → tests):
|
|
30
|
+
1. Domain: entities and repository interfaces
|
|
31
|
+
2. Data: models, API clients (Dio / axios / generated Client / generated `*Api`), repository implementations
|
|
32
|
+
3. Presentation: providers/hooks/view models, screens, widgets, composables
|
|
33
|
+
4. Navigation: GoRouter routes / typed React Navigation routes / router-owned NavigationStack / `@Serializable` Navigation Compose routes
|
|
34
|
+
5. Tests: unit + widget/component tests
|
|
35
|
+
- Use the platform's template as reference: `resources/screen-template.dart` (Flutter), `resources/screen-template.swift` (Swift), `resources/screen-template.tsx` (React Native); Kotlin uses `variants/kotlin-android/snippets.md` §5–§6 (view model + screen)
|
|
36
|
+
- Follow Clean Architecture layers strictly
|
|
37
|
+
|
|
38
|
+
## Step 4: Verify
|
|
39
|
+
- Check applicable items in `resources/checklist.md`
|
|
40
|
+
- Use `../../_shared/core/common-checklist.md` only for cross-domain verification
|
|
41
|
+
- For `tdd` tasks, append the `TDD_EVIDENCE` block (test command, RED, GREEN) to the result file per `../../_shared/core/test-approach.md`
|
|
42
|
+
- Verify supported target platforms; native Swift iOS does not require Android checks and native Kotlin Android does not require iOS checks. Respect the build policy when selecting tests (Gradle test tasks compile Kotlin).
|
|
43
|
+
- Verify 60fps performance (no jank)
|
|
44
|
+
- Check dark mode support
|
|
45
|
+
|
|
46
|
+
## On Error
|
|
47
|
+
See `resources/error-playbook.md` for recovery steps.
|