Skip to content

Commit 79de1ea

Browse files
committed
Add react-native-to-swiftui plugin
1 parent f38347e commit 79de1ea

34 files changed

Lines changed: 2969 additions & 1 deletion

File tree

‎.agents/plugins/marketplace.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@
1515
"authentication": "ON_USE"
1616
},
1717
"category": "Developer Tools"
18+
},
19+
{
20+
"name": "react-native-to-swiftui",
21+
"source": {
22+
"source": "local",
23+
"path": "./plugins/react-native-to-swiftui"
24+
},
25+
"policy": {
26+
"installation": "AVAILABLE",
27+
"authentication": "ON_USE"
28+
},
29+
"category": "Developer Tools"
1830
}
1931
]
2032
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: React Native to SwiftUI
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/react-native-to-swiftui.yml"
7+
- ".agents/plugins/marketplace.json"
8+
- "package.json"
9+
- "README.md"
10+
- "plugins/react-native-to-swiftui/**"
11+
- "scripts/*react-native-to-swiftui*"
12+
- "scripts/validate-marketplace.mjs"
13+
- "tests/react-native-to-swiftui/**"
14+
push:
15+
branches: [main]
16+
paths:
17+
- ".github/workflows/react-native-to-swiftui.yml"
18+
- ".agents/plugins/marketplace.json"
19+
- "package.json"
20+
- "README.md"
21+
- "plugins/react-native-to-swiftui/**"
22+
- "scripts/*react-native-to-swiftui*"
23+
- "scripts/validate-marketplace.mjs"
24+
- "tests/react-native-to-swiftui/**"
25+
workflow_dispatch:
26+
27+
permissions:
28+
contents: read
29+
30+
concurrency:
31+
group: react-native-to-swiftui-${{ github.workflow }}-${{ github.ref }}
32+
cancel-in-progress: true
33+
34+
jobs:
35+
portable:
36+
name: Portable package / Node ${{ matrix.node }}
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 10
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
node: ["22.19.0", "24", "26"]
43+
steps:
44+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
45+
with:
46+
persist-credentials: false
47+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
48+
with:
49+
node-version: ${{ matrix.node }}
50+
package-manager-cache: false
51+
- name: Cold copied package / Node ${{ matrix.node }}
52+
run: node --test --test-concurrency=1 tests/react-native-to-swiftui/integration/packaged.test.mjs
53+
- run: npm run validate:marketplace
54+
- run: npm run validate:react-native-to-swiftui
55+
- run: npm run test:react-native-to-swiftui
56+
57+
apple-platform:
58+
name: Apple toolchain preflight
59+
needs: portable
60+
runs-on: macos-latest
61+
timeout-minutes: 20
62+
steps:
63+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64+
with:
65+
persist-credentials: false
66+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
67+
with:
68+
node-version: "22.19.0"
69+
package-manager-cache: false
70+
- name: Probe installed Xcode and available Simulator
71+
continue-on-error: true
72+
run: node plugins/react-native-to-swiftui/scripts/native-port.mjs toolchain --format json
73+
- run: npm run validate:react-native-to-swiftui
74+
- run: npm run test:react-native-to-swiftui

‎README.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ paths instead:
3232
plugins/grafana-observability
3333
```
3434

35+
To fetch only React Native to SwiftUI, use:
36+
37+
```text
38+
.agents/plugins
39+
plugins/react-native-to-swiftui
40+
```
41+
3542
Adding a marketplace makes its catalog available to browse. It does **not**
3643
install, enable, or authenticate every plugin. After adding it, install only
3744
the plugin you want.
@@ -47,6 +54,9 @@ codex plugin marketplace add tonyloehr/community-plugins \
4754

4855
# Install one plugin from that catalog.
4956
codex plugin add grafana-observability@community-plugins
57+
58+
# Or install the bounded native-migration workflow.
59+
codex plugin add react-native-to-swiftui@community-plugins
5060
```
5161

5262
If you want a full checkout instead of a sparse one:
@@ -65,6 +75,7 @@ are picked up.
6575
| Plugin | Purpose | Learn more |
6676
| --- | --- | --- |
6777
| [Grafana Observability](plugins/grafana-observability/README.md) | Inspect administrator-approved, read-only Grafana evidence for infrastructure, APM, logs, IoT/edge, and business KPIs. | [Guide](plugins/grafana-observability/README.md) · [23-second demo](docs/media/grafana-production-monitoring-demo-8x.mp4) |
78+
| [React Native to SwiftUI](plugins/react-native-to-swiftui/README.md) | Plan a bounded React Native/Expo feature migration, then port one explicitly approved slice with deterministic SwiftUI parity checks. | [Guide](plugins/react-native-to-swiftui/README.md) |
6879

6980
Grafana Observability requires Codex and Node.js 22.19 or newer. Its manifest
7081
declares both `Read` and `Write`. `Write` is limited to
@@ -78,6 +89,17 @@ install without touching a Grafana instance:
7889
Use $setup-grafana-observability to check the fixture profile and available packs.
7990
```
8091

92+
React Native to SwiftUI requires Codex and Node.js 22.19 or newer. Its
93+
manifest declares both `Read` and `Write`: planning is read-only, while
94+
writes are limited to an explicitly approved target directory for one feature
95+
slice. It has no app or MCP dependency, does not copy source or assets into
96+
the plugin, and does not promise App Store approval. Its first run is a
97+
read-only parity-planning prompt:
98+
99+
```text
100+
Use $plan-react-native-port to inspect only the declared React Native feature and propose a SwiftUI parity contract. Do not edit files yet.
101+
```
102+
81103
## Copy-paste Codex prompts
82104

83105
Browse before installing:
@@ -92,6 +114,12 @@ Install one plugin:
92114
If community-plugins is not already configured, add it from tonyloehr/community-plugins at ref main using sparse paths .agents/plugins and plugins/grafana-observability. Install grafana-observability@community-plugins, explain its permissions and authentication policy, and give me the credential-free smoke-test prompt for a new Codex task.
93115
```
94116

117+
Install React Native to SwiftUI with a read-only first run:
118+
119+
```text
120+
If community-plugins is not already configured, add it from tonyloehr/community-plugins at ref main using sparse paths .agents/plugins and plugins/react-native-to-swiftui. Install react-native-to-swiftui@community-plugins, explain its Read and Write boundaries and ON_USE authentication policy, and give me the read-only parity-planning prompt for a new Codex task.
121+
```
122+
95123
Review before adoption:
96124

97125
```text
@@ -106,6 +134,7 @@ codex plugin marketplace upgrade community-plugins
106134

107135
# Reinstall a plugin after a new version is published.
108136
codex plugin add grafana-observability@community-plugins
137+
codex plugin add react-native-to-swiftui@community-plugins
109138

110139
# Remove the configured marketplace source.
111140
codex plugin marketplace remove community-plugins

‎package.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
"description": "Public Codex plugins and their reproducible validation suites.",
66
"type": "module",
77
"scripts": {
8-
"validate": "npm run validate:marketplace && node scripts/validate-grafana.mjs",
8+
"validate": "npm run validate:marketplace && node scripts/validate-grafana.mjs && npm run validate:react-native-to-swiftui",
99
"validate:marketplace": "node scripts/validate-marketplace.mjs",
1010
"validate:grafana": "node scripts/validate-grafana.mjs",
11+
"validate:react-native-to-swiftui": "node scripts/validate-react-native-to-swiftui.mjs",
1112
"test": "npm run test:marketplace",
1213
"test:marketplace": "node scripts/run-marketplace-tests.mjs",
14+
"test:react-native-to-swiftui": "node --test --test-concurrency=1 tests/react-native-to-swiftui/unit/*.test.mjs tests/react-native-to-swiftui/integration/*.test.mjs tests/react-native-to-swiftui/security/*.test.mjs",
1315
"test:grafana-observability": "npm run test:grafana",
1416
"test:grafana": "node --test --test-concurrency=1 tests/grafana-observability/*.test.mjs",
1517
"test:grafana:live": "GRAFANA_E2E_DOCKER=1 node --test tests/grafana-observability/live.test.mjs",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "react-native-to-swiftui",
3+
"version": "0.1.0",
4+
"description": "Plan and port one bounded React Native or Expo feature slice to SwiftUI with parity evidence and iOS readiness checks.",
5+
"author": {
6+
"name": "Tony Loehr",
7+
"url": "https://github.com/tonyloehr"
8+
},
9+
"homepage": "https://github.com/tonyloehr/community-plugins/tree/main/plugins/react-native-to-swiftui",
10+
"repository": "https://github.com/tonyloehr/community-plugins",
11+
"license": "Apache-2.0",
12+
"keywords": [
13+
"react-native",
14+
"expo",
15+
"swiftui",
16+
"ios",
17+
"migration",
18+
"modernization"
19+
],
20+
"skills": "./skills/",
21+
"interface": {
22+
"displayName": "React Native to SwiftUI",
23+
"shortDescription": "Port one approved native iOS slice safely.",
24+
"longDescription": "A contract-first workflow for bounded React Native and Expo modernization. Inspect only declared source, write a behavioral parity contract, port one explicitly approved slice into a declared SwiftUI target, keep domain logic pure Swift, verify deterministic behavior, and preflight iOS release readiness without promising App Store approval.",
25+
"developerName": "Tony Loehr",
26+
"category": "Developer Tools",
27+
"websiteURL": "https://github.com/tonyloehr/community-plugins",
28+
"capabilities": [
29+
"Read",
30+
"Write"
31+
],
32+
"brandColor": "#5B5CE2",
33+
"logo": "./assets/icon.svg",
34+
"composerIcon": "./assets/icon.svg",
35+
"defaultPrompt": [
36+
"Use $plan-react-native-port to inspect only the declared React Native feature and propose a SwiftUI parity contract. Do not edit files yet.",
37+
"Use $port-react-native-slice to port one explicitly approved feature slice into my declared SwiftUI target directory.",
38+
"Use $verify-swiftui-parity to check the approved SwiftUI slice against its behavioral parity contract.",
39+
"Use $audit-ios-readiness to run a read-only App Store-readiness preflight for my declared iOS target."
40+
]
41+
}
42+
}

0 commit comments

Comments
 (0)