rn-agent-kit 0.0.0-stage → 0.2.0

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 (36) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +176 -2
  3. package/dist/cli.js +2916 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/scripts/figma-tokens.js +1284 -0
  6. package/dist/scripts/figma-tokens.js.map +1 -0
  7. package/dist/scripts/validate-jira-tickets.js +169 -0
  8. package/dist/scripts/validate-jira-tickets.js.map +1 -0
  9. package/package.json +64 -4
  10. package/skills/expo-cli/SKILL.md +213 -0
  11. package/skills/figma-to-tokens/SKILL.md +288 -0
  12. package/skills/github-actions-ci/SKILL.md +124 -0
  13. package/skills/maestro-e2e/SKILL.md +256 -0
  14. package/skills/prd-to-jira/SKILL.md +237 -0
  15. package/skills/rn-architecture/SKILL.md +207 -0
  16. package/skills/rn-native-android-ios/SKILL.md +195 -0
  17. package/skills/rn-sdk-integrations/SKILL.md +274 -0
  18. package/skills/rn-typescript-react/SKILL.md +247 -0
  19. package/skills/ticket-to-code/SKILL.md +192 -0
  20. package/templates/config/rn-agent-kit.json +4 -0
  21. package/templates/eslint/eslint.config.snippet.mjs +16 -0
  22. package/templates/eslint/rn-agent-kit-rules.cjs +137 -0
  23. package/templates/jira-ticket.md +78 -0
  24. package/templates/maestro/smoke.yaml +4 -0
  25. package/templates/scaffold/.husky/commit-msg +4 -0
  26. package/templates/scaffold/.husky/pre-commit +4 -0
  27. package/templates/scaffold/.prettierignore +6 -0
  28. package/templates/scaffold/.prettierrc +6 -0
  29. package/templates/scaffold/commitlint.config.cjs +4 -0
  30. package/templates/scaffold/eslint.config.js +22 -0
  31. package/templates/scaffold/jest.config.cjs +9 -0
  32. package/templates/scaffold/tsconfig.json +13 -0
  33. package/templates/workflows/ci.yml +120 -0
  34. package/templates/workflows/e2e-android.yml +158 -0
  35. package/templates/workflows/e2e-ios.yml +134 -0
  36. package/templates/workflows/eas-build.yml +94 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rn-agent-kit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,177 @@
1
- # Temporary Holding Version
1
+ # rn-agent-kit
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Agent skills + CLI for React Native / Expo teams: install skills into Claude, Cursor, Copilot, Windsurf, and `AGENTS.md`, then run a deterministic design→tokens→Jira→TDD→CI workflow.
4
+
5
+ ```bash
6
+ npx rn-agent-kit init
7
+ npx rn-agent-kit doctor
8
+ npx rn-agent-kit update
9
+ npx rn-agent-kit tokens build
10
+ npx rn-agent-kit jira-validate
11
+ ```
12
+
13
+ **Requires Node.js >= 18.**
14
+
15
+ ## Quick start
16
+
17
+ ```bash
18
+ # Inside an existing RN/Expo app
19
+ npx rn-agent-kit init --yes --type existing --tools claude,cursor,agents-md
20
+
21
+ # Or create a new Expo app + scaffold + skills
22
+ npx rn-agent-kit init --yes --type new --stack expo --name MyApp --tools claude,cursor
23
+
24
+ # Optional SDLC (Figma/Jira MCP stubs, Maestro, GitHub workflows)
25
+ npx rn-agent-kit init --yes --type existing --sdlc \
26
+ --jira-url https://acme.atlassian.net --jira-key APP \
27
+ --figma-url https://www.figma.com/design/AbC/App \
28
+ --github-repo acme/my-app --tools claude,cursor
29
+
30
+ npx rn-agent-kit doctor
31
+ ```
32
+
33
+ ## Full workflow
34
+
35
+ ```text
36
+ ┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐
37
+ │ Figma / │────▶│ design/source- │────▶│ design/tokens. │
38
+ │ Stitch │ MCP │ snapshot.json │build│ json + theme.ts │
39
+ └─────────────┘ └──────────────────┘ └────────┬────────┘
40
+ │
41
+ ┌─────────────┐ ┌──────────────────┐ │
42
+ │ PRD + │────▶│ Jira Epic/Stories│◀─────────────┘
43
+ │ Figma URL │ MCP │ + jira-map.json │ (prd-to-jira)
44
+ └─────────────┘ └────────┬─────────┘
45
+ │ Implement APP-123
46
+ ▼
47
+ ┌──────────────────┐
48
+ │ ticket-to-code │ tests (Maestro) → red
49
+ │ feature/<KEY>-… │ then code → green
50
+ └────────┬─────────┘
51
+ ▼
52
+ ┌──────────────────┐
53
+ │ GitHub Actions │ ci + e2e-android
54
+ │ (+ optional iOS/ │ (+ optional EAS)
55
+ │ EAS) │
56
+ └──────────────────┘
57
+ ```
58
+
59
+ Skills live under `skills/*/SKILL.md` and are installed by adapters (`init` / `update`).
60
+
61
+ ## Required secrets
62
+
63
+ ### Local / MCP (never commit)
64
+
65
+ | Variable | Purpose |
66
+ | ------------------------------------- | ---------------------------------------------------------------------------------- |
67
+ | `FIGMA_TOKEN` or `FIGMA_ACCESS_TOKEN` | Figma REST `tokens fetch` + Figma MCP |
68
+ | `JIRA_SITE_URL` | Atlassian site, e.g. `https://acme.atlassian.net` |
69
+ | `JIRA_EMAIL` | Atlassian account email |
70
+ | `JIRA_API_TOKEN` | [Atlassian API token](https://id.atlassian.com/manage-profile/security/api-tokens) |
71
+
72
+ `.agent/config.json` stores **non-secret** URLs/keys only (`jira.siteUrl`, `jira.projectKey`, `figma.fileUrl`, `confirm`).
73
+
74
+ ### GitHub Actions (consumer apps)
75
+
76
+ | Secret | Required? | Used by |
77
+ | ---------------- | -------------------------------- | ------------------------ |
78
+ | `JIRA_SITE_URL` | Optional | CI / E2E ticket comments |
79
+ | `JIRA_EMAIL` | Optional | same |
80
+ | `JIRA_API_TOKEN` | Optional | same |
81
+ | `EXPO_TOKEN` | Only if you keep `eas-build.yml` | EAS Build / Submit |
82
+
83
+ Repo **variable**: `APP_ID` (bundle id / applicationId for Maestro).
84
+
85
+ Templates: `templates/workflows/{ci,e2e-android,e2e-ios,eas-build}.yml` (`eas-build.yml` is **optional**).
86
+
87
+ ## Per-tool setup
88
+
89
+ ### Claude Code
90
+
91
+ ```bash
92
+ npx rn-agent-kit init -t claude
93
+ # installs .claude/skills/<name>/SKILL.md
94
+ ```
95
+
96
+ Open the project in Claude Code; skills under `.claude/skills` are picked up automatically.
97
+
98
+ ### Cursor
99
+
100
+ ```bash
101
+ npx rn-agent-kit init -t cursor
102
+ # installs .cursor/rules/<name>.mdc
103
+ ```
104
+
105
+ Rules appear in Cursor Settings → Rules. MCP: copy/merge `.cursor/mcp.json` from `init --sdlc`.
106
+
107
+ ### Codex / Gemini / others (`AGENTS.md`)
108
+
109
+ ```bash
110
+ npx rn-agent-kit init -t agents-md
111
+ ```
112
+
113
+ Content between `<!-- rn-agent-kit:start -->` and `<!-- rn-agent-kit:end -->` is managed; your prose outside markers is kept on `update`.
114
+
115
+ ### GitHub Copilot
116
+
117
+ ```bash
118
+ npx rn-agent-kit init -t copilot
119
+ # .github/copilot-instructions.md (marker-managed)
120
+ ```
121
+
122
+ ### Windsurf
123
+
124
+ ```bash
125
+ npx rn-agent-kit init -t windsurf
126
+ # .windsurf/rules/<name>.md
127
+ ```
128
+
129
+ ### Refresh skills later
130
+
131
+ ```bash
132
+ npx rn-agent-kit update # previously installed adapters only
133
+ npx rn-agent-kit update -a cursor,claude
134
+ ```
135
+
136
+ ## CLI reference
137
+
138
+ | Command | Role |
139
+ | --------------- | ------------------------------------------------------------------------------------------------------ |
140
+ | `init` | New/existing project, adapters, optional SDLC |
141
+ | `doctor` | Node, git, Java, ANDROID_HOME, Xcode (macOS), Maestro, MCP, env tokens, `.agent/config.json`, adapters |
142
+ | `update` | Re-install skills; preserves user content outside markers |
143
+ | `tokens` | `build` \| `generate` \| `check` \| `fetch` |
144
+ | `jira-validate` | Fail if tickets lack Figma link / AC / testIDs |
145
+
146
+ ## FAQ
147
+
148
+ **Does `init --yes` on an existing app restructure my folders?**
149
+ No. Architecture scaffold is interactive-only (confirm). `--yes` skips restructuring.
150
+
151
+ **Can I hand-edit `tokens.ts`?**
152
+ No — regenerate with `rn-agent-kit tokens generate` / `build`. Fix the design source instead.
153
+
154
+ **Why is iOS E2E not on every PR?**
155
+ macOS runners are costly; template runs on main / nightly / manual. See comments in `e2e-ios.yml`.
156
+
157
+ **Do I need `eas-build.yml`?**
158
+ Only if you use Expo Application Services. Otherwise delete it / don’t copy it.
159
+
160
+ **Doctor fails on missing Maestro / Android SDK — is that fatal?**
161
+ Those are **warnings** for day-to-day JS work. **Failures** are things like Node &lt; 18 or invalid `.agent/config.json`.
162
+
163
+ ## Develop (this package)
164
+
165
+ ```bash
166
+ npm install
167
+ npm test
168
+ npm run typecheck
169
+ npm run build
170
+ ```
171
+
172
+ Versioning uses [Changesets](https://github.com/changesets/changesets). Releases publish to npm with provenance via `.github/workflows/publish.yml` (needs repo secret `NPM_TOKEN` with publish rights; `id-token: write` is already set for provenance).
173
+
174
+ ## Verified vs not verified
175
+
176
+ - **Verified in CI/tests:** adapters, init/update/doctor checks (mocked env), token pipeline fixtures, jira-validate, eslint rule, e2e init snapshot.
177
+ - **Needs manual verification before relying in production:** live Figma REST/MCP payloads, live Atlassian issue create, real Stitch export shape, Maestro on real devices/emulators, EAS credentials, Xcode scheme names in consumer apps.