@sun-asterisk/sungen 3.0.0-beta.74 → 3.0.0-beta.77
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/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +17 -3
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +30 -14
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/ingest.d.ts +3 -0
- package/dist/cli/commands/ingest.d.ts.map +1 -0
- package/dist/cli/commands/ingest.js +179 -0
- package/dist/cli/commands/ingest.js.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/templates/index.html +54 -54
- package/dist/generators/gherkin-parser/index.d.ts +2 -0
- package/dist/generators/gherkin-parser/index.d.ts.map +1 -1
- package/dist/generators/gherkin-parser/index.js +15 -0
- package/dist/generators/gherkin-parser/index.js.map +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +8 -0
- package/dist/generators/test-generator/patterns/capture-patterns.d.ts +5 -0
- package/dist/generators/test-generator/patterns/capture-patterns.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/capture-patterns.js +33 -0
- package/dist/generators/test-generator/patterns/capture-patterns.js.map +1 -1
- package/dist/harness/audit.d.ts +5 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +13 -2
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/capability-plan.d.ts +6 -0
- package/dist/harness/capability-plan.d.ts.map +1 -1
- package/dist/harness/capability-plan.js +13 -0
- package/dist/harness/capability-plan.js.map +1 -1
- package/dist/harness/parse.d.ts +1 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +3 -0
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/provenance.d.ts +6 -0
- package/dist/harness/provenance.d.ts.map +1 -0
- package/dist/harness/provenance.js +65 -0
- package/dist/harness/provenance.js.map +1 -0
- package/dist/harness/sensors.d.ts +30 -0
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +122 -0
- package/dist/harness/sensors.js.map +1 -1
- package/dist/ingest/baseline-audit.d.ts +38 -0
- package/dist/ingest/baseline-audit.d.ts.map +1 -0
- package/dist/ingest/baseline-audit.js +85 -0
- package/dist/ingest/baseline-audit.js.map +1 -0
- package/dist/ingest/gsheet-fetch.d.ts +9 -0
- package/dist/ingest/gsheet-fetch.d.ts.map +1 -0
- package/dist/ingest/gsheet-fetch.js +180 -0
- package/dist/ingest/gsheet-fetch.js.map +1 -0
- package/dist/ingest/index.d.ts +6 -0
- package/dist/ingest/index.d.ts.map +1 -0
- package/dist/ingest/index.js +22 -0
- package/dist/ingest/index.js.map +1 -0
- package/dist/ingest/legacy-parser.d.ts +39 -0
- package/dist/ingest/legacy-parser.d.ts.map +1 -0
- package/dist/ingest/legacy-parser.js +218 -0
- package/dist/ingest/legacy-parser.js.map +1 -0
- package/dist/ingest/reconcile.d.ts +30 -0
- package/dist/ingest/reconcile.d.ts.map +1 -0
- package/dist/ingest/reconcile.js +65 -0
- package/dist/ingest/reconcile.js.map +1 -0
- package/dist/ingest/to-gherkin.d.ts +33 -0
- package/dist/ingest/to-gherkin.d.ts.map +1 -0
- package/dist/ingest/to-gherkin.js +93 -0
- package/dist/ingest/to-gherkin.js.map +1 -0
- package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
- package/dist/orchestrator/ai-rules-updater.js +2 -0
- package/dist/orchestrator/ai-rules-updater.js.map +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-skill-delivery.md +10 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +12 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-ingest-legacy.md +79 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +10 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +12 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md +79 -0
- package/package.json +3 -3
- package/src/cli/commands/audit.ts +13 -3
- package/src/cli/commands/delivery.ts +31 -15
- package/src/cli/commands/ingest.ts +141 -0
- package/src/cli/index.ts +2 -0
- package/src/dashboard/templates/index.html +54 -54
- package/src/generators/gherkin-parser/index.ts +17 -0
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +8 -0
- package/src/generators/test-generator/patterns/capture-patterns.ts +38 -0
- package/src/harness/audit.ts +18 -4
- package/src/harness/capability-plan.ts +11 -0
- package/src/harness/parse.ts +4 -0
- package/src/harness/provenance.ts +33 -0
- package/src/harness/sensors.ts +189 -0
- package/src/ingest/baseline-audit.ts +100 -0
- package/src/ingest/gsheet-fetch.ts +152 -0
- package/src/ingest/index.ts +5 -0
- package/src/ingest/legacy-parser.ts +184 -0
- package/src/ingest/reconcile.ts +80 -0
- package/src/ingest/to-gherkin.ts +108 -0
- package/src/orchestrator/ai-rules-updater.ts +2 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +10 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +12 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-ingest-legacy.md +79 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +10 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +12 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md +79 -0
|
@@ -78,6 +78,16 @@ The CLI reads the **per-target result file first** (co-located with `.spec.ts`),
|
|
|
78
78
|
|
|
79
79
|
---
|
|
80
80
|
|
|
81
|
+
## XLSX sheets — Auto / Manual split
|
|
82
|
+
|
|
83
|
+
The `.xlsx` is split into two sheets so QA manages the sets separately:
|
|
84
|
+
- **`Auto`** — automatable test cases (`Auto` + `Not compiled`).
|
|
85
|
+
- **`Manual`** — `@manual` test cases (always present, header-only when there are none).
|
|
86
|
+
|
|
87
|
+
Multi-locale (no `SUNGEN_ENV`): one **`<LOCALE> Auto`** sheet per locale + a single shared **`Manual`** sheet (manual TCs are locale-invariant). The **CSV stays one file with every row** — the `Testcase type` column distinguishes Auto vs Manual.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
81
91
|
## Excluded from CSV
|
|
82
92
|
|
|
83
93
|
- `@steps:<name>` **base** scenarios — these are setup-only, inlined into `@extend:...` scenarios at compile time
|
|
@@ -74,6 +74,18 @@ User switch to [T] frame | [main] frame
|
|
|
74
74
|
# 8. Page: User see [T] page
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
### Collection / all-card (P5)
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
# Every element's TEXT matches a value (filter correctness, all items belong):
|
|
81
|
+
User see all [Result Product Name] text contains {{category_term}}
|
|
82
|
+
# Every CONTAINER holds a CHILD element (structural per-card proof — prove "each card has X"):
|
|
83
|
+
User see all [Product Card] contain [Product Name]
|
|
84
|
+
User see all [Product Card] contain [Add To Cart] button
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Use the all-card form whenever a title claims *every / each* card/row exposes something — a single `User see [Add To Cart] button` does NOT prove "each card" and the harness Claim-Proof gate will flag it.
|
|
88
|
+
|
|
77
89
|
### Table
|
|
78
90
|
|
|
79
91
|
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sungen-ingest-legacy
|
|
3
|
+
description: 'Import a legacy manual testcase suite from Google Sheets (multi-tab) or a local file into Sungen — fetch via MCP, then sungen ingest. Use when the user wants to convert/evaluate an existing manual testcase spreadsheet.'
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# sungen-ingest-legacy
|
|
8
|
+
|
|
9
|
+
Bring an existing **manual testcase workbook** into Sungen for evaluation + conversion. The
|
|
10
|
+
fetch (Google login + pick file) is done here via MCP; the parsing/audit is deterministic
|
|
11
|
+
(`sungen ingest`). **Security:** the workbook is the user's project data — read it on
|
|
12
|
+
consent, keep the output in their project, never upload or commit the content.
|
|
13
|
+
|
|
14
|
+
## Flow
|
|
15
|
+
|
|
16
|
+
1. **Locate the source.**
|
|
17
|
+
- **Google Sheets (recommended):** use the Google Drive MCP. Authenticate if needed, then
|
|
18
|
+
`search_files` / list to find the workbook; confirm the file with the user.
|
|
19
|
+
- **Local:** if the user points to a `.xlsx`/`.csv`, skip to step 4.
|
|
20
|
+
|
|
21
|
+
2. **List the tabs.** Read the workbook's sheet/tab names (Drive MCP file metadata or a values
|
|
22
|
+
read). A legacy workbook usually has **many** tabs — some are testcases, some are
|
|
23
|
+
viewpoint/UI matrices.
|
|
24
|
+
|
|
25
|
+
3. **Assemble a JSON sheet-bundle.** For each tab, read its cell values (a 2-D array of
|
|
26
|
+
strings) and write a local bundle in the user project (e.g.
|
|
27
|
+
`qa/screens/<screen>/requirements/legacy/bundle.json`):
|
|
28
|
+
```json
|
|
29
|
+
{ "source": "<workbook name>", "sheets": [ { "name": "<tab>", "rows": [["TC ID","Page",…],["TC-01",…]] } ] }
|
|
30
|
+
```
|
|
31
|
+
Record only the **source link** in `requirements/legacy/source.yaml` — never the content.
|
|
32
|
+
|
|
33
|
+
4. **Classify the tabs.** Run:
|
|
34
|
+
```bash
|
|
35
|
+
sungen ingest --legacy <bundle.json|file.xlsx|file.csv> --list-sheets
|
|
36
|
+
```
|
|
37
|
+
It prints each tab + detected type (`testcase` / `viewpoint-matrix` / `ui-checklist`).
|
|
38
|
+
|
|
39
|
+
5. **Confirm which tabs to ingest.** Use `AskUserQuestion` to let the user pick the
|
|
40
|
+
**testcase** tabs (matrix/UI tabs feed the viewpoint layer later, not the inventory).
|
|
41
|
+
|
|
42
|
+
6. **Ingest + reconcile.**
|
|
43
|
+
```bash
|
|
44
|
+
sungen ingest --legacy <source> --screen <screen> --sheets "<Tab A>,<Tab B>" --emit-gherkin
|
|
45
|
+
```
|
|
46
|
+
Produces: `inventory.json` (+ baseline audit), `*.legacy-draft.feature` + `legacy-trace.json`
|
|
47
|
+
(parity: `@legacy:<id>` per scenario), and `test-viewpoint.draft.md` with **blind-spots**
|
|
48
|
+
(catalog-expected viewpoints the legacy suite lacks).
|
|
49
|
+
|
|
50
|
+
7. **Hand off to quality.** Tell the user the next step is `/sungen:create-test <screen>` —
|
|
51
|
+
it discovers + refines the draft into real `[Reference]` steps and fills the blind-spots;
|
|
52
|
+
then `sungen audit <screen>` gates quality. A 1:1 convert is NOT the deliverable; the
|
|
53
|
+
harness raises the legacy floor to catalog quality.
|
|
54
|
+
|
|
55
|
+
## Governance block (important)
|
|
56
|
+
|
|
57
|
+
Many orgs mark confidential files as **"ineligible for generative AI contexts"** — the
|
|
58
|
+
Google Drive MCP will then **refuse** to read the file (metadata + download both error).
|
|
59
|
+
This is the org's DLP policy, not a bug, and it is the *expected* outcome for a
|
|
60
|
+
confidential testcase suite. When you hit it, **do not retry** — fall back:
|
|
61
|
+
|
|
62
|
+
> "This sheet is restricted by your org's data policy, so I can't read it through the
|
|
63
|
+
> AI connector. Two ways to proceed, both running as **you**, not AI:
|
|
64
|
+
> (1) `sungen ingest --gsheet <url>` — fetches under your own Google identity
|
|
65
|
+
> (read-only; Viewer/Commenter is enough). It offers to install `googleapis`
|
|
66
|
+
> and to open the Google login in your browser (pick your account), then
|
|
67
|
+
> retries automatically. Needs the gcloud SDK for the browser login.
|
|
68
|
+
> (2) Export it manually (**File → Download → Microsoft Excel `.xlsx`**) and I'll run
|
|
69
|
+
> `sungen ingest --legacy <file>.xlsx`."
|
|
70
|
+
|
|
71
|
+
The local-file path is deterministic and **never sends the content through AI** — the
|
|
72
|
+
correct, governance-compliant channel for confidential data. The MCP auto-pick is only
|
|
73
|
+
for files the org does *not* restrict.
|
|
74
|
+
|
|
75
|
+
## Notes
|
|
76
|
+
- Multiple local CSVs (one per tab) also work: `--legacy tab1.csv tab2.csv …`.
|
|
77
|
+
- Re-run only re-fetches when the user asks; otherwise reuse the saved bundle.
|
|
78
|
+
- Do not invent testcases. Only ingest what the workbook contains; the *augmentation*
|
|
79
|
+
(blind-spots) happens in `/sungen:create-test`, flagged for human review.
|