@exodus/xqa 1.4.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/dist/skills/xqa-spec/SKILL.md +48 -18
- package/dist/xqa.cjs +9243 -2182
- package/package.json +10 -9
|
@@ -26,7 +26,6 @@ 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
31
|
Also read `.xqa/app.md` if it exists for app context.
|
|
@@ -47,19 +46,18 @@ Ask one question at a time. Wait for the answer before asking the next. Prefer m
|
|
|
47
46
|
**Question sequence:**
|
|
48
47
|
|
|
49
48
|
1. **What flow?** — Confirm what's being tested if not already clear. Suggest a filename and `feature` name.
|
|
50
|
-
2. **
|
|
51
|
-
3. **
|
|
52
|
-
4. **
|
|
53
|
-
5. **
|
|
54
|
-
6. **Max steps** — "Set a timeout in seconds? (optional, for long-running specs)" → becomes `timeout:` frontmatter (offer to skip)
|
|
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)
|
|
55
53
|
|
|
56
54
|
IMPORTANT: Ask each question in its own message. Never batch questions.
|
|
57
55
|
|
|
58
56
|
### 4. Draft
|
|
59
57
|
|
|
60
|
-
Assemble using ONLY these frontmatter fields: `feature`, `
|
|
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.
|
|
61
59
|
|
|
62
|
-
Steps
|
|
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.
|
|
63
61
|
|
|
64
62
|
### 5. Review
|
|
65
63
|
|
|
@@ -72,32 +70,62 @@ Iterate until approved. One round of changes per message.
|
|
|
72
70
|
Before writing, verify the draft passes all checks:
|
|
73
71
|
|
|
74
72
|
- [ ] `feature` is present and non-empty
|
|
75
|
-
- [ ] frontmatter contains only permitted fields: `feature`, `
|
|
73
|
+
- [ ] frontmatter contains only permitted fields: `feature`, `timeout`
|
|
76
74
|
- [ ] `timeout` if present is a positive number in seconds (not a string, not zero)
|
|
77
75
|
- [ ] `## Setup` section is present
|
|
78
76
|
- [ ] `## Steps` section is present
|
|
79
|
-
- [ ] No
|
|
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`
|
|
80
79
|
|
|
81
80
|
Fix any failure before writing. Save to `.xqa/specs/<name>.test.md` only after explicit approval.
|
|
82
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
|
+
```
|
|
112
|
+
|
|
83
113
|
## File format
|
|
84
114
|
|
|
85
115
|
FRONTMATTER SCHEMA — exact fields, exact types, no others:
|
|
86
116
|
|
|
87
117
|
```
|
|
88
118
|
feature string REQUIRED
|
|
89
|
-
|
|
90
|
-
timeout positive number (seconds) OPTIONAL — omit if not provided
|
|
119
|
+
timeout positive number (seconds) OPTIONAL — omit if not provided
|
|
91
120
|
```
|
|
92
121
|
|
|
93
|
-
FORBIDDEN frontmatter fields — never generate these: `tags`, `max_steps`, `priority`, `type`, `description`, `id`, `author`, `version`
|
|
122
|
+
FORBIDDEN frontmatter fields — never generate these: `tags`, `max_steps`, `priority`, `type`, `description`, `id`, `author`, `version`, `entry`
|
|
94
123
|
|
|
95
124
|
CANONICAL OUTPUT FORMAT:
|
|
96
125
|
|
|
97
126
|
```md
|
|
98
127
|
---
|
|
99
128
|
feature: <string>
|
|
100
|
-
entry: <string>
|
|
101
129
|
timeout: <seconds>
|
|
102
130
|
---
|
|
103
131
|
|
|
@@ -107,19 +135,21 @@ timeout: <seconds>
|
|
|
107
135
|
|
|
108
136
|
## Steps
|
|
109
137
|
|
|
110
|
-
1. <
|
|
111
|
-
2. <
|
|
138
|
+
1. <intent> → <outcome> [hint: <advisory>]
|
|
139
|
+
2. <intent>
|
|
112
140
|
|
|
113
141
|
## Assertions
|
|
114
142
|
|
|
115
143
|
- <global flow-level check>
|
|
116
144
|
```
|
|
117
145
|
|
|
118
|
-
Omit `
|
|
146
|
+
Omit `timeout` line if not provided. Omit `## Assertions` section if none. Omit `→ <outcome>` or `[hint: ...]` per-step when not applicable.
|
|
119
147
|
|
|
120
148
|
## Rules
|
|
121
149
|
|
|
122
|
-
-
|
|
150
|
+
- Step grammar: `<intent> [→ <outcome>] [hint: <advisory>]` using the → character
|
|
151
|
+
- Outcome and hint are optional per step; include only when useful
|
|
123
152
|
- Steps come from the user — never invent them
|
|
153
|
+
- Intent-first language only; no literal `Tap "<label>"` references
|
|
124
154
|
- Write file only after explicit approval
|
|
125
155
|
- In edit mode, ask before touching anything
|