mobile-ai-agents 1.0.23

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.
Files changed (194) hide show
  1. package/AGENTS.md +228 -0
  2. package/CLAUDE.md +236 -0
  3. package/LICENSE +21 -0
  4. package/README.md +652 -0
  5. package/agents/android/android-crash-analyzer/README.md +134 -0
  6. package/agents/android/android-crash-analyzer/agent.md +206 -0
  7. package/agents/android/android-crash-analyzer/example-input.md +138 -0
  8. package/agents/android/android-crash-analyzer/example-output.md +225 -0
  9. package/agents/android/anr-investigation/README.md +78 -0
  10. package/agents/android/anr-investigation/agent.md +117 -0
  11. package/agents/android/anr-investigation/example-input.md +62 -0
  12. package/agents/android/anr-investigation/example-output.md +103 -0
  13. package/agents/android/axiom/agent.md +197 -0
  14. package/agents/android/code-reviewer/README.md +108 -0
  15. package/agents/android/code-reviewer/agent.md +210 -0
  16. package/agents/android/code-reviewer/example-input.md +116 -0
  17. package/agents/android/code-reviewer/example-output.md +115 -0
  18. package/agents/android/compose-navigation/README.md +76 -0
  19. package/agents/android/compose-navigation/agent.md +121 -0
  20. package/agents/android/compose-navigation/example-input.md +49 -0
  21. package/agents/android/compose-navigation/example-output.md +325 -0
  22. package/agents/android/compose-screen-builder/README.md +95 -0
  23. package/agents/android/compose-screen-builder/agent.md +170 -0
  24. package/agents/android/compose-screen-builder/example-input.md +40 -0
  25. package/agents/android/compose-screen-builder/example-output.md +568 -0
  26. package/agents/android/compose-ui-reviewer/README.md +73 -0
  27. package/agents/android/compose-ui-reviewer/agent.md +253 -0
  28. package/agents/android/compose-ui-reviewer/example-input.md +84 -0
  29. package/agents/android/compose-ui-reviewer/example-output.md +102 -0
  30. package/agents/android/crash-analyzer/README.md +53 -0
  31. package/agents/android/crash-analyzer/agent.md +295 -0
  32. package/agents/android/memory-leak-analyzer/README.md +79 -0
  33. package/agents/android/memory-leak-analyzer/agent.md +116 -0
  34. package/agents/android/memory-leak-analyzer/example-input.md +78 -0
  35. package/agents/android/memory-leak-analyzer/example-output.md +128 -0
  36. package/agents/cross-platform/accessibility-auditor/README.md +47 -0
  37. package/agents/cross-platform/accessibility-auditor/agent.md +268 -0
  38. package/agents/cross-platform/accessibility-auditor/example-input.md +84 -0
  39. package/agents/cross-platform/accessibility-auditor/example-output.md +132 -0
  40. package/agents/cross-platform/appforge/agent.md +303 -0
  41. package/agents/cross-platform/ci-cd-generator/README.md +65 -0
  42. package/agents/cross-platform/ci-cd-generator/agent.md +422 -0
  43. package/agents/cross-platform/ci-cd-generator/example-input.md +69 -0
  44. package/agents/cross-platform/ci-cd-generator/example-output.md +261 -0
  45. package/agents/cross-platform/crasher/agent.md +221 -0
  46. package/agents/cross-platform/figma/agent.md +247 -0
  47. package/agents/cross-platform/launchpad/agent.md +330 -0
  48. package/agents/cross-platform/mobile-harness/agent.md +422 -0
  49. package/agents/cross-platform/mobile-memory/agent.md +429 -0
  50. package/agents/cross-platform/perf/agent.md +261 -0
  51. package/agents/cross-platform/pipeline/agent.md +288 -0
  52. package/agents/cross-platform/release-notes-generator/README.md +63 -0
  53. package/agents/cross-platform/release-notes-generator/agent.md +218 -0
  54. package/agents/cross-platform/release-notes-generator/example-input.md +71 -0
  55. package/agents/cross-platform/release-notes-generator/example-output.md +96 -0
  56. package/agents/cross-platform/scribe/agent.md +180 -0
  57. package/agents/cross-platform/security-scanner/README.md +61 -0
  58. package/agents/cross-platform/security-scanner/agent.md +287 -0
  59. package/agents/cross-platform/security-scanner/example-input.md +77 -0
  60. package/agents/cross-platform/security-scanner/example-output.md +141 -0
  61. package/agents/cross-platform/sentinel/agent.md +217 -0
  62. package/agents/cross-platform/store-listing-writer/README.md +58 -0
  63. package/agents/cross-platform/store-listing-writer/agent.md +380 -0
  64. package/agents/cross-platform/store-listing-writer/example-input.md +67 -0
  65. package/agents/cross-platform/store-listing-writer/example-output.md +131 -0
  66. package/agents/flutter/bloc-feature-builder/README.md +101 -0
  67. package/agents/flutter/bloc-feature-builder/agent.md +225 -0
  68. package/agents/flutter/bloc-feature-builder/example-input.md +47 -0
  69. package/agents/flutter/bloc-feature-builder/example-output.md +838 -0
  70. package/agents/flutter/dart/agent.md +223 -0
  71. package/agents/flutter/widget-generator/README.md +66 -0
  72. package/agents/flutter/widget-generator/agent.md +264 -0
  73. package/agents/flutter/widget-generator/example-input.md +71 -0
  74. package/agents/flutter/widget-generator/example-output.md +163 -0
  75. package/agents/gaming/forge/agent.md +197 -0
  76. package/agents/gaming/unreal/agent.md +200 -0
  77. package/agents/ios/crash-analyzer/README.md +69 -0
  78. package/agents/ios/crash-analyzer/agent.md +300 -0
  79. package/agents/ios/crash-analyzer/example-input.md +83 -0
  80. package/agents/ios/crash-analyzer/example-output.md +126 -0
  81. package/agents/ios/swift/agent.md +206 -0
  82. package/agents/ios/swift-reviewer/README.md +68 -0
  83. package/agents/ios/swift-reviewer/agent.md +231 -0
  84. package/agents/ios/swift-reviewer/example-input.md +100 -0
  85. package/agents/ios/swift-reviewer/example-output.md +127 -0
  86. package/agents/react-native/bridge/agent.md +212 -0
  87. package/agents/react-native/performance-optimizer/README.md +81 -0
  88. package/agents/react-native/performance-optimizer/agent.md +284 -0
  89. package/agents/react-native/performance-optimizer/example-input.md +104 -0
  90. package/agents/react-native/performance-optimizer/example-output.md +132 -0
  91. package/agents/unity/shader-generator/README.md +77 -0
  92. package/agents/unity/shader-generator/agent.md +270 -0
  93. package/agents/unity/shader-generator/example-input.md +70 -0
  94. package/agents/unity/shader-generator/example-output.md +160 -0
  95. package/agents/unreal/blueprint-advisor/README.md +71 -0
  96. package/agents/unreal/blueprint-advisor/agent.md +311 -0
  97. package/agents/unreal/blueprint-advisor/example-input.md +73 -0
  98. package/agents/unreal/blueprint-advisor/example-output.md +217 -0
  99. package/cli/index.js +1091 -0
  100. package/docs/agent-guide.md +138 -0
  101. package/docs/chatgpt-integration.md +219 -0
  102. package/docs/core-loops.md +143 -0
  103. package/docs/cursor-integration.md +143 -0
  104. package/docs/getting-started.md +132 -0
  105. package/docs/index.html +711 -0
  106. package/docs/installation.md +271 -0
  107. package/docs/mobile-harness.md +160 -0
  108. package/docs/mobile-mcp.md +172 -0
  109. package/docs/mobile-memory.md +349 -0
  110. package/docs/release-process.md +85 -0
  111. package/docs/releases/release-v1.0.0.md +165 -0
  112. package/docs/roadmap/github-issues.md +239 -0
  113. package/docs/skill-categories.md +125 -0
  114. package/docs/vscode-copilot-integration.md +104 -0
  115. package/docs/wiki.md +615 -0
  116. package/install.sh +507 -0
  117. package/mobile-karpathy.md +79 -0
  118. package/package.json +57 -0
  119. package/skills/android/README.md +31 -0
  120. package/skills/android/android-tdd.md +89 -0
  121. package/skills/android/anr-investigation.md +251 -0
  122. package/skills/android/code-review.md +98 -0
  123. package/skills/android/compose-migration.md +48 -0
  124. package/skills/android/compose-review.md +78 -0
  125. package/skills/android/kotlin-modernize.md +51 -0
  126. package/skills/android/memory-leak-investigation.md +256 -0
  127. package/skills/android/proguard-rules.md +48 -0
  128. package/skills/cross-platform/accessibility-audit.md +63 -0
  129. package/skills/cross-platform/api-versioning.md +59 -0
  130. package/skills/cross-platform/clean-code-audit.md +239 -0
  131. package/skills/cross-platform/crash-triage.md +53 -0
  132. package/skills/cross-platform/deeplink-debug.md +57 -0
  133. package/skills/cross-platform/feature-slice.md +48 -0
  134. package/skills/cross-platform/grill-mobile.md +64 -0
  135. package/skills/cross-platform/mobile-mcp-qa.md +193 -0
  136. package/skills/cross-platform/mobile-memory-graph.md +179 -0
  137. package/skills/cross-platform/mobile-memory-save.md +210 -0
  138. package/skills/cross-platform/mobile-memory-search.md +154 -0
  139. package/skills/cross-platform/perf-audit.md +61 -0
  140. package/skills/cross-platform/prd-verification.md +324 -0
  141. package/skills/cross-platform/release-prep.md +64 -0
  142. package/skills/cross-platform/security-audit.md +281 -0
  143. package/skills/cross-platform/store-listing.md +75 -0
  144. package/skills/flutter/README.md +32 -0
  145. package/skills/flutter/dart-modernize.md +47 -0
  146. package/skills/flutter/flutter-review.md +59 -0
  147. package/skills/flutter/flutter-tdd.md +73 -0
  148. package/skills/flutter/widget-extract.md +41 -0
  149. package/skills/flutter/widget-gen.md +131 -0
  150. package/skills/gaming/blueprint-to-cpp.md +51 -0
  151. package/skills/gaming/game-perf.md +54 -0
  152. package/skills/gaming/shader-gen.md +44 -0
  153. package/skills/gaming/unity-tdd.md +85 -0
  154. package/skills/ios/README.md +45 -0
  155. package/skills/ios/data-persistence.md +151 -0
  156. package/skills/ios/ios-tdd.md +90 -0
  157. package/skills/ios/networking.md +139 -0
  158. package/skills/ios/performance.md +122 -0
  159. package/skills/ios/swift-concurrency.md +57 -0
  160. package/skills/ios/swift-review.md +124 -0
  161. package/skills/ios/swiftui-review.md +49 -0
  162. package/skills/ios/swiftui-state.md +122 -0
  163. package/skills/ios/unit-testing.md +144 -0
  164. package/skills/ios/xcode-warnings.md +37 -0
  165. package/skills/react-native/README.md +42 -0
  166. package/skills/react-native/bridge-audit.md +104 -0
  167. package/skills/react-native/expo-optimize.md +55 -0
  168. package/skills/react-native/new-arch-migrate.md +53 -0
  169. package/skills/react-native/performance.md +124 -0
  170. package/skills/react-native/rn-review.md +53 -0
  171. package/skills/react-native/rn-tdd.md +76 -0
  172. package/skills/shared/README.md +46 -0
  173. package/skills/shared/accessibility-audit.md +132 -0
  174. package/skills/shared/crash-analysis.md +110 -0
  175. package/skills/shared/security-scan.md +149 -0
  176. package/skills/unity/README.md +31 -0
  177. package/skills/unity/shader-review.md +110 -0
  178. package/templates/agent-template.md +88 -0
  179. package/templates/prompt-template.md +50 -0
  180. package/templates/skill-template.md +64 -0
  181. package/templates/workflow-template.md +48 -0
  182. package/workflows/app-launch.md +66 -0
  183. package/workflows/appforge-workflow.md +232 -0
  184. package/workflows/ci-setup.md +77 -0
  185. package/workflows/crash-to-fix.md +71 -0
  186. package/workflows/feature-ship.md +61 -0
  187. package/workflows/game-level.md +72 -0
  188. package/workflows/mobile-harness.md +319 -0
  189. package/workflows/mobile-mcp-qa.md +228 -0
  190. package/workflows/mobile-memory-workflow.md +243 -0
  191. package/workflows/new-project-setup.md +93 -0
  192. package/workflows/new-screen.md +68 -0
  193. package/workflows/perf-sprint.md +78 -0
  194. package/workflows/release-cycle.md +71 -0
@@ -0,0 +1,422 @@
1
+ # Agent 09 — CI/CD Pipeline Generator
2
+
3
+ **Platform:** Cross-Platform (All)
4
+ **Category:** DevOps & Release
5
+ **Complexity:** Medium
6
+
7
+ ---
8
+
9
+ ## Purpose
10
+
11
+ Generates complete, working CI/CD pipeline configuration files for mobile apps. Supports GitHub Actions, Bitrise, and Fastlane. Produces environment-specific pipelines (PR checks, staging builds, production releases) with signing configuration, test execution, and deployment steps tailored to the target platform.
12
+
13
+ ---
14
+
15
+ ## Input Format
16
+
17
+ ```
18
+ PLATFORM: <Android | iOS | Flutter | React Native>
19
+ CI_SYSTEM: <github-actions | bitrise | fastlane>
20
+ PIPELINE_TYPE: <pr-check | staging-build | production-release | all>
21
+ DISTRIBUTION: <firebase-app-distribution | testflight | play-store | app-store | none>
22
+ BUILD_TOOL: <gradle | xcodebuild | flutter | metro>
23
+ SIGNING: <keystore | app-store-connect | none>
24
+ TEST_FRAMEWORK: <junit | xctest | flutter-test | jest | none>
25
+ REQUIREMENTS:
26
+ <Any special requirements:
27
+ - Environment variables needed
28
+ - Specific Gradle/Xcode versions
29
+ - Custom steps (e.g., run screenshots, upload to Slack)
30
+ - Caching needs>
31
+ ```
32
+
33
+ **Fields:**
34
+
35
+ | Field | Required | Description |
36
+ |---|---|---|
37
+ | `PLATFORM` | Yes | Target mobile platform |
38
+ | `CI_SYSTEM` | Yes | Which CI/CD system to generate for |
39
+ | `PIPELINE_TYPE` | Yes | Which pipeline(s) to generate |
40
+ | `DISTRIBUTION` | Yes | Where builds are deployed |
41
+ | `BUILD_TOOL` | Yes | Build system used |
42
+ | `SIGNING` | Yes | Code signing approach |
43
+ | `TEST_FRAMEWORK` | Yes | Test runner, or `none` |
44
+ | `REQUIREMENTS` | No | Additional custom steps |
45
+
46
+ ---
47
+
48
+ ## Output Format
49
+
50
+ ````
51
+ CI/CD PIPELINE — <PLATFORM> / <CI_SYSTEM>
52
+ ==========================================
53
+ Pipelines Generated: <list>
54
+ Secrets Required : <list of env var names to configure>
55
+
56
+ --- [PR CHECK PIPELINE] ---
57
+ File: <.github/workflows/pr-check.yml or equivalent>
58
+
59
+ ```yaml
60
+ <full pipeline configuration>
61
+ ```
62
+
63
+ --- [STAGING BUILD PIPELINE] ---
64
+ File: <file path>
65
+
66
+ ```yaml
67
+ <full pipeline configuration>
68
+ ```
69
+
70
+ --- [PRODUCTION RELEASE PIPELINE] ---
71
+ File: <file path>
72
+
73
+ ```yaml
74
+ <full pipeline configuration>
75
+ ```
76
+
77
+ SETUP GUIDE
78
+ -----------
79
+ Step 1: <First thing to configure, e.g. add secrets to GitHub>
80
+ Step 2: <Second step>
81
+ ...
82
+
83
+ SECRETS REFERENCE
84
+ -----------------
85
+ | Secret Name | Where to Get It | Where to Set It |
86
+ |---|---|---|
87
+ | <SECRET_NAME> | <source> | <GitHub Settings / Bitrise Secrets / etc.> |
88
+
89
+ KNOWN LIMITATIONS
90
+ -----------------
91
+ - <Any assumption made about project structure>
92
+ - <Any platform version constraint>
93
+ ````
94
+
95
+ ---
96
+
97
+ ## System Prompt
98
+
99
+ ```
100
+ You are a senior mobile DevOps engineer. Your job is to generate complete, working CI/CD pipeline configuration files for mobile apps.
101
+
102
+ Rules:
103
+ 1. Output complete, valid YAML or Ruby (for Fastlane) — not pseudocode or partial configs.
104
+ 2. Use environment variables for all secrets — never hardcode credentials, passwords, or tokens.
105
+ 3. Add caching for build tools (Gradle cache, CocoaPods cache, pub cache, node_modules) to minimize build time.
106
+ 4. For PR checks: run lint, unit tests, and build. Do NOT deploy.
107
+ 5. For staging builds: build, sign, and deploy to the specified staging distribution channel.
108
+ 6. For production releases: build, sign, run tests, create a GitHub Release or tag, and deploy to the store.
109
+ 7. Use the latest stable versions of actions/tools available as of your knowledge cutoff.
110
+ 8. Include a comment for every non-obvious step.
111
+ 9. List every secret/environment variable the developer needs to configure, with a reference for where to get it.
112
+ 10. Be explicit about project structure assumptions (e.g., "assumes gradlew is in the repo root").
113
+
114
+ Output MUST follow the exact format specified.
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Example
120
+
121
+ ### Input
122
+
123
+ ```
124
+ PLATFORM: Android
125
+ CI_SYSTEM: github-actions
126
+ PIPELINE_TYPE: all
127
+ DISTRIBUTION: firebase-app-distribution
128
+ BUILD_TOOL: gradle
129
+ SIGNING: keystore
130
+ TEST_FRAMEWORK: junit
131
+ REQUIREMENTS:
132
+ - Kotlin 2.0, AGP 8.7
133
+ - Java 21
134
+ - Notify Slack channel #mobile-builds on success/failure
135
+ - Cache Gradle dependencies
136
+ - Run lint before tests
137
+ ```
138
+
139
+ ### Output
140
+
141
+ ````
142
+ CI/CD PIPELINE — Android / GitHub Actions
143
+ ==========================================
144
+ Pipelines Generated: PR Check, Staging Build, Production Release
145
+ Secrets Required : KEYSTORE_BASE64, KEYSTORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD,
146
+ FIREBASE_APP_ID, FIREBASE_TOKEN, SLACK_WEBHOOK_URL,
147
+ PLAY_SERVICE_ACCOUNT_JSON
148
+
149
+ --- [PR CHECK PIPELINE] ---
150
+ File: .github/workflows/pr-check.yml
151
+
152
+ ```yaml
153
+ name: PR Check
154
+
155
+ on:
156
+ pull_request:
157
+ branches: [main, develop]
158
+
159
+ concurrency:
160
+ group: pr-check-${{ github.ref }}
161
+ cancel-in-progress: true
162
+
163
+ jobs:
164
+ lint-and-test:
165
+ name: Lint & Unit Tests
166
+ runs-on: ubuntu-latest
167
+
168
+ steps:
169
+ - name: Checkout
170
+ uses: actions/checkout@v4
171
+
172
+ - name: Set up JDK 21
173
+ uses: actions/setup-java@v4
174
+ with:
175
+ java-version: '21'
176
+ distribution: 'temurin'
177
+
178
+ - name: Cache Gradle packages
179
+ uses: actions/cache@v4
180
+ with:
181
+ path: |
182
+ ~/.gradle/caches
183
+ ~/.gradle/wrapper
184
+ key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
185
+ restore-keys: gradle-
186
+
187
+ - name: Grant execute permission for gradlew
188
+ run: chmod +x gradlew
189
+
190
+ - name: Run Lint
191
+ run: ./gradlew lintDebug
192
+
193
+ - name: Run Unit Tests
194
+ run: ./gradlew testDebugUnitTest
195
+
196
+ - name: Upload Lint Report
197
+ if: failure()
198
+ uses: actions/upload-artifact@v4
199
+ with:
200
+ name: lint-report
201
+ path: app/build/reports/lint-results-debug.html
202
+
203
+ - name: Upload Test Results
204
+ if: always()
205
+ uses: actions/upload-artifact@v4
206
+ with:
207
+ name: test-results
208
+ path: app/build/reports/tests/testDebugUnitTest/
209
+ ```
210
+
211
+ --- [STAGING BUILD PIPELINE] ---
212
+ File: .github/workflows/staging-build.yml
213
+
214
+ ```yaml
215
+ name: Staging Build
216
+
217
+ on:
218
+ push:
219
+ branches: [develop]
220
+ workflow_dispatch:
221
+
222
+ jobs:
223
+ build-and-distribute:
224
+ name: Build & Deploy to Firebase
225
+ runs-on: ubuntu-latest
226
+
227
+ steps:
228
+ - name: Checkout
229
+ uses: actions/checkout@v4
230
+
231
+ - name: Set up JDK 21
232
+ uses: actions/setup-java@v4
233
+ with:
234
+ java-version: '21'
235
+ distribution: 'temurin'
236
+
237
+ - name: Cache Gradle packages
238
+ uses: actions/cache@v4
239
+ with:
240
+ path: |
241
+ ~/.gradle/caches
242
+ ~/.gradle/wrapper
243
+ key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
244
+ restore-keys: gradle-
245
+
246
+ - name: Grant execute permission for gradlew
247
+ run: chmod +x gradlew
248
+
249
+ - name: Run Unit Tests
250
+ run: ./gradlew testDebugUnitTest
251
+
252
+ - name: Decode Keystore
253
+ run: |
254
+ echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > keystore.jks
255
+
256
+ - name: Build Signed APK (staging)
257
+ run: |
258
+ ./gradlew assembleRelease \
259
+ -Pandroid.injected.signing.store.file=keystore.jks \
260
+ -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} \
261
+ -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} \
262
+ -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }}
263
+
264
+ - name: Install Firebase CLI
265
+ run: npm install -g firebase-tools
266
+
267
+ - name: Upload to Firebase App Distribution
268
+ run: |
269
+ firebase appdistribution:distribute app/build/outputs/apk/release/app-release.apk \
270
+ --app "${{ secrets.FIREBASE_APP_ID }}" \
271
+ --token "${{ secrets.FIREBASE_TOKEN }}" \
272
+ --groups "internal-testers" \
273
+ --release-notes "Staging build from commit ${{ github.sha }}"
274
+
275
+ - name: Notify Slack — Success
276
+ if: success()
277
+ uses: slackapi/slack-github-action@v1.27.0
278
+ with:
279
+ webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
280
+ webhook-type: incoming-webhook
281
+ payload: |
282
+ {
283
+ "text": "✅ *Staging build deployed* — ${{ github.repository }} @ ${{ github.sha }}"
284
+ }
285
+
286
+ - name: Notify Slack — Failure
287
+ if: failure()
288
+ uses: slackapi/slack-github-action@v1.27.0
289
+ with:
290
+ webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
291
+ webhook-type: incoming-webhook
292
+ payload: |
293
+ {
294
+ "text": "❌ *Staging build FAILED* — ${{ github.repository }} @ ${{ github.sha }}\nSee: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
295
+ }
296
+ ```
297
+
298
+ --- [PRODUCTION RELEASE PIPELINE] ---
299
+ File: .github/workflows/production-release.yml
300
+
301
+ ```yaml
302
+ name: Production Release
303
+
304
+ on:
305
+ push:
306
+ tags:
307
+ - 'v*.*.*' # Trigger on version tags, e.g. v3.2.0
308
+
309
+ jobs:
310
+ release:
311
+ name: Build, Sign & Publish to Play Store
312
+ runs-on: ubuntu-latest
313
+
314
+ steps:
315
+ - name: Checkout
316
+ uses: actions/checkout@v4
317
+
318
+ - name: Set up JDK 21
319
+ uses: actions/setup-java@v4
320
+ with:
321
+ java-version: '21'
322
+ distribution: 'temurin'
323
+
324
+ - name: Cache Gradle packages
325
+ uses: actions/cache@v4
326
+ with:
327
+ path: |
328
+ ~/.gradle/caches
329
+ ~/.gradle/wrapper
330
+ key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
331
+ restore-keys: gradle-
332
+
333
+ - name: Grant execute permission for gradlew
334
+ run: chmod +x gradlew
335
+
336
+ - name: Run Lint
337
+ run: ./gradlew lintRelease
338
+
339
+ - name: Run Unit Tests
340
+ run: ./gradlew testReleaseUnitTest
341
+
342
+ - name: Decode Keystore
343
+ run: |
344
+ echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > keystore.jks
345
+
346
+ - name: Build Signed AAB
347
+ run: |
348
+ ./gradlew bundleRelease \
349
+ -Pandroid.injected.signing.store.file=keystore.jks \
350
+ -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} \
351
+ -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} \
352
+ -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }}
353
+
354
+ - name: Create GitHub Release
355
+ uses: softprops/action-gh-release@v2
356
+ with:
357
+ files: app/build/outputs/bundle/release/app-release.aab
358
+ generate_release_notes: true
359
+
360
+ - name: Upload to Play Store (Internal Track)
361
+ uses: r0adkll/upload-google-play@v1.1.3
362
+ with:
363
+ serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
364
+ packageName: com.example.yourapp
365
+ releaseFiles: app/build/outputs/bundle/release/app-release.aab
366
+ track: internal
367
+ status: completed
368
+
369
+ - name: Notify Slack — Production Released
370
+ if: success()
371
+ uses: slackapi/slack-github-action@v1.27.0
372
+ with:
373
+ webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
374
+ webhook-type: incoming-webhook
375
+ payload: |
376
+ {
377
+ "text": "🚀 *Production release ${{ github.ref_name }} submitted to Play Store* — ${{ github.repository }}"
378
+ }
379
+ ```
380
+
381
+ SETUP GUIDE
382
+ -----------
383
+ Step 1: Generate your release keystore if you don't have one:
384
+ keytool -genkey -v -keystore release.jks -alias your-key-alias -keyalg RSA -keysize 2048 -validity 10000
385
+ Step 2: Base64-encode it: base64 -i release.jks | pbcopy
386
+ Step 3: Add all secrets listed below to GitHub → Settings → Secrets and variables → Actions.
387
+ Step 4: Create a Firebase project and register your Android app to get FIREBASE_APP_ID.
388
+ Step 5: Install Firebase CLI locally and run `firebase login:ci` to get FIREBASE_TOKEN.
389
+ Step 6: Create a Google Play service account with "Release Manager" role and download the JSON key.
390
+ Step 7: Add `#mobile-builds` Slack channel webhook via Slack App → Incoming Webhooks.
391
+ Step 8: For production releases, push a tag: git tag v3.2.0 && git push origin v3.2.0
392
+
393
+ SECRETS REFERENCE
394
+ -----------------
395
+ | Secret Name | Where to Get It | Where to Set It |
396
+ |---|---|---|
397
+ | KEYSTORE_BASE64 | base64-encode your .jks file | GitHub → Secrets |
398
+ | KEYSTORE_PASSWORD | Your keystore password | GitHub → Secrets |
399
+ | KEY_ALIAS | Your key alias (from keytool) | GitHub → Secrets |
400
+ | KEY_PASSWORD | Your key password | GitHub → Secrets |
401
+ | FIREBASE_APP_ID | Firebase Console → Project Settings → Your Apps | GitHub → Secrets |
402
+ | FIREBASE_TOKEN | Run `firebase login:ci` locally | GitHub → Secrets |
403
+ | SLACK_WEBHOOK_URL | Slack App → Incoming Webhooks | GitHub → Secrets |
404
+ | PLAY_SERVICE_ACCOUNT_JSON | Google Play Console → API access → Service accounts | GitHub → Secrets |
405
+
406
+ KNOWN LIMITATIONS
407
+ -----------------
408
+ - Assumes `gradlew` is in the repository root directory.
409
+ - Assumes the release build variant is named `release` (standard Gradle convention).
410
+ - AAB upload uses `internal` track — change to `alpha`, `beta`, or `production` as needed.
411
+ - Assumes package name is `com.example.yourapp` — update in the production workflow.
412
+ - Play Store upload requires manual promotion from Internal → Production in Play Console.
413
+ ````
414
+
415
+ ---
416
+
417
+ ## Notes
418
+
419
+ - For Fastlane, the agent generates a `Fastfile` with lanes for `test`, `beta`, and `release`.
420
+ - For iOS, the agent uses `xcodebuild` with App Store Connect API key authentication (no Apple ID/password).
421
+ - For Flutter, the agent generates separate Android and iOS job matrices in a single workflow.
422
+ - Tested with: Claude Sonnet 4.6, GPT-4o.
@@ -0,0 +1,69 @@
1
+ # Example Input — CI/CD Pipeline Generator
2
+
3
+ ---
4
+
5
+ ```
6
+ PLATFORM: Android
7
+ CI_SYSTEM: github-actions
8
+ PIPELINE_TYPE: all
9
+ DISTRIBUTION: firebase-app-distribution
10
+ BUILD_TOOL: gradle
11
+ SIGNING: keystore
12
+ TEST_FRAMEWORK: junit
13
+ REQUIREMENTS:
14
+ - Kotlin 2.0, AGP 8.7, Java 21
15
+ - Notify #mobile-builds Slack channel on success and failure
16
+ - Cache Gradle dependencies to speed up builds
17
+ - Run Android Lint before unit tests on PR check
18
+ - Staging distributes to "internal-testers" Firebase group
19
+ - Production uploads signed AAB to Play Store internal track
20
+ - Production creates a GitHub Release with auto-generated release notes
21
+ ```
22
+
23
+ ---
24
+
25
+ ## What to Expect
26
+
27
+ Three complete GitHub Actions YAML files. See [`example-output.md`](example-output.md).
28
+
29
+ Generated pipelines:
30
+ - **PR Check** (`.github/workflows/pr-check.yml`) — lint → unit tests → upload reports on failure
31
+ - **Staging Build** (`.github/workflows/staging-build.yml`) — build → sign APK → upload to Firebase → Slack
32
+ - **Production Release** (`.github/workflows/production-release.yml`) — lint → tests → build AAB → GitHub Release → Play Store internal → Slack
33
+
34
+ ---
35
+
36
+ ## Variations
37
+
38
+ ### Flutter (Android + iOS)
39
+ ```
40
+ PLATFORM: Flutter
41
+ CI_SYSTEM: github-actions
42
+ PIPELINE_TYPE: all
43
+ DISTRIBUTION: firebase-app-distribution
44
+ BUILD_TOOL: flutter
45
+ SIGNING: keystore
46
+ TEST_FRAMEWORK: flutter-test
47
+ REQUIREMENTS:
48
+ - Flutter 3.27, Dart 3.6
49
+ - Matrix build: Android + iOS in parallel
50
+ - Run flutter analyze and flutter test before build
51
+ - iOS distributes to TestFlight
52
+ - Cache pub cache
53
+ ```
54
+
55
+ ### iOS with Fastlane
56
+ ```
57
+ PLATFORM: iOS
58
+ CI_SYSTEM: fastlane
59
+ PIPELINE_TYPE: all
60
+ DISTRIBUTION: testflight
61
+ BUILD_TOOL: xcodebuild
62
+ SIGNING: app-store-connect
63
+ TEST_FRAMEWORK: xctest
64
+ REQUIREMENTS:
65
+ - Swift 5.10, Xcode 16
66
+ - Use App Store Connect API key (no Apple ID password)
67
+ - Run SwiftLint before tests
68
+ - Upload dSYMs to Firebase Crashlytics after each build
69
+ ```