@ia-qa/self-healing 1.6.6 → 1.6.7
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 +24 -2
- package/TUTORIAL.md +26 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,29 @@ One command. `ia-qa-heal run` runs your suite, watches it break, diffs the live
|
|
|
16
16
|
|
|
17
17
|
*Real commands against a live site, real stdout — only the typing speed is synthesised.*
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Easiest start — have your agent set it up
|
|
20
|
+
|
|
21
|
+
If you already work with Claude Code, Cursor, Copilot or another coding agent, don't configure this
|
|
22
|
+
by hand. Paste this to it:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
Install and set up @ia-qa/self-healing in this project.
|
|
26
|
+
1. First run `npx -y -p @ia-qa/self-healing ia-qa-heal skill --print` and follow it.
|
|
27
|
+
That output is the authoritative doc — do not guess any command or flag from memory.
|
|
28
|
+
2. Register the MCP server so you can drive it yourself:
|
|
29
|
+
command `npx`, args ["-y", "-p", "@ia-qa/self-healing", "ia-qa-heal-mcp"].
|
|
30
|
+
3. Read my e2e tests and my router, propose the page list for .ia-qa/config.json,
|
|
31
|
+
and wait for me to confirm before mapping anything.
|
|
32
|
+
4. Then explain to me, in five lines: what map / baseline / diff / fix each do,
|
|
33
|
+
and which locators you will never rewrite without asking me.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Step 1 matters more than it looks: this package is newer than most models' training data, so an agent
|
|
37
|
+
left to improvise will invent flags that don't exist. `skill --print` hands it the real instructions —
|
|
38
|
+
including [the four prohibitions](#working-with-an-ai-agent--ia-qa-heal-skill) — before it touches
|
|
39
|
+
anything. Step 4 is how you check it actually read them instead of guessing.
|
|
40
|
+
|
|
41
|
+
## Quick start — by hand
|
|
20
42
|
|
|
21
43
|
```bash
|
|
22
44
|
npx -y -p @ia-qa/self-healing ia-qa-heal init # wizard → .ia-qa/config.json
|
|
@@ -37,7 +59,7 @@ npx ia-qa-heal init
|
|
|
37
59
|
|
|
38
60
|
An agent that asks a browser where a button went is doing by hand what `.ia-qa/mapping/*.json` already answers offline: every interactive element's **role, accessible name and selector**, captured. A `link` the suite still calls a `button` shows up in one `grep`.
|
|
39
61
|
|
|
40
|
-
`ia-qa-heal skill` installs that reflex — plus the rules that must not be broken — as a skill your agent loads:
|
|
62
|
+
`ia-qa-heal skill` installs that reflex — plus the rules that must not be broken — as a skill your agent loads (this is what step 1 of the [paste-block above](#easiest-start--have-your-agent-set-it-up) makes it read):
|
|
41
63
|
|
|
42
64
|
```bash
|
|
43
65
|
ia-qa-heal skill # where it would go, and whether it is current — writes nothing
|
package/TUTORIAL.md
CHANGED
|
@@ -83,7 +83,30 @@ Whatever it uses, it tells you: `Browser: system browser (channel "chrome")`.
|
|
|
83
83
|
|
|
84
84
|
*Use this if you have Claude Code, Claude Desktop, Cursor, or another MCP-compatible agent. You'll talk to your app in plain English.*
|
|
85
85
|
|
|
86
|
-
### Step 4.
|
|
86
|
+
### Step 4.0 — The shortcut: let your agent do the whole setup
|
|
87
|
+
|
|
88
|
+
The steps below are the manual version. If your agent can edit files in your project (Claude Code, Cursor, Copilot in your IDE), just paste this to it and skip straight to step 4.4 below:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
Install and set up @ia-qa/self-healing in this project.
|
|
92
|
+
1. First run `npx -y -p @ia-qa/self-healing ia-qa-heal skill --print` and follow it.
|
|
93
|
+
That output is the authoritative doc — do not guess any command or flag from memory.
|
|
94
|
+
2. Register the MCP server so you can drive it yourself:
|
|
95
|
+
command `npx`, args ["-y", "-p", "@ia-qa/self-healing", "ia-qa-heal-mcp"].
|
|
96
|
+
3. Read my e2e tests and my router, propose the page list for .ia-qa/config.json,
|
|
97
|
+
and wait for me to confirm before mapping anything.
|
|
98
|
+
4. Then explain to me, in five lines: what map / baseline / diff / fix each do,
|
|
99
|
+
and which locators you will never rewrite without asking me.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Two things to know about that prompt, because they are the difference between it working and it wasting your afternoon:
|
|
103
|
+
|
|
104
|
+
- **Step 1 is not optional politeness.** This package is newer than most models' training data. An agent left to improvise invents flags that don't exist, they fail, and you conclude the tool is broken. `skill --print` hands it the real instructions — including the four things it must never do on its own — before it touches anything.
|
|
105
|
+
- **Step 4 is your check.** If the five-line explanation is vague or mentions a verb that isn't `map`, `baseline`, `diff` or `fix`, it didn't read the skill. Tell it to run step 1 again.
|
|
106
|
+
|
|
107
|
+
You will still have to **restart your agent** (step 4.2 below) after it writes the MCP config — it can't load a server it registered mid-conversation.
|
|
108
|
+
|
|
109
|
+
### Step 4.1 — Add the tool to your agent (manual)
|
|
87
110
|
|
|
88
111
|
Find your agent's MCP config file and add the `ia-qa-self-healing` block below.
|
|
89
112
|
|
|
@@ -134,6 +157,8 @@ Then point the config at the built file (use the **absolute** path):
|
|
|
134
157
|
|
|
135
158
|
### Step 4.1b — Teach your agent how to use it (recommended)
|
|
136
159
|
|
|
160
|
+
*Skip this if you used step 4.0 — that prompt already made your agent do it.*
|
|
161
|
+
|
|
137
162
|
The MCP block above gives your agent four *tools*. It does not give it the **judgment** to use them: when to read the contract instead of opening a browser, which verb answers which question, and — most importantly — which locators it must never rewrite on its own.
|
|
138
163
|
|
|
139
164
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ia-qa/self-healing",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"description": "Local-first self-healing for UI tests: a local MCP server + CLI that map your app's pages to a role/name/selector contract, diff selector drift (PASS/FIX/BLOCK), and apply deterministic fixes to Cypress/Playwright/Selenium tests. Runs on your machine — nothing leaves it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"self-healing",
|