rn-agent-kit 0.0.0-stage → 0.2.1

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 +291 -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 +66 -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,292 @@
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
+ **One CLI** that installs React Native / Expo **agent skills** into Claude, Cursor, Copilot, Windsurf, and `AGENTS.md`, plus optional design→tokens→Jira→Maestro→CI workflow.
4
+
5
+ [npm](https://www.npmjs.com/package/rn-agent-kit) · Requires **Node.js >= 18**
6
+
7
+ ---
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ # Use without adding a dependency (recommended)
13
+ npx rn-agent-kit@latest init
14
+
15
+ # Or add to your app
16
+ npm install -D rn-agent-kit
17
+ npx rn-agent-kit init
18
+ ```
19
+
20
+ After `init`, skills are copied into your project (e.g. `.cursor/rules/`, `.claude/skills/`). Run `npx rn-agent-kit doctor` to verify your machine.
21
+
22
+ ---
23
+
24
+ ## Prerequisites (install these first)
25
+
26
+ ### Required for the CLI
27
+
28
+ | Tool | Why | Install |
29
+ | ------------------------------------ | ---------------------------- | --------------------------------------------------------- |
30
+ | **Node.js 18+** (20 LTS recommended) | Runs `rn-agent-kit` | [nodejs.org](https://nodejs.org/) or `brew install node` |
31
+ | **npm** or **yarn** / **pnpm** | Package manager | Comes with Node / `corepack enable` |
32
+ | **Git** | Branches in `ticket-to-code` | [git-scm.com](https://git-scm.com/) or `brew install git` |
33
+
34
+ ```bash
35
+ node -v # >= 18
36
+ npm -v
37
+ git --version
38
+ ```
39
+
40
+ ### Required for a React Native / Expo app
41
+
42
+ You need an RN or Expo app (or let `init --type new` create one).
43
+
44
+ | Tool | Why | Install |
45
+ | --------------------------------- | --------------------- | --------------------------------- |
46
+ | **Expo CLI** (if Expo) | Dev client / prebuild | `npm i -g expo` or use `npx expo` |
47
+ | **Watchman** (macOS, recommended) | Metro file watching | `brew install watchman` |
48
+
49
+ ### Optional — native builds & E2E
50
+
51
+ | Tool | Why | Install |
52
+ | ------------------------ | ------------------------------- | ----------------------------------------------------------------------------------------- |
53
+ | **JDK 17** | Android Gradle | `brew install --cask temurin@17` |
54
+ | **Android Studio + SDK** | Android builds / emulator | [developer.android.com/studio](https://developer.android.com/studio) — set `ANDROID_HOME` |
55
+ | **Xcode** (macOS) | iOS builds / simulator | Mac App Store + `xcode-select --install` |
56
+ | **CocoaPods** | iOS deps | `sudo gem install cocoapods` or `brew install cocoapods` |
57
+ | **Maestro** | E2E flows (`maestro-e2e` skill) | `curl -fsSL "https://get.maestro.mobile.dev" \| bash` then add `~/.maestro/bin` to `PATH` |
58
+ | **EAS CLI** | Cloud builds (optional) | `npm i -g eas-cli` |
59
+
60
+ ```bash
61
+ # Maestro
62
+ curl -fsSL "https://get.maestro.mobile.dev" | bash
63
+ echo 'export PATH="$PATH:$HOME/.maestro/bin"' >> ~/.zshrc && source ~/.zshrc
64
+ maestro --version
65
+ ```
66
+
67
+ ### Optional — design / Jira MCP
68
+
69
+ | Need | Install / setup |
70
+ | -------------------- | ------------------------------------------------------------------------- |
71
+ | Figma MCP + token | `init --sdlc` writes MCP stubs; set `FIGMA_TOKEN` or `FIGMA_ACCESS_TOKEN` |
72
+ | Atlassian / Jira MCP | Same; set `JIRA_SITE_URL`, `JIRA_EMAIL`, `JIRA_API_TOKEN` |
73
+
74
+ ---
75
+
76
+ ## Recommended packages in your RN app
77
+
78
+ `rn-agent-kit` does **not** auto-install app libraries. After `init`, install what your stack uses (skills assume these):
79
+
80
+ ```bash
81
+ # State / data (rn-architecture skill)
82
+ npx expo install @tanstack/react-query zustand
83
+ # or: npm i @tanstack/react-query zustand
84
+
85
+ # Validation (rn-typescript-react)
86
+ npm i zod
87
+
88
+ # Lists (performance)
89
+ npm i @shopify/flash-list
90
+
91
+ # Theme / navigation (Expo)
92
+ npx expo install expo-router expo-constants expo-secure-store
93
+
94
+ # Testing
95
+ npm i -D jest @testing-library/react-native @types/jest
96
+ ```
97
+
98
+ Lint guard for hardcoded design values (from this package’s templates):
99
+
100
+ ```bash
101
+ # After init --sdlc / copying templates/eslint
102
+ npm i -D eslint prettier typescript-eslint eslint-config-prettier
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Quick start
108
+
109
+ ```bash
110
+ # Existing RN/Expo app
111
+ cd your-app
112
+ npx rn-agent-kit@latest init --yes --type existing --tools claude,cursor,agents-md
113
+
114
+ # New Expo app + architecture scaffold + skills
115
+ npx rn-agent-kit@latest init --yes --type new --stack expo --name MyApp --tools claude,cursor
116
+
117
+ # Full SDLC stubs (MCP, Maestro folder, GitHub workflows)
118
+ npx rn-agent-kit@latest init --yes --type existing --sdlc \
119
+ --jira-url https://acme.atlassian.net --jira-key APP \
120
+ --figma-url https://www.figma.com/design/AbC/App \
121
+ --github-repo acme/my-app --tools claude,cursor
122
+
123
+ npx rn-agent-kit doctor
124
+ ```
125
+
126
+ ### Useful commands
127
+
128
+ ```bash
129
+ npx rn-agent-kit update # refresh skills only
130
+ npx rn-agent-kit tokens build # design/source-snapshot.json → theme
131
+ npx rn-agent-kit tokens check # CI gate
132
+ npx rn-agent-kit jira-validate # ticket markdown checks
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Full workflow
138
+
139
+ ```text
140
+ ┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐
141
+ │ Figma / │────▶│ design/source- │────▶│ design/tokens. │
142
+ │ Stitch │ MCP │ snapshot.json │build│ json + theme.ts │
143
+ └─────────────┘ └──────────────────┘ └────────┬────────┘
144
+ │
145
+ ┌─────────────┐ ┌──────────────────┐ │
146
+ │ PRD + │────▶│ Jira Epic/Stories│◀─────────────┘
147
+ │ Figma URL │ MCP │ + jira-map.json │ (prd-to-jira)
148
+ └─────────────┘ └────────┬─────────┘
149
+ │ Implement APP-123
150
+ ▼
151
+ ┌──────────────────┐
152
+ │ ticket-to-code │ tests (Maestro) → red
153
+ │ feature/<KEY>-… │ then code → green
154
+ └────────┬─────────┘
155
+ ▼
156
+ ┌──────────────────┐
157
+ │ GitHub Actions │ ci + e2e-android
158
+ │ (+ optional iOS/ │ (+ optional EAS)
159
+ │ EAS) │
160
+ └──────────────────┘
161
+ ```
162
+
163
+ Skills ship inside this package under `skills/*/SKILL.md` and are installed by adapters (`init` / `update`).
164
+
165
+ ---
166
+
167
+ ## Required secrets
168
+
169
+ ### Local / MCP (never commit)
170
+
171
+ | Variable | Purpose |
172
+ | ------------------------------------- | --------------------------------------------------------------------------- |
173
+ | `FIGMA_TOKEN` or `FIGMA_ACCESS_TOKEN` | Figma REST `tokens fetch` + Figma MCP |
174
+ | `JIRA_SITE_URL` | e.g. `https://acme.atlassian.net` |
175
+ | `JIRA_EMAIL` | Atlassian account email |
176
+ | `JIRA_API_TOKEN` | [Create token](https://id.atlassian.com/manage-profile/security/api-tokens) |
177
+
178
+ `.agent/config.json` holds **non-secrets only** (`jira.siteUrl`, `jira.projectKey`, `figma.fileUrl`, `confirm`).
179
+
180
+ ### GitHub Actions (consumer apps)
181
+
182
+ | Secret | Required? | Used by |
183
+ | ---------------- | -------------------------------- | ------------------------ |
184
+ | `JIRA_SITE_URL` | Optional | CI / E2E ticket comments |
185
+ | `JIRA_EMAIL` | Optional | same |
186
+ | `JIRA_API_TOKEN` | Optional | same |
187
+ | `EXPO_TOKEN` | Only if you keep `eas-build.yml` | EAS Build / Submit |
188
+
189
+ Repo **variable**: `APP_ID` (iOS bundle id / Android applicationId for Maestro).
190
+
191
+ Workflow templates: `templates/workflows/{ci,e2e-android,e2e-ios,eas-build}.yml` — **`eas-build.yml` is optional**.
192
+
193
+ ---
194
+
195
+ ## Per-tool setup
196
+
197
+ ### Claude Code
198
+
199
+ ```bash
200
+ npx rn-agent-kit init -t claude
201
+ # → .claude/skills/<name>/SKILL.md
202
+ ```
203
+
204
+ ### Cursor
205
+
206
+ ```bash
207
+ npx rn-agent-kit init -t cursor
208
+ # → .cursor/rules/<name>.mdc
209
+ ```
210
+
211
+ MCP: merge `.cursor/mcp.json` from `init --sdlc`.
212
+
213
+ ### Codex / Gemini / others
214
+
215
+ ```bash
216
+ npx rn-agent-kit init -t agents-md
217
+ ```
218
+
219
+ Only the block between `<!-- rn-agent-kit:start -->` and `<!-- rn-agent-kit:end -->` is managed.
220
+
221
+ ### GitHub Copilot
222
+
223
+ ```bash
224
+ npx rn-agent-kit init -t copilot
225
+ # → .github/copilot-instructions.md
226
+ ```
227
+
228
+ ### Windsurf
229
+
230
+ ```bash
231
+ npx rn-agent-kit init -t windsurf
232
+ # → .windsurf/rules/<name>.md
233
+ ```
234
+
235
+ ### Refresh skills later
236
+
237
+ ```bash
238
+ npx rn-agent-kit update
239
+ npx rn-agent-kit update -a cursor,claude
240
+ ```
241
+
242
+ ---
243
+
244
+ ## CLI reference
245
+
246
+ | Command | Role |
247
+ | --------------- | --------------------------------------------------------------------------------------- |
248
+ | `init` | New/existing project, adapters, optional SDLC |
249
+ | `doctor` | Node, git, Java, ANDROID_HOME, Xcode, Maestro, MCP, env, `.agent/config.json`, adapters |
250
+ | `update` | Re-install skills; keeps user text outside markers |
251
+ | `tokens` | `build` \| `generate` \| `check` \| `fetch` |
252
+ | `jira-validate` | Fail if tickets lack Figma link / AC / testIDs |
253
+
254
+ ---
255
+
256
+ ## FAQ
257
+
258
+ **README npm pe nahi dikhti thi?**
259
+ Pehle publish incomplete / purani version ho sakti thi. Latest: `https://www.npmjs.com/package/rn-agent-kit` — hard refresh. Local file hamesha repo root `README.md` mein hai.
260
+
261
+ **`init --yes` existing app ke folders change karega?**
262
+ Nahi. Scaffold sirf confirm ke baad (interactive). `--yes` restructure skip karta hai.
263
+
264
+ **`tokens.ts` hand-edit?**
265
+ Nahi — `rn-agent-kit tokens build` / `generate`. Design source fix karo.
266
+
267
+ **iOS E2E har PR pe?**
268
+ Nahi by default (macOS cost). Template: main / nightly / manual.
269
+
270
+ **Doctor Maestro / Android warn — fatal?**
271
+ Warn = optional tooling. Fail = e.g. Node &lt; 18 ya invalid `.agent/config.json`.
272
+
273
+ ---
274
+
275
+ ## Develop (contributors)
276
+
277
+ ```bash
278
+ git clone <this-repo>
279
+ cd rn-agent-kit
280
+ npm install
281
+ npm test
282
+ npm run typecheck
283
+ npm run build
284
+ ```
285
+
286
+ Versioning: [Changesets](https://github.com/changesets/changesets). CI publish: `.github/workflows/publish.yml` (`NPM_TOKEN` secret).
287
+
288
+ ---
289
+
290
+ ## License
291
+
292
+ MIT