@punks/cli 2.3.2 → 2.3.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.
Files changed (115) hide show
  1. package/dist/BASELINE_CHANGELOG.md +40 -0
  2. package/dist/CHANGELOG.md +26 -0
  3. package/dist/index.js +194 -220
  4. package/dist/skills/agnostic/cli/dp-cli/SKILL.md +1 -12
  5. package/dist/skills/agnostic/cli/dp-cli/references/commands.md +22 -18
  6. package/dist/skills/agnostic/cli/dp-cli/references/post-command-flow.md +15 -19
  7. package/dist/skills/agnostic/quality/review/SKILL.md +89 -0
  8. package/dist/skills/agnostic/research/parallel-research/SKILL.md +5 -2
  9. package/dist/skills/frameworks/expo/add-app-clip/SKILL.md +280 -0
  10. package/dist/skills/frameworks/expo/add-app-clip/agents/openai.yaml +4 -0
  11. package/dist/skills/frameworks/expo/add-app-clip/references/native-module.md +96 -0
  12. package/dist/skills/frameworks/expo/building-native-ui/SKILL.md +377 -0
  13. package/dist/skills/frameworks/expo/building-native-ui/agents/openai.yaml +4 -0
  14. package/dist/skills/frameworks/expo/building-native-ui/references/animations.md +220 -0
  15. package/dist/skills/frameworks/expo/building-native-ui/references/controls.md +270 -0
  16. package/dist/skills/frameworks/expo/building-native-ui/references/form-sheet.md +253 -0
  17. package/dist/skills/frameworks/expo/building-native-ui/references/gradients.md +106 -0
  18. package/dist/skills/frameworks/expo/building-native-ui/references/icons.md +213 -0
  19. package/dist/skills/frameworks/expo/building-native-ui/references/media.md +198 -0
  20. package/dist/skills/frameworks/expo/building-native-ui/references/route-structure.md +229 -0
  21. package/dist/skills/frameworks/expo/building-native-ui/references/search.md +248 -0
  22. package/dist/skills/frameworks/expo/building-native-ui/references/storage.md +121 -0
  23. package/dist/skills/frameworks/expo/building-native-ui/references/tabs.md +433 -0
  24. package/dist/skills/frameworks/expo/building-native-ui/references/toolbar-and-headers.md +284 -0
  25. package/dist/skills/frameworks/expo/building-native-ui/references/visual-effects.md +197 -0
  26. package/dist/skills/frameworks/expo/building-native-ui/references/webgpu-three.md +605 -0
  27. package/dist/skills/frameworks/expo/building-native-ui/references/zoom-transitions.md +158 -0
  28. package/dist/skills/frameworks/expo/eas-simulator/SKILL.md +154 -0
  29. package/dist/skills/frameworks/expo/eas-simulator/references/controllers.md +67 -0
  30. package/dist/skills/frameworks/expo/eas-simulator/references/run-your-app.md +185 -0
  31. package/dist/skills/frameworks/expo/eas-simulator/references/troubleshooting.md +38 -0
  32. package/dist/skills/frameworks/expo/eas-update-insights/SKILL.md +228 -0
  33. package/dist/skills/frameworks/expo/eas-update-insights/agents/openai.yaml +4 -0
  34. package/dist/skills/frameworks/expo/eas-update-insights/references/channel-insights-schema.md +47 -0
  35. package/dist/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +69 -0
  36. package/dist/skills/frameworks/expo/expo-api-routes/SKILL.md +368 -0
  37. package/dist/skills/frameworks/expo/expo-api-routes/agents/openai.yaml +4 -0
  38. package/dist/skills/frameworks/expo/expo-brownfield/SKILL.md +54 -0
  39. package/dist/skills/frameworks/expo/expo-brownfield/agents/openai.yaml +4 -0
  40. package/dist/skills/frameworks/expo/expo-brownfield/references/brownfield-integrated.md +526 -0
  41. package/dist/skills/frameworks/expo/expo-brownfield/references/brownfield-isolated.md +402 -0
  42. package/dist/skills/frameworks/expo/expo-brownfield/references/comparison.md +63 -0
  43. package/dist/skills/frameworks/expo/expo-brownfield/references/troubleshooting.md +88 -0
  44. package/dist/skills/frameworks/expo/expo-cicd-workflows/SKILL.md +92 -0
  45. package/dist/skills/frameworks/expo/expo-cicd-workflows/agents/openai.yaml +4 -0
  46. package/dist/skills/frameworks/expo/expo-cicd-workflows/scripts/fetch.js +109 -0
  47. package/dist/skills/frameworks/expo/expo-cicd-workflows/scripts/package.json +11 -0
  48. package/dist/skills/frameworks/expo/expo-cicd-workflows/scripts/validate.js +84 -0
  49. package/dist/skills/frameworks/expo/expo-deployment/SKILL.md +167 -0
  50. package/dist/skills/frameworks/expo/expo-deployment/agents/openai.yaml +4 -0
  51. package/dist/skills/frameworks/expo/expo-deployment/references/app-store-metadata.md +497 -0
  52. package/dist/skills/frameworks/expo/expo-deployment/references/ios-app-store.md +371 -0
  53. package/dist/skills/frameworks/expo/expo-deployment/references/play-store.md +246 -0
  54. package/dist/skills/frameworks/expo/expo-deployment/references/testflight.md +58 -0
  55. package/dist/skills/frameworks/expo/expo-deployment/references/workflows.md +160 -0
  56. package/dist/skills/frameworks/expo/expo-dev-client/SKILL.md +172 -0
  57. package/dist/skills/frameworks/expo/expo-dev-client/agents/openai.yaml +4 -0
  58. package/dist/skills/frameworks/expo/expo-examples/SKILL.md +97 -0
  59. package/dist/skills/frameworks/expo/expo-examples/references/catalog.md +105 -0
  60. package/dist/skills/frameworks/expo/expo-module/SKILL.md +141 -0
  61. package/dist/skills/frameworks/expo/expo-module/agents/openai.yaml +4 -0
  62. package/dist/skills/frameworks/expo/expo-module/references/config-plugin.md +90 -0
  63. package/dist/skills/frameworks/expo/expo-module/references/create-expo-module.md +206 -0
  64. package/dist/skills/frameworks/expo/expo-module/references/lifecycle.md +127 -0
  65. package/dist/skills/frameworks/expo/expo-module/references/module-config.md +48 -0
  66. package/dist/skills/frameworks/expo/expo-module/references/native-module.md +286 -0
  67. package/dist/skills/frameworks/expo/expo-module/references/native-view.md +171 -0
  68. package/dist/skills/frameworks/expo/expo-observe/SKILL.md +29 -0
  69. package/dist/skills/frameworks/expo/expo-observe/references/metrics.md +47 -0
  70. package/dist/skills/frameworks/expo/expo-observe/references/queries.md +342 -0
  71. package/dist/skills/frameworks/expo/expo-observe/references/setup.md +255 -0
  72. package/dist/skills/frameworks/expo/expo-skill-eval/SKILL.md +314 -0
  73. package/dist/skills/frameworks/expo/expo-skill-eval/agents/visual-grader.md +52 -0
  74. package/dist/skills/frameworks/expo/expo-skill-eval/references/design-rubric.md +45 -0
  75. package/dist/skills/frameworks/expo/expo-skill-eval/references/runtime-matrix.md +33 -0
  76. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/check-static.sh +64 -0
  77. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/clean-fixture.sh +56 -0
  78. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/generate_viewer.py +450 -0
  79. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/latest-sdk.sh +46 -0
  80. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/make-fixture.sh +95 -0
  81. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/make-workspace.sh +31 -0
  82. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/snapshot-android.sh +284 -0
  83. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/snapshot-ios.sh +132 -0
  84. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/snapshot-web.sh +61 -0
  85. package/dist/skills/frameworks/expo/expo-tailwind-setup/SKILL.md +480 -0
  86. package/dist/skills/frameworks/expo/expo-tailwind-setup/agents/openai.yaml +4 -0
  87. package/dist/skills/frameworks/expo/expo-ui/SKILL.md +47 -0
  88. package/dist/skills/frameworks/expo/expo-ui/agents/openai.yaml +4 -0
  89. package/dist/skills/frameworks/expo/expo-ui/references/drop-in-replacements.md +27 -0
  90. package/dist/skills/frameworks/expo/expo-ui/references/jetpack-compose.md +73 -0
  91. package/dist/skills/frameworks/expo/expo-ui/references/swift-ui.md +73 -0
  92. package/dist/skills/frameworks/expo/expo-ui/references/universal.md +73 -0
  93. package/dist/skills/frameworks/expo/expo-ui/scripts/list-components.js +193 -0
  94. package/dist/skills/frameworks/expo/native-data-fetching/SKILL.md +505 -0
  95. package/dist/skills/frameworks/expo/native-data-fetching/agents/openai.yaml +4 -0
  96. package/dist/skills/frameworks/expo/native-data-fetching/references/expo-router-loaders.md +341 -0
  97. package/dist/skills/frameworks/expo/upgrading-expo/SKILL.md +134 -0
  98. package/dist/skills/frameworks/expo/upgrading-expo/agents/openai.yaml +4 -0
  99. package/dist/skills/frameworks/expo/upgrading-expo/references/expo-av-to-audio.md +132 -0
  100. package/dist/skills/frameworks/expo/upgrading-expo/references/expo-av-to-video.md +160 -0
  101. package/dist/skills/frameworks/expo/upgrading-expo/references/native-tabs.md +124 -0
  102. package/dist/skills/frameworks/expo/upgrading-expo/references/new-architecture.md +79 -0
  103. package/dist/skills/frameworks/expo/upgrading-expo/references/react-19.md +79 -0
  104. package/dist/skills/frameworks/expo/upgrading-expo/references/react-compiler.md +59 -0
  105. package/dist/skills/frameworks/expo/upgrading-expo/references/react-navigation-to-expo-router.md +61 -0
  106. package/dist/skills/frameworks/expo/use-dom/SKILL.md +417 -0
  107. package/dist/skills/frameworks/expo/use-dom/agents/openai.yaml +4 -0
  108. package/dist/skills/frameworks/expo/web-to-native/SKILL.md +83 -0
  109. package/dist/skills/frameworks/expo/web-to-native/references/false-friends.md +119 -0
  110. package/dist/skills/frameworks/expo/web-to-native/references/native-patterns.md +39 -0
  111. package/dist/skills/frameworks/expo/web-to-native/references/run-as-goal.md +48 -0
  112. package/dist/skills/frameworks/expo/web-to-native/references/verify-on-device.md +45 -0
  113. package/dist/skills/phases/review-phase/REFERENCE.md +36 -3
  114. package/dist/skills/phases/review-phase/SKILL.md +18 -11
  115. package/package.json +1 -1
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { createHash } from 'node:crypto';
4
+ import { readFile, writeFile, mkdir } from 'node:fs/promises';
5
+ import { resolve } from 'node:path';
6
+ import process from 'node:process';
7
+
8
+ const CACHE_DIRECTORY = resolve(import.meta.dirname, '.cache');
9
+ const DEFAULT_TTL_SECONDS = 15 * 60; // 15 minutes
10
+
11
+ export async function fetchCached(url) {
12
+ await mkdir(CACHE_DIRECTORY, { recursive: true });
13
+
14
+ const cacheFile = resolve(CACHE_DIRECTORY, hashUrl(url) + '.json');
15
+ const cached = await loadCacheEntry(cacheFile);
16
+ if (cached && cached.expires > Math.floor(Date.now() / 1000)) {
17
+ return cached.data;
18
+ }
19
+
20
+ // Make request, with conditional If-None-Match if we have an ETag.
21
+ // Cache-Control: max-age=0 overrides Node's default 'no-cache' to allow 304 responses.
22
+ const response = await fetch(url, {
23
+ headers: {
24
+ 'Cache-Control': 'max-age=0',
25
+ ...(cached?.etag && { 'If-None-Match': cached.etag }),
26
+ },
27
+ });
28
+
29
+ if (response.status === 304 && cached) {
30
+ // Refresh expiration and return cached data
31
+ const entry = { ...cached, expires: getExpires(response.headers) };
32
+ await saveCacheEntry(cacheFile, entry);
33
+ return cached.data;
34
+ }
35
+
36
+ if (!response.ok) {
37
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
38
+ }
39
+
40
+ const etag = response.headers.get('etag');
41
+ const data = await response.text();
42
+ const expires = getExpires(response.headers);
43
+
44
+ await saveCacheEntry(cacheFile, { url, etag, expires, data });
45
+
46
+ return data;
47
+ }
48
+
49
+ function hashUrl(url) {
50
+ return createHash('sha256').update(url).digest('hex').slice(0, 16);
51
+ }
52
+
53
+ async function loadCacheEntry(cacheFile) {
54
+ try {
55
+ return JSON.parse(await readFile(cacheFile, 'utf-8'));
56
+ } catch {
57
+ return null;
58
+ }
59
+ }
60
+
61
+ async function saveCacheEntry(cacheFile, entry) {
62
+ await writeFile(cacheFile, JSON.stringify(entry, null, 2));
63
+ }
64
+
65
+ function getExpires(headers) {
66
+ const now = Math.floor(Date.now() / 1000);
67
+
68
+ // Prefer Cache-Control: max-age
69
+ const maxAgeSeconds = parseMaxAge(headers.get('cache-control'));
70
+ if (maxAgeSeconds != null) {
71
+ return now + maxAgeSeconds;
72
+ }
73
+
74
+ // Fall back to Expires header
75
+ const expires = headers.get('expires');
76
+ if (expires) {
77
+ const expiresTime = Date.parse(expires);
78
+ if (!Number.isNaN(expiresTime)) {
79
+ return Math.floor(expiresTime / 1000);
80
+ }
81
+ }
82
+
83
+ // Default TTL
84
+ return now + DEFAULT_TTL_SECONDS;
85
+ }
86
+
87
+ function parseMaxAge(cacheControl) {
88
+ if (!cacheControl) {
89
+ return null;
90
+ }
91
+ const match = cacheControl.match(/max-age=(\d+)/i);
92
+ return match ? parseInt(match[1], 10) : null;
93
+ }
94
+
95
+ if (import.meta.main) {
96
+ const url = process.argv[2];
97
+
98
+ if (!url || url === '--help' || url === '-h') {
99
+ console.log(`Usage: fetch <url>
100
+
101
+ Fetches a URL with HTTP caching (ETags + Cache-Control/Expires).
102
+ Default TTL: ${DEFAULT_TTL_SECONDS / 60} minutes.
103
+ Cache is stored in: ${CACHE_DIRECTORY}/`);
104
+ process.exit(url ? 0 : 1);
105
+ }
106
+
107
+ const data = await fetchCached(url);
108
+ console.log(data);
109
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@expo/cicd-workflows-skill",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "dependencies": {
7
+ "ajv": "^8.17.1",
8
+ "ajv-formats": "^3.0.1",
9
+ "js-yaml": "^4.1.0"
10
+ }
11
+ }
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readFile } from 'node:fs/promises';
4
+ import { resolve } from 'node:path';
5
+ import process from 'node:process';
6
+
7
+ import Ajv2020 from 'ajv/dist/2020.js';
8
+ import addFormats from 'ajv-formats';
9
+ import yaml from 'js-yaml';
10
+
11
+ import { fetchCached } from './fetch.js';
12
+
13
+ const SCHEMA_URL = 'https://api.expo.dev/v2/workflows/schema';
14
+
15
+ async function fetchSchema() {
16
+ const data = await fetchCached(SCHEMA_URL);
17
+ const body = JSON.parse(data);
18
+ return body.data;
19
+ }
20
+
21
+ function createValidator(schema) {
22
+ const ajv = new Ajv2020({ allErrors: true, strict: true });
23
+ addFormats(ajv);
24
+ return ajv.compile(schema);
25
+ }
26
+
27
+ async function validateFile(validator, filePath) {
28
+ const content = await readFile(filePath, 'utf-8');
29
+
30
+ let doc;
31
+ try {
32
+ doc = yaml.load(content);
33
+ } catch (e) {
34
+ return { valid: false, error: `YAML parse error: ${e.message}` };
35
+ }
36
+
37
+ const valid = validator(doc);
38
+ if (!valid) {
39
+ return { valid: false, error: formatErrors(validator.errors) };
40
+ }
41
+
42
+ return { valid: true };
43
+ }
44
+
45
+ function formatErrors(errors) {
46
+ return errors
47
+ .map((error) => {
48
+ const path = error.instancePath || '(root)';
49
+ const allowed = error.params?.allowedValues?.join(', ');
50
+ return ` ${path}: ${error.message}${allowed ? ` (allowed: ${allowed})` : ''}`;
51
+ })
52
+ .join('\n');
53
+ }
54
+
55
+ if (import.meta.main) {
56
+ const args = process.argv.slice(2);
57
+ const files = args.filter((a) => !a.startsWith('-'));
58
+
59
+ if (files.length === 0 || args.includes('--help') || args.includes('-h')) {
60
+ console.log(`Usage: validate <workflow.yml> [workflow2.yml ...]
61
+
62
+ Validates EAS workflow YAML files against the official schema.`);
63
+ process.exit(files.length === 0 ? 1 : 0);
64
+ }
65
+
66
+ const schema = await fetchSchema();
67
+ const validator = createValidator(schema);
68
+
69
+ let hasErrors = false;
70
+
71
+ for (const file of files) {
72
+ const filePath = resolve(process.cwd(), file);
73
+ const result = await validateFile(validator, filePath);
74
+
75
+ if (result.valid) {
76
+ console.log(`✓ ${file}`);
77
+ } else {
78
+ console.error(`✗ ${file}\n${result.error}`);
79
+ hasErrors = true;
80
+ }
81
+ }
82
+
83
+ process.exit(hasErrors ? 1 : 0);
84
+ }
@@ -0,0 +1,167 @@
1
+ ---
2
+ name: expo-deployment
3
+ description: Deploy Expo apps to production with EAS — build and submit to the iOS App Store, Google Play Store, and TestFlight, configure eas.json build and submit profiles, manage app versions and build numbers, publish App Store metadata and ASO, and deploy web bundles and API routes via EAS Hosting. Use whenever the user is preparing a production build, running eas build or eas submit, shipping to TestFlight, releasing or rolling out to the app stores, bumping version or build numbers, or setting up store listing metadata for an Expo app.
4
+ version: 1.0.0
5
+ license: MIT
6
+ ---
7
+
8
+ # Deployment
9
+
10
+ This skill covers deploying Expo applications across all platforms using EAS (Expo Application Services).
11
+
12
+ ## References
13
+
14
+ Consult these resources as needed:
15
+
16
+ - ./references/workflows.md -- CI/CD workflows for automated deployments and PR previews
17
+ - ./references/testflight.md -- Submitting iOS builds to TestFlight for beta testing
18
+ - ./references/app-store-metadata.md -- Managing App Store metadata and ASO optimization
19
+ - ./references/play-store.md -- Submitting Android builds to Google Play Store
20
+ - ./references/ios-app-store.md -- iOS App Store submission and review process
21
+
22
+ ## Quick Start
23
+
24
+ ### Install EAS CLI
25
+
26
+ ```bash
27
+ npm install -g eas-cli
28
+ eas login
29
+ ```
30
+
31
+ ### Initialize EAS
32
+
33
+ ```bash
34
+ npx eas-cli@latest init
35
+ ```
36
+
37
+ This creates `eas.json` with build profiles.
38
+
39
+ ## Build Commands
40
+
41
+ ### Production Builds
42
+
43
+ ```bash
44
+ # iOS App Store build
45
+ npx eas-cli@latest build -p ios --profile production
46
+
47
+ # Android Play Store build
48
+ npx eas-cli@latest build -p android --profile production
49
+
50
+ # Both platforms
51
+ npx eas-cli@latest build --profile production
52
+ ```
53
+
54
+ ### Submit to Stores
55
+
56
+ ```bash
57
+ # iOS: Build and submit to App Store Connect
58
+ npx eas-cli@latest build -p ios --profile production --submit
59
+
60
+ # Android: Build and submit to Play Store
61
+ npx eas-cli@latest build -p android --profile production --submit
62
+
63
+ # Shortcut for iOS TestFlight
64
+ npx testflight
65
+ ```
66
+
67
+ ## Web Deployment
68
+
69
+ Deploy web apps using EAS Hosting:
70
+
71
+ ```bash
72
+ # Deploy to production
73
+ npx expo export -p web
74
+ npx eas-cli@latest deploy --prod
75
+
76
+ # Deploy PR preview
77
+ npx eas-cli@latest deploy
78
+ ```
79
+
80
+ Expo Router API routes deploy together with the web bundle on EAS Hosting — `eas deploy` ships both. To author or configure the API routes themselves, use the `expo-api-routes` skill.
81
+
82
+ ## EAS Configuration
83
+
84
+ Standard `eas.json` for production deployments:
85
+
86
+ ```json
87
+ {
88
+ "cli": {
89
+ "version": ">= 16.0.1",
90
+ "appVersionSource": "remote"
91
+ },
92
+ "build": {
93
+ "production": {
94
+ "autoIncrement": true,
95
+ "ios": {
96
+ "resourceClass": "m-medium"
97
+ }
98
+ },
99
+ "development": {
100
+ "developmentClient": true,
101
+ "distribution": "internal"
102
+ }
103
+ },
104
+ "submit": {
105
+ "production": {
106
+ "ios": {
107
+ "appleId": "your@email.com",
108
+ "ascAppId": "1234567890"
109
+ },
110
+ "android": {
111
+ "serviceAccountKeyPath": "./google-service-account.json",
112
+ "track": "internal"
113
+ }
114
+ }
115
+ }
116
+ }
117
+ ```
118
+
119
+ ## Platform-Specific Guides
120
+
121
+ ### iOS
122
+
123
+ - Use `npx testflight` for quick TestFlight submissions
124
+ - Configure Apple credentials via `eas credentials`
125
+ - See ./references/testflight.md for credential setup
126
+ - See ./references/ios-app-store.md for App Store submission
127
+
128
+ ### Android
129
+
130
+ - Set up Google Play Console service account
131
+ - Configure tracks: internal → closed → open → production
132
+ - See ./references/play-store.md for detailed setup
133
+
134
+ ### Web
135
+
136
+ - EAS Hosting provides preview URLs for PRs
137
+ - Production deploys to your custom domain
138
+ - See ./references/workflows.md for CI/CD automation
139
+
140
+ ## Automated Deployments
141
+
142
+ EAS Workflows automate the build → submit → update → deploy pipeline for CI/CD. See ./references/workflows.md for deployment-oriented examples. To author or validate workflow YAML, use the `expo-cicd-workflows` skill — it works from the live workflow schema.
143
+
144
+ ## Version Management
145
+
146
+ EAS manages version numbers automatically with `appVersionSource: "remote"`:
147
+
148
+ ```bash
149
+ # Check current versions
150
+ eas build:version:get
151
+
152
+ # Manually set version
153
+ eas build:version:set -p ios --build-number 42
154
+ ```
155
+
156
+ ## Monitoring
157
+
158
+ ```bash
159
+ # List recent builds
160
+ eas build:list
161
+
162
+ # Check build status
163
+ eas build:view
164
+
165
+ # View submission status
166
+ eas submit:list
167
+ ```
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Expo Deployment"
3
+ short_description: "Deploy Expo apps to TestFlight, App Store, Play Store, EAS Hosting, and API routes"
4
+ default_prompt: "Use $expo-deployment when preparing production EAS builds, store submissions, web deploys, TestFlight distribution, app-store metadata, version management, or deployment workflows for an Expo app."