@vijaypjavvadi/bdd2pw 4.3.2 → 4.4.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/CHANGELOG.md CHANGED
@@ -9,6 +9,147 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  _Nothing yet._
11
11
 
12
+ ## [4.4.0] — 2026-09-26
13
+
14
+ ### Theme: legible provenance — which lane, which rule, which pack
15
+
16
+ v4.3 made the LLM fallback safe (governance sidecar, cache, three
17
+ providers, in-process healing). v4.4 makes it **legible**. A reader
18
+ of a generated suite should be able to tell — per scenario, per
19
+ step — where each line came from: a deterministic rule (with which
20
+ rule id and which pack), the LLM fallback (with which provider and
21
+ which model), or a person's hand-edit.
22
+
23
+ Two new CLIs land here:
24
+
25
+ - `bdd2pw quarantine-stats <repo>` splits the suite into a trusted
26
+ lane (only rule-bound scenarios) and a review lane (`@llm-generated`
27
+ scenarios) and reports both. Slice 1.
28
+ - `bdd2pw coverage <repo>` turns the same provenance data into
29
+ decisions — which rules earned their place in the table, which
30
+ packs pulled their weight, which locators keep needing to heal.
31
+ Slice 2.
32
+
33
+ Both write JSON sidecars (`artefacts/quarantine-stats.json`,
34
+ `artefacts/coverage.json`) with a shared shape on the fields they
35
+ have in common, so a dashboard can consume either without switching
36
+ schemas. Both are reports, not gates — they exit non-zero only on a
37
+ real I/O error against the repo root.
38
+
39
+ ### Added — `--spec-name <stem>` for consumer-controlled spec filenames
40
+
41
+ Upstream consumers (attestqa, custom orchestrators) that keep one
42
+ feature file per epic and expect `tests/<feature-stem>.spec.ts`
43
+ regardless of which POM the feature targets can now override the
44
+ emitted spec filename.
45
+
46
+ ```bash
47
+ bdd2pw scaffold features/epic-scrum-5-customer-account-access.feature \
48
+ --url https://... \
49
+ --page LoginPage \
50
+ --repo ./out \
51
+ --spec-name epic-scrum-5-customer-account-access
52
+ # → tests/epic-scrum-5-customer-account-access.spec.ts
53
+ ```
54
+
55
+ Programmatic API: `ScaffoldOptions.specName?: string`. When set, the
56
+ spec file is written to `tests/<specName>.spec.ts` and the
57
+ `*.spec.meta.json` sidecar follows the same stem. The POM filename,
58
+ class name, and `../pages/<pomStem>` import path are unaffected.
59
+
60
+ Trailing `.spec.ts` / `.spec` suffixes are tolerated so callers can
61
+ pass either form. Empty / whitespace-only values fall back to the
62
+ historical POM-derived default. Default behavior (`specName` unset
63
+ or omitted) is byte-identical to v4.3 — zero risk to existing users.
64
+
65
+ ### Added — Slice 1: LLM quarantine lane
66
+
67
+ - **`@llm-generated` scenario tag.** Any scenario whose emission
68
+ used the LLM for at least one step is emitted with the tag next to
69
+ its existing tags. That's all the wiring needed to filter runs
70
+ with Playwright's own `--grep-invert @llm-generated` (trusted lane)
71
+ or `--grep @llm-generated` (review lane).
72
+ - **Per-step provenance in `*.spec.meta.json`.** Rule-bound steps
73
+ carry `"rule": { "ruleId", "pack"? }`. LLM-bound steps carry
74
+ `"rule": null` plus `"llm": { provider, model, cached, governance,
75
+ at }`. Nothing about a scenario's binding is guessed from text
76
+ anymore; it's recorded at the source.
77
+ - **`bdd2pw quarantine-stats <repo>` CLI.** Reports per feature and
78
+ per repo: scenarios (total / `@llm-generated` / deterministic),
79
+ steps (by rule / by LLM), LLM cache-hit share, and promotions
80
+ (candidate step-texts recorded in `candidate-rules.jsonl` that
81
+ are no longer LLM-bound because a rule now covers them). `--json`
82
+ for CI, human table by default.
83
+
84
+ ### Added — Slice 2: Rule + pack coverage
85
+
86
+ - **`bdd2pw coverage <repo>` CLI.** Reads sidecars +
87
+ `candidate-rules.jsonl` + `heal-events.jsonl` (both v4.2
88
+ `artefacts/` and v4.3 `.pwheal/` locations). Reports:
89
+ - **rule hit rate** — per rule, how many steps it bound, plus up
90
+ to 3 sample step texts.
91
+ - **dead rules** — every registry rule that did NOT fire in this
92
+ repo. Repo-scoped observation, not a global verdict.
93
+ - **per-pack hit rate** — which domain packs pulled their weight;
94
+ packs whose rules all died appear under `packs.dead`.
95
+ - **promotion trail** — same shape as `quarantine-stats.promotions`.
96
+ - **heal pressure** — top locators from the heal-events log; a
97
+ rule that binds and then always needs healing is worse than no
98
+ rule.
99
+ - **`--suggest-retire`** prints a copyable stanza listing dead
100
+ packs and dead rules. Never edits `stepMatcher.ts` or any config.
101
+ - **`--domains <list>`** matches the scaffold's flag so the
102
+ ruleId ↔ pack mapping the coverage report uses agrees with what
103
+ the sidecar would have written.
104
+ - **Cross-report agreement** — `coverage.totals` and
105
+ `coverage.promotions` are byte-identical to the same-named blocks
106
+ in `quarantine-stats.json` on the same repo. Locked by a property
107
+ test.
108
+
109
+ ### Added — provenance surface (foundation for both slices)
110
+
111
+ - **`StepBinding.provenance?: { source: "rule" \| "llm", ... }`.**
112
+ New optional field on the internal binding shape. Rule provenance
113
+ carries `ruleId` (matches `ruleIdFor()` — e.g. `"rule-14"`,
114
+ `"domain-03"`) and `pack` when the rule is domain-scoped. LLM
115
+ provenance carries provider / model / cached / governance / at.
116
+ - **`matchStep()` decorates every rule-produced binding** with its
117
+ ruleId + pack on the way out. No rule build() callback had to
118
+ change.
119
+ - **`llmStepMatcher.matchStepWithLLM` and `matchScenarioWithLLM`
120
+ decorate every LLM binding** (both per-step and batch paths)
121
+ with the same shape. The candidate-rules writer's hard-coded
122
+ `provider: "anthropic"` is fixed — it now reflects the actual
123
+ client used.
124
+ - **`LLMClient.providerName()` + `governanceSkipped()`** accessors
125
+ on the client interface, implemented for all three providers
126
+ (Anthropic, OpenAI, Gemini). Optional for backwards compat.
127
+ - **`listAllRuleIds()`** — new public export from
128
+ `transformers/stepMatcher.ts`. Returns the ordered registry list
129
+ (core + active domain packs) so the coverage CLI can compute the
130
+ dead-rule set.
131
+
132
+ ### Added — tests
133
+
134
+ - 7-case vitest suite in `tests/unit/v440QuarantineLane.test.ts`
135
+ covering all five Slice 1 acceptance criteria plus a malformed-
136
+ sidecar bonus.
137
+ - 5-case vitest suite in `tests/unit/v440Coverage.test.ts` covering
138
+ all four Slice 2 acceptance criteria plus a heal-pressure sort case.
139
+ - 6-case Node.js smoke runner in `scripts/smoke-v440-quarantine.mjs`.
140
+ - 5-case Node.js smoke runner in `scripts/smoke-v440-coverage.mjs`.
141
+
142
+ ### No breaking changes
143
+
144
+ Additive-only. Users NOT using `--llm` see identical scaffold output
145
+ to v4.3 (no provenance block, no `@llm-generated` tag, no `llm`
146
+ entries in the sidecar). Users NOT calling `quarantine-stats` or
147
+ `coverage` see no change. Existing consumers of the meta-sidecar
148
+ tolerate the new optional `rule` and `llm` fields; the shape is
149
+ strictly a superset of v4.3.
150
+
151
+ Slice 3 (mobile dialect domain pack) moves to v4.5.0.
152
+
12
153
  ## [4.3.2] — 2026-09-18
13
154
 
14
155
  ### Fixed
package/README.md CHANGED
@@ -25,7 +25,7 @@ Most teams writing BDD test cases (via Cucumber `.feature` files, possibly autho
25
25
 
26
26
  Point it at a `.feature` file and a URL. It parses the Gherkin, scans the live page with Chromium, picks the most stable locator for every interactive element, matches each step to a POM method call, and emits a runnable Playwright TypeScript repo — including `playwright.config.ts`, `pages/login.page.ts`, `tests/login.spec.ts`, and a `BDD_REVIEW.md` listing anything a human still needs to look at.
27
27
 
28
- ## What `bdd2pw` is and isn't (as of v4.3.0)
28
+ ## What `bdd2pw` is and isn't (as of v4.4.0)
29
29
 
30
30
  `bdd2pw` is a **deterministic scaffolder with an optional governed LLM fallback across three providers**. The output is honest about its limits:
31
31
 
@@ -41,6 +41,7 @@ Point it at a `.feature` file and a URL. It parses the Gherkin, scans the live p
41
41
  - **Six-pattern LLM-binding rewriter** (v4.1) — mechanically transforms common LLM emission mistakes (invented-helper shapes, bare-field args, unquoted string values, CSS-selector args, `page.<method>` invented-helpers in customBody, Locator-only matchers hallucinated on `page`, bare-identifier assertion locators) into valid Playwright-idiomatic code. Runs *before* the v4.0.1 gates; if a rewrite would still produce broken code, the binding is rejected and lands as TODO. Bench result: 3/8 → **8/8 apps produce specs that pass `tsc --noEmit`**. Locked by 35 unit tests.
42
42
  - **DOM-drift detection via POM header hash** (v4.2) — every emitted POM carries a `@bdd2pw dom-hash` comment with a stable sha256 of the page's accessibility tree. On re-scaffold, bdd2pw diffs the new snapshot against the stored hash. Silent UI changes surface as a `DOM DRIFT` warning in `BDD_REVIEW.md` with both hashes and a suggested triage path. `--fail-on-drift` turns it into a non-zero exit code so CI can gate merges on silent UI regressions.
43
43
  - **In-process self-healing locators via `@vijaypjavvadi/pw-self-heal`** (v4.3) — `--self-healing` emits a 3-line `tests/fixtures.ts` that wraps the base `test` with `withSelfHealing({ mode })`. Every spec's top-of-file import auto-rewrites to pull `test` + `expect` from `./fixtures` instead of `@playwright/test` directly. POM classes are unchanged; healing is transparent. Ranker: trained ONNX model with a published Zenodo DOI ([10.5281/zenodo.19684439](https://doi.org/10.5281/zenodo.19684439)), GB AUC 0.9993, three modes (`heuristic` / `ml` / `hybrid`). No server, no API key, no Python — the DOM never leaves the machine.
44
+ - **Legible provenance — `@llm-generated` tag + rule attribution + two report CLIs** (v4.4) — every emitted step records which rule (or which LLM provider + model) produced it in `*.spec.meta.json`. A scenario with an LLM-bound step gets the `@llm-generated` tag so `npx playwright test --grep-invert @llm-generated` runs the trusted lane. `bdd2pw quarantine-stats` reports scenarios / steps / cache-hit share / promotions per lane. `bdd2pw coverage` turns the same data into decisions: rule hit rate, dead rules, dead packs, promotion trail (candidate → rule → firing), and heal pressure. Both write JSON sidecars with a shared shape. Both are reports, not gates.
44
45
  - **Data-driven scaffolds** (v4.0.0) — `--data <path>` injects CSV / JSON / XLSX rows into every Scenario Outline's `Examples:` table; `--gen-data --schema <path> --rows N` generates synthetic rows via Faker + optional per-column LLM calls (`llm:auto insurance claim description`); seeded (`--seed 42`) for reproducibility.
45
46
  - **`updatePom` is append-only by construction.** Re-scanning a page that already has a Page Object adds new locators only. Hand-edited method bodies, custom helper methods, custom imports are all preserved byte-identical.
46
47
  - **`--merge` mode** (v3.2) preserves `// bdd2pw:user-block id="..."` sections across regenerations so iterative locator tuning doesn't lose work.
@@ -121,6 +122,62 @@ bdd2pw scaffold ./my.feature \
121
122
 
122
123
  Every successful LLM-binding is appended to `<repo>/artefacts/candidate-rules.jsonl` so an offline review pipeline can propose new deterministic rules. Auto-write back to `stepMatcher.ts` is deferred to v2.1+ — for v2.0 the LLM is a runtime overlay, never a code generator for the matcher itself.
123
124
 
125
+ ### Two-lane runs — trusted vs review (v4.4+)
126
+
127
+ A scenario in which at least one step was bound by the LLM fallback is emitted with a `@llm-generated` tag next to its existing tags. That lets Playwright's own `--grep`/`--grep-invert` filter split every run into two lanes with zero framework wiring:
128
+
129
+ ```bash
130
+ # Trusted lane — only scenarios whose every step was rule-bound
131
+ npx playwright test --grep-invert @llm-generated
132
+
133
+ # Review lane — only the scenarios that used the LLM fallback
134
+ npx playwright test --grep @llm-generated
135
+ ```
136
+
137
+ Per-step provenance lives in the sidecar `<spec>.spec.meta.json` next to the emitted spec. LLM-bound steps carry `"rule": null` plus an `"llm": { provider, model, cached, governance, at }` block; rule-bound steps carry neither field. Everything the tag hides at scenario level is inspectable at step level.
138
+
139
+ Aggregate a scaffolded repo with:
140
+
141
+ ```bash
142
+ npx bdd2pw quarantine-stats ./my-tests # table + writes artefacts/quarantine-stats.json
143
+ npx bdd2pw quarantine-stats ./my-tests --json # machine-readable, same shape as the file
144
+ ```
145
+
146
+ Sample table output:
147
+
148
+ ```
149
+ scenarios: 24 total · 21 deterministic · 3 @llm-generated
150
+ steps: 58 total · 55 by rule · 3 by LLM
151
+ LLM cache hit share: 66.7%
152
+
153
+ promotions: 2/9 candidate step(s) now rule-bound
154
+ ```
155
+
156
+ The `promotions` line is the story: candidate step-texts recorded in `artefacts/candidate-rules.jsonl` from earlier runs that no longer need the LLM because a deterministic rule now covers them. That number going up is the point of running the LLM at all — a scaffold, then a rule, then no LLM.
157
+
158
+ `quarantine-stats` is a report, not a gate. It exits 0 on every clean read and only fails with a non-zero code on a real I/O error against the repo root. Wire it into your CI dashboard, don't wire it into your merge gate.
159
+
160
+ ### Rule + pack coverage (v4.4+)
161
+
162
+ Slice 1 tells you which lane a step is in. Coverage tells you which rules earned their place in the table:
163
+
164
+ ```bash
165
+ npx bdd2pw coverage ./my-tests --domains banking,retail
166
+ npx bdd2pw coverage ./my-tests --json
167
+ npx bdd2pw coverage ./my-tests --suggest-retire
168
+ ```
169
+
170
+ The report answers four things:
171
+
172
+ - **rule hit rate** — for every rule that fired, how many steps it bound, plus up to 3 sample step texts.
173
+ - **dead rules / dead packs** — every rule in the current registry that did NOT fire in this repo, and every domain pack whose rules were all dead. "Dead here" is a repo-scoped observation, not a global verdict on the rule.
174
+ - **promotion trail** — same field as `quarantine-stats`. Candidate steps recorded by past LLM fallbacks that are now bound by a rule.
175
+ - **heal pressure** — top locators from `artefacts/heal-events.jsonl` (or `.pwheal/heal-events.jsonl` when running with the v4.3 in-process healer). A rule that binds and then always needs healing is worse than no rule.
176
+
177
+ `--suggest-retire` prints a copyable stanza listing the dead packs and dead rules; it never edits `stepMatcher.ts` or your bdd2pw config. Paste the parts you want to apply.
178
+
179
+ The `totals` and `promotions` blocks in `coverage.json` are byte-identical to the same-named blocks in `quarantine-stats.json`, so a dashboard reading either one gets the same numbers.
180
+
124
181
  ### Governance sanitization (mandatory by default)
125
182
 
126
183
  Per the platform contract, **every prompt passes through the `ai-governance` sidecar's `/sanitize` endpoint** before reaching Anthropic. This scrubs API keys, JWTs, AWS creds, and other secrets that might leak via test data in the `.feature` file. **Fail-closed** — if the sidecar is unreachable, the LLM call is REFUSED and the step falls back to TODO.
@@ -368,20 +425,19 @@ output/
368
425
  | v4.0.1 | LLM hallucination gates | Three-layer rejector for invented POM helpers — bindings that would compile-fail land as TODO instead of broken code. 19 unit tests lock the behaviour. |
369
426
  | v4.1.0 | LLM binding rewriter | Six-pattern rewriter that mechanically fixes common LLM emission mistakes (invented helpers, bare-field args, CSS-selector args, `page.<method>` in customBody, hallucinated Page matchers, bare-identifier assertion locators). Bench result: 3/8 → **8/8 apps produce specs that pass `tsc --noEmit`**. Peer-reviewed publication in Elsevier SoftwareX. |
370
427
  | v4.2.0 | DOM-drift detection | Every emitted POM carries a `@bdd2pw dom-hash` header (sha256 of the accessibility tree). Re-scaffold diffs against the stored hash and surfaces silent UI changes in `BDD_REVIEW.md`. `--fail-on-drift` CLI flag exits non-zero when drift is detected (CI merge gate). |
371
- | **v4.3.0 (current)** | pw-self-heal integration | `--self-healing` swaps the v4.2 lib/heal.ts + external service shim for `@vijaypjavvadi/pw-self-heal` — trained ONNX ranker (Zenodo DOI 10.5281/zenodo.19684439), in-process, no server. Emits a 3-line `tests/fixtures.ts`; POM classes unchanged. `--legacy-healing` keeps v4.2 behaviour for one release. |
428
+ | v4.3.0 | pw-self-heal integration | `--self-healing` swaps the v4.2 lib/heal.ts + external service shim for `@vijaypjavvadi/pw-self-heal` — trained ONNX ranker (Zenodo DOI 10.5281/zenodo.19684439), in-process, no server. Emits a 3-line `tests/fixtures.ts`; POM classes unchanged. `--legacy-healing` keeps v4.2 behaviour for one release. |
429
+ | **v4.4.0 (current)** | Legible provenance | `@llm-generated` scenario tag + rule/pack attribution recorded in `*.spec.meta.json`. Two report CLIs: `bdd2pw quarantine-stats` splits the suite into trusted vs review lanes; `bdd2pw coverage` reports rule hit rate, dead rules, dead packs, promotion trail, and heal pressure. Reports, not gates. |
372
430
 
373
431
  ### Next 6 months (Oct 2026 → Mar 2027, ~1 release/month)
374
432
 
375
433
  | Target | Version | Theme | Headline |
376
434
  |---|---|---|---|
377
- | Oct 2026 | **v4.4.0** | LLM quarantine lane | `@llm-generated` Playwright tag on every LLM-derived scenario + `bdd2pw quarantine-stats` CLI that reports pass rate for the LLM-fallback lane separately from the deterministic lane. Teams can filter runs with `--grep-invert @llm-generated` for a "trusted only" execution. |
378
- | Nov 2026 | **v4.5.0** | sel2pw merge | sel2pw migrated onto `@vijaypjavvadi/pw-emit` — three packages share one emitter. All future emitter improvements automatically flow to Selenium users. |
379
- | Oct 2026 | **v4.5.0** | Auto-rules | `bdd2pw apply-proposals --interactive` — walks the human through each v3.6 proposal, validates the regex compiles + matches the sample texts, optionally appends to `stepMatcher.ts`. Closes the propose-rules loop. |
380
- | Nov 2026 | **v4.6.0** | Domain packs | Three more opt-in packs: **fintech** (KYC, AML, trading desks), **real-estate** (MLS, listings, escrow), **hospitality** (PMS, reservations, OTA). ~60 more rules. |
381
- | Nov 2026 | **v4.7.0** | API v2 | WebSocket assertion rules, multipart file-upload patterns, GraphQL query / mutation / subscription rules. Extends v3.0's API testing surface. |
382
- | Dec 2026 | **v4.8.0** | Coverage analyzer | `bdd2pw coverage` CLI: which deterministic rules fired on which features across a fleet, per-pack hit rate, dead-rule report, suggestion to retire unused rules. |
383
- | Jan 2027 | **v4.9.0** | CI/CD templates | Optional scaffolder output: GitHub Actions / GitLab CI / Azure Pipelines / CircleCI starter workflows wired to run the generated specs. Opt-in via `--ci <provider>`. |
384
- | Feb 2027 | **v5.0.0** | Mobile dialect | Touch / swipe / scroll-into-view rules + responsive viewport assertions. Reuses the same emitter pipeline; opt-in via `domains: ["mobile"]`. Bumps to v5 alongside a small set of default flips (llm-stats + healing become opt-out). Migration guide ships alongside. |
435
+ | Oct 2026 | **v4.5.0** | Mobile dialect | New `mobile` domain pack. Touch / swipe / scroll-into-view rules + responsive viewport assertions. Reuses the existing emitter pipeline; opt-in via `domains: ["mobile"]`. Scenarios tagged `@mobile` scaffold against a mobile device descriptor (Pixel 7 by default). |
436
+ | Nov 2026 | **v4.6.0** | sel2pw merge | sel2pw migrated onto `@vijaypjavvadi/pw-emit` — three packages share one emitter. All future emitter improvements automatically flow to Selenium users. |
437
+ | Nov 2026 | **v4.7.0** | Auto-rules | `bdd2pw apply-proposals --interactive` — walks the human through each v3.6 proposal, validates the regex compiles + matches the sample texts, optionally appends to `stepMatcher.ts`. Closes the propose-rules loop. |
438
+ | Dec 2026 | **v4.8.0** | Domain packs (3 more) | **fintech** (KYC, AML, trading desks), **real-estate** (MLS, listings, escrow), **hospitality** (PMS, reservations, OTA). ~60 more rules. |
439
+ | Jan 2027 | **v4.9.0** | API v2 | WebSocket assertion rules, multipart file-upload patterns, GraphQL query / mutation / subscription rules. Extends v3.0's API testing surface. |
440
+ | Feb 2027 | **v5.0.0** | CI/CD templates + default flips | Optional scaffolder output: GitHub Actions / GitLab CI / Azure Pipelines / CircleCI starter workflows wired to run the generated specs (opt-in via `--ci <provider>`). Bumps to v5 alongside a small set of default flips (llm-stats + healing become opt-out). Migration guide ships alongside. |
385
441
 
386
442
  Each release is shaped to be self-contained, ship in ~2 weeks, and keep `domains: []` byte-stable for existing users so the upgrade path stays painless.
387
443
 
package/dist/cli.js CHANGED
@@ -43,6 +43,9 @@ const path = __importStar(require("path"));
43
43
  const index_1 = require("./index");
44
44
  const llm_1 = require("./llm");
45
45
  const healStats_1 = require("./reports/healStats");
46
+ const quarantineStats_1 = require("./reports/quarantineStats");
47
+ const coverage_1 = require("./reports/coverage");
48
+ const stepMatcher_1 = require("./transformers/stepMatcher");
46
49
  const logger_1 = require("./utils/logger");
47
50
  const program = new commander_1.Command();
48
51
  program
@@ -57,6 +60,7 @@ program
57
60
  .requiredOption("--page <Name>", "Page Object class name (PascalCase)")
58
61
  .requiredOption("--repo <dir>", "Target Playwright TS repo (created if missing)")
59
62
  .option("--pages <list>", "Comma-separated list of additional Page Object names")
63
+ .option("--spec-name <stem>", "v4.4.0 — override the emitted spec filename stem. Writes `tests/<stem>.spec.ts` instead of the default POM-derived name (e.g. `login.spec.ts` from `LoginPage`). Useful when one feature file maps to one spec regardless of which POM it targets (attestqa, epic-per-feature layouts).")
60
64
  .option("--storage-state <path>", "Pre-authenticated storage state JSON")
61
65
  .option("--headed", "Show browser during MCP scan", false)
62
66
  .option("--snapshot-file <path>", "Read elements from a JSON file instead of launching a browser")
@@ -135,6 +139,8 @@ program
135
139
  page: opts.page,
136
140
  repo: path.resolve(opts.repo),
137
141
  pages: opts.pages?.split(",").map((s) => s.trim()),
142
+ // v4.4.0 — attestqa integration: let the caller name the spec file.
143
+ specName: typeof opts.specName === "string" ? opts.specName : undefined,
138
144
  storageState: opts.storageState,
139
145
  headed: opts.headed,
140
146
  llm: opts.llm,
@@ -311,6 +317,79 @@ program
311
317
  * and the candidate selectors that got promoted. Run after
312
318
  * `npx playwright test` in CI to track self-healing ROI per test run.
313
319
  */
320
+ program
321
+ .command("quarantine-stats")
322
+ .description("v4.4.0 Slice 1 — aggregate LLM-provenance data (spec.meta.json sidecars + candidate-rules.jsonl) into a per-feature quarantine-lane report. Writes <repo>/artefacts/quarantine-stats.json.")
323
+ .argument("<repo>", "Path to the scaffolded test repo (contains tests/ and artefacts/).")
324
+ .option("--out <path>", "Where to write quarantine-stats.json. Defaults to <repo>/artefacts/quarantine-stats.json.")
325
+ .option("--json", "Print the report as JSON to stdout instead of the table.", false)
326
+ .action(async (repo, raw) => {
327
+ try {
328
+ const pkgVersion = require("../package.json").version;
329
+ const { stats, outputPath } = await (0, quarantineStats_1.analyseQuarantineStats)({
330
+ repo: path.resolve(repo),
331
+ version: pkgVersion,
332
+ outputPath: raw.out,
333
+ });
334
+ if (raw.json === true) {
335
+ process.stdout.write(JSON.stringify(stats, null, 2) + "\n");
336
+ }
337
+ else {
338
+ process.stdout.write((0, quarantineStats_1.renderQuarantineStatsTable)(stats));
339
+ process.stdout.write(`\nquarantine-stats: wrote ${outputPath}\n`);
340
+ }
341
+ }
342
+ catch (err) {
343
+ logger_1.logger.error({ err }, "quarantine-stats: read error");
344
+ process.exit(1);
345
+ }
346
+ });
347
+ program
348
+ .command("coverage")
349
+ .description("v4.4.0 Slice 2 — rule + pack hit rate, dead rules, promotion trail, heal pressure. Reads spec.meta.json + candidate-rules.jsonl + heal-events.jsonl. Writes <repo>/artefacts/coverage.json.")
350
+ .argument("<repo>", "Path to the scaffolded test repo (contains tests/ and artefacts/).")
351
+ .option("--out <path>", "Where to write coverage.json. Defaults to <repo>/artefacts/coverage.json.")
352
+ .option("--json", "Print the report as JSON to stdout instead of the table.", false)
353
+ .option("--suggest-retire", "Print a copyable stanza listing dead packs + rules for this repo. Never edits anything.", false)
354
+ .option("--domains <list>", "Comma-separated domain packs to consider active (matches the scaffold's --domains flag). Empty = core rules only. Affects the dead-rules calculation.")
355
+ .action(async (repo, raw) => {
356
+ try {
357
+ // Match the scaffold's --domains behaviour so the ruleId ↔ pack
358
+ // mapping the coverage report uses agrees with what the sidecar
359
+ // would have written.
360
+ const domainList = raw.domains
361
+ ? raw.domains
362
+ .split(",")
363
+ .map((s) => s.trim())
364
+ .filter(Boolean)
365
+ : undefined;
366
+ if (domainList) {
367
+ // Best-effort — invalid names are silently dropped by setActiveDomains.
368
+ (0, stepMatcher_1.setActiveDomains)(domainList);
369
+ }
370
+ const pkgVersion = require("../package.json").version;
371
+ const { coverage, outputPath } = await (0, coverage_1.analyseCoverage)({
372
+ repo: path.resolve(repo),
373
+ version: pkgVersion,
374
+ outputPath: raw.out,
375
+ registryRuleIds: (0, stepMatcher_1.listAllRuleIds)(),
376
+ });
377
+ if (raw.json === true) {
378
+ process.stdout.write(JSON.stringify(coverage, null, 2) + "\n");
379
+ }
380
+ else if (raw.suggestRetire === true) {
381
+ process.stdout.write((0, coverage_1.renderSuggestRetire)(coverage));
382
+ }
383
+ else {
384
+ process.stdout.write((0, coverage_1.renderCoverageTable)(coverage));
385
+ process.stdout.write(`\ncoverage: wrote ${outputPath}\n`);
386
+ }
387
+ }
388
+ catch (err) {
389
+ logger_1.logger.error({ err }, "coverage: read error");
390
+ process.exit(1);
391
+ }
392
+ });
314
393
  program
315
394
  .command("heal-stats")
316
395
  .description("Aggregate <repo>/artefacts/heal-events.jsonl into a heal-stats.json sidecar.")
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AACA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAoC;AACpC,2CAA6B;AAC7B,mCAAuD;AACvD,+BAAqC;AACrC,mDAAuD;AACvD,2CAAwC;AAEx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,EAAE,MAAM,CAAC,WAAW;KAChC,EACD,sBAAsB,CACvB,CAAC;IACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,uBAAuB,MAAM,CAAC,UAAU,YAAY,MAAM,CAAC,WAAW,eAAe,CACtF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAC7C,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -19,21 +19,21 @@ export declare const ScaffoldRequestSchema: z.ZodObject<{
19
19
  noValidate: z.ZodOptional<z.ZodBoolean>;
20
20
  force: z.ZodOptional<z.ZodBoolean>;
21
21
  }, "strip", z.ZodTypeAny, {
22
+ llm?: "anthropic" | "openai" | "gemini" | undefined;
22
23
  pages?: string[] | undefined;
23
24
  templates?: string | undefined;
24
25
  storageState?: string | undefined;
25
26
  headed?: boolean | undefined;
26
- llm?: "anthropic" | "openai" | "gemini" | undefined;
27
27
  governanceUrl?: string | undefined;
28
28
  telemetry?: boolean | undefined;
29
29
  noValidate?: boolean | undefined;
30
30
  force?: boolean | undefined;
31
31
  }, {
32
+ llm?: "anthropic" | "openai" | "gemini" | undefined;
32
33
  pages?: string[] | undefined;
33
34
  templates?: string | undefined;
34
35
  storageState?: string | undefined;
35
36
  headed?: boolean | undefined;
36
- llm?: "anthropic" | "openai" | "gemini" | undefined;
37
37
  governanceUrl?: string | undefined;
38
38
  telemetry?: boolean | undefined;
39
39
  noValidate?: boolean | undefined;
@@ -45,11 +45,11 @@ export declare const ScaffoldRequestSchema: z.ZodObject<{
45
45
  feature: string;
46
46
  repo: string;
47
47
  options?: {
48
+ llm?: "anthropic" | "openai" | "gemini" | undefined;
48
49
  pages?: string[] | undefined;
49
50
  templates?: string | undefined;
50
51
  storageState?: string | undefined;
51
52
  headed?: boolean | undefined;
52
- llm?: "anthropic" | "openai" | "gemini" | undefined;
53
53
  governanceUrl?: string | undefined;
54
54
  telemetry?: boolean | undefined;
55
55
  noValidate?: boolean | undefined;
@@ -61,11 +61,11 @@ export declare const ScaffoldRequestSchema: z.ZodObject<{
61
61
  feature: string;
62
62
  repo: string;
63
63
  options?: {
64
+ llm?: "anthropic" | "openai" | "gemini" | undefined;
64
65
  pages?: string[] | undefined;
65
66
  templates?: string | undefined;
66
67
  storageState?: string | undefined;
67
68
  headed?: boolean | undefined;
68
- llm?: "anthropic" | "openai" | "gemini" | undefined;
69
69
  governanceUrl?: string | undefined;
70
70
  telemetry?: boolean | undefined;
71
71
  noValidate?: boolean | undefined;
package/dist/index.js CHANGED
@@ -454,6 +454,23 @@ async function scaffold(opts) {
454
454
  });
455
455
  }
456
456
  }
457
+ // v4.4.0 — Slice 1 (LLM quarantine lane). Any scenario with at
458
+ // least one LLM-produced binding earns the `@llm-generated` tag so
459
+ // teams can filter runs with `--grep-invert @llm-generated` for a
460
+ // trusted-only lane. The tag is idempotent — a re-scaffold that
461
+ // finds every step now rule-bound drops it automatically.
462
+ const hasLlmBinding = sc.bindings.some((b) => b.provenance?.source === "llm");
463
+ if (hasLlmBinding) {
464
+ const existing = sc.tags ?? [];
465
+ if (!existing.includes("@llm-generated")) {
466
+ sc.tags = [...existing, "@llm-generated"];
467
+ }
468
+ }
469
+ else if (sc.tags) {
470
+ // No LLM bindings in this scenario — strip the tag if it was
471
+ // present from a previous re-scaffold with different inputs.
472
+ sc.tags = sc.tags.filter((t) => t !== "@llm-generated");
473
+ }
457
474
  }
458
475
  // Background bindings emit into beforeEach but their warnings were being
459
476
  // dropped from the review report. Surface them with a [Background] tag.
@@ -532,7 +549,16 @@ async function scaffold(opts) {
532
549
  // 9) Emit spec file. pageObjectFileName returns "login.page.ts"; strip
533
550
  // the trailing ".ts" for both the spec file stem and the import path.
534
551
  const pomStem = pomFileName.replace(/\.ts$/, ""); // "login.page"
535
- const specStem = pomStem.replace(/\.page$/, ""); // "login"
552
+ // v4.4.0 — spec stem resolution. When `opts.specName` is set, use it
553
+ // verbatim for the spec file + its sidecar + merge-mode lookup.
554
+ // Otherwise fall back to the historical POM-derived stem. The POM
555
+ // filename, class name, and `../pages/<pomStem>` import path are
556
+ // never touched — only the spec filename. See attestqa integration
557
+ // note dated 2026-10-11 for the motivation.
558
+ const resolvedSpecName = opts.specName && opts.specName.trim().length > 0
559
+ ? opts.specName.trim().replace(/\.spec\.ts$/, "").replace(/\.spec$/, "")
560
+ : undefined;
561
+ const specStem = resolvedSpecName ?? pomStem.replace(/\.page$/, ""); // "login"
536
562
  const specPath = path.join(opts.repo, "tests", `${specStem}.spec.ts`);
537
563
  const specEmit = (0, facade_1.emitTestFile)({
538
564
  describeName: feature.name,