@xera-ai/skills 0.4.3 → 0.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/package.json +1 -1
- package/version.json +2 -2
- package/xera-exec.md +1 -0
- package/xera-impact.md +11 -3
- package/xera-run.md +5 -7
- package/xera-script.md +13 -1
package/package.json
CHANGED
package/version.json
CHANGED
package/xera-exec.md
CHANGED
|
@@ -8,6 +8,7 @@ The user invoked `/xera-exec <TICKET>`. If no key, ask.
|
|
|
8
8
|
1. Verify `.xera/{{TICKET}}/spec.ts` exists. If not: "Generate the spec first with `/xera-script {{TICKET}}`." STOP.
|
|
9
9
|
|
|
10
10
|
2. Run: `bun run xera:exec {{TICKET}}`
|
|
11
|
+
`bun run xera:exec` automatically picks the runner based on `meta.json.adapter` (web or http).
|
|
11
12
|
- Exit 0 → all scenarios passed.
|
|
12
13
|
- Exit 1 → user/config error (lock held, missing env var). Show the error verbatim and STOP.
|
|
13
14
|
- Exit 3 → test failure. This is expected; continue.
|
package/xera-impact.md
CHANGED
|
@@ -60,11 +60,19 @@ Ask the user: `Re-run impacted scenarios? [Y]es / [p] P0 only / [s]elect / [n]o
|
|
|
60
60
|
|
|
61
61
|
- **[n]:** STOP. The user can inspect `.xera/impact/{{TICKET}}.md` separately.
|
|
62
62
|
|
|
63
|
-
- **[Y]:** Group impacted scenarios by their owner ticket (`scenario.ticketId`). For each owner ticket,
|
|
63
|
+
- **[Y]:** Group impacted scenarios by their owner ticket (`scenario.ticketId`). For each owner ticket, build a regex from the impacted scenario names — e.g. `"user signs in|user resets password"` — and invoke:
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
```bash
|
|
66
|
+
bun run xera:exec <owner-ticket> --grep "<NAME_REGEX>"
|
|
67
|
+
```
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
The `--grep` flag (added in v0.6.4) makes Playwright run **only the named scenarios**, not the entire spec. Build the regex by joining `impacted[].name` with `|` and escaping any regex special characters in the names. If a scenario name contains characters like `(`, `)`, or `|`, escape them with `\\`.
|
|
70
|
+
|
|
71
|
+
Collect each invocation's `RUN_ID` and surface them in the final summary.
|
|
72
|
+
|
|
73
|
+
- **[p]:** Filter to `priority === 'p0'` scenarios, then proceed as [Y] above (use `--grep` per owner ticket).
|
|
74
|
+
|
|
75
|
+
- **[s]:** Show numbered list with checkboxes; let the user pick a subset. Proceed as [Y] using the selected subset for the `--grep` regex.
|
|
68
76
|
|
|
69
77
|
## Step 5 — Recommend follow-up
|
|
70
78
|
|
package/xera-run.md
CHANGED
|
@@ -22,7 +22,7 @@ If meta is missing or story_hash is older, refresh.
|
|
|
22
22
|
|
|
23
23
|
After `/xera-fetch` completes, check whether this ticket modifies areas that other tests depend on.
|
|
24
24
|
|
|
25
|
-
Read `xera.config.run.autoImpact` (defaults: `{ enabled: true, threshold:
|
|
25
|
+
Read `xera.config.run.autoImpact` (defaults: `{ enabled: true, threshold: 8.0 }`). If `enabled === false`, SKIP this step.
|
|
26
26
|
|
|
27
27
|
Run:
|
|
28
28
|
|
|
@@ -32,14 +32,12 @@ bun run xera:impact-prepare {{TICKET}} --quiet
|
|
|
32
32
|
|
|
33
33
|
This writes `.xera/impact/{{TICKET}}.json` (no markdown). Exit code 2 means the ticket is not yet in graph — surface a warning and proceed (graph data only accumulates over time).
|
|
34
34
|
|
|
35
|
-
Read the JSON. Count scenarios with `riskScore >= autoImpact.threshold
|
|
35
|
+
Read the JSON. Count scenarios with `riskScore >= autoImpact.threshold` (default **8.0** per v0.6.4).
|
|
36
36
|
|
|
37
|
-
If
|
|
37
|
+
- If **0** scenarios above threshold → continue **silently** to Step 2. Do not show any prompt; do not log the result. The impact analysis ran but found nothing actionable.
|
|
38
|
+
- If **≥1** above threshold → prompt the user as before: `[Y]es / [n]o / [details]`.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
{{N}} high-risk impacted scenarios detected for {{TICKET}}.
|
|
41
|
-
Re-run them before generating the new script? [Y/n/details]
|
|
42
|
-
```
|
|
40
|
+
This means the auto-trigger is effectively a "high-risk alarm" rather than a per-run interruption. With the default threshold raised to 8.0, prompts only fire for tickets that genuinely affect P0 scenarios in heavily-shared SUT areas. Teams that want the older, chatty behavior can lower the threshold via `xera.config.run.autoImpact.threshold`.
|
|
43
41
|
|
|
44
42
|
- **[Y]:** Iterate `bun run xera:exec <owner-ticket>` for each unique owner ticket. After each, check status; if all pass, continue to Step 2. If any fail, surface the failure and STOP — the user should diagnose existing-test breakage before introducing more changes.
|
|
45
43
|
- **[n]:** Continue to Step 2.
|
package/xera-script.md
CHANGED
|
@@ -12,7 +12,19 @@ The user invoked `/xera-script <TICKET>`. If no key, ask.
|
|
|
12
12
|
|
|
13
13
|
3. List existing shared POMs by reading `shared/page-objects/` (every `.ts` file, parse exported class names). Pass this list to yourself as context for reuse decisions.
|
|
14
14
|
|
|
15
|
-
4. Read
|
|
15
|
+
4. Read `.xera/{{TICKET}}/meta.json` to get the adapter (`adapter` field). Then read the appropriate prompt template:
|
|
16
|
+
|
|
17
|
+
- If `adapter === "web"` (or missing): use `node_modules/@xera-ai/prompts/script-from-feature-web.md`.
|
|
18
|
+
- If `adapter === "http"`: use `node_modules/@xera-ai/prompts/script-from-feature-http.md`.
|
|
19
|
+
|
|
20
|
+
Follow that prompt's hard rules.
|
|
21
|
+
|
|
22
|
+
When `adapter === "http"` AND `xera.config.ts` has `http.spec` configured, additionally:
|
|
23
|
+
- Load the OpenAPI spec at `http.spec` (path or URL).
|
|
24
|
+
- Find the operation referenced by the failing Gherkin step (matching method + path).
|
|
25
|
+
- Pass the dereferenced operation schema to your generation context as the `openapi` input.
|
|
26
|
+
|
|
27
|
+
When `adapter === "http"` and no `http.spec`: pass `openapi: null` to your generation context.
|
|
16
28
|
|
|
17
29
|
5. Before reading the test.feature + story.md content into your generation context, mint a fresh per-invocation nonce by running:
|
|
18
30
|
|