@tayo-dev/rtl 1.0.0 → 1.3.0-alpha.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 (116) hide show
  1. package/README.md +110 -112
  2. package/assets/claude/commands/@tayo-dev/rtl/generate.md +15 -0
  3. package/assets/claude/commands/@tayo-dev/rtl/help.md +16 -0
  4. package/assets/codex/@tayo-dev/rtl-conventions/SKILL.md +19 -0
  5. package/assets/codex/@tayo-dev/rtl-generate/SKILL.md +27 -0
  6. package/assets/codex/@tayo-dev/rtl-help/SKILL.md +25 -0
  7. package/assets/codex/@tayo-dev/rtl-mocks/SKILL.md +22 -0
  8. package/assets/gemini/commands/@tayo-dev/rtl/generate.toml +10 -0
  9. package/assets/gemini/commands/@tayo-dev/rtl/help.toml +11 -0
  10. package/assets/opencode/commands/@tayo-dev/rtl-generate.md +11 -0
  11. package/assets/opencode/commands/@tayo-dev/rtl-help.md +12 -0
  12. package/dist/cli/commands/generate.d.ts +1 -1
  13. package/dist/cli/commands/generate.d.ts.map +1 -1
  14. package/dist/cli/commands/generate.js +88 -149
  15. package/dist/cli/commands/generate.js.map +1 -1
  16. package/dist/cli/commands/install.d.ts +22 -0
  17. package/dist/cli/commands/install.d.ts.map +1 -0
  18. package/dist/cli/commands/install.js +69 -0
  19. package/dist/cli/commands/install.js.map +1 -0
  20. package/dist/core/baseline-normalizer.d.ts +3 -0
  21. package/dist/core/baseline-normalizer.d.ts.map +1 -0
  22. package/dist/core/baseline-normalizer.js +65 -0
  23. package/dist/core/baseline-normalizer.js.map +1 -0
  24. package/dist/core/generator.d.ts.map +1 -1
  25. package/dist/core/generator.js +15 -0
  26. package/dist/core/generator.js.map +1 -1
  27. package/dist/core/input-loader.d.ts +4 -0
  28. package/dist/core/input-loader.d.ts.map +1 -0
  29. package/dist/core/input-loader.js +78 -0
  30. package/dist/core/input-loader.js.map +1 -0
  31. package/dist/core/js-parser.d.ts +6 -2
  32. package/dist/core/js-parser.d.ts.map +1 -1
  33. package/dist/core/js-parser.js +329 -72
  34. package/dist/core/js-parser.js.map +1 -1
  35. package/dist/core/parser.d.ts.map +1 -1
  36. package/dist/core/parser.js +11 -1
  37. package/dist/core/parser.js.map +1 -1
  38. package/dist/core/recording-intelligence.d.ts.map +1 -1
  39. package/dist/core/recording-intelligence.js +31 -5
  40. package/dist/core/recording-intelligence.js.map +1 -1
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +11 -5
  43. package/dist/index.js.map +1 -1
  44. package/dist/install/assets.d.ts +5 -0
  45. package/dist/install/assets.d.ts.map +1 -0
  46. package/dist/install/assets.js +23 -0
  47. package/dist/install/assets.js.map +1 -0
  48. package/dist/install/executor.d.ts +4 -0
  49. package/dist/install/executor.d.ts.map +1 -0
  50. package/dist/install/executor.js +26 -0
  51. package/dist/install/executor.js.map +1 -0
  52. package/dist/install/manifest.d.ts +21 -0
  53. package/dist/install/manifest.d.ts.map +1 -0
  54. package/dist/install/manifest.js +45 -0
  55. package/dist/install/manifest.js.map +1 -0
  56. package/dist/install/options.d.ts +13 -0
  57. package/dist/install/options.d.ts.map +1 -0
  58. package/dist/install/options.js +87 -0
  59. package/dist/install/options.js.map +1 -0
  60. package/dist/install/planner.d.ts +8 -0
  61. package/dist/install/planner.d.ts.map +1 -0
  62. package/dist/install/planner.js +31 -0
  63. package/dist/install/planner.js.map +1 -0
  64. package/dist/install/prompts.d.ts +9 -0
  65. package/dist/install/prompts.d.ts.map +1 -0
  66. package/dist/install/prompts.js +98 -0
  67. package/dist/install/prompts.js.map +1 -0
  68. package/dist/install/registry.d.ts +3 -0
  69. package/dist/install/registry.d.ts.map +1 -0
  70. package/dist/install/registry.js +47 -0
  71. package/dist/install/registry.js.map +1 -0
  72. package/dist/install/resolver.d.ts +8 -0
  73. package/dist/install/resolver.d.ts.map +1 -0
  74. package/dist/install/resolver.js +20 -0
  75. package/dist/install/resolver.js.map +1 -0
  76. package/dist/install/runtimes/claude.d.ts +3 -0
  77. package/dist/install/runtimes/claude.d.ts.map +1 -0
  78. package/dist/install/runtimes/claude.js +8 -0
  79. package/dist/install/runtimes/claude.js.map +1 -0
  80. package/dist/install/runtimes/codex.d.ts +3 -0
  81. package/dist/install/runtimes/codex.d.ts.map +1 -0
  82. package/dist/install/runtimes/codex.js +51 -0
  83. package/dist/install/runtimes/codex.js.map +1 -0
  84. package/dist/install/runtimes/gemini.d.ts +3 -0
  85. package/dist/install/runtimes/gemini.d.ts.map +1 -0
  86. package/dist/install/runtimes/gemini.js +8 -0
  87. package/dist/install/runtimes/gemini.js.map +1 -0
  88. package/dist/install/runtimes/opencode.d.ts +3 -0
  89. package/dist/install/runtimes/opencode.d.ts.map +1 -0
  90. package/dist/install/runtimes/opencode.js +8 -0
  91. package/dist/install/runtimes/opencode.js.map +1 -0
  92. package/dist/install/runtimes/prompt-runtimes.d.ts +3 -0
  93. package/dist/install/runtimes/prompt-runtimes.d.ts.map +1 -0
  94. package/dist/install/runtimes/prompt-runtimes.js +74 -0
  95. package/dist/install/runtimes/prompt-runtimes.js.map +1 -0
  96. package/dist/install/summary.d.ts +12 -0
  97. package/dist/install/summary.d.ts.map +1 -0
  98. package/dist/install/summary.js +112 -0
  99. package/dist/install/summary.js.map +1 -0
  100. package/dist/install/types.d.ts +119 -0
  101. package/dist/install/types.d.ts.map +1 -0
  102. package/dist/install/types.js +5 -0
  103. package/dist/install/types.js.map +1 -0
  104. package/dist/install/verification.d.ts +3 -0
  105. package/dist/install/verification.d.ts.map +1 -0
  106. package/dist/install/verification.js +34 -0
  107. package/dist/install/verification.js.map +1 -0
  108. package/dist/install/writer.d.ts +11 -0
  109. package/dist/install/writer.d.ts.map +1 -0
  110. package/dist/install/writer.js +99 -0
  111. package/dist/install/writer.js.map +1 -0
  112. package/dist/types/recording.d.ts +50 -2
  113. package/dist/types/recording.d.ts.map +1 -1
  114. package/dist/types/recording.js +3 -1
  115. package/dist/types/recording.js.map +1 -1
  116. package/package.json +14 -2
package/README.md CHANGED
@@ -1,85 +1,133 @@
1
1
  # Taro
2
2
 
3
- Generate React Testing Library tests from Chrome Recorder recordings — automatically.
3
+ Install Taro into Claude Code, OpenCode, Gemini CLI, or Codex, then generate React Testing Library tests from Testing Library Recorder recordings.
4
4
 
5
- ## Introduction
5
+ Taro ships as an installer-first package. The package entrypoint bootstraps runtime-native commands or skills into your agent environment, and the generated runtime surface still routes back to `taro generate` when you want Recorder-to-RTL output.
6
6
 
7
- Taro is a CLI tool that reads Chrome DevTools Recorder exports (JSON) and Testing Library Recorder JS files and generates RTL test files. It scores its own output, learns your project's test conventions from existing files, and stores per-project state in a local `.taro/` directory. No server, no cloud — just files.
7
+ ## Getting Started
8
8
 
9
- ### Who it is for
9
+ ```bash
10
+ npx @tayo-dev/rtl@latest
11
+ ```
10
12
 
11
- - React developers who write tests with `@testing-library/react`
12
- - Developers who use Chrome DevTools Recorder to capture user flows
13
- - Teams that want test coverage without spending hours writing boilerplate
13
+ The installer prompts you to choose:
14
14
 
15
- ### The problem it solves
15
+ 1. **Runtime** Claude Code, OpenCode, Gemini CLI, Codex, or all
16
+ 2. **Location** — Global (all projects) or local (current project only)
16
17
 
17
- Recording a user flow in Chrome takes 30 seconds. Translating that recording into a well-structured RTL test takes 20–40 minutes and requires knowing which queries to use, how to assert, and how to match your project's test conventions. Taro closes that gap.
18
+ Verify the install with the runtime-native help command:
18
19
 
19
- ### How it works
20
+ - Claude Code: `/@tayo-dev/rtl:help`
21
+ - Gemini CLI: `/@tayo-dev/rtl:help`
22
+ - OpenCode: `/@tayo-dev/rtl-help`
23
+ - Codex: `$@tayo-dev/rtl-help`
20
24
 
21
- 1. Record a user flow in Chrome DevTools → Recorder panel.
22
- 2. Export via the Testing Library Recorder extension (`.js`) or as native Chrome Recorder JSON (`.json`).
23
- 3. Run `taro generate ./recording.js`.
24
- 4. Taro writes a `.test.tsx` file next to your recording, scored and convention-aware.
25
+ > [!NOTE]
26
+ > Codex installation uses skills under `skills/@tayo-dev/rtl-*/SKILL.md`, not prompt files.
25
27
 
26
- ## Quick Start
28
+ ## Staying Updated
27
29
 
28
- ### Prerequisites
30
+ Re-run the installer package to refresh owned assets and repair missing ones:
29
31
 
30
- - Node.js 18 or later
31
- - A React project using `@testing-library/react`
32
- - Chrome DevTools Recorder (built into Chrome — no extension needed for JSON exports)
32
+ ```bash
33
+ npx @tayo-dev/rtl@latest
34
+ ```
35
+
36
+ Taro refreshes unchanged owned files automatically, restores missing owned files, and protects manual edits instead of overwriting them silently.
33
37
 
34
- ### Step 1 — Install
38
+ ## Non-interactive Install
39
+
40
+ Use runtime flags plus exactly one location flag to skip prompts:
35
41
 
36
42
  ```bash
37
- npm install --save-dev @tayo-dev/rtl
38
- # or use npx to skip install entirely
39
- npx @tayo-dev/rtl generate ./my-recording.js
43
+ # Claude Code
44
+ npx @tayo-dev/rtl@latest --claude --global
45
+ npx @tayo-dev/rtl@latest --claude --local
46
+
47
+ # OpenCode
48
+ npx @tayo-dev/rtl@latest --opencode --global
49
+ npx @tayo-dev/rtl@latest --opencode --local
50
+
51
+ # Gemini CLI
52
+ npx @tayo-dev/rtl@latest --gemini --global
53
+ npx @tayo-dev/rtl@latest --gemini --local
54
+
55
+ # Codex
56
+ npx @tayo-dev/rtl@latest --codex --global
57
+ npx @tayo-dev/rtl@latest --codex --local
58
+
59
+ # All runtimes
60
+ npx @tayo-dev/rtl@latest --all --global
61
+ npx @tayo-dev/rtl@latest --all --local
40
62
  ```
41
63
 
42
- ### Step 2 Record a user flow
64
+ Local installs write to hidden runtime directories in the current project:
43
65
 
44
- Open Chrome DevTools → Recorder panel → click "Start new recording" → perform your user flow (clicks, form fills, navigation) → click "End recording". Then either:
66
+ - Claude Code: `./.claude/`
67
+ - OpenCode: `./.opencode/`
68
+ - Gemini CLI: `./.gemini/`
69
+ - Codex: `./.codex/`
45
70
 
46
- - Export as JSON: click the export button → "JSON" → save as `recording.json`
47
- - Export via Testing Library Recorder extension: install the extension, click its export button, save as `recording.js`
71
+ ## Development Installation
48
72
 
49
- ### Step 3 Generate the test
73
+ When you want to test the installer from a local checkout instead of the published package:
50
74
 
51
75
  ```bash
52
- # Using npx (no install required)
53
- npx @tayo-dev/rtl generate ./recording.js
76
+ # Build the CLI
77
+ npm run build
78
+
79
+ # Exercise the installer from the built package entrypoint
80
+ node dist/index.js --all --local
54
81
 
55
- # Or if installed globally
82
+ # Or verify the publish boundary with a tarball
83
+ env NPM_CONFIG_CACHE=/tmp/taro-npm-cache npm pack --pack-destination /tmp/taro-pack
84
+ npx /tmp/taro-pack/tayo-dev-rtl-1.0.0.tgz --codex --local
85
+ ```
86
+
87
+ The tarball flow is the closest match to what end users get from npm.
88
+
89
+ ## Generate RTL Tests
90
+
91
+ After installation, use `taro generate` directly or call the runtime-native installed command/skill that routes to it.
92
+
93
+ ### Prerequisites
94
+
95
+ - Node.js 18 or later
96
+ - A React project using `@testing-library/react`
97
+ - Chrome DevTools Recorder with the Testing Library Recorder extension installed
98
+
99
+ ### Record a user flow
100
+
101
+ Open Chrome DevTools → Recorder panel → click "Start new recording" → perform your user flow → click "End recording". Then export via the Testing Library Recorder extension and save as `recording.js`.
102
+
103
+ ### Generate the test
104
+
105
+ ```bash
56
106
  taro generate ./recording.js
57
107
  ```
58
108
 
59
109
  Expected output:
60
110
 
61
- ```
111
+ ```text
62
112
  Parsed: my user flow — 8 steps
63
113
  [taro] Score: 78/100 (B) — query: 80, assertions: 70, structure: 85
64
114
  Created: src/components/MyComponent.test.tsx
65
115
  [taro] ✓ post-write verified
66
116
  ```
67
117
 
68
- ### What happens next
69
-
70
- Taro writes a `.test.tsx` file. On subsequent runs in the same project, it reads `.taro/conventions.json` to match your test style (import style, mock pattern, folder structure) automatically.
118
+ On subsequent runs in the same project, Taro reads `.taro/conventions.json` to match your test style automatically.
71
119
 
72
120
  ## CLI Reference
73
121
 
74
122
  ### `taro generate <file>`
75
123
 
76
- Generates a React Testing Library test from a Chrome Recorder export.
124
+ Generates a React Testing Library test from a Testing Library Recorder export.
77
125
 
78
126
  **Arguments:**
79
127
 
80
128
  | Argument | Description |
81
129
  |----------|-------------|
82
- | `<file>` | Path to the recording file. Accepts Chrome Recorder JSON exports (`.json`) or Testing Library Recorder JS files (`.js`). |
130
+ | `<file>` | Path to the recording file. Accepts Testing Library Recorder JS files (`.js`). |
83
131
 
84
132
  **Options:**
85
133
 
@@ -95,50 +143,48 @@ Generates a React Testing Library test from a Chrome Recorder export.
95
143
 
96
144
  ```bash
97
145
  # Generate and write a test next to the recording
98
- taro generate ./recordings/checkout-flow.json
146
+ taro generate ./recordings/checkout-flow.js
99
147
 
100
148
  # Preview without writing (dry run)
101
- taro generate --dry-run ./recordings/checkout-flow.json
149
+ taro generate --dry-run ./recordings/checkout-flow.js
102
150
 
103
151
  # Write to a specific path
104
- taro generate --output src/__tests__/checkout.test.tsx ./recordings/checkout-flow.json
152
+ taro generate --output src/__tests__/checkout.test.tsx ./recordings/checkout-flow.js
105
153
 
106
154
  # Overwrite an existing test
107
- taro generate --force ./recordings/checkout-flow.json
155
+ taro generate --force ./recordings/checkout-flow.js
108
156
  ```
109
157
 
110
158
  **Output file naming:**
111
- If `--output` is not provided, Taro derives the output path from the input file: `{input-dir}/{input-basename}.test.tsx`. For example, `./recordings/login.json` → `./recordings/login.test.tsx`.
159
+ If `--output` is not provided, Taro derives the output path from the input file: `{input-dir}/{input-basename}.test.tsx`. For example, `./recordings/login.js` → `./recordings/login.test.tsx`.
112
160
 
113
161
  **Supported input formats:**
114
- - Chrome Recorder JSON (`.json`) — exported directly from Chrome DevTools Recorder
115
162
  - Testing Library Recorder JS (`.js`) — exported via the Testing Library Recorder Chrome extension; detected by `.js` extension or `@jest-environment-options` header
116
163
 
117
164
  ## Worked Example
118
165
 
119
- ### Input: Chrome Recorder export (`login-flow.json`)
120
-
121
- Here is a typical Chrome Recorder JSON export capturing a login flow.
122
-
123
- ```json
124
- {
125
- "title": "login flow",
126
- "steps": [
127
- { "type": "navigate", "url": "http://localhost:3000/login" },
128
- { "type": "click", "selectors": [["aria/Email address"]] },
129
- { "type": "change", "value": "user@example.com", "selectors": [["#email"]] },
130
- { "type": "click", "selectors": [["aria/Password"]] },
131
- { "type": "change", "value": "secret123", "selectors": [["#password"]] },
132
- { "type": "click", "selectors": [["aria/Sign in[role=\"button\"]"]] },
133
- { "type": "waitForElement", "selectors": [["aria/Welcome back"]] }
134
- ]
135
- }
166
+ ### Input: Testing Library Recorder export (`login-flow.js`)
167
+
168
+ Here is a typical Testing Library Recorder export capturing a login flow.
169
+
170
+ ```js
171
+ import { screen } from '@testing-library/dom'
172
+ import userEvent from '@testing-library/user-event'
173
+
174
+ test('login flow', async () => {
175
+ await userEvent.click(screen.getByRole('textbox', { name: 'Email address' }))
176
+ await userEvent.type(screen.getByRole('textbox', { name: 'Email address' }), 'user@example.com')
177
+ await userEvent.click(screen.getByRole('textbox', { name: 'Password' }))
178
+ await userEvent.type(screen.getByRole('textbox', { name: 'Password' }), 'secret123')
179
+ await userEvent.click(screen.getByRole('button', { name: 'Sign in' }))
180
+ await userEvent.click(screen.getByText('Welcome back'))
181
+ })
136
182
  ```
137
183
 
138
184
  ### Command
139
185
 
140
186
  ```bash
141
- taro generate ./login-flow.json
187
+ taro generate ./login-flow.js
142
188
  ```
143
189
 
144
190
  ### Terminal output
@@ -185,59 +231,11 @@ describe('login flow', () => {
185
231
 
186
232
  > **Note:** The component import path (`../LoginPage`) is a placeholder. Taro generates a comment in the file indicating where to update it.
187
233
 
188
- ## Using Taro as a Claude Code Skill
189
-
190
- ### Overview
191
-
192
- Taro works naturally as a Claude Code skill. You can instruct Claude to run `taro generate` on a recording file and it will generate the test, report the score, and surface any quality hints — all in a single agent turn.
193
-
194
- ### Option A: Direct invocation (no setup required)
195
-
196
- Claude Code can invoke Taro directly using the Bash tool. No skill configuration is needed — Claude calls npx inline. Simply give Claude a prompt like:
197
-
198
- ```
199
- Run: npx @tayo-dev/rtl generate ./recordings/checkout-flow.js
200
- Then report the score and the path of the generated file.
201
- ```
202
-
203
- ### Option B: Register as a Claude Code skill
204
-
205
- Registering Taro as a skill lets Claude invoke it by name without knowing the full command.
234
+ ## Agent Usage
206
235
 
207
- **Step 1** Create the skill file at `.claude/skills/taro/SKILL.md` in your project:
208
-
209
- ```markdown
210
- # Taro — RTL Test Generator
211
-
212
- ## Purpose
213
- Generate a React Testing Library test from a Chrome Recorder export.
214
-
215
- ## Invocation
216
- Run: taro generate <recording-file>
217
-
218
- ## Flags
219
- - `--dry-run` (-d): Preview the generated test without writing to disk
220
- - `--output <path>` (-o): Override the output file path
221
- - `--force` (-f): Overwrite an existing test file
222
-
223
- ## Output
224
- Writes `{recording-name}.test.tsx` next to the recording file.
225
- Reports score (0-100) and any quality hints.
226
- ```
227
-
228
- **Step 2** — Ensure Taro is installed in the project:
229
-
230
- ```bash
231
- npm install --save-dev @tayo-dev/rtl
232
- ```
233
-
234
- **Step 3** — Ask Claude to use the skill:
235
-
236
- ```
237
- Use the taro skill to generate a test from ./recordings/login-flow.js
238
- ```
236
+ After installation, each runtime gets a namespaced help entrypoint plus a generate command or skill that routes back to `taro generate`.
239
237
 
240
- ### Tips for agent use
238
+ ### Tips
241
239
 
242
240
  - Use `--dry-run` first to preview output before committing generated files
243
241
  - If you record multiple flows, run Taro on each to build up convention state in `.taro/conventions.json` — later runs benefit from earlier ones
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: "@tayo-dev/rtl:generate"
3
+ description: "Generate RTL tests from Recorder exports with Taro"
4
+ ---
5
+
6
+ <objective>
7
+ Generate a React Testing Library test from a Recorder export.
8
+ </objective>
9
+
10
+ <process>
11
+ 1. Confirm the recording path before running anything destructive.
12
+ 2. Run `taro generate <recording-file>` by default.
13
+ 3. Add `--dry-run`, `--output <path>`, or `--force` only when the user asks for them or the context requires them.
14
+ 4. Report the generated file path and score output.
15
+ </process>
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: "@tayo-dev/rtl:help"
3
+ description: "Show @tayo-dev/rtl install and generation help"
4
+ ---
5
+
6
+ <objective>
7
+ Help the user install and use @tayo-dev/rtl from Claude Code.
8
+ </objective>
9
+
10
+ <process>
11
+ 1. Explain that `/@tayo-dev/rtl:help` is the installed help entrypoint for @tayo-dev/rtl.
12
+ 2. For installation or updates, tell the user to run `npx @tayo-dev/rtl@latest`.
13
+ 3. For test generation, use `/@tayo-dev/rtl:generate` or run `taro generate <recording-file>`.
14
+ 4. Mention `--dry-run`, `--output <path>`, and `--force` only when they fit the request.
15
+ 5. When generation runs, report the score and generated file path.
16
+ </process>
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: "@tayo-dev/rtl-conventions"
3
+ description: "Explain how Tayo learns project test conventions and how to keep them stable."
4
+ ---
5
+
6
+ # Tayo Conventions
7
+
8
+ Use `$@tayo-dev/rtl-conventions` when the user asks why generated tests follow a certain style or how `.taro/conventions.json` affects output.
9
+
10
+ ## Focus
11
+
12
+ - explain that Tayo learns local test conventions from the codebase
13
+ - call out when `.taro/conventions.json` will influence generated imports, mocks, and file placement
14
+ - recommend `--dry-run` when the user wants to inspect convention alignment before writing files
15
+
16
+ ## Guardrails
17
+
18
+ - prefer existing project conventions over generic defaults
19
+ - surface missing context instead of inventing project-specific patterns
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: "@tayo-dev/rtl-generate"
3
+ description: "Generate React Testing Library tests from Recorder exports with Tayo."
4
+ ---
5
+
6
+ # Tayo Generate
7
+
8
+ Use `$@tayo-dev/rtl-generate` when the user wants to turn a Recorder export into a React Testing Library test.
9
+
10
+ ## Inputs
11
+
12
+ - path to the recording file
13
+ - optional `--output <path>`
14
+ - optional `--dry-run`
15
+ - optional `--force`
16
+
17
+ ## Execution
18
+
19
+ Run `taro generate <recording-file>` with the requested flags.
20
+
21
+ ## Response contract
22
+
23
+ Report:
24
+
25
+ - the generated test path
26
+ - the Tayo score
27
+ - any follow-up work required to fix component imports or flaky selectors
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: "@tayo-dev/rtl-help"
3
+ description: "Show the packaged Tayo Codex skill surface and the expected help entrypoint."
4
+ ---
5
+
6
+ # Tayo Codex Help
7
+
8
+ Use this skill when you need the Codex-facing entrypoint for Tayo or you need to route the user to the right packaged skill.
9
+
10
+ ## Entrypoint
11
+
12
+ Invoke this skill with `$@tayo-dev/rtl-help`.
13
+
14
+ ## Installed skill surface
15
+
16
+ - `$@tayo-dev/rtl-generate` for Recorder-to-RTL generation
17
+ - `$@tayo-dev/rtl-conventions` for convention-aware generation guidance
18
+ - `$@tayo-dev/rtl-mocks` for mock and fixture review
19
+
20
+ ## Default workflow
21
+
22
+ 1. Confirm the recording path or test target.
23
+ 2. Choose the matching packaged Tayo skill.
24
+ 3. If direct CLI execution is appropriate, run `taro generate <recording-file>` with any requested flags.
25
+ 4. Report the generated file path, score, and any blocking issues.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: "@tayo-dev/rtl-mocks"
3
+ description: "Review mock targets, fixture shape, and post-generation follow-up for Tayo output."
4
+ ---
5
+
6
+ # Tayo Mocks
7
+
8
+ Use `$@tayo-dev/rtl-mocks` when the user needs help understanding mock recommendations or fixture strategy around generated RTL tests.
9
+
10
+ ## Focus
11
+
12
+ - identify the API or data boundaries that need mocks
13
+ - explain whether the mock should stay inline or move to a shared fixture
14
+ - keep recommendations aligned with the project's current test stack
15
+
16
+ ## Output
17
+
18
+ Summarize:
19
+
20
+ - the mock targets that matter
21
+ - the preferred mocking pattern
22
+ - any manual follow-up still required after generation
@@ -0,0 +1,10 @@
1
+ description = "Generate RTL tests from Recorder exports with Taro"
2
+ prompt = """
3
+ You are the installed /@tayo-dev/rtl:generate command for @tayo-dev/rtl.
4
+
5
+ Generate a React Testing Library test from a Recorder export.
6
+ 1. Confirm the recording path before running anything destructive.
7
+ 2. Run `taro generate <recording-file>` by default.
8
+ 3. Add `--dry-run`, `--output <path>`, or `--force` only when the user asks for them or the context requires them.
9
+ 4. Report the generated file path and score output.
10
+ """
@@ -0,0 +1,11 @@
1
+ description = "Show @tayo-dev/rtl install and generation help"
2
+ prompt = """
3
+ You are the installed /@tayo-dev/rtl:help command for @tayo-dev/rtl.
4
+
5
+ When the user wants help:
6
+ 1. Explain that /@tayo-dev/rtl:help is the runtime-native help entrypoint.
7
+ 2. For installation or updates, tell them to run `npx @tayo-dev/rtl@latest`.
8
+ 3. For generation, direct them to /@tayo-dev/rtl:generate or `taro generate <recording-file>`.
9
+ 4. Mention `--dry-run`, `--output <path>`, and `--force` only when they match the request.
10
+ 5. When generation runs, report the score and generated file path.
11
+ """
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: Generate RTL tests from Recorder exports with Taro
3
+ ---
4
+
5
+ You are the installed `/@tayo-dev/rtl-generate` command for `@tayo-dev/rtl`.
6
+
7
+ Generate a React Testing Library test from a Recorder export.
8
+ 1. Confirm the recording path before running anything destructive.
9
+ 2. Run `taro generate <recording-file>` by default.
10
+ 3. Add `--dry-run`, `--output <path>`, or `--force` only when the user asks for them or the context requires them.
11
+ 4. Report the generated file path and score output.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: Show @tayo-dev/rtl install and generation help
3
+ ---
4
+
5
+ You are the installed `/@tayo-dev/rtl-help` command for `@tayo-dev/rtl`.
6
+
7
+ When the user wants help:
8
+ 1. Explain that `/@tayo-dev/rtl-help` is the runtime-native help entrypoint.
9
+ 2. For installation or updates, tell them to run `npx @tayo-dev/rtl@latest`.
10
+ 3. For generation, direct them to `/@tayo-dev/rtl-generate` or `taro generate <recording-file>`.
11
+ 4. Mention `--dry-run`, `--output <path>`, and `--force` only when they match the request.
12
+ 5. When generation runs, report the score and generated file path.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Generate command
3
3
  * Full pipeline: parse → validate → generate → write
4
- * Converts Chrome Recorder exports into React Testing Library test files.
4
+ * Converts Recorder exports into React Testing Library test files.
5
5
  */
6
6
  import { Command } from 'commander';
7
7
  export interface GenerateOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAwCnC,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAiQD,wBAAgB,qBAAqB,IAAI,OAAO,CA4P/C"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAyCnC,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAsUD,wBAAgB,qBAAqB,IAAI,OAAO,CA0H/C"}