Skip to content

Commit bf00400

Browse files
authored
Merge pull request #2 from tonyloehr/codex/react-native-to-swiftui
Add react-native-to-swiftui plugin
2 parents d3000fc + 8c1a2d8 commit bf00400

36 files changed

Lines changed: 3142 additions & 3 deletions

File tree

‎.agents/plugins/marketplace.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@
2727
"authentication": "ON_USE"
2828
},
2929
"category": "Developer Tools"
30+
},
31+
{
32+
"name": "react-native-to-swiftui",
33+
"source": {
34+
"source": "local",
35+
"path": "./plugins/react-native-to-swiftui"
36+
},
37+
"policy": {
38+
"installation": "AVAILABLE",
39+
"authentication": "ON_USE"
40+
},
41+
"category": "Developer Tools"
3042
}
3143
]
3244
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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+
react-native-to-swiftui-e2e:
36+
name: React Native to SwiftUI E2E
37+
runs-on: macos-latest
38+
timeout-minutes: 20
39+
steps:
40+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
41+
with:
42+
persist-credentials: false
43+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
44+
with:
45+
node-version: "22.19.0"
46+
package-manager-cache: false
47+
- name: Cold copied package / Node 22.19.0
48+
run: node --test --test-concurrency=1 tests/react-native-to-swiftui/integration/packaged.test.mjs
49+
- name: Full React Native to SwiftUI qualification / Node 22.19.0
50+
run: npm run test:react-native-to-swiftui
51+
- name: Probe installed Xcode and available Simulator
52+
continue-on-error: true
53+
run: node plugins/react-native-to-swiftui/scripts/native-port.mjs toolchain --format json
54+
55+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
56+
with:
57+
node-version: "24"
58+
package-manager-cache: false
59+
- name: Full uninstrumented suite / Node 24
60+
run: npm run test:react-native-to-swiftui
61+
62+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
63+
with:
64+
node-version: "26"
65+
package-manager-cache: false
66+
- name: Full uninstrumented suite / Node 26
67+
run: npm run test:react-native-to-swiftui

‎CONTRIBUTING.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ can understand and verify it from a cold start.
1919
behavior.
2020
5. Keep tests, fixtures, licenses, and third-party notices with the plugin or
2121
in clearly named companion folders.
22-
6. Add a `test:<plugin-name>` script to `package.json`. The marketplace-wide
23-
CI job discovers each catalog entry and runs that matching test script.
22+
6. Add one `test:<plugin-name>` master suite to `package.json`. It should
23+
run the plugin's functional, integration/E2E, security, and packaged checks
24+
as applicable. The marketplace-wide CI job discovers each catalog entry
25+
and runs that matching test script; plugin-specific CI should expose one
26+
plugin-level job that invokes the same master suite.
2427

2528
Never commit credentials, OAuth tokens, customer data, private URLs, personal
2629
paths, or generated caches.

‎README.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ To fetch only ReviewOps Auditor + Benchmark, use:
3939
plugins/reviewops-auditor-benchmark
4040
```
4141

42+
To fetch only React Native to SwiftUI, use:
43+
44+
```text
45+
.agents/plugins
46+
plugins/react-native-to-swiftui
47+
```
48+
4249
Adding a marketplace makes its catalog available to browse. It does **not**
4350
install, enable, or authenticate every plugin. After adding it, install only
4451
the plugin you want.
@@ -57,6 +64,9 @@ codex plugin add grafana-observability@community-plugins
5764

5865
# Or install the offline ReviewOps package.
5966
codex plugin add reviewops-auditor-benchmark@community-plugins
67+
68+
# Or install the bounded native-migration workflow.
69+
codex plugin add react-native-to-swiftui@community-plugins
6070
```
6171

6272
If you want a full checkout instead of a sparse one:
@@ -76,6 +86,7 @@ are picked up.
7686
| ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
7787
| [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) |
7888
| [ReviewOps Auditor + Benchmark](plugins/reviewops-auditor-benchmark/README.md) | Normalize sanitized review-run exports, audit evaluation validity, benchmark lanes, and emit shadow-only guidance offline. | [Guide](plugins/reviewops-auditor-benchmark/README.md) |
89+
| [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) |
7990

8091
Grafana Observability requires Codex and Node.js 22.19 or newer. Its manifest
8192
declares both `Read` and `Write`. `Write` is limited to
@@ -98,6 +109,17 @@ run is also synthetic and credential-free:
98109
Use $normalize-review-runs on the bundled synthetic fixture only. Explain the normalization summary, provenance checks, safety boundaries, and next safe step.
99110
```
100111

112+
React Native to SwiftUI requires Codex and Node.js 22.19 or newer. Its
113+
manifest declares both `Read` and `Write`: planning is read-only, while
114+
writes are limited to an explicitly approved target directory for one feature
115+
slice. It has no app or MCP dependency, does not copy source or assets into
116+
the plugin, and does not promise App Store approval. Its first run is a
117+
read-only parity-planning prompt:
118+
119+
```text
120+
Use $plan-react-native-port to inspect only the declared React Native feature and propose a SwiftUI parity contract. Do not edit files yet.
121+
```
122+
101123
## Copy-paste Codex prompts
102124

103125
Browse before installing:
@@ -118,6 +140,12 @@ Install ReviewOps without private data:
118140
If community-plugins is not already configured, add it from tonyloehr/community-plugins at ref main using sparse paths .agents/plugins and plugins/reviewops-auditor-benchmark. Install reviewops-auditor-benchmark@community-plugins, explain its read-only offline boundary, and give me the synthetic-fixture smoke-test prompt for a new Codex task.
119141
```
120142

143+
Install React Native to SwiftUI with a read-only first run:
144+
145+
```text
146+
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.
147+
```
148+
121149
Review before adoption:
122150

123151
```text
@@ -133,6 +161,7 @@ codex plugin marketplace upgrade community-plugins
133161
# Reinstall a plugin after a new version is published.
134162
codex plugin add grafana-observability@community-plugins
135163
codex plugin add reviewops-auditor-benchmark@community-plugins
164+
codex plugin add react-native-to-swiftui@community-plugins
136165

137166
# Remove the configured marketplace source.
138167
codex plugin marketplace remove community-plugins

‎package.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
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 && npm run validate:reviewops-auditor-benchmark",
8+
"validate": "npm run validate:marketplace && node scripts/validate-grafana.mjs && npm run validate:reviewops-auditor-benchmark && npm run validate:react-native-to-swiftui",
99
"validate:marketplace": "node scripts/validate-marketplace.mjs",
1010
"validate:grafana": "node scripts/validate-grafana.mjs",
1111
"validate:reviewops-auditor-benchmark": "node scripts/validate-reviewops-auditor-benchmark.mjs",
12+
"validate:react-native-to-swiftui": "node scripts/validate-react-native-to-swiftui.mjs",
1213
"build:reviewops-auditor-benchmark": "npm --prefix plugins/reviewops-auditor-benchmark run build",
1314
"typecheck:reviewops-auditor-benchmark": "npm --prefix plugins/reviewops-auditor-benchmark run typecheck",
1415
"lint:reviewops-auditor-benchmark": "npm --prefix plugins/reviewops-auditor-benchmark run lint",
@@ -18,6 +19,7 @@
1819
"test": "npm run test:marketplace",
1920
"test:marketplace": "node scripts/run-marketplace-tests.mjs",
2021
"test:reviewops-auditor-benchmark": "npm run build:reviewops-auditor-benchmark && npm run validate:reviewops-auditor-benchmark && npm run typecheck:reviewops-auditor-benchmark && npm run lint:reviewops-auditor-benchmark && npm run format:check:reviewops-auditor-benchmark && npm --prefix plugins/reviewops-auditor-benchmark run test && npm run coverage:reviewops-auditor-benchmark",
22+
"test:react-native-to-swiftui": "npm run validate: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",
2123
"test:grafana-observability": "npm run test:grafana",
2224
"test:grafana": "node --test --test-concurrency=1 tests/grafana-observability/*.test.mjs",
2325
"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)