@exodus/xqa 1.3.0 → 1.5.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.
- package/README.md +150 -96
- package/dist/skills/xqa-spec/AGENTS.md +20 -15
- package/dist/skills/xqa-spec/SKILL.md +73 -18
- package/dist/xqa.cjs +9365 -2158
- package/package.json +12 -11
package/README.md
CHANGED
|
@@ -1,166 +1,220 @@
|
|
|
1
1
|
# @exodus/xqa
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AI-powered QA agent CLI for Exodus applications.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Overview
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- pnpm
|
|
9
|
-
- An Anthropic API key
|
|
7
|
+
`xqa` automates mobile app QA by connecting to physical devices or emulators and running intelligent exploration and spec-based testing. The CLI orchestrates the pipeline that spawns agents to interact with your app, capture screenshots, and generate findings based on user-defined specs or breadth-first exploration.
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
The tool manages configuration, project initialization, session state tracking, and interactive review workflows for triaging findings.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## Commands
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
pnpm install
|
|
17
|
-
```
|
|
13
|
+
### init
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
Initialize a new xqa project in the current directory.
|
|
16
|
+
|
|
17
|
+
Creates a `.xqa/` directory with templates and subdirectories for specs, designs, and suites. Installs the `xqa-spec` skill for creating test specs.
|
|
20
18
|
|
|
21
19
|
```bash
|
|
22
|
-
|
|
20
|
+
xqa init
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
### explore [prompt]
|
|
24
|
+
|
|
25
|
+
Run the explorer agent; omit prompt for a full breadth-first sweep.
|
|
26
|
+
|
|
27
|
+
Optional focus hint for the explorer agent. Omit to explore the entire app from the starting state. Generates a findings JSON file in `.xqa/output/` and prints the path upon completion.
|
|
26
28
|
|
|
27
29
|
```bash
|
|
28
|
-
|
|
30
|
+
xqa explore # breadth-first exploration
|
|
31
|
+
xqa explore "test the login flow" # focused exploration
|
|
32
|
+
xqa explore -v prompt,screen # verbose output for categories
|
|
33
|
+
xqa explore -v # verbose output for all categories
|
|
29
34
|
```
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
Flag: `-v, --verbose [categories]` — Log categories (prompt, tools, screen, memory). Default: all if flag is present without value.
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
### spec [spec-file]
|
|
39
|
+
|
|
40
|
+
Run the explorer agent against a spec file.
|
|
41
|
+
|
|
42
|
+
Loads a spec markdown file from `.xqa/specs/` (or an absolute path) and executes the agent against it. Spec files define entry points, steps, and optional timeouts. Omit the argument to pick from available specs interactively.
|
|
34
43
|
|
|
35
44
|
```bash
|
|
36
|
-
|
|
45
|
+
xqa spec # interactive spec picker
|
|
46
|
+
xqa spec .xqa/specs/authentication.test.md # explicit spec file
|
|
47
|
+
xqa spec -v tools,memory # verbose output
|
|
37
48
|
```
|
|
38
49
|
|
|
39
|
-
|
|
50
|
+
Flag: `-v, --verbose [categories]` — Same as explore.
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
Spec file format (YAML frontmatter + markdown):
|
|
42
53
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| `QA_WALLET_MNEMONIC` | No | — | Wallet mnemonic; agent restores wallet before exploring when set |
|
|
50
|
-
| `QA_BUILD_ENV` | No | `prod` | `dev` or `prod`; `dev` mode ignores debug overlays |
|
|
51
|
-
| `QA_STARTUP_STATE` | No | — | `portfolio`, `new-wallet`, or `restore-wallet`; unset means app starts in its current state |
|
|
52
|
-
| `QA_DESIGNS_DIR` | No | `./.xqa/designs` | Design artboards directory; enables visual regression checks when set |
|
|
54
|
+
```markdown
|
|
55
|
+
---
|
|
56
|
+
feature: 'Feature Name'
|
|
57
|
+
entry: 'Screen name or navigation path'
|
|
58
|
+
timeout: 300
|
|
59
|
+
---
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
# Spec content
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### review [findings-path]
|
|
55
65
|
|
|
56
|
-
|
|
66
|
+
Review findings and mark false positives.
|
|
57
67
|
|
|
58
|
-
|
|
68
|
+
Interactive session for triaging findings generated by explore or spec runs. Displays findings with confidence scores, steps, and screenshots. Mark findings as false positives (with optional reason) or undo previous dismissals. Saves dismissals to `.xqa/dismissals.json`. Defaults to the last findings path if omitted.
|
|
59
69
|
|
|
60
70
|
```bash
|
|
61
|
-
xqa
|
|
62
|
-
xqa
|
|
63
|
-
xqa explore --verbose
|
|
71
|
+
xqa review # use last findings file
|
|
72
|
+
xqa review .xqa/output/findings-abc123.json # explicit path
|
|
64
73
|
```
|
|
65
74
|
|
|
66
|
-
|
|
75
|
+
### analyse [video-path]
|
|
76
|
+
|
|
77
|
+
Analyse a session recording with Gemini.
|
|
67
78
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
Requires `GOOGLE_GENERATIVE_AI_API_KEY` in environment. Analyzes a video file recorded during exploration and outputs findings as JSON.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
xqa analyse /path/to/video.mp4
|
|
83
|
+
```
|
|
71
84
|
|
|
72
|
-
|
|
85
|
+
### completion <shell>
|
|
73
86
|
|
|
74
|
-
|
|
87
|
+
Output shell completion script.
|
|
75
88
|
|
|
76
|
-
|
|
89
|
+
Generate completion script for bash or zsh. Pipe output to shell config file to enable tab completion.
|
|
77
90
|
|
|
78
91
|
```bash
|
|
79
|
-
xqa
|
|
80
|
-
xqa
|
|
92
|
+
xqa completion bash # generate bash completions
|
|
93
|
+
xqa completion zsh # generate zsh completions
|
|
81
94
|
```
|
|
82
95
|
|
|
83
|
-
|
|
96
|
+
## Configuration
|
|
84
97
|
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
feature: Send Flow
|
|
88
|
-
entry: Assets list
|
|
89
|
-
max_steps: 40
|
|
90
|
-
---
|
|
98
|
+
Configuration is loaded from environment variables and `.env.local`:
|
|
91
99
|
|
|
92
|
-
|
|
93
|
-
|
|
100
|
+
- `ANTHROPIC_API_KEY` (required) — Anthropic Claude API key for agent reasoning
|
|
101
|
+
- `GOOGLE_GENERATIVE_AI_API_KEY` (optional) — Google Generative AI key for video analysis
|
|
102
|
+
- `QA_RUN_ID` (optional) — Custom run identifier; defaults to auto-generated
|
|
103
|
+
- `QA_EXPLORE_TIMEOUT_SECONDS` (optional) — Exploration timeout in seconds
|
|
104
|
+
- `QA_BUILD_ENV` (optional) — Build environment: `dev` or `prod` (default: prod)
|
|
105
|
+
|
|
106
|
+
## Architecture
|
|
94
107
|
|
|
95
|
-
|
|
96
|
-
| ----------- | -------- | -------------------------------------------------- |
|
|
97
|
-
| `feature` | Yes | Human-readable feature name |
|
|
98
|
-
| `entry` | Yes | Screen name the agent navigates to before starting |
|
|
99
|
-
| `max_steps` | No | Maximum number of agent steps |
|
|
108
|
+
Key files and directories:
|
|
100
109
|
|
|
101
|
-
|
|
110
|
+
- `src/index.ts` — CLI entry point; wires commander commands and manages graceful shutdown via process locks
|
|
111
|
+
- `src/commands/` — Command implementations (init, explore, spec, review, analyse, completion)
|
|
112
|
+
- `src/core/` — Pure functions: spec parsing, completion generation, verbose option parsing, last-path tracking
|
|
113
|
+
- `src/shell/` — I/O wrappers: file reading, device discovery, app context loading
|
|
114
|
+
- `src/config.ts`, `src/config-schema.ts` — Configuration loading and validation with Zod
|
|
115
|
+
- `src/review-session.ts` — Interactive finding review loop with dismissal tracking
|
|
116
|
+
- `src/spec-frontmatter.ts` — Spec markdown frontmatter parsing (YAML)
|
|
117
|
+
- `src/spec-slug.ts` — Spec filename to slug derivation for output organization
|
|
118
|
+
- `src/pid-lock.ts` — Process-level mutual exclusion to prevent concurrent runs
|
|
102
119
|
|
|
103
|
-
|
|
120
|
+
## Error Types
|
|
121
|
+
|
|
122
|
+
Core error discriminated unions:
|
|
123
|
+
|
|
124
|
+
- `ConfigError` — Configuration validation failed (INVALID_CONFIG)
|
|
125
|
+
- `AppContextError` — Failed to read app.md or explore.md (READ_FAILED)
|
|
126
|
+
- `XqaDirectoryError` — No .xqa directory found (XQA_NOT_INITIALIZED)
|
|
127
|
+
- `SpecFrontmatterError` — Malformed spec markdown (MISSING_FRONTMATTER, MISSING_FIELD, PARSE_ERROR)
|
|
128
|
+
- `LastPathError` — No findings path provided and no prior session (NO_ARG_AND_NO_STATE)
|
|
129
|
+
|
|
130
|
+
## Development
|
|
131
|
+
|
|
132
|
+
Install dependencies:
|
|
104
133
|
|
|
105
134
|
```bash
|
|
106
|
-
|
|
135
|
+
pnpm install
|
|
107
136
|
```
|
|
108
137
|
|
|
109
|
-
|
|
138
|
+
Build the CLI:
|
|
110
139
|
|
|
111
|
-
|
|
140
|
+
```bash
|
|
141
|
+
pnpm run build
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Run tests:
|
|
112
145
|
|
|
113
146
|
```bash
|
|
114
|
-
|
|
147
|
+
pnpm run test
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Type check:
|
|
115
151
|
|
|
116
|
-
|
|
117
|
-
|
|
152
|
+
```bash
|
|
153
|
+
pnpm run typecheck
|
|
118
154
|
```
|
|
119
155
|
|
|
120
|
-
|
|
156
|
+
Lint and format:
|
|
121
157
|
|
|
122
|
-
|
|
158
|
+
```bash
|
|
159
|
+
pnpm run lint
|
|
160
|
+
pnpm run lint:fix
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Full quality check (lint, typecheck, test):
|
|
123
164
|
|
|
124
165
|
```bash
|
|
125
|
-
|
|
126
|
-
|
|
166
|
+
pnpm run check
|
|
167
|
+
pnpm run check:fix
|
|
127
168
|
```
|
|
128
169
|
|
|
129
|
-
|
|
170
|
+
Watch mode (build + re-run on file changes):
|
|
130
171
|
|
|
131
|
-
|
|
172
|
+
```bash
|
|
173
|
+
pnpm run dev
|
|
174
|
+
```
|
|
132
175
|
|
|
133
|
-
|
|
134
|
-
- `Ctrl+C` twice: force exit
|
|
176
|
+
Link binary globally (symlinks dist/xqa.cjs to ~/.local/bin/xqa):
|
|
135
177
|
|
|
136
|
-
|
|
178
|
+
```bash
|
|
179
|
+
pnpm run build:link
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Unlink binary:
|
|
137
183
|
|
|
138
184
|
```bash
|
|
139
|
-
pnpm
|
|
140
|
-
pnpm build # production build
|
|
141
|
-
pnpm build:link # build + link `xqa` globally
|
|
142
|
-
pnpm dev:link # watch build + link
|
|
143
|
-
pnpm test # run Vitest test suite
|
|
144
|
-
pnpm typecheck # TypeScript type check
|
|
145
|
-
pnpm lint # ESLint + Prettier check
|
|
146
|
-
pnpm lint:fix # ESLint + Prettier auto-fix
|
|
147
|
-
pnpm check # lint + typecheck + test (affected only)
|
|
148
|
-
pnpm check:fix # lint:fix + typecheck + test (affected only)
|
|
185
|
+
pnpm run build:unlink
|
|
149
186
|
```
|
|
150
187
|
|
|
151
|
-
##
|
|
188
|
+
## Project Structure
|
|
152
189
|
|
|
153
190
|
```
|
|
154
191
|
src/
|
|
155
|
-
index.ts
|
|
156
|
-
config
|
|
192
|
+
index.ts # CLI entry point
|
|
193
|
+
config.ts # Config loading and types
|
|
194
|
+
config-schema.ts # Zod schema for env vars
|
|
195
|
+
constants.ts # Tool lists and timeouts
|
|
196
|
+
pid-lock.ts # Process exclusion lock
|
|
197
|
+
spec-slug.ts # Spec file to slug conversion
|
|
198
|
+
spec-frontmatter.ts # Spec YAML parsing
|
|
199
|
+
review-session.ts # Interactive finding review loop
|
|
200
|
+
|
|
157
201
|
commands/
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
review-command.ts
|
|
162
|
-
|
|
163
|
-
|
|
202
|
+
init-command.ts # Project initialization
|
|
203
|
+
explore-command.ts # Breadth-first exploration
|
|
204
|
+
spec-command.ts # Spec-based exploration
|
|
205
|
+
review-command.ts # Finding triage workflow
|
|
206
|
+
analyse-command.ts # Video analysis
|
|
207
|
+
completion-command.ts # Shell completion generation
|
|
208
|
+
|
|
209
|
+
core/
|
|
210
|
+
parse-verbose.ts # Verbose flag parsing
|
|
211
|
+
completion-generator.ts # Bash/zsh completion script generation
|
|
212
|
+
last-path.ts # Last findings path tracking
|
|
213
|
+
|
|
214
|
+
shell/
|
|
215
|
+
app-context.ts # Read app.md and explore.md
|
|
216
|
+
xqa-directory.ts # Locate .xqa directory
|
|
217
|
+
|
|
218
|
+
__tests__/
|
|
219
|
+
*.test.ts # Test files co-located with src/
|
|
164
220
|
```
|
|
165
|
-
|
|
166
|
-
The CLI is a thin shell over `@qa-agents/pipeline`. It parses env vars, builds a `PipelineConfig`, and calls `runPipeline()`.
|
|
@@ -23,7 +23,7 @@ Silently scan `.xqa/specs/*.test.md`. Learn:
|
|
|
23
23
|
- Tag vocabulary
|
|
24
24
|
- Level of detail and step granularity
|
|
25
25
|
|
|
26
|
-
Also read `.xqa/
|
|
26
|
+
Also read `.xqa/app.md` if it exists for app context.
|
|
27
27
|
|
|
28
28
|
### 2. Detect mode
|
|
29
29
|
|
|
@@ -40,17 +40,20 @@ Ask one question at a time. Wait for the answer before asking the next. Prefer m
|
|
|
40
40
|
|
|
41
41
|
**Question sequence:**
|
|
42
42
|
|
|
43
|
-
1. **What flow?** — Confirm what's being tested if not already clear. Suggest a filename.
|
|
44
|
-
2. **
|
|
45
|
-
3. **
|
|
46
|
-
4. **
|
|
47
|
-
5. **
|
|
43
|
+
1. **What flow?** — Confirm what's being tested if not already clear. Suggest a filename and `feature` name.
|
|
44
|
+
2. **Entry point** — "What's the navigation path to reach this flow?" (e.g., `App launch`, `Home > Wallet`) → becomes `entry:` frontmatter
|
|
45
|
+
3. **Starting state** — "What's already set up? What state is the device/app in?" → becomes `## Setup`
|
|
46
|
+
4. **Steps** — "Walk me through the steps, one at a time. I'll ask for the next when you're done." → collect each step, then ask "What should happen?" for the assertion (optional)
|
|
47
|
+
5. **Global assertions** — "Any overall things that should be true at the end of the flow?" → becomes `## Assertions` (skip if none)
|
|
48
|
+
6. **Timeout** — "Set a timeout in seconds? (optional, for long-running specs)" → becomes `timeout:` frontmatter (offer to skip)
|
|
48
49
|
|
|
49
50
|
IMPORTANT: Ask each question in its own message. Never batch questions.
|
|
50
51
|
|
|
51
52
|
### 4. Draft
|
|
52
53
|
|
|
53
|
-
Assemble
|
|
54
|
+
Assemble using ONLY these frontmatter fields: `feature`, `entry`, `timeout`. Do not add any other frontmatter field. `feature` MUST be present. `timeout` MUST be a positive number (seconds) if included.
|
|
55
|
+
|
|
56
|
+
Steps and assertions come from the user — never invent them. Present the full draft for review.
|
|
54
57
|
|
|
55
58
|
### 5. Review
|
|
56
59
|
|
|
@@ -66,28 +69,30 @@ Save to `.xqa/specs/<name>.test.md` only after explicit approval.
|
|
|
66
69
|
|
|
67
70
|
```md
|
|
68
71
|
---
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
timeout:
|
|
72
|
+
feature: <string>
|
|
73
|
+
entry: <string>
|
|
74
|
+
timeout: <seconds>
|
|
72
75
|
---
|
|
73
76
|
|
|
74
77
|
## Setup
|
|
75
78
|
|
|
76
|
-
|
|
79
|
+
<preconditions and starting state>
|
|
77
80
|
|
|
78
81
|
## Steps
|
|
79
82
|
|
|
80
|
-
1.
|
|
81
|
-
2.
|
|
83
|
+
1. <action> → <expected outcome>
|
|
84
|
+
2. <action>
|
|
82
85
|
|
|
83
86
|
## Assertions
|
|
84
87
|
|
|
85
|
-
-
|
|
88
|
+
- <global flow-level check>
|
|
86
89
|
```
|
|
87
90
|
|
|
91
|
+
Omit `entry` and `timeout` lines if not provided. Omit `## Assertions` section if none.
|
|
92
|
+
|
|
88
93
|
## Rules
|
|
89
94
|
|
|
90
|
-
- `## Setup` and `## Steps` are required;
|
|
95
|
+
- `## Setup` and `## Steps` are required; `## Assertions` is optional
|
|
91
96
|
- Inline assertion syntax: `action → outcome` using the → character
|
|
92
97
|
- Steps come from the user — never invent them
|
|
93
98
|
- Write file only after explicit approval
|
|
@@ -26,10 +26,9 @@ IMPORTANT: Never generate a draft before the interview is complete. The user des
|
|
|
26
26
|
Silently scan `.xqa/specs/*.test.md`. Learn:
|
|
27
27
|
|
|
28
28
|
- Naming conventions
|
|
29
|
-
- Tag vocabulary
|
|
30
29
|
- Level of detail and step granularity
|
|
31
30
|
|
|
32
|
-
Also read `.xqa/
|
|
31
|
+
Also read `.xqa/app.md` if it exists for app context.
|
|
33
32
|
|
|
34
33
|
### 2. Detect mode
|
|
35
34
|
|
|
@@ -46,17 +45,19 @@ Ask one question at a time. Wait for the answer before asking the next. Prefer m
|
|
|
46
45
|
|
|
47
46
|
**Question sequence:**
|
|
48
47
|
|
|
49
|
-
1. **What flow?** — Confirm what's being tested if not already clear. Suggest a filename.
|
|
50
|
-
2. **Starting state** — "
|
|
51
|
-
3. **Steps** — "Walk me through the steps, one at a time.
|
|
52
|
-
4. **Global assertions** — "
|
|
53
|
-
5. **
|
|
48
|
+
1. **What flow?** — Confirm what's being tested if not already clear. Suggest a filename and `feature` name.
|
|
49
|
+
2. **Starting state** — "What's already set up? What state is the device/app in?" → becomes `## Setup`
|
|
50
|
+
3. **Steps** — "Walk me through the steps, one at a time. For each step, describe the intent (what the user is trying to do), and optionally the expected outcome and a hint about the current label or wording." → collect each step. Prompt for outcome only when user mentions something to verify. Prompt for hint only when current label wording is useful.
|
|
51
|
+
4. **Global assertions** — "Any overall things that should be true at the end of the flow?" → becomes `## Assertions` (skip if none)
|
|
52
|
+
5. **Timeout** — "Set a timeout in seconds? (optional, for long-running specs)" → becomes `timeout:` frontmatter (offer to skip)
|
|
54
53
|
|
|
55
54
|
IMPORTANT: Ask each question in its own message. Never batch questions.
|
|
56
55
|
|
|
57
56
|
### 4. Draft
|
|
58
57
|
|
|
59
|
-
Assemble
|
|
58
|
+
Assemble using ONLY these frontmatter fields: `feature`, `timeout`. Do not add any other frontmatter field. `feature` MUST be present. `timeout` MUST be a positive number (seconds) if included.
|
|
59
|
+
|
|
60
|
+
Steps come from the user — never invent them. Use intent-first language: describe the user's goal, not literal widget taps. Present the full draft for review.
|
|
60
61
|
|
|
61
62
|
### 5. Review
|
|
62
63
|
|
|
@@ -66,35 +67,89 @@ Iterate until approved. One round of changes per message.
|
|
|
66
67
|
|
|
67
68
|
### 6. Write
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
Before writing, verify the draft passes all checks:
|
|
71
|
+
|
|
72
|
+
- [ ] `feature` is present and non-empty
|
|
73
|
+
- [ ] frontmatter contains only permitted fields: `feature`, `timeout`
|
|
74
|
+
- [ ] `timeout` if present is a positive number in seconds (not a string, not zero)
|
|
75
|
+
- [ ] `## Setup` section is present
|
|
76
|
+
- [ ] `## Steps` section is present
|
|
77
|
+
- [ ] No step begins with `Tap "<literal label>"` or equivalent literal-widget references — steps use intent-first language
|
|
78
|
+
- [ ] No forbidden fields: `tags`, `max_steps`, `priority`, `type`, `description`, `id`, `author`, `version`, `entry`
|
|
79
|
+
|
|
80
|
+
Fix any failure before writing. Save to `.xqa/specs/<name>.test.md` only after explicit approval.
|
|
81
|
+
|
|
82
|
+
## Step Grammar
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
<intent phrase> [→ <outcome state>] [hint: <advisory text>]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- **Intent phrase** — imperative, action-oriented, describes the user's goal. No literal widget labels. Include a domain noun (e.g., "agreement", "asset", "settings").
|
|
89
|
+
- **Outcome state** — optional. Include only when the step has something to verify. Observable screen state or content predicate.
|
|
90
|
+
- **Hint** — optional. Free-form natural text describing expected label or qualities. Agent infers role (primary/secondary/dismissal) from context. Never use structured `role=` syntax.
|
|
91
|
+
|
|
92
|
+
### Valid examples
|
|
93
|
+
|
|
94
|
+
```md
|
|
95
|
+
1. Accept the terms and conditions → Portfolio screen visible [hint: "Agree and continue"]
|
|
96
|
+
2. Open the settings menu
|
|
97
|
+
3. Dismiss the backup reminder [hint: skip or maybe later button]
|
|
98
|
+
4. Enter the recovery phrase words in order → All 12 fields filled, Confirm becomes active
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Anti-patterns
|
|
102
|
+
|
|
103
|
+
```md
|
|
104
|
+
# Literal label as selector — breaks on rename
|
|
105
|
+
|
|
106
|
+
1. Tap the "Agree and continue" button
|
|
107
|
+
|
|
108
|
+
# Vague intent — agent has nothing to anchor on
|
|
109
|
+
|
|
110
|
+
2. Do the onboarding thing
|
|
111
|
+
```
|
|
70
112
|
|
|
71
113
|
## File format
|
|
72
114
|
|
|
115
|
+
FRONTMATTER SCHEMA — exact fields, exact types, no others:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
feature string REQUIRED
|
|
119
|
+
timeout positive number (seconds) OPTIONAL — omit if not provided
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
FORBIDDEN frontmatter fields — never generate these: `tags`, `max_steps`, `priority`, `type`, `description`, `id`, `author`, `version`, `entry`
|
|
123
|
+
|
|
124
|
+
CANONICAL OUTPUT FORMAT:
|
|
125
|
+
|
|
73
126
|
```md
|
|
74
127
|
---
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
timeout: 120
|
|
128
|
+
feature: <string>
|
|
129
|
+
timeout: <seconds>
|
|
78
130
|
---
|
|
79
131
|
|
|
80
132
|
## Setup
|
|
81
133
|
|
|
82
|
-
|
|
134
|
+
<preconditions and starting state>
|
|
83
135
|
|
|
84
136
|
## Steps
|
|
85
137
|
|
|
86
|
-
1.
|
|
87
|
-
2.
|
|
138
|
+
1. <intent> → <outcome> [hint: <advisory>]
|
|
139
|
+
2. <intent>
|
|
88
140
|
|
|
89
141
|
## Assertions
|
|
90
142
|
|
|
91
|
-
-
|
|
143
|
+
- <global flow-level check>
|
|
92
144
|
```
|
|
93
145
|
|
|
146
|
+
Omit `timeout` line if not provided. Omit `## Assertions` section if none. Omit `→ <outcome>` or `[hint: ...]` per-step when not applicable.
|
|
147
|
+
|
|
94
148
|
## Rules
|
|
95
149
|
|
|
96
|
-
-
|
|
97
|
-
-
|
|
150
|
+
- Step grammar: `<intent> [→ <outcome>] [hint: <advisory>]` using the → character
|
|
151
|
+
- Outcome and hint are optional per step; include only when useful
|
|
98
152
|
- Steps come from the user — never invent them
|
|
153
|
+
- Intent-first language only; no literal `Tap "<label>"` references
|
|
99
154
|
- Write file only after explicit approval
|
|
100
155
|
- In edit mode, ask before touching anything
|