@xera-ai/skills 0.4.1 → 0.4.2
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 +3 -2
- package/xera-impact.md +82 -0
- package/xera-run.md +29 -0
package/package.json
CHANGED
package/version.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skills": "0.4.
|
|
2
|
+
"skills": "0.4.2",
|
|
3
3
|
"compatible_prompts": "^2.3.0",
|
|
4
4
|
"skill_files": [
|
|
5
5
|
"xera-run.md",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"xera-script.md",
|
|
9
9
|
"xera-exec.md",
|
|
10
10
|
"xera-report.md",
|
|
11
|
-
"xera-promote.md"
|
|
11
|
+
"xera-promote.md",
|
|
12
|
+
"xera-impact.md"
|
|
12
13
|
]
|
|
13
14
|
}
|
package/xera-impact.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: xera-impact
|
|
3
|
+
description: Pre-flight impact analysis. Given a ticket, identify scenarios that may be affected by its changes (graph-walk via project knowledge graph), then optionally re-run them. Use before merging or when AC has just changed for a ticket. Available v0.6.2+.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The user invoked `/xera-impact <TICKET> [--depth 1|2|3] [--min-priority p0|p1|p2]`. If no key, ask.
|
|
7
|
+
|
|
8
|
+
This skill walks the project knowledge graph (`.xera/graph/`) to find scenarios that depend on the modified areas of `<TICKET>`. It does NOT re-fetch or re-script — it's strictly a query + optional re-execution.
|
|
9
|
+
|
|
10
|
+
## Step 1 — Verify graph snapshot is fresh
|
|
11
|
+
|
|
12
|
+
Run:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
bun run xera:graph-snapshot --check
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If stale, the subcommand auto-rebuilds. If `<TICKET>` is not in the graph, this step will succeed but Step 2 will exit with code 2 — that means you must run `/xera-fetch {{TICKET}}` first.
|
|
19
|
+
|
|
20
|
+
## Step 2 — Compute impact
|
|
21
|
+
|
|
22
|
+
Run:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bun run xera:impact-prepare {{TICKET}} [--depth N] [--min-priority P]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Pass through any flags the user provided. On exit code 2, surface: *"Ticket {{TICKET}} not in graph — run `/xera-fetch {{TICKET}}` first"* and STOP.
|
|
29
|
+
|
|
30
|
+
The subcommand writes:
|
|
31
|
+
- `.xera/impact/{{TICKET}}.json` (machine-readable)
|
|
32
|
+
- `.xera/impact/{{TICKET}}.md` (human-readable)
|
|
33
|
+
|
|
34
|
+
## Step 3 — Display summary
|
|
35
|
+
|
|
36
|
+
Read `.xera/impact/{{TICKET}}.json`. If `scenarios.length === 0`, show:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Impact analysis for {{TICKET}} → no prior scenarios in modified areas
|
|
40
|
+
(this is normal for new feature areas; nothing to re-run)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
And STOP.
|
|
44
|
+
|
|
45
|
+
Otherwise, count scenarios in 3 score buckets (high ≥7.0, medium ≥4.0, low <4.0). Display:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Impact analysis for {{TICKET}} → .xera/impact/{{TICKET}}.md
|
|
49
|
+
|
|
50
|
+
N scenarios impacted (H high · M medium · L low)
|
|
51
|
+
|
|
52
|
+
Top 3:
|
|
53
|
+
<ticketId> / "<name>" [Pn] <score> <edge-summary>
|
|
54
|
+
...
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Step 4 — Prompt re-run
|
|
58
|
+
|
|
59
|
+
Ask the user: `Re-run impacted scenarios? [Y]es / [p] P0 only / [s]elect / [n]o`
|
|
60
|
+
|
|
61
|
+
- **[n]:** STOP. The user can inspect `.xera/impact/{{TICKET}}.md` separately.
|
|
62
|
+
|
|
63
|
+
- **[Y]:** Group impacted scenarios by their owner ticket (`scenario.ticketId`). For each owner ticket, invoke `bun run xera:exec <owner-ticket>` (the existing exec subcommand). Collect the `RUN_ID` from each. Note: this re-runs the ENTIRE spec for each impacted owner, not just the impacted scenarios — Playwright doesn't natively support per-test selection from a json list without test-name regex. Acceptable for v0.6.2; precise per-scenario selection is a v0.6.x patch.
|
|
64
|
+
|
|
65
|
+
- **[p]:** Filter `scenarios` array to `priority === 'p0'` only, then proceed as [Y].
|
|
66
|
+
|
|
67
|
+
- **[s]:** Show numbered list with checkboxes; let the user pick. Then proceed as [Y] with the selected subset.
|
|
68
|
+
|
|
69
|
+
## Step 5 — Recommend follow-up
|
|
70
|
+
|
|
71
|
+
After exec runs complete, recommend:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
{{N}} owner tickets re-run. Run `/xera-report {{TICKET}}` next to classify failures
|
|
75
|
+
(TEST_OUTDATED detection will flag failures caused by THIS ticket's AC change).
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Edge cases
|
|
79
|
+
|
|
80
|
+
- If `xera:impact-prepare` exits non-zero for any reason other than 2 (e.g. graph corrupted), surface the stderr and STOP.
|
|
81
|
+
- If a re-run via `xera:exec` fails non-recoverably, continue with remaining tickets but note the failure in the final summary.
|
|
82
|
+
- Respect `xera.config.run.autoImpact.enabled = false` — skip this skill if invoked recursively from `/xera-run` and config disables it.
|
package/xera-run.md
CHANGED
|
@@ -18,6 +18,35 @@ Follow the same instructions as `xera-fetch.md`, but never prompt the user about
|
|
|
18
18
|
|
|
19
19
|
If meta is missing or story_hash is older, refresh.
|
|
20
20
|
|
|
21
|
+
## Step 1.5 — Auto-trigger impact analysis (v0.6.2)
|
|
22
|
+
|
|
23
|
+
After `/xera-fetch` completes, check whether this ticket modifies areas that other tests depend on.
|
|
24
|
+
|
|
25
|
+
Read `xera.config.run.autoImpact` (defaults: `{ enabled: true, threshold: 6.0 }`). If `enabled === false`, SKIP this step.
|
|
26
|
+
|
|
27
|
+
Run:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
bun run xera:impact-prepare {{TICKET}} --quiet
|
|
31
|
+
```
|
|
32
|
+
|
|
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
|
+
|
|
35
|
+
Read the JSON. Count scenarios with `riskScore >= autoImpact.threshold`. If 0, no prompt — continue silently to Step 2.
|
|
36
|
+
|
|
37
|
+
If ≥1 high-risk scenario, prompt the user:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
{{N}} high-risk impacted scenarios detected for {{TICKET}}.
|
|
41
|
+
Re-run them before generating the new script? [Y/n/details]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- **[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
|
+
- **[n]:** Continue to Step 2.
|
|
46
|
+
- **[details]:** Suggest the user run `/xera-impact {{TICKET}}` interactively for full details, then ask again.
|
|
47
|
+
|
|
48
|
+
Non-fatal: if `xera:impact-prepare` itself exits abnormally, log the warning but continue to Step 2 — graph features are advisory, not gating.
|
|
49
|
+
|
|
21
50
|
## Step 2 — Feature
|
|
22
51
|
|
|
23
52
|
Follow `xera-feature.md`. If `feature_generated_from_story_hash !== story_hash`, regenerate. If unchanged AND spec.ts exists, skip feature generation entirely.
|